InvokeAI/invokeai/frontend/web/dist/assets/App-78495256.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

172 lines
940 KiB
JavaScript
Raw Normal View History

2023-08-31 14:35:17 +00:00
var iv=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var Pe=(e,t,n)=>(iv(e,t,"read from private field"),n?n.call(e):t.get(e)),rr=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},as=(e,t,n,r)=>(iv(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);var rd=(e,t,n,r)=>({set _(o){as(e,t,o,n)},get _(){return Pe(e,t,r)}}),da=(e,t,n)=>(iv(e,t,"access private method"),n);import{t as o7,a as rf,b as D_,S as A_,c as N_,d as T_,e as b1,f as $_,i as x1,g as s7,k as a7,h as i7,j as l7,l as Kw,m as L_,n as c7,o as u7,p as d7,q as f7,r as p7,s as h7,u as m7,v as g7,w as u,x as a,y as Yb,z as vh,A as v7,B as b7,C as x7,D as y7,P as w7,E as Jb,F as C7,G as S7,H as k7,I as j7,J as Te,K as _7,L as Me,M as _t,N as rt,O as of,Q as co,R as yr,T as Vr,U as Jn,V as Wl,W as Xi,X as Ht,Y as gs,Z as zc,_ as ui,$ as Lm,a0 as Zb,a1 as Cu,a2 as ar,a3 as P7,a4 as H,a5 as Xw,a6 as I7,a7 as F_,a8 as y1,a9 as sf,aa as E7,ab as z_,ac as B_,ad as xa,ae as O7,af as le,ag as Oe,ah as mn,ai as z,aj as M7,ak as Qw,al as R7,am as D7,an as A7,ao as Su,ap as se,aq as N7,ar as Cn,as as _n,at as Fe,au as $,av as ds,aw as ke,ax as jr,ay as H_,az as T7,aA as $7,aB as L7,aC as F7,aD as fs,aE as ex,aF as di,aG as Do,aH as Fm,aI as z7,aJ as B7,aK as Yw,aL as tx,aM as Ee,aN as $s,aO as H7,aP as W_,aQ as V_,aR as Jw,aS as W7,aT as V7,aU as U7,aV as Vl,aW as U_,aX as Sr,aY as G7,aZ as q7,a_ as K7,a$ as G_,b0 as uo,b1 as zm,b2 as X7,b3 as Zw,b4 as q_,b5 as Q7,b6 as Y7,b7 as J7,b8 as Z7,b9 as eR,ba as tR,bb as nR,bc as rR,bd as K_,be as oR,bf as sR,bg as aR,bh as iR,bi as nx,bj as lR,bk as cR,bl as uR,bm as fc,bn as dR,bo as fR,bp as pR,bq as hR,br as eC,bs as mR,bt as gR,bu as Fi,bv as Bm,bw as X_,bx as Q_,by as qo,bz as Y_,bA as vR,bB as El,bC as gd,bD as tC,bE as bR,bF as xR,bG as yR,bH as xp,bI as yp,bJ as od,bK as lv,bL as kd,bM as jd,bN as _d,bO as Pd,bP as nC,bQ as bh,bR as cv,bS as xh,bT as rC,bU as w1,bV as uv,bW as C1,bX as dv,bY as yh,bZ as oC,b_ as Ol,b$ as sC,c0 as Ml,c1 as aC,c2 as wh,c3 as Hm,c4 as wR,c5 as J_,c6 as S1,c7 as k1,c8 as Z_,c9 as CR,ca as j1,cb as SR,cc as _1,cd as kR,ce as P1,cf as rx,cg as ox,ch as sx,ci as ax,cj as Wm,ck as ix,cl as va,cm as e3,cn as t3,co as lx,cp as n3,cq as jR,cr as sd,cs as Rl,ct as r3,cu as o3,cv as iC,cw as _R,cx as PR,cy as IR,cz as Er,cA as ER,cB as Wr,cC as af,cD as Vm,cE as OR,cF as MR,cG as RR,cH as DR,cI as AR,cJ as NR,cK as TR,cL as $R,cM as LR,cN as FR,cO as lC,cP as cx,cQ as zR,cR as BR,cS as lf,cT as HR,cU as WR,cV as Um,cW as VR,cX as UR,cY as GR,cZ as ux,c_ as qR,c$ as xr,d0 as KR,d1 as XR,d2 as QR,d3 as Gm,d4 as YR,d5 as JR,d6 as ZR,d7 as Td,d8 as cC,d9 as Gs,da as s3,db as eD,dc as dx,dd as tD,de as uC,df as nD,dg as rD,dh as oD,di as a3,dj as sD,dk as i3,dl as aD,dm as iD,dn as lD,dp as cD,dq as uD,dr as dD,ds as fD,dt as pD,du as l3,dv as c3,dw as hD,dx as mD,dy as gD,dz as vD,dA as bD,dB as Ls,dC as xD,dD as ws,dE as yD,dF as wD,dG as CD,dH as SD,dI as kD,dJ as jD,dK as _D,dL as PD,dM as ID,dN as ED,dO as OD,dP as MD,dQ as RD,dR as DD,dS as AD,dT as ND,dU as dC,dV as TD,dW as fC,dX as $D,dY as LD,dZ as FD,d_ as zD,d$ as BD,e0 as HD,e1 as pC,e2 as hC,e3 as mC,e4 as fx,e5 as WD,e6 as As,e7 as $d,e8 as zs,e9 as VD,ea as UD,eb as u3,ec as d3,ed as GD,ee as gC,ef as vC,eg as bC,eh as xC,ei as qD,ej as KD,ek as yC,el as XD,em as QD,en as Ch,eo as YD,ep as wC,eq as wp,er as CC,es as SC,et as JD,eu as ZD,ev as eA,ew as f3,ex as tA,ey as nA,ez as kC,eA as rA,eB as jC,eC as oA,eD as p3,eE as h3,eF as cf,eG as m3,eH as vl,eI as g3,eJ as _C,eK as sA,eL as aA,eM as v3,eN as iA,eO as lA,eP as cA,eQ as uA,eR as dA,eS as px,eT as I1,eU as PC,eV as Ul,eW as fA,eX as pA,eY as b3,eZ as Sh,e_ as hx,e$ as x3,f0 as hA,f1 as Qa,f2 as y3,f3 as mA,f4 as gA,f5 as vA,f6 as bA,f7 as xA,f8 as yA,f9 as wA,fa as mx,fb as vd,fc as Dc,fd as CA,fe as SA,ff as kA,fg as jA,fh as _A,fi as PA,fj as IA,fk as EA,fl as OA,fm as MA,fn as RA,fo as DA,fp as AA,fq as NA,fr as TA,fs as $A,ft as LA,fu as FA,fv as IC,fw as zA,fx as BA,fy as HA,fz as WA,fA
M${M.x},${M.y}h${M.width}v${M.height}h${-M.width}z`,fill:f,fillRule:"evenodd",stroke:p,strokeWidth:h,pointerEvents:"none"})]})})}E3.displayName="MiniMap";var z9=u.memo(E3),Bs;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(Bs||(Bs={}));function B9({color:e,dimensions:t,lineWidth:n}){return a.jsx("path",{stroke:e,strokeWidth:n,d:`M${t[0]/2} 0 V${t[1]} M0 ${t[1]/2} H${t[0]}`})}function H9({color:e,radius:t}){return a.jsx("circle",{cx:t,cy:t,r:t,fill:e})}const W9={[Bs.Dots]:"#91919a",[Bs.Lines]:"#eee",[Bs.Cross]:"#e2e2e2"},V9={[Bs.Dots]:1,[Bs.Lines]:1,[Bs.Cross]:6},U9=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function O3({id:e,variant:t=Bs.Dots,gap:n=20,size:r,lineWidth:o=1,offset:s=2,color:i,style:c,className:f}){const p=u.useRef(null),{transform:h,patternId:m}=vh(U9,Jb),v=i||W9[t],b=r||V9[t],y=t===Bs.Dots,x=t===Bs.Cross,C=Array.isArray(n)?n:[n,n],k=[C[0]*h[2]||1,C[1]*h[2]||1],j=b*h[2],_=x?[j,j]:k,I=y?[j/s,j/s]:[_[0]/s,_[1]/s];return a.jsxs("svg",{className:Yb(["react-flow__background",f]),style:{...c,position:"absolute",width:"100%",height:"100%",top:0,left:0},ref:p,"data-testid":"rf__background",children:[a.jsx("pattern",{id:m+e,x:h[0]%k[0],y:h[1]%k[1],width:k[0],height:k[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${I[0]},-${I[1]})`,children:y?a.jsx(H9,{color:v,radius:j/s}):a.jsx(B9,{dimensions:_,color:v,lineWidth:o})}),a.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${m+e})`})]})}O3.displayName="Background";var G9=u.memo(O3);function q9(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var K9=q9();const M3=1/60*1e3,X9=typeof performance<"u"?()=>performance.now():()=>Date.now(),R3=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(X9()),M3);function Q9(e){let t=[],n=[],r=0,o=!1,s=!1;const i=new WeakSet,c={schedule:(f,p=!1,h=!1)=>{const m=h&&o,v=m?t:n;return p&&i.add(f),v.indexOf(f)===-1&&(v.push(f),m&&o&&(r=t.length)),f},cancel:f=>{const p=n.indexOf(f);p!==-1&&n.splice(p,1),i.delete(f)},process:f=>{if(o){s=!0;return}if(o=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let p=0;p<r;p++){const h=t[p];h(f),i.has(h)&&(c.schedule(h),e())}o=!1,s&&(s=!1,c.process(f))}};return c}const Y9=40;let M1=!0,Ld=!1,R1=!1;const Hc={delta:0,timestamp:0},df=["read","update","preRender","render","postRender"],qm=df.reduce((e,t)=>(e[t]=Q9(()=>Ld=!0),e),{}),J9=df.reduce((e,t)=>{const n=qm[t];return e[t]=(r,o=!1,s=!1)=>(Ld||tT(),n.schedule(r,o,s)),e},{}),Z9=df.reduce((e,t)=>(e[t]=qm[t].cancel,e),{});df.reduce((e,t)=>(e[t]=()=>qm[t].process(Hc),e),{});const eT=e=>qm[e].process(Hc),D3=e=>{Ld=!1,Hc.delta=M1?M3:Math.max(Math.min(e-Hc.timestamp,Y9),1),Hc.timestamp=e,R1=!0,df.forEach(eT),R1=!1,Ld&&(M1=!1,R3(D3))},tT=()=>{Ld=!0,M1=!0,R1||R3(D3)},FC=()=>Hc;function ff(e){const{viewBox:t="0 0 24 24",d:n,displayName:r,defaultProps:o={}}=e,s=u.Children.toArray(e.path),i=Te((c,f)=>a.jsx(Tr,{ref:f,viewBox:t,...o,...c,children:s.length?s:a.jsx("path",{fill:"currentColor",d:n})}));return i.displayName=r,i}function A3(e){const{theme:t}=_7(),n=s9();return u.useMemo(()=>a9(t.direction,{...n,...e}),[e,t.direction,n])}var nT=Object.defineProperty,rT=(e,t,n)=>t in e?nT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,gr=(e,t,n)=>(rT(e,typeof t!="symbol"?t+"":t,n),n);function zC(e){return e.sort((t,n)=>{const r=t.compareDocumentPosition(n);if(r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY)return-1;if(r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS)return 1;if(r&Node.DOCUMENT_POSITION_DISCONNECTED||r&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)throw Error("Cannot sort the given nodes.");return 0})}var oT=e=>typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE;function BC(e,t,n){let r=e+1;return n&&r>=t&&(r=0),r}function HC(e,t,n){let r=e-1;return n&&r<0&&(r=t),r}var D1=typeof window<"u"?u.useLayoutEffect:u.useEffect,_h=e=>e,sT=class{constructor(){gr(this,"descendants",new Map),gr(this,"register",e=>{if(e!=null)return oT(e)?this.registerNode(e):t=>{this.registerNode(t,e)}}
`})}function CT(e){of({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}function jc(e){const{isOpen:t,isDisabled:n}=bx(),{reduceMotion:r}=xx(),o=_t("chakra-accordion__icon",e.className),s=Km(),i={opacity:n?.4:1,transform:t?"rotate(-180deg)":void 0,transition:r?void 0:"transform 0.2s",transformOrigin:"center",...s.icon};return a.jsx(Tr,{viewBox:"0 0 24 24","aria-hidden":!0,className:o,__css:i,...e,children:a.jsx("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})})}jc.displayName="AccordionIcon";var _c=Te(function(t,n){const{children:r,className:o}=t,{htmlProps:s,...i}=bT(t),f={...Km().container,overflowAnchor:"none"},p=u.useMemo(()=>i,[i]);return a.jsx(fT,{value:p,children:a.jsx(Me.div,{ref:n,...s,className:_t("chakra-accordion__item",o),__css:f,children:typeof r=="function"?r({isExpanded:!!i.isOpen,isDisabled:!!i.isDisabled}):r})})});_c.displayName="AccordionItem";var Ac={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},yl={enter:{duration:.2,ease:Ac.easeOut},exit:{duration:.1,ease:Ac.easeIn}},Ja={enter:(e,t)=>({...e,delay:typeof t=="number"?t:t==null?void 0:t.enter}),exit:(e,t)=>({...e,delay:typeof t=="number"?t:t==null?void 0:t.exit})},ST=e=>e!=null&&parseInt(e.toString(),10)>0,WC={exit:{height:{duration:.2,ease:Ac.ease},opacity:{duration:.3,ease:Ac.ease}},enter:{height:{duration:.3,ease:Ac.ease},opacity:{duration:.4,ease:Ac.ease}}},kT={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:o})=>{var s;return{...e&&{opacity:ST(t)?1:0},height:t,transitionEnd:r==null?void 0:r.exit,transition:(s=n==null?void 0:n.exit)!=null?s:Ja.exit(WC.exit,o)}},enter:({animateOpacity:e,endingHeight:t,transition:n,transitionEnd:r,delay:o})=>{var s;return{...e&&{opacity:1},height:t,transitionEnd:r==null?void 0:r.enter,transition:(s=n==null?void 0:n.enter)!=null?s:Ja.enter(WC.enter,o)}}},Xm=u.forwardRef((e,t)=>{const{in:n,unmountOnExit:r,animateOpacity:o=!0,startingHeight:s=0,endingHeight:i="auto",style:c,className:f,transition:p,transitionEnd:h,...m}=e,[v,b]=u.useState(!1);u.useEffect(()=>{const j=setTimeout(()=>{b(!0)});return()=>clearTimeout(j)},[]),of({condition:Number(s)>0&&!!r,message:"startingHeight and unmountOnExit are mutually exclusive. You can't use them together"});const y=parseFloat(s.toString())>0,x={startingHeight:s,endingHeight:i,animateOpacity:o,transition:v?p:{enter:{duration:0}},transitionEnd:{enter:h==null?void 0:h.enter,exit:r?h==null?void 0:h.exit:{...h==null?void 0:h.exit,display:y?"block":"none"}}},C=r?n:!0,k=n||r?"enter":"exit";return a.jsx(co,{initial:!1,custom:x,children:C&&a.jsx(yr.div,{ref:t,...m,className:_t("chakra-collapse",f),style:{overflow:"hidden",display:"block",...c},custom:x,variants:kT,initial:r?"exit":!1,animate:k,exit:"exit"})})});Xm.displayName="Collapse";var jT={enter:({transition:e,transitionEnd:t,delay:n}={})=>{var r;return{opacity:1,transition:(r=e==null?void 0:e.enter)!=null?r:Ja.enter(yl.enter,n),transitionEnd:t==null?void 0:t.enter}},exit:({transition:e,transitionEnd:t,delay:n}={})=>{var r;return{opacity:0,transition:(r=e==null?void 0:e.exit)!=null?r:Ja.exit(yl.exit,n),transitionEnd:t==null?void 0:t.exit}}},T3={initial:"exit",animate:"enter",exit:"exit",variants:jT},_T=u.forwardRef(function(t,n){const{unmountOnExit:r,in:o,className:s,transition:i,transitionEnd:c,delay:f,...p}=t,h=o||r?"enter":"exit",m=r?o&&r:!0,v={transition:i,transitionEnd:c,delay:f};return a.jsx(co,{custom:v,children:m&&a.jsx(yr.div,{ref:n,className:_t("chakra-fade",s),custom:v,...T3,animate:h,...p})})});_T.displayName="Fade";var PT={exit:({reverse:e,initialScale:t,transition:n,transitionEnd:r,delay:o})=>{var s;return{opacity:0,...e?{scale:t,transitionEnd:r==null?void 0:r.exit}:{transitionEnd:{scale:t,...r==null?void 0:r.exit}},transition:(s=n==null?void 0:n.exit)!=null?s:Ja.exit(yl.exit,o)}},enter:({transitionEnd:e,transition:t,delay:n})=>{var r;return{opacity:1,scale:1,transition:(r=t==null?void 0:t.enter)!=null?r:Ja.enter(yl.enter,n),transitionEnd:e==null?void 0:e.enter}}},$3={initial:"exit",animate
.`.concat(oB,` {
overflow: hidden `).concat(r,`;
padding-right: `).concat(c,"px ").concat(r,`;
}
body {
overflow: hidden `).concat(r,`;
overscroll-behavior: contain;
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
padding-left: `.concat(o,`px;
padding-top: `).concat(s,`px;
padding-right: `).concat(i,`px;
margin-left:0;
margin-top:0;
margin-right: `).concat(c,"px ").concat(r,`;
`),n==="padding"&&"padding-right: ".concat(c,"px ").concat(r,";")].filter(Boolean).join(""),`
}
.`).concat(ah,` {
right: `).concat(c,"px ").concat(r,`;
}
.`).concat(ih,` {
margin-right: `).concat(c,"px ").concat(r,`;
}
.`).concat(ah," .").concat(ah,` {
right: 0 `).concat(r,`;
}
.`).concat(ih," .").concat(ih,` {
margin-right: 0 `).concat(r,`;
}
body {
`).concat(sB,": ").concat(c,`px;
}
`)},vB=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r,s=u.useMemo(function(){return hB(o)},[o]);return u.createElement(mB,{styles:gB(s,!t,o,n?"":"!important")})},Q1=!1;if(typeof window<"u")try{var _p=Object.defineProperty({},"passive",{get:function(){return Q1=!0,!0}});window.addEventListener("test",_p,_p),window.removeEventListener("test",_p,_p)}catch{Q1=!1}var vc=Q1?{passive:!1}:!1,bB=function(e){return e.tagName==="TEXTAREA"},pP=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!bB(e)&&n[t]==="visible")},xB=function(e){return pP(e,"overflowY")},yB=function(e){return pP(e,"overflowX")},bS=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=hP(e,r);if(o){var s=mP(e,r),i=s[1],c=s[2];if(i>c)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},wB=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},CB=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},hP=function(e,t){return e==="v"?xB(t):yB(t)},mP=function(e,t){return e==="v"?wB(t):CB(t)},SB=function(e,t){return e==="h"&&t==="rtl"?-1:1},kB=function(e,t,n,r,o){var s=SB(e,window.getComputedStyle(t).direction),i=s*r,c=n.target,f=t.contains(c),p=!1,h=i>0,m=0,v=0;do{var b=mP(e,c),y=b[0],x=b[1],C=b[2],k=x-C-s*y;(y||k)&&hP(e,c)&&(m+=k,v+=y),c=c.parentNode}while(!f&&c!==document.body||f&&(t.contains(c)||t===c));return(h&&(o&&m===0||!o&&i>m)||!h&&(o&&v===0||!o&&-i>v))&&(p=!0),p},Pp=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},xS=function(e){return[e.deltaX,e.deltaY]},yS=function(e){return e&&"current"in e?e.current:e},jB=function(e,t){return e[0]===t[0]&&e[1]===t[1]},_B=function(e){return`
.block-interactivity-`.concat(e,` {pointer-events: none;}
.allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},PB=0,bc=[];function IB(e){var t=u.useRef([]),n=u.useRef([0,0]),r=u.useRef(),o=u.useState(PB++)[0],s=u.useState(fP)[0],i=u.useRef(e);u.useEffect(function(){i.current=e},[e]),u.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var x=B1([e.lockRef.current],(e.shards||[]).map(yS),!0).filter(Boolean);return x.forEach(function(C){return C.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),x.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var c=u.useCallback(function(x,C){if("touches"in x&&x.touches.length===2)return!i.current.allowPinchZoom;var k=Pp(x),j=n.current,_="deltaX"in x?x.deltaX:j[0]-k[0],I="deltaY"in x?x.deltaY:j[1]-k[1],O,E=x.target,M=Math.abs(_)>Math.abs(I)?"h":"v";if("touches"in x&&M==="h"&&E.type==="range")return!1;var R=bS(M,E);if(!R)return!0;if(R?O=M:(O=M==="v"?"h":"v",R=bS(M,E)),!R)return!1;if(!r.current&&"changedTouches"in x&&(_||I)&&(r.current=O),!O)return!0;var A=r.current||O;return kB(A,C,x,A==="h"?_:I,!0)},[]),f=u.useCallback(function(x){var C=x;if(!(!bc.length||bc[bc.length-1]!==s)){var k="deltaY"in C?xS(C):Pp(C),j=t.current.filter(function(O){return O.name===C.type&&O.target===C.target&&jB(O.delta,k)})[0];if(j&&j.should){C.cancelable&&C.preventDefault();return}if(!j){var _=(i.current.shards||[]).map(yS).filter(Boolean).filter(function(O){return O.contains(C.target)}),I=_.length>0?c(C,_[0]):!i.current.noIsolation;I&&C.cancelable&&C.preventDefault()}}},[]),p=u.useCallback(function(x,C,k,j){var _={name:x,delta:C,target:k,should:j};t.current.push(_),setTimeout(function(){t.current=t.current.filter(function(I){return I!==_})},1)},[]),h=u.useCallback(function(x){n.current=Pp(x),r.current=void 0},[]),m=u.useCallback(function(x){p(x.type,xS(x),x.target,c(x,e.lockRef.current))},[]),v=u.useCallback(function(x){p(x.type,Pp(x),x.target,c(x,e.lockRef.current))},[]);u.useEffect(function(){return bc.push(s),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:v}),document.addEventListener("wheel",f,vc),document.addEventListener("touchmove",f,vc),document.addEventListener("touchstart",h,vc),function(){bc=bc.filter(function(x){return x!==s}),document.removeEventListener("wheel",f,vc),document.removeEventListener("touchmove",f,vc),document.removeEventListener("touchstart",h,vc)}},[]);var b=e.removeScrollBar,y=e.inert;return u.createElement(u.Fragment,null,y?u.createElement(s,{styles:_B(o)}):null,b?u.createElement(vB,{gapMode:e.gapMode}):null)}const EB=P$(dP,IB);var gP=u.forwardRef(function(e,t){return u.createElement(sg,ba({},e,{ref:t,sideCar:EB}))});gP.classNames=sg.classNames;const OB=gP;function MB(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:o,blockScrollOnMount:s,allowPinchZoom:i,finalFocusRef:c,returnFocusOnClose:f,preserveScrollBarGap:p,lockFocusAcrossFrames:h,isOpen:m}=Nl(),[v,b]=E7();u.useEffect(()=>{!v&&b&&setTimeout(b)},[v,b]);const y=cP(r,m);return a.jsx($5,{autoFocus:t,isDisabled:!n,initialFocusRef:o,finalFocusRef:c,restoreFocus:f,contentRef:r,lockFocusAcrossFrames:h,children:a.jsx(OB,{removeScrollBar:!p,allowPinchZoom:i,enabled:y===1&&s,forwardProps:!0,children:e.children})})}var $l=Te((e,t)=>{const{className:n,children:r,containerProps:o,motionProps:s,...i}=e,{getDialogProps:c,getDialogContainerProps:f}=Nl(),p=c(i,t),h=f(o),m=_t("chakra-modal__content",n),v=Iu(),b={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...v.dialog},y={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...v.dialogContainer},{motionPreset:x}=Nl();return a.jsx(MB,{children:a.jsx(Me.div,{...h,className:"chakra-modal__content-container",tabIndex:-1,__css:y,children:a.jsx(lP,{preset:x,motionProps:s,className:m,...p,__css:b,children:r})})})});$l.displayName="ModalContent";function Cf(e){const{leastDestructiveRef:t,...n}=e;return a.jsx(Tl,{...n,initialFocusRef:t})}var Sf=Te((e,t)=>a.jsx($l,{ref:t,role:"alertdialog",...e})),ka=Te((e,t)=>{const{className:
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function AW(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function NW(e){if(Array.isArray(e))return ob(e)}function ES(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function OS(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ES(Object(n),!0).forEach(function(r){UP(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ES(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function UP(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vd(e,t){return LW(e)||$W(e,t)||GP(e,t)||TW()}function TW(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function GP(e,t){if(e){if(typeof e=="string")return ob(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ob(e,t)}}function ob(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function $W(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,s=!1,i,c;try{for(n=n.call(e);!(o=(i=n.next()).done)&&(r.push(i.value),!(t&&r.length===t));o=!0);}catch(f){s=!0,c=f}finally{try{!o&&n.return!=null&&n.return()}finally{if(s)throw c}}return r}}function LW(e){if(Array.isArray(e))return e}var FW="file-invalid-type",zW="file-too-large",BW="file-too-small",HW="too-many-files",WW=function(t){t=Array.isArray(t)&&t.length===1?t[0]:t;var n=Array.isArray(t)?"one of ".concat(t.join(", ")):t;return{code:FW,message:"File type must be ".concat(n)}},MS=function(t){return{code:zW,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},RS=function(t){return{code:BW,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},VW={code:HW,message:"Too many files"};function qP(e,t){var n=e.type==="application/x-moz-file"||RW(e,t);return[n,n?null:WW(t)]}function KP(e,t,n){if(ml(e.size))if(ml(t)&&ml(n)){if(e.size>n)return[!1,MS(n)];if(e.size<t)return[!1,RS(t)]}else{if(ml(t)&&e.size<t)return[!1,RS(t)];if(ml(n)&&e.size>n)return[!1,MS(n)]}return[!0,null]}function ml(e){return e!=null}function UW(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,s=e.multiple,i=e.maxFiles,c=e.validator;return!s&&t.length>1||s&&i>=1&&t.length>i?!1:t.every(function(f){var p=qP(f,n),h=Vd(p,1),m=h[0],v=KP(f,r,o),b=Vd(v,1),y=b[0],x=c?c(f):null;return m&&y&&!x})}function Th(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Ep(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 DS(e){e.preventDefault()}function GW(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function qW(e){return e.indexOf("Edge/")!==-1}function KW(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return GW(e)||qW(e)}function fa(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var o=arguments.length,s=new Array(o>1?o-1:0),i=1;i<o;i++)s[i-1]=arguments[i];return t.some(function(c){return!Th(r)&&c&&c.apply(void 0,[r].concat(s)),Th(r)})}}function XW(){return"showOpenFilePicker"in window}function QW(e){if(ml(e)){var t=Object.entries(e).filter(function(n){var r=Vd(n,2),o=r[0],s=r[1],i=!0;return XP(o)||(console.warn('Skipped "'.concat(o,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),i=!1),(!Array.isArray(s)||!s.every(QP))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),i=!1),i}).reduce(function(n,r){var o=Vd(r,2),s=o[0],i=o[1];return OS(OS({},n),{},UP({},s,i))},{});return[{description:"Files",accept:t}]}return e}function YW(e){if(ml(e))return Object.entries(e).reduce(function(t,n){var r=Vd(n,2),o=r[0],s=r[1];return[].concat(IS(t),[o],IS(s))},[]).filter(function(t){return XP(t)||QP(t)}).join(",")}function JW(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function ZW(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function XP(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function QP(e){return/^.*\.[\w]+$/.test(e)}var eV=["children"],tV=["open"],nV=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDr
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function aV(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function iV(e){if(Array.isArray(e))return sb(e)}function Av(e,t){return uV(e)||cV(e,t)||YP(e,t)||lV()}function lV(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function YP(e,t){if(e){if(typeof e=="string")return sb(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return sb(e,t)}}function sb(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function cV(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,s=!1,i,c;try{for(n=n.call(e);!(o=(i=n.next()).done)&&(r.push(i.value),!(t&&r.length===t));o=!0);}catch(f){s=!0,c=f}finally{try{!o&&n.return!=null&&n.return()}finally{if(s)throw c}}return r}}function uV(e){if(Array.isArray(e))return e}function AS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function ur(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?AS(Object(n),!0).forEach(function(r){ab(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AS(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ab(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $h(e,t){if(e==null)return{};var n=dV(e,t),r,o;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o<s.length;o++)r=s[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function dV(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var ay=u.forwardRef(function(e,t){var n=e.children,r=$h(e,eV),o=iy(r),s=o.open,i=$h(o,tV);return u.useImperativeHandle(t,function(){return{open:s}},[s]),H.createElement(u.Fragment,null,n(ur(ur({},i),{},{open:s})))});ay.displayName="Dropzone";var JP={disabled:!1,getFilesFromEvent:SW,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};ay.defaultProps=JP;ay.propTypes={children:zn.func,accept:zn.objectOf(zn.arrayOf(zn.string)),multiple:zn.bool,preventDropOnDocument:zn.bool,noClick:zn.bool,noKeyboard:zn.bool,noDrag:zn.bool,noDragEventsBubbling:zn.bool,minSize:zn.number,maxSize:zn.number,maxFiles:zn.number,disabled:zn.bool,getFilesFromEvent:zn.func,onFileDialogCancel:zn.func,onFileDialogOpen:zn.func,useFsAccessApi:zn.bool,autoFocus:zn.bool,onDragEnter:zn.func,onDragLeave:zn.func,onDragOver:zn.func,onDrop:zn.func,onDropAccepted:zn.func,onDropRejected:zn.func,onError:zn.func,validator:zn.func};var ib={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function iy(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=ur(ur({},JP),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,s=t.maxSize,i=t.minSize,c=t.multiple,f=t.maxFiles,p=t.onDragEnter,h=t.onDragLeave,m=t.onDragOver,v=t.onDrop,b=t.onDropAccepted,y=t.onDropRejected,x=t.onFileDialogCancel,C=t.onFileDialogOpen,k=t.useFsAccessApi,j=t.autoFocus,_=t.preventDropOnDocument,I=t.noClick,O=t.noKeyboard,E=t.noDrag,M=t.noDragEventsBubbling,R=t.onError,A=t.validator,D=u.useMemo(function(){return YW(n)},[n]),T=u.useMemo(function(){return QW(n)},[n]),K=u.useMemo(function(){return typeof C=="function"?C:NS},[C]),B=u.useMemo(function(){return typeof x=="function"?x:NS},[x]),G=u.useRef(null),Q=u.useRef(null),V=u.useReducer(fV,ib),L=Av(V,2),X=L[0],F=L[1],q=X.isFocused,te=X.isFileDialogActive,Y=u.useRef(typeof window<"u"&&window.isSecureContext&&k&&XW()),ce=function(){!Y.current&&te&&setTimeout(function(){if(Q.current){var We=Q.current.files;We.length||(F({type:"closeDialog"}),B())}},300)};u.useEffect(function
`),status:"error"})},[i,s]),m=u.useCallback(async _=>{p({file:_,image_category:"user",is_intermediate:!1,postUploadAction:r,board_id:n==="none"?void 0:n})},[n,r,p]),v=u.useCallback((_,I)=>{if(I.length>1){s({title:i("toast.uploadFailed"),description:i("toast.uploadFailedInvalidUploadDesc"),status:"error"});return}I.forEach(O=>{h(O)}),_.forEach(O=>{m(O)})},[i,s,m,h]),{getRootProps:b,getInputProps:y,isDragAccept:x,isDragReject:C,isDragActive:k,inputRef:j}=iy({accept:{"image/png":[".png"],"image/jpeg":[".jpg",".jpeg",".png"]},noClick:!0,onDrop:v,onDragOver:()=>f(!0),disabled:o,multiple:!1});return u.useEffect(()=>{const _=async I=>{var O,E;j.current&&(O=I.clipboardData)!=null&&O.files&&(j.current.files=I.clipboardData.files,(E=j.current)==null||E.dispatchEvent(new Event("change",{bubbles:!0})))};return document.addEventListener("paste",_),()=>{document.removeEventListener("paste",_)}},[j]),a.jsxs(Fe,{...b({style:{}}),onKeyDown:_=>{_.key},children:[a.jsx("input",{...y()}),t,a.jsx(co,{children:k&&c&&a.jsx(yr.div,{initial:{opacity:0},animate:{opacity:1,transition:{duration:.1}},exit:{opacity:0,transition:{duration:.1}},children:a.jsx(PV,{isDragAccept:x,isDragReject:C,setIsHandlingUpload:f})},"image-upload-overlay")})]})},OV=u.memo(EV),MV=Te((e,t)=>{const{children:n,tooltip:r="",tooltipProps:{placement:o="top",hasArrow:s=!0,...i}={},isChecked:c,...f}=e;return a.jsx(Mn,{label:r,placement:o,hasArrow:s,...i,children:a.jsx(iu,{ref:t,colorScheme:c?"accent":"base",...f,children:n})})}),Wt=u.memo(MV);function RV(e){const t=u.createContext(null);return[({children:o,value:s})=>H.createElement(t.Provider,{value:s},o),()=>{const o=u.useContext(t);if(o===null)throw new Error(e);return o}]}function oI(e){return Array.isArray(e)?e:[e]}const DV=()=>{};function AV(e,t={active:!0}){return typeof e!="function"||!t.active?t.onKeyDown||DV:n=>{var r;n.key==="Escape"&&(e(n),(r=t.onTrigger)==null||r.call(t))}}function sI({data:e}){const t=[],n=[],r=e.reduce((o,s,i)=>(s.group?o[s.group]?o[s.group].push(i):o[s.group]=[i]:n.push(i),o),{});return Object.keys(r).forEach(o=>{t.push(...r[o].map(s=>e[s]))}),t.push(...n.map(o=>e[o])),t}function aI(e){return Array.isArray(e)||e===null?!1:typeof e=="object"?e.type!==H.Fragment:!1}function iI(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=iI(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function lI(){for(var e=0,t,n,r="";e<arguments.length;)(t=arguments[e++])&&(n=iI(t))&&(r&&(r+=" "),r+=n);return r}const NV={app:100,modal:200,popover:300,overlay:400,max:9999};function cy(e){return NV[e]}function TV(e,t){const n=u.useRef();return(!n.current||t.length!==n.current.prevDeps.length||n.current.prevDeps.map((r,o)=>r===t[o]).indexOf(!1)>=0)&&(n.current={v:e(),prevDeps:[...t]}),n.current.v}const $V=T7({key:"mantine",prepend:!0});function LV(){return P3()||$V}var FV=Object.defineProperty,$S=Object.getOwnPropertySymbols,zV=Object.prototype.hasOwnProperty,BV=Object.prototype.propertyIsEnumerable,LS=(e,t,n)=>t in e?FV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,HV=(e,t)=>{for(var n in t||(t={}))zV.call(t,n)&&LS(e,n,t[n]);if($S)for(var n of $S(t))BV.call(t,n)&&LS(e,n,t[n]);return e};const $v="ref";function WV(e){let t;if(e.length!==1)return{args:e,ref:t};const[n]=e;if(!(n instanceof Object))return{args:e,ref:t};if(!($v in n))return{args:e,ref:t};t=n[$v];const r=HV({},n);return delete r[$v],{args:[r],ref:t}}const{cssFactory:VV}=(()=>{function e(n,r,o){const s=[],i=F7(n,s,o);return s.length<2?o:i+r(s)}function t(n){const{cache:r}=n,o=(...i)=>{const{ref:c,args:f}=WV(i),p=$7(f,r.registered);return L7(r,p,!1),`${r.key}-${p.name}${c===void 0?"":` ${c}`}`};return{css:o,cx:(...i)=>e(r.registered,o,lI(i))}}return{cssFactory:t}})();function cI(){const e=LV();return TV(()=>VV({cache:e}),[e])}function UV({cx:e,classes:t,context:n,classNames:r,name:o,cache:s}){const i=n.reduce((c,f)=>(Object.keys(f.classNames).forEach(p=>{typeof c[p]!="string"?c[p]=`${f.classNames[p]}`:c[p]=`${c[p]} ${f.classNam
* OverlayScrollbars
* Version: 2.2.1
*
* Copyright (c) Rene Haas | KingSora.
* https://github.com/KingSora
*
* Released under the MIT license.
*/function Pn(e,t){if(Dg(e))for(let n=0;n<e.length&&t(e[n],n,e)!==!1;n++);else e&&Pn(Object.keys(e),n=>t(e[n],n,e));return e}function io(e,t){const n=el(t);if(Js(t)||n){let o=n?"":{};if(e){const s=window.getComputedStyle(e,null);o=n?Gk(e,s,t):t.reduce((i,c)=>(i[c]=Gk(e,s,c),i),o)}return o}e&&Pn(Qo(t),o=>IZ(e,o,t[o]))}const Ns=(e,t)=>{const{o:n,u:r,_:o}=e;let s=n,i;const c=(h,m)=>{const v=s,b=h,y=m||(r?!r(v,b):v!==b);return(y||o)&&(s=b,i=v),[s,y,i]};return[t?h=>c(t(s,i),h):c,h=>[s,!!h,i]]},Of=()=>typeof window<"u",XE=Of()&&Node.ELEMENT_NODE,{toString:pZ,hasOwnProperty:Uv}=Object.prototype,gi=e=>e===void 0,Rg=e=>e===null,hZ=e=>gi(e)||Rg(e)?`${e}`:pZ.call(e).replace(/^\[object (.+)\]$/,"$1").toLowerCase(),Hi=e=>typeof e=="number",el=e=>typeof e=="string",ky=e=>typeof e=="boolean",Ys=e=>typeof e=="function",Js=e=>Array.isArray(e),qd=e=>typeof e=="object"&&!Js(e)&&!Rg(e),Dg=e=>{const t=!!e&&e.length,n=Hi(t)&&t>-1&&t%1==0;return Js(e)||!Ys(e)&&n?t>0&&qd(e)?t-1 in e:!0:!1},yb=e=>{if(!e||!qd(e)||hZ(e)!=="object")return!1;let t;const n="constructor",r=e[n],o=r&&r.prototype,s=Uv.call(e,n),i=o&&Uv.call(o,"isPrototypeOf");if(r&&!s&&!i)return!1;for(t in e);return gi(t)||Uv.call(e,t)},Sm=e=>{const t=HTMLElement;return e?t?e instanceof t:e.nodeType===XE:!1},Ag=e=>{const t=Element;return e?t?e instanceof t:e.nodeType===XE:!1},jy=(e,t,n)=>e.indexOf(t,n),Nn=(e,t,n)=>(!n&&!el(t)&&Dg(t)?Array.prototype.push.apply(e,t):e.push(t),e),zl=e=>{const t=Array.from,n=[];return t&&e?t(e):(e instanceof Set?e.forEach(r=>{Nn(n,r)}):Pn(e,r=>{Nn(n,r)}),n)},_y=e=>!!e&&e.length===0,Aa=(e,t,n)=>{Pn(e,o=>o&&o.apply(void 0,t||[])),!n&&(e.length=0)},Ng=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),Qo=e=>e?Object.keys(e):[],fr=(e,t,n,r,o,s,i)=>{const c=[t,n,r,o,s,i];return(typeof e!="object"||Rg(e))&&!Ys(e)&&(e={}),Pn(c,f=>{Pn(Qo(f),p=>{const h=f[p];if(e===h)return!0;const m=Js(h);if(h&&(yb(h)||m)){const v=e[p];let b=v;m&&!Js(v)?b=[]:!m&&!yb(v)&&(b={}),e[p]=fr(b,h)}else e[p]=h})}),e},Py=e=>{for(const t in e)return!1;return!0},QE=(e,t,n,r)=>{if(gi(r))return n?n[e]:t;n&&(el(r)||Hi(r))&&(n[e]=r)},ao=(e,t,n)=>{if(gi(n))return e?e.getAttribute(t):null;e&&e.setAttribute(t,n)},_o=(e,t)=>{e&&e.removeAttribute(t)},kl=(e,t,n,r)=>{if(n){const o=ao(e,t)||"",s=new Set(o.split(" "));s[r?"add":"delete"](n);const i=zl(s).join(" ").trim();ao(e,t,i)}},mZ=(e,t,n)=>{const r=ao(e,t)||"";return new Set(r.split(" ")).has(n)},Vs=(e,t)=>QE("scrollLeft",0,e,t),ti=(e,t)=>QE("scrollTop",0,e,t),wb=Of()&&Element.prototype,YE=(e,t)=>{const n=[],r=t?Ag(t)?t:null:document;return r?Nn(n,r.querySelectorAll(e)):n},gZ=(e,t)=>{const n=t?Ag(t)?t:null:document;return n?n.querySelector(e):null},km=(e,t)=>Ag(e)?(wb.matches||wb.msMatchesSelector).call(e,t):!1,Iy=e=>e?zl(e.childNodes):[],ai=e=>e?e.parentElement:null,Tc=(e,t)=>{if(Ag(e)){const n=wb.closest;if(n)return n.call(e,t);do{if(km(e,t))return e;e=ai(e)}while(e)}return null},vZ=(e,t,n)=>{const r=e&&Tc(e,t),o=e&&gZ(n,r),s=Tc(o,t)===r;return r&&o?r===e||o===e||s&&Tc(Tc(e,n),t)!==r:!1},Ey=(e,t,n)=>{if(n&&e){let r=t,o;Dg(n)?(o=document.createDocumentFragment(),Pn(n,s=>{s===r&&(r=s.previousSibling),o.appendChild(s)})):o=n,t&&(r?r!==t&&(r=r.nextSibling):r=e.firstChild),e.insertBefore(o,r||null)}},ms=(e,t)=>{Ey(e,null,t)},bZ=(e,t)=>{Ey(ai(e),e,t)},Wk=(e,t)=>{Ey(ai(e),e&&e.nextSibling,t)},_a=e=>{if(Dg(e))Pn(zl(e),t=>_a(t));else if(e){const t=ai(e);t&&t.removeChild(e)}},jl=e=>{const t=document.createElement("div");return e&&ao(t,"class",e),t},JE=e=>{const t=jl();return t.innerHTML=e.trim(),Pn(Iy(t),n=>_a(n))},Cb=e=>e.charAt(0).toUpperCase()+e.slice(1),xZ=()=>jl().style,yZ=["-webkit-","-moz-","-o-","-ms-"],wZ=["WebKit","Moz","O","MS","webkit","moz","o","ms"],Gv={},qv={},CZ=e=>{let t=qv[e];if(Ng(qv,e))return t;const n=Cb(e),r=xZ();return Pn(yZ,o=>{const s=o.replace(/-/g,"");return!(t=[e,o+e,s+n,Cb(s)+n].find(c=>r[c]!==void 0))}),qv[e]=t||""},Mf=e=>{if(Of()){let t=Gv[e]||window[e];return Ng(Gv,e)||(Pn(wZ,n=>(t=t||window[n+Cb(e)],!t)),Gv[e]=t),t}},SZ=Mf("MutationObserver"),Vk=Mf("IntersectionObserver"),$c=Mf("ResizeObserver"),ZE=Mf("cancelAnimationFrame"),e
Please see https://github.com/reduxjs/redux-toolkit/pull/2481 for details.
See https://redux-toolkit.js.org/rtk-query/usage/server-side-rendering for new guidance on SSR.`)}}}({queryThunk:et,mutationThunk:kt,api:J,serializeQueryArgs:dt,context:ge}),Mr=sn.buildInitiateQuery,Zn=sn.buildInitiateMutation;return Fr(J.util,{getRunningOperationPromises:sn.getRunningOperationPromises,getRunningOperationPromise:sn.removalWarning,getRunningMutationThunk:sn.getRunningMutationThunk,getRunningMutationsThunk:sn.getRunningMutationsThunk,getRunningQueryThunk:sn.getRunningQueryThunk,getRunningQueriesThunk:sn.getRunningQueriesThunk}),{name:_s,injectEndpoint:function(Pt,En){var Rn,er=J;(Rn=er.endpoints)[Pt]!=null||(Rn[Pt]={}),oe(En)?Fr(er.endpoints[Pt],{name:Pt,select:Kt(Pt,En),initiate:Mr(Pt,En)},en(et,Pt)):En.type===W.mutation&&Fr(er.endpoints[Pt],{name:Pt,select:un(),initiate:Zn(Pt)},en(kt,Pt))}}}}},ra=Qe(Ta())})(jO);kO.exports=jO;var Yo=kO.exports;const Aee=e=>{const{boardToDelete:t,setBoardToDelete:n}=e,{t:r}=Ie(),o=z(j=>j.config.canRestoreDeletedImagesFromBin),{currentData:s,isFetching:i}=dR((t==null?void 0:t.board_id)??Yo.skipToken),c=u.useMemo(()=>le([ke],j=>{const _=(s??[]).map(O=>W_(j,O));return{imageUsageSummary:{isInitialImage:$s(_,O=>O.isInitialImage),isCanvasImage:$s(_,O=>O.isCanvasImage),isNodesImage:$s(_,O=>O.isNodesImage),isControlNetImage:$s(_,O=>O.isControlNetImage)}}}),[s]),[f,{isLoading:p}]=fR(),[h,{isLoading:m}]=pR(),{imageUsageSummary:v}=z(c),b=u.useCallback(()=>{t&&(f(t.board_id),n(void 0))},[t,f,n]),y=u.useCallback(()=>{t&&(h(t.board_id),n(void 0))},[t,h,n]),x=u.useCallback(()=>{n(void 0)},[n]),C=u.useRef(null),k=u.useMemo(()=>m||p||i,[m,p,i]);return t?a.jsx(Cf,{isOpen:!!t,onClose:x,leastDestructiveRef:C,isCentered:!0,children:a.jsx(Ks,{children:a.jsxs(Sf,{children:[a.jsxs(qs,{fontSize:"lg",fontWeight:"bold",children:["Delete ",t.board_name]}),a.jsx(Xs,{children:a.jsxs($,{direction:"column",gap:3,children:[i?a.jsx(hg,{children:a.jsx($,{sx:{w:"full",h:32}})}):a.jsx(EE,{imageUsage:v,topMessage:"This board contains images used in the following features:",bottomMessage:"Deleting this board and its images will reset any features currently using them."}),a.jsx(Ee,{children:"Deleted boards cannot be restored."}),a.jsx(Ee,{children:r(o?"gallery.deleteImageBin":"gallery.deleteImagePermanent")})]})}),a.jsx(ka,{children:a.jsxs($,{sx:{justifyContent:"space-between",width:"full",gap:2},children:[a.jsx(Wt,{ref:C,onClick:x,children:"Cancel"}),a.jsx(Wt,{colorScheme:"warning",isLoading:k,onClick:b,children:"Delete Board Only"}),a.jsx(Wt,{colorScheme:"error",isLoading:k,onClick:y,children:"Delete Board and Images"})]})})]})})}):null},Nee=u.memo(Aee),Tee="My Board",$ee=()=>{const[e,{isLoading:t}]=hR(),n=u.useCallback(()=>{e(Tee)},[e]);return a.jsx(tt,{icon:a.jsx(Yl,{}),isLoading:t,tooltip:"Add Board","aria-label":"Add Board",onClick:n,size:"sm"})},Lee=u.memo($ee);var _O=ff({displayName:"ExternalLinkIcon",path:a.jsxs("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[a.jsx("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),a.jsx("path",{d:"M15 3h6v6"}),a.jsx("path",{d:"M10 14L21 3"})]})}),Lg=ff({d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z",displayName:"ChevronUpIcon"}),Fee=ff({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"}),zee=ff({displayName:"DeleteIcon",path:a.jsx("g",{fill:"currentColor",children:a.jsx("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"})})}),Bee=ff({displayName:"C
* @license React
* react-reconciler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var lhe=function(t){var n={},r=u,o=oh,s=Object.assign;function i(l){for(var d="https://reactjs.org/docs/error-decoder.html?invariant="+l,g=1;g<arguments.length;g++)d+="&args[]="+encodeURIComponent(arguments[g]);return"Minified React error #"+l+"; visit "+d+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var c=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,f=Symbol.for("react.element"),p=Symbol.for("react.portal"),h=Symbol.for("react.fragment"),m=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),b=Symbol.for("react.provider"),y=Symbol.for("react.context"),x=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),k=Symbol.for("react.suspense_list"),j=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),I=Symbol.for("react.offscreen"),O=Symbol.iterator;function E(l){return l===null||typeof l!="object"?null:(l=O&&l[O]||l["@@iterator"],typeof l=="function"?l:null)}function M(l){if(l==null)return null;if(typeof l=="function")return l.displayName||l.name||null;if(typeof l=="string")return l;switch(l){case h:return"Fragment";case p:return"Portal";case v:return"Profiler";case m:return"StrictMode";case C:return"Suspense";case k:return"SuspenseList"}if(typeof l=="object")switch(l.$$typeof){case y:return(l.displayName||"Context")+".Consumer";case b:return(l._context.displayName||"Context")+".Provider";case x:var d=l.render;return l=l.displayName,l||(l=d.displayName||d.name||"",l=l!==""?"ForwardRef("+l+")":"ForwardRef"),l;case j:return d=l.displayName||null,d!==null?d:M(l.type)||"Memo";case _:d=l._payload,l=l._init;try{return M(l(d))}catch{}}return null}function R(l){var d=l.type;switch(l.tag){case 24:return"Cache";case 9:return(d.displayName||"Context")+".Consumer";case 10:return(d._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return l=d.render,l=l.displayName||l.name||"",d.displayName||(l!==""?"ForwardRef("+l+")":"ForwardRef");case 7:return"Fragment";case 5:return d;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return M(d);case 8:return d===m?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof d=="function")return d.displayName||d.name||null;if(typeof d=="string")return d}return null}function A(l){var d=l,g=l;if(l.alternate)for(;d.return;)d=d.return;else{l=d;do d=l,d.flags&4098&&(g=d.return),l=d.return;while(l)}return d.tag===3?g:null}function D(l){if(A(l)!==l)throw Error(i(188))}function T(l){var d=l.alternate;if(!d){if(d=A(l),d===null)throw Error(i(188));return d!==l?null:l}for(var g=l,w=d;;){var S=g.return;if(S===null)break;var P=S.alternate;if(P===null){if(w=S.return,w!==null){g=w;continue}break}if(S.child===P.child){for(P=S.child;P;){if(P===g)return D(S),l;if(P===w)return D(S),d;P=P.sibling}throw Error(i(188))}if(g.return!==w.return)g=S,w=P;else{for(var N=!1,Z=S.child;Z;){if(Z===g){N=!0,g=S,w=P;break}if(Z===w){N=!0,w=S,g=P;break}Z=Z.sibling}if(!N){for(Z=P.child;Z;){if(Z===g){N=!0,g=P,w=S;break}if(Z===w){N=!0,w=P,g=S;break}Z=Z.sibling}if(!N)throw Error(i(189))}}if(g.alternate!==w)throw Error(i(190))}if(g.tag!==3)throw Error(i(188));return g.stateNode.current===g?l:d}function K(l){return l=T(l),l!==null?B(l):null}function B(l){if(l.tag===5||l.tag===6)return l;for(l=l.child;l!==null;){var d=B(l);if(d!==null)return d;l=l.sibling}return null}function G(l){if(l.tag===5||l.tag===6)return l;for(l=l.child;l!==null;){if(l.tag!==4){var d=G(l);if(d!==null)return d}l=l.sibling}return null}var Q=Array.isArray,V=t.getPublicInstance,L=t.getRootHostContext,X=t.getChildHostContext,F=t.prepareForCommit,q=t.resetAfterCommit,te=t.createInstance,Y=t.appendInitialChild,ce=t.finalizeInitialChildren,ae=t.prepareUpdate,U=t.shouldSetTextContent,W=t.createTextInstance,ne=t.scheduleTimeout,ie=t.cancelTimeout,oe=t.noTimeout,me=t.isPrimaryRenderer,fe=t.supportsMutation,he=t.supportsPersistence,Ce=t.supportsHydration,xe=t.ge
`+Ot+l}var Xt=!1;function tn(l,d){if(!l||Xt)return"";Xt=!0;var g=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(d)if(d=function(){throw Error()},Object.defineProperty(d.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(d,[])}catch(ze){var w=ze}Reflect.construct(l,[],d)}else{try{d.call()}catch(ze){w=ze}l.call(d.prototype)}else{try{throw Error()}catch(ze){w=ze}l()}}catch(ze){if(ze&&w&&typeof ze.stack=="string"){for(var S=ze.stack.split(`
`),P=w.stack.split(`
`),N=S.length-1,Z=P.length-1;1<=N&&0<=Z&&S[N]!==P[Z];)Z--;for(;1<=N&&0<=Z;N--,Z--)if(S[N]!==P[Z]){if(N!==1||Z!==1)do if(N--,Z--,0>Z||S[N]!==P[Z]){var pe=`
`+S[N].replace(" at new "," at ");return l.displayName&&pe.includes("<anonymous>")&&(pe=pe.replace("<anonymous>",l.displayName)),pe}while(1<=N&&0<=Z);break}}}finally{Xt=!1,Error.prepareStackTrace=g}return(l=l?l.displayName||l.name:"")?$t(l):""}var en=Object.prototype.hasOwnProperty,qt=[],Be=-1;function vt(l){return{current:l}}function Dt(l){0>Be||(l.current=qt[Be],qt[Be]=null,Be--)}function Ut(l,d){Be++,qt[Be]=l.current,l.current=d}var In={},Kt=vt(In),un=vt(!1),sn=In;function Mr(l,d){var g=l.type.contextTypes;if(!g)return In;var w=l.stateNode;if(w&&w.__reactInternalMemoizedUnmaskedChildContext===d)return w.__reactInternalMemoizedMaskedChildContext;var S={},P;for(P in g)S[P]=d[P];return w&&(l=l.stateNode,l.__reactInternalMemoizedUnmaskedChildContext=d,l.__reactInternalMemoizedMaskedChildContext=S),S}function Zn(l){return l=l.childContextTypes,l!=null}function Pt(){Dt(un),Dt(Kt)}function En(l,d,g){if(Kt.current!==In)throw Error(i(168));Ut(Kt,d),Ut(un,g)}function Rn(l,d,g){var w=l.stateNode;if(d=d.childContextTypes,typeof w.getChildContext!="function")return g;w=w.getChildContext();for(var S in w)if(!(S in d))throw Error(i(108,R(l)||"Unknown",S));return s({},g,w)}function er(l){return l=(l=l.stateNode)&&l.__reactInternalMemoizedMergedChildContext||In,sn=Kt.current,Ut(Kt,l),Ut(un,un.current),!0}function hr(l,d,g){var w=l.stateNode;if(!w)throw Error(i(169));g?(l=Rn(l,d,sn),w.__reactInternalMemoizedMergedChildContext=l,Dt(un),Dt(Kt),Ut(Kt,l)):Dt(un),Ut(un,g)}var Tn=Math.clz32?Math.clz32:Sn,$n=Math.log,dn=Math.LN2;function Sn(l){return l>>>=0,l===0?32:31-($n(l)/dn|0)|0}var On=64,bn=4194304;function xn(l){switch(l&-l){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return l&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return l&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return l}}function Ye(l,d){var g=l.pendingLanes;if(g===0)return 0;var w=0,S=l.suspendedLanes,P=l.pingedLanes,N=g&268435455;if(N!==0){var Z=N&~S;Z!==0?w=xn(Z):(P&=N,P!==0&&(w=xn(P)))}else N=g&~S,N!==0?w=xn(N):P!==0&&(w=xn(P));if(w===0)return 0;if(d!==0&&d!==w&&!(d&S)&&(S=w&-w,P=d&-d,S>=P||S===16&&(P&4194240)!==0))return d;if(w&4&&(w|=g&16),d=l.entangledLanes,d!==0)for(l=l.entanglements,d&=w;0<d;)g=31-Tn(d),S=1<<g,w|=l[g],d&=~S;return w}function Mt(l,d){switch(l){case 1:case 2:case 4:return d+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return d+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ct(l,d){for(var g=l.suspendedLanes,w=l.pingedLanes,S=l.expirationTimes,P=l.pendingLanes;0<P;){var N=31-Tn(P),Z=1<<N,pe=S[N];pe===-1?(!(Z&g)||Z&w)&&(S[N]=Mt(Z,d)):pe<=d&&(l.expiredLanes|=Z),P&=~Z}}function at(l){return l=l.pendingLanes&-1073741825,l!==0?l:l&1073741824?1073741824:0}function wt(){var l=On;return On<<=1,!(On&4194240)&&(On=64),l}function Bt(l){for(var d=[],g=0;31>g;g++)d.push(l);return d}function ht(l,d,g){l.pendingLanes|=d,d!==536870912&&(l.suspendedLanes=0,l.pingedLanes=0),l=l.eventTimes,d=31-Tn(d),l[d]=g}function ot(l,d){var g=l.pendingLanes&~d;l.pendingLanes=d,l.suspendedLanes=0,l.pingedLanes=0,l.expiredLanes&=d,l.mutableReadLanes&=d,l.entangledLanes&=d,d=l.entanglements;var w=l.eventTimes;for(l=l.expirationTimes;0<g;){var S=31-Tn(g),P=1<<S;d[S]=0,w[S]=-1,l[S]=-1,g&=~P}}function Ae(l,d){var g=l.entangledLanes|=d;for(l=l.entanglements;g;){var w=31-Tn(g),S=1<<w;S&d|l[w]&d&&(l[w]|=d),g&=~S}}var Re=0;function Le(l){return l&=-l,1<l?4<l?l&268435455?16:536870912:4:1}var Ve=o.unstable_scheduleCallback,nt=o.unstable_cancelCallback,At=o.unsta
Error generating stack: `+P.message+`
`+P.stack}return{value:l,source:d,stack:S,digest:null}}function M0(l,d,g){return{value:l,source:null,stack:g??null,digest:d??null}}function R0(l,d){try{console.error(d.value)}catch(g){setTimeout(function(){throw g})}}var N8=typeof WeakMap=="function"?WeakMap:Map;function ow(l,d,g){g=Fa(-1,g),g.tag=3,g.payload={element:null};var w=d.value;return g.callback=function(){up||(up=!0,J0=w),R0(l,d)},g}function sw(l,d,g){g=Fa(-1,g),g.tag=3;var w=l.type.getDerivedStateFromError;if(typeof w=="function"){var S=d.value;g.payload=function(){return w(S)},g.callback=function(){R0(l,d)}}var P=l.stateNode;return P!==null&&typeof P.componentDidCatch=="function"&&(g.callback=function(){R0(l,d),typeof w!="function"&&(yi===null?yi=new Set([this]):yi.add(this));var N=d.stack;this.componentDidCatch(d.value,{componentStack:N!==null?N:""})}),g}function aw(l,d,g){var w=l.pingCache;if(w===null){w=l.pingCache=new N8;var S=new Set;w.set(d,S)}else S=w.get(d),S===void 0&&(S=new Set,w.set(d,S));S.has(g)||(S.add(g),l=X8.bind(null,l,d,g),d.then(l,l))}function iw(l){do{var d;if((d=l.tag===13)&&(d=l.memoizedState,d=d!==null?d.dehydrated!==null:!0),d)return l;l=l.return}while(l!==null);return null}function lw(l,d,g,w,S){return l.mode&1?(l.flags|=65536,l.lanes=S,l):(l===d?l.flags|=65536:(l.flags|=128,g.flags|=131072,g.flags&=-52805,g.tag===1&&(g.alternate===null?g.tag=17:(d=Fa(-1,1),d.tag=2,xi(g,d,1))),g.lanes|=1),l)}var T8=c.ReactCurrentOwner,Co=!1;function vo(l,d,g,w){d.child=l===null?N2(d,null,g,w):sc(d,l.child,g,w)}function cw(l,d,g,w,S){g=g.render;var P=d.ref;return oc(d,S),w=j0(l,d,g,w,P,S),g=_0(),l!==null&&!Co?(d.updateQueue=l.updateQueue,d.flags&=-2053,l.lanes&=~S,za(l,d,S)):(tr&&g&&a0(d),d.flags|=1,vo(l,d,w,S),d.child)}function uw(l,d,g,w,S){if(l===null){var P=g.type;return typeof P=="function"&&!ov(P)&&P.defaultProps===void 0&&g.compare===null&&g.defaultProps===void 0?(d.tag=15,d.type=P,dw(l,d,P,w,S)):(l=gp(g.type,null,w,d,d.mode,S),l.ref=d.ref,l.return=d,d.child=l)}if(P=l.child,!(l.lanes&S)){var N=P.memoizedProps;if(g=g.compare,g=g!==null?g:Lf,g(N,w)&&l.ref===d.ref)return za(l,d,S)}return d.flags|=1,l=ki(P,w),l.ref=d.ref,l.return=d,d.child=l}function dw(l,d,g,w,S){if(l!==null){var P=l.memoizedProps;if(Lf(P,w)&&l.ref===d.ref)if(Co=!1,d.pendingProps=w=P,(l.lanes&S)!==0)l.flags&131072&&(Co=!0);else return d.lanes=l.lanes,za(l,d,S)}return D0(l,d,g,w,S)}function fw(l,d,g){var w=d.pendingProps,S=w.children,P=l!==null?l.memoizedState:null;if(w.mode==="hidden")if(!(d.mode&1))d.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ut(uc,Ho),Ho|=g;else{if(!(g&1073741824))return l=P!==null?P.baseLanes|g:g,d.lanes=d.childLanes=1073741824,d.memoizedState={baseLanes:l,cachePool:null,transitions:null},d.updateQueue=null,Ut(uc,Ho),Ho|=l,null;d.memoizedState={baseLanes:0,cachePool:null,transitions:null},w=P!==null?P.baseLanes:g,Ut(uc,Ho),Ho|=w}else P!==null?(w=P.baseLanes|g,d.memoizedState=null):w=g,Ut(uc,Ho),Ho|=w;return vo(l,d,S,g),d.child}function pw(l,d){var g=d.ref;(l===null&&g!==null||l!==null&&l.ref!==g)&&(d.flags|=512,d.flags|=2097152)}function D0(l,d,g,w,S){var P=Zn(g)?sn:Kt.current;return P=Mr(d,P),oc(d,S),g=j0(l,d,g,w,P,S),w=_0(),l!==null&&!Co?(d.updateQueue=l.updateQueue,d.flags&=-2053,l.lanes&=~S,za(l,d,S)):(tr&&w&&a0(d),d.flags|=1,vo(l,d,g,S),d.child)}function hw(l,d,g,w,S){if(Zn(g)){var P=!0;er(d)}else P=!1;if(oc(d,S),d.stateNode===null)Jf(l,d),M2(d,g,w),b0(d,g,w,S),w=!0;else if(l===null){var N=d.stateNode,Z=d.memoizedProps;N.props=Z;var pe=N.context,ze=g.contextType;typeof ze=="object"&&ze!==null?ze=ts(ze):(ze=Zn(g)?sn:Kt.current,ze=Mr(d,ze));var mt=g.getDerivedStateFromProps,Jt=typeof mt=="function"||typeof N.getSnapshotBeforeUpdate=="function";Jt||typeof N.UNSAFE_componentWillReceiveProps!="function"&&typeof N.componentWillReceiveProps!="function"||(Z!==w||pe!==ze)&&R2(d,N,w,ze),bi=!1;var it=d.memoizedState;N.state=it,Hf(d,w,N,S),pe=d.memoizedState,Z!==w||it!==pe||un.current||bi?(typeof mt=="function"&&(v0(d,g,mt,w),pe=d.memoizedState),(Z=bi||O2(d,g,Z,w,it,pe,ze))?(Jt||typeof N.UNSAFE_componentWillMount!="function"&&typeof N.componentWillMo
`+(w.join(" > ")+`
No matching component was found for:
`)+l.join(" > ")}return null},n.getPublicRootInstance=function(l){if(l=l.current,!l.child)return null;switch(l.child.tag){case 5:return V(l.child.stateNode);default:return l.child.stateNode}},n.injectIntoDevTools=function(l){if(l={bundleType:l.bundleType,version:l.version,rendererPackageName:l.rendererPackageName,rendererConfig:l.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:c.ReactCurrentDispatcher,findHostInstanceByFiber:t7,findFiberByHostInstance:l.findFiberByHostInstance||n7,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")l=!1;else{var d=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(d.isDisabled||!d.supportsFiber)l=!0;else{try{Xn=d.inject(l),gn=d}catch{}l=!!d.checkDCE}}return l},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(l,d,g,w){if(!lt)throw Error(i(363));l=q0(l,d);var S=zt(l,g,w).disconnect;return{disconnect:function(){S()}}},n.registerMutableSourceForHydration=function(l,d){var g=d._getVersion;g=g(d._source),l.mutableSourceEagerHydrationData==null?l.mutableSourceEagerHydrationData=[d,g]:l.mutableSourceEagerHydrationData.push(d,g)},n.runWithPriority=function(l,d){var g=Re;try{return Re=l,d()}finally{Re=g}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(l,d,g,w){var S=d.current,P=oo(),N=Ci(S);return g=Uw(g),d.context===null?d.context=g:d.pendingContext=g,d=Fa(P,N),d.payload={element:l},w=w===void 0?null:w,w!==null&&(d.callback=w),l=xi(S,d,N),l!==null&&(os(l,S,N,P),Bf(l,S,N)),N},n};h8.exports=lhe;var che=h8.exports;const uhe=Cu(che);var m8={exports:{}},tc={};/**
* @license React
* react-reconciler-constants.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/tc.ConcurrentRoot=1;tc.ContinuousEventPriority=4;tc.DefaultEventPriority=16;tc.DiscreteEventPriority=1;tc.IdleEventPriority=536870912;tc.LegacyRoot=0;m8.exports=tc;var g8=m8.exports;const w_={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let C_=!1,S_=!1;const g2=".react-konva-event",dhe=`ReactKonva: You have a Konva node with draggable = true and position defined but no onDragMove or onDragEnd events are handled.
Position of a node will be changed during drag&drop, so you should update state of the react app as well.
Consider to add onDragMove or onDragEnd events.
For more info see: https://github.com/konvajs/react-konva/issues/256
`,fhe=`ReactKonva: You are using "zIndex" attribute for a Konva node.
react-konva may get confused with ordering. Just define correct order of elements in your render function of a component.
For more info see: https://github.com/konvajs/react-konva/issues/194
`,phe={};function s0(e,t,n=phe){if(!C_&&"zIndex"in t&&(console.warn(fhe),C_=!0),!S_&&t.draggable){var r=t.x!==void 0||t.y!==void 0,o=t.onDragEnd||t.onDragMove;r&&!o&&(console.warn(dhe),S_=!0)}for(var s in n)if(!w_[s]){var i=s.slice(0,2)==="on",c=n[s]!==t[s];if(i&&c){var f=s.substr(2).toLowerCase();f.substr(0,7)==="content"&&(f="content"+f.substr(7,1).toUpperCase()+f.substr(8)),e.off(f,n[s])}var p=!t.hasOwnProperty(s);p&&e.setAttr(s,void 0)}var h=t._useStrictMode,m={},v=!1;const b={};for(var s in t)if(!w_[s]){var i=s.slice(0,2)==="on",y=n[s]!==t[s];if(i&&y){var f=s.substr(2).toLowerCase();f.substr(0,7)==="content"&&(f="content"+f.substr(7,1).toUpperCase()+f.substr(8)),t[s]&&(b[f]=t[s])}!i&&(t[s]!==n[s]||h&&t[s]!==e.getAttr(s))&&(v=!0,m[s]=t[s])}v&&(e.setAttrs(m),rl(e));for(var f in b)e.on(f+g2,b[f])}function rl(e){if(!eN.Konva.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}const v8={},hhe={};Jd.Node.prototype._applyProps=s0;function mhe(e,t){if(typeof t=="string"){console.error(`Do not use plain text as child of Konva.Node. You are using text: ${t}`);return}e.add(t),rl(e)}function ghe(e,t,n){let r=Jd[e];r||(console.error(`Konva has no node with the type ${e}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/${e}" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html`),r=Jd.Group);const o={},s={};for(var i in t){var c=i.slice(0,2)==="on";c?s[i]=t[i]:o[i]=t[i]}const f=new r(o);return s0(f,s),f}function vhe(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function bhe(e,t,n){return!1}function xhe(e){return e}function yhe(){return null}function whe(){return null}function Che(e,t,n,r){return hhe}function She(){}function khe(e){}function jhe(e,t){return!1}function _he(){return v8}function Phe(){return v8}const Ihe=setTimeout,Ehe=clearTimeout,Ohe=-1;function Mhe(e,t){return!1}const Rhe=!1,Dhe=!0,Ahe=!0;function Nhe(e,t){t.parent===e?t.moveToTop():e.add(t),rl(e)}function The(e,t){t.parent===e?t.moveToTop():e.add(t),rl(e)}function b8(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),rl(e)}function $he(e,t,n){b8(e,t,n)}function Lhe(e,t){t.destroy(),t.off(g2),rl(e)}function Fhe(e,t){t.destroy(),t.off(g2),rl(e)}function zhe(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function Bhe(e,t,n){}function Hhe(e,t,n,r,o){s0(e,o,r)}function Whe(e){e.hide(),rl(e)}function Vhe(e){}function Uhe(e,t){(t.visible==null||t.visible)&&e.show()}function Ghe(e,t){}function qhe(e){}function Khe(){}const Xhe=()=>g8.DefaultEventPriority,Qhe=Object.freeze(Object.defineProperty({__proto__:null,appendChild:Nhe,appendChildToContainer:The,appendInitialChild:mhe,cancelTimeout:Ehe,clearContainer:qhe,commitMount:Bhe,commitTextUpdate:zhe,commitUpdate:Hhe,createInstance:ghe,createTextInstance:vhe,detachDeletedInstance:Khe,finalizeInitialChildren:bhe,getChildHostContext:Phe,getCurrentEventPriority:Xhe,getPublicInstance:xhe,getRootHostContext:_he,hideInstance:Whe,hideTextInstance:Vhe,idlePriority:oh.unstable_IdlePriority,insertBefore:b8,insertInContainerBefore:$he,isPrimaryRenderer:Rhe,noTimeout:Ohe,now:oh.unstable_now,prepareForCommit:yhe,preparePortalMount:whe,prepareUpdate:Che,removeChild:Lhe,removeChildFromContainer:Fhe,resetAfterCommit:She,resetTextContent:khe,run:oh.unstable_runWithPriority,scheduleTimeout:Ihe,shouldDeprioritizeSubtree:jhe,shouldSetTextContent:Mhe,supportsMutation:Ahe,unhideInstance:Uhe,unhideTextInstance:Ghe,warnsIfNotActing:Dhe},Symbol.toStringTag,{value:"Module"}));var Yhe=Object.defineProperty,Jhe=Object.defineProperties,Zhe=Object.getOwnPropertyDescriptors,k_=Object.getOwnPropertySymbols,eme=Object.prototype.hasOwnProperty,tme=Object.prototype.propertyIsEnumerable,j_=(e,t,n)=>t in e?Yhe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,__=(e,t)=>{for(var n in t||(t={}))eme.call(t,n)&&j_(e,n,t[n]);if(k_)for(var n of k_(t))tme.cal
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="60px" height="60px" viewBox="0 0 30 30" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;">
<g transform="matrix(0.5,0,0,0.5,0,0)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,2.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,7.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,10)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,12.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,15)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,17.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,20)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,22.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,25)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,27.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,30)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-2.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-7.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-10)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-12.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-15)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-17.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-20)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-22.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-25)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-27.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-30)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
</svg>`.replaceAll("black",e),Dme=e=>{const{...t}=e,{maskColorString:n,stageCoordinates:r,stageDimensions:o,stageScale:s}=z(Rme),[i,c]=u.useState(null),[f,p]=u.useState(0),h=u.useRef(null),m=u.useCallback(()=>{p(f+1),setTimeout(m,500)},[f]);return u.useEffect(()=>{if(i)return;const v=new Image;v.onload=()=>{c(v)},v.src=E_(n)},[i,n]),u.useEffect(()=>{i&&(i.src=E_(n))},[i,n]),u.useEffect(()=>{const v=setInterval(()=>p(b=>(b+1)%5),50);return()=>clearInterval(v)},[]),!i||!pc(r.x)||!pc(r.y)||!pc(s)||!pc(o.width)||!pc(o.height)?null:a.jsx(Ra,{ref:h,offsetX:r.x/s,offsetY:r.y/s,height:o.height/s,width:o.width/s,fillPatternImage:i,fillPatternOffsetY:pc(f)?f:0,fillPatternRepeat:"repeat",fillPatternScale:{x:1/s,y:1/s},listening:!0,globalCompositeOperation:"source-in",...t})},Ame=u.memo(Dme),Nme=le([An],e=>({objects:e.layerState.objects}),{memoizeOptions:{resultEqualityCheck:mn}}),Tme=e=>{const{...t}=e,{objects:n}=z(Nme);return a.jsx(ci,{listening:!1,...t,children:n.filter(pN).map((r,o)=>a.jsx($m,{points:r.points,stroke:"rgb(0,0,0)",strokeWidth:r.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:r.tool==="brush"?"source-over":"destination-out"},o))})},$me=u.memo(Tme);var hl=u,Lme=function(t,n,r){const o=hl.useRef("loading"),s=hl.useRef(),[i,c]=hl.useState(0),f=hl.useRef(),p=hl.useRef(),h=hl.useRef();return(f.current!==t||p.current!==n||h.current!==r)&&(o.current="loading",s.current=void 0,f.current=t,p.current=n,h.current=r),hl.useLayoutEffect(function(){if(!t)return;var m=document.createElement("img");function v(){o.current="loaded",s.current=m,c(Math.random())}function b(){o.current="failed",s.current=void 0,c(Math.random())}return m.addEventListener("load",v),m.addEventListener("error",b),n&&(m.crossOrigin=n),r&&(m.referrerPolicy=r),m.src=t,function(){m.removeEventListener("load",v),m.removeEventListener("error",b)}},[t,n,r]),[s.current,o.current]};const Fme=Cu(Lme),zme=e=>{const{width:t,height:n,x:r,y:o,imageName:s}=e.canvasImage,{currentData:i,isError:c}=qo(s??Yo.skipToken),[f]=Fme((i==null?void 0:i.image_url)??"",hN.get()?"use-credentials":"anonymous");return c?a.jsx(Ra,{x:r,y:o,width:t,height:n,fill:"red"}):a.jsx(C8,{x:r,y:o,image:f,listening:!1})},k8=u.memo(zme),Bme=le([An],e=>{const{layerState:{objects:t}}=e;return{objects:t}},{memoizeOptions:{resultEqualityCheck:mn}}),Hme=()=>{const{objects:e}=z(Bme);return e?a.jsx(ci,{name:"outpainting-objects",listening:!1,children:e.map((t,n)=>{if(mN(t))return a.jsx(k8,{canvasImage:t},n);if(gN(t)){const r=a.jsx($m,{points:t.points,stroke:t.color?Il(t.color):"rgb(0,0,0)",strokeWidth:t.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:t.tool==="brush"?"source-over":"destination-out"},n);return t.clip?a.jsx(ci,{clipX:t.clip.x,clipY:t.clip.y,clipWidth:t.clip.width,clipHeight:t.clip.height,children:r},n):r}else{if(vN(t))return a.jsx(Ra,{x:t.x,y:t.y,width:t.width,height:t.height,fill:Il(t.color)},n);if(bN(t))return a.jsx(Ra,{x:t.x,y:t.y,width:t.width,height:t.height,fill:"rgb(255, 255, 255)",globalCompositeOperation:"destination-out"},n)}})}):null},Wme=u.memo(Hme),Vme=le([An],e=>{const{layerState:t,shouldShowStagingImage:n,shouldShowStagingOutline:r,boundingBoxCoordinates:{x:o,y:s},boundingBoxDimensions:{width:i,height:c}}=e,{selectedImageIndex:f,images:p}=t.stagingArea;return{currentStagingAreaImage:p.length>0&&f!==void 0?p[f]:void 0,isOnFirstImage:f===0,isOnLastImage:f===p.length-1,shouldShowStagingImage:n,shouldShowStagingOutline:r,x:o,y:s,width:i,height:c}},{memoizeOptions:{resultEqualityCheck:mn}}),Ume=e=>{const{...t}=e,{currentStagingAreaImage:n,shouldShowStagingImage:r,shouldShowStagingOutline:o,x:s,y:i,width:c,height:f}=z(Vme);return a.jsxs(ci,{...t,children:[r&&n&&a.jsx(k8,{canvasImage:n}),o&&a.jsxs(ci,{children:[a.jsx(Ra,{x:s,y:i,width:c,height:f,strokeWidth:1,stroke:"white",strokeScaleEnabled:!1}),a.jsx(Ra,{x:s,y:i,width:c,height:f,dash:[4,4],strokeWidth:1,stroke:"black",strokeScaleEnabled:!1})]})]})},Gme=u.memo(Ume),qme=le([An],e=>{const{la
${s}
\`\`\``),n({title:"Error Copied"})},[e,n]),o=u.useMemo(()=>Zge({user:"invoke-ai",repo:"InvokeAI",template:"BUG_REPORT.yml",title:`[bug]: ${e.name}: ${e.message}`}),[e.message,e.name]);return a.jsx($,{layerStyle:"body",sx:{w:"100vw",h:"100vh",alignItems:"center",justifyContent:"center",p:4},children:a.jsxs($,{layerStyle:"first",sx:{flexDir:"column",borderRadius:"base",justifyContent:"center",gap:8,p:16},children:[a.jsx(ds,{children:"Something went wrong"}),a.jsx($,{layerStyle:"second",sx:{px:8,py:4,borderRadius:"base",gap:4,justifyContent:"space-between",alignItems:"center"},children:a.jsxs(Ee,{sx:{fontWeight:600,color:"error.500",_dark:{color:"error.400"}},children:[e.name,": ",e.message]})}),a.jsxs($,{sx:{gap:4},children:[a.jsx(Wt,{leftIcon:a.jsx(Upe,{}),onClick:t,children:"Reset UI"}),a.jsx(Wt,{leftIcon:a.jsx(Du,{}),onClick:r,children:"Copy Error"}),a.jsx(rg,{href:o,isExternal:!0,children:a.jsx(Wt,{leftIcon:a.jsx($E,{}),children:"Create Issue"})})]})]})})},t0e=u.memo(e0e),n0e=le([ke],({hotkeys:e})=>{const{shift:t,ctrl:n,meta:r}=e;return{shift:t,ctrl:n,meta:r}},{memoizeOptions:{resultEqualityCheck:mn}}),r0e=()=>{const e=se(),{shift:t,ctrl:n,meta:r}=z(n0e);return St("*",()=>{fh("shift")?!t&&e(Do(!0)):t&&e(Do(!1)),fh("ctrl")?!n&&e(RC(!0)):n&&e(RC(!1)),fh("meta")?!r&&e(DC(!0)):r&&e(DC(!1))},{keyup:!0,keydown:!0},[t,n,r]),St("1",()=>{e(va("txt2img"))}),St("2",()=>{e(va("img2img"))}),St("3",()=>{e(va("unifiedCanvas"))}),St("4",()=>{e(va("nodes"))}),St("5",()=>{e(va("modelManager"))}),null},o0e=u.memo(r0e),s0e={},a0e=({config:e=s0e,headerComponent:t,selectedImage:n})=>{const r=z(BP),o=HP("system"),s=se(),{handlePreselectedImage:i}=Jge(),c=u.useCallback(()=>(localStorage.clear(),location.reload(),!1),[]);return u.useEffect(()=>{Sr.changeLanguage(r)},[r]),u.useEffect(()=>{l3(e)&&(o.info({config:e},"Received config"),s(r9(e)))},[s,e,o]),u.useEffect(()=>{s(o9())},[s]),u.useEffect(()=>{i(n)},[i,n]),a.jsxs(Qge,{onReset:c,FallbackComponent:t0e,children:[a.jsx(Vi,{w:"100vw",h:"100vh",position:"relative",overflow:"hidden",children:a.jsx(OV,{children:a.jsxs(Vi,{sx:{gap:4,p:4,gridAutoRows:"min-content auto",w:"full",h:"full"},children:[t||a.jsx(cZ,{}),a.jsx($,{sx:{gap:4,w:"full",h:"full"},children:a.jsx(Kge,{})})]})})}),a.jsx(KY,{}),a.jsx(WY,{}),a.jsx(xW,{}),a.jsx(o0e,{})]})},m0e=u.memo(a0e);export{m0e as default};