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

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

170 lines
901 KiB
JavaScript
Raw Normal View History

2023-09-08 05:22:22 +00:00
var H0=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var Se=(e,t,n)=>(H0(e,t,"read from private field"),n?n.call(e):t.get(e)),Jt=(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)},Jr=(e,t,n,r)=>(H0(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);var vu=(e,t,n,r)=>({set _(o){Jr(e,t,o,n)},get _(){return Se(e,t,r)}}),os=(e,t,n)=>(H0(e,t,"access private method"),n);import{a as gd,b as bj,S as yj,c as Cj,d as wj,e as Jv,f as Sj,i as e1,g as l7,k as c7,h as DC,j as kj,t as u7,l as d7,m as f7,n as p7,o as h7,p as m7,q as g7,r as W0,s as v7,u as d,v as a,w as Dx,x as Bp,y as x7,z as b7,A as y7,B as C7,P as w7,C as Rx,D as S7,E as k7,F as _7,G as j7,H as _j,I as Pe,J as P7,K as _e,L as et,M as Fe,N as vd,O as nr,Q as gn,R as Hn,T as Xt,U as Ki,V as Qa,W as at,X as co,Y as Xl,Z as aa,_ as cm,$ as Ax,a0 as Oc,a1 as nn,a2 as I7,a3 as H,a4 as RC,a5 as E7,a6 as jj,a7 as t1,a8 as xd,a9 as M7,aa as Pj,ab as Ij,ac as ds,ad as O7,ae,af as Ce,ag as kt,ah as F,ai as D7,aj as AC,ak as R7,al as A7,am as N7,an as Dc,ao as te,ap as T7,aq as Nt,ar as zt,as as Ie,at as T,au as oo,av as xe,aw as wn,ax as Ej,ay as $7,az as L7,aA as z7,aB as F7,aC as so,aD as Nx,aE as ia,aF as Ir,aG as um,aH as B7,aI as H7,aJ as NC,aK as Tx,aL as be,aM as Ro,aN as W7,aO as Mj,aP as Oj,aQ as TC,aR as V7,aS as U7,aT as G7,aU as qi,aV as Dj,aW as bn,aX as K7,aY as q7,aZ as X7,a_ as Rj,a$ as rr,b0 as dm,b1 as Y7,b2 as $C,b3 as Aj,b4 as Q7,b5 as Z7,b6 as J7,b7 as eD,b8 as tD,b9 as nD,ba as rD,bb as oD,bc as Nj,bd as sD,be as aD,bf as iD,bg as lD,bh as cD,bi as zr,bj as uD,bk as dD,bl as fD,bm as LC,bn as pD,bo as hD,bp as Fa,bq as fm,br as Tj,bs as $j,bt as po,bu as Lj,bv as mD,bw as Ri,bx as Eu,by as zC,bz as gD,bA as vD,bB as xD,bC as Hf,bD as Wf,bE as xu,bF as V0,bG as $u,bH as Lu,bI as zu,bJ as Fu,bK as FC,bL as Hp,bM as U0,bN as Wp,bO as BC,bP as n1,bQ as G0,bR as r1,bS as K0,bT as Vp,bU as HC,bV as Ai,bW as WC,bX as Ni,bY as VC,bZ as Up,b_ as pm,b$ as bD,c0 as zj,c1 as o1,c2 as s1,c3 as Fj,c4 as yD,c5 as a1,c6 as CD,c7 as i1,c8 as wD,c9 as l1,ca as $x,cb as Lx,cc as zx,cd as Fx,ce as hm,cf as Bx,cg as Bj,ch as Ra,ci as Hj,cj as Hx,ck as Wj,cl as SD,cm as bu,cn as Ti,co as Vj,cp as Uj,cq as UC,cr as kD,cs as _D,ct as jD,cu as Cn,cv as PD,cw as Fn,cx as bd,cy as mm,cz as ID,cA as ED,cB as MD,cC as OD,cD as DD,cE as RD,cF as AD,cG as ND,cH as TD,cI as $D,cJ as GC,cK as Wx,cL as LD,cM as zD,cN as yd,cO as FD,cP as BD,cQ as gm,cR as HD,cS as WD,cT as VD,cU as Vx,cV as UD,cW as mn,cX as GD,cY as KD,cZ as qD,c_ as vm,c$ as XD,d0 as YD,d1 as QD,d2 as Xu,d3 as KC,d4 as Bo,d5 as Gj,d6 as ZD,d7 as Ux,d8 as JD,d9 as qC,da as eR,db as tR,dc as nR,dd as Kj,de as rR,df as qj,dg as oR,dh as sR,di as aR,dj as iR,dk as lR,dl as cR,dm as uR,dn as dR,dp as Xj,dq as Yj,dr as fR,ds as pR,dt as hR,du as mR,dv as gR,dw as Ao,dx as vR,dy as go,dz as xR,dA as bR,dB as yR,dC as CR,dD as wR,dE as SR,dF as kR,dG as _R,dH as jR,dI as PR,dJ as IR,dK as ER,dL as MR,dM as OR,dN as DR,dO as RR,dP as XC,dQ as AR,dR as YC,dS as NR,dT as TR,dU as $R,dV as LR,dW as zR,dX as FR,dY as QC,dZ as ZC,d_ as JC,d$ as Gx,e0 as BR,e1 as Mo,e2 as Yu,e3 as fr,e4 as HR,e5 as WR,e6 as Qj,e7 as Zj,e8 as VR,e9 as ew,ea as UR,eb as tw,ec as nw,ed as rw,ee as GR,ef as KR,eg as ow,eh as sw,ei as qR,ej as XR,ek as Gp,el as YR,em as aw,en as Vf,eo as iw,ep as lw,eq as QR,er as ZR,es as JR,et as Jj,eu as eA,ev as tA,ew as cw,ex as nA,ey as uw,ez as rA,eA as e3,eB as t3,eC as Cd,eD as n3,eE as Ci,eF as r3,eG as dw,eH as oA,eI as sA,eJ as o3,eK as aA,eL as iA,eM as lA,eN as cA,eO as uA,eP as Kx,eQ as c1,eR as fw,eS as Xi,eT as dA,eU as fA,eV as s3,eW as Us,eX as Gs,eY as a3,eZ as i3,e_ as qx,e$ as l3,f0 as pA,f1 as Ks,f2 as hA,f3 as c3,f4 as mA,f5 as gA,f6 as vA,f7 as xA,f8 as bA,f9 as yA,fa as CA,fb as Kp,fc as Mu,fd as Hl,fe as wA,ff as SA,fg as kA,fh as _A,fi as jA,fj as PA,fk as IA,fl as EA,fm as MA,fn as OA,fo as DA,fp as RA,fq as AA,fr as NA,fs as TA,ft as $A,fu as LA,fv as zA,fw as FA,fx as BA,fy as pw,fz as HA,fA as WA,
M${O.x},${O.y}h${O.width}v${O.height}h${-O.width}z`,fill:f,fillRule:"evenodd",stroke:p,strokeWidth:h,pointerEvents:"none"})]})})}x3.displayName="MiniMap";var FN=d.memo(x3),To;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(To||(To={}));function BN({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 HN({color:e,radius:t}){return a.jsx("circle",{cx:t,cy:t,r:t,fill:e})}const WN={[To.Dots]:"#91919a",[To.Lines]:"#eee",[To.Cross]:"#e2e2e2"},VN={[To.Dots]:1,[To.Lines]:1,[To.Cross]:6},UN=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function b3({id:e,variant:t=To.Dots,gap:n=20,size:r,lineWidth:o=1,offset:s=2,color:i,style:l,className:f}){const p=d.useRef(null),{transform:h,patternId:m}=Bp(UN,Rx),v=i||WN[t],x=r||VN[t],C=t===To.Dots,b=t===To.Cross,w=Array.isArray(n)?n:[n,n],k=[w[0]*h[2]||1,w[1]*h[2]||1],_=x*h[2],j=b?[_,_]:k,I=C?[_/s,_/s]:[j[0]/s,j[1]/s];return a.jsxs("svg",{className:Dx(["react-flow__background",f]),style:{...l,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:C?a.jsx(HN,{color:v,radius:_/s}):a.jsx(BN,{dimensions:j,color:v,lineWidth:o})}),a.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${m+e})`})]})}b3.displayName="Background";var GN=d.memo(b3);const Sw=(e,t,n)=>{KN(n);const r=_j(e,t);return y3[n].includes(r)},y3={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},kw=Object.keys(y3),KN=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(kw.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${kw.join("|")}`)};function qN(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var XN=qN();const C3=1/60*1e3,YN=typeof performance<"u"?()=>performance.now():()=>Date.now(),w3=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(YN()),C3);function QN(e){let t=[],n=[],r=0,o=!1,s=!1;const i=new WeakSet,l={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)&&(l.schedule(h),e())}o=!1,s&&(s=!1,l.process(f))}};return l}const ZN=40;let f1=!0,Qu=!1,p1=!1;const Ql={delta:0,timestamp:0},Sd=["read","update","preRender","render","postRender"],xm=Sd.reduce((e,t)=>(e[t]=QN(()=>Qu=!0),e),{}),JN=Sd.reduce((e,t)=>{const n=xm[t];return e[t]=(r,o=!1,s=!1)=>(Qu||nT(),n.schedule(r,o,s)),e},{}),eT=Sd.reduce((e,t)=>(e[t]=xm[t].cancel,e),{});Sd.reduce((e,t)=>(e[t]=()=>xm[t].process(Ql),e),{});const tT=e=>xm[e].process(Ql),S3=e=>{Qu=!1,Ql.delta=f1?C3:Math.max(Math.min(e-Ql.timestamp,ZN),1),Ql.timestamp=e,p1=!0,Sd.forEach(tT),p1=!1,Qu&&(f1=!1,w3(S3))},nT=()=>{Qu=!0,f1=!0,p1||w3(S3)},_w=()=>Ql;function kd(e){const{viewBox:t="0 0 24 24",d:n,displayName:r,defaultProps:o={}}=e,s=d.Children.toArray(e.path),i=Pe((l,f)=>a.jsx(An,{ref:f,viewBox:t,...o,...l,children:s.length?s:a.jsx("path",{fill:"currentColor",d:n})}));return i.displayName=r,i}function k3(e){const{theme:t}=P7(),n=iN();return d.useMemo(()=>lN(t.direction,{...n,...e}),[e,t.direction,n])}var rT=Object.defineProperty,oT=(e,t,n)=>t in e?rT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,fn=(e,t,n)=>(oT(e,typeof t!="symbol"?t+"":t,n),n);function jw(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 sT=e=>typeof e=="object"&&"nodeType"i
`})}function ST(e){vd({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}function Al(e){const{isOpen:t,isDisabled:n}=Qx(),{reduceMotion:r}=Zx(),o=et("chakra-accordion__icon",e.className),s=bm(),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(An,{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"})})}Al.displayName="AccordionIcon";var Nl=Pe(function(t,n){const{children:r,className:o}=t,{htmlProps:s,...i}=bT(t),f={...bm().container,overflowAnchor:"none"},p=d.useMemo(()=>i,[i]);return a.jsx(pT,{value:p,children:a.jsx(_e.div,{ref:n,...s,className:et("chakra-accordion__item",o),__css:f,children:typeof r=="function"?r({isExpanded:!!i.isOpen,isDisabled:!!i.isDisabled}):r})})});Nl.displayName="AccordionItem";var Wl={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},ki={enter:{duration:.2,ease:Wl.easeOut},exit:{duration:.1,ease:Wl.easeIn}},Xs={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})},kT=e=>e!=null&&parseInt(e.toString(),10)>0,Ew={exit:{height:{duration:.2,ease:Wl.ease},opacity:{duration:.3,ease:Wl.ease}},enter:{height:{duration:.3,ease:Wl.ease},opacity:{duration:.4,ease:Wl.ease}}},_T={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:o})=>{var s;return{...e&&{opacity:kT(t)?1:0},height:t,transitionEnd:r==null?void 0:r.exit,transition:(s=n==null?void 0:n.exit)!=null?s:Xs.exit(Ew.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:Xs.enter(Ew.enter,o)}}},ym=d.forwardRef((e,t)=>{const{in:n,unmountOnExit:r,animateOpacity:o=!0,startingHeight:s=0,endingHeight:i="auto",style:l,className:f,transition:p,transitionEnd:h,...m}=e,[v,x]=d.useState(!1);d.useEffect(()=>{const _=setTimeout(()=>{x(!0)});return()=>clearTimeout(_)},[]),vd({condition:Number(s)>0&&!!r,message:"startingHeight and unmountOnExit are mutually exclusive. You can't use them together"});const C=parseFloat(s.toString())>0,b={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:C?"block":"none"}}},w=r?n:!0,k=n||r?"enter":"exit";return a.jsx(nr,{initial:!1,custom:b,children:w&&a.jsx(gn.div,{ref:t,...m,className:et("chakra-collapse",f),style:{overflow:"hidden",display:"block",...l},custom:b,variants:_T,initial:r?"exit":!1,animate:k,exit:"exit"})})});ym.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:Xs.enter(ki.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:Xs.exit(ki.exit,n),transitionEnd:t==null?void 0:t.exit}}},j3={initial:"exit",animate:"enter",exit:"exit",variants:jT},PT=d.forwardRef(function(t,n){const{unmountOnExit:r,in:o,className:s,transition:i,transitionEnd:l,delay:f,...p}=t,h=o||r?"enter":"exit",m=r?o&&r:!0,v={transition:i,transitionEnd:l,delay:f};return a.jsx(nr,{custom:v,children:m&&a.jsx(gn.div,{ref:n,className:et("chakra-fade",s),custom:v,...j3,animate:h,...p})})});PT.displayName="Fade";var IT={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:Xs.exit(ki.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:Xs.enter(ki.enter,n),transitionEnd:e==null?void 0:e.enter}}},P3={initial:"exit",animate
.`.concat(sB,` {
overflow: hidden `).concat(r,`;
padding-right: `).concat(l,"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(l,"px ").concat(r,`;
`),n==="padding"&&"padding-right: ".concat(l,"px ").concat(r,";")].filter(Boolean).join(""),`
}
.`).concat(Mp,` {
right: `).concat(l,"px ").concat(r,`;
}
.`).concat(Op,` {
margin-right: `).concat(l,"px ").concat(r,`;
}
.`).concat(Mp," .").concat(Mp,` {
right: 0 `).concat(r,`;
}
.`).concat(Op," .").concat(Op,` {
margin-right: 0 `).concat(r,`;
}
body {
`).concat(aB,": ").concat(l,`px;
}
`)},xB=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r,s=d.useMemo(function(){return mB(o)},[o]);return d.createElement(gB,{styles:vB(s,!t,o,n?"":"!important")})},O1=!1;if(typeof window<"u")try{var Yf=Object.defineProperty({},"passive",{get:function(){return O1=!0,!0}});window.addEventListener("test",Yf,Yf),window.removeEventListener("test",Yf,Yf)}catch{O1=!1}var jl=O1?{passive:!1}:!1,bB=function(e){return e.tagName==="TEXTAREA"},rP=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!bB(e)&&n[t]==="visible")},yB=function(e){return rP(e,"overflowY")},CB=function(e){return rP(e,"overflowX")},oS=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=oP(e,r);if(o){var s=sP(e,r),i=s[1],l=s[2];if(i>l)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]},SB=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},oP=function(e,t){return e==="v"?yB(t):CB(t)},sP=function(e,t){return e==="v"?wB(t):SB(t)},kB=function(e,t){return e==="h"&&t==="rtl"?-1:1},_B=function(e,t,n,r,o){var s=kB(e,window.getComputedStyle(t).direction),i=s*r,l=n.target,f=t.contains(l),p=!1,h=i>0,m=0,v=0;do{var x=sP(e,l),C=x[0],b=x[1],w=x[2],k=b-w-s*C;(C||k)&&oP(e,l)&&(m+=k,v+=C),l=l.parentNode}while(!f&&l!==document.body||f&&(t.contains(l)||t===l));return(h&&(o&&m===0||!o&&i>m)||!h&&(o&&v===0||!o&&-i>v))&&(p=!0),p},Qf=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},sS=function(e){return[e.deltaX,e.deltaY]},aS=function(e){return e&&"current"in e?e.current:e},jB=function(e,t){return e[0]===t[0]&&e[1]===t[1]},PB=function(e){return`
.block-interactivity-`.concat(e,` {pointer-events: none;}
.allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},IB=0,Pl=[];function EB(e){var t=d.useRef([]),n=d.useRef([0,0]),r=d.useRef(),o=d.useState(IB++)[0],s=d.useState(nP)[0],i=d.useRef(e);d.useEffect(function(){i.current=e},[e]),d.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var b=w1([e.lockRef.current],(e.shards||[]).map(aS),!0).filter(Boolean);return b.forEach(function(w){return w.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),b.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var l=d.useCallback(function(b,w){if("touches"in b&&b.touches.length===2)return!i.current.allowPinchZoom;var k=Qf(b),_=n.current,j="deltaX"in b?b.deltaX:_[0]-k[0],I="deltaY"in b?b.deltaY:_[1]-k[1],M,E=b.target,O=Math.abs(j)>Math.abs(I)?"h":"v";if("touches"in b&&O==="h"&&E.type==="range")return!1;var D=oS(O,E);if(!D)return!0;if(D?M=O:(M=O==="v"?"h":"v",D=oS(O,E)),!D)return!1;if(!r.current&&"changedTouches"in b&&(j||I)&&(r.current=M),!M)return!0;var A=r.current||M;return _B(A,w,b,A==="h"?j:I,!0)},[]),f=d.useCallback(function(b){var w=b;if(!(!Pl.length||Pl[Pl.length-1]!==s)){var k="deltaY"in w?sS(w):Qf(w),_=t.current.filter(function(M){return M.name===w.type&&M.target===w.target&&jB(M.delta,k)})[0];if(_&&_.should){w.cancelable&&w.preventDefault();return}if(!_){var j=(i.current.shards||[]).map(aS).filter(Boolean).filter(function(M){return M.contains(w.target)}),I=j.length>0?l(w,j[0]):!i.current.noIsolation;I&&w.cancelable&&w.preventDefault()}}},[]),p=d.useCallback(function(b,w,k,_){var j={name:b,delta:w,target:k,should:_};t.current.push(j),setTimeout(function(){t.current=t.current.filter(function(I){return I!==j})},1)},[]),h=d.useCallback(function(b){n.current=Qf(b),r.current=void 0},[]),m=d.useCallback(function(b){p(b.type,sS(b),b.target,l(b,e.lockRef.current))},[]),v=d.useCallback(function(b){p(b.type,Qf(b),b.target,l(b,e.lockRef.current))},[]);d.useEffect(function(){return Pl.push(s),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:v}),document.addEventListener("wheel",f,jl),document.addEventListener("touchmove",f,jl),document.addEventListener("touchstart",h,jl),function(){Pl=Pl.filter(function(b){return b!==s}),document.removeEventListener("wheel",f,jl),document.removeEventListener("touchmove",f,jl),document.removeEventListener("touchstart",h,jl)}},[]);var x=e.removeScrollBar,C=e.inert;return d.createElement(d.Fragment,null,C?d.createElement(s,{styles:PB(o)}):null,x?d.createElement(xB,{gapMode:e.gapMode}):null)}const MB=I$(tP,EB);var aP=d.forwardRef(function(e,t){return d.createElement(Mm,us({},e,{ref:t,sideCar:MB}))});aP.classNames=Mm.classNames;const OB=aP;function DB(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:o,blockScrollOnMount:s,allowPinchZoom:i,finalFocusRef:l,returnFocusOnClose:f,preserveScrollBarGap:p,lockFocusAcrossFrames:h,isOpen:m}=zi(),[v,x]=M7();d.useEffect(()=>{!v&&x&&setTimeout(x)},[v,x]);const C=J5(r,m);return a.jsx(P5,{autoFocus:t,isDisabled:!n,initialFocusRef:o,finalFocusRef:l,restoreFocus:f,contentRef:r,lockFocusAcrossFrames:h,children:a.jsx(OB,{removeScrollBar:!p,allowPinchZoom:i,enabled:C===1&&s,forwardProps:!0,children:e.children})})}var Bi=Pe((e,t)=>{const{className:n,children:r,containerProps:o,motionProps:s,...i}=e,{getDialogProps:l,getDialogContainerProps:f}=zi(),p=l(i,t),h=f(o),m=et("chakra-modal__content",n),v=$c(),x={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...v.dialog},C={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...v.dialogContainer},{motionPreset:b}=zi();return a.jsx(DB,{children:a.jsx(_e.div,{...h,className:"chakra-modal__content-container",tabIndex:-1,__css:C,children:a.jsx(Z5,{preset:b,motionProps:s,className:m,...p,__css:x,children:r})})})});Bi.displayName="ModalContent";function Ad(e){const{leastDestructiveRef:t,...n}=e;return a.jsx(Fi,{...n,initialFocusRef:t})}var Nd=Pe((e,t)=>a.jsx(Bi,{ref:t,role:"alertdialog",...e})),gs=Pe((e,t)=>{const{className:
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function NW(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function TW(e){if(Array.isArray(e))return z1(e)}function mS(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 gS(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?mS(Object(n),!0).forEach(function(r){NP(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mS(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function NP(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rd(e,t){return zW(e)||LW(e,t)||TP(e,t)||$W()}function $W(){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 TP(e,t){if(e){if(typeof e=="string")return z1(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 z1(e,t)}}function z1(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 LW(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,l;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,l=f}finally{try{!o&&n.return!=null&&n.return()}finally{if(s)throw l}}return r}}function zW(e){if(Array.isArray(e))return e}var FW="file-invalid-type",BW="file-too-large",HW="file-too-small",WW="too-many-files",VW=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)}},vS=function(t){return{code:BW,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},xS=function(t){return{code:HW,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},UW={code:WW,message:"Too many files"};function $P(e,t){var n=e.type==="application/x-moz-file"||RW(e,t);return[n,n?null:VW(t)]}function LP(e,t,n){if(bi(e.size))if(bi(t)&&bi(n)){if(e.size>n)return[!1,vS(n)];if(e.size<t)return[!1,xS(t)]}else{if(bi(t)&&e.size<t)return[!1,xS(t)];if(bi(n)&&e.size>n)return[!1,vS(n)]}return[!0,null]}function bi(e){return e!=null}function GW(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,s=e.multiple,i=e.maxFiles,l=e.validator;return!s&&t.length>1||s&&i>=1&&t.length>i?!1:t.every(function(f){var p=$P(f,n),h=rd(p,1),m=h[0],v=LP(f,r,o),x=rd(v,1),C=x[0],b=l?l(f):null;return m&&C&&!b})}function ah(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Jf(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 bS(e){e.preventDefault()}function KW(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function qW(e){return e.indexOf("Edge/")!==-1}function XW(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return KW(e)||qW(e)}function ss(){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(l){return!ah(r)&&l&&l.apply(void 0,[r].concat(s)),ah(r)})}}function YW(){return"showOpenFilePicker"in window}function QW(e){if(bi(e)){var t=Object.entries(e).filter(function(n){var r=rd(n,2),o=r[0],s=r[1],i=!0;return zP(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(FP))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),i=!1),i}).reduce(function(n,r){var o=rd(r,2),s=o[0],i=o[1];return gS(gS({},n),{},NP({},s,i))},{});return[{description:"Files",accept:t}]}return e}function ZW(e){if(bi(e))return Object.entries(e).reduce(function(t,n){var r=rd(n,2),o=r[0],s=r[1];return[].concat(hS(t),[o],hS(s))},[]).filter(function(t){return zP(t)||FP(t)}).join(",")}function JW(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function eV(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function zP(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function FP(e){return/^.*\.[\w]+$/.test(e)}var tV=["children"],nV=["open"],rV=["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 iV(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function lV(e){if(Array.isArray(e))return F1(e)}function hv(e,t){return dV(e)||uV(e,t)||BP(e,t)||cV()}function cV(){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 BP(e,t){if(e){if(typeof e=="string")return F1(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 F1(e,t)}}function F1(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 uV(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,l;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,l=f}finally{try{!o&&n.return!=null&&n.return()}finally{if(s)throw l}}return r}}function dV(e){if(Array.isArray(e))return e}function yS(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 an(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?yS(Object(n),!0).forEach(function(r){B1(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yS(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function B1(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ih(e,t){if(e==null)return{};var n=fV(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 fV(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 zb=d.forwardRef(function(e,t){var n=e.children,r=ih(e,tV),o=Fb(r),s=o.open,i=ih(o,nV);return d.useImperativeHandle(t,function(){return{open:s}},[s]),H.createElement(d.Fragment,null,n(an(an({},i),{},{open:s})))});zb.displayName="Dropzone";var HP={disabled:!1,getFilesFromEvent:kW,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};zb.defaultProps=HP;zb.propTypes={children:Bt.func,accept:Bt.objectOf(Bt.arrayOf(Bt.string)),multiple:Bt.bool,preventDropOnDocument:Bt.bool,noClick:Bt.bool,noKeyboard:Bt.bool,noDrag:Bt.bool,noDragEventsBubbling:Bt.bool,minSize:Bt.number,maxSize:Bt.number,maxFiles:Bt.number,disabled:Bt.bool,getFilesFromEvent:Bt.func,onFileDialogCancel:Bt.func,onFileDialogOpen:Bt.func,useFsAccessApi:Bt.bool,autoFocus:Bt.bool,onDragEnter:Bt.func,onDragLeave:Bt.func,onDragOver:Bt.func,onDrop:Bt.func,onDropAccepted:Bt.func,onDropRejected:Bt.func,onError:Bt.func,validator:Bt.func};var H1={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Fb(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=an(an({},HP),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,s=t.maxSize,i=t.minSize,l=t.multiple,f=t.maxFiles,p=t.onDragEnter,h=t.onDragLeave,m=t.onDragOver,v=t.onDrop,x=t.onDropAccepted,C=t.onDropRejected,b=t.onFileDialogCancel,w=t.onFileDialogOpen,k=t.useFsAccessApi,_=t.autoFocus,j=t.preventDropOnDocument,I=t.noClick,M=t.noKeyboard,E=t.noDrag,O=t.noDragEventsBubbling,D=t.onError,A=t.validator,R=d.useMemo(function(){return ZW(n)},[n]),$=d.useMemo(function(){return QW(n)},[n]),K=d.useMemo(function(){return typeof w=="function"?w:CS},[w]),B=d.useMemo(function(){return typeof b=="function"?b:CS},[b]),U=d.useRef(null),Y=d.useRef(null),W=d.useReducer(pV,H1),L=hv(W,2),X=L[0],z=L[1],q=X.isFocused,ne=X.isFileDialogActive,Q=d.useRef(typeof window<"u"&&window.isSecureContext&&k&&YW()),ie=function(){!Q.current&&ne&&setTimeout(function(){if(Y.current){var Re=Y.current.files;Re.length||(z({type:"closeDialog"}),B())}},300)};d.useEffect(function
`),status:"error"})},[i,s]),m=d.useCallback(async j=>{p({file:j,image_category:"user",is_intermediate:!1,postUploadAction:r,board_id:n==="none"?void 0:n})},[n,r,p]),v=d.useCallback((j,I)=>{if(I.length>1){s({title:i("toast.uploadFailed"),description:i("toast.uploadFailedInvalidUploadDesc"),status:"error"});return}I.forEach(M=>{h(M)}),j.forEach(M=>{m(M)})},[i,s,m,h]),{getRootProps:x,getInputProps:C,isDragAccept:b,isDragReject:w,isDragActive:k,inputRef:_}=Fb({accept:{"image/png":[".png"],"image/jpeg":[".jpg",".jpeg",".png"]},noClick:!0,onDrop:v,onDragOver:()=>f(!0),disabled:o,multiple:!1});return d.useEffect(()=>{const j=async I=>{var M,E;_.current&&(M=I.clipboardData)!=null&&M.files&&(_.current.files=I.clipboardData.files,(E=_.current)==null||E.dispatchEvent(new Event("change",{bubbles:!0})))};return document.addEventListener("paste",j),()=>{document.removeEventListener("paste",j)}},[_]),a.jsxs(Ie,{...x({style:{}}),onKeyDown:j=>{j.key},children:[a.jsx("input",{...C()}),t,a.jsx(nr,{children:k&&l&&a.jsx(gn.div,{initial:{opacity:0},animate:{opacity:1,transition:{duration:.1}},exit:{opacity:0,transition:{duration:.1}},children:a.jsx(IV,{isDragAccept:b,isDragReject:w,setIsHandlingUpload:f})},"image-upload-overlay")})]})},OV=d.memo(MV),DV=Pe((e,t)=>{const{children:n,tooltip:r="",tooltipProps:{placement:o="top",hasArrow:s=!0,...i}={},isChecked:l,...f}=e;return a.jsx(Dt,{label:r,placement:o,hasArrow:s,...i,children:a.jsx(gc,{ref:t,colorScheme:l?"accent":"base",...f,children:n})})}),it=d.memo(DV);function RV(e){const t=d.createContext(null);return[({children:o,value:s})=>H.createElement(t.Provider,{value:s},o),()=>{const o=d.useContext(t);if(o===null)throw new Error(e);return o}]}function qP(e){return Array.isArray(e)?e:[e]}const AV=()=>{};function NV(e,t={active:!0}){return typeof e!="function"||!t.active?t.onKeyDown||AV:n=>{var r;n.key==="Escape"&&(e(n),(r=t.onTrigger)==null||r.call(t))}}function XP({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 YP(e){return Array.isArray(e)||e===null?!1:typeof e=="object"?e.type!==H.Fragment:!1}function QP(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=QP(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function ZP(){for(var e=0,t,n,r="";e<arguments.length;)(t=arguments[e++])&&(n=QP(t))&&(r&&(r+=" "),r+=n);return r}const TV={app:100,modal:200,popover:300,overlay:400,max:9999};function Hb(e){return TV[e]}function $V(e,t){const n=d.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 LV=$7({key:"mantine",prepend:!0});function zV(){return g3()||LV}var FV=Object.defineProperty,SS=Object.getOwnPropertySymbols,BV=Object.prototype.hasOwnProperty,HV=Object.prototype.propertyIsEnumerable,kS=(e,t,n)=>t in e?FV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,WV=(e,t)=>{for(var n in t||(t={}))BV.call(t,n)&&kS(e,n,t[n]);if(SS)for(var n of SS(t))HV.call(t,n)&&kS(e,n,t[n]);return e};const vv="ref";function VV(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(!(vv in n))return{args:e,ref:t};t=n[vv];const r=WV({},n);return delete r[vv],{args:[r],ref:t}}const{cssFactory:UV}=(()=>{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:l,args:f}=VV(i),p=L7(f,r.registered);return z7(r,p,!1),`${r.key}-${p.name}${l===void 0?"":` ${l}`}`};return{css:o,cx:(...i)=>e(r.registered,o,ZP(i))}}return{cssFactory:t}})();function JP(){const e=zV();return $V(()=>UV({cache:e}),[e])}function GV({cx:e,classes:t,context:n,classNames:r,name:o,cache:s}){const i=n.reduce((l,f)=>(Object.keys(f.classNames).forEach(p=>{typeof l[p]!="string"?l[p]=`${f.classNames[p]}`:l[p]=`${l[p]} ${f.classNam
* OverlayScrollbars
* Version: 2.2.1
*
* Copyright (c) Rene Haas | KingSora.
* https://github.com/KingSora
*
* Released under the MIT license.
*/function Ot(e,t){if(og(e))for(let n=0;n<e.length&&t(e[n],n,e)!==!1;n++);else e&&Ot(Object.keys(e),n=>t(e[n],n,e));return e}function er(e,t){const n=ni(t);if(Ko(t)||n){let o=n?"":{};if(e){const s=window.getComputedStyle(e,null);o=n?Dk(e,s,t):t.reduce((i,l)=>(i[l]=Dk(e,s,l),i),o)}return o}e&&Ot(Hr(t),o=>EJ(e,o,t[o]))}const Oo=(e,t)=>{const{o:n,u:r,_:o}=e;let s=n,i;const l=(h,m)=>{const v=s,x=h,C=m||(r?!r(v,x):v!==x);return(C||o)&&(s=x,i=v),[s,C,i]};return[t?h=>l(t(s,i),h):l,h=>[s,!!h,i]]},Hd=()=>typeof window<"u",zE=Hd()&&Node.ELEMENT_NODE,{toString:hJ,hasOwnProperty:_v}=Object.prototype,fa=e=>e===void 0,rg=e=>e===null,mJ=e=>fa(e)||rg(e)?`${e}`:hJ.call(e).replace(/^\[object (.+)\]$/,"$1").toLowerCase(),Wa=e=>typeof e=="number",ni=e=>typeof e=="string",ry=e=>typeof e=="boolean",Go=e=>typeof e=="function",Ko=e=>Array.isArray(e),ad=e=>typeof e=="object"&&!Ko(e)&&!rg(e),og=e=>{const t=!!e&&e.length,n=Wa(t)&&t>-1&&t%1==0;return Ko(e)||!Go(e)&&n?t>0&&ad(e)?t-1 in e:!0:!1},tx=e=>{if(!e||!ad(e)||mJ(e)!=="object")return!1;let t;const n="constructor",r=e[n],o=r&&r.prototype,s=_v.call(e,n),i=o&&_v.call(o,"isPrototypeOf");if(r&&!s&&!i)return!1;for(t in e);return fa(t)||_v.call(e,t)},Kh=e=>{const t=HTMLElement;return e?t?e instanceof t:e.nodeType===zE:!1},sg=e=>{const t=Element;return e?t?e instanceof t:e.nodeType===zE:!1},oy=(e,t,n)=>e.indexOf(t,n),Lt=(e,t,n)=>(!n&&!ni(t)&&og(t)?Array.prototype.push.apply(e,t):e.push(t),e),Vi=e=>{const t=Array.from,n=[];return t&&e?t(e):(e instanceof Set?e.forEach(r=>{Lt(n,r)}):Ot(e,r=>{Lt(n,r)}),n)},sy=e=>!!e&&e.length===0,js=(e,t,n)=>{Ot(e,o=>o&&o.apply(void 0,t||[])),!n&&(e.length=0)},ag=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),Hr=e=>e?Object.keys(e):[],cn=(e,t,n,r,o,s,i)=>{const l=[t,n,r,o,s,i];return(typeof e!="object"||rg(e))&&!Go(e)&&(e={}),Ot(l,f=>{Ot(Hr(f),p=>{const h=f[p];if(e===h)return!0;const m=Ko(h);if(h&&(tx(h)||m)){const v=e[p];let x=v;m&&!Ko(v)?x=[]:!m&&!tx(v)&&(x={}),e[p]=cn(x,h)}else e[p]=h})}),e},ay=e=>{for(const t in e)return!1;return!0},FE=(e,t,n,r)=>{if(fa(r))return n?n[e]:t;n&&(ni(r)||Wa(r))&&(n[e]=r)},Jn=(e,t,n)=>{if(fa(n))return e?e.getAttribute(t):null;e&&e.setAttribute(t,n)},Cr=(e,t)=>{e&&e.removeAttribute(t)},Ii=(e,t,n,r)=>{if(n){const o=Jn(e,t)||"",s=new Set(o.split(" "));s[r?"add":"delete"](n);const i=Vi(s).join(" ").trim();Jn(e,t,i)}},gJ=(e,t,n)=>{const r=Jn(e,t)||"";return new Set(r.split(" ")).has(n)},zo=(e,t)=>FE("scrollLeft",0,e,t),Zs=(e,t)=>FE("scrollTop",0,e,t),nx=Hd()&&Element.prototype,BE=(e,t)=>{const n=[],r=t?sg(t)?t:null:document;return r?Lt(n,r.querySelectorAll(e)):n},vJ=(e,t)=>{const n=t?sg(t)?t:null:document;return n?n.querySelector(e):null},qh=(e,t)=>sg(e)?(nx.matches||nx.msMatchesSelector).call(e,t):!1,iy=e=>e?Vi(e.childNodes):[],ra=e=>e?e.parentElement:null,Ul=(e,t)=>{if(sg(e)){const n=nx.closest;if(n)return n.call(e,t);do{if(qh(e,t))return e;e=ra(e)}while(e)}return null},xJ=(e,t,n)=>{const r=e&&Ul(e,t),o=e&&vJ(n,r),s=Ul(o,t)===r;return r&&o?r===e||o===e||s&&Ul(Ul(e,n),t)!==r:!1},ly=(e,t,n)=>{if(n&&e){let r=t,o;og(n)?(o=document.createDocumentFragment(),Ot(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)}},lo=(e,t)=>{ly(e,null,t)},bJ=(e,t)=>{ly(ra(e),e,t)},Ek=(e,t)=>{ly(ra(e),e&&e.nextSibling,t)},xs=e=>{if(og(e))Ot(Vi(e),t=>xs(t));else if(e){const t=ra(e);t&&t.removeChild(e)}},Ei=e=>{const t=document.createElement("div");return e&&Jn(t,"class",e),t},HE=e=>{const t=Ei();return t.innerHTML=e.trim(),Ot(iy(t),n=>xs(n))},rx=e=>e.charAt(0).toUpperCase()+e.slice(1),yJ=()=>Ei().style,CJ=["-webkit-","-moz-","-o-","-ms-"],wJ=["WebKit","Moz","O","MS","webkit","moz","o","ms"],jv={},Pv={},SJ=e=>{let t=Pv[e];if(ag(Pv,e))return t;const n=rx(e),r=yJ();return Ot(CJ,o=>{const s=o.replace(/-/g,"");return!(t=[e,o+e,s+n,rx(s)+n].find(l=>r[l]!==void 0))}),Pv[e]=t||""},Wd=e=>{if(Hd()){let t=jv[e]||window[e];return ag(jv,e)||(Ot(wJ,n=>(t=t||window[n+rx(e)],!t)),jv[e]=t),t}},kJ=Wd("MutationObserver"),Mk=Wd("IntersectionObserver"),Gl=Wd("ResizeObserver"),WE=Wd("cancelAnimationFrame"),V
* @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 Xpe=function(t){var n={},r=d,o=Ip,s=Object.assign;function i(c){for(var u="https://reactjs.org/docs/error-decoder.html?invariant="+c,g=1;g<arguments.length;g++)u+="&args[]="+encodeURIComponent(arguments[g]);return"Minified React error #"+c+"; visit "+u+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var l=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"),x=Symbol.for("react.provider"),C=Symbol.for("react.context"),b=Symbol.for("react.forward_ref"),w=Symbol.for("react.suspense"),k=Symbol.for("react.suspense_list"),_=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),I=Symbol.for("react.offscreen"),M=Symbol.iterator;function E(c){return c===null||typeof c!="object"?null:(c=M&&c[M]||c["@@iterator"],typeof c=="function"?c:null)}function O(c){if(c==null)return null;if(typeof c=="function")return c.displayName||c.name||null;if(typeof c=="string")return c;switch(c){case h:return"Fragment";case p:return"Portal";case v:return"Profiler";case m:return"StrictMode";case w:return"Suspense";case k:return"SuspenseList"}if(typeof c=="object")switch(c.$$typeof){case C:return(c.displayName||"Context")+".Consumer";case x:return(c._context.displayName||"Context")+".Provider";case b:var u=c.render;return c=c.displayName,c||(c=u.displayName||u.name||"",c=c!==""?"ForwardRef("+c+")":"ForwardRef"),c;case _:return u=c.displayName||null,u!==null?u:O(c.type)||"Memo";case j:u=c._payload,c=c._init;try{return O(c(u))}catch{}}return null}function D(c){var u=c.type;switch(c.tag){case 24:return"Cache";case 9:return(u.displayName||"Context")+".Consumer";case 10:return(u._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return c=u.render,c=c.displayName||c.name||"",u.displayName||(c!==""?"ForwardRef("+c+")":"ForwardRef");case 7:return"Fragment";case 5:return u;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return O(u);case 8:return u===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 u=="function")return u.displayName||u.name||null;if(typeof u=="string")return u}return null}function A(c){var u=c,g=c;if(c.alternate)for(;u.return;)u=u.return;else{c=u;do u=c,u.flags&4098&&(g=u.return),c=u.return;while(c)}return u.tag===3?g:null}function R(c){if(A(c)!==c)throw Error(i(188))}function $(c){var u=c.alternate;if(!u){if(u=A(c),u===null)throw Error(i(188));return u!==c?null:c}for(var g=c,y=u;;){var S=g.return;if(S===null)break;var P=S.alternate;if(P===null){if(y=S.return,y!==null){g=y;continue}break}if(S.child===P.child){for(P=S.child;P;){if(P===g)return R(S),c;if(P===y)return R(S),u;P=P.sibling}throw Error(i(188))}if(g.return!==y.return)g=S,y=P;else{for(var N=!1,Z=S.child;Z;){if(Z===g){N=!0,g=S,y=P;break}if(Z===y){N=!0,y=S,g=P;break}Z=Z.sibling}if(!N){for(Z=P.child;Z;){if(Z===g){N=!0,g=P,y=S;break}if(Z===y){N=!0,y=P,g=S;break}Z=Z.sibling}if(!N)throw Error(i(189))}}if(g.alternate!==y)throw Error(i(190))}if(g.tag!==3)throw Error(i(188));return g.stateNode.current===g?c:u}function K(c){return c=$(c),c!==null?B(c):null}function B(c){if(c.tag===5||c.tag===6)return c;for(c=c.child;c!==null;){var u=B(c);if(u!==null)return u;c=c.sibling}return null}function U(c){if(c.tag===5||c.tag===6)return c;for(c=c.child;c!==null;){if(c.tag!==4){var u=U(c);if(u!==null)return u}c=c.sibling}return null}var Y=Array.isArray,W=t.getPublicInstance,L=t.getRootHostContext,X=t.getChildHostContext,z=t.prepareForCommit,q=t.resetAfterCommit,ne=t.createInstance,Q=t.appendInitialChild,ie=t.finalizeInitialChildren,oe=t.prepareUpdate,V=t.shouldSetTextContent,G=t.createTextInstance,J=t.scheduleTimeout,se=t.cancelTimeout,re=t.noTimeout,fe=t.isPrimaryRenderer,de=t.supportsMutation,me=t.supportsPersistence,ye=t.supportsHydration,he=t.get
`+Yc+c}var Qc=!1;function Zc(c,u){if(!c||Qc)return"";Qc=!0;var g=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(u)if(u=function(){throw Error()},Object.defineProperty(u.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(u,[])}catch(Ee){var y=Ee}Reflect.construct(c,[],u)}else{try{u.call()}catch(Ee){y=Ee}c.call(u.prototype)}else{try{throw Error()}catch(Ee){y=Ee}c()}}catch(Ee){if(Ee&&y&&typeof Ee.stack=="string"){for(var S=Ee.stack.split(`
`),P=y.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 ce=`
`+S[N].replace(" at new "," at ");return c.displayName&&ce.includes("<anonymous>")&&(ce=ce.replace("<anonymous>",c.displayName)),ce}while(1<=N&&0<=Z);break}}}finally{Qc=!1,Error.prepareStackTrace=g}return(c=c?c.displayName||c.name:"")?ai(c):""}var Rg=Object.prototype.hasOwnProperty,va=[],Je=-1;function wt(c){return{current:c}}function xt(c){0>Je||(c.current=va[Je],va[Je]=null,Je--)}function St(c,u){Je++,va[Je]=c.current,c.current=u}var Kn={},Wt=wt(Kn),kn=wt(!1),lr=Kn;function cl(c,u){var g=c.type.contextTypes;if(!g)return Kn;var y=c.stateNode;if(y&&y.__reactInternalMemoizedUnmaskedChildContext===u)return y.__reactInternalMemoizedMaskedChildContext;var S={},P;for(P in g)S[P]=u[P];return y&&(c=c.stateNode,c.__reactInternalMemoizedUnmaskedChildContext=u,c.__reactInternalMemoizedMaskedChildContext=S),S}function gr(c){return c=c.childContextTypes,c!=null}function Yd(){xt(kn),xt(Wt)}function Yy(c,u,g){if(Wt.current!==Kn)throw Error(i(168));St(Wt,u),St(kn,g)}function Qy(c,u,g){var y=c.stateNode;if(u=u.childContextTypes,typeof y.getChildContext!="function")return g;y=y.getChildContext();for(var S in y)if(!(S in u))throw Error(i(108,D(c)||"Unknown",S));return s({},g,y)}function Qd(c){return c=(c=c.stateNode)&&c.__reactInternalMemoizedMergedChildContext||Kn,lr=Wt.current,St(Wt,c),St(kn,kn.current),!0}function Zy(c,u,g){var y=c.stateNode;if(!y)throw Error(i(169));g?(c=Qy(c,u,lr),y.__reactInternalMemoizedMergedChildContext=c,xt(kn),xt(Wt),St(Wt,c)):xt(kn),St(kn,g)}var Co=Math.clz32?Math.clz32:b8,v8=Math.log,x8=Math.LN2;function b8(c){return c>>>=0,c===0?32:31-(v8(c)/x8|0)|0}var Zd=64,Jd=4194304;function Jc(c){switch(c&-c){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 c&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return c&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return c}}function ef(c,u){var g=c.pendingLanes;if(g===0)return 0;var y=0,S=c.suspendedLanes,P=c.pingedLanes,N=g&268435455;if(N!==0){var Z=N&~S;Z!==0?y=Jc(Z):(P&=N,P!==0&&(y=Jc(P)))}else N=g&~S,N!==0?y=Jc(N):P!==0&&(y=Jc(P));if(y===0)return 0;if(u!==0&&u!==y&&!(u&S)&&(S=y&-y,P=u&-u,S>=P||S===16&&(P&4194240)!==0))return u;if(y&4&&(y|=g&16),u=c.entangledLanes,u!==0)for(c=c.entanglements,u&=y;0<u;)g=31-Co(u),S=1<<g,y|=c[g],u&=~S;return y}function y8(c,u){switch(c){case 1:case 2:case 4:return u+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 u+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 C8(c,u){for(var g=c.suspendedLanes,y=c.pingedLanes,S=c.expirationTimes,P=c.pendingLanes;0<P;){var N=31-Co(P),Z=1<<N,ce=S[N];ce===-1?(!(Z&g)||Z&y)&&(S[N]=y8(Z,u)):ce<=u&&(c.expiredLanes|=Z),P&=~Z}}function Ag(c){return c=c.pendingLanes&-1073741825,c!==0?c:c&1073741824?1073741824:0}function Jy(){var c=Zd;return Zd<<=1,!(Zd&4194240)&&(Zd=64),c}function Ng(c){for(var u=[],g=0;31>g;g++)u.push(c);return u}function eu(c,u,g){c.pendingLanes|=u,u!==536870912&&(c.suspendedLanes=0,c.pingedLanes=0),c=c.eventTimes,u=31-Co(u),c[u]=g}function w8(c,u){var g=c.pendingLanes&~u;c.pendingLanes=u,c.suspendedLanes=0,c.pingedLanes=0,c.expiredLanes&=u,c.mutableReadLanes&=u,c.entangledLanes&=u,u=c.entanglements;var y=c.eventTimes;for(c=c.expirationTimes;0<g;){var S=31-Co(g),P=1<<S;u[S]=0,y[S]=-1,c[S]=-1,g&=~P}}function Tg(c,u){var g=c.entangledLanes|=u;for(c=c.entanglements;g;){var y=31-Co(g),S=1<<y;S&u|c[y]&u&&(c[y]|=u),g&=~S}}var It=0;function e2(c){return c&=-c,1<c?4<c?c&268435455?16:536870912:4:1}var $g=o.unstable_scheduleCallback,t2=o.unstable_cancelCallback,S8=o.unsta
Error generating stack: `+P.message+`
`+P.stack}return{value:c,source:u,stack:S,digest:null}}function f0(c,u,g){return{value:c,source:null,stack:g??null,digest:u??null}}function p0(c,u){try{console.error(u.value)}catch(g){setTimeout(function(){throw g})}}var z8=typeof WeakMap=="function"?WeakMap:Map;function H2(c,u,g){g=As(-1,g),g.tag=3,g.payload={element:null};var y=u.value;return g.callback=function(){Rf||(Rf=!0,R0=y),p0(c,u)},g}function W2(c,u,g){g=As(-1,g),g.tag=3;var y=c.type.getDerivedStateFromError;if(typeof y=="function"){var S=u.value;g.payload=function(){return y(S)},g.callback=function(){p0(c,u)}}var P=c.stateNode;return P!==null&&typeof P.componentDidCatch=="function"&&(g.callback=function(){p0(c,u),typeof y!="function"&&(ya===null?ya=new Set([this]):ya.add(this));var N=u.stack;this.componentDidCatch(u.value,{componentStack:N!==null?N:""})}),g}function V2(c,u,g){var y=c.pingCache;if(y===null){y=c.pingCache=new z8;var S=new Set;y.set(u,S)}else S=y.get(u),S===void 0&&(S=new Set,y.set(u,S));S.has(g)||(S.add(g),c=J8.bind(null,c,u,g),u.then(c,c))}function U2(c){do{var u;if((u=c.tag===13)&&(u=c.memoizedState,u=u!==null?u.dehydrated!==null:!0),u)return c;c=c.return}while(c!==null);return null}function G2(c,u,g,y,S){return c.mode&1?(c.flags|=65536,c.lanes=S,c):(c===u?c.flags|=65536:(c.flags|=128,g.flags|=131072,g.flags&=-52805,g.tag===1&&(g.alternate===null?g.tag=17:(u=As(-1,1),u.tag=2,ba(g,u,1))),g.lanes|=1),c)}var F8=l.ReactCurrentOwner,vr=!1;function cr(c,u,g,y){u.child=c===null?b2(u,null,g,y):ml(u,c.child,g,y)}function K2(c,u,g,y,S){g=g.render;var P=u.ref;return hl(u,S),y=a0(c,u,g,y,P,S),g=i0(),c!==null&&!vr?(u.updateQueue=c.updateQueue,u.flags&=-2053,c.lanes&=~S,Ns(c,u,S)):(Qt&&g&&Bg(u),u.flags|=1,cr(c,u,y,S),u.child)}function q2(c,u,g,y,S){if(c===null){var P=g.type;return typeof P=="function"&&!z0(P)&&P.defaultProps===void 0&&g.compare===null&&g.defaultProps===void 0?(u.tag=15,u.type=P,X2(c,u,P,y,S)):(c=zf(g.type,null,y,u,u.mode,S),c.ref=u.ref,c.return=u,u.child=c)}if(P=c.child,!(c.lanes&S)){var N=P.memoizedProps;if(g=g.compare,g=g!==null?g:af,g(N,y)&&c.ref===u.ref)return Ns(c,u,S)}return u.flags|=1,c=ka(P,y),c.ref=u.ref,c.return=u,u.child=c}function X2(c,u,g,y,S){if(c!==null){var P=c.memoizedProps;if(af(P,y)&&c.ref===u.ref)if(vr=!1,u.pendingProps=y=P,(c.lanes&S)!==0)c.flags&131072&&(vr=!0);else return u.lanes=c.lanes,Ns(c,u,S)}return h0(c,u,g,y,S)}function Y2(c,u,g){var y=u.pendingProps,S=y.children,P=c!==null?c.memoizedState:null;if(y.mode==="hidden")if(!(u.mode&1))u.memoizedState={baseLanes:0,cachePool:null,transitions:null},St(yl,Nr),Nr|=g;else{if(!(g&1073741824))return c=P!==null?P.baseLanes|g:g,u.lanes=u.childLanes=1073741824,u.memoizedState={baseLanes:c,cachePool:null,transitions:null},u.updateQueue=null,St(yl,Nr),Nr|=c,null;u.memoizedState={baseLanes:0,cachePool:null,transitions:null},y=P!==null?P.baseLanes:g,St(yl,Nr),Nr|=y}else P!==null?(y=P.baseLanes|g,u.memoizedState=null):y=g,St(yl,Nr),Nr|=y;return cr(c,u,S,g),u.child}function Q2(c,u){var g=u.ref;(c===null&&g!==null||c!==null&&c.ref!==g)&&(u.flags|=512,u.flags|=2097152)}function h0(c,u,g,y,S){var P=gr(g)?lr:Wt.current;return P=cl(u,P),hl(u,S),g=a0(c,u,g,y,P,S),y=i0(),c!==null&&!vr?(u.updateQueue=c.updateQueue,u.flags&=-2053,c.lanes&=~S,Ns(c,u,S)):(Qt&&y&&Bg(u),u.flags|=1,cr(c,u,g,S),u.child)}function Z2(c,u,g,y,S){if(gr(g)){var P=!0;Qd(u)}else P=!1;if(hl(u,S),u.stateNode===null)Cf(c,u),m2(u,g,y),Jg(u,g,y,S),y=!0;else if(c===null){var N=u.stateNode,Z=u.memoizedProps;N.props=Z;var ce=N.context,Ee=g.contextType;typeof Ee=="object"&&Ee!==null?Ee=qr(Ee):(Ee=gr(g)?lr:Wt.current,Ee=cl(u,Ee));var Ke=g.getDerivedStateFromProps,pt=typeof Ke=="function"||typeof N.getSnapshotBeforeUpdate=="function";pt||typeof N.UNSAFE_componentWillReceiveProps!="function"&&typeof N.componentWillReceiveProps!="function"||(Z!==y||ce!==Ee)&&g2(u,N,y,Ee),xa=!1;var He=u.memoizedState;N.state=He,df(u,y,N,S),ce=u.memoizedState,Z!==y||He!==ce||kn.current||xa?(typeof Ke=="function"&&(Zg(u,g,Ke,y),ce=u.memoizedState),(Z=xa||h2(u,g,Z,y,He,ce,Ee))?(pt||typeof N.UNSAFE_componentWillMount!="function"&&typeof N.componentWillMo
`+(y.join(" > ")+`
No matching component was found for:
`)+c.join(" > ")}return null},n.getPublicRootInstance=function(c){if(c=c.current,!c.child)return null;switch(c.child.tag){case 5:return W(c.child.stateNode);default:return c.child.stateNode}},n.injectIntoDevTools=function(c){if(c={bundleType:c.bundleType,version:c.version,rendererPackageName:c.rendererPackageName,rendererConfig:c.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:l.ReactCurrentDispatcher,findHostInstanceByFiber:s7,findFiberByHostInstance:c.findFiberByHostInstance||a7,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")c=!1;else{var u=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(u.isDisabled||!u.supportsFiber)c=!0;else{try{tf=u.inject(c),Yo=u}catch{}c=!!u.checkDCE}}return c},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(c,u,g,y){if(!Ue)throw Error(i(363));c=I0(c,u);var S=mt(c,g,y).disconnect;return{disconnect:function(){S()}}},n.registerMutableSourceForHydration=function(c,u){var g=u._getVersion;g=g(u._source),c.mutableSourceEagerHydrationData==null?c.mutableSourceEagerHydrationData=[u,g]:c.mutableSourceEagerHydrationData.push(u,g)},n.runWithPriority=function(c,u){var g=It;try{return It=c,u()}finally{It=g}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(c,u,g,y){var S=u.current,P=Qn(),N=wa(S);return g=EC(g),u.context===null?u.context=g:u.pendingContext=g,u=As(P,N),u.payload={element:c},y=y===void 0?null:y,y!==null&&(u.callback=y),c=ba(S,u,N),c!==null&&(Qr(c,S,N,P),uf(c,S,N)),N},n};s8.exports=Xpe;var Ype=s8.exports;const Qpe=Oc(Ype);var a8={exports:{}},sl={};/**
* @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.
*/sl.ConcurrentRoot=1;sl.ContinuousEventPriority=4;sl.DefaultEventPriority=16;sl.DiscreteEventPriority=1;sl.IdleEventPriority=536870912;sl.LegacyRoot=0;a8.exports=sl;var i8=a8.exports;const ij={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let lj=!1,cj=!1;const Ky=".react-konva-event",Zpe=`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
`,Jpe=`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
`,ehe={};function Mg(e,t,n=ehe){if(!lj&&"zIndex"in t&&(console.warn(Jpe),lj=!0),!cj&&t.draggable){var r=t.x!==void 0||t.y!==void 0,o=t.onDragEnd||t.onDragMove;r&&!o&&(console.warn(Zpe),cj=!0)}for(var s in n)if(!ij[s]){var i=s.slice(0,2)==="on",l=n[s]!==t[s];if(i&&l){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 x={};for(var s in t)if(!ij[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)),t[s]&&(x[f]=t[s])}!i&&(t[s]!==n[s]||h&&t[s]!==e.getAttr(s))&&(v=!0,m[s]=t[s])}v&&(e.setAttrs(m),si(e));for(var f in x)e.on(f+Ky,x[f])}function si(e){if(!n9.Konva.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}const l8={},the={};dd.Node.prototype._applyProps=Mg;function nhe(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),si(e)}function rhe(e,t,n){let r=dd[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=dd.Group);const o={},s={};for(var i in t){var l=i.slice(0,2)==="on";l?s[i]=t[i]:o[i]=t[i]}const f=new r(o);return Mg(f,s),f}function ohe(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function she(e,t,n){return!1}function ahe(e){return e}function ihe(){return null}function lhe(){return null}function che(e,t,n,r){return the}function uhe(){}function dhe(e){}function fhe(e,t){return!1}function phe(){return l8}function hhe(){return l8}const mhe=setTimeout,ghe=clearTimeout,vhe=-1;function xhe(e,t){return!1}const bhe=!1,yhe=!0,Che=!0;function whe(e,t){t.parent===e?t.moveToTop():e.add(t),si(e)}function She(e,t){t.parent===e?t.moveToTop():e.add(t),si(e)}function c8(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),si(e)}function khe(e,t,n){c8(e,t,n)}function _he(e,t){t.destroy(),t.off(Ky),si(e)}function jhe(e,t){t.destroy(),t.off(Ky),si(e)}function Phe(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function Ihe(e,t,n){}function Ehe(e,t,n,r,o){Mg(e,o,r)}function Mhe(e){e.hide(),si(e)}function Ohe(e){}function Dhe(e,t){(t.visible==null||t.visible)&&e.show()}function Rhe(e,t){}function Ahe(e){}function Nhe(){}const The=()=>i8.DefaultEventPriority,$he=Object.freeze(Object.defineProperty({__proto__:null,appendChild:whe,appendChildToContainer:She,appendInitialChild:nhe,cancelTimeout:ghe,clearContainer:Ahe,commitMount:Ihe,commitTextUpdate:Phe,commitUpdate:Ehe,createInstance:rhe,createTextInstance:ohe,detachDeletedInstance:Nhe,finalizeInitialChildren:she,getChildHostContext:hhe,getCurrentEventPriority:The,getPublicInstance:ahe,getRootHostContext:phe,hideInstance:Mhe,hideTextInstance:Ohe,idlePriority:Ip.unstable_IdlePriority,insertBefore:c8,insertInContainerBefore:khe,isPrimaryRenderer:bhe,noTimeout:vhe,now:Ip.unstable_now,prepareForCommit:ihe,preparePortalMount:lhe,prepareUpdate:che,removeChild:_he,removeChildFromContainer:jhe,resetAfterCommit:uhe,resetTextContent:dhe,run:Ip.unstable_runWithPriority,scheduleTimeout:mhe,shouldDeprioritizeSubtree:fhe,shouldSetTextContent:xhe,supportsMutation:Che,unhideInstance:Dhe,unhideTextInstance:Rhe,warnsIfNotActing:yhe},Symbol.toStringTag,{value:"Module"}));var Lhe=Object.defineProperty,zhe=Object.defineProperties,Fhe=Object.getOwnPropertyDescriptors,uj=Object.getOwnPropertySymbols,Bhe=Object.prototype.hasOwnProperty,Hhe=Object.prototype.propertyIsEnumerable,dj=(e,t,n)=>t in e?Lhe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,fj=(e,t)=>{for(var n in t||(t={}))Bhe.call(t,n)&&dj(e,n,t[n]);if(uj)for(var n of uj(t))Hhe.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),yme=e=>{const{...t}=e,{maskColorString:n,stageCoordinates:r,stageDimensions:o,stageScale:s}=F(bme),[i,l]=d.useState(null),[f,p]=d.useState(0),h=d.useRef(null),m=d.useCallback(()=>{p(f+1),setTimeout(m,500)},[f]);return d.useEffect(()=>{if(i)return;const v=new Image;v.onload=()=>{l(v)},v.src=mj(n)},[i,n]),d.useEffect(()=>{i&&(i.src=mj(n))},[i,n]),d.useEffect(()=>{const v=setInterval(()=>p(x=>(x+1)%5),50);return()=>clearInterval(v)},[]),!i||!wl(r.x)||!wl(r.y)||!wl(s)||!wl(o.width)||!wl(o.height)?null:a.jsx(ks,{ref:h,offsetX:r.x/s,offsetY:r.y/s,height:o.height/s,width:o.width/s,fillPatternImage:i,fillPatternOffsetY:wl(f)?f:0,fillPatternRepeat:"repeat",fillPatternScale:{x:1/s,y:1/s},listening:!0,globalCompositeOperation:"source-in",...t})},Cme=d.memo(yme),wme=ae([$t],e=>({objects:e.layerState.objects}),{memoizeOptions:{resultEqualityCheck:kt}}),Sme=e=>{const{...t}=e,{objects:n}=F(wme);return a.jsx(sa,{listening:!1,...t,children:n.filter(m9).map((r,o)=>a.jsx(lm,{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))})},kme=d.memo(Sme);var xi=d,_me=function(t,n,r){const o=xi.useRef("loading"),s=xi.useRef(),[i,l]=xi.useState(0),f=xi.useRef(),p=xi.useRef(),h=xi.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),xi.useLayoutEffect(function(){if(!t)return;var m=document.createElement("img");function v(){o.current="loaded",s.current=m,l(Math.random())}function x(){o.current="failed",s.current=void 0,l(Math.random())}return m.addEventListener("load",v),m.addEventListener("error",x),n&&(m.crossOrigin=n),r&&(m.referrerPolicy=r),m.src=t,function(){m.removeEventListener("load",v),m.removeEventListener("error",x)}},[t,n,r]),[s.current,o.current]};const jme=Oc(_me),Pme=e=>{const{width:t,height:n,x:r,y:o,imageName:s}=e.canvasImage,{currentData:i,isError:l}=po(s??zr.skipToken),[f]=jme((i==null?void 0:i.image_url)??"",g9.get()?"use-credentials":"anonymous");return l?a.jsx(ks,{x:r,y:o,width:t,height:n,fill:"red"}):a.jsx(p8,{x:r,y:o,image:f,listening:!1})},m8=d.memo(Pme),Ime=ae([$t],e=>{const{layerState:{objects:t}}=e;return{objects:t}},{memoizeOptions:{resultEqualityCheck:kt}}),Eme=()=>{const{objects:e}=F(Ime);return e?a.jsx(sa,{name:"outpainting-objects",listening:!1,children:e.map((t,n)=>{if(v9(t))return a.jsx(m8,{canvasImage:t},n);if(x9(t)){const r=a.jsx(lm,{points:t.points,stroke:t.color?Di(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(sa,{clipX:t.clip.x,clipY:t.clip.y,clipWidth:t.clip.width,clipHeight:t.clip.height,children:r},n):r}else{if(b9(t))return a.jsx(ks,{x:t.x,y:t.y,width:t.width,height:t.height,fill:Di(t.color)},n);if(y9(t))return a.jsx(ks,{x:t.x,y:t.y,width:t.width,height:t.height,fill:"rgb(255, 255, 255)",globalCompositeOperation:"destination-out"},n)}})}):null},Mme=d.memo(Eme),Ome=ae([$t],e=>{const{layerState:t,shouldShowStagingImage:n,shouldShowStagingOutline:r,boundingBoxCoordinates:{x:o,y:s},boundingBoxDimensions:{width:i,height:l}}=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:l}},{memoizeOptions:{resultEqualityCheck:kt}}),Dme=e=>{const{...t}=e,{currentStagingAreaImage:n,shouldShowStagingImage:r,shouldShowStagingOutline:o,x:s,y:i,width:l,height:f}=F(Ome);return a.jsxs(sa,{...t,children:[r&&n&&a.jsx(m8,{canvasImage:n}),o&&a.jsxs(sa,{children:[a.jsx(ks,{x:s,y:i,width:l,height:f,strokeWidth:1,stroke:"white",strokeScaleEnabled:!1}),a.jsx(ks,{x:s,y:i,width:l,height:f,dash:[4,4],strokeWidth:1,stroke:"black",strokeScaleEnabled:!1})]})]})},Rme=d.memo(Dme),Ame=ae([$t],e=>{const{la
${s}
\`\`\``),n({title:"Error Copied"})},[e,n]),o=d.useMemo(()=>Fge({user:"invoke-ai",repo:"InvokeAI",template:"BUG_REPORT.yml",title:`[bug]: ${e.name}: ${e.message}`}),[e.message,e.name]);return a.jsx(T,{layerStyle:"body",sx:{w:"100vw",h:"100vh",alignItems:"center",justifyContent:"center",p:4},children:a.jsxs(T,{layerStyle:"first",sx:{flexDir:"column",borderRadius:"base",justifyContent:"center",gap:8,p:16},children:[a.jsx(oo,{children:"Something went wrong"}),a.jsx(T,{layerStyle:"second",sx:{px:8,py:4,borderRadius:"base",gap:4,justifyContent:"space-between",alignItems:"center"},children:a.jsxs(be,{sx:{fontWeight:600,color:"error.500",_dark:{color:"error.400"}},children:[e.name,": ",e.message]})}),a.jsxs(T,{sx:{gap:4},children:[a.jsx(it,{leftIcon:a.jsx(Dpe,{}),onClick:t,children:"Reset UI"}),a.jsx(it,{leftIcon:a.jsx(Hc,{}),onClick:r,children:"Copy Error"}),a.jsx(Im,{href:o,isExternal:!0,children:a.jsx(it,{leftIcon:a.jsx(PE,{}),children:"Create Issue"})})]})]})})},Hge=d.memo(Bge),Wge=ae([xe],({hotkeys:e})=>{const{shift:t,ctrl:n,meta:r}=e;return{shift:t,ctrl:n,meta:r}},{memoizeOptions:{resultEqualityCheck:kt}}),Vge=()=>{const e=te(),{shift:t,ctrl:n,meta:r}=F(Wge);return Qe("*",()=>{Tp("shift")?!t&&e(Ir(!0)):t&&e(Ir(!1)),Tp("ctrl")?!n&&e(vw(!0)):n&&e(vw(!1)),Tp("meta")?!r&&e(xw(!0)):r&&e(xw(!1))},{keyup:!0,keydown:!0},[t,n,r]),Qe("1",()=>{e(Ra("txt2img"))}),Qe("2",()=>{e(Ra("img2img"))}),Qe("3",()=>{e(Ra("unifiedCanvas"))}),Qe("4",()=>{e(Ra("nodes"))}),Qe("5",()=>{e(Ra("modelManager"))}),null},Uge=d.memo(Vge),Gge={},Kge=({config:e=Gge,headerComponent:t,selectedImage:n})=>{const r=F(OP),o=DP("system"),s=te(),{handlePreselectedImage:i}=zge(),l=d.useCallback(()=>(localStorage.clear(),location.reload(),!1),[]);return d.useEffect(()=>{bn.changeLanguage(r)},[r]),d.useEffect(()=>{Xj(e)&&(o.info({config:e},"Received config"),s(sN(e)))},[s,e,o]),d.useEffect(()=>{s(aN())},[s]),d.useEffect(()=>{i(n)},[i,n]),a.jsxs($ge,{onReset:l,FallbackComponent:Hge,children:[a.jsx(Ua,{w:"100vw",h:"100vh",position:"relative",overflow:"hidden",children:a.jsx(OV,{children:a.jsxs(Ua,{sx:{gap:4,p:4,gridAutoRows:"min-content auto",w:"full",h:"full"},children:[t||a.jsx(uJ,{}),a.jsx(T,{sx:{gap:4,w:"full",h:"full"},children:a.jsx(Nge,{})})]})})}),a.jsx(XQ,{}),a.jsx(VQ,{}),a.jsx(yW,{}),a.jsx(Uge,{})]})},n0e=d.memo(Kge);export{n0e as default};