From 40430ad29c09b0a653eee2baf9da1e70ae244f62 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Thu, 29 Sep 2022 15:31:32 +1000 Subject: [PATCH] Revert "Fixes `vite dev` with arbitrary socketio port" This reverts commit 9ce62f04781d6a3aabd5f85931d42b13f810619e. --- frontend/.env.testing | 2 -- .../{index.dec9161e.js => index.66192cce.js} | 2 +- frontend/dist/index.html | 2 +- frontend/package.json | 2 +- frontend/src/app/socketio/middleware.ts | 18 ++++-------------- 5 files changed, 7 insertions(+), 19 deletions(-) delete mode 100644 frontend/.env.testing rename frontend/dist/assets/{index.dec9161e.js => index.66192cce.js} (92%) diff --git a/frontend/.env.testing b/frontend/.env.testing deleted file mode 100644 index 02889ec1f4..0000000000 --- a/frontend/.env.testing +++ /dev/null @@ -1,2 +0,0 @@ -NODE_ENV=development -VITE_SOCKETIO_PORT=9090 diff --git a/frontend/dist/assets/index.dec9161e.js b/frontend/dist/assets/index.66192cce.js similarity index 92% rename from frontend/dist/assets/index.dec9161e.js rename to frontend/dist/assets/index.66192cce.js index 33f7fad1f2..351018cfc1 100644 --- a/frontend/dist/assets/index.dec9161e.js +++ b/frontend/dist/assets/index.66192cce.js @@ -682,7 +682,7 @@ __p += '`),kn&&(Le+=`' + function print() { __p += __j.call(arguments, '') } `:`; `)+Le+`return __p -}`;var pn=Z1(function(){return Kn(j,vt+"return "+Le).apply(n,Y)});if(pn.source=Le,Hl(pn))throw pn;return pn}function nE(l){return Zn(l).toLowerCase()}function Bg(l){return Zn(l).toUpperCase()}function rE(l,d,g){if(l=Zn(l),l&&(g||d===n))return ms(l);if(!l||!(d=Za(d)))return l;var E=Ho(l),P=Ho(d),j=cd(E,P),Y=cb(E,P)+1;return xs(E,j,Y).join("")}function Ug(l,d,g){if(l=Zn(l),l&&(g||d===n))return l.slice(0,mb(l)+1);if(!l||!(d=Za(d)))return l;var E=Ho(l),P=cb(E,Ho(d))+1;return xs(E,0,P).join("")}function X1(l,d,g){if(l=Zn(l),l&&(g||d===n))return l.replace(La,"");if(!l||!(d=Za(d)))return l;var E=Ho(l),P=cd(E,Ho(d));return xs(E,P).join("")}function aE(l,d){var g=se,E=Se;if(wr(d)){var P="separator"in d?d.separator:P;g="length"in d?rn(d.length):g,E="omission"in d?Za(d.omission):E}l=Zn(l);var j=l.length;if(kc(l)){var Y=Ho(l);j=Y.length}if(g>=j)return l;var Z=g-Au(E);if(Z<1)return E;var oe=Y?xs(Y,0,Z).join(""):l.slice(0,Z);if(P===n)return oe+E;if(Y&&(Z+=oe.length-Z),Km(P)){if(l.slice(Z).search(P)){var De,Ae=oe;for(P.global||(P=Xs(P.source,Zn(Vn.exec(P))+"g")),P.lastIndex=0;De=P.exec(Ae);)var Le=De.index;oe=oe.slice(0,Le===n?Z:Le)}}else if(l.indexOf(Za(P),Z)!=Z){var Qe=oe.lastIndexOf(P);Qe>-1&&(oe=oe.slice(0,Qe))}return oe+E}function iE(l){return l=Zn(l),l&&ga.test(l)?l.replace(jn,HC):l}var oE=Jc(function(l,d,g){return l+(g?" ":"")+d.toUpperCase()}),$g=Wb("toUpperCase");function jg(l,d,g){return l=Zn(l),d=g?n:d,d===n?VC(l)?YC(l):wv(l):l.match(d)||[]}var Z1=yn(function(l,d){try{return yt(l,n,d)}catch(g){return Hl(g)?g:new nn(g)}}),sE=sl(function(l,d){return Tt(d,function(g){g=_i(g),gs(l,g,Wm(l[g],l))}),l});function lE(l){var d=l==null?0:l.length,g=Pt();return l=d?Pn(l,function(E){if(typeof E[1]!="function")throw new $i(u);return[g(E[0]),E[1]]}):[],yn(function(E){for(var P=-1;++Pxe)return[];var g=Ce,E=ia(l,Ce);d=Pt(d),l-=Ce;for(var P=om(E,d);++g0||d<0)?new An(g):(l<0?g=g.takeRight(-l):l&&(g=g.drop(l)),d!==n&&(d=rn(d),g=d<0?g.dropRight(-d):g.take(d-l)),g)},An.prototype.takeRightWhile=function(l){return this.reverse().takeWhile(l).reverse()},An.prototype.toArray=function(){return this.take(Ce)},gr(An.prototype,function(l,d){var g=/^(?:filter|find|map|reject)|While$/.test(d),E=/^(?:head|last)$/.test(d),P=L[E?"take"+(d=="last"?"Right":""):d],j=E||/^find/.test(d);!P||(L.prototype[d]=function(){var Y=this.__wrapped__,Z=E?[1]:arguments,oe=Y instanceof An,De=Z[0],Ae=oe||sn(Y),Le=function(bn){var kn=P.apply(L,wi([bn],Z));return E&&Qe?kn[0]:kn};Ae&&g&&typeof De=="function"&&De.length!=1&&(oe=Ae=!1);var Qe=this.__chain__,vt=!!this.__actions__.length,Mt=j&&!Qe,pn=oe&&!vt;if(!j&&Ae){Y=pn?Y:new An(this);var Ut=l.apply(Y,Z);return Ut.__actions__.push({func:Vm,args:[Le],thisArg:n}),new uo(Ut,Qe)}return Mt&&pn?l.apply(this,Z):(Ut=this.thru(Le),Mt?E?Ut.value()[0]:Ut.value():Ut)})}),Tt(["pop","push","shift","sort","splice","unshift"],function(l){var d=Zs[l],g=/^(?:push|sort|unshift)$/.test(l)?"tap":"thru",E=/^(?:pop|shift)$/.test(l);L.prototype[l]=function(){var P=arguments;if(E&&!this.__chain__){var j=this.value();return d.apply(sn(j)?j:[],P)}return this[g](function(Y){return d.apply(sn(Y)?Y:[],P)})}}),gr(An.prototype,function(l,d){var g=L[d];if(g){var E=g.name+"";er.call(Uc,E)||(Uc[E]=[]),Uc[E].push({name:d,func:g})}}),Uc[ef(n,B).name]=[{name:"wrapper",func:n}],An.prototype.clone=Ft,An.prototype.reverse=Vc,An.prototype.value=jr,L.prototype.at=Yw,L.prototype.chain=qw,L.prototype.commit=Kw,L.prototype.next=g1,L.prototype.plant=qd,L.prototype.reverse=Xw,L.prototype.toJSON=L.prototype.valueOf=L.prototype.value=y1,L.prototype.first=L.prototype.head,hd&&(L.prototype[hd]=Sg),L},Dc=qC();A?((A.exports=Dc)._=Dc,S._=Dc):Kt._=Dc}).call(vc)})(Yr,Yr.exports);const Spe={currentImageUuid:"",images:[],nextPage:1,offset:0},pz=xO({name:"gallery",initialState:Spe,reducers:{setCurrentImage:(e,t)=>{e.currentImage=t.payload,e.currentImageUuid=t.payload.uuid},removeImage:(e,t)=>{const n=t.payload,i=e.images.filter(o=>o.uuid!==n);if(n===e.currentImageUuid){const o=e.images.findIndex(u=>u.uuid===n),c=Yr.exports.clamp(o,0,i.length-1);e.currentImage=i.length?i[c]:void 0,e.currentImageUuid=i.length?i[c].uuid:""}e.images=i},addImage:(e,t)=>{e.images.unshift(t.payload),e.currentImageUuid=t.payload.uuid,e.intermediateImage=void 0,e.currentImage=t.payload,e.offset+=1},setIntermediateImage:(e,t)=>{e.intermediateImage=t.payload},clearIntermediateImage:e=>{e.intermediateImage=void 0},addGalleryImages:(e,t)=>{const{images:n,nextPage:i,offset:o}=t.payload;if(n.length){const c=n[0];e.images=e.images.concat(n).sort((u,m)=>m.mtime-u.mtime),e.currentImage=c,e.currentImageUuid=c.uuid,e.nextPage=i,e.offset=o}}}}),{addImage:Ix,clearIntermediateImage:vI,removeImage:xpe,setCurrentImage:Cpe,addGalleryImages:wpe,setIntermediateImage:Npe}=pz.actions,Epe=pz.reducer,_pe={isConnected:!1,isProcessing:!1,log:[],shouldShowLogViewer:!1,shouldDisplayInProgress:!1,shouldDisplayGuides:!0,isGFPGANAvailable:!0,isESRGANAvailable:!0,socketId:"",shouldConfirmOnDelete:!0,openAccordions:[0],currentStep:0,totalSteps:0,currentIteration:0,totalIterations:0,currentStatus:"Disconnected",currentStatusHasSteps:!1,model:"",model_id:"",model_hash:"",app_id:"",app_version:""},Tpe=_pe,mz=xO({name:"system",initialState:Tpe,reducers:{setShouldDisplayInProgress:(e,t)=>{e.shouldDisplayInProgress=t.payload},setIsProcessing:(e,t)=>{e.isProcessing=t.payload},setCurrentStatus:(e,t)=>{e.currentStatus=t.payload},setSystemStatus:(e,t)=>{const n=!t.payload.isProcessing&&e.isConnected?"Connected":t.payload.currentStatus;return{...e,...t.payload,currentStatus:n}},addLogEntry:(e,t)=>{const{timestamp:n,message:i,level:o}=t.payload,u={timestamp:n,message:i,level:o||"info"};e.log.push(u)},setShouldShowLogViewer:(e,t)=>{e.shouldShowLogViewer=t.payload},setIsConnected:(e,t)=>{e.isConnected=t.payload,e.isProcessing=!1,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1},setSocketId:(e,t)=>{e.socketId=t.payload},setShouldConfirmOnDelete:(e,t)=>{e.shouldConfirmOnDelete=t.payload},setOpenAccordions:(e,t)=>{e.openAccordions=t.payload},setSystemConfig:(e,t)=>({...e,...t.payload}),setShouldDisplayGuides:(e,t)=>{e.shouldDisplayGuides=t.payload}}}),{setShouldDisplayInProgress:Rpe,setIsProcessing:hc,addLogEntry:eo,setShouldShowLogViewer:Ape,setIsConnected:gI,setSocketId:bge,setShouldConfirmOnDelete:hz,setOpenAccordions:kpe,setSystemStatus:Ope,setCurrentStatus:yI,setSystemConfig:Dpe,setShouldDisplayGuides:Ppe}=mz.actions,Mpe=mz.reducer,Cu=Object.create(null);Cu.open="0";Cu.close="1";Cu.ping="2";Cu.pong="3";Cu.message="4";Cu.upgrade="5";Cu.noop="6";const a2=Object.create(null);Object.keys(Cu).forEach(e=>{a2[Cu[e]]=e});const Ipe={type:"error",data:"parser error"},Lpe=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Fpe=typeof ArrayBuffer=="function",zpe=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,vz=({type:e,data:t},n,i)=>Lpe&&t instanceof Blob?n?i(t):bI(t,i):Fpe&&(t instanceof ArrayBuffer||zpe(t))?n?i(t):bI(new Blob([t]),i):i(Cu[e]+(t||"")),bI=(e,t)=>{const n=new FileReader;return n.onload=function(){const i=n.result.split(",")[1];t("b"+i)},n.readAsDataURL(e)},SI="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",K0=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,n=e.length,i,o=0,c,u,m,h;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const v=new ArrayBuffer(t),b=new Uint8Array(v);for(i=0;i>4,b[o++]=(u&15)<<4|m>>2,b[o++]=(m&3)<<6|h&63;return v},Upe=typeof ArrayBuffer=="function",gz=(e,t)=>{if(typeof e!="string")return{type:"message",data:yz(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:$pe(e.substring(1),t)}:a2[n]?e.length>1?{type:a2[n],data:e.substring(1)}:{type:a2[n]}:Ipe},$pe=(e,t)=>{if(Upe){const n=Bpe(e);return yz(n,t)}else return{base64:!0,data:e}},yz=(e,t)=>{switch(t){case"blob":return e instanceof ArrayBuffer?new Blob([e]):e;case"arraybuffer":default:return e}},bz=String.fromCharCode(30),jpe=(e,t)=>{const n=e.length,i=new Array(n);let o=0;e.forEach((c,u)=>{vz(c,!1,m=>{i[u]=m,++o===n&&t(i.join(bz))})})},Vpe=(e,t)=>{const n=e.split(bz),i=[];for(let o=0;otypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function xz(e,...t){return t.reduce((n,i)=>(e.hasOwnProperty(i)&&(n[i]=e[i]),n),{})}const Wpe=setTimeout,Gpe=clearTimeout;function LC(e,t){t.useNativeTimers?(e.setTimeoutFn=Wpe.bind(Gf),e.clearTimeoutFn=Gpe.bind(Gf)):(e.setTimeoutFn=setTimeout.bind(Gf),e.clearTimeoutFn=clearTimeout.bind(Gf))}const Ype=1.33;function qpe(e){return typeof e=="string"?Kpe(e):Math.ceil((e.byteLength||e.size)*Ype)}function Kpe(e){let t=0,n=0;for(let i=0,o=e.length;i=57344?n+=3:(i++,n+=4);return n}class Xpe extends Error{constructor(t,n,i){super(t),this.description=n,this.context=i,this.type="TransportError"}}class Cz extends ha{constructor(t){super(),this.writable=!1,LC(this,t),this.opts=t,this.query=t.query,this.readyState="",this.socket=t.socket}onError(t,n,i){return super.emitReserved("error",new Xpe(t,n,i)),this}open(){return(this.readyState==="closed"||this.readyState==="")&&(this.readyState="opening",this.doOpen()),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=gz(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}}const wz="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),_A=64,Zpe={};let xI=0,Lx=0,CI;function wI(e){let t="";do t=wz[e%_A]+t,e=Math.floor(e/_A);while(e>0);return t}function Nz(){const e=wI(+new Date);return e!==CI?(xI=0,CI=e):e+"."+wI(xI++)}for(;Lx<_A;Lx++)Zpe[wz[Lx]]=Lx;function Ez(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function Qpe(e){let t={},n=e.split("&");for(let i=0,o=n.length;i{this.readyState="paused",t()};if(this.polling||!this.writable){let i=0;this.polling&&(i++,this.once("pollComplete",function(){--i||n()})),this.writable||(i++,this.once("drain",function(){--i||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=i=>{if(this.readyState==="opening"&&i.type==="open"&&this.onOpen(),i.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(i)};Vpe(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,jpe(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let t=this.query||{};const n=this.opts.secure?"https":"http";let i="";this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=Nz()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.opts.port&&(n==="https"&&Number(this.opts.port)!==443||n==="http"&&Number(this.opts.port)!==80)&&(i=":"+this.opts.port);const o=Ez(t),c=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(c?"["+this.opts.hostname+"]":this.opts.hostname)+i+this.opts.path+(o.length?"?"+o:"")}request(t={}){return Object.assign(t,{xd:this.xd,xs:this.xs},this.opts),new bu(this.uri(),t)}doWrite(t,n){const i=this.request({method:"POST",data:t});i.on("success",n),i.on("error",(o,c)=>{this.onError("xhr post error",o,c)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,i)=>{this.onError("xhr poll error",n,i)}),this.pollXhr=t}}class bu extends ha{constructor(t,n){super(),LC(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.async=n.async!==!1,this.data=n.data!==void 0?n.data:null,this.create()}create(){const t=xz(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd,t.xscheme=!!this.opts.xs;const n=this.xhr=new Tz(t);try{n.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let i in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(i)&&n.setRequestHeader(i,this.opts.extraHeaders[i])}}catch{}if(this.method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{n.readyState===4&&(n.status===200||n.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof n.status=="number"?n.status:0)},0))},n.send(this.data)}catch(i){this.setTimeoutFn(()=>{this.onError(i)},0);return}typeof document<"u"&&(this.index=bu.requestsCount++,bu.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=eme,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete bu.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}bu.requestsCount=0;bu.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",NI);else if(typeof addEventListener=="function"){const e="onpagehide"in Gf?"pagehide":"unload";addEventListener(e,NI,!1)}}function NI(){for(let e in bu.requests)bu.requests.hasOwnProperty(e)&&bu.requests[e].abort()}const rme=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),Fx=Gf.WebSocket||Gf.MozWebSocket,EI=!0,ame="arraybuffer",_I=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class ime extends Cz{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,i=_I?{}:xz(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(i.headers=this.opts.extraHeaders);try{this.ws=EI&&!_I?n?new Fx(t,n):new Fx(t):new Fx(t,n,i)}catch(o){return this.emitReserved("error",o)}this.ws.binaryType=this.socket.binaryType||ame,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n{const u={};try{EI&&this.ws.send(c)}catch{}o&&rme(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){let t=this.query||{};const n=this.opts.secure?"wss":"ws";let i="";this.opts.port&&(n==="wss"&&Number(this.opts.port)!==443||n==="ws"&&Number(this.opts.port)!==80)&&(i=":"+this.opts.port),this.opts.timestampRequests&&(t[this.opts.timestampParam]=Nz()),this.supportsBinary||(t.b64=1);const o=Ez(t),c=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(c?"["+this.opts.hostname+"]":this.opts.hostname)+i+this.opts.path+(o.length?"?"+o:"")}check(){return!!Fx}}const ome={websocket:ime,polling:nme},sme=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,lme=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function TA(e){const t=e,n=e.indexOf("["),i=e.indexOf("]");n!=-1&&i!=-1&&(e=e.substring(0,n)+e.substring(n,i).replace(/:/g,";")+e.substring(i,e.length));let o=sme.exec(e||""),c={},u=14;for(;u--;)c[lme[u]]=o[u]||"";return n!=-1&&i!=-1&&(c.source=t,c.host=c.host.substring(1,c.host.length-1).replace(/;/g,":"),c.authority=c.authority.replace("[","").replace("]","").replace(/;/g,":"),c.ipv6uri=!0),c.pathNames=ume(c,c.path),c.queryKey=cme(c,c.query),c}function ume(e,t){const n=/\/{2,9}/g,i=t.replace(n,"/").split("/");return(t.substr(0,1)=="/"||t.length===0)&&i.splice(0,1),t.substr(t.length-1,1)=="/"&&i.splice(i.length-1,1),i}function cme(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(i,o,c){o&&(n[o]=c)}),n}class $f extends ha{constructor(t,n={}){super(),t&&typeof t=="object"&&(n=t,t=null),t?(t=TA(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=TA(n.host).host),LC(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},n),this.opts.path=this.opts.path.replace(/\/$/,"")+"/",typeof this.opts.query=="string"&&(this.opts.query=Qpe(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&addEventListener("beforeunload",()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},!1),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=Sz,n.transport=t,this.id&&(n.sid=this.id);const i=Object.assign({},this.opts.transportOptions[t],this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new ome[t](i)}open(){let t;if(this.opts.rememberUpgrade&&$f.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch{this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){let n=this.createTransport(t),i=!1;$f.priorWebsocketSuccess=!1;const o=()=>{i||(n.send([{type:"ping",data:"probe"}]),n.once("packet",x=>{if(!i)if(x.type==="pong"&&x.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;$f.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{i||this.readyState!=="closed"&&(b(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const w=new Error("probe error");w.transport=n.name,this.emitReserved("upgradeError",w)}}))};function c(){i||(i=!0,b(),n.close(),n=null)}const u=x=>{const w=new Error("probe error: "+x);w.transport=n.name,c(),this.emitReserved("upgradeError",w)};function m(){u("transport closed")}function h(){u("socket closed")}function v(x){n&&x.name!==n.name&&c()}const b=()=>{n.removeListener("open",o),n.removeListener("error",u),n.removeListener("close",m),this.off("close",h),this.off("upgrading",v)};n.once("open",o),n.once("error",u),n.once("close",m),this.once("close",h),this.once("upgrading",v),n.open()}onOpen(){if(this.readyState="open",$f.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade&&this.transport.pause){let t=0;const n=this.upgrades.length;for(;t{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let i=0;i0&&n>this.maxPayload)return this.writeBuffer.slice(0,i);n+=2}return this.writeBuffer}write(t,n,i){return this.sendPacket("message",t,n,i),this}send(t,n,i){return this.sendPacket("message",t,n,i),this}sendPacket(t,n,i,o){if(typeof n=="function"&&(o=n,n=void 0),typeof i=="function"&&(o=i,i=null),this.readyState==="closing"||this.readyState==="closed")return;i=i||{},i.compress=i.compress!==!1;const c={type:t,data:n,options:i};this.emitReserved("packetCreate",c),this.writeBuffer.push(c),o&&this.once("flush",o),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},i=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?i():t()}):this.upgrading?i():t()),this}onError(t){$f.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&removeEventListener("offline",this.offlineEventListener,!1),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let i=0;const o=t.length;for(;itypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,Rz=Object.prototype.toString,mme=typeof Blob=="function"||typeof Blob<"u"&&Rz.call(Blob)==="[object BlobConstructor]",hme=typeof File=="function"||typeof File<"u"&&Rz.call(File)==="[object FileConstructor]";function kO(e){return dme&&(e instanceof ArrayBuffer||pme(e))||mme&&e instanceof Blob||hme&&e instanceof File}function i2(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,i=e.length;n=0&&e.num0;case qn.ACK:case qn.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}class Sme{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=gme(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const xme=Object.freeze(Object.defineProperty({__proto__:null,protocol:yme,get PacketType(){return qn},Encoder:bme,Decoder:OO},Symbol.toStringTag,{value:"Module"}));function Tl(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const Cme=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Az extends ha{constructor(t,n,i){super(),this.connected=!1,this.receiveBuffer=[],this.sendBuffer=[],this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,i&&i.auth&&(this.auth=i.auth),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[Tl(t,"open",this.onopen.bind(this)),Tl(t,"packet",this.onpacket.bind(this)),Tl(t,"error",this.onerror.bind(this)),Tl(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){if(Cme.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');n.unshift(t);const i={type:qn.EVENT,data:n};if(i.options={},i.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const u=this.ids++,m=n.pop();this._registerAckCallback(u,m),i.id=u}const o=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!o||!this.connected)||(this.connected?(this.notifyOutgoingListeners(i),this.packet(i)):this.sendBuffer.push(i)),this.flags={},this}_registerAckCallback(t,n){const i=this.flags.timeout;if(i===void 0){this.acks[t]=n;return}const o=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let c=0;c{this.io.clearTimeoutFn(o),n.apply(this,[null,...c])}}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this.packet({type:qn.CONNECT,data:t})}):this.packet({type:qn.CONNECT,data:this.auth})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case qn.CONNECT:if(t.data&&t.data.sid){const o=t.data.sid;this.onconnect(o)}else this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case qn.EVENT:case qn.BINARY_EVENT:this.onevent(t);break;case qn.ACK:case qn.BINARY_ACK:this.onack(t);break;case qn.DISCONNECT:this.ondisconnect();break;case qn.CONNECT_ERROR:this.destroy();const i=new Error(t.data.message);i.data=t.data.data,this.emitReserved("connect_error",i);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const i of n)i.apply(this,t)}super.emit.apply(this,t)}ack(t){const n=this;let i=!1;return function(...o){i||(i=!0,n.packet({type:qn.ACK,id:t,data:o}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(n.apply(this,t.data),delete this.acks[t.id])}onconnect(t){this.id=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:qn.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let i=0;i0&&e.jitter<=1?e.jitter:0,this.attempts=0}xv.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};xv.prototype.reset=function(){this.attempts=0};xv.prototype.setMin=function(e){this.ms=e};xv.prototype.setMax=function(e){this.max=e};xv.prototype.setJitter=function(e){this.jitter=e};class kA extends ha{constructor(t,n){var i;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,LC(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((i=n.randomizationFactor)!==null&&i!==void 0?i:.5),this.backoff=new xv({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const o=n.parser||xme;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new $f(this.uri,this.opts);const n=this.engine,i=this;this._readyState="opening",this.skipReconnect=!1;const o=Tl(n,"open",function(){i.onopen(),t&&t()}),c=Tl(n,"error",u=>{i.cleanup(),i._readyState="closed",this.emitReserved("error",u),t?t(u):i.maybeReconnectOnOpen()});if(this._timeout!==!1){const u=this._timeout;u===0&&o();const m=this.setTimeoutFn(()=>{o(),n.close(),n.emit("error",new Error("timeout"))},u);this.opts.autoUnref&&m.unref(),this.subs.push(function(){clearTimeout(m)})}return this.subs.push(o),this.subs.push(c),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Tl(t,"ping",this.onping.bind(this)),Tl(t,"data",this.ondata.bind(this)),Tl(t,"error",this.onerror.bind(this)),Tl(t,"close",this.onclose.bind(this)),Tl(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch{this.onclose("parse error")}}ondecoded(t){this.emitReserved("packet",t)}onerror(t){this.emitReserved("error",t)}socket(t,n){let i=this.nsps[t];return i||(i=new Az(this,t,n),this.nsps[t]=i),i}_destroy(t){const n=Object.keys(this.nsps);for(const i of n)if(this.nsps[i].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let i=0;it()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const i=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(o=>{o?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",o)):t.onreconnect()}))},n);this.opts.autoUnref&&i.unref(),this.subs.push(function(){clearTimeout(i)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const $0={};function o2(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=fme(e,t.path||"/socket.io"),i=n.source,o=n.id,c=n.path,u=$0[o]&&c in $0[o].nsps,m=t.forceNew||t["force new connection"]||t.multiplex===!1||u;let h;return m?h=new kA(i,t):($0[o]||($0[o]=new kA(i,t)),h=$0[o]),n.query&&!t.query&&(t.query=n.queryKey),h.socket(n.path,t)}Object.assign(o2,{Manager:kA,Socket:Az,io:o2,connect:o2});let zx;const wme=new Uint8Array(16);function Nme(){if(!zx&&(zx=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!zx))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return zx(wme)}const di=[];for(let e=0;e<256;++e)di.push((e+256).toString(16).slice(1));function Eme(e,t=0){return(di[e[t+0]]+di[e[t+1]]+di[e[t+2]]+di[e[t+3]]+"-"+di[e[t+4]]+di[e[t+5]]+"-"+di[e[t+6]]+di[e[t+7]]+"-"+di[e[t+8]]+di[e[t+9]]+"-"+di[e[t+10]]+di[e[t+11]]+di[e[t+12]]+di[e[t+13]]+di[e[t+14]]+di[e[t+15]]).toLowerCase()}const _me=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),TI={randomUUID:_me};function j0(e,t,n){if(TI.randomUUID&&!t&&!e)return TI.randomUUID();e=e||{};const i=e.random||(e.rng||Nme)();if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,t){n=n||0;for(let o=0;o<16;++o)t[n+o]=i[o];return t}return Eme(i)}var Tme=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,Rme=/\b(?:[A-Z]{1,3}[A-Z][TC])(?:[-+]\d{4})?|((?:Australian )?(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time)\b/g,Ame=/[^-+\dA-Z]/g;function to(e,t,n,i){if(arguments.length===1&&typeof e=="string"&&!/\d/.test(e)&&(t=e,e=void 0),e=e||e===0?e:new Date,e instanceof Date||(e=new Date(e)),isNaN(e))throw TypeError("Invalid date");t=String(RI[t]||t||RI.default);var o=t.slice(0,4);(o==="UTC:"||o==="GMT:")&&(t=t.slice(4),n=!0,o==="GMT:"&&(i=!0));var c=function(){return n?"getUTC":"get"},u=function(){return e[c()+"Date"]()},m=function(){return e[c()+"Day"]()},h=function(){return e[c()+"Month"]()},v=function(){return e[c()+"FullYear"]()},b=function(){return e[c()+"Hours"]()},x=function(){return e[c()+"Minutes"]()},w=function(){return e[c()+"Seconds"]()},N=function(){return e[c()+"Milliseconds"]()},R=function(){return n?0:e.getTimezoneOffset()},O=function(){return kme(e)},M=function(){return Ome(e)},B={d:function(){return u()},dd:function(){return Zo(u())},ddd:function(){return bo.dayNames[m()]},DDD:function(){return AI({y:v(),m:h(),d:u(),_:c(),dayName:bo.dayNames[m()],short:!0})},dddd:function(){return bo.dayNames[m()+7]},DDDD:function(){return AI({y:v(),m:h(),d:u(),_:c(),dayName:bo.dayNames[m()+7]})},m:function(){return h()+1},mm:function(){return Zo(h()+1)},mmm:function(){return bo.monthNames[h()]},mmmm:function(){return bo.monthNames[h()+12]},yy:function(){return String(v()).slice(2)},yyyy:function(){return Zo(v(),4)},h:function(){return b()%12||12},hh:function(){return Zo(b()%12||12)},H:function(){return b()},HH:function(){return Zo(b())},M:function(){return x()},MM:function(){return Zo(x())},s:function(){return w()},ss:function(){return Zo(w())},l:function(){return Zo(N(),3)},L:function(){return Zo(Math.floor(N()/10))},t:function(){return b()<12?bo.timeNames[0]:bo.timeNames[1]},tt:function(){return b()<12?bo.timeNames[2]:bo.timeNames[3]},T:function(){return b()<12?bo.timeNames[4]:bo.timeNames[5]},TT:function(){return b()<12?bo.timeNames[6]:bo.timeNames[7]},Z:function(){return i?"GMT":n?"UTC":Dme(e)},o:function(){return(R()>0?"-":"+")+Zo(Math.floor(Math.abs(R())/60)*100+Math.abs(R())%60,4)},p:function(){return(R()>0?"-":"+")+Zo(Math.floor(Math.abs(R())/60),2)+":"+Zo(Math.floor(Math.abs(R())%60),2)},S:function(){return["th","st","nd","rd"][u()%10>3?0:(u()%100-u()%10!=10)*u()%10]},W:function(){return O()},WW:function(){return Zo(O())},N:function(){return M()}};return t.replace(Tme,function(I){return I in B?B[I]():I.slice(1,I.length-1)})}var RI={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",paddedShortDate:"mm/dd/yyyy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},bo={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],timeNames:["a","p","am","pm","A","P","AM","PM"]},Zo=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;return String(t).padStart(n,"0")},AI=function(t){var n=t.y,i=t.m,o=t.d,c=t._,u=t.dayName,m=t.short,h=m===void 0?!1:m,v=new Date,b=new Date;b.setDate(b[c+"Date"]()-1);var x=new Date;x.setDate(x[c+"Date"]()+1);var w=function(){return v[c+"Date"]()},N=function(){return v[c+"Month"]()},R=function(){return v[c+"FullYear"]()},O=function(){return b[c+"Date"]()},M=function(){return b[c+"Month"]()},B=function(){return b[c+"FullYear"]()},I=function(){return x[c+"Date"]()},F=function(){return x[c+"Month"]()},z=function(){return x[c+"FullYear"]()};return R()===n&&N()===i&&w()===o?h?"Tdy":"Today":B()===n&&M()===i&&O()===o?h?"Ysd":"Yesterday":z()===n&&F()===i&&I()===o?h?"Tmw":"Tomorrow":u},kme=function(t){var n=new Date(t.getFullYear(),t.getMonth(),t.getDate());n.setDate(n.getDate()-(n.getDay()+6)%7+3);var i=new Date(n.getFullYear(),0,4);i.setDate(i.getDate()-(i.getDay()+6)%7+3);var o=n.getTimezoneOffset()-i.getTimezoneOffset();n.setHours(n.getHours()-o);var c=(n-i)/(864e5*7);return 1+Math.floor(c)},Ome=function(t){var n=t.getDay();return n===0&&(n=7),n},Dme=function(t){return(String(t).match(Rme)||[""]).pop().replace(Ame,"").replace(/GMT\+0000/g,"UTC")};const kz=ro("socketio/generateImage"),Pme=ro("socketio/runESRGAN"),Mme=ro("socketio/runGFPGAN"),Ime=ro("socketio/deleteImage"),Lme=ro("socketio/requestImages"),Fme=ro("socketio/requestNewImages"),zme=ro("socketio/cancelProcessing"),Bme=ro("socketio/uploadInitialImage"),Ume=ro("socketio/uploadMaskImage"),$me=ro("socketio/requestSystemConfig"),jme=e=>{const{dispatch:t,getState:n}=e;return{onConnect:()=>{try{t(gI(!0)),t(yI("Connected")),t(Fme())}catch(i){console.error(i)}},onDisconnect:()=>{try{t(gI(!1)),t(yI("Disconnected")),t(eo({timestamp:to(new Date,"isoDateTime"),message:"Disconnected from server",level:"warning"}))}catch(i){console.error(i)}},onGenerationResult:i=>{try{const{url:o,mtime:c,metadata:u}=i,m=j0();t(Ix({uuid:m,url:o,mtime:c,metadata:u})),t(eo({timestamp:to(new Date,"isoDateTime"),message:`Image generated: ${o}`})),t(hc(!1))}catch(o){console.error(o)}},onIntermediateResult:i=>{try{const o=j0(),{url:c,metadata:u,mtime:m}=i;t(Npe({uuid:o,url:c,mtime:m,metadata:u})),t(eo({timestamp:to(new Date,"isoDateTime"),message:`Intermediate image generated: ${c}`})),t(hc(!1))}catch(o){console.error(o)}},onESRGANResult:i=>{try{const{url:o,metadata:c,mtime:u}=i;t(Ix({uuid:j0(),url:o,mtime:u,metadata:c})),t(eo({timestamp:to(new Date,"isoDateTime"),message:`Upscaled: ${o}`})),t(hc(!1))}catch(o){console.error(o)}},onGFPGANResult:i=>{try{const{url:o,metadata:c,mtime:u}=i;t(Ix({uuid:j0(),url:o,mtime:u,metadata:c})),t(eo({timestamp:to(new Date,"isoDateTime"),message:`Fixed faces: ${o}`}))}catch(o){console.error(o)}},onProgressUpdate:i=>{try{t(hc(!0)),t(Ope(i))}catch(o){console.error(o)}},onError:i=>{const{message:o,additionalData:c}=i;try{t(eo({timestamp:to(new Date,"isoDateTime"),message:`Server error: ${o}`,level:"error"})),t(hc(!1)),t(vI())}catch(u){console.error(u)}},onGalleryImages:i=>{const{images:o,nextPage:c,offset:u}=i,m=o.map(h=>{const{url:v,metadata:b,mtime:x}=h;return{uuid:j0(),url:v,mtime:x,metadata:b}});t(wpe({images:m,nextPage:c,offset:u})),t(eo({timestamp:to(new Date,"isoDateTime"),message:`Loaded ${o.length} images`}))},onProcessingCanceled:()=>{t(hc(!1));const{intermediateImage:i}=n().gallery;i&&(t(Ix(i)),t(eo({timestamp:to(new Date,"isoDateTime"),message:`Intermediate image saved: ${i.url}`})),t(vI())),t(eo({timestamp:to(new Date,"isoDateTime"),message:"Processing canceled",level:"warning"}))},onImageDeleted:i=>{const{url:o,uuid:c}=i;t(xpe(c)),t(eo({timestamp:to(new Date,"isoDateTime"),message:`Image deleted: ${o}`}))},onInitialImageUploaded:i=>{const{url:o}=i;t(IC(o)),t(eo({timestamp:to(new Date,"isoDateTime"),message:`Initial image uploaded: ${o}`}))},onMaskImageUploaded:i=>{const{url:o}=i;t(AO(o)),t(eo({timestamp:to(new Date,"isoDateTime"),message:`Mask image uploaded: ${o}`}))},onSystemConfig:i=>{t(Dpe(i))}}},Vme=["ddim","plms","k_lms","k_dpm_2","k_dpm_2_a","k_euler","k_euler_a","k_heun"],Hme=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024],Wme=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024],Gme=[{key:"2x",value:2},{key:"4x",value:4}],OA=0,DA=4294967295,Oz=(e,t)=>Math.floor(Math.random()*(t-e+1)+e),Yme=(e,t)=>{const{prompt:n,iterations:i,steps:o,cfgScale:c,height:u,width:m,sampler:h,seed:v,seamless:b,shouldUseInitImage:x,img2imgStrength:w,initialImagePath:N,maskPath:R,shouldFitToWidthHeight:O,shouldGenerateVariations:M,variationAmount:B,seedWeights:I,shouldRunESRGAN:F,upscalingLevel:z,upscalingStrength:$,shouldRunGFPGAN:q,gfpganStrength:K,shouldRandomizeSeed:le}=e,{shouldDisplayInProgress:me}=t,se={prompt:n,iterations:i,steps:o,cfg_scale:c,height:u,width:m,sampler_name:h,seed:v,seamless:b,progress_images:me};se.seed=le?Oz(OA,DA):v,x&&(se.init_img=N,se.strength=w,se.fit=O,R&&(se.init_mask=R)),M?(se.variation_amount=B,I&&(se.with_variations=upe(I))):se.variation_amount=0;let Se=!1,qe=!1;return F&&(Se={level:z,strength:$}),q&&(qe={strength:K}),{generationParameters:se,esrganParameters:Se,gfpganParameters:qe}},qme=(e,t)=>{const{dispatch:n,getState:i}=e;return{emitGenerateImage:()=>{n(hc(!0));const{generationParameters:o,esrganParameters:c,gfpganParameters:u}=Yme(i().options,i().system);t.emit("generateImage",o,c,u),n(eo({timestamp:to(new Date,"isoDateTime"),message:`Image generation requested: ${JSON.stringify({...o,...c,...u})}`}))},emitRunESRGAN:o=>{n(hc(!0));const{upscalingLevel:c,upscalingStrength:u}=i().options,m={upscale:[c,u]};t.emit("runESRGAN",o,m),n(eo({timestamp:to(new Date,"isoDateTime"),message:`ESRGAN upscale requested: ${JSON.stringify({file:o.url,...m})}`}))},emitRunGFPGAN:o=>{n(hc(!0));const{gfpganStrength:c}=i().options,u={gfpgan_strength:c};t.emit("runGFPGAN",o,u),n(eo({timestamp:to(new Date,"isoDateTime"),message:`GFPGAN fix faces requested: ${JSON.stringify({file:o.url,...u})}`}))},emitDeleteImage:o=>{const{url:c,uuid:u}=o;t.emit("deleteImage",c,u)},emitRequestImages:()=>{const{nextPage:o,offset:c}=i().gallery;t.emit("requestImages",o,c)},emitRequestNewImages:()=>{const{nextPage:o,offset:c,images:u}=i().gallery;u.length>0?t.emit("requestImages",o,c,u[0].mtime):t.emit("requestImages",o,c)},emitCancelProcessing:()=>{t.emit("cancel")},emitUploadInitialImage:o=>{t.emit("uploadInitialImage",o,o.name)},emitUploadMaskImage:o=>{t.emit("uploadMaskImage",o,o.name)},emitRequestSystemConfig:()=>{t.emit("requestSystemConfig")}}},Kme=()=>{const{hostname:e,port:t}=new URL(window.location.href);({BASE_URL:"/",MODE:"development",DEV:!0,PROD:!1}).VITE_SOCKETIO_PORT!==void 0&&console.log(`Running in Vite dev mode, using socketio port ${{BASE_URL:"/",MODE:"development",DEV:!0,PROD:!1}.VITE_SOCKETIO_PORT}`);const n=o2(`http://${e}:${{BASE_URL:"/",MODE:"development",DEV:!0,PROD:!1}.VITE_SOCKETIO_PORT||t}`,{timeout:6e4});let i=!1;return c=>u=>m=>{const{onConnect:h,onDisconnect:v,onError:b,onESRGANResult:x,onGFPGANResult:w,onGenerationResult:N,onIntermediateResult:R,onProgressUpdate:O,onGalleryImages:M,onProcessingCanceled:B,onImageDeleted:I,onInitialImageUploaded:F,onMaskImageUploaded:z,onSystemConfig:$}=jme(c),{emitGenerateImage:q,emitRunESRGAN:K,emitRunGFPGAN:le,emitDeleteImage:me,emitRequestImages:se,emitRequestNewImages:Se,emitCancelProcessing:qe,emitUploadInitialImage:ae,emitUploadMaskImage:ue,emitRequestSystemConfig:Ee}=qme(c,n);switch(i||(n.on("connect",()=>h()),n.on("disconnect",()=>v()),n.on("error",de=>b(de)),n.on("generationResult",de=>N(de)),n.on("esrganResult",de=>x(de)),n.on("gfpganResult",de=>w(de)),n.on("intermediateResult",de=>R(de)),n.on("progressUpdate",de=>O(de)),n.on("galleryImages",de=>M(de)),n.on("processingCanceled",()=>{B()}),n.on("imageDeleted",de=>{I(de)}),n.on("initialImageUploaded",de=>{F(de)}),n.on("maskImageUploaded",de=>{z(de)}),n.on("systemConfig",de=>{$(de)}),i=!0),m.type){case"socketio/generateImage":{q();break}case"socketio/runESRGAN":{K(m.payload);break}case"socketio/runGFPGAN":{le(m.payload);break}case"socketio/deleteImage":{me(m.payload);break}case"socketio/requestImages":{se();break}case"socketio/requestNewImages":{Se();break}case"socketio/cancelProcessing":{qe();break}case"socketio/uploadInitialImage":{ae(m.payload);break}case"socketio/uploadMaskImage":{ue(m.payload);break}case"socketio/requestSystemConfig":{Ee();break}}u(m)}},Xme={key:"root",storage:TO,blacklist:["gallery","system"]},Zme={key:"system",storage:TO,blacklist:["isConnected","isProcessing","currentStep","socketId","isESRGANAvailable","isGFPGANAvailable","currentStep","totalSteps","currentIteration","totalIterations","currentStatus"]},Qme=DF({options:bpe,gallery:Epe,system:ez(Zme,Mpe)}),Jme=ez(Xme,Qme),Dz=fde({reducer:Jme,middleware:e=>e({serializableCheck:!1}).concat(Kme())}),Ga=Dde,mr=Cde;function s2(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?s2=function(n){return typeof n}:s2=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},s2(e)}function ehe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kI(e,t){for(var n=0;n({textColor:e.colorMode==="dark"?"gray.800":"gray.100"})},Accordion:{baseStyle:e=>({button:{fontWeight:"bold",_hover:{bgColor:e.colorMode==="dark"?"rgba(255,255,255,0.05)":"rgba(0,0,0,0.05)"}},panel:{paddingBottom:2}})},FormLabel:{baseStyle:{fontWeight:"light"}},Button:{variants:{imageHoverIconButton:e=>({bg:e.colorMode==="dark"?"blackAlpha.700":"whiteAlpha.800",color:e.colorMode==="dark"?"whiteAlpha.700":"blackAlpha.700",_hover:{bg:e.colorMode==="dark"?"blackAlpha.800":"whiteAlpha.800",color:e.colorMode==="dark"?"whiteAlpha.900":"blackAlpha.900"}})}}}});var DI="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/Loading.tsx";const Mz=()=>_(Sn,{width:"100vw",height:"100vh",alignItems:"center",justifyContent:"center",children:_(wC,{thickness:"2px",speed:"1s",emptyColor:"gray.200",color:"gray.400",size:"xl"},void 0,!1,{fileName:DI,lineNumber:11,columnNumber:13},void 0)},void 0,!1,{fileName:DI,lineNumber:5,columnNumber:9},void 0);var qh="/Users/spencer/Documents/Code/stable-diffusion/frontend/node_modules/@chakra-ui/icons/node_modules/@chakra-ui/icon/dist/index.esm.js",PI={path:_("g",{stroke:"currentColor",strokeWidth:"1.5",children:[_("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"},void 0,!1,{fileName:qh,lineNumber:14,columnNumber:22},globalThis),_("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"},void 0,!1,{fileName:qh,lineNumber:18,columnNumber:23},globalThis),_("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"},void 0,!1,{fileName:qh,lineNumber:22,columnNumber:23},globalThis)]},void 0,!0,{fileName:qh,lineNumber:11,columnNumber:25},globalThis),viewBox:"0 0 24 24"},Iz=Xe((e,t)=>{const{as:n,viewBox:i,color:o="currentColor",focusable:c=!1,children:u,className:m,__css:h,...v}=e,b=qr("chakra-icon",m),x={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:o,...h},w={ref:t,focusable:c,className:b,__css:x},N=i??PI.viewBox;if(n&&typeof n!="string")return Pe.createElement($e.svg,{as:n,...w,...v});const R=u??PI.path;return Pe.createElement($e.svg,{verticalAlign:"middle",viewBox:N,...w,...v},R)});Iz.displayName="Icon";function Et(e){const{viewBox:t="0 0 24 24",d:n,displayName:i,defaultProps:o={}}=e,c=k.exports.Children.toArray(e.path),u=Xe((m,h)=>_(Iz,{ref:h,viewBox:t,...o,...m,children:c.length?c:_("path",{fill:"currentColor",d:n},void 0,!1,{fileName:qh,lineNumber:93,columnNumber:43},this)},void 0,!1,{fileName:qh,lineNumber:88,columnNumber:60},this));return u.displayName=i,u}var dt="/Users/spencer/Documents/Code/stable-diffusion/frontend/node_modules/@chakra-ui/icons/dist/index.esm.js";Et({d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z",displayName:"CopyIcon"});Et({d:"M23.384,21.619,16.855,15.09a9.284,9.284,0,1,0-1.768,1.768l6.529,6.529a1.266,1.266,0,0,0,1.768,0A1.251,1.251,0,0,0,23.384,21.619ZM2.75,9.5a6.75,6.75,0,1,1,6.75,6.75A6.758,6.758,0,0,1,2.75,9.5Z",displayName:"SearchIcon"});Et({d:"M23.414,20.591l-4.645-4.645a10.256,10.256,0,1,0-2.828,2.829l4.645,4.644a2.025,2.025,0,0,0,2.828,0A2,2,0,0,0,23.414,20.591ZM10.25,3.005A7.25,7.25,0,1,1,3,10.255,7.258,7.258,0,0,1,10.25,3.005Z",displayName:"Search2Icon"});Et({d:"M21.4,13.7C20.6,13.9,19.8,14,19,14c-5,0-9-4-9-9c0-0.8,0.1-1.6,0.3-2.4c0.1-0.3,0-0.7-0.3-1 c-0.3-0.3-0.6-0.4-1-0.3C4.3,2.7,1,7.1,1,12c0,6.1,4.9,11,11,11c4.9,0,9.3-3.3,10.6-8.1c0.1-0.3,0-0.7-0.3-1 C22.1,13.7,21.7,13.6,21.4,13.7z",displayName:"MoonIcon"});Et({displayName:"SunIcon",path:_("g",{strokeLinejoin:"round",strokeLinecap:"round",strokeWidth:"2",fill:"none",stroke:"currentColor",children:[_("circle",{cx:"12",cy:"12",r:"5"},void 0,!1,{fileName:dt,lineNumber:42,columnNumber:22},globalThis),_("path",{d:"M12 1v2"},void 0,!1,{fileName:dt,lineNumber:46,columnNumber:23},globalThis),_("path",{d:"M12 21v2"},void 0,!1,{fileName:dt,lineNumber:48,columnNumber:23},globalThis),_("path",{d:"M4.22 4.22l1.42 1.42"},void 0,!1,{fileName:dt,lineNumber:50,columnNumber:23},globalThis),_("path",{d:"M18.36 18.36l1.42 1.42"},void 0,!1,{fileName:dt,lineNumber:52,columnNumber:23},globalThis),_("path",{d:"M1 12h2"},void 0,!1,{fileName:dt,lineNumber:54,columnNumber:23},globalThis),_("path",{d:"M21 12h2"},void 0,!1,{fileName:dt,lineNumber:56,columnNumber:23},globalThis),_("path",{d:"M4.22 19.78l1.42-1.42"},void 0,!1,{fileName:dt,lineNumber:58,columnNumber:23},globalThis),_("path",{d:"M18.36 5.64l1.42-1.42"},void 0,!1,{fileName:dt,lineNumber:60,columnNumber:23},globalThis)]},void 0,!0,{fileName:dt,lineNumber:36,columnNumber:25},globalThis)});Et({d:"M0,12a1.5,1.5,0,0,0,1.5,1.5h8.75a.25.25,0,0,1,.25.25V22.5a1.5,1.5,0,0,0,3,0V13.75a.25.25,0,0,1,.25-.25H22.5a1.5,1.5,0,0,0,0-3H13.75a.25.25,0,0,1-.25-.25V1.5a1.5,1.5,0,0,0-3,0v8.75a.25.25,0,0,1-.25.25H1.5A1.5,1.5,0,0,0,0,12Z",displayName:"AddIcon"});Et({displayName:"SmallAddIcon",viewBox:"0 0 20 20",path:_("path",{fill:"currentColor",d:"M14 9h-3V6c0-.55-.45-1-1-1s-1 .45-1 1v3H6c-.55 0-1 .45-1 1s.45 1 1 1h3v3c0 .55.45 1 1 1s1-.45 1-1v-3h3c.55 0 1-.45 1-1s-.45-1-1-1z",fillRule:"evenodd"},void 0,!1,{fileName:dt,lineNumber:77,columnNumber:25},globalThis)});Et({viewBox:"0 0 14 14",d:"M14,7.77 L14,6.17 L12.06,5.53 L11.61,4.44 L12.49,2.6 L11.36,1.47 L9.55,2.38 L8.46,1.93 L7.77,0.01 L6.17,0.01 L5.54,1.95 L4.43,2.4 L2.59,1.52 L1.46,2.65 L2.37,4.46 L1.92,5.55 L0,6.23 L0,7.82 L1.94,8.46 L2.39,9.55 L1.51,11.39 L2.64,12.52 L4.45,11.61 L5.54,12.06 L6.23,13.98 L7.82,13.98 L8.45,12.04 L9.56,11.59 L11.4,12.47 L12.53,11.34 L11.61,9.53 L12.08,8.44 L14,7.75 L14,7.77 Z M7,10 C5.34,10 4,8.66 4,7 C4,5.34 5.34,4 7,4 C8.66,4 10,5.34 10,7 C10,8.66 8.66,10 7,10 Z",displayName:"SettingsIcon"});Et({displayName:"CheckCircleIcon",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"});Et({d:"M19.5,9.5h-.75V6.75a6.75,6.75,0,0,0-13.5,0V9.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5ZM7.75,6.75a4.25,4.25,0,0,1,8.5,0V9a.5.5,0,0,1-.5.5H8.25a.5.5,0,0,1-.5-.5Z",displayName:"LockIcon"});Et({d:"M19.5,9.5h-.75V6.75A6.751,6.751,0,0,0,5.533,4.811a1.25,1.25,0,1,0,2.395.717A4.251,4.251,0,0,1,16.25,6.75V9a.5.5,0,0,1-.5.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5Z",displayName:"UnlockIcon"});Et({displayName:"ViewIcon",path:_("g",{fill:"currentColor",children:[_("path",{d:"M23.432,10.524C20.787,7.614,16.4,4.538,12,4.6,7.6,4.537,3.213,7.615.568,10.524a2.211,2.211,0,0,0,0,2.948C3.182,16.351,7.507,19.4,11.839,19.4h.308c4.347,0,8.671-3.049,11.288-5.929A2.21,2.21,0,0,0,23.432,10.524ZM7.4,12A4.6,4.6,0,1,1,12,16.6,4.6,4.6,0,0,1,7.4,12Z"},void 0,!1,{fileName:dt,lineNumber:119,columnNumber:22},globalThis),_("circle",{cx:"12",cy:"12",r:"2"},void 0,!1,{fileName:dt,lineNumber:121,columnNumber:23},globalThis)]},void 0,!0,{fileName:dt,lineNumber:117,columnNumber:25},globalThis)});Et({displayName:"ViewOffIcon",path:_("g",{fill:"currentColor",children:[_("path",{d:"M23.2,10.549a20.954,20.954,0,0,0-4.3-3.6l4-3.995a1,1,0,1,0-1.414-1.414l-.018.018a.737.737,0,0,1-.173.291l-19.5,19.5c-.008.007-.018.009-.026.017a1,1,0,0,0,1.631,1.088l4.146-4.146a11.26,11.26,0,0,0,4.31.939h.3c4.256,0,8.489-2.984,11.051-5.8A2.171,2.171,0,0,0,23.2,10.549ZM16.313,13.27a4.581,4.581,0,0,1-3,3.028,4.3,4.3,0,0,1-3.1-.19.253.253,0,0,1-.068-.407l5.56-5.559a.252.252,0,0,1,.407.067A4.3,4.3,0,0,1,16.313,13.27Z"},void 0,!1,{fileName:dt,lineNumber:134,columnNumber:22},globalThis),_("path",{d:"M7.615,13.4a.244.244,0,0,0,.061-.24A4.315,4.315,0,0,1,7.5,12,4.5,4.5,0,0,1,12,7.5a4.276,4.276,0,0,1,1.16.173.244.244,0,0,0,.24-.062l1.941-1.942a.254.254,0,0,0-.1-.421A10.413,10.413,0,0,0,12,4.75C7.7,4.692,3.4,7.7.813,10.549a2.15,2.15,0,0,0-.007,2.9,21.209,21.209,0,0,0,3.438,3.03.256.256,0,0,0,.326-.029Z"},void 0,!1,{fileName:dt,lineNumber:136,columnNumber:23},globalThis)]},void 0,!0,{fileName:dt,lineNumber:132,columnNumber:25},globalThis)});Et({d:"M11.2857,6.05714 L10.08571,4.85714 L7.85714,7.14786 L7.85714,1 L6.14286,1 L6.14286,7.14786 L3.91429,4.85714 L2.71429,6.05714 L7,10.42857 L11.2857,6.05714 Z M1,11.2857 L1,13 L13,13 L13,11.2857 L1,11.2857 Z",displayName:"DownloadIcon",viewBox:"0 0 14 14"});Et({displayName:"DeleteIcon",path:_("g",{fill:"currentColor",children:_("path",{d:"M19.452 7.5H4.547a.5.5 0 00-.5.545l1.287 14.136A2 2 0 007.326 24h9.347a2 2 0 001.992-1.819L19.95 8.045a.5.5 0 00-.129-.382.5.5 0 00-.369-.163zm-9.2 13a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zm5 0a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zM22 4h-4.75a.25.25 0 01-.25-.25V2.5A2.5 2.5 0 0014.5 0h-5A2.5 2.5 0 007 2.5v1.25a.25.25 0 01-.25.25H2a1 1 0 000 2h20a1 1 0 000-2zM9 3.75V2.5a.5.5 0 01.5-.5h5a.5.5 0 01.5.5v1.25a.25.25 0 01-.25.25h-5.5A.25.25 0 019 3.75z"},void 0,!1,{fileName:dt,lineNumber:155,columnNumber:22},globalThis)},void 0,!1,{fileName:dt,lineNumber:153,columnNumber:25},globalThis)});Et({displayName:"RepeatIcon",path:_("g",{fill:"currentColor",children:[_("path",{d:"M10.319,4.936a7.239,7.239,0,0,1,7.1,2.252,1.25,1.25,0,1,0,1.872-1.657A9.737,9.737,0,0,0,9.743,2.5,10.269,10.269,0,0,0,2.378,9.61a.249.249,0,0,1-.271.178l-1.033-.13A.491.491,0,0,0,.6,9.877a.5.5,0,0,0-.019.526l2.476,4.342a.5.5,0,0,0,.373.248.43.43,0,0,0,.062,0,.5.5,0,0,0,.359-.152l3.477-3.593a.5.5,0,0,0-.3-.844L5.15,10.172a.25.25,0,0,1-.2-.333A7.7,7.7,0,0,1,10.319,4.936Z"},void 0,!1,{fileName:dt,lineNumber:166,columnNumber:22},globalThis),_("path",{d:"M23.406,14.1a.5.5,0,0,0,.015-.526l-2.5-4.329A.5.5,0,0,0,20.546,9a.489.489,0,0,0-.421.151l-3.456,3.614a.5.5,0,0,0,.3.842l1.848.221a.249.249,0,0,1,.183.117.253.253,0,0,1,.023.216,7.688,7.688,0,0,1-5.369,4.9,7.243,7.243,0,0,1-7.1-2.253,1.25,1.25,0,1,0-1.872,1.656,9.74,9.74,0,0,0,9.549,3.03,10.261,10.261,0,0,0,7.369-7.12.251.251,0,0,1,.27-.179l1.058.127a.422.422,0,0,0,.06,0A.5.5,0,0,0,23.406,14.1Z"},void 0,!1,{fileName:dt,lineNumber:168,columnNumber:23},globalThis)]},void 0,!0,{fileName:dt,lineNumber:164,columnNumber:25},globalThis)});Et({displayName:"RepeatClockIcon",path:_("g",{fill:"currentColor",children:[_("path",{d:"M12.965,6a1,1,0,0,0-1,1v5.5a1,1,0,0,0,1,1h5a1,1,0,0,0,0-2h-3.75a.25.25,0,0,1-.25-.25V7A1,1,0,0,0,12.965,6Z"},void 0,!1,{fileName:dt,lineNumber:179,columnNumber:22},globalThis),_("path",{d:"M12.567,1.258A10.822,10.822,0,0,0,2.818,8.4a.25.25,0,0,1-.271.163L.858,8.309a.514.514,0,0,0-.485.213.5.5,0,0,0-.021.53l2.679,4.7a.5.5,0,0,0,.786.107l3.77-3.746a.5.5,0,0,0-.279-.85L5.593,9.007a.25.25,0,0,1-.192-.35,8.259,8.259,0,1,1,7.866,11.59,1.25,1.25,0,0,0,.045,2.5h.047a10.751,10.751,0,1,0-.792-21.487Z"},void 0,!1,{fileName:dt,lineNumber:181,columnNumber:23},globalThis)]},void 0,!0,{fileName:dt,lineNumber:177,columnNumber:25},globalThis)});Et({displayName:"EditIcon",path:_("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[_("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"},void 0,!1,{fileName:dt,lineNumber:195,columnNumber:22},globalThis),_("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"},void 0,!1,{fileName:dt,lineNumber:197,columnNumber:23},globalThis)]},void 0,!0,{fileName:dt,lineNumber:190,columnNumber:25},globalThis)});Et({d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z",displayName:"ChevronLeftIcon"});Et({d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z",displayName:"ChevronRightIcon"});Et({displayName:"ChevronDownIcon",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"});Et({d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z",displayName:"ChevronUpIcon"});Et({d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z",displayName:"ArrowBackIcon"});Et({d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z",displayName:"ArrowForwardIcon"});Et({d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z",displayName:"ArrowUpIcon"});Et({viewBox:"0 0 16 16",d:"M11.891 9.992a1 1 0 1 1 1.416 1.415l-4.3 4.3a1 1 0 0 1-1.414 0l-4.3-4.3A1 1 0 0 1 4.71 9.992l3.59 3.591 3.591-3.591zm0-3.984L8.3 2.417 4.709 6.008a1 1 0 0 1-1.416-1.415l4.3-4.3a1 1 0 0 1 1.414 0l4.3 4.3a1 1 0 1 1-1.416 1.415z",displayName:"ArrowUpDownIcon"});Et({d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z",displayName:"ArrowDownIcon"});var Lz=Et({displayName:"ExternalLinkIcon",path:_("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[_("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"},void 0,!1,{fileName:dt,lineNumber:275,columnNumber:22},globalThis),_("path",{d:"M15 3h6v6"},void 0,!1,{fileName:dt,lineNumber:277,columnNumber:23},globalThis),_("path",{d:"M10 14L21 3"},void 0,!1,{fileName:dt,lineNumber:279,columnNumber:23},globalThis)]},void 0,!0,{fileName:dt,lineNumber:270,columnNumber:25},globalThis)});Et({displayName:"LinkIcon",path:_("g",{fill:"currentColor",children:[_("path",{d:"M10.458,18.374,7.721,21.11a2.853,2.853,0,0,1-3.942,0l-.892-.891a2.787,2.787,0,0,1,0-3.941l5.8-5.8a2.789,2.789,0,0,1,3.942,0l.893.892A1,1,0,0,0,14.94,9.952l-.893-.892a4.791,4.791,0,0,0-6.771,0l-5.8,5.8a4.787,4.787,0,0,0,0,6.77l.892.891a4.785,4.785,0,0,0,6.771,0l2.736-2.735a1,1,0,1,0-1.414-1.415Z"},void 0,!1,{fileName:dt,lineNumber:290,columnNumber:22},globalThis),_("path",{d:"M22.526,2.363l-.892-.892a4.8,4.8,0,0,0-6.77,0l-2.905,2.9a1,1,0,0,0,1.414,1.414l2.9-2.9a2.79,2.79,0,0,1,3.941,0l.893.893a2.786,2.786,0,0,1,0,3.942l-5.8,5.8a2.769,2.769,0,0,1-1.971.817h0a2.766,2.766,0,0,1-1.969-.816,1,1,0,1,0-1.415,1.412,4.751,4.751,0,0,0,3.384,1.4h0a4.752,4.752,0,0,0,3.385-1.4l5.8-5.8a4.786,4.786,0,0,0,0-6.771Z"},void 0,!1,{fileName:dt,lineNumber:292,columnNumber:23},globalThis)]},void 0,!0,{fileName:dt,lineNumber:288,columnNumber:25},globalThis)});Et({displayName:"PlusSquareIcon",path:_("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[_("rect",{height:"18",width:"18",rx:"2",ry:"2",x:"3",y:"3"},void 0,!1,{fileName:dt,lineNumber:306,columnNumber:22},globalThis),_("path",{d:"M12 8v8"},void 0,!1,{fileName:dt,lineNumber:313,columnNumber:23},globalThis),_("path",{d:"M8 12h8"},void 0,!1,{fileName:dt,lineNumber:315,columnNumber:23},globalThis)]},void 0,!0,{fileName:dt,lineNumber:301,columnNumber:25},globalThis)});Et({displayName:"CalendarIcon",viewBox:"0 0 14 14",d:"M10.8889,5.5 L3.11111,5.5 L3.11111,7.05556 L10.8889,7.05556 L10.8889,5.5 Z M12.4444,1.05556 L11.6667,1.05556 L11.6667,0 L10.1111,0 L10.1111,1.05556 L3.88889,1.05556 L3.88889,0 L2.33333,0 L2.33333,1.05556 L1.55556,1.05556 C0.692222,1.05556 0.00777777,1.75556 0.00777777,2.61111 L0,12.5 C0,13.3556 0.692222,14 1.55556,14 L12.4444,14 C13.3,14 14,13.3556 14,12.5 L14,2.61111 C14,1.75556 13.3,1.05556 12.4444,1.05556 Z M12.4444,12.5 L1.55556,12.5 L1.55556,3.94444 L12.4444,3.94444 L12.4444,12.5 Z M8.55556,8.61111 L3.11111,8.61111 L3.11111,10.1667 L8.55556,10.1667 L8.55556,8.61111 Z"});Et({d:"M0.913134,0.920639 C1.49851,0.331726 2.29348,0 3.12342,0 L10.8766,0 C11.7065,0 12.5015,0.331725 13.0869,0.920639 C13.6721,1.50939 14,2.30689 14,3.13746 L14,8.12943 C13.9962,8.51443 13.9059,8.97125 13.7629,9.32852 C13.6128,9.683 13.3552,10.0709 13.0869,10.3462 C12.813,10.6163 12.4265,10.8761 12.0734,11.0274 C11.7172,11.1716 11.2607,11.263 10.8766,11.2669 L10.1234,11.2669 L10.1234,12.5676 L10.1209,12.5676 C10.1204,12.793 10.0633,13.0791 9.97807,13.262 C9.8627,13.466 9.61158,13.7198 9.40818,13.8382 L9.40824,13.8383 C9.4077,13.8386 9.40716,13.8388 9.40661,13.8391 C9.40621,13.8393 9.4058,13.8396 9.40539,13.8398 L9.40535,13.8397 C9.22958,13.9254 8.94505,13.9951 8.75059,14 L8.74789,14 C8.35724,13.9963 7.98473,13.8383 7.71035,13.5617 L5.39553,11.2669 L3.12342,11.2669 C2.29348,11.2669 1.49851,10.9352 0.913134,10.3462 C0.644826,10.0709 0.387187,9.683 0.23711,9.32852 C0.0941235,8.97125 0.00379528,8.51443 0,8.12943 L0,3.13746 C0,2.30689 0.327915,1.50939 0.913134,0.920639 Z M3.12342,1.59494 C2.71959,1.59494 2.33133,1.75628 2.04431,2.04503 C1.75713,2.33395 1.59494,2.72681 1.59494,3.13746 L1.59494,8.12943 C1.59114,8.35901 1.62114,8.51076 1.71193,8.72129 C1.79563,8.9346 1.88065,9.06264 2.04431,9.22185 C2.33133,9.5106 2.71959,9.67195 3.12342,9.67195 L5.72383,9.67195 C5.93413,9.67195 6.13592,9.75502 6.28527,9.90308 L8.52848,12.1269 L8.52848,10.4694 C8.52848,10.029 8.88552,9.67195 9.32595,9.67195 L10.8766,9.67195 C11.1034,9.67583 11.2517,9.64614 11.4599,9.55518 C11.6712,9.47132 11.7976,9.38635 11.9557,9.22185 C12.1193,9.06264 12.2044,8.9346 12.2881,8.72129 C12.3789,8.51076 12.4089,8.35901 12.4051,8.12943 L12.4051,3.13746 C12.4051,2.72681 12.2429,2.33394 11.9557,2.04503 C11.6687,1.75628 11.2804,1.59494 10.8766,1.59494 L3.12342,1.59494 Z",displayName:"ChatIcon",viewBox:"0 0 14 14"});Et({displayName:"TimeIcon",path:_("g",{fill:"currentColor",children:[_("path",{d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm0,22A10,10,0,1,1,22,12,10.011,10.011,0,0,1,12,22Z"},void 0,!1,{fileName:dt,lineNumber:342,columnNumber:22},globalThis),_("path",{d:"M17.134,15.81,12.5,11.561V6.5a1,1,0,0,0-2,0V12a1,1,0,0,0,.324.738l4.959,4.545a1.01,1.01,0,0,0,1.413-.061A1,1,0,0,0,17.134,15.81Z"},void 0,!1,{fileName:dt,lineNumber:344,columnNumber:23},globalThis)]},void 0,!0,{fileName:dt,lineNumber:340,columnNumber:25},globalThis)});Et({displayName:"ArrowRightIcon",path:_("g",{fill:"currentColor",children:[_("path",{d:"M13.584,12a2.643,2.643,0,0,1-.775,1.875L3.268,23.416a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L.768,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,13.584,12Z"},void 0,!1,{fileName:dt,lineNumber:355,columnNumber:22},globalThis),_("path",{d:"M23.75,12a2.643,2.643,0,0,1-.775,1.875l-9.541,9.541a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L10.934,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,23.75,12Z"},void 0,!1,{fileName:dt,lineNumber:357,columnNumber:23},globalThis)]},void 0,!0,{fileName:dt,lineNumber:353,columnNumber:25},globalThis)});Et({displayName:"ArrowLeftIcon",path:_("g",{fill:"currentColor",children:[_("path",{d:"M10.416,12a2.643,2.643,0,0,1,.775-1.875L20.732.584a1.768,1.768,0,0,1,2.5,2.5l-8.739,8.739a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5l-9.541-9.541A2.643,2.643,0,0,1,10.416,12Z"},void 0,!1,{fileName:dt,lineNumber:368,columnNumber:22},globalThis),_("path",{d:"M.25,12a2.643,2.643,0,0,1,.775-1.875L10.566.584a1.768,1.768,0,0,1,2.5,2.5L4.327,11.823a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5L1.025,13.875A2.643,2.643,0,0,1,.25,12Z"},void 0,!1,{fileName:dt,lineNumber:370,columnNumber:23},globalThis)]},void 0,!0,{fileName:dt,lineNumber:366,columnNumber:25},globalThis)});Et({displayName:"AtSignIcon",d:"M12,.5A11.634,11.634,0,0,0,.262,12,11.634,11.634,0,0,0,12,23.5a11.836,11.836,0,0,0,6.624-2,1.25,1.25,0,1,0-1.393-2.076A9.34,9.34,0,0,1,12,21a9.132,9.132,0,0,1-9.238-9A9.132,9.132,0,0,1,12,3a9.132,9.132,0,0,1,9.238,9v.891a1.943,1.943,0,0,1-3.884,0V12A5.355,5.355,0,1,0,12,17.261a5.376,5.376,0,0,0,3.861-1.634,4.438,4.438,0,0,0,7.877-2.736V12A11.634,11.634,0,0,0,12,.5Zm0,14.261A2.763,2.763,0,1,1,14.854,12,2.812,2.812,0,0,1,12,14.761Z"});Et({displayName:"AttachmentIcon",d:"M21.843,3.455a6.961,6.961,0,0,0-9.846,0L1.619,13.832a5.128,5.128,0,0,0,7.252,7.252L17.3,12.653A3.293,3.293,0,1,0,12.646,8L7.457,13.184A1,1,0,1,0,8.871,14.6L14.06,9.409a1.294,1.294,0,0,1,1.829,1.83L7.457,19.67a3.128,3.128,0,0,1-4.424-4.424L13.411,4.869a4.962,4.962,0,1,1,7.018,7.018L12.646,19.67a1,1,0,1,0,1.414,1.414L21.843,13.3a6.96,6.96,0,0,0,0-9.846Z"});Et({displayName:"UpDownIcon",viewBox:"-1 -1 9 11",d:"M 3.5 0L 3.98809 -0.569442L 3.5 -0.987808L 3.01191 -0.569442L 3.5 0ZM 3.5 9L 3.01191 9.56944L 3.5 9.98781L 3.98809 9.56944L 3.5 9ZM 0.488094 3.56944L 3.98809 0.569442L 3.01191 -0.569442L -0.488094 2.43056L 0.488094 3.56944ZM 3.01191 0.569442L 6.51191 3.56944L 7.48809 2.43056L 3.98809 -0.569442L 3.01191 0.569442ZM -0.488094 6.56944L 3.01191 9.56944L 3.98809 8.43056L 0.488094 5.43056L -0.488094 6.56944ZM 3.98809 9.56944L 7.48809 6.56944L 6.51191 5.43056L 3.01191 8.43056L 3.98809 9.56944Z"});Et({d:"M23.555,8.729a1.505,1.505,0,0,0-1.406-.98H16.062a.5.5,0,0,1-.472-.334L13.405,1.222a1.5,1.5,0,0,0-2.81,0l-.005.016L8.41,7.415a.5.5,0,0,1-.471.334H1.85A1.5,1.5,0,0,0,.887,10.4l5.184,4.3a.5.5,0,0,1,.155.543L4.048,21.774a1.5,1.5,0,0,0,2.31,1.684l5.346-3.92a.5.5,0,0,1,.591,0l5.344,3.919a1.5,1.5,0,0,0,2.312-1.683l-2.178-6.535a.5.5,0,0,1,.155-.543l5.194-4.306A1.5,1.5,0,0,0,23.555,8.729Z",displayName:"StarIcon"});Et({displayName:"EmailIcon",path:_("g",{fill:"currentColor",children:[_("path",{d:"M11.114,14.556a1.252,1.252,0,0,0,1.768,0L22.568,4.87a.5.5,0,0,0-.281-.849A1.966,1.966,0,0,0,22,4H2a1.966,1.966,0,0,0-.289.021.5.5,0,0,0-.281.849Z"},void 0,!1,{fileName:dt,lineNumber:410,columnNumber:22},globalThis),_("path",{d:"M23.888,5.832a.182.182,0,0,0-.2.039l-6.2,6.2a.251.251,0,0,0,0,.354l5.043,5.043a.75.75,0,1,1-1.06,1.061l-5.043-5.043a.25.25,0,0,0-.354,0l-2.129,2.129a2.75,2.75,0,0,1-3.888,0L7.926,13.488a.251.251,0,0,0-.354,0L2.529,18.531a.75.75,0,0,1-1.06-1.061l5.043-5.043a.251.251,0,0,0,0-.354l-6.2-6.2a.18.18,0,0,0-.2-.039A.182.182,0,0,0,0,6V18a2,2,0,0,0,2,2H22a2,2,0,0,0,2-2V6A.181.181,0,0,0,23.888,5.832Z"},void 0,!1,{fileName:dt,lineNumber:412,columnNumber:23},globalThis)]},void 0,!0,{fileName:dt,lineNumber:408,columnNumber:25},globalThis)});Et({d:"M2.20731,0.0127209 C2.1105,-0.0066419 1.99432,-0.00664663 1.91687,0.032079 C0.871279,0.438698 0.212942,1.92964 0.0580392,2.95587 C-0.426031,6.28627 2.20731,9.17133 4.62766,11.0689 C6.77694,12.7534 10.9012,15.5223 13.3409,12.8503 C13.6507,12.5211 14.0186,12.037 13.9993,11.553 C13.9412,10.7397 13.186,10.1588 12.6051,9.71349 C12.1598,9.38432 11.2304,8.47427 10.6495,8.49363 C10.1267,8.51299 9.79754,9.05515 9.46837,9.38432 L8.88748,9.96521 C8.79067,10.062 7.55145,9.24878 7.41591,9.15197 C6.91248,8.8228 6.4284,8.45491 6.00242,8.04829 C5.57644,7.64167 5.18919,7.19632 4.86002,6.73161 C4.7632,6.59607 3.96933,5.41495 4.04678,5.31813 C4.04678,5.31813 4.72448,4.58234 4.91811,4.2919 C5.32473,3.67229 5.63453,3.18822 5.16982,2.45243 C4.99556,2.18135 4.78257,1.96836 4.55021,1.73601 C4.14359,1.34875 3.73698,0.942131 3.27227,0.612963 C3.02055,0.419335 2.59457,0.0708094 2.20731,0.0127209 Z",displayName:"PhoneIcon",viewBox:"0 0 14 14"});Et({viewBox:"0 0 10 10",d:"M3,2 C2.44771525,2 2,1.55228475 2,1 C2,0.44771525 2.44771525,0 3,0 C3.55228475,0 4,0.44771525 4,1 C4,1.55228475 3.55228475,2 3,2 Z M3,6 C2.44771525,6 2,5.55228475 2,5 C2,4.44771525 2.44771525,4 3,4 C3.55228475,4 4,4.44771525 4,5 C4,5.55228475 3.55228475,6 3,6 Z M3,10 C2.44771525,10 2,9.55228475 2,9 C2,8.44771525 2.44771525,8 3,8 C3.55228475,8 4,8.44771525 4,9 C4,9.55228475 3.55228475,10 3,10 Z M7,2 C6.44771525,2 6,1.55228475 6,1 C6,0.44771525 6.44771525,0 7,0 C7.55228475,0 8,0.44771525 8,1 C8,1.55228475 7.55228475,2 7,2 Z M7,6 C6.44771525,6 6,5.55228475 6,5 C6,4.44771525 6.44771525,4 7,4 C7.55228475,4 8,4.44771525 8,5 C8,5.55228475 7.55228475,6 7,6 Z M7,10 C6.44771525,10 6,9.55228475 6,9 C6,8.44771525 6.44771525,8 7,8 C7.55228475,8 8,8.44771525 8,9 C8,9.55228475 7.55228475,10 7,10 Z",displayName:"DragHandleIcon"});Et({displayName:"SpinnerIcon",path:_(hi,{children:[_("defs",{children:_("linearGradient",{x1:"28.154%",y1:"63.74%",x2:"74.629%",y2:"17.783%",id:"a",children:[_("stop",{stopColor:"currentColor",offset:"0%"},void 0,!1,{fileName:dt,lineNumber:443,columnNumber:22},globalThis),_("stop",{stopColor:"#fff",stopOpacity:"0",offset:"100%"},void 0,!1,{fileName:dt,lineNumber:446,columnNumber:23},globalThis)]},void 0,!0,{fileName:dt,lineNumber:437,columnNumber:133},globalThis)},void 0,!1,{fileName:dt,lineNumber:437,columnNumber:83},globalThis),_("g",{transform:"translate(2)",fill:"none",children:[_("circle",{stroke:"url(#a)",strokeWidth:"4",cx:"10",cy:"12",r:"10"},void 0,!1,{fileName:dt,lineNumber:453,columnNumber:22},globalThis),_("path",{d:"M10 2C4.477 2 0 6.477 0 12",stroke:"currentColor",strokeWidth:"4"},void 0,!1,{fileName:dt,lineNumber:459,columnNumber:23},globalThis),_("rect",{fill:"currentColor",x:"8",width:"4",height:"4",rx:"8"},void 0,!1,{fileName:dt,lineNumber:463,columnNumber:23},globalThis)]},void 0,!0,{fileName:dt,lineNumber:450,columnNumber:25},globalThis)]},void 0,!0)});Et({displayName:"CloseIcon",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"});Et({displayName:"SmallCloseIcon",viewBox:"0 0 16 16",path:_("path",{d:"M9.41 8l2.29-2.29c.19-.18.3-.43.3-.71a1.003 1.003 0 0 0-1.71-.71L8 6.59l-2.29-2.3a1.003 1.003 0 0 0-1.42 1.42L6.59 8 4.3 10.29c-.19.18-.3.43-.3.71a1.003 1.003 0 0 0 1.71.71L8 9.41l2.29 2.29c.18.19.43.3.71.3a1.003 1.003 0 0 0 .71-1.71L9.41 8z",fillRule:"evenodd",fill:"currentColor"},void 0,!1,{fileName:dt,lineNumber:484,columnNumber:25},globalThis)});Et({d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20zm6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9z",displayName:"NotAllowedIcon"});Et({d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z",displayName:"TriangleDownIcon"});Et({d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z",displayName:"TriangleUpIcon"});Et({displayName:"InfoOutlineIcon",path:_("g",{fill:"currentColor",stroke:"currentColor",strokeLinecap:"square",strokeWidth:"2",children:[_("circle",{cx:"12",cy:"12",fill:"none",r:"11",stroke:"currentColor"},void 0,!1,{fileName:dt,lineNumber:521,columnNumber:22},globalThis),_("line",{fill:"none",x1:"11.959",x2:"11.959",y1:"11",y2:"17"},void 0,!1,{fileName:dt,lineNumber:527,columnNumber:23},globalThis),_("circle",{cx:"11.959",cy:"7",r:"1",stroke:"none"},void 0,!1,{fileName:dt,lineNumber:533,columnNumber:23},globalThis)]},void 0,!0,{fileName:dt,lineNumber:516,columnNumber:25},globalThis)});Et({displayName:"BellIcon",d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z"});Et({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"});Et({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm0,19a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,12,19Zm1.6-6.08a1,1,0,0,0-.6.917,1,1,0,1,1-2,0,3,3,0,0,1,1.8-2.75A2,2,0,1,0,10,9.255a1,1,0,1,1-2,0,4,4,0,1,1,5.6,3.666Z",displayName:"QuestionIcon"});Et({displayName:"QuestionOutlineIcon",path:_("g",{stroke:"currentColor",strokeWidth:"1.5",children:[_("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"},void 0,!1,{fileName:dt,lineNumber:568,columnNumber:22},globalThis),_("path",{fill:"none",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"},void 0,!1,{fileName:dt,lineNumber:572,columnNumber:23},globalThis),_("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"},void 0,!1,{fileName:dt,lineNumber:576,columnNumber:23},globalThis)]},void 0,!0,{fileName:dt,lineNumber:565,columnNumber:25},globalThis)});Et({d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z",displayName:"WarningIcon"});Et({displayName:"WarningTwoIcon",d:"M23.119,20,13.772,2.15h0a2,2,0,0,0-3.543,0L.881,20a2,2,0,0,0,1.772,2.928H21.347A2,2,0,0,0,23.119,20ZM11,8.423a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Zm1.05,11.51h-.028a1.528,1.528,0,0,1-1.522-1.47,1.476,1.476,0,0,1,1.448-1.53h.028A1.527,1.527,0,0,1,13.5,18.4,1.475,1.475,0,0,1,12.05,19.933Z"});Et({viewBox:"0 0 14 14",path:_("g",{fill:"currentColor",children:_("polygon",{points:"5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039"},void 0,!1,{fileName:dt,lineNumber:605,columnNumber:22},globalThis)},void 0,!1,{fileName:dt,lineNumber:603,columnNumber:25},globalThis)});Et({displayName:"MinusIcon",path:_("g",{fill:"currentColor",children:_("rect",{height:"4",width:"20",x:"2",y:"10"},void 0,!1,{fileName:dt,lineNumber:616,columnNumber:22},globalThis)},void 0,!1,{fileName:dt,lineNumber:614,columnNumber:25},globalThis)});Et({displayName:"HamburgerIcon",viewBox:"0 0 24 24",d:"M 3 5 A 1.0001 1.0001 0 1 0 3 7 L 21 7 A 1.0001 1.0001 0 1 0 21 5 L 3 5 z M 3 11 A 1.0001 1.0001 0 1 0 3 13 L 21 13 A 1.0001 1.0001 0 1 0 21 11 L 3 11 z M 3 17 A 1.0001 1.0001 0 1 0 3 19 L 21 19 A 1.0001 1.0001 0 1 0 21 17 L 3 17 z"});var Fz={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},MI=Pe.createContext&&Pe.createContext(Fz),c2="/Users/spencer/Documents/Code/stable-diffusion/frontend/node_modules/react-icons/lib/esm/iconBase.js",Xf=globalThis&&globalThis.__assign||function(){return Xf=Object.assign||function(e){for(var t,n=1,i=arguments.length;n_(Sn,{gap:2,children:[n&&_(Kf,{label:`Recall ${e}`,children:_(wo,{"aria-label":"Use this parameter",icon:_(Bz,{},void 0,!1,{fileName:mn,lineNumber:54,columnNumber:19},void 0),size:"xs",variant:"ghost",fontSize:20,onClick:n},void 0,!1,{fileName:mn,lineNumber:52,columnNumber:11},void 0)},void 0,!1,{fileName:mn,lineNumber:51,columnNumber:9},void 0),_(Gr,{fontWeight:"semibold",whiteSpace:"nowrap",children:[e,":"]},void 0,!0,{fileName:mn,lineNumber:62,columnNumber:7},void 0),i?_(Ty,{href:t.toString(),isExternal:!0,wordBreak:"break-all",children:[t.toString()," ",_(Lz,{mx:"2px"},void 0,!1,{fileName:mn,lineNumber:67,columnNumber:30},void 0)]},void 0,!0,{fileName:mn,lineNumber:66,columnNumber:9},void 0):_(Gr,{maxHeight:100,overflowY:"scroll",wordBreak:"break-all",children:t.toString()},void 0,!1,{fileName:mn,lineNumber:70,columnNumber:9},void 0)]},void 0,!0,{fileName:mn,lineNumber:49,columnNumber:5},void 0),vhe=(e,t)=>e.image.uuid===t.image.uuid,ghe=k.exports.memo(({image:e})=>{const t=Ga(),n=Yf("blackAlpha.100","whiteAlpha.100"),i=e?.metadata?.image||{},{type:o,postprocessing:c,sampler:u,prompt:m,seed:h,variations:v,steps:b,cfg_scale:x,seamless:w,width:N,height:R,strength:O,fit:M,init_image_path:B,mask_image_path:I,orig_path:F,scale:z}=i,$=JSON.stringify(i,null,2);return _(Sn,{gap:1,direction:"column",overflowY:"scroll",width:"100%",children:[_(Sn,{gap:2,children:[_(Gr,{fontWeight:"semibold",children:"File:"},void 0,!1,{fileName:mn,lineNumber:124,columnNumber:9},void 0),_(Ty,{href:e.url,isExternal:!0,children:[e.url,_(Lz,{mx:"2px"},void 0,!1,{fileName:mn,lineNumber:127,columnNumber:11},void 0)]},void 0,!0,{fileName:mn,lineNumber:125,columnNumber:9},void 0)]},void 0,!0,{fileName:mn,lineNumber:123,columnNumber:7},void 0),Object.keys(i).length>0?_(hi,{children:[o&&_(na,{label:"Type",value:o},void 0,!1,{fileName:mn,lineNumber:132,columnNumber:20},void 0),["esrgan","gfpgan"].includes(o)&&_(na,{label:"Original image",value:F,isLink:!0},void 0,!1,{fileName:mn,lineNumber:134,columnNumber:13},void 0),o==="gfpgan"&&O&&_(na,{label:"Fix faces strength",value:O,onClick:()=>t(wA(O))},void 0,!1,{fileName:mn,lineNumber:137,columnNumber:13},void 0),o==="esrgan"&&z&&_(na,{label:"Upscaling scale",value:z,onClick:()=>t(NA(z))},void 0,!1,{fileName:mn,lineNumber:144,columnNumber:13},void 0),o==="esrgan"&&O&&_(na,{label:"Upscaling strength",value:O,onClick:()=>t(EA(O))},void 0,!1,{fileName:mn,lineNumber:151,columnNumber:13},void 0),m&&_(na,{label:"Prompt",value:SA(m),onClick:()=>t(az(m))},void 0,!1,{fileName:mn,lineNumber:158,columnNumber:13},void 0),h&&_(na,{label:"Seed",value:h,onClick:()=>t(Fy(h))},void 0,!1,{fileName:mn,lineNumber:165,columnNumber:13},void 0),u&&_(na,{label:"Sampler",value:u,onClick:()=>t(lz(u))},void 0,!1,{fileName:mn,lineNumber:172,columnNumber:13},void 0),b&&_(na,{label:"Steps",value:b,onClick:()=>t(iz(b))},void 0,!1,{fileName:mn,lineNumber:179,columnNumber:13},void 0),x&&_(na,{label:"CFG scale",value:x,onClick:()=>t(oz(x))},void 0,!1,{fileName:mn,lineNumber:186,columnNumber:13},void 0),v&&v.length>0&&_(na,{label:"Seed-weight pairs",value:xA(v),onClick:()=>t(fz(xA(v)))},void 0,!1,{fileName:mn,lineNumber:193,columnNumber:13},void 0),w&&_(na,{label:"Seamless",value:w,onClick:()=>t(CA(w))},void 0,!1,{fileName:mn,lineNumber:202,columnNumber:13},void 0),N&&_(na,{label:"Width",value:N,onClick:()=>t(CA(N))},void 0,!1,{fileName:mn,lineNumber:209,columnNumber:13},void 0),R&&_(na,{label:"Height",value:R,onClick:()=>t(sz(R))},void 0,!1,{fileName:mn,lineNumber:216,columnNumber:13},void 0),B&&_(na,{label:"Initial image",value:B,isLink:!0,onClick:()=>t(IC(B))},void 0,!1,{fileName:mn,lineNumber:223,columnNumber:13},void 0),I&&_(na,{label:"Mask image",value:I,isLink:!0,onClick:()=>t(AO(I))},void 0,!1,{fileName:mn,lineNumber:231,columnNumber:13},void 0),o==="img2img"&&O&&_(na,{label:"Image to image strength",value:O,onClick:()=>t(uz(O))},void 0,!1,{fileName:mn,lineNumber:239,columnNumber:13},void 0),M&&_(na,{label:"Image to image fit",value:M,onClick:()=>t(cz(M))},void 0,!1,{fileName:mn,lineNumber:246,columnNumber:13},void 0),c&&c.length>0&&c.map(q=>{if(q.type==="esrgan"){const{scale:K,strength:le}=q;return _(hi,{children:[_(na,{label:"Upscaling scale",value:K,onClick:()=>t(NA(K))},void 0,!1,{fileName:mn,lineNumber:260,columnNumber:23},void 0),_(na,{label:"Upscaling strength",value:le,onClick:()=>t(EA(le))},void 0,!1,{fileName:mn,lineNumber:265,columnNumber:23},void 0)]},void 0,!0)}else if(q.type==="gfpgan"){const{strength:K}=q;return _(na,{label:"Fix faces strength",value:K,onClick:()=>t(wA(K))},void 0,!1,{fileName:mn,lineNumber:275,columnNumber:21},void 0)}}),_(Sn,{gap:2,direction:"column",children:[_(Sn,{gap:2,children:[_(Kf,{label:"Copy metadata JSON",children:_(wo,{"aria-label":"Copy metadata JSON",icon:_(che,{},void 0,!1,{fileName:mn,lineNumber:289,columnNumber:25},void 0),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText($)},void 0,!1,{fileName:mn,lineNumber:287,columnNumber:17},void 0)},void 0,!1,{fileName:mn,lineNumber:286,columnNumber:15},void 0),_(Gr,{fontWeight:"semibold",children:"Metadata JSON:"},void 0,!1,{fileName:mn,lineNumber:296,columnNumber:15},void 0)]},void 0,!0,{fileName:mn,lineNumber:285,columnNumber:13},void 0),_(kl,{overflow:"scroll",flexGrow:3,wordBreak:"break-all",bgColor:n,padding:2,children:_("pre",{children:$},void 0,!1,{fileName:mn,lineNumber:306,columnNumber:15},void 0)},void 0,!1,{fileName:mn,lineNumber:298,columnNumber:13},void 0)]},void 0,!0,{fileName:mn,lineNumber:284,columnNumber:11},void 0)]},void 0,!0):_(_y,{width:"100%",pt:10,children:_(Gr,{fontSize:"lg",fontWeight:"semibold",children:"No metadata available"},void 0,!1,{fileName:mn,lineNumber:312,columnNumber:11},void 0)},void 0,!1,{fileName:mn,lineNumber:311,columnNumber:9},void 0)]},void 0,!0,{fileName:mn,lineNumber:122,columnNumber:5},void 0)},vhe);var So="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/gallery/DeleteImageModal.tsx";const yhe=Br(e=>e.system,e=>e.shouldConfirmOnDelete),Uz=k.exports.forwardRef(({image:e,children:t},n)=>{const{isOpen:i,onOpen:o,onClose:c}=H5(),u=Ga(),m=mr(yhe),h=k.exports.useRef(null),v=w=>{w.stopPropagation(),m?o():b()},b=()=>{u(Ime(e)),c()},x=w=>u(hz(!w.target.checked));return _(hi,{children:[k.exports.cloneElement(t,{onClick:v,ref:n}),_(Hre,{isOpen:i,leastDestructiveRef:h,onClose:c,children:_(L2,{children:_(Wre,{children:[_(sO,{fontSize:"lg",fontWeight:"bold",children:"Delete image"},void 0,!1,{fileName:So,lineNumber:89,columnNumber:15},void 0),_(M2,{children:_(Sn,{direction:"column",gap:5,children:[_(Gr,{children:"Are you sure? You can't undo this action afterwards."},void 0,!1,{fileName:So,lineNumber:95,columnNumber:19},void 0),_(xc,{children:_(Sn,{alignItems:"center",children:[_(Cc,{mb:0,children:"Don't ask me again"},void 0,!1,{fileName:So,lineNumber:100,columnNumber:23},void 0),_(wc,{checked:!m,onChange:x},void 0,!1,{fileName:So,lineNumber:101,columnNumber:23},void 0)]},void 0,!0,{fileName:So,lineNumber:99,columnNumber:21},void 0)},void 0,!1,{fileName:So,lineNumber:98,columnNumber:19},void 0)]},void 0,!0,{fileName:So,lineNumber:94,columnNumber:17},void 0)},void 0,!1,{fileName:So,lineNumber:93,columnNumber:15},void 0),_(oO,{children:[_(Dl,{ref:h,onClick:c,children:"Cancel"},void 0,!1,{fileName:So,lineNumber:110,columnNumber:17},void 0),_(Dl,{colorScheme:"red",onClick:b,ml:3,children:"Delete"},void 0,!1,{fileName:So,lineNumber:113,columnNumber:17},void 0)]},void 0,!0,{fileName:So,lineNumber:109,columnNumber:15},void 0)]},void 0,!0,{fileName:So,lineNumber:88,columnNumber:13},void 0)},void 0,!1,{fileName:So,lineNumber:87,columnNumber:11},void 0)},void 0,!1,{fileName:So,lineNumber:82,columnNumber:9},void 0)]},void 0,!0)});var bhe="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/common/components/SDButton.tsx";const mc=e=>{const{label:t,size:n="sm",...i}=e;return _(Dl,{size:n,...i,children:t},void 0,!1,{fileName:bhe,lineNumber:15,columnNumber:5},void 0)};var dc="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/gallery/CurrentImageButtons.tsx";const She=Br(e=>e.system,e=>({isProcessing:e.isProcessing,isConnected:e.isConnected,isGFPGANAvailable:e.isGFPGANAvailable,isESRGANAvailable:e.isESRGANAvailable}),{memoizeOptions:{resultEqualityCheck:Yr.exports.isEqual}}),xhe=({image:e,shouldShowImageDetails:t,setShouldShowImageDetails:n})=>{const i=Ga(),{intermediateImage:o}=mr(B=>B.gallery),{upscalingLevel:c,gfpganStrength:u}=mr(B=>B.options),{isProcessing:m,isConnected:h,isGFPGANAvailable:v,isESRGANAvailable:b}=mr(She),x=()=>i(IC(e.url)),w=()=>i(dz(e.metadata)),N=()=>i(Fy(e.metadata.image.seed)),R=()=>i(Pme(e)),O=()=>i(Mme(e)),M=()=>n(!t);return _(Sn,{gap:2,children:[_(mc,{label:"Use as initial image",colorScheme:"gray",flexGrow:1,variant:"outline",onClick:x},void 0,!1,{fileName:dc,lineNumber:82,columnNumber:7},void 0),_(mc,{label:"Use all",colorScheme:"gray",flexGrow:1,variant:"outline",isDisabled:!["txt2img","img2img"].includes(e?.metadata?.image?.type),onClick:w},void 0,!1,{fileName:dc,lineNumber:90,columnNumber:7},void 0),_(mc,{label:"Use seed",colorScheme:"gray",flexGrow:1,variant:"outline",isDisabled:!e?.metadata?.image?.seed,onClick:N},void 0,!1,{fileName:dc,lineNumber:99,columnNumber:7},void 0),_(mc,{label:"Upscale",colorScheme:"gray",flexGrow:1,variant:"outline",isDisabled:!b||Boolean(o)||!(h&&!m)||!c,onClick:R},void 0,!1,{fileName:dc,lineNumber:108,columnNumber:7},void 0),_(mc,{label:"Fix faces",colorScheme:"gray",flexGrow:1,variant:"outline",isDisabled:!v||Boolean(o)||!(h&&!m)||!u,onClick:O},void 0,!1,{fileName:dc,lineNumber:121,columnNumber:7},void 0),_(mc,{label:"Details",colorScheme:"gray",variant:t?"solid":"outline",borderWidth:1,flexGrow:1,onClick:M},void 0,!1,{fileName:dc,lineNumber:134,columnNumber:7},void 0),_(Uz,{image:e,children:_(mc,{label:"Delete",colorScheme:"red",flexGrow:1,variant:"outline",isDisabled:Boolean(o)},void 0,!1,{fileName:dc,lineNumber:143,columnNumber:9},void 0)},void 0,!1,{fileName:dc,lineNumber:142,columnNumber:7},void 0)]},void 0,!0,{fileName:dc,lineNumber:81,columnNumber:5},void 0)};var Pf="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/gallery/CurrentImageDisplay.tsx";const Che="calc(100vh - 238px)",whe=()=>{const{currentImage:e,intermediateImage:t}=mr(u=>u.gallery),n=Yf("rgba(255, 255, 255, 0.85)","rgba(0, 0, 0, 0.8)"),[i,o]=k.exports.useState(!1),c=t||e;return c?_(Sn,{direction:"column",borderWidth:1,rounded:"md",p:2,gap:2,children:[_(xhe,{image:c,shouldShowImageDetails:i,setShouldShowImageDetails:o},void 0,!1,{fileName:Pf,lineNumber:31,columnNumber:7},void 0),_(_y,{height:Che,position:"relative",children:[_(Ey,{src:c.url,fit:"contain",maxWidth:"100%",maxHeight:"100%"},void 0,!1,{fileName:Pf,lineNumber:37,columnNumber:9},void 0),i&&_(Sn,{width:"100%",height:"100%",position:"absolute",top:0,left:0,p:3,boxSizing:"border-box",backgroundColor:n,overflow:"scroll",children:_(ghe,{image:c},void 0,!1,{fileName:Pf,lineNumber:55,columnNumber:13},void 0)},void 0,!1,{fileName:Pf,lineNumber:44,columnNumber:11},void 0)]},void 0,!0,{fileName:Pf,lineNumber:36,columnNumber:7},void 0)]},void 0,!0,{fileName:Pf,lineNumber:30,columnNumber:5},void 0):_(_y,{height:"100%",position:"relative",children:_(Gr,{size:"xl",children:"No image selected"},void 0,!1,{fileName:Pf,lineNumber:62,columnNumber:7},void 0)},void 0,!1,{fileName:Pf,lineNumber:61,columnNumber:5},void 0)};var Ji="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/gallery/HoverableImage.tsx";const Nhe=(e,t)=>e.image.uuid===t.image.uuid&&e.isSelected===t.isSelected,Ehe=k.exports.memo(e=>{const[t,n]=k.exports.useState(!1),i=Ga(),o=Yf("green.600","green.300"),c=Yf("gray.200","gray.700"),u=Yf("radial-gradient(circle, rgba(255,255,255,0.7) 0%, rgba(255,255,255,0.7) 20%, rgba(0,0,0,0) 100%)","radial-gradient(circle, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.7) 20%, rgba(0,0,0,0) 100%)"),{image:m,isSelected:h}=e,{url:v,uuid:b,metadata:x}=m,w=()=>n(!0),N=()=>n(!1),R=B=>{B.stopPropagation(),i(dz(x))},O=B=>{B.stopPropagation(),i(Fy(m.metadata.image.seed))};return _(kl,{position:"relative",children:[_(Ey,{width:120,height:120,objectFit:"cover",rounded:"md",src:v,loading:"lazy",backgroundColor:c},void 0,!1,{fileName:Ji,lineNumber:63,columnNumber:7},void 0),_(Sn,{cursor:"pointer",position:"absolute",top:0,left:0,rounded:"md",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",background:h?u:void 0,onClick:()=>i(Cpe(m)),onMouseOver:w,onMouseOut:N,children:[h&&_($s,{fill:o,width:"50%",height:"50%",as:lhe},void 0,!1,{fileName:Ji,lineNumber:88,columnNumber:11},void 0),t&&_(Sn,{direction:"column",gap:1,position:"absolute",top:1,right:1,children:[_(Kf,{label:"Delete image",children:_(Uz,{image:m,children:_(wo,{colorScheme:"red","aria-label":"Delete image",icon:_(hhe,{},void 0,!1,{fileName:Ji,lineNumber:103,columnNumber:25},void 0),size:"xs",variant:"imageHoverIconButton",fontSize:14},void 0,!1,{fileName:Ji,lineNumber:100,columnNumber:17},void 0)},void 0,!1,{fileName:Ji,lineNumber:99,columnNumber:15},void 0)},void 0,!1,{fileName:Ji,lineNumber:98,columnNumber:13},void 0),["txt2img","img2img"].includes(m?.metadata?.image?.type)&&_(Kf,{label:"Use all parameters",children:_(wo,{"aria-label":"Use all parameters",icon:_(Bz,{},void 0,!1,{fileName:Ji,lineNumber:114,columnNumber:25},void 0),size:"xs",fontSize:18,variant:"imageHoverIconButton",onClickCapture:R},void 0,!1,{fileName:Ji,lineNumber:112,columnNumber:17},void 0)},void 0,!1,{fileName:Ji,lineNumber:111,columnNumber:15},void 0),m?.metadata?.image?.seed&&_(Kf,{label:"Use seed",children:_(wo,{"aria-label":"Use seed",icon:_(phe,{},void 0,!1,{fileName:Ji,lineNumber:126,columnNumber:25},void 0),size:"xs",fontSize:16,variant:"imageHoverIconButton",onClickCapture:O},void 0,!1,{fileName:Ji,lineNumber:124,columnNumber:17},void 0)},void 0,!1,{fileName:Ji,lineNumber:123,columnNumber:15},void 0)]},void 0,!0,{fileName:Ji,lineNumber:91,columnNumber:11},void 0)]},void 0,!0,{fileName:Ji,lineNumber:72,columnNumber:7},void 0)]},b,!0,{fileName:Ji,lineNumber:62,columnNumber:5},void 0)},Nhe);var zh="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/gallery/ImageGallery.tsx";const _he=()=>{const{images:e,currentImageUuid:t}=mr(o=>o.gallery),n=Ga(),i=()=>{n(Lme())};return e.length?_(Sn,{direction:"column",gap:2,pb:2,children:[_(Sn,{gap:2,wrap:"wrap",children:e.map(o=>{const{uuid:c}=o;return _(Ehe,{image:o,isSelected:t===c},c,!1,{fileName:zh,lineNumber:34,columnNumber:13},void 0)})},void 0,!1,{fileName:zh,lineNumber:29,columnNumber:7},void 0),_(Dl,{onClick:i,children:"Load more..."},void 0,!1,{fileName:zh,lineNumber:38,columnNumber:7},void 0)]},void 0,!0,{fileName:zh,lineNumber:28,columnNumber:5},void 0):_(_y,{height:"100%",position:"relative",children:_(Gr,{size:"xl",children:"No images in gallery"},void 0,!1,{fileName:zh,lineNumber:42,columnNumber:7},void 0)},void 0,!1,{fileName:zh,lineNumber:41,columnNumber:5},void 0)};var The="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/system/ProgressBar.tsx";const Rhe=Br(e=>e.system,e=>({isProcessing:e.isProcessing,currentStep:e.currentStep,totalSteps:e.totalSteps,currentStatusHasSteps:e.currentStatusHasSteps}),{memoizeOptions:{resultEqualityCheck:Yr.exports.isEqual}}),Ahe=()=>{const{isProcessing:e,currentStep:t,totalSteps:n,currentStatusHasSteps:i}=mr(Rhe),o=t?Math.round(t*100/n):0;return _(tF,{height:"10px",value:o,isIndeterminate:e&&!i},void 0,!1,{fileName:The,lineNumber:30,columnNumber:5},void 0)};function $z(e){return io({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"}}]})(e)}function khe(e){return io({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58a.49.49 0 00.12-.61l-1.92-3.32a.488.488 0 00-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54a.484.484 0 00-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58a.49.49 0 00-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"}}]})(e)}var nr="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/system/SettingsModal.tsx";const Ohe=Br(e=>e.system,e=>{const{shouldDisplayInProgress:t,shouldConfirmOnDelete:n,shouldDisplayGuides:i}=e;return{shouldDisplayInProgress:t,shouldConfirmOnDelete:n,shouldDisplayGuides:i}},{memoizeOptions:{resultEqualityCheck:Yr.exports.isEqual}}),Dhe=({children:e})=>{const{isOpen:t,onOpen:n,onClose:i}=H5(),{isOpen:o,onOpen:c,onClose:u}=H5(),{shouldDisplayInProgress:m,shouldConfirmOnDelete:h,shouldDisplayGuides:v}=mr(Ohe),b=Ga(),x=()=>{Jz.purge().then(()=>{i(),c()})};return _(hi,{children:[k.exports.cloneElement(e,{onClick:n}),_(Dy,{isOpen:t,onClose:i,children:[_(L2,{},void 0,!1,{fileName:nr,lineNumber:101,columnNumber:9},void 0),_(I2,{children:[_(sO,{children:"Settings"},void 0,!1,{fileName:nr,lineNumber:103,columnNumber:11},void 0),_($8,{},void 0,!1,{fileName:nr,lineNumber:104,columnNumber:11},void 0),_(M2,{children:_(Sn,{gap:5,direction:"column",children:[_(xc,{children:_(ay,{children:[_(Cc,{marginBottom:1,children:"Display in-progress images (slower)"},void 0,!1,{fileName:nr,lineNumber:109,columnNumber:19},void 0),_(wc,{isChecked:m,onChange:w=>b(Rpe(w.target.checked))},void 0,!1,{fileName:nr,lineNumber:112,columnNumber:19},void 0)]},void 0,!0,{fileName:nr,lineNumber:108,columnNumber:17},void 0)},void 0,!1,{fileName:nr,lineNumber:107,columnNumber:15},void 0),_(xc,{children:_(ay,{children:[_(Cc,{marginBottom:1,children:"Confirm on delete"},void 0,!1,{fileName:nr,lineNumber:122,columnNumber:19},void 0),_(wc,{isChecked:h,onChange:w=>b(hz(w.target.checked))},void 0,!1,{fileName:nr,lineNumber:123,columnNumber:19},void 0)]},void 0,!0,{fileName:nr,lineNumber:121,columnNumber:17},void 0)},void 0,!1,{fileName:nr,lineNumber:120,columnNumber:15},void 0),_(xc,{children:_(ay,{children:[_(Cc,{marginBottom:1,children:"Display help guides in configuration menus"},void 0,!1,{fileName:nr,lineNumber:133,columnNumber:19},void 0),_(wc,{isChecked:v,onChange:w=>b(Ppe(w.target.checked))},void 0,!1,{fileName:nr,lineNumber:136,columnNumber:19},void 0)]},void 0,!0,{fileName:nr,lineNumber:132,columnNumber:17},void 0)},void 0,!1,{fileName:nr,lineNumber:131,columnNumber:15},void 0),_(Uk,{size:"md",children:"Reset Web UI"},void 0,!1,{fileName:nr,lineNumber:145,columnNumber:15},void 0),_(Gr,{children:"Resetting the web UI only resets the browser's local cache of your images and remembered settings. It does not delete any images from disk."},void 0,!1,{fileName:nr,lineNumber:146,columnNumber:15},void 0),_(Gr,{children:"If images aren't showing up in the gallery or something else isn't working, please try resetting before submitting an issue on GitHub."},void 0,!1,{fileName:nr,lineNumber:151,columnNumber:15},void 0),_(Dl,{colorScheme:"red",onClick:x,children:"Reset Web UI"},void 0,!1,{fileName:nr,lineNumber:156,columnNumber:15},void 0)]},void 0,!0,{fileName:nr,lineNumber:106,columnNumber:13},void 0)},void 0,!1,{fileName:nr,lineNumber:105,columnNumber:11},void 0),_(oO,{children:_(Dl,{onClick:i,children:"Close"},void 0,!1,{fileName:nr,lineNumber:163,columnNumber:13},void 0)},void 0,!1,{fileName:nr,lineNumber:162,columnNumber:11},void 0)]},void 0,!0,{fileName:nr,lineNumber:102,columnNumber:9},void 0)]},void 0,!0,{fileName:nr,lineNumber:100,columnNumber:7},void 0),_(Dy,{closeOnOverlayClick:!1,isOpen:o,onClose:u,isCentered:!0,children:[_(L2,{bg:"blackAlpha.300",backdropFilter:"blur(40px)"},void 0,!1,{fileName:nr,lineNumber:174,columnNumber:9},void 0),_(I2,{children:_(M2,{pb:6,pt:6,children:_(Sn,{justifyContent:"center",children:_(Gr,{fontSize:"lg",children:"Web UI has been reset. Refresh the page to reload."},void 0,!1,{fileName:nr,lineNumber:178,columnNumber:15},void 0)},void 0,!1,{fileName:nr,lineNumber:177,columnNumber:13},void 0)},void 0,!1,{fileName:nr,lineNumber:176,columnNumber:11},void 0)},void 0,!1,{fileName:nr,lineNumber:175,columnNumber:9},void 0)]},void 0,!0,{fileName:nr,lineNumber:168,columnNumber:7},void 0)]},void 0,!0)};var Mi="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/system/SiteHeader.tsx";const Phe=Br(e=>e.system,e=>({isConnected:e.isConnected,isProcessing:e.isProcessing,currentIteration:e.currentIteration,totalIterations:e.totalIterations,currentStatus:e.currentStatus}),{memoizeOptions:{resultEqualityCheck:Yr.exports.isEqual}}),Mhe=()=>{const{colorMode:e,toggleColorMode:t}=Q2(),{isConnected:n,isProcessing:i,currentIteration:o,totalIterations:c,currentStatus:u}=mr(Phe),m=n?"green.500":"red.500",h=e=="light"?_(dhe,{},void 0,!1,{fileName:Mi,lineNumber:50,columnNumber:48},void 0):_(mhe,{},void 0,!1,{fileName:Mi,lineNumber:50,columnNumber:61},void 0),v=e=="light"?18:20;let b=u;return i&&c>1&&(b+=` [${o}/${c}]`),_(Sn,{minWidth:"max-content",alignItems:"center",gap:"1",pl:2,pr:1,children:[_(Uk,{size:"lg",children:"InvokeUI"},void 0,!1,{fileName:Mi,lineNumber:65,columnNumber:7},void 0),_(M7,{},void 0,!1,{fileName:Mi,lineNumber:67,columnNumber:7},void 0),_(Gr,{textColor:m,children:b},void 0,!1,{fileName:Mi,lineNumber:69,columnNumber:7},void 0),_(Dhe,{children:_(wo,{"aria-label":"Settings",variant:"link",fontSize:24,size:"sm",icon:_(khe,{},void 0,!1,{fileName:Mi,lineNumber:77,columnNumber:17},void 0)},void 0,!1,{fileName:Mi,lineNumber:72,columnNumber:9},void 0)},void 0,!1,{fileName:Mi,lineNumber:71,columnNumber:7},void 0),_(wo,{"aria-label":"Link to Github Issues",variant:"link",fontSize:23,size:"sm",icon:_(Ty,{isExternal:!0,href:"http://github.com/lstein/stable-diffusion/issues",children:_($z,{},void 0,!1,{fileName:Mi,lineNumber:91,columnNumber:13},void 0)},void 0,!1,{fileName:Mi,lineNumber:87,columnNumber:11},void 0)},void 0,!1,{fileName:Mi,lineNumber:81,columnNumber:7},void 0),_(wo,{"aria-label":"Link to Github Repo",variant:"link",fontSize:20,size:"sm",icon:_(Ty,{isExternal:!0,href:"http://github.com/lstein/stable-diffusion",children:_(ohe,{},void 0,!1,{fileName:Mi,lineNumber:103,columnNumber:13},void 0)},void 0,!1,{fileName:Mi,lineNumber:102,columnNumber:11},void 0)},void 0,!1,{fileName:Mi,lineNumber:96,columnNumber:7},void 0),_(wo,{"aria-label":"Toggle Dark Mode",onClick:t,variant:"link",size:"sm",fontSize:v,icon:h},void 0,!1,{fileName:Mi,lineNumber:108,columnNumber:7},void 0)]},void 0,!0,{fileName:Mi,lineNumber:64,columnNumber:5},void 0)};var pc="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/common/components/SDNumberInput.tsx";const Zf=e=>{const{label:t,isDisabled:n=!1,fontSize:i="md",size:o="sm",width:c,isInvalid:u,...m}=e;return _(xc,{isDisabled:n,width:c,isInvalid:u,children:_(Sn,{gap:2,justifyContent:"space-between",alignItems:"center",children:[t&&_(Cc,{marginBottom:1,children:_(Gr,{fontSize:i,whiteSpace:"nowrap",children:t},void 0,!1,{fileName:pc,lineNumber:37,columnNumber:13},void 0)},void 0,!1,{fileName:pc,lineNumber:36,columnNumber:11},void 0),_(W8,{size:o,...m,keepWithinRange:!1,clampValueOnBlur:!0,children:[_(Y8,{fontSize:"md"},void 0,!1,{fileName:pc,lineNumber:48,columnNumber:11},void 0),_(G8,{children:[_(X8,{},void 0,!1,{fileName:pc,lineNumber:50,columnNumber:13},void 0),_(K8,{},void 0,!1,{fileName:pc,lineNumber:51,columnNumber:13},void 0)]},void 0,!0,{fileName:pc,lineNumber:49,columnNumber:11},void 0)]},void 0,!0,{fileName:pc,lineNumber:42,columnNumber:9},void 0)]},void 0,!0,{fileName:pc,lineNumber:34,columnNumber:7},void 0)},void 0,!1,{fileName:pc,lineNumber:33,columnNumber:5},void 0)};var Bx="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/common/components/SDSwitch.tsx";const Y2=e=>{const{label:t,isDisabled:n=!1,fontSize:i="md",size:o="md",width:c,...u}=e;return _(xc,{isDisabled:n,width:c,children:_(Sn,{justifyContent:"space-between",alignItems:"center",children:[t&&_(Cc,{fontSize:i,marginBottom:1,flexGrow:2,whiteSpace:"nowrap",children:t},void 0,!1,{fileName:Bx,lineNumber:30,columnNumber:11},void 0),_(wc,{size:o,...u},void 0,!1,{fileName:Bx,lineNumber:39,columnNumber:9},void 0)]},void 0,!0,{fileName:Bx,lineNumber:28,columnNumber:7},void 0)},void 0,!1,{fileName:Bx,lineNumber:27,columnNumber:5},void 0)};var xo="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/SeedVariationOptions.tsx";const Ihe=Br(e=>e.options,e=>({variationAmount:e.variationAmount,seedWeights:e.seedWeights,shouldGenerateVariations:e.shouldGenerateVariations,shouldRandomizeSeed:e.shouldRandomizeSeed,seed:e.seed,iterations:e.iterations}),{memoizeOptions:{resultEqualityCheck:Yr.exports.isEqual}}),Lhe=()=>{const{shouldGenerateVariations:e,variationAmount:t,seedWeights:n,shouldRandomizeSeed:i,seed:o,iterations:c}=mr(Ihe),u=Ga(),m=R=>u(fpe(Number(R))),h=R=>u(ype(R.target.checked)),v=R=>u(Fy(Number(R))),b=()=>u(Fy(Oz(OA,DA))),x=R=>u(mpe(R.target.checked)),w=R=>u(hpe(Number(R))),N=R=>u(fz(R.target.value));return _(Sn,{gap:2,direction:"column",children:[_(Zf,{label:"Images to generate",step:1,min:1,precision:0,onChange:m,value:c},void 0,!1,{fileName:xo,lineNumber:87,columnNumber:7},void 0),_(Y2,{label:"Randomize seed on generation",isChecked:i,onChange:h},void 0,!1,{fileName:xo,lineNumber:95,columnNumber:7},void 0),_(Sn,{gap:2,children:[_(Zf,{label:"Seed",step:1,precision:0,flexGrow:1,min:OA,max:DA,isDisabled:i,isInvalid:o<0&&e,onChange:v,value:o},void 0,!1,{fileName:xo,lineNumber:101,columnNumber:9},void 0),_(Dl,{size:"sm",isDisabled:i,onClick:b,children:_(Gr,{pl:2,pr:2,children:"Shuffle"},void 0,!1,{fileName:xo,lineNumber:118,columnNumber:11},void 0)},void 0,!1,{fileName:xo,lineNumber:113,columnNumber:9},void 0)]},void 0,!0,{fileName:xo,lineNumber:100,columnNumber:7},void 0),_(Y2,{label:"Generate variations",isChecked:e,width:"auto",onChange:x},void 0,!1,{fileName:xo,lineNumber:123,columnNumber:7},void 0),_(Zf,{label:"Variation amount",value:t,step:.01,min:0,max:1,isDisabled:!e,onChange:w},void 0,!1,{fileName:xo,lineNumber:129,columnNumber:7},void 0),_(xc,{isInvalid:e&&!(RO(n)||n===""),flexGrow:1,children:_(ay,{children:[_(Cc,{marginInlineEnd:0,marginBottom:1,children:_(Gr,{whiteSpace:"nowrap",children:"Seed Weights"},void 0,!1,{fileName:xo,lineNumber:147,columnNumber:13},void 0)},void 0,!1,{fileName:xo,lineNumber:146,columnNumber:11},void 0),_(Fk,{size:"sm",value:n,onChange:N},void 0,!1,{fileName:xo,lineNumber:149,columnNumber:11},void 0)]},void 0,!0,{fileName:xo,lineNumber:145,columnNumber:9},void 0)},void 0,!1,{fileName:xo,lineNumber:138,columnNumber:7},void 0)]},void 0,!0,{fileName:xo,lineNumber:86,columnNumber:5},void 0)};var Ap="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/common/components/SDSelect.tsx";const q2=e=>{const{label:t,isDisabled:n,validValues:i,size:o="sm",fontSize:c="md",marginBottom:u=1,whiteSpace:m="nowrap",...h}=e;return _(xc,{isDisabled:n,children:_(Sn,{justifyContent:"space-between",alignItems:"center",children:[_(Cc,{marginBottom:u,children:_(Gr,{fontSize:c,whiteSpace:m,children:t},void 0,!1,{fileName:Ap,lineNumber:34,columnNumber:11},void 0)},void 0,!1,{fileName:Ap,lineNumber:33,columnNumber:9},void 0),_(rF,{fontSize:c,size:o,...h,children:i.map(v=>typeof v=="string"||typeof v=="number"?_("option",{value:v,children:v},v,!1,{fileName:Ap,lineNumber:41,columnNumber:15},void 0):_("option",{value:v.value,children:v.key},v.value,!1,{fileName:Ap,lineNumber:45,columnNumber:15},void 0))},void 0,!1,{fileName:Ap,lineNumber:38,columnNumber:9},void 0)]},void 0,!0,{fileName:Ap,lineNumber:32,columnNumber:7},void 0)},void 0,!1,{fileName:Ap,lineNumber:31,columnNumber:5},void 0)};var Ux="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/SamplerOptions.tsx";const Fhe=Br(e=>e.options,e=>({steps:e.steps,cfgScale:e.cfgScale,sampler:e.sampler}),{memoizeOptions:{resultEqualityCheck:Yr.exports.isEqual}}),zhe=()=>{const e=Ga(),{steps:t,cfgScale:n,sampler:i}=mr(Fhe);return _(Sn,{gap:2,direction:"column",children:[_(Zf,{label:"Steps",min:1,step:1,precision:0,onChange:m=>e(iz(Number(m))),value:t},void 0,!1,{fileName:Ux,lineNumber:50,columnNumber:7},void 0),_(Zf,{label:"CFG scale",step:.5,onChange:m=>e(oz(Number(m))),value:n},void 0,!1,{fileName:Ux,lineNumber:58,columnNumber:7},void 0),_(q2,{label:"Sampler",value:i,onChange:m=>e(lz(m.target.value)),validValues:Vme},void 0,!1,{fileName:Ux,lineNumber:64,columnNumber:7},void 0)]},void 0,!0,{fileName:Ux,lineNumber:49,columnNumber:5},void 0)};var XR="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/ESRGANOptions.tsx";const Bhe=Br(e=>e.options,e=>({upscalingLevel:e.upscalingLevel,upscalingStrength:e.upscalingStrength}),{memoizeOptions:{resultEqualityCheck:Yr.exports.isEqual}}),Uhe=Br(e=>e.system,e=>({isESRGANAvailable:e.isESRGANAvailable}),{memoizeOptions:{resultEqualityCheck:Yr.exports.isEqual}}),$he=()=>{const e=Ga(),{upscalingLevel:t,upscalingStrength:n}=mr(Bhe),{isESRGANAvailable:i}=mr(Uhe);return _(Sn,{direction:"column",gap:2,children:[_(q2,{isDisabled:!i,label:"Scale",value:t,onChange:u=>e(NA(Number(u.target.value))),validValues:Gme},void 0,!1,{fileName:XR,lineNumber:67,columnNumber:7},void 0),_(Zf,{isDisabled:!i,label:"Strength",step:.05,min:0,max:1,onChange:u=>e(EA(Number(u))),value:n},void 0,!1,{fileName:XR,lineNumber:74,columnNumber:7},void 0)]},void 0,!0,{fileName:XR,lineNumber:66,columnNumber:5},void 0)};var FI="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/GFPGANOptions.tsx";const jhe=Br(e=>e.options,e=>({gfpganStrength:e.gfpganStrength}),{memoizeOptions:{resultEqualityCheck:Yr.exports.isEqual}}),Vhe=Br(e=>e.system,e=>({isGFPGANAvailable:e.isGFPGANAvailable}),{memoizeOptions:{resultEqualityCheck:Yr.exports.isEqual}}),Hhe=()=>{const e=Ga(),{gfpganStrength:t}=mr(jhe),{isGFPGANAvailable:n}=mr(Vhe);return _(Sn,{direction:"column",gap:2,children:_(Zf,{isDisabled:!n,label:"Strength",step:.05,min:0,max:1,onChange:o=>e(wA(Number(o))),value:t},void 0,!1,{fileName:FI,lineNumber:55,columnNumber:7},void 0)},void 0,!1,{fileName:FI,lineNumber:54,columnNumber:5},void 0)};var V0="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/OutputOptions.tsx";const Whe=Br(e=>e.options,e=>({height:e.height,width:e.width,seamless:e.seamless}),{memoizeOptions:{resultEqualityCheck:Yr.exports.isEqual}}),Ghe=()=>{const e=Ga(),{height:t,width:n,seamless:i}=mr(Whe);return _(Sn,{gap:2,direction:"column",children:[_(Sn,{gap:2,children:[_(q2,{label:"Width",value:n,flexGrow:1,onChange:m=>e(CA(Number(m.target.value))),validValues:Hme},void 0,!1,{fileName:V0,lineNumber:51,columnNumber:9},void 0),_(q2,{label:"Height",value:t,flexGrow:1,onChange:m=>e(sz(Number(m.target.value))),validValues:Wme},void 0,!1,{fileName:V0,lineNumber:58,columnNumber:9},void 0)]},void 0,!0,{fileName:V0,lineNumber:50,columnNumber:7},void 0),_(Y2,{label:"Seamless tiling",fontSize:"md",isChecked:i,onChange:m=>e(dpe(m.target.checked))},void 0,!1,{fileName:V0,lineNumber:66,columnNumber:7},void 0)]},void 0,!0,{fileName:V0,lineNumber:49,columnNumber:5},void 0)};var Yhe=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function sb(e,t){var n=qhe(e);if(typeof n.path!="string"){var i=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof i=="string"&&i.length>0?i:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function qhe(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var i=t.split(".").pop().toLowerCase(),o=Yhe.get(i);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}var Khe=[".DS_Store","Thumbs.db"];function Xhe(e){return vv(this,void 0,void 0,function(){return gv(this,function(t){return K2(e)&&Zhe(e.dataTransfer)?[2,tve(e.dataTransfer,e.type)]:Qhe(e)?[2,Jhe(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,eve(e)]:[2,[]]})})}function Zhe(e){return K2(e)}function Qhe(e){return K2(e)&&K2(e.target)}function K2(e){return typeof e=="object"&&e!==null}function Jhe(e){return IA(e.target.files).map(function(t){return sb(t)})}function eve(e){return vv(this,void 0,void 0,function(){var t;return gv(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(i){return i.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(i){return sb(i)})]}})})}function tve(e,t){return vv(this,void 0,void 0,function(){var n,i;return gv(this,function(o){switch(o.label){case 0:return e.items?(n=IA(e.items).filter(function(c){return c.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(nve))]):[3,2];case 1:return i=o.sent(),[2,zI(jz(i))];case 2:return[2,zI(IA(e.files).map(function(c){return sb(c)}))]}})})}function zI(e){return e.filter(function(t){return Khe.indexOf(t.name)===-1})}function IA(e){if(e===null)return[];for(var t=[],n=0;n=j)return l;var Z=g-Au(E);if(Z<1)return E;var oe=Y?xs(Y,0,Z).join(""):l.slice(0,Z);if(P===n)return oe+E;if(Y&&(Z+=oe.length-Z),Km(P)){if(l.slice(Z).search(P)){var De,Ae=oe;for(P.global||(P=Xs(P.source,Zn(Vn.exec(P))+"g")),P.lastIndex=0;De=P.exec(Ae);)var Le=De.index;oe=oe.slice(0,Le===n?Z:Le)}}else if(l.indexOf(Za(P),Z)!=Z){var Qe=oe.lastIndexOf(P);Qe>-1&&(oe=oe.slice(0,Qe))}return oe+E}function iE(l){return l=Zn(l),l&&ga.test(l)?l.replace(jn,HC):l}var oE=Jc(function(l,d,g){return l+(g?" ":"")+d.toUpperCase()}),$g=Wb("toUpperCase");function jg(l,d,g){return l=Zn(l),d=g?n:d,d===n?VC(l)?YC(l):wv(l):l.match(d)||[]}var Z1=yn(function(l,d){try{return yt(l,n,d)}catch(g){return Hl(g)?g:new nn(g)}}),sE=sl(function(l,d){return Tt(d,function(g){g=_i(g),gs(l,g,Wm(l[g],l))}),l});function lE(l){var d=l==null?0:l.length,g=Pt();return l=d?Pn(l,function(E){if(typeof E[1]!="function")throw new $i(u);return[g(E[0]),E[1]]}):[],yn(function(E){for(var P=-1;++Pxe)return[];var g=Ce,E=ia(l,Ce);d=Pt(d),l-=Ce;for(var P=om(E,d);++g0||d<0)?new An(g):(l<0?g=g.takeRight(-l):l&&(g=g.drop(l)),d!==n&&(d=rn(d),g=d<0?g.dropRight(-d):g.take(d-l)),g)},An.prototype.takeRightWhile=function(l){return this.reverse().takeWhile(l).reverse()},An.prototype.toArray=function(){return this.take(Ce)},gr(An.prototype,function(l,d){var g=/^(?:filter|find|map|reject)|While$/.test(d),E=/^(?:head|last)$/.test(d),P=L[E?"take"+(d=="last"?"Right":""):d],j=E||/^find/.test(d);!P||(L.prototype[d]=function(){var Y=this.__wrapped__,Z=E?[1]:arguments,oe=Y instanceof An,De=Z[0],Ae=oe||sn(Y),Le=function(bn){var kn=P.apply(L,wi([bn],Z));return E&&Qe?kn[0]:kn};Ae&&g&&typeof De=="function"&&De.length!=1&&(oe=Ae=!1);var Qe=this.__chain__,vt=!!this.__actions__.length,Mt=j&&!Qe,pn=oe&&!vt;if(!j&&Ae){Y=pn?Y:new An(this);var Ut=l.apply(Y,Z);return Ut.__actions__.push({func:Vm,args:[Le],thisArg:n}),new uo(Ut,Qe)}return Mt&&pn?l.apply(this,Z):(Ut=this.thru(Le),Mt?E?Ut.value()[0]:Ut.value():Ut)})}),Tt(["pop","push","shift","sort","splice","unshift"],function(l){var d=Zs[l],g=/^(?:push|sort|unshift)$/.test(l)?"tap":"thru",E=/^(?:pop|shift)$/.test(l);L.prototype[l]=function(){var P=arguments;if(E&&!this.__chain__){var j=this.value();return d.apply(sn(j)?j:[],P)}return this[g](function(Y){return d.apply(sn(Y)?Y:[],P)})}}),gr(An.prototype,function(l,d){var g=L[d];if(g){var E=g.name+"";er.call(Uc,E)||(Uc[E]=[]),Uc[E].push({name:d,func:g})}}),Uc[ef(n,B).name]=[{name:"wrapper",func:n}],An.prototype.clone=Ft,An.prototype.reverse=Vc,An.prototype.value=jr,L.prototype.at=Yw,L.prototype.chain=qw,L.prototype.commit=Kw,L.prototype.next=g1,L.prototype.plant=qd,L.prototype.reverse=Xw,L.prototype.toJSON=L.prototype.valueOf=L.prototype.value=y1,L.prototype.first=L.prototype.head,hd&&(L.prototype[hd]=Sg),L},Dc=qC();A?((A.exports=Dc)._=Dc,S._=Dc):Kt._=Dc}).call(vc)})(Yr,Yr.exports);const Spe={currentImageUuid:"",images:[],nextPage:1,offset:0},pz=xO({name:"gallery",initialState:Spe,reducers:{setCurrentImage:(e,t)=>{e.currentImage=t.payload,e.currentImageUuid=t.payload.uuid},removeImage:(e,t)=>{const n=t.payload,i=e.images.filter(o=>o.uuid!==n);if(n===e.currentImageUuid){const o=e.images.findIndex(u=>u.uuid===n),c=Yr.exports.clamp(o,0,i.length-1);e.currentImage=i.length?i[c]:void 0,e.currentImageUuid=i.length?i[c].uuid:""}e.images=i},addImage:(e,t)=>{e.images.unshift(t.payload),e.currentImageUuid=t.payload.uuid,e.intermediateImage=void 0,e.currentImage=t.payload,e.offset+=1},setIntermediateImage:(e,t)=>{e.intermediateImage=t.payload},clearIntermediateImage:e=>{e.intermediateImage=void 0},addGalleryImages:(e,t)=>{const{images:n,nextPage:i,offset:o}=t.payload;if(n.length){const c=n[0];e.images=e.images.concat(n).sort((u,m)=>m.mtime-u.mtime),e.currentImage=c,e.currentImageUuid=c.uuid,e.nextPage=i,e.offset=o}}}}),{addImage:Ix,clearIntermediateImage:vI,removeImage:xpe,setCurrentImage:Cpe,addGalleryImages:wpe,setIntermediateImage:Npe}=pz.actions,Epe=pz.reducer,_pe={isConnected:!1,isProcessing:!1,log:[],shouldShowLogViewer:!1,shouldDisplayInProgress:!1,shouldDisplayGuides:!0,isGFPGANAvailable:!0,isESRGANAvailable:!0,socketId:"",shouldConfirmOnDelete:!0,openAccordions:[0],currentStep:0,totalSteps:0,currentIteration:0,totalIterations:0,currentStatus:"Disconnected",currentStatusHasSteps:!1,model:"",model_id:"",model_hash:"",app_id:"",app_version:""},Tpe=_pe,mz=xO({name:"system",initialState:Tpe,reducers:{setShouldDisplayInProgress:(e,t)=>{e.shouldDisplayInProgress=t.payload},setIsProcessing:(e,t)=>{e.isProcessing=t.payload},setCurrentStatus:(e,t)=>{e.currentStatus=t.payload},setSystemStatus:(e,t)=>{const n=!t.payload.isProcessing&&e.isConnected?"Connected":t.payload.currentStatus;return{...e,...t.payload,currentStatus:n}},addLogEntry:(e,t)=>{const{timestamp:n,message:i,level:o}=t.payload,u={timestamp:n,message:i,level:o||"info"};e.log.push(u)},setShouldShowLogViewer:(e,t)=>{e.shouldShowLogViewer=t.payload},setIsConnected:(e,t)=>{e.isConnected=t.payload,e.isProcessing=!1,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1},setSocketId:(e,t)=>{e.socketId=t.payload},setShouldConfirmOnDelete:(e,t)=>{e.shouldConfirmOnDelete=t.payload},setOpenAccordions:(e,t)=>{e.openAccordions=t.payload},setSystemConfig:(e,t)=>({...e,...t.payload}),setShouldDisplayGuides:(e,t)=>{e.shouldDisplayGuides=t.payload}}}),{setShouldDisplayInProgress:Rpe,setIsProcessing:hc,addLogEntry:eo,setShouldShowLogViewer:Ape,setIsConnected:gI,setSocketId:bge,setShouldConfirmOnDelete:hz,setOpenAccordions:kpe,setSystemStatus:Ope,setCurrentStatus:yI,setSystemConfig:Dpe,setShouldDisplayGuides:Ppe}=mz.actions,Mpe=mz.reducer,Cu=Object.create(null);Cu.open="0";Cu.close="1";Cu.ping="2";Cu.pong="3";Cu.message="4";Cu.upgrade="5";Cu.noop="6";const a2=Object.create(null);Object.keys(Cu).forEach(e=>{a2[Cu[e]]=e});const Ipe={type:"error",data:"parser error"},Lpe=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Fpe=typeof ArrayBuffer=="function",zpe=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,vz=({type:e,data:t},n,i)=>Lpe&&t instanceof Blob?n?i(t):bI(t,i):Fpe&&(t instanceof ArrayBuffer||zpe(t))?n?i(t):bI(new Blob([t]),i):i(Cu[e]+(t||"")),bI=(e,t)=>{const n=new FileReader;return n.onload=function(){const i=n.result.split(",")[1];t("b"+i)},n.readAsDataURL(e)},SI="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",K0=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,n=e.length,i,o=0,c,u,m,h;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const v=new ArrayBuffer(t),b=new Uint8Array(v);for(i=0;i>4,b[o++]=(u&15)<<4|m>>2,b[o++]=(m&3)<<6|h&63;return v},Upe=typeof ArrayBuffer=="function",gz=(e,t)=>{if(typeof e!="string")return{type:"message",data:yz(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:$pe(e.substring(1),t)}:a2[n]?e.length>1?{type:a2[n],data:e.substring(1)}:{type:a2[n]}:Ipe},$pe=(e,t)=>{if(Upe){const n=Bpe(e);return yz(n,t)}else return{base64:!0,data:e}},yz=(e,t)=>{switch(t){case"blob":return e instanceof ArrayBuffer?new Blob([e]):e;case"arraybuffer":default:return e}},bz=String.fromCharCode(30),jpe=(e,t)=>{const n=e.length,i=new Array(n);let o=0;e.forEach((c,u)=>{vz(c,!1,m=>{i[u]=m,++o===n&&t(i.join(bz))})})},Vpe=(e,t)=>{const n=e.split(bz),i=[];for(let o=0;otypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function xz(e,...t){return t.reduce((n,i)=>(e.hasOwnProperty(i)&&(n[i]=e[i]),n),{})}const Wpe=setTimeout,Gpe=clearTimeout;function LC(e,t){t.useNativeTimers?(e.setTimeoutFn=Wpe.bind(Gf),e.clearTimeoutFn=Gpe.bind(Gf)):(e.setTimeoutFn=setTimeout.bind(Gf),e.clearTimeoutFn=clearTimeout.bind(Gf))}const Ype=1.33;function qpe(e){return typeof e=="string"?Kpe(e):Math.ceil((e.byteLength||e.size)*Ype)}function Kpe(e){let t=0,n=0;for(let i=0,o=e.length;i=57344?n+=3:(i++,n+=4);return n}class Xpe extends Error{constructor(t,n,i){super(t),this.description=n,this.context=i,this.type="TransportError"}}class Cz extends ha{constructor(t){super(),this.writable=!1,LC(this,t),this.opts=t,this.query=t.query,this.readyState="",this.socket=t.socket}onError(t,n,i){return super.emitReserved("error",new Xpe(t,n,i)),this}open(){return(this.readyState==="closed"||this.readyState==="")&&(this.readyState="opening",this.doOpen()),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=gz(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}}const wz="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),_A=64,Zpe={};let xI=0,Lx=0,CI;function wI(e){let t="";do t=wz[e%_A]+t,e=Math.floor(e/_A);while(e>0);return t}function Nz(){const e=wI(+new Date);return e!==CI?(xI=0,CI=e):e+"."+wI(xI++)}for(;Lx<_A;Lx++)Zpe[wz[Lx]]=Lx;function Ez(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function Qpe(e){let t={},n=e.split("&");for(let i=0,o=n.length;i{this.readyState="paused",t()};if(this.polling||!this.writable){let i=0;this.polling&&(i++,this.once("pollComplete",function(){--i||n()})),this.writable||(i++,this.once("drain",function(){--i||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=i=>{if(this.readyState==="opening"&&i.type==="open"&&this.onOpen(),i.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(i)};Vpe(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,jpe(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let t=this.query||{};const n=this.opts.secure?"https":"http";let i="";this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=Nz()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.opts.port&&(n==="https"&&Number(this.opts.port)!==443||n==="http"&&Number(this.opts.port)!==80)&&(i=":"+this.opts.port);const o=Ez(t),c=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(c?"["+this.opts.hostname+"]":this.opts.hostname)+i+this.opts.path+(o.length?"?"+o:"")}request(t={}){return Object.assign(t,{xd:this.xd,xs:this.xs},this.opts),new bu(this.uri(),t)}doWrite(t,n){const i=this.request({method:"POST",data:t});i.on("success",n),i.on("error",(o,c)=>{this.onError("xhr post error",o,c)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,i)=>{this.onError("xhr poll error",n,i)}),this.pollXhr=t}}class bu extends ha{constructor(t,n){super(),LC(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.async=n.async!==!1,this.data=n.data!==void 0?n.data:null,this.create()}create(){const t=xz(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd,t.xscheme=!!this.opts.xs;const n=this.xhr=new Tz(t);try{n.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let i in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(i)&&n.setRequestHeader(i,this.opts.extraHeaders[i])}}catch{}if(this.method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{n.readyState===4&&(n.status===200||n.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof n.status=="number"?n.status:0)},0))},n.send(this.data)}catch(i){this.setTimeoutFn(()=>{this.onError(i)},0);return}typeof document<"u"&&(this.index=bu.requestsCount++,bu.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=eme,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete bu.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}bu.requestsCount=0;bu.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",NI);else if(typeof addEventListener=="function"){const e="onpagehide"in Gf?"pagehide":"unload";addEventListener(e,NI,!1)}}function NI(){for(let e in bu.requests)bu.requests.hasOwnProperty(e)&&bu.requests[e].abort()}const rme=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),Fx=Gf.WebSocket||Gf.MozWebSocket,EI=!0,ame="arraybuffer",_I=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class ime extends Cz{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,i=_I?{}:xz(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(i.headers=this.opts.extraHeaders);try{this.ws=EI&&!_I?n?new Fx(t,n):new Fx(t):new Fx(t,n,i)}catch(o){return this.emitReserved("error",o)}this.ws.binaryType=this.socket.binaryType||ame,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n{const u={};try{EI&&this.ws.send(c)}catch{}o&&rme(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){let t=this.query||{};const n=this.opts.secure?"wss":"ws";let i="";this.opts.port&&(n==="wss"&&Number(this.opts.port)!==443||n==="ws"&&Number(this.opts.port)!==80)&&(i=":"+this.opts.port),this.opts.timestampRequests&&(t[this.opts.timestampParam]=Nz()),this.supportsBinary||(t.b64=1);const o=Ez(t),c=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(c?"["+this.opts.hostname+"]":this.opts.hostname)+i+this.opts.path+(o.length?"?"+o:"")}check(){return!!Fx}}const ome={websocket:ime,polling:nme},sme=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,lme=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function TA(e){const t=e,n=e.indexOf("["),i=e.indexOf("]");n!=-1&&i!=-1&&(e=e.substring(0,n)+e.substring(n,i).replace(/:/g,";")+e.substring(i,e.length));let o=sme.exec(e||""),c={},u=14;for(;u--;)c[lme[u]]=o[u]||"";return n!=-1&&i!=-1&&(c.source=t,c.host=c.host.substring(1,c.host.length-1).replace(/;/g,":"),c.authority=c.authority.replace("[","").replace("]","").replace(/;/g,":"),c.ipv6uri=!0),c.pathNames=ume(c,c.path),c.queryKey=cme(c,c.query),c}function ume(e,t){const n=/\/{2,9}/g,i=t.replace(n,"/").split("/");return(t.substr(0,1)=="/"||t.length===0)&&i.splice(0,1),t.substr(t.length-1,1)=="/"&&i.splice(i.length-1,1),i}function cme(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(i,o,c){o&&(n[o]=c)}),n}class $f extends ha{constructor(t,n={}){super(),t&&typeof t=="object"&&(n=t,t=null),t?(t=TA(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=TA(n.host).host),LC(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},n),this.opts.path=this.opts.path.replace(/\/$/,"")+"/",typeof this.opts.query=="string"&&(this.opts.query=Qpe(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&addEventListener("beforeunload",()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},!1),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=Sz,n.transport=t,this.id&&(n.sid=this.id);const i=Object.assign({},this.opts.transportOptions[t],this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new ome[t](i)}open(){let t;if(this.opts.rememberUpgrade&&$f.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch{this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){let n=this.createTransport(t),i=!1;$f.priorWebsocketSuccess=!1;const o=()=>{i||(n.send([{type:"ping",data:"probe"}]),n.once("packet",x=>{if(!i)if(x.type==="pong"&&x.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;$f.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{i||this.readyState!=="closed"&&(b(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const w=new Error("probe error");w.transport=n.name,this.emitReserved("upgradeError",w)}}))};function c(){i||(i=!0,b(),n.close(),n=null)}const u=x=>{const w=new Error("probe error: "+x);w.transport=n.name,c(),this.emitReserved("upgradeError",w)};function m(){u("transport closed")}function h(){u("socket closed")}function v(x){n&&x.name!==n.name&&c()}const b=()=>{n.removeListener("open",o),n.removeListener("error",u),n.removeListener("close",m),this.off("close",h),this.off("upgrading",v)};n.once("open",o),n.once("error",u),n.once("close",m),this.once("close",h),this.once("upgrading",v),n.open()}onOpen(){if(this.readyState="open",$f.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade&&this.transport.pause){let t=0;const n=this.upgrades.length;for(;t{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let i=0;i0&&n>this.maxPayload)return this.writeBuffer.slice(0,i);n+=2}return this.writeBuffer}write(t,n,i){return this.sendPacket("message",t,n,i),this}send(t,n,i){return this.sendPacket("message",t,n,i),this}sendPacket(t,n,i,o){if(typeof n=="function"&&(o=n,n=void 0),typeof i=="function"&&(o=i,i=null),this.readyState==="closing"||this.readyState==="closed")return;i=i||{},i.compress=i.compress!==!1;const c={type:t,data:n,options:i};this.emitReserved("packetCreate",c),this.writeBuffer.push(c),o&&this.once("flush",o),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},i=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?i():t()}):this.upgrading?i():t()),this}onError(t){$f.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&removeEventListener("offline",this.offlineEventListener,!1),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let i=0;const o=t.length;for(;itypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,Rz=Object.prototype.toString,mme=typeof Blob=="function"||typeof Blob<"u"&&Rz.call(Blob)==="[object BlobConstructor]",hme=typeof File=="function"||typeof File<"u"&&Rz.call(File)==="[object FileConstructor]";function kO(e){return dme&&(e instanceof ArrayBuffer||pme(e))||mme&&e instanceof Blob||hme&&e instanceof File}function i2(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,i=e.length;n=0&&e.num0;case qn.ACK:case qn.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}class Sme{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=gme(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const xme=Object.freeze(Object.defineProperty({__proto__:null,protocol:yme,get PacketType(){return qn},Encoder:bme,Decoder:OO},Symbol.toStringTag,{value:"Module"}));function Tl(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const Cme=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Az extends ha{constructor(t,n,i){super(),this.connected=!1,this.receiveBuffer=[],this.sendBuffer=[],this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,i&&i.auth&&(this.auth=i.auth),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[Tl(t,"open",this.onopen.bind(this)),Tl(t,"packet",this.onpacket.bind(this)),Tl(t,"error",this.onerror.bind(this)),Tl(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){if(Cme.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');n.unshift(t);const i={type:qn.EVENT,data:n};if(i.options={},i.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const u=this.ids++,m=n.pop();this._registerAckCallback(u,m),i.id=u}const o=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!o||!this.connected)||(this.connected?(this.notifyOutgoingListeners(i),this.packet(i)):this.sendBuffer.push(i)),this.flags={},this}_registerAckCallback(t,n){const i=this.flags.timeout;if(i===void 0){this.acks[t]=n;return}const o=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let c=0;c{this.io.clearTimeoutFn(o),n.apply(this,[null,...c])}}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this.packet({type:qn.CONNECT,data:t})}):this.packet({type:qn.CONNECT,data:this.auth})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case qn.CONNECT:if(t.data&&t.data.sid){const o=t.data.sid;this.onconnect(o)}else this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case qn.EVENT:case qn.BINARY_EVENT:this.onevent(t);break;case qn.ACK:case qn.BINARY_ACK:this.onack(t);break;case qn.DISCONNECT:this.ondisconnect();break;case qn.CONNECT_ERROR:this.destroy();const i=new Error(t.data.message);i.data=t.data.data,this.emitReserved("connect_error",i);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const i of n)i.apply(this,t)}super.emit.apply(this,t)}ack(t){const n=this;let i=!1;return function(...o){i||(i=!0,n.packet({type:qn.ACK,id:t,data:o}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(n.apply(this,t.data),delete this.acks[t.id])}onconnect(t){this.id=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:qn.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let i=0;i0&&e.jitter<=1?e.jitter:0,this.attempts=0}xv.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};xv.prototype.reset=function(){this.attempts=0};xv.prototype.setMin=function(e){this.ms=e};xv.prototype.setMax=function(e){this.max=e};xv.prototype.setJitter=function(e){this.jitter=e};class kA extends ha{constructor(t,n){var i;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,LC(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((i=n.randomizationFactor)!==null&&i!==void 0?i:.5),this.backoff=new xv({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const o=n.parser||xme;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new $f(this.uri,this.opts);const n=this.engine,i=this;this._readyState="opening",this.skipReconnect=!1;const o=Tl(n,"open",function(){i.onopen(),t&&t()}),c=Tl(n,"error",u=>{i.cleanup(),i._readyState="closed",this.emitReserved("error",u),t?t(u):i.maybeReconnectOnOpen()});if(this._timeout!==!1){const u=this._timeout;u===0&&o();const m=this.setTimeoutFn(()=>{o(),n.close(),n.emit("error",new Error("timeout"))},u);this.opts.autoUnref&&m.unref(),this.subs.push(function(){clearTimeout(m)})}return this.subs.push(o),this.subs.push(c),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Tl(t,"ping",this.onping.bind(this)),Tl(t,"data",this.ondata.bind(this)),Tl(t,"error",this.onerror.bind(this)),Tl(t,"close",this.onclose.bind(this)),Tl(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch{this.onclose("parse error")}}ondecoded(t){this.emitReserved("packet",t)}onerror(t){this.emitReserved("error",t)}socket(t,n){let i=this.nsps[t];return i||(i=new Az(this,t,n),this.nsps[t]=i),i}_destroy(t){const n=Object.keys(this.nsps);for(const i of n)if(this.nsps[i].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let i=0;it()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const i=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(o=>{o?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",o)):t.onreconnect()}))},n);this.opts.autoUnref&&i.unref(),this.subs.push(function(){clearTimeout(i)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const $0={};function o2(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=fme(e,t.path||"/socket.io"),i=n.source,o=n.id,c=n.path,u=$0[o]&&c in $0[o].nsps,m=t.forceNew||t["force new connection"]||t.multiplex===!1||u;let h;return m?h=new kA(i,t):($0[o]||($0[o]=new kA(i,t)),h=$0[o]),n.query&&!t.query&&(t.query=n.queryKey),h.socket(n.path,t)}Object.assign(o2,{Manager:kA,Socket:Az,io:o2,connect:o2});let zx;const wme=new Uint8Array(16);function Nme(){if(!zx&&(zx=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!zx))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return zx(wme)}const di=[];for(let e=0;e<256;++e)di.push((e+256).toString(16).slice(1));function Eme(e,t=0){return(di[e[t+0]]+di[e[t+1]]+di[e[t+2]]+di[e[t+3]]+"-"+di[e[t+4]]+di[e[t+5]]+"-"+di[e[t+6]]+di[e[t+7]]+"-"+di[e[t+8]]+di[e[t+9]]+"-"+di[e[t+10]]+di[e[t+11]]+di[e[t+12]]+di[e[t+13]]+di[e[t+14]]+di[e[t+15]]).toLowerCase()}const _me=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),TI={randomUUID:_me};function j0(e,t,n){if(TI.randomUUID&&!t&&!e)return TI.randomUUID();e=e||{};const i=e.random||(e.rng||Nme)();if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,t){n=n||0;for(let o=0;o<16;++o)t[n+o]=i[o];return t}return Eme(i)}var Tme=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,Rme=/\b(?:[A-Z]{1,3}[A-Z][TC])(?:[-+]\d{4})?|((?:Australian )?(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time)\b/g,Ame=/[^-+\dA-Z]/g;function to(e,t,n,i){if(arguments.length===1&&typeof e=="string"&&!/\d/.test(e)&&(t=e,e=void 0),e=e||e===0?e:new Date,e instanceof Date||(e=new Date(e)),isNaN(e))throw TypeError("Invalid date");t=String(RI[t]||t||RI.default);var o=t.slice(0,4);(o==="UTC:"||o==="GMT:")&&(t=t.slice(4),n=!0,o==="GMT:"&&(i=!0));var c=function(){return n?"getUTC":"get"},u=function(){return e[c()+"Date"]()},m=function(){return e[c()+"Day"]()},h=function(){return e[c()+"Month"]()},v=function(){return e[c()+"FullYear"]()},b=function(){return e[c()+"Hours"]()},x=function(){return e[c()+"Minutes"]()},w=function(){return e[c()+"Seconds"]()},N=function(){return e[c()+"Milliseconds"]()},R=function(){return n?0:e.getTimezoneOffset()},O=function(){return kme(e)},M=function(){return Ome(e)},B={d:function(){return u()},dd:function(){return Zo(u())},ddd:function(){return bo.dayNames[m()]},DDD:function(){return AI({y:v(),m:h(),d:u(),_:c(),dayName:bo.dayNames[m()],short:!0})},dddd:function(){return bo.dayNames[m()+7]},DDDD:function(){return AI({y:v(),m:h(),d:u(),_:c(),dayName:bo.dayNames[m()+7]})},m:function(){return h()+1},mm:function(){return Zo(h()+1)},mmm:function(){return bo.monthNames[h()]},mmmm:function(){return bo.monthNames[h()+12]},yy:function(){return String(v()).slice(2)},yyyy:function(){return Zo(v(),4)},h:function(){return b()%12||12},hh:function(){return Zo(b()%12||12)},H:function(){return b()},HH:function(){return Zo(b())},M:function(){return x()},MM:function(){return Zo(x())},s:function(){return w()},ss:function(){return Zo(w())},l:function(){return Zo(N(),3)},L:function(){return Zo(Math.floor(N()/10))},t:function(){return b()<12?bo.timeNames[0]:bo.timeNames[1]},tt:function(){return b()<12?bo.timeNames[2]:bo.timeNames[3]},T:function(){return b()<12?bo.timeNames[4]:bo.timeNames[5]},TT:function(){return b()<12?bo.timeNames[6]:bo.timeNames[7]},Z:function(){return i?"GMT":n?"UTC":Dme(e)},o:function(){return(R()>0?"-":"+")+Zo(Math.floor(Math.abs(R())/60)*100+Math.abs(R())%60,4)},p:function(){return(R()>0?"-":"+")+Zo(Math.floor(Math.abs(R())/60),2)+":"+Zo(Math.floor(Math.abs(R())%60),2)},S:function(){return["th","st","nd","rd"][u()%10>3?0:(u()%100-u()%10!=10)*u()%10]},W:function(){return O()},WW:function(){return Zo(O())},N:function(){return M()}};return t.replace(Tme,function(I){return I in B?B[I]():I.slice(1,I.length-1)})}var RI={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",paddedShortDate:"mm/dd/yyyy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},bo={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],timeNames:["a","p","am","pm","A","P","AM","PM"]},Zo=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;return String(t).padStart(n,"0")},AI=function(t){var n=t.y,i=t.m,o=t.d,c=t._,u=t.dayName,m=t.short,h=m===void 0?!1:m,v=new Date,b=new Date;b.setDate(b[c+"Date"]()-1);var x=new Date;x.setDate(x[c+"Date"]()+1);var w=function(){return v[c+"Date"]()},N=function(){return v[c+"Month"]()},R=function(){return v[c+"FullYear"]()},O=function(){return b[c+"Date"]()},M=function(){return b[c+"Month"]()},B=function(){return b[c+"FullYear"]()},I=function(){return x[c+"Date"]()},F=function(){return x[c+"Month"]()},z=function(){return x[c+"FullYear"]()};return R()===n&&N()===i&&w()===o?h?"Tdy":"Today":B()===n&&M()===i&&O()===o?h?"Ysd":"Yesterday":z()===n&&F()===i&&I()===o?h?"Tmw":"Tomorrow":u},kme=function(t){var n=new Date(t.getFullYear(),t.getMonth(),t.getDate());n.setDate(n.getDate()-(n.getDay()+6)%7+3);var i=new Date(n.getFullYear(),0,4);i.setDate(i.getDate()-(i.getDay()+6)%7+3);var o=n.getTimezoneOffset()-i.getTimezoneOffset();n.setHours(n.getHours()-o);var c=(n-i)/(864e5*7);return 1+Math.floor(c)},Ome=function(t){var n=t.getDay();return n===0&&(n=7),n},Dme=function(t){return(String(t).match(Rme)||[""]).pop().replace(Ame,"").replace(/GMT\+0000/g,"UTC")};const kz=ro("socketio/generateImage"),Pme=ro("socketio/runESRGAN"),Mme=ro("socketio/runGFPGAN"),Ime=ro("socketio/deleteImage"),Lme=ro("socketio/requestImages"),Fme=ro("socketio/requestNewImages"),zme=ro("socketio/cancelProcessing"),Bme=ro("socketio/uploadInitialImage"),Ume=ro("socketio/uploadMaskImage"),$me=ro("socketio/requestSystemConfig"),jme=e=>{const{dispatch:t,getState:n}=e;return{onConnect:()=>{try{t(gI(!0)),t(yI("Connected")),t(Fme())}catch(i){console.error(i)}},onDisconnect:()=>{try{t(gI(!1)),t(yI("Disconnected")),t(eo({timestamp:to(new Date,"isoDateTime"),message:"Disconnected from server",level:"warning"}))}catch(i){console.error(i)}},onGenerationResult:i=>{try{const{url:o,mtime:c,metadata:u}=i,m=j0();t(Ix({uuid:m,url:o,mtime:c,metadata:u})),t(eo({timestamp:to(new Date,"isoDateTime"),message:`Image generated: ${o}`})),t(hc(!1))}catch(o){console.error(o)}},onIntermediateResult:i=>{try{const o=j0(),{url:c,metadata:u,mtime:m}=i;t(Npe({uuid:o,url:c,mtime:m,metadata:u})),t(eo({timestamp:to(new Date,"isoDateTime"),message:`Intermediate image generated: ${c}`})),t(hc(!1))}catch(o){console.error(o)}},onESRGANResult:i=>{try{const{url:o,metadata:c,mtime:u}=i;t(Ix({uuid:j0(),url:o,mtime:u,metadata:c})),t(eo({timestamp:to(new Date,"isoDateTime"),message:`Upscaled: ${o}`})),t(hc(!1))}catch(o){console.error(o)}},onGFPGANResult:i=>{try{const{url:o,metadata:c,mtime:u}=i;t(Ix({uuid:j0(),url:o,mtime:u,metadata:c})),t(eo({timestamp:to(new Date,"isoDateTime"),message:`Fixed faces: ${o}`}))}catch(o){console.error(o)}},onProgressUpdate:i=>{try{t(hc(!0)),t(Ope(i))}catch(o){console.error(o)}},onError:i=>{const{message:o,additionalData:c}=i;try{t(eo({timestamp:to(new Date,"isoDateTime"),message:`Server error: ${o}`,level:"error"})),t(hc(!1)),t(vI())}catch(u){console.error(u)}},onGalleryImages:i=>{const{images:o,nextPage:c,offset:u}=i,m=o.map(h=>{const{url:v,metadata:b,mtime:x}=h;return{uuid:j0(),url:v,mtime:x,metadata:b}});t(wpe({images:m,nextPage:c,offset:u})),t(eo({timestamp:to(new Date,"isoDateTime"),message:`Loaded ${o.length} images`}))},onProcessingCanceled:()=>{t(hc(!1));const{intermediateImage:i}=n().gallery;i&&(t(Ix(i)),t(eo({timestamp:to(new Date,"isoDateTime"),message:`Intermediate image saved: ${i.url}`})),t(vI())),t(eo({timestamp:to(new Date,"isoDateTime"),message:"Processing canceled",level:"warning"}))},onImageDeleted:i=>{const{url:o,uuid:c}=i;t(xpe(c)),t(eo({timestamp:to(new Date,"isoDateTime"),message:`Image deleted: ${o}`}))},onInitialImageUploaded:i=>{const{url:o}=i;t(IC(o)),t(eo({timestamp:to(new Date,"isoDateTime"),message:`Initial image uploaded: ${o}`}))},onMaskImageUploaded:i=>{const{url:o}=i;t(AO(o)),t(eo({timestamp:to(new Date,"isoDateTime"),message:`Mask image uploaded: ${o}`}))},onSystemConfig:i=>{t(Dpe(i))}}},Vme=["ddim","plms","k_lms","k_dpm_2","k_dpm_2_a","k_euler","k_euler_a","k_heun"],Hme=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024],Wme=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024],Gme=[{key:"2x",value:2},{key:"4x",value:4}],OA=0,DA=4294967295,Oz=(e,t)=>Math.floor(Math.random()*(t-e+1)+e),Yme=(e,t)=>{const{prompt:n,iterations:i,steps:o,cfgScale:c,height:u,width:m,sampler:h,seed:v,seamless:b,shouldUseInitImage:x,img2imgStrength:w,initialImagePath:N,maskPath:R,shouldFitToWidthHeight:O,shouldGenerateVariations:M,variationAmount:B,seedWeights:I,shouldRunESRGAN:F,upscalingLevel:z,upscalingStrength:$,shouldRunGFPGAN:q,gfpganStrength:K,shouldRandomizeSeed:le}=e,{shouldDisplayInProgress:me}=t,se={prompt:n,iterations:i,steps:o,cfg_scale:c,height:u,width:m,sampler_name:h,seed:v,seamless:b,progress_images:me};se.seed=le?Oz(OA,DA):v,x&&(se.init_img=N,se.strength=w,se.fit=O,R&&(se.init_mask=R)),M?(se.variation_amount=B,I&&(se.with_variations=upe(I))):se.variation_amount=0;let Se=!1,qe=!1;return F&&(Se={level:z,strength:$}),q&&(qe={strength:K}),{generationParameters:se,esrganParameters:Se,gfpganParameters:qe}},qme=(e,t)=>{const{dispatch:n,getState:i}=e;return{emitGenerateImage:()=>{n(hc(!0));const{generationParameters:o,esrganParameters:c,gfpganParameters:u}=Yme(i().options,i().system);t.emit("generateImage",o,c,u),n(eo({timestamp:to(new Date,"isoDateTime"),message:`Image generation requested: ${JSON.stringify({...o,...c,...u})}`}))},emitRunESRGAN:o=>{n(hc(!0));const{upscalingLevel:c,upscalingStrength:u}=i().options,m={upscale:[c,u]};t.emit("runESRGAN",o,m),n(eo({timestamp:to(new Date,"isoDateTime"),message:`ESRGAN upscale requested: ${JSON.stringify({file:o.url,...m})}`}))},emitRunGFPGAN:o=>{n(hc(!0));const{gfpganStrength:c}=i().options,u={gfpgan_strength:c};t.emit("runGFPGAN",o,u),n(eo({timestamp:to(new Date,"isoDateTime"),message:`GFPGAN fix faces requested: ${JSON.stringify({file:o.url,...u})}`}))},emitDeleteImage:o=>{const{url:c,uuid:u}=o;t.emit("deleteImage",c,u)},emitRequestImages:()=>{const{nextPage:o,offset:c}=i().gallery;t.emit("requestImages",o,c)},emitRequestNewImages:()=>{const{nextPage:o,offset:c,images:u}=i().gallery;u.length>0?t.emit("requestImages",o,c,u[0].mtime):t.emit("requestImages",o,c)},emitCancelProcessing:()=>{t.emit("cancel")},emitUploadInitialImage:o=>{t.emit("uploadInitialImage",o,o.name)},emitUploadMaskImage:o=>{t.emit("uploadMaskImage",o,o.name)},emitRequestSystemConfig:()=>{t.emit("requestSystemConfig")}}},Kme=()=>{const{hostname:e,port:t}=new URL(window.location.href),n=o2(`http://${e}:9090`,{timeout:6e4});let i=!1;return c=>u=>m=>{const{onConnect:h,onDisconnect:v,onError:b,onESRGANResult:x,onGFPGANResult:w,onGenerationResult:N,onIntermediateResult:R,onProgressUpdate:O,onGalleryImages:M,onProcessingCanceled:B,onImageDeleted:I,onInitialImageUploaded:F,onMaskImageUploaded:z,onSystemConfig:$}=jme(c),{emitGenerateImage:q,emitRunESRGAN:K,emitRunGFPGAN:le,emitDeleteImage:me,emitRequestImages:se,emitRequestNewImages:Se,emitCancelProcessing:qe,emitUploadInitialImage:ae,emitUploadMaskImage:ue,emitRequestSystemConfig:Ee}=qme(c,n);switch(i||(n.on("connect",()=>h()),n.on("disconnect",()=>v()),n.on("error",de=>b(de)),n.on("generationResult",de=>N(de)),n.on("esrganResult",de=>x(de)),n.on("gfpganResult",de=>w(de)),n.on("intermediateResult",de=>R(de)),n.on("progressUpdate",de=>O(de)),n.on("galleryImages",de=>M(de)),n.on("processingCanceled",()=>{B()}),n.on("imageDeleted",de=>{I(de)}),n.on("initialImageUploaded",de=>{F(de)}),n.on("maskImageUploaded",de=>{z(de)}),n.on("systemConfig",de=>{$(de)}),i=!0),m.type){case"socketio/generateImage":{q();break}case"socketio/runESRGAN":{K(m.payload);break}case"socketio/runGFPGAN":{le(m.payload);break}case"socketio/deleteImage":{me(m.payload);break}case"socketio/requestImages":{se();break}case"socketio/requestNewImages":{Se();break}case"socketio/cancelProcessing":{qe();break}case"socketio/uploadInitialImage":{ae(m.payload);break}case"socketio/uploadMaskImage":{ue(m.payload);break}case"socketio/requestSystemConfig":{Ee();break}}u(m)}},Xme={key:"root",storage:TO,blacklist:["gallery","system"]},Zme={key:"system",storage:TO,blacklist:["isConnected","isProcessing","currentStep","socketId","isESRGANAvailable","isGFPGANAvailable","currentStep","totalSteps","currentIteration","totalIterations","currentStatus"]},Qme=DF({options:bpe,gallery:Epe,system:ez(Zme,Mpe)}),Jme=ez(Xme,Qme),Dz=fde({reducer:Jme,middleware:e=>e({serializableCheck:!1}).concat(Kme())}),Ga=Dde,mr=Cde;function s2(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?s2=function(n){return typeof n}:s2=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},s2(e)}function ehe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kI(e,t){for(var n=0;n({textColor:e.colorMode==="dark"?"gray.800":"gray.100"})},Accordion:{baseStyle:e=>({button:{fontWeight:"bold",_hover:{bgColor:e.colorMode==="dark"?"rgba(255,255,255,0.05)":"rgba(0,0,0,0.05)"}},panel:{paddingBottom:2}})},FormLabel:{baseStyle:{fontWeight:"light"}},Button:{variants:{imageHoverIconButton:e=>({bg:e.colorMode==="dark"?"blackAlpha.700":"whiteAlpha.800",color:e.colorMode==="dark"?"whiteAlpha.700":"blackAlpha.700",_hover:{bg:e.colorMode==="dark"?"blackAlpha.800":"whiteAlpha.800",color:e.colorMode==="dark"?"whiteAlpha.900":"blackAlpha.900"}})}}}});var DI="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/Loading.tsx";const Mz=()=>_(Sn,{width:"100vw",height:"100vh",alignItems:"center",justifyContent:"center",children:_(wC,{thickness:"2px",speed:"1s",emptyColor:"gray.200",color:"gray.400",size:"xl"},void 0,!1,{fileName:DI,lineNumber:11,columnNumber:13},void 0)},void 0,!1,{fileName:DI,lineNumber:5,columnNumber:9},void 0);var qh="/Users/spencer/Documents/Code/stable-diffusion/frontend/node_modules/@chakra-ui/icons/node_modules/@chakra-ui/icon/dist/index.esm.js",PI={path:_("g",{stroke:"currentColor",strokeWidth:"1.5",children:[_("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"},void 0,!1,{fileName:qh,lineNumber:14,columnNumber:22},globalThis),_("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"},void 0,!1,{fileName:qh,lineNumber:18,columnNumber:23},globalThis),_("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"},void 0,!1,{fileName:qh,lineNumber:22,columnNumber:23},globalThis)]},void 0,!0,{fileName:qh,lineNumber:11,columnNumber:25},globalThis),viewBox:"0 0 24 24"},Iz=Xe((e,t)=>{const{as:n,viewBox:i,color:o="currentColor",focusable:c=!1,children:u,className:m,__css:h,...v}=e,b=qr("chakra-icon",m),x={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:o,...h},w={ref:t,focusable:c,className:b,__css:x},N=i??PI.viewBox;if(n&&typeof n!="string")return Pe.createElement($e.svg,{as:n,...w,...v});const R=u??PI.path;return Pe.createElement($e.svg,{verticalAlign:"middle",viewBox:N,...w,...v},R)});Iz.displayName="Icon";function Et(e){const{viewBox:t="0 0 24 24",d:n,displayName:i,defaultProps:o={}}=e,c=k.exports.Children.toArray(e.path),u=Xe((m,h)=>_(Iz,{ref:h,viewBox:t,...o,...m,children:c.length?c:_("path",{fill:"currentColor",d:n},void 0,!1,{fileName:qh,lineNumber:93,columnNumber:43},this)},void 0,!1,{fileName:qh,lineNumber:88,columnNumber:60},this));return u.displayName=i,u}var dt="/Users/spencer/Documents/Code/stable-diffusion/frontend/node_modules/@chakra-ui/icons/dist/index.esm.js";Et({d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z",displayName:"CopyIcon"});Et({d:"M23.384,21.619,16.855,15.09a9.284,9.284,0,1,0-1.768,1.768l6.529,6.529a1.266,1.266,0,0,0,1.768,0A1.251,1.251,0,0,0,23.384,21.619ZM2.75,9.5a6.75,6.75,0,1,1,6.75,6.75A6.758,6.758,0,0,1,2.75,9.5Z",displayName:"SearchIcon"});Et({d:"M23.414,20.591l-4.645-4.645a10.256,10.256,0,1,0-2.828,2.829l4.645,4.644a2.025,2.025,0,0,0,2.828,0A2,2,0,0,0,23.414,20.591ZM10.25,3.005A7.25,7.25,0,1,1,3,10.255,7.258,7.258,0,0,1,10.25,3.005Z",displayName:"Search2Icon"});Et({d:"M21.4,13.7C20.6,13.9,19.8,14,19,14c-5,0-9-4-9-9c0-0.8,0.1-1.6,0.3-2.4c0.1-0.3,0-0.7-0.3-1 c-0.3-0.3-0.6-0.4-1-0.3C4.3,2.7,1,7.1,1,12c0,6.1,4.9,11,11,11c4.9,0,9.3-3.3,10.6-8.1c0.1-0.3,0-0.7-0.3-1 C22.1,13.7,21.7,13.6,21.4,13.7z",displayName:"MoonIcon"});Et({displayName:"SunIcon",path:_("g",{strokeLinejoin:"round",strokeLinecap:"round",strokeWidth:"2",fill:"none",stroke:"currentColor",children:[_("circle",{cx:"12",cy:"12",r:"5"},void 0,!1,{fileName:dt,lineNumber:42,columnNumber:22},globalThis),_("path",{d:"M12 1v2"},void 0,!1,{fileName:dt,lineNumber:46,columnNumber:23},globalThis),_("path",{d:"M12 21v2"},void 0,!1,{fileName:dt,lineNumber:48,columnNumber:23},globalThis),_("path",{d:"M4.22 4.22l1.42 1.42"},void 0,!1,{fileName:dt,lineNumber:50,columnNumber:23},globalThis),_("path",{d:"M18.36 18.36l1.42 1.42"},void 0,!1,{fileName:dt,lineNumber:52,columnNumber:23},globalThis),_("path",{d:"M1 12h2"},void 0,!1,{fileName:dt,lineNumber:54,columnNumber:23},globalThis),_("path",{d:"M21 12h2"},void 0,!1,{fileName:dt,lineNumber:56,columnNumber:23},globalThis),_("path",{d:"M4.22 19.78l1.42-1.42"},void 0,!1,{fileName:dt,lineNumber:58,columnNumber:23},globalThis),_("path",{d:"M18.36 5.64l1.42-1.42"},void 0,!1,{fileName:dt,lineNumber:60,columnNumber:23},globalThis)]},void 0,!0,{fileName:dt,lineNumber:36,columnNumber:25},globalThis)});Et({d:"M0,12a1.5,1.5,0,0,0,1.5,1.5h8.75a.25.25,0,0,1,.25.25V22.5a1.5,1.5,0,0,0,3,0V13.75a.25.25,0,0,1,.25-.25H22.5a1.5,1.5,0,0,0,0-3H13.75a.25.25,0,0,1-.25-.25V1.5a1.5,1.5,0,0,0-3,0v8.75a.25.25,0,0,1-.25.25H1.5A1.5,1.5,0,0,0,0,12Z",displayName:"AddIcon"});Et({displayName:"SmallAddIcon",viewBox:"0 0 20 20",path:_("path",{fill:"currentColor",d:"M14 9h-3V6c0-.55-.45-1-1-1s-1 .45-1 1v3H6c-.55 0-1 .45-1 1s.45 1 1 1h3v3c0 .55.45 1 1 1s1-.45 1-1v-3h3c.55 0 1-.45 1-1s-.45-1-1-1z",fillRule:"evenodd"},void 0,!1,{fileName:dt,lineNumber:77,columnNumber:25},globalThis)});Et({viewBox:"0 0 14 14",d:"M14,7.77 L14,6.17 L12.06,5.53 L11.61,4.44 L12.49,2.6 L11.36,1.47 L9.55,2.38 L8.46,1.93 L7.77,0.01 L6.17,0.01 L5.54,1.95 L4.43,2.4 L2.59,1.52 L1.46,2.65 L2.37,4.46 L1.92,5.55 L0,6.23 L0,7.82 L1.94,8.46 L2.39,9.55 L1.51,11.39 L2.64,12.52 L4.45,11.61 L5.54,12.06 L6.23,13.98 L7.82,13.98 L8.45,12.04 L9.56,11.59 L11.4,12.47 L12.53,11.34 L11.61,9.53 L12.08,8.44 L14,7.75 L14,7.77 Z M7,10 C5.34,10 4,8.66 4,7 C4,5.34 5.34,4 7,4 C8.66,4 10,5.34 10,7 C10,8.66 8.66,10 7,10 Z",displayName:"SettingsIcon"});Et({displayName:"CheckCircleIcon",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"});Et({d:"M19.5,9.5h-.75V6.75a6.75,6.75,0,0,0-13.5,0V9.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5ZM7.75,6.75a4.25,4.25,0,0,1,8.5,0V9a.5.5,0,0,1-.5.5H8.25a.5.5,0,0,1-.5-.5Z",displayName:"LockIcon"});Et({d:"M19.5,9.5h-.75V6.75A6.751,6.751,0,0,0,5.533,4.811a1.25,1.25,0,1,0,2.395.717A4.251,4.251,0,0,1,16.25,6.75V9a.5.5,0,0,1-.5.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5Z",displayName:"UnlockIcon"});Et({displayName:"ViewIcon",path:_("g",{fill:"currentColor",children:[_("path",{d:"M23.432,10.524C20.787,7.614,16.4,4.538,12,4.6,7.6,4.537,3.213,7.615.568,10.524a2.211,2.211,0,0,0,0,2.948C3.182,16.351,7.507,19.4,11.839,19.4h.308c4.347,0,8.671-3.049,11.288-5.929A2.21,2.21,0,0,0,23.432,10.524ZM7.4,12A4.6,4.6,0,1,1,12,16.6,4.6,4.6,0,0,1,7.4,12Z"},void 0,!1,{fileName:dt,lineNumber:119,columnNumber:22},globalThis),_("circle",{cx:"12",cy:"12",r:"2"},void 0,!1,{fileName:dt,lineNumber:121,columnNumber:23},globalThis)]},void 0,!0,{fileName:dt,lineNumber:117,columnNumber:25},globalThis)});Et({displayName:"ViewOffIcon",path:_("g",{fill:"currentColor",children:[_("path",{d:"M23.2,10.549a20.954,20.954,0,0,0-4.3-3.6l4-3.995a1,1,0,1,0-1.414-1.414l-.018.018a.737.737,0,0,1-.173.291l-19.5,19.5c-.008.007-.018.009-.026.017a1,1,0,0,0,1.631,1.088l4.146-4.146a11.26,11.26,0,0,0,4.31.939h.3c4.256,0,8.489-2.984,11.051-5.8A2.171,2.171,0,0,0,23.2,10.549ZM16.313,13.27a4.581,4.581,0,0,1-3,3.028,4.3,4.3,0,0,1-3.1-.19.253.253,0,0,1-.068-.407l5.56-5.559a.252.252,0,0,1,.407.067A4.3,4.3,0,0,1,16.313,13.27Z"},void 0,!1,{fileName:dt,lineNumber:134,columnNumber:22},globalThis),_("path",{d:"M7.615,13.4a.244.244,0,0,0,.061-.24A4.315,4.315,0,0,1,7.5,12,4.5,4.5,0,0,1,12,7.5a4.276,4.276,0,0,1,1.16.173.244.244,0,0,0,.24-.062l1.941-1.942a.254.254,0,0,0-.1-.421A10.413,10.413,0,0,0,12,4.75C7.7,4.692,3.4,7.7.813,10.549a2.15,2.15,0,0,0-.007,2.9,21.209,21.209,0,0,0,3.438,3.03.256.256,0,0,0,.326-.029Z"},void 0,!1,{fileName:dt,lineNumber:136,columnNumber:23},globalThis)]},void 0,!0,{fileName:dt,lineNumber:132,columnNumber:25},globalThis)});Et({d:"M11.2857,6.05714 L10.08571,4.85714 L7.85714,7.14786 L7.85714,1 L6.14286,1 L6.14286,7.14786 L3.91429,4.85714 L2.71429,6.05714 L7,10.42857 L11.2857,6.05714 Z M1,11.2857 L1,13 L13,13 L13,11.2857 L1,11.2857 Z",displayName:"DownloadIcon",viewBox:"0 0 14 14"});Et({displayName:"DeleteIcon",path:_("g",{fill:"currentColor",children:_("path",{d:"M19.452 7.5H4.547a.5.5 0 00-.5.545l1.287 14.136A2 2 0 007.326 24h9.347a2 2 0 001.992-1.819L19.95 8.045a.5.5 0 00-.129-.382.5.5 0 00-.369-.163zm-9.2 13a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zm5 0a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zM22 4h-4.75a.25.25 0 01-.25-.25V2.5A2.5 2.5 0 0014.5 0h-5A2.5 2.5 0 007 2.5v1.25a.25.25 0 01-.25.25H2a1 1 0 000 2h20a1 1 0 000-2zM9 3.75V2.5a.5.5 0 01.5-.5h5a.5.5 0 01.5.5v1.25a.25.25 0 01-.25.25h-5.5A.25.25 0 019 3.75z"},void 0,!1,{fileName:dt,lineNumber:155,columnNumber:22},globalThis)},void 0,!1,{fileName:dt,lineNumber:153,columnNumber:25},globalThis)});Et({displayName:"RepeatIcon",path:_("g",{fill:"currentColor",children:[_("path",{d:"M10.319,4.936a7.239,7.239,0,0,1,7.1,2.252,1.25,1.25,0,1,0,1.872-1.657A9.737,9.737,0,0,0,9.743,2.5,10.269,10.269,0,0,0,2.378,9.61a.249.249,0,0,1-.271.178l-1.033-.13A.491.491,0,0,0,.6,9.877a.5.5,0,0,0-.019.526l2.476,4.342a.5.5,0,0,0,.373.248.43.43,0,0,0,.062,0,.5.5,0,0,0,.359-.152l3.477-3.593a.5.5,0,0,0-.3-.844L5.15,10.172a.25.25,0,0,1-.2-.333A7.7,7.7,0,0,1,10.319,4.936Z"},void 0,!1,{fileName:dt,lineNumber:166,columnNumber:22},globalThis),_("path",{d:"M23.406,14.1a.5.5,0,0,0,.015-.526l-2.5-4.329A.5.5,0,0,0,20.546,9a.489.489,0,0,0-.421.151l-3.456,3.614a.5.5,0,0,0,.3.842l1.848.221a.249.249,0,0,1,.183.117.253.253,0,0,1,.023.216,7.688,7.688,0,0,1-5.369,4.9,7.243,7.243,0,0,1-7.1-2.253,1.25,1.25,0,1,0-1.872,1.656,9.74,9.74,0,0,0,9.549,3.03,10.261,10.261,0,0,0,7.369-7.12.251.251,0,0,1,.27-.179l1.058.127a.422.422,0,0,0,.06,0A.5.5,0,0,0,23.406,14.1Z"},void 0,!1,{fileName:dt,lineNumber:168,columnNumber:23},globalThis)]},void 0,!0,{fileName:dt,lineNumber:164,columnNumber:25},globalThis)});Et({displayName:"RepeatClockIcon",path:_("g",{fill:"currentColor",children:[_("path",{d:"M12.965,6a1,1,0,0,0-1,1v5.5a1,1,0,0,0,1,1h5a1,1,0,0,0,0-2h-3.75a.25.25,0,0,1-.25-.25V7A1,1,0,0,0,12.965,6Z"},void 0,!1,{fileName:dt,lineNumber:179,columnNumber:22},globalThis),_("path",{d:"M12.567,1.258A10.822,10.822,0,0,0,2.818,8.4a.25.25,0,0,1-.271.163L.858,8.309a.514.514,0,0,0-.485.213.5.5,0,0,0-.021.53l2.679,4.7a.5.5,0,0,0,.786.107l3.77-3.746a.5.5,0,0,0-.279-.85L5.593,9.007a.25.25,0,0,1-.192-.35,8.259,8.259,0,1,1,7.866,11.59,1.25,1.25,0,0,0,.045,2.5h.047a10.751,10.751,0,1,0-.792-21.487Z"},void 0,!1,{fileName:dt,lineNumber:181,columnNumber:23},globalThis)]},void 0,!0,{fileName:dt,lineNumber:177,columnNumber:25},globalThis)});Et({displayName:"EditIcon",path:_("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[_("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"},void 0,!1,{fileName:dt,lineNumber:195,columnNumber:22},globalThis),_("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"},void 0,!1,{fileName:dt,lineNumber:197,columnNumber:23},globalThis)]},void 0,!0,{fileName:dt,lineNumber:190,columnNumber:25},globalThis)});Et({d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z",displayName:"ChevronLeftIcon"});Et({d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z",displayName:"ChevronRightIcon"});Et({displayName:"ChevronDownIcon",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"});Et({d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z",displayName:"ChevronUpIcon"});Et({d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z",displayName:"ArrowBackIcon"});Et({d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z",displayName:"ArrowForwardIcon"});Et({d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z",displayName:"ArrowUpIcon"});Et({viewBox:"0 0 16 16",d:"M11.891 9.992a1 1 0 1 1 1.416 1.415l-4.3 4.3a1 1 0 0 1-1.414 0l-4.3-4.3A1 1 0 0 1 4.71 9.992l3.59 3.591 3.591-3.591zm0-3.984L8.3 2.417 4.709 6.008a1 1 0 0 1-1.416-1.415l4.3-4.3a1 1 0 0 1 1.414 0l4.3 4.3a1 1 0 1 1-1.416 1.415z",displayName:"ArrowUpDownIcon"});Et({d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z",displayName:"ArrowDownIcon"});var Lz=Et({displayName:"ExternalLinkIcon",path:_("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[_("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"},void 0,!1,{fileName:dt,lineNumber:275,columnNumber:22},globalThis),_("path",{d:"M15 3h6v6"},void 0,!1,{fileName:dt,lineNumber:277,columnNumber:23},globalThis),_("path",{d:"M10 14L21 3"},void 0,!1,{fileName:dt,lineNumber:279,columnNumber:23},globalThis)]},void 0,!0,{fileName:dt,lineNumber:270,columnNumber:25},globalThis)});Et({displayName:"LinkIcon",path:_("g",{fill:"currentColor",children:[_("path",{d:"M10.458,18.374,7.721,21.11a2.853,2.853,0,0,1-3.942,0l-.892-.891a2.787,2.787,0,0,1,0-3.941l5.8-5.8a2.789,2.789,0,0,1,3.942,0l.893.892A1,1,0,0,0,14.94,9.952l-.893-.892a4.791,4.791,0,0,0-6.771,0l-5.8,5.8a4.787,4.787,0,0,0,0,6.77l.892.891a4.785,4.785,0,0,0,6.771,0l2.736-2.735a1,1,0,1,0-1.414-1.415Z"},void 0,!1,{fileName:dt,lineNumber:290,columnNumber:22},globalThis),_("path",{d:"M22.526,2.363l-.892-.892a4.8,4.8,0,0,0-6.77,0l-2.905,2.9a1,1,0,0,0,1.414,1.414l2.9-2.9a2.79,2.79,0,0,1,3.941,0l.893.893a2.786,2.786,0,0,1,0,3.942l-5.8,5.8a2.769,2.769,0,0,1-1.971.817h0a2.766,2.766,0,0,1-1.969-.816,1,1,0,1,0-1.415,1.412,4.751,4.751,0,0,0,3.384,1.4h0a4.752,4.752,0,0,0,3.385-1.4l5.8-5.8a4.786,4.786,0,0,0,0-6.771Z"},void 0,!1,{fileName:dt,lineNumber:292,columnNumber:23},globalThis)]},void 0,!0,{fileName:dt,lineNumber:288,columnNumber:25},globalThis)});Et({displayName:"PlusSquareIcon",path:_("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[_("rect",{height:"18",width:"18",rx:"2",ry:"2",x:"3",y:"3"},void 0,!1,{fileName:dt,lineNumber:306,columnNumber:22},globalThis),_("path",{d:"M12 8v8"},void 0,!1,{fileName:dt,lineNumber:313,columnNumber:23},globalThis),_("path",{d:"M8 12h8"},void 0,!1,{fileName:dt,lineNumber:315,columnNumber:23},globalThis)]},void 0,!0,{fileName:dt,lineNumber:301,columnNumber:25},globalThis)});Et({displayName:"CalendarIcon",viewBox:"0 0 14 14",d:"M10.8889,5.5 L3.11111,5.5 L3.11111,7.05556 L10.8889,7.05556 L10.8889,5.5 Z M12.4444,1.05556 L11.6667,1.05556 L11.6667,0 L10.1111,0 L10.1111,1.05556 L3.88889,1.05556 L3.88889,0 L2.33333,0 L2.33333,1.05556 L1.55556,1.05556 C0.692222,1.05556 0.00777777,1.75556 0.00777777,2.61111 L0,12.5 C0,13.3556 0.692222,14 1.55556,14 L12.4444,14 C13.3,14 14,13.3556 14,12.5 L14,2.61111 C14,1.75556 13.3,1.05556 12.4444,1.05556 Z M12.4444,12.5 L1.55556,12.5 L1.55556,3.94444 L12.4444,3.94444 L12.4444,12.5 Z M8.55556,8.61111 L3.11111,8.61111 L3.11111,10.1667 L8.55556,10.1667 L8.55556,8.61111 Z"});Et({d:"M0.913134,0.920639 C1.49851,0.331726 2.29348,0 3.12342,0 L10.8766,0 C11.7065,0 12.5015,0.331725 13.0869,0.920639 C13.6721,1.50939 14,2.30689 14,3.13746 L14,8.12943 C13.9962,8.51443 13.9059,8.97125 13.7629,9.32852 C13.6128,9.683 13.3552,10.0709 13.0869,10.3462 C12.813,10.6163 12.4265,10.8761 12.0734,11.0274 C11.7172,11.1716 11.2607,11.263 10.8766,11.2669 L10.1234,11.2669 L10.1234,12.5676 L10.1209,12.5676 C10.1204,12.793 10.0633,13.0791 9.97807,13.262 C9.8627,13.466 9.61158,13.7198 9.40818,13.8382 L9.40824,13.8383 C9.4077,13.8386 9.40716,13.8388 9.40661,13.8391 C9.40621,13.8393 9.4058,13.8396 9.40539,13.8398 L9.40535,13.8397 C9.22958,13.9254 8.94505,13.9951 8.75059,14 L8.74789,14 C8.35724,13.9963 7.98473,13.8383 7.71035,13.5617 L5.39553,11.2669 L3.12342,11.2669 C2.29348,11.2669 1.49851,10.9352 0.913134,10.3462 C0.644826,10.0709 0.387187,9.683 0.23711,9.32852 C0.0941235,8.97125 0.00379528,8.51443 0,8.12943 L0,3.13746 C0,2.30689 0.327915,1.50939 0.913134,0.920639 Z M3.12342,1.59494 C2.71959,1.59494 2.33133,1.75628 2.04431,2.04503 C1.75713,2.33395 1.59494,2.72681 1.59494,3.13746 L1.59494,8.12943 C1.59114,8.35901 1.62114,8.51076 1.71193,8.72129 C1.79563,8.9346 1.88065,9.06264 2.04431,9.22185 C2.33133,9.5106 2.71959,9.67195 3.12342,9.67195 L5.72383,9.67195 C5.93413,9.67195 6.13592,9.75502 6.28527,9.90308 L8.52848,12.1269 L8.52848,10.4694 C8.52848,10.029 8.88552,9.67195 9.32595,9.67195 L10.8766,9.67195 C11.1034,9.67583 11.2517,9.64614 11.4599,9.55518 C11.6712,9.47132 11.7976,9.38635 11.9557,9.22185 C12.1193,9.06264 12.2044,8.9346 12.2881,8.72129 C12.3789,8.51076 12.4089,8.35901 12.4051,8.12943 L12.4051,3.13746 C12.4051,2.72681 12.2429,2.33394 11.9557,2.04503 C11.6687,1.75628 11.2804,1.59494 10.8766,1.59494 L3.12342,1.59494 Z",displayName:"ChatIcon",viewBox:"0 0 14 14"});Et({displayName:"TimeIcon",path:_("g",{fill:"currentColor",children:[_("path",{d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm0,22A10,10,0,1,1,22,12,10.011,10.011,0,0,1,12,22Z"},void 0,!1,{fileName:dt,lineNumber:342,columnNumber:22},globalThis),_("path",{d:"M17.134,15.81,12.5,11.561V6.5a1,1,0,0,0-2,0V12a1,1,0,0,0,.324.738l4.959,4.545a1.01,1.01,0,0,0,1.413-.061A1,1,0,0,0,17.134,15.81Z"},void 0,!1,{fileName:dt,lineNumber:344,columnNumber:23},globalThis)]},void 0,!0,{fileName:dt,lineNumber:340,columnNumber:25},globalThis)});Et({displayName:"ArrowRightIcon",path:_("g",{fill:"currentColor",children:[_("path",{d:"M13.584,12a2.643,2.643,0,0,1-.775,1.875L3.268,23.416a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L.768,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,13.584,12Z"},void 0,!1,{fileName:dt,lineNumber:355,columnNumber:22},globalThis),_("path",{d:"M23.75,12a2.643,2.643,0,0,1-.775,1.875l-9.541,9.541a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L10.934,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,23.75,12Z"},void 0,!1,{fileName:dt,lineNumber:357,columnNumber:23},globalThis)]},void 0,!0,{fileName:dt,lineNumber:353,columnNumber:25},globalThis)});Et({displayName:"ArrowLeftIcon",path:_("g",{fill:"currentColor",children:[_("path",{d:"M10.416,12a2.643,2.643,0,0,1,.775-1.875L20.732.584a1.768,1.768,0,0,1,2.5,2.5l-8.739,8.739a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5l-9.541-9.541A2.643,2.643,0,0,1,10.416,12Z"},void 0,!1,{fileName:dt,lineNumber:368,columnNumber:22},globalThis),_("path",{d:"M.25,12a2.643,2.643,0,0,1,.775-1.875L10.566.584a1.768,1.768,0,0,1,2.5,2.5L4.327,11.823a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5L1.025,13.875A2.643,2.643,0,0,1,.25,12Z"},void 0,!1,{fileName:dt,lineNumber:370,columnNumber:23},globalThis)]},void 0,!0,{fileName:dt,lineNumber:366,columnNumber:25},globalThis)});Et({displayName:"AtSignIcon",d:"M12,.5A11.634,11.634,0,0,0,.262,12,11.634,11.634,0,0,0,12,23.5a11.836,11.836,0,0,0,6.624-2,1.25,1.25,0,1,0-1.393-2.076A9.34,9.34,0,0,1,12,21a9.132,9.132,0,0,1-9.238-9A9.132,9.132,0,0,1,12,3a9.132,9.132,0,0,1,9.238,9v.891a1.943,1.943,0,0,1-3.884,0V12A5.355,5.355,0,1,0,12,17.261a5.376,5.376,0,0,0,3.861-1.634,4.438,4.438,0,0,0,7.877-2.736V12A11.634,11.634,0,0,0,12,.5Zm0,14.261A2.763,2.763,0,1,1,14.854,12,2.812,2.812,0,0,1,12,14.761Z"});Et({displayName:"AttachmentIcon",d:"M21.843,3.455a6.961,6.961,0,0,0-9.846,0L1.619,13.832a5.128,5.128,0,0,0,7.252,7.252L17.3,12.653A3.293,3.293,0,1,0,12.646,8L7.457,13.184A1,1,0,1,0,8.871,14.6L14.06,9.409a1.294,1.294,0,0,1,1.829,1.83L7.457,19.67a3.128,3.128,0,0,1-4.424-4.424L13.411,4.869a4.962,4.962,0,1,1,7.018,7.018L12.646,19.67a1,1,0,1,0,1.414,1.414L21.843,13.3a6.96,6.96,0,0,0,0-9.846Z"});Et({displayName:"UpDownIcon",viewBox:"-1 -1 9 11",d:"M 3.5 0L 3.98809 -0.569442L 3.5 -0.987808L 3.01191 -0.569442L 3.5 0ZM 3.5 9L 3.01191 9.56944L 3.5 9.98781L 3.98809 9.56944L 3.5 9ZM 0.488094 3.56944L 3.98809 0.569442L 3.01191 -0.569442L -0.488094 2.43056L 0.488094 3.56944ZM 3.01191 0.569442L 6.51191 3.56944L 7.48809 2.43056L 3.98809 -0.569442L 3.01191 0.569442ZM -0.488094 6.56944L 3.01191 9.56944L 3.98809 8.43056L 0.488094 5.43056L -0.488094 6.56944ZM 3.98809 9.56944L 7.48809 6.56944L 6.51191 5.43056L 3.01191 8.43056L 3.98809 9.56944Z"});Et({d:"M23.555,8.729a1.505,1.505,0,0,0-1.406-.98H16.062a.5.5,0,0,1-.472-.334L13.405,1.222a1.5,1.5,0,0,0-2.81,0l-.005.016L8.41,7.415a.5.5,0,0,1-.471.334H1.85A1.5,1.5,0,0,0,.887,10.4l5.184,4.3a.5.5,0,0,1,.155.543L4.048,21.774a1.5,1.5,0,0,0,2.31,1.684l5.346-3.92a.5.5,0,0,1,.591,0l5.344,3.919a1.5,1.5,0,0,0,2.312-1.683l-2.178-6.535a.5.5,0,0,1,.155-.543l5.194-4.306A1.5,1.5,0,0,0,23.555,8.729Z",displayName:"StarIcon"});Et({displayName:"EmailIcon",path:_("g",{fill:"currentColor",children:[_("path",{d:"M11.114,14.556a1.252,1.252,0,0,0,1.768,0L22.568,4.87a.5.5,0,0,0-.281-.849A1.966,1.966,0,0,0,22,4H2a1.966,1.966,0,0,0-.289.021.5.5,0,0,0-.281.849Z"},void 0,!1,{fileName:dt,lineNumber:410,columnNumber:22},globalThis),_("path",{d:"M23.888,5.832a.182.182,0,0,0-.2.039l-6.2,6.2a.251.251,0,0,0,0,.354l5.043,5.043a.75.75,0,1,1-1.06,1.061l-5.043-5.043a.25.25,0,0,0-.354,0l-2.129,2.129a2.75,2.75,0,0,1-3.888,0L7.926,13.488a.251.251,0,0,0-.354,0L2.529,18.531a.75.75,0,0,1-1.06-1.061l5.043-5.043a.251.251,0,0,0,0-.354l-6.2-6.2a.18.18,0,0,0-.2-.039A.182.182,0,0,0,0,6V18a2,2,0,0,0,2,2H22a2,2,0,0,0,2-2V6A.181.181,0,0,0,23.888,5.832Z"},void 0,!1,{fileName:dt,lineNumber:412,columnNumber:23},globalThis)]},void 0,!0,{fileName:dt,lineNumber:408,columnNumber:25},globalThis)});Et({d:"M2.20731,0.0127209 C2.1105,-0.0066419 1.99432,-0.00664663 1.91687,0.032079 C0.871279,0.438698 0.212942,1.92964 0.0580392,2.95587 C-0.426031,6.28627 2.20731,9.17133 4.62766,11.0689 C6.77694,12.7534 10.9012,15.5223 13.3409,12.8503 C13.6507,12.5211 14.0186,12.037 13.9993,11.553 C13.9412,10.7397 13.186,10.1588 12.6051,9.71349 C12.1598,9.38432 11.2304,8.47427 10.6495,8.49363 C10.1267,8.51299 9.79754,9.05515 9.46837,9.38432 L8.88748,9.96521 C8.79067,10.062 7.55145,9.24878 7.41591,9.15197 C6.91248,8.8228 6.4284,8.45491 6.00242,8.04829 C5.57644,7.64167 5.18919,7.19632 4.86002,6.73161 C4.7632,6.59607 3.96933,5.41495 4.04678,5.31813 C4.04678,5.31813 4.72448,4.58234 4.91811,4.2919 C5.32473,3.67229 5.63453,3.18822 5.16982,2.45243 C4.99556,2.18135 4.78257,1.96836 4.55021,1.73601 C4.14359,1.34875 3.73698,0.942131 3.27227,0.612963 C3.02055,0.419335 2.59457,0.0708094 2.20731,0.0127209 Z",displayName:"PhoneIcon",viewBox:"0 0 14 14"});Et({viewBox:"0 0 10 10",d:"M3,2 C2.44771525,2 2,1.55228475 2,1 C2,0.44771525 2.44771525,0 3,0 C3.55228475,0 4,0.44771525 4,1 C4,1.55228475 3.55228475,2 3,2 Z M3,6 C2.44771525,6 2,5.55228475 2,5 C2,4.44771525 2.44771525,4 3,4 C3.55228475,4 4,4.44771525 4,5 C4,5.55228475 3.55228475,6 3,6 Z M3,10 C2.44771525,10 2,9.55228475 2,9 C2,8.44771525 2.44771525,8 3,8 C3.55228475,8 4,8.44771525 4,9 C4,9.55228475 3.55228475,10 3,10 Z M7,2 C6.44771525,2 6,1.55228475 6,1 C6,0.44771525 6.44771525,0 7,0 C7.55228475,0 8,0.44771525 8,1 C8,1.55228475 7.55228475,2 7,2 Z M7,6 C6.44771525,6 6,5.55228475 6,5 C6,4.44771525 6.44771525,4 7,4 C7.55228475,4 8,4.44771525 8,5 C8,5.55228475 7.55228475,6 7,6 Z M7,10 C6.44771525,10 6,9.55228475 6,9 C6,8.44771525 6.44771525,8 7,8 C7.55228475,8 8,8.44771525 8,9 C8,9.55228475 7.55228475,10 7,10 Z",displayName:"DragHandleIcon"});Et({displayName:"SpinnerIcon",path:_(hi,{children:[_("defs",{children:_("linearGradient",{x1:"28.154%",y1:"63.74%",x2:"74.629%",y2:"17.783%",id:"a",children:[_("stop",{stopColor:"currentColor",offset:"0%"},void 0,!1,{fileName:dt,lineNumber:443,columnNumber:22},globalThis),_("stop",{stopColor:"#fff",stopOpacity:"0",offset:"100%"},void 0,!1,{fileName:dt,lineNumber:446,columnNumber:23},globalThis)]},void 0,!0,{fileName:dt,lineNumber:437,columnNumber:133},globalThis)},void 0,!1,{fileName:dt,lineNumber:437,columnNumber:83},globalThis),_("g",{transform:"translate(2)",fill:"none",children:[_("circle",{stroke:"url(#a)",strokeWidth:"4",cx:"10",cy:"12",r:"10"},void 0,!1,{fileName:dt,lineNumber:453,columnNumber:22},globalThis),_("path",{d:"M10 2C4.477 2 0 6.477 0 12",stroke:"currentColor",strokeWidth:"4"},void 0,!1,{fileName:dt,lineNumber:459,columnNumber:23},globalThis),_("rect",{fill:"currentColor",x:"8",width:"4",height:"4",rx:"8"},void 0,!1,{fileName:dt,lineNumber:463,columnNumber:23},globalThis)]},void 0,!0,{fileName:dt,lineNumber:450,columnNumber:25},globalThis)]},void 0,!0)});Et({displayName:"CloseIcon",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"});Et({displayName:"SmallCloseIcon",viewBox:"0 0 16 16",path:_("path",{d:"M9.41 8l2.29-2.29c.19-.18.3-.43.3-.71a1.003 1.003 0 0 0-1.71-.71L8 6.59l-2.29-2.3a1.003 1.003 0 0 0-1.42 1.42L6.59 8 4.3 10.29c-.19.18-.3.43-.3.71a1.003 1.003 0 0 0 1.71.71L8 9.41l2.29 2.29c.18.19.43.3.71.3a1.003 1.003 0 0 0 .71-1.71L9.41 8z",fillRule:"evenodd",fill:"currentColor"},void 0,!1,{fileName:dt,lineNumber:484,columnNumber:25},globalThis)});Et({d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20zm6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9z",displayName:"NotAllowedIcon"});Et({d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z",displayName:"TriangleDownIcon"});Et({d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z",displayName:"TriangleUpIcon"});Et({displayName:"InfoOutlineIcon",path:_("g",{fill:"currentColor",stroke:"currentColor",strokeLinecap:"square",strokeWidth:"2",children:[_("circle",{cx:"12",cy:"12",fill:"none",r:"11",stroke:"currentColor"},void 0,!1,{fileName:dt,lineNumber:521,columnNumber:22},globalThis),_("line",{fill:"none",x1:"11.959",x2:"11.959",y1:"11",y2:"17"},void 0,!1,{fileName:dt,lineNumber:527,columnNumber:23},globalThis),_("circle",{cx:"11.959",cy:"7",r:"1",stroke:"none"},void 0,!1,{fileName:dt,lineNumber:533,columnNumber:23},globalThis)]},void 0,!0,{fileName:dt,lineNumber:516,columnNumber:25},globalThis)});Et({displayName:"BellIcon",d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z"});Et({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"});Et({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm0,19a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,12,19Zm1.6-6.08a1,1,0,0,0-.6.917,1,1,0,1,1-2,0,3,3,0,0,1,1.8-2.75A2,2,0,1,0,10,9.255a1,1,0,1,1-2,0,4,4,0,1,1,5.6,3.666Z",displayName:"QuestionIcon"});Et({displayName:"QuestionOutlineIcon",path:_("g",{stroke:"currentColor",strokeWidth:"1.5",children:[_("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"},void 0,!1,{fileName:dt,lineNumber:568,columnNumber:22},globalThis),_("path",{fill:"none",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"},void 0,!1,{fileName:dt,lineNumber:572,columnNumber:23},globalThis),_("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"},void 0,!1,{fileName:dt,lineNumber:576,columnNumber:23},globalThis)]},void 0,!0,{fileName:dt,lineNumber:565,columnNumber:25},globalThis)});Et({d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z",displayName:"WarningIcon"});Et({displayName:"WarningTwoIcon",d:"M23.119,20,13.772,2.15h0a2,2,0,0,0-3.543,0L.881,20a2,2,0,0,0,1.772,2.928H21.347A2,2,0,0,0,23.119,20ZM11,8.423a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Zm1.05,11.51h-.028a1.528,1.528,0,0,1-1.522-1.47,1.476,1.476,0,0,1,1.448-1.53h.028A1.527,1.527,0,0,1,13.5,18.4,1.475,1.475,0,0,1,12.05,19.933Z"});Et({viewBox:"0 0 14 14",path:_("g",{fill:"currentColor",children:_("polygon",{points:"5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039"},void 0,!1,{fileName:dt,lineNumber:605,columnNumber:22},globalThis)},void 0,!1,{fileName:dt,lineNumber:603,columnNumber:25},globalThis)});Et({displayName:"MinusIcon",path:_("g",{fill:"currentColor",children:_("rect",{height:"4",width:"20",x:"2",y:"10"},void 0,!1,{fileName:dt,lineNumber:616,columnNumber:22},globalThis)},void 0,!1,{fileName:dt,lineNumber:614,columnNumber:25},globalThis)});Et({displayName:"HamburgerIcon",viewBox:"0 0 24 24",d:"M 3 5 A 1.0001 1.0001 0 1 0 3 7 L 21 7 A 1.0001 1.0001 0 1 0 21 5 L 3 5 z M 3 11 A 1.0001 1.0001 0 1 0 3 13 L 21 13 A 1.0001 1.0001 0 1 0 21 11 L 3 11 z M 3 17 A 1.0001 1.0001 0 1 0 3 19 L 21 19 A 1.0001 1.0001 0 1 0 21 17 L 3 17 z"});var Fz={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},MI=Pe.createContext&&Pe.createContext(Fz),c2="/Users/spencer/Documents/Code/stable-diffusion/frontend/node_modules/react-icons/lib/esm/iconBase.js",Xf=globalThis&&globalThis.__assign||function(){return Xf=Object.assign||function(e){for(var t,n=1,i=arguments.length;n_(Sn,{gap:2,children:[n&&_(Kf,{label:`Recall ${e}`,children:_(wo,{"aria-label":"Use this parameter",icon:_(Bz,{},void 0,!1,{fileName:mn,lineNumber:54,columnNumber:19},void 0),size:"xs",variant:"ghost",fontSize:20,onClick:n},void 0,!1,{fileName:mn,lineNumber:52,columnNumber:11},void 0)},void 0,!1,{fileName:mn,lineNumber:51,columnNumber:9},void 0),_(Gr,{fontWeight:"semibold",whiteSpace:"nowrap",children:[e,":"]},void 0,!0,{fileName:mn,lineNumber:62,columnNumber:7},void 0),i?_(Ty,{href:t.toString(),isExternal:!0,wordBreak:"break-all",children:[t.toString()," ",_(Lz,{mx:"2px"},void 0,!1,{fileName:mn,lineNumber:67,columnNumber:30},void 0)]},void 0,!0,{fileName:mn,lineNumber:66,columnNumber:9},void 0):_(Gr,{maxHeight:100,overflowY:"scroll",wordBreak:"break-all",children:t.toString()},void 0,!1,{fileName:mn,lineNumber:70,columnNumber:9},void 0)]},void 0,!0,{fileName:mn,lineNumber:49,columnNumber:5},void 0),vhe=(e,t)=>e.image.uuid===t.image.uuid,ghe=k.exports.memo(({image:e})=>{const t=Ga(),n=Yf("blackAlpha.100","whiteAlpha.100"),i=e?.metadata?.image||{},{type:o,postprocessing:c,sampler:u,prompt:m,seed:h,variations:v,steps:b,cfg_scale:x,seamless:w,width:N,height:R,strength:O,fit:M,init_image_path:B,mask_image_path:I,orig_path:F,scale:z}=i,$=JSON.stringify(i,null,2);return _(Sn,{gap:1,direction:"column",overflowY:"scroll",width:"100%",children:[_(Sn,{gap:2,children:[_(Gr,{fontWeight:"semibold",children:"File:"},void 0,!1,{fileName:mn,lineNumber:124,columnNumber:9},void 0),_(Ty,{href:e.url,isExternal:!0,children:[e.url,_(Lz,{mx:"2px"},void 0,!1,{fileName:mn,lineNumber:127,columnNumber:11},void 0)]},void 0,!0,{fileName:mn,lineNumber:125,columnNumber:9},void 0)]},void 0,!0,{fileName:mn,lineNumber:123,columnNumber:7},void 0),Object.keys(i).length>0?_(hi,{children:[o&&_(na,{label:"Type",value:o},void 0,!1,{fileName:mn,lineNumber:132,columnNumber:20},void 0),["esrgan","gfpgan"].includes(o)&&_(na,{label:"Original image",value:F,isLink:!0},void 0,!1,{fileName:mn,lineNumber:134,columnNumber:13},void 0),o==="gfpgan"&&O&&_(na,{label:"Fix faces strength",value:O,onClick:()=>t(wA(O))},void 0,!1,{fileName:mn,lineNumber:137,columnNumber:13},void 0),o==="esrgan"&&z&&_(na,{label:"Upscaling scale",value:z,onClick:()=>t(NA(z))},void 0,!1,{fileName:mn,lineNumber:144,columnNumber:13},void 0),o==="esrgan"&&O&&_(na,{label:"Upscaling strength",value:O,onClick:()=>t(EA(O))},void 0,!1,{fileName:mn,lineNumber:151,columnNumber:13},void 0),m&&_(na,{label:"Prompt",value:SA(m),onClick:()=>t(az(m))},void 0,!1,{fileName:mn,lineNumber:158,columnNumber:13},void 0),h&&_(na,{label:"Seed",value:h,onClick:()=>t(Fy(h))},void 0,!1,{fileName:mn,lineNumber:165,columnNumber:13},void 0),u&&_(na,{label:"Sampler",value:u,onClick:()=>t(lz(u))},void 0,!1,{fileName:mn,lineNumber:172,columnNumber:13},void 0),b&&_(na,{label:"Steps",value:b,onClick:()=>t(iz(b))},void 0,!1,{fileName:mn,lineNumber:179,columnNumber:13},void 0),x&&_(na,{label:"CFG scale",value:x,onClick:()=>t(oz(x))},void 0,!1,{fileName:mn,lineNumber:186,columnNumber:13},void 0),v&&v.length>0&&_(na,{label:"Seed-weight pairs",value:xA(v),onClick:()=>t(fz(xA(v)))},void 0,!1,{fileName:mn,lineNumber:193,columnNumber:13},void 0),w&&_(na,{label:"Seamless",value:w,onClick:()=>t(CA(w))},void 0,!1,{fileName:mn,lineNumber:202,columnNumber:13},void 0),N&&_(na,{label:"Width",value:N,onClick:()=>t(CA(N))},void 0,!1,{fileName:mn,lineNumber:209,columnNumber:13},void 0),R&&_(na,{label:"Height",value:R,onClick:()=>t(sz(R))},void 0,!1,{fileName:mn,lineNumber:216,columnNumber:13},void 0),B&&_(na,{label:"Initial image",value:B,isLink:!0,onClick:()=>t(IC(B))},void 0,!1,{fileName:mn,lineNumber:223,columnNumber:13},void 0),I&&_(na,{label:"Mask image",value:I,isLink:!0,onClick:()=>t(AO(I))},void 0,!1,{fileName:mn,lineNumber:231,columnNumber:13},void 0),o==="img2img"&&O&&_(na,{label:"Image to image strength",value:O,onClick:()=>t(uz(O))},void 0,!1,{fileName:mn,lineNumber:239,columnNumber:13},void 0),M&&_(na,{label:"Image to image fit",value:M,onClick:()=>t(cz(M))},void 0,!1,{fileName:mn,lineNumber:246,columnNumber:13},void 0),c&&c.length>0&&c.map(q=>{if(q.type==="esrgan"){const{scale:K,strength:le}=q;return _(hi,{children:[_(na,{label:"Upscaling scale",value:K,onClick:()=>t(NA(K))},void 0,!1,{fileName:mn,lineNumber:260,columnNumber:23},void 0),_(na,{label:"Upscaling strength",value:le,onClick:()=>t(EA(le))},void 0,!1,{fileName:mn,lineNumber:265,columnNumber:23},void 0)]},void 0,!0)}else if(q.type==="gfpgan"){const{strength:K}=q;return _(na,{label:"Fix faces strength",value:K,onClick:()=>t(wA(K))},void 0,!1,{fileName:mn,lineNumber:275,columnNumber:21},void 0)}}),_(Sn,{gap:2,direction:"column",children:[_(Sn,{gap:2,children:[_(Kf,{label:"Copy metadata JSON",children:_(wo,{"aria-label":"Copy metadata JSON",icon:_(che,{},void 0,!1,{fileName:mn,lineNumber:289,columnNumber:25},void 0),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText($)},void 0,!1,{fileName:mn,lineNumber:287,columnNumber:17},void 0)},void 0,!1,{fileName:mn,lineNumber:286,columnNumber:15},void 0),_(Gr,{fontWeight:"semibold",children:"Metadata JSON:"},void 0,!1,{fileName:mn,lineNumber:296,columnNumber:15},void 0)]},void 0,!0,{fileName:mn,lineNumber:285,columnNumber:13},void 0),_(kl,{overflow:"scroll",flexGrow:3,wordBreak:"break-all",bgColor:n,padding:2,children:_("pre",{children:$},void 0,!1,{fileName:mn,lineNumber:306,columnNumber:15},void 0)},void 0,!1,{fileName:mn,lineNumber:298,columnNumber:13},void 0)]},void 0,!0,{fileName:mn,lineNumber:284,columnNumber:11},void 0)]},void 0,!0):_(_y,{width:"100%",pt:10,children:_(Gr,{fontSize:"lg",fontWeight:"semibold",children:"No metadata available"},void 0,!1,{fileName:mn,lineNumber:312,columnNumber:11},void 0)},void 0,!1,{fileName:mn,lineNumber:311,columnNumber:9},void 0)]},void 0,!0,{fileName:mn,lineNumber:122,columnNumber:5},void 0)},vhe);var So="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/gallery/DeleteImageModal.tsx";const yhe=Br(e=>e.system,e=>e.shouldConfirmOnDelete),Uz=k.exports.forwardRef(({image:e,children:t},n)=>{const{isOpen:i,onOpen:o,onClose:c}=H5(),u=Ga(),m=mr(yhe),h=k.exports.useRef(null),v=w=>{w.stopPropagation(),m?o():b()},b=()=>{u(Ime(e)),c()},x=w=>u(hz(!w.target.checked));return _(hi,{children:[k.exports.cloneElement(t,{onClick:v,ref:n}),_(Hre,{isOpen:i,leastDestructiveRef:h,onClose:c,children:_(L2,{children:_(Wre,{children:[_(sO,{fontSize:"lg",fontWeight:"bold",children:"Delete image"},void 0,!1,{fileName:So,lineNumber:89,columnNumber:15},void 0),_(M2,{children:_(Sn,{direction:"column",gap:5,children:[_(Gr,{children:"Are you sure? You can't undo this action afterwards."},void 0,!1,{fileName:So,lineNumber:95,columnNumber:19},void 0),_(xc,{children:_(Sn,{alignItems:"center",children:[_(Cc,{mb:0,children:"Don't ask me again"},void 0,!1,{fileName:So,lineNumber:100,columnNumber:23},void 0),_(wc,{checked:!m,onChange:x},void 0,!1,{fileName:So,lineNumber:101,columnNumber:23},void 0)]},void 0,!0,{fileName:So,lineNumber:99,columnNumber:21},void 0)},void 0,!1,{fileName:So,lineNumber:98,columnNumber:19},void 0)]},void 0,!0,{fileName:So,lineNumber:94,columnNumber:17},void 0)},void 0,!1,{fileName:So,lineNumber:93,columnNumber:15},void 0),_(oO,{children:[_(Dl,{ref:h,onClick:c,children:"Cancel"},void 0,!1,{fileName:So,lineNumber:110,columnNumber:17},void 0),_(Dl,{colorScheme:"red",onClick:b,ml:3,children:"Delete"},void 0,!1,{fileName:So,lineNumber:113,columnNumber:17},void 0)]},void 0,!0,{fileName:So,lineNumber:109,columnNumber:15},void 0)]},void 0,!0,{fileName:So,lineNumber:88,columnNumber:13},void 0)},void 0,!1,{fileName:So,lineNumber:87,columnNumber:11},void 0)},void 0,!1,{fileName:So,lineNumber:82,columnNumber:9},void 0)]},void 0,!0)});var bhe="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/common/components/SDButton.tsx";const mc=e=>{const{label:t,size:n="sm",...i}=e;return _(Dl,{size:n,...i,children:t},void 0,!1,{fileName:bhe,lineNumber:15,columnNumber:5},void 0)};var dc="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/gallery/CurrentImageButtons.tsx";const She=Br(e=>e.system,e=>({isProcessing:e.isProcessing,isConnected:e.isConnected,isGFPGANAvailable:e.isGFPGANAvailable,isESRGANAvailable:e.isESRGANAvailable}),{memoizeOptions:{resultEqualityCheck:Yr.exports.isEqual}}),xhe=({image:e,shouldShowImageDetails:t,setShouldShowImageDetails:n})=>{const i=Ga(),{intermediateImage:o}=mr(B=>B.gallery),{upscalingLevel:c,gfpganStrength:u}=mr(B=>B.options),{isProcessing:m,isConnected:h,isGFPGANAvailable:v,isESRGANAvailable:b}=mr(She),x=()=>i(IC(e.url)),w=()=>i(dz(e.metadata)),N=()=>i(Fy(e.metadata.image.seed)),R=()=>i(Pme(e)),O=()=>i(Mme(e)),M=()=>n(!t);return _(Sn,{gap:2,children:[_(mc,{label:"Use as initial image",colorScheme:"gray",flexGrow:1,variant:"outline",onClick:x},void 0,!1,{fileName:dc,lineNumber:82,columnNumber:7},void 0),_(mc,{label:"Use all",colorScheme:"gray",flexGrow:1,variant:"outline",isDisabled:!["txt2img","img2img"].includes(e?.metadata?.image?.type),onClick:w},void 0,!1,{fileName:dc,lineNumber:90,columnNumber:7},void 0),_(mc,{label:"Use seed",colorScheme:"gray",flexGrow:1,variant:"outline",isDisabled:!e?.metadata?.image?.seed,onClick:N},void 0,!1,{fileName:dc,lineNumber:99,columnNumber:7},void 0),_(mc,{label:"Upscale",colorScheme:"gray",flexGrow:1,variant:"outline",isDisabled:!b||Boolean(o)||!(h&&!m)||!c,onClick:R},void 0,!1,{fileName:dc,lineNumber:108,columnNumber:7},void 0),_(mc,{label:"Fix faces",colorScheme:"gray",flexGrow:1,variant:"outline",isDisabled:!v||Boolean(o)||!(h&&!m)||!u,onClick:O},void 0,!1,{fileName:dc,lineNumber:121,columnNumber:7},void 0),_(mc,{label:"Details",colorScheme:"gray",variant:t?"solid":"outline",borderWidth:1,flexGrow:1,onClick:M},void 0,!1,{fileName:dc,lineNumber:134,columnNumber:7},void 0),_(Uz,{image:e,children:_(mc,{label:"Delete",colorScheme:"red",flexGrow:1,variant:"outline",isDisabled:Boolean(o)},void 0,!1,{fileName:dc,lineNumber:143,columnNumber:9},void 0)},void 0,!1,{fileName:dc,lineNumber:142,columnNumber:7},void 0)]},void 0,!0,{fileName:dc,lineNumber:81,columnNumber:5},void 0)};var Pf="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/gallery/CurrentImageDisplay.tsx";const Che="calc(100vh - 238px)",whe=()=>{const{currentImage:e,intermediateImage:t}=mr(u=>u.gallery),n=Yf("rgba(255, 255, 255, 0.85)","rgba(0, 0, 0, 0.8)"),[i,o]=k.exports.useState(!1),c=t||e;return c?_(Sn,{direction:"column",borderWidth:1,rounded:"md",p:2,gap:2,children:[_(xhe,{image:c,shouldShowImageDetails:i,setShouldShowImageDetails:o},void 0,!1,{fileName:Pf,lineNumber:31,columnNumber:7},void 0),_(_y,{height:Che,position:"relative",children:[_(Ey,{src:c.url,fit:"contain",maxWidth:"100%",maxHeight:"100%"},void 0,!1,{fileName:Pf,lineNumber:37,columnNumber:9},void 0),i&&_(Sn,{width:"100%",height:"100%",position:"absolute",top:0,left:0,p:3,boxSizing:"border-box",backgroundColor:n,overflow:"scroll",children:_(ghe,{image:c},void 0,!1,{fileName:Pf,lineNumber:55,columnNumber:13},void 0)},void 0,!1,{fileName:Pf,lineNumber:44,columnNumber:11},void 0)]},void 0,!0,{fileName:Pf,lineNumber:36,columnNumber:7},void 0)]},void 0,!0,{fileName:Pf,lineNumber:30,columnNumber:5},void 0):_(_y,{height:"100%",position:"relative",children:_(Gr,{size:"xl",children:"No image selected"},void 0,!1,{fileName:Pf,lineNumber:62,columnNumber:7},void 0)},void 0,!1,{fileName:Pf,lineNumber:61,columnNumber:5},void 0)};var Ji="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/gallery/HoverableImage.tsx";const Nhe=(e,t)=>e.image.uuid===t.image.uuid&&e.isSelected===t.isSelected,Ehe=k.exports.memo(e=>{const[t,n]=k.exports.useState(!1),i=Ga(),o=Yf("green.600","green.300"),c=Yf("gray.200","gray.700"),u=Yf("radial-gradient(circle, rgba(255,255,255,0.7) 0%, rgba(255,255,255,0.7) 20%, rgba(0,0,0,0) 100%)","radial-gradient(circle, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.7) 20%, rgba(0,0,0,0) 100%)"),{image:m,isSelected:h}=e,{url:v,uuid:b,metadata:x}=m,w=()=>n(!0),N=()=>n(!1),R=B=>{B.stopPropagation(),i(dz(x))},O=B=>{B.stopPropagation(),i(Fy(m.metadata.image.seed))};return _(kl,{position:"relative",children:[_(Ey,{width:120,height:120,objectFit:"cover",rounded:"md",src:v,loading:"lazy",backgroundColor:c},void 0,!1,{fileName:Ji,lineNumber:63,columnNumber:7},void 0),_(Sn,{cursor:"pointer",position:"absolute",top:0,left:0,rounded:"md",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",background:h?u:void 0,onClick:()=>i(Cpe(m)),onMouseOver:w,onMouseOut:N,children:[h&&_($s,{fill:o,width:"50%",height:"50%",as:lhe},void 0,!1,{fileName:Ji,lineNumber:88,columnNumber:11},void 0),t&&_(Sn,{direction:"column",gap:1,position:"absolute",top:1,right:1,children:[_(Kf,{label:"Delete image",children:_(Uz,{image:m,children:_(wo,{colorScheme:"red","aria-label":"Delete image",icon:_(hhe,{},void 0,!1,{fileName:Ji,lineNumber:103,columnNumber:25},void 0),size:"xs",variant:"imageHoverIconButton",fontSize:14},void 0,!1,{fileName:Ji,lineNumber:100,columnNumber:17},void 0)},void 0,!1,{fileName:Ji,lineNumber:99,columnNumber:15},void 0)},void 0,!1,{fileName:Ji,lineNumber:98,columnNumber:13},void 0),["txt2img","img2img"].includes(m?.metadata?.image?.type)&&_(Kf,{label:"Use all parameters",children:_(wo,{"aria-label":"Use all parameters",icon:_(Bz,{},void 0,!1,{fileName:Ji,lineNumber:114,columnNumber:25},void 0),size:"xs",fontSize:18,variant:"imageHoverIconButton",onClickCapture:R},void 0,!1,{fileName:Ji,lineNumber:112,columnNumber:17},void 0)},void 0,!1,{fileName:Ji,lineNumber:111,columnNumber:15},void 0),m?.metadata?.image?.seed&&_(Kf,{label:"Use seed",children:_(wo,{"aria-label":"Use seed",icon:_(phe,{},void 0,!1,{fileName:Ji,lineNumber:126,columnNumber:25},void 0),size:"xs",fontSize:16,variant:"imageHoverIconButton",onClickCapture:O},void 0,!1,{fileName:Ji,lineNumber:124,columnNumber:17},void 0)},void 0,!1,{fileName:Ji,lineNumber:123,columnNumber:15},void 0)]},void 0,!0,{fileName:Ji,lineNumber:91,columnNumber:11},void 0)]},void 0,!0,{fileName:Ji,lineNumber:72,columnNumber:7},void 0)]},b,!0,{fileName:Ji,lineNumber:62,columnNumber:5},void 0)},Nhe);var zh="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/gallery/ImageGallery.tsx";const _he=()=>{const{images:e,currentImageUuid:t}=mr(o=>o.gallery),n=Ga(),i=()=>{n(Lme())};return e.length?_(Sn,{direction:"column",gap:2,pb:2,children:[_(Sn,{gap:2,wrap:"wrap",children:e.map(o=>{const{uuid:c}=o;return _(Ehe,{image:o,isSelected:t===c},c,!1,{fileName:zh,lineNumber:34,columnNumber:13},void 0)})},void 0,!1,{fileName:zh,lineNumber:29,columnNumber:7},void 0),_(Dl,{onClick:i,children:"Load more..."},void 0,!1,{fileName:zh,lineNumber:38,columnNumber:7},void 0)]},void 0,!0,{fileName:zh,lineNumber:28,columnNumber:5},void 0):_(_y,{height:"100%",position:"relative",children:_(Gr,{size:"xl",children:"No images in gallery"},void 0,!1,{fileName:zh,lineNumber:42,columnNumber:7},void 0)},void 0,!1,{fileName:zh,lineNumber:41,columnNumber:5},void 0)};var The="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/system/ProgressBar.tsx";const Rhe=Br(e=>e.system,e=>({isProcessing:e.isProcessing,currentStep:e.currentStep,totalSteps:e.totalSteps,currentStatusHasSteps:e.currentStatusHasSteps}),{memoizeOptions:{resultEqualityCheck:Yr.exports.isEqual}}),Ahe=()=>{const{isProcessing:e,currentStep:t,totalSteps:n,currentStatusHasSteps:i}=mr(Rhe),o=t?Math.round(t*100/n):0;return _(tF,{height:"10px",value:o,isIndeterminate:e&&!i},void 0,!1,{fileName:The,lineNumber:30,columnNumber:5},void 0)};function $z(e){return io({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"}}]})(e)}function khe(e){return io({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58a.49.49 0 00.12-.61l-1.92-3.32a.488.488 0 00-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54a.484.484 0 00-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58a.49.49 0 00-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"}}]})(e)}var nr="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/system/SettingsModal.tsx";const Ohe=Br(e=>e.system,e=>{const{shouldDisplayInProgress:t,shouldConfirmOnDelete:n,shouldDisplayGuides:i}=e;return{shouldDisplayInProgress:t,shouldConfirmOnDelete:n,shouldDisplayGuides:i}},{memoizeOptions:{resultEqualityCheck:Yr.exports.isEqual}}),Dhe=({children:e})=>{const{isOpen:t,onOpen:n,onClose:i}=H5(),{isOpen:o,onOpen:c,onClose:u}=H5(),{shouldDisplayInProgress:m,shouldConfirmOnDelete:h,shouldDisplayGuides:v}=mr(Ohe),b=Ga(),x=()=>{Jz.purge().then(()=>{i(),c()})};return _(hi,{children:[k.exports.cloneElement(e,{onClick:n}),_(Dy,{isOpen:t,onClose:i,children:[_(L2,{},void 0,!1,{fileName:nr,lineNumber:101,columnNumber:9},void 0),_(I2,{children:[_(sO,{children:"Settings"},void 0,!1,{fileName:nr,lineNumber:103,columnNumber:11},void 0),_($8,{},void 0,!1,{fileName:nr,lineNumber:104,columnNumber:11},void 0),_(M2,{children:_(Sn,{gap:5,direction:"column",children:[_(xc,{children:_(ay,{children:[_(Cc,{marginBottom:1,children:"Display in-progress images (slower)"},void 0,!1,{fileName:nr,lineNumber:109,columnNumber:19},void 0),_(wc,{isChecked:m,onChange:w=>b(Rpe(w.target.checked))},void 0,!1,{fileName:nr,lineNumber:112,columnNumber:19},void 0)]},void 0,!0,{fileName:nr,lineNumber:108,columnNumber:17},void 0)},void 0,!1,{fileName:nr,lineNumber:107,columnNumber:15},void 0),_(xc,{children:_(ay,{children:[_(Cc,{marginBottom:1,children:"Confirm on delete"},void 0,!1,{fileName:nr,lineNumber:122,columnNumber:19},void 0),_(wc,{isChecked:h,onChange:w=>b(hz(w.target.checked))},void 0,!1,{fileName:nr,lineNumber:123,columnNumber:19},void 0)]},void 0,!0,{fileName:nr,lineNumber:121,columnNumber:17},void 0)},void 0,!1,{fileName:nr,lineNumber:120,columnNumber:15},void 0),_(xc,{children:_(ay,{children:[_(Cc,{marginBottom:1,children:"Display help guides in configuration menus"},void 0,!1,{fileName:nr,lineNumber:133,columnNumber:19},void 0),_(wc,{isChecked:v,onChange:w=>b(Ppe(w.target.checked))},void 0,!1,{fileName:nr,lineNumber:136,columnNumber:19},void 0)]},void 0,!0,{fileName:nr,lineNumber:132,columnNumber:17},void 0)},void 0,!1,{fileName:nr,lineNumber:131,columnNumber:15},void 0),_(Uk,{size:"md",children:"Reset Web UI"},void 0,!1,{fileName:nr,lineNumber:145,columnNumber:15},void 0),_(Gr,{children:"Resetting the web UI only resets the browser's local cache of your images and remembered settings. It does not delete any images from disk."},void 0,!1,{fileName:nr,lineNumber:146,columnNumber:15},void 0),_(Gr,{children:"If images aren't showing up in the gallery or something else isn't working, please try resetting before submitting an issue on GitHub."},void 0,!1,{fileName:nr,lineNumber:151,columnNumber:15},void 0),_(Dl,{colorScheme:"red",onClick:x,children:"Reset Web UI"},void 0,!1,{fileName:nr,lineNumber:156,columnNumber:15},void 0)]},void 0,!0,{fileName:nr,lineNumber:106,columnNumber:13},void 0)},void 0,!1,{fileName:nr,lineNumber:105,columnNumber:11},void 0),_(oO,{children:_(Dl,{onClick:i,children:"Close"},void 0,!1,{fileName:nr,lineNumber:163,columnNumber:13},void 0)},void 0,!1,{fileName:nr,lineNumber:162,columnNumber:11},void 0)]},void 0,!0,{fileName:nr,lineNumber:102,columnNumber:9},void 0)]},void 0,!0,{fileName:nr,lineNumber:100,columnNumber:7},void 0),_(Dy,{closeOnOverlayClick:!1,isOpen:o,onClose:u,isCentered:!0,children:[_(L2,{bg:"blackAlpha.300",backdropFilter:"blur(40px)"},void 0,!1,{fileName:nr,lineNumber:174,columnNumber:9},void 0),_(I2,{children:_(M2,{pb:6,pt:6,children:_(Sn,{justifyContent:"center",children:_(Gr,{fontSize:"lg",children:"Web UI has been reset. Refresh the page to reload."},void 0,!1,{fileName:nr,lineNumber:178,columnNumber:15},void 0)},void 0,!1,{fileName:nr,lineNumber:177,columnNumber:13},void 0)},void 0,!1,{fileName:nr,lineNumber:176,columnNumber:11},void 0)},void 0,!1,{fileName:nr,lineNumber:175,columnNumber:9},void 0)]},void 0,!0,{fileName:nr,lineNumber:168,columnNumber:7},void 0)]},void 0,!0)};var Mi="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/system/SiteHeader.tsx";const Phe=Br(e=>e.system,e=>({isConnected:e.isConnected,isProcessing:e.isProcessing,currentIteration:e.currentIteration,totalIterations:e.totalIterations,currentStatus:e.currentStatus}),{memoizeOptions:{resultEqualityCheck:Yr.exports.isEqual}}),Mhe=()=>{const{colorMode:e,toggleColorMode:t}=Q2(),{isConnected:n,isProcessing:i,currentIteration:o,totalIterations:c,currentStatus:u}=mr(Phe),m=n?"green.500":"red.500",h=e=="light"?_(dhe,{},void 0,!1,{fileName:Mi,lineNumber:50,columnNumber:48},void 0):_(mhe,{},void 0,!1,{fileName:Mi,lineNumber:50,columnNumber:61},void 0),v=e=="light"?18:20;let b=u;return i&&c>1&&(b+=` [${o}/${c}]`),_(Sn,{minWidth:"max-content",alignItems:"center",gap:"1",pl:2,pr:1,children:[_(Uk,{size:"lg",children:"InvokeUI"},void 0,!1,{fileName:Mi,lineNumber:65,columnNumber:7},void 0),_(M7,{},void 0,!1,{fileName:Mi,lineNumber:67,columnNumber:7},void 0),_(Gr,{textColor:m,children:b},void 0,!1,{fileName:Mi,lineNumber:69,columnNumber:7},void 0),_(Dhe,{children:_(wo,{"aria-label":"Settings",variant:"link",fontSize:24,size:"sm",icon:_(khe,{},void 0,!1,{fileName:Mi,lineNumber:77,columnNumber:17},void 0)},void 0,!1,{fileName:Mi,lineNumber:72,columnNumber:9},void 0)},void 0,!1,{fileName:Mi,lineNumber:71,columnNumber:7},void 0),_(wo,{"aria-label":"Link to Github Issues",variant:"link",fontSize:23,size:"sm",icon:_(Ty,{isExternal:!0,href:"http://github.com/lstein/stable-diffusion/issues",children:_($z,{},void 0,!1,{fileName:Mi,lineNumber:91,columnNumber:13},void 0)},void 0,!1,{fileName:Mi,lineNumber:87,columnNumber:11},void 0)},void 0,!1,{fileName:Mi,lineNumber:81,columnNumber:7},void 0),_(wo,{"aria-label":"Link to Github Repo",variant:"link",fontSize:20,size:"sm",icon:_(Ty,{isExternal:!0,href:"http://github.com/lstein/stable-diffusion",children:_(ohe,{},void 0,!1,{fileName:Mi,lineNumber:103,columnNumber:13},void 0)},void 0,!1,{fileName:Mi,lineNumber:102,columnNumber:11},void 0)},void 0,!1,{fileName:Mi,lineNumber:96,columnNumber:7},void 0),_(wo,{"aria-label":"Toggle Dark Mode",onClick:t,variant:"link",size:"sm",fontSize:v,icon:h},void 0,!1,{fileName:Mi,lineNumber:108,columnNumber:7},void 0)]},void 0,!0,{fileName:Mi,lineNumber:64,columnNumber:5},void 0)};var pc="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/common/components/SDNumberInput.tsx";const Zf=e=>{const{label:t,isDisabled:n=!1,fontSize:i="md",size:o="sm",width:c,isInvalid:u,...m}=e;return _(xc,{isDisabled:n,width:c,isInvalid:u,children:_(Sn,{gap:2,justifyContent:"space-between",alignItems:"center",children:[t&&_(Cc,{marginBottom:1,children:_(Gr,{fontSize:i,whiteSpace:"nowrap",children:t},void 0,!1,{fileName:pc,lineNumber:37,columnNumber:13},void 0)},void 0,!1,{fileName:pc,lineNumber:36,columnNumber:11},void 0),_(W8,{size:o,...m,keepWithinRange:!1,clampValueOnBlur:!0,children:[_(Y8,{fontSize:"md"},void 0,!1,{fileName:pc,lineNumber:48,columnNumber:11},void 0),_(G8,{children:[_(X8,{},void 0,!1,{fileName:pc,lineNumber:50,columnNumber:13},void 0),_(K8,{},void 0,!1,{fileName:pc,lineNumber:51,columnNumber:13},void 0)]},void 0,!0,{fileName:pc,lineNumber:49,columnNumber:11},void 0)]},void 0,!0,{fileName:pc,lineNumber:42,columnNumber:9},void 0)]},void 0,!0,{fileName:pc,lineNumber:34,columnNumber:7},void 0)},void 0,!1,{fileName:pc,lineNumber:33,columnNumber:5},void 0)};var Bx="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/common/components/SDSwitch.tsx";const Y2=e=>{const{label:t,isDisabled:n=!1,fontSize:i="md",size:o="md",width:c,...u}=e;return _(xc,{isDisabled:n,width:c,children:_(Sn,{justifyContent:"space-between",alignItems:"center",children:[t&&_(Cc,{fontSize:i,marginBottom:1,flexGrow:2,whiteSpace:"nowrap",children:t},void 0,!1,{fileName:Bx,lineNumber:30,columnNumber:11},void 0),_(wc,{size:o,...u},void 0,!1,{fileName:Bx,lineNumber:39,columnNumber:9},void 0)]},void 0,!0,{fileName:Bx,lineNumber:28,columnNumber:7},void 0)},void 0,!1,{fileName:Bx,lineNumber:27,columnNumber:5},void 0)};var xo="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/SeedVariationOptions.tsx";const Ihe=Br(e=>e.options,e=>({variationAmount:e.variationAmount,seedWeights:e.seedWeights,shouldGenerateVariations:e.shouldGenerateVariations,shouldRandomizeSeed:e.shouldRandomizeSeed,seed:e.seed,iterations:e.iterations}),{memoizeOptions:{resultEqualityCheck:Yr.exports.isEqual}}),Lhe=()=>{const{shouldGenerateVariations:e,variationAmount:t,seedWeights:n,shouldRandomizeSeed:i,seed:o,iterations:c}=mr(Ihe),u=Ga(),m=R=>u(fpe(Number(R))),h=R=>u(ype(R.target.checked)),v=R=>u(Fy(Number(R))),b=()=>u(Fy(Oz(OA,DA))),x=R=>u(mpe(R.target.checked)),w=R=>u(hpe(Number(R))),N=R=>u(fz(R.target.value));return _(Sn,{gap:2,direction:"column",children:[_(Zf,{label:"Images to generate",step:1,min:1,precision:0,onChange:m,value:c},void 0,!1,{fileName:xo,lineNumber:87,columnNumber:7},void 0),_(Y2,{label:"Randomize seed on generation",isChecked:i,onChange:h},void 0,!1,{fileName:xo,lineNumber:95,columnNumber:7},void 0),_(Sn,{gap:2,children:[_(Zf,{label:"Seed",step:1,precision:0,flexGrow:1,min:OA,max:DA,isDisabled:i,isInvalid:o<0&&e,onChange:v,value:o},void 0,!1,{fileName:xo,lineNumber:101,columnNumber:9},void 0),_(Dl,{size:"sm",isDisabled:i,onClick:b,children:_(Gr,{pl:2,pr:2,children:"Shuffle"},void 0,!1,{fileName:xo,lineNumber:118,columnNumber:11},void 0)},void 0,!1,{fileName:xo,lineNumber:113,columnNumber:9},void 0)]},void 0,!0,{fileName:xo,lineNumber:100,columnNumber:7},void 0),_(Y2,{label:"Generate variations",isChecked:e,width:"auto",onChange:x},void 0,!1,{fileName:xo,lineNumber:123,columnNumber:7},void 0),_(Zf,{label:"Variation amount",value:t,step:.01,min:0,max:1,isDisabled:!e,onChange:w},void 0,!1,{fileName:xo,lineNumber:129,columnNumber:7},void 0),_(xc,{isInvalid:e&&!(RO(n)||n===""),flexGrow:1,children:_(ay,{children:[_(Cc,{marginInlineEnd:0,marginBottom:1,children:_(Gr,{whiteSpace:"nowrap",children:"Seed Weights"},void 0,!1,{fileName:xo,lineNumber:147,columnNumber:13},void 0)},void 0,!1,{fileName:xo,lineNumber:146,columnNumber:11},void 0),_(Fk,{size:"sm",value:n,onChange:N},void 0,!1,{fileName:xo,lineNumber:149,columnNumber:11},void 0)]},void 0,!0,{fileName:xo,lineNumber:145,columnNumber:9},void 0)},void 0,!1,{fileName:xo,lineNumber:138,columnNumber:7},void 0)]},void 0,!0,{fileName:xo,lineNumber:86,columnNumber:5},void 0)};var Ap="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/common/components/SDSelect.tsx";const q2=e=>{const{label:t,isDisabled:n,validValues:i,size:o="sm",fontSize:c="md",marginBottom:u=1,whiteSpace:m="nowrap",...h}=e;return _(xc,{isDisabled:n,children:_(Sn,{justifyContent:"space-between",alignItems:"center",children:[_(Cc,{marginBottom:u,children:_(Gr,{fontSize:c,whiteSpace:m,children:t},void 0,!1,{fileName:Ap,lineNumber:34,columnNumber:11},void 0)},void 0,!1,{fileName:Ap,lineNumber:33,columnNumber:9},void 0),_(rF,{fontSize:c,size:o,...h,children:i.map(v=>typeof v=="string"||typeof v=="number"?_("option",{value:v,children:v},v,!1,{fileName:Ap,lineNumber:41,columnNumber:15},void 0):_("option",{value:v.value,children:v.key},v.value,!1,{fileName:Ap,lineNumber:45,columnNumber:15},void 0))},void 0,!1,{fileName:Ap,lineNumber:38,columnNumber:9},void 0)]},void 0,!0,{fileName:Ap,lineNumber:32,columnNumber:7},void 0)},void 0,!1,{fileName:Ap,lineNumber:31,columnNumber:5},void 0)};var Ux="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/SamplerOptions.tsx";const Fhe=Br(e=>e.options,e=>({steps:e.steps,cfgScale:e.cfgScale,sampler:e.sampler}),{memoizeOptions:{resultEqualityCheck:Yr.exports.isEqual}}),zhe=()=>{const e=Ga(),{steps:t,cfgScale:n,sampler:i}=mr(Fhe);return _(Sn,{gap:2,direction:"column",children:[_(Zf,{label:"Steps",min:1,step:1,precision:0,onChange:m=>e(iz(Number(m))),value:t},void 0,!1,{fileName:Ux,lineNumber:50,columnNumber:7},void 0),_(Zf,{label:"CFG scale",step:.5,onChange:m=>e(oz(Number(m))),value:n},void 0,!1,{fileName:Ux,lineNumber:58,columnNumber:7},void 0),_(q2,{label:"Sampler",value:i,onChange:m=>e(lz(m.target.value)),validValues:Vme},void 0,!1,{fileName:Ux,lineNumber:64,columnNumber:7},void 0)]},void 0,!0,{fileName:Ux,lineNumber:49,columnNumber:5},void 0)};var XR="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/ESRGANOptions.tsx";const Bhe=Br(e=>e.options,e=>({upscalingLevel:e.upscalingLevel,upscalingStrength:e.upscalingStrength}),{memoizeOptions:{resultEqualityCheck:Yr.exports.isEqual}}),Uhe=Br(e=>e.system,e=>({isESRGANAvailable:e.isESRGANAvailable}),{memoizeOptions:{resultEqualityCheck:Yr.exports.isEqual}}),$he=()=>{const e=Ga(),{upscalingLevel:t,upscalingStrength:n}=mr(Bhe),{isESRGANAvailable:i}=mr(Uhe);return _(Sn,{direction:"column",gap:2,children:[_(q2,{isDisabled:!i,label:"Scale",value:t,onChange:u=>e(NA(Number(u.target.value))),validValues:Gme},void 0,!1,{fileName:XR,lineNumber:67,columnNumber:7},void 0),_(Zf,{isDisabled:!i,label:"Strength",step:.05,min:0,max:1,onChange:u=>e(EA(Number(u))),value:n},void 0,!1,{fileName:XR,lineNumber:74,columnNumber:7},void 0)]},void 0,!0,{fileName:XR,lineNumber:66,columnNumber:5},void 0)};var FI="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/GFPGANOptions.tsx";const jhe=Br(e=>e.options,e=>({gfpganStrength:e.gfpganStrength}),{memoizeOptions:{resultEqualityCheck:Yr.exports.isEqual}}),Vhe=Br(e=>e.system,e=>({isGFPGANAvailable:e.isGFPGANAvailable}),{memoizeOptions:{resultEqualityCheck:Yr.exports.isEqual}}),Hhe=()=>{const e=Ga(),{gfpganStrength:t}=mr(jhe),{isGFPGANAvailable:n}=mr(Vhe);return _(Sn,{direction:"column",gap:2,children:_(Zf,{isDisabled:!n,label:"Strength",step:.05,min:0,max:1,onChange:o=>e(wA(Number(o))),value:t},void 0,!1,{fileName:FI,lineNumber:55,columnNumber:7},void 0)},void 0,!1,{fileName:FI,lineNumber:54,columnNumber:5},void 0)};var V0="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/OutputOptions.tsx";const Whe=Br(e=>e.options,e=>({height:e.height,width:e.width,seamless:e.seamless}),{memoizeOptions:{resultEqualityCheck:Yr.exports.isEqual}}),Ghe=()=>{const e=Ga(),{height:t,width:n,seamless:i}=mr(Whe);return _(Sn,{gap:2,direction:"column",children:[_(Sn,{gap:2,children:[_(q2,{label:"Width",value:n,flexGrow:1,onChange:m=>e(CA(Number(m.target.value))),validValues:Hme},void 0,!1,{fileName:V0,lineNumber:51,columnNumber:9},void 0),_(q2,{label:"Height",value:t,flexGrow:1,onChange:m=>e(sz(Number(m.target.value))),validValues:Wme},void 0,!1,{fileName:V0,lineNumber:58,columnNumber:9},void 0)]},void 0,!0,{fileName:V0,lineNumber:50,columnNumber:7},void 0),_(Y2,{label:"Seamless tiling",fontSize:"md",isChecked:i,onChange:m=>e(dpe(m.target.checked))},void 0,!1,{fileName:V0,lineNumber:66,columnNumber:7},void 0)]},void 0,!0,{fileName:V0,lineNumber:49,columnNumber:5},void 0)};var Yhe=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function sb(e,t){var n=qhe(e);if(typeof n.path!="string"){var i=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof i=="string"&&i.length>0?i:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function qhe(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var i=t.split(".").pop().toLowerCase(),o=Yhe.get(i);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}var Khe=[".DS_Store","Thumbs.db"];function Xhe(e){return vv(this,void 0,void 0,function(){return gv(this,function(t){return K2(e)&&Zhe(e.dataTransfer)?[2,tve(e.dataTransfer,e.type)]:Qhe(e)?[2,Jhe(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,eve(e)]:[2,[]]})})}function Zhe(e){return K2(e)}function Qhe(e){return K2(e)&&K2(e.target)}function K2(e){return typeof e=="object"&&e!==null}function Jhe(e){return IA(e.target.files).map(function(t){return sb(t)})}function eve(e){return vv(this,void 0,void 0,function(){var t;return gv(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(i){return i.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(i){return sb(i)})]}})})}function tve(e,t){return vv(this,void 0,void 0,function(){var n,i;return gv(this,function(o){switch(o.label){case 0:return e.items?(n=IA(e.items).filter(function(c){return c.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(nve))]):[3,2];case 1:return i=o.sent(),[2,zI(jz(i))];case 2:return[2,zI(IA(e.files).map(function(c){return sb(c)}))]}})})}function zI(e){return e.filter(function(t){return Khe.indexOf(t.name)===-1})}function IA(e){if(e===null)return[];for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,i=new Array(t);nn)return[!1,VI(n)];if(e.sizen)return[!1,VI(n)]}return[!0,null]}function Bp(e){return e!=null}function yve(e){var t=e.files,n=e.accept,i=e.minSize,o=e.maxSize,c=e.multiple,u=e.maxFiles,m=e.validator;return!c&&t.length>1||c&&u>=1&&t.length>u?!1:t.every(function(h){var v=Gz(h,n),b=zy(v,1),x=b[0],w=Yz(h,i,o),N=zy(w,1),R=N[0],O=m?m(h):null;return x&&R&&!O})}function X2(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function $x(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function WI(e){e.preventDefault()}function bve(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function Sve(e){return e.indexOf("Edge/")!==-1}function xve(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return bve(e)||Sve(e)}function su(){for(var e=arguments.length,t=new Array(e),n=0;n1?o-1:0),u=1;u InvokeAI Stable Diffusion Dream Server - + diff --git a/frontend/package.json b/frontend/package.json index 7b6992630c..fce53f625f 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -4,7 +4,7 @@ "version": "0.0.1", "type": "module", "scripts": { - "dev": "vite dev -m testing", + "dev": "vite dev", "build": "tsc && vite build", "build-dev": "tsc && vite build -m development", "preview": "vite preview" diff --git a/frontend/src/app/socketio/middleware.ts b/frontend/src/app/socketio/middleware.ts index f76adfe766..a78e3fa10c 100644 --- a/frontend/src/app/socketio/middleware.ts +++ b/frontend/src/app/socketio/middleware.ts @@ -24,20 +24,9 @@ import * as InvokeAI from '../invokeai'; export const socketioMiddleware = () => { const { hostname, port } = new URL(window.location.href); - if (import.meta.env.VITE_SOCKETIO_PORT !== undefined) { - console.log( - `Running in Vite dev mode, using socketio port ${ - import.meta.env.VITE_SOCKETIO_PORT - }` - ); - } - - const socketio = io( - `http://${hostname}:${import.meta.env.VITE_SOCKETIO_PORT || port}`, - { - timeout: 60000, - } - ); + const socketio = io(`http://${hostname}:9090`, { + timeout: 60000, + }); let areListenersSet = false; @@ -164,6 +153,7 @@ export const socketioMiddleware = () => { break; } + case 'socketio/cancelProcessing': { emitCancelProcessing(); break;