mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
200 lines
974 KiB
JavaScript
200 lines
974 KiB
JavaScript
|
import{t as U1,b as HR,r as VR,i as WR,a as UR,c as GR,d as q3,e as Y3,f as K3,g as qR,h as YR,j as KR,k as XR,l as ZR,m as QR,n as JR,o as eM,s as tM,p as nM,q as h,u as Be,v as i,I as uo,w as Yn,x as Oe,y as Ot,z as _r,A as at,B as _f,C as Co,D as zo,E as to,F as ur,S as Du,G as Si,H as ln,J as Ds,K as Jc,L as Ci,M as pc,N as bg,O as gx,P as kf,_ as Pr,Q as rM,R as B,T as X3,U as nS,V as Z3,W as G1,X as Au,Y as Fd,Z as oM,$ as sM,a0 as Q3,a1 as aM,a2 as wg,a3 as Bh,a4 as iM,a5 as J3,a6 as e5,a7 as lM,a8 as Pf,a9 as vx,aa as cM,ab as uM,ac as dM,ad as fM,ae as pM,af as hM,ag as mM,ah as rS,ai as et,aj as K,ak as Te,al as pr,am as Gr,an as ue,ao as q,ap as jf,aq as t5,ar as fo,as as ma,at as _d,au as Ut,av as gM,aw as yx,ax as _h,ay as kh,az as Fh,aA as Hh,aB as q1,aC as Y1,aD as Vh,aE as Wh,aF as Uh,aG as Gh,aH as vM,aI as qh,aJ as xx,aK as n5,aL as r5,aM as o5,aN as Yh,aO as s5,aP as If,aQ as a5,aR as bx,aS as Sg,aT as Nl,aU as i5,aV as yM,aW as l5,aX as wx,aY as xM,aZ as bM,a_ as wM,a$ as Tc,b0 as Fl,b1 as hc,b2 as c5,b3 as u5,b4 as SM,b5 as CM,b6 as _M,b7 as Cg,b8 as kM,b9 as PM,ba as d5,bb as zn,bc as Sx,bd as oS,be as jM,bf as po,bg as IM,bh as us,bi as sS,bj as EM,bk as aS,bl as OM,bm as Kh,bn as TM,bo as RM,bp as MM,bq as f5,br as _g,bs as jr,bt as K1,bu as DM,bv as AM,bw as NM,bx as zM,by as Cx,bz as $M,bA as LM,bB as iS,bC as lS,bD as cS,bE as uS,bF as BM,bG as FM,bH as p5,bI as h5,bJ as HM,bK as m5,bL as Hd,bM as g5,bN as VM,bO as WM,bP as UM,bQ as co,bR as v5,bS as GM,bT as dS,bU as y5,bV as _x,bW as qM,bX as YM,bY as KM,bZ as qc,b_ as fS,b$ as XM,c0 as x5,c1 as b5,c2 as ZM,c3 as pS,c4 as QM,c5 as JM,c6 as e7,c7 as t7,c8 as n7,c9 as r7,ca as o7,cb as s7,cc as a7,cd as i7,ce as l7,cf as c7,cg as $o,ch as kx,ci as Px,cj as jx,ck as u7,cl as Ix,cm as d7,cn as f7,co as hS,cp as p7,cq as mS,cr as gS,cs as h7,ct as vS,cu as yS,cv as m7,cw as xS,cx as g7,cy as v7,cz as y7,cA as x7,cB as kg,cC as bS,cD as Ef,cE as b7,cF as w7,cG as S7,cH as w5,cI as C7,cJ as _7,cK as k7,cL as P7,cM as S5,cN as wS,cO as j7,cP as Fs,cQ as I7,cR as SS,cS as CS,cT as E7,cU as O7,cV as T7,cW as C5,cX as R7,cY as M7,cZ as D7,c_ as A7,c$ as N7,d0 as z7,d1 as _S,d2 as Ph,d3 as $7,d4 as xn,d5 as Xh,d6 as _5,d7 as Zh,d8 as L7,d9 as B7,da as Ba,db as k5,dc as Ex,dd as Of,de as F7,df as H7,dg as V7,dh as hi,di as P5,dj as W7,dk as U7,dl as j5,dm as G7,dn as q7,dp as Y7,dq as K7,dr as X7,ds as Z7,dt as Q7,du as J7,dv as e9,dw as t9,dx as n9,dy as kS,dz as r9,dA as o9,dB as s9,dC as a9,dD as i9,dE as l9,dF as z0,dG as Vd,dH as PS,dI as $0,dJ as L0,dK as Np,dL as jS,dM as X1,dN as c9,dO as u9,dP as d9,dQ as f9,dR as p9,dS as Qh,dT as I5,dU as E5,dV as h9,dW as m9,dX as O5,dY as T5,dZ as R5,d_ as M5,d$ as D5,e0 as A5,e1 as N5,e2 as z5,e3 as eu,e4 as tu,e5 as $5,e6 as L5,e7 as g9,e8 as B5,e9 as F5,ea as H5,eb as V5,ec as W5,ed as U5,ee as G5,ef as v9,eg as IS,eh as y9,ei as x9,ej as Jh,ek as ES,el as OS,em as TS,en as RS,eo as q5,ep as b9,eq as MS,er as Y5,es as Ox,et as el,eu as K5,ev as DS,ew as w9,ex as S9,ey as C9,ez as _9,eA as k9,eB as B0,eC as P9,eD as j9,eE as I9,eF as E9,eG as O9,eH as T9,eI as R9,eJ as M9,eK as D9,eL as A9,eM as N9,eN as z9,eO as AS,eP as $9,eQ as L9,eR as B9,eS as F9,eT as H9,eU as V9,eV as W9}from"./index-4dfaefdd.js";import{u as Ce,a as X5,b as _i,c as U9,r as qe,f as G9,g as NS,d as Kt,e as qr}from"./MantineProvider-7d837f42.js";function q9(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 zS=1/0,Y9=17976931348623157e292;function F0(e){if(!e)return e===0?e:0;if(e=U1(e),e===zS||e===-zS){var t=e<0?-1:1;return t*Y9}return e===e?e:0}var K9=4;function $S(e){return HR(e,K9)}var X9=function(){return VR.Date.now()};const H0=X9;var Z9="Expected a function",Q9=Math.max,J9=Math.min;function eD(e,t,n){var r,o,s,a,l,u,f=0,p=!1,m=!1,v=!0;if(typeof e!="function")throw new TypeError(Z9);t=U1(t)||0,WR(n)&&(p=!!n.leading,m="maxWait"in n,s=m?Q9(U1(n.maxWait)||0,t):s,v="trailing"in n?!!n.trailing:v);function y(E){var T=r,R=o;return r=o=void 0,f=E,a=e.apply(R,T
|
||
|
`})}function LD(e){_f({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}function Pd(e){const{isOpen:t,isDisabled:n}=Rx(),{reduceMotion:r}=Mx(),o=Ot("chakra-accordion__icon",e.className),s=jg(),a={opacity:n?.4:1,transform:t?"rotate(-180deg)":void 0,transition:r?void 0:"transform 0.2s",transformOrigin:"center",...s.icon};return i.jsx(uo,{viewBox:"0 0 24 24","aria-hidden":!0,className:o,__css:a,...e,children:i.jsx("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})})}Pd.displayName="AccordionIcon";var jd=Be(function(t,n){const{children:r,className:o}=t,{htmlProps:s,...a}=AD(t),u={...jg().container,overflowAnchor:"none"},f=h.useMemo(()=>a,[a]);return i.jsx(ED,{value:f,children:i.jsx(Oe.div,{ref:n,...s,className:Ot("chakra-accordion__item",o),__css:u,children:typeof r=="function"?r({isExpanded:!!a.isOpen,isDisabled:!!a.isDisabled}):r})})});jd.displayName="AccordionItem";var zl={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},dd={scale:{enter:{scale:1},exit:{scale:.95}},fade:{enter:{opacity:1},exit:{opacity:0}},pushLeft:{enter:{x:"100%"},exit:{x:"-30%"}},pushRight:{enter:{x:"-100%"},exit:{x:"30%"}},pushUp:{enter:{y:"100%"},exit:{y:"-30%"}},pushDown:{enter:{y:"-100%"},exit:{y:"30%"}},slideLeft:{position:{left:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"-100%",y:0}},slideRight:{position:{right:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"100%",y:0}},slideUp:{position:{top:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"-100%"}},slideDown:{position:{bottom:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"100%"}}};function ey(e){var t;switch((t=e==null?void 0:e.direction)!=null?t:"right"){case"right":return dd.slideRight;case"left":return dd.slideLeft;case"bottom":return dd.slideDown;case"top":return dd.slideUp;default:return dd.slideRight}}var Hl={enter:{duration:.2,ease:zl.easeOut},exit:{duration:.1,ease:zl.easeIn}},sa={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})},BD=e=>e!=null&&parseInt(e.toString(),10)>0,WS={exit:{height:{duration:.2,ease:zl.ease},opacity:{duration:.3,ease:zl.ease}},enter:{height:{duration:.3,ease:zl.ease},opacity:{duration:.4,ease:zl.ease}}},FD={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:o})=>{var s;return{...e&&{opacity:BD(t)?1:0},height:t,transitionEnd:r==null?void 0:r.exit,transition:(s=n==null?void 0:n.exit)!=null?s:sa.exit(WS.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:sa.enter(WS.enter,o)}}},Ig=h.forwardRef((e,t)=>{const{in:n,unmountOnExit:r,animateOpacity:o=!0,startingHeight:s=0,endingHeight:a="auto",style:l,className:u,transition:f,transitionEnd:p,...m}=e,[v,y]=h.useState(!1);h.useEffect(()=>{const k=setTimeout(()=>{y(!0)});return()=>clearTimeout(k)},[]),_f({condition:Number(s)>0&&!!r,message:"startingHeight and unmountOnExit are mutually exclusive. You can't use them together"});const S=parseFloat(s.toString())>0,x={startingHeight:s,endingHeight:a,animateOpacity:o,transition:v?f:{enter:{duration:0}},transitionEnd:{enter:p==null?void 0:p.enter,exit:r?p==null?void 0:p.exit:{...p==null?void 0:p.exit,display:S?"block":"none"}}},w=r?n:!0,_=n||r?"enter":"exit";return i.jsx(Co,{initial:!1,custom:x,children:w&&i.jsx(zo.div,{ref:t,...m,className:Ot("chakra-collapse",u),style:{overflow:"hidden",display:"block",...l},custom:x,variants:FD,initial:r?"exit":!1,animate:_,exit:"exit"})})});Ig.displayName="Collapse";var HD={enter:({transition:e,transitionEnd:t,delay:n}={})=>{var r;return{opacity:1,transition:(r=e==null?void 0:e.enter)!=null?r:sa.enter(Hl.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:sa.exit(Hl.exit,n),transitionEnd:t==null?void 0:t.exi
|
||
|
.`.concat(_L,` {
|
||
|
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(a,`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(Ih,` {
|
||
|
right: `).concat(l,"px ").concat(r,`;
|
||
|
}
|
||
|
|
||
|
.`).concat(Eh,` {
|
||
|
margin-right: `).concat(l,"px ").concat(r,`;
|
||
|
}
|
||
|
|
||
|
.`).concat(Ih," .").concat(Ih,` {
|
||
|
right: 0 `).concat(r,`;
|
||
|
}
|
||
|
|
||
|
.`).concat(Eh," .").concat(Eh,` {
|
||
|
margin-right: 0 `).concat(r,`;
|
||
|
}
|
||
|
|
||
|
body {
|
||
|
`).concat(kL,": ").concat(l,`px;
|
||
|
}
|
||
|
`)},zL=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r,s=h.useMemo(function(){return DL(o)},[o]);return h.createElement(AL,{styles:NL(s,!t,o,n?"":"!important")})},gy=!1;if(typeof window<"u")try{var Bp=Object.defineProperty({},"passive",{get:function(){return gy=!0,!0}});window.addEventListener("test",Bp,Bp),window.removeEventListener("test",Bp,Bp)}catch{gy=!1}var Nc=gy?{passive:!1}:!1,$L=function(e){return e.tagName==="TEXTAREA"},$6=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!$L(e)&&n[t]==="visible")},LL=function(e){return $6(e,"overflowY")},BL=function(e){return $6(e,"overflowX")},xC=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=L6(e,r);if(o){var s=B6(e,r),a=s[1],l=s[2];if(a>l)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},FL=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},HL=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},L6=function(e,t){return e==="v"?LL(t):BL(t)},B6=function(e,t){return e==="v"?FL(t):HL(t)},VL=function(e,t){return e==="h"&&t==="rtl"?-1:1},WL=function(e,t,n,r,o){var s=VL(e,window.getComputedStyle(t).direction),a=s*r,l=n.target,u=t.contains(l),f=!1,p=a>0,m=0,v=0;do{var y=B6(e,l),S=y[0],x=y[1],w=y[2],_=x-w-s*S;(S||_)&&L6(e,l)&&(m+=_,v+=S),l=l.parentNode}while(!u&&l!==document.body||u&&(t.contains(l)||t===l));return(p&&(o&&m===0||!o&&a>m)||!p&&(o&&v===0||!o&&-a>v))&&(f=!0),f},Fp=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},bC=function(e){return[e.deltaX,e.deltaY]},wC=function(e){return e&&"current"in e?e.current:e},UL=function(e,t){return e[0]===t[0]&&e[1]===t[1]},GL=function(e){return`
|
||
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
||
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
||
|
`)},qL=0,zc=[];function YL(e){var t=h.useRef([]),n=h.useRef([0,0]),r=h.useRef(),o=h.useState(qL++)[0],s=h.useState(z6)[0],a=h.useRef(e);h.useEffect(function(){a.current=e},[e]),h.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var x=ly([e.lockRef.current],(e.shards||[]).map(wC),!0).filter(Boolean);return x.forEach(function(w){return w.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),x.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var l=h.useCallback(function(x,w){if("touches"in x&&x.touches.length===2)return!a.current.allowPinchZoom;var _=Fp(x),k=n.current,P="deltaX"in x?x.deltaX:k[0]-_[0],I="deltaY"in x?x.deltaY:k[1]-_[1],j,E=x.target,T=Math.abs(P)>Math.abs(I)?"h":"v";if("touches"in x&&T==="h"&&E.type==="range")return!1;var R=xC(T,E);if(!R)return!0;if(R?j=T:(j=T==="v"?"h":"v",R=xC(T,E)),!R)return!1;if(!r.current&&"changedTouches"in x&&(P||I)&&(r.current=j),!j)return!0;var M=r.current||j;return WL(M,w,x,M==="h"?P:I,!0)},[]),u=h.useCallback(function(x){var w=x;if(!(!zc.length||zc[zc.length-1]!==s)){var _="deltaY"in w?bC(w):Fp(w),k=t.current.filter(function(j){return j.name===w.type&&j.target===w.target&&UL(j.delta,_)})[0];if(k&&k.should){w.cancelable&&w.preventDefault();return}if(!k){var P=(a.current.shards||[]).map(wC).filter(Boolean).filter(function(j){return j.contains(w.target)}),I=P.length>0?l(w,P[0]):!a.current.noIsolation;I&&w.cancelable&&w.preventDefault()}}},[]),f=h.useCallback(function(x,w,_,k){var P={name:x,delta:w,target:_,should:k};t.current.push(P),setTimeout(function(){t.current=t.current.filter(function(I){return I!==P})},1)},[]),p=h.useCallback(function(x){n.current=Fp(x),r.current=void 0},[]),m=h.useCallback(function(x){f(x.type,bC(x),x.target,l(x,e.lockRef.current))},[]),v=h.useCallback(function(x){f(x.type,Fp(x),x.target,l(x,e.lockRef.current))},[]);h.useEffect(function(){return zc.push(s),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:v}),document.addEventListener("wheel",u,Nc),document.addEventListener("touchmove",u,Nc),document.addEventListener("touchstart",p,Nc),function(){zc=zc.filter(function(x){return x!==s}),document.removeEventListener("wheel",u,Nc),document.removeEventListener("touchmove",u,Nc),document.removeEventListener("touchstart",p,Nc)}},[]);var y=e.removeScrollBar,S=e.inert;return h.createElement(h.Fragment,null,S?h.createElement(s,{styles:GL(o)}):null,y?h.createElement(zL,{gapMode:e.gapMode}):null)}const KL=qA(N6,YL);var F6=h.forwardRef(function(e,t){return h.createElement(Ag,za({},e,{ref:t,sideCar:KL}))});F6.classNames=Ag.classNames;const XL=F6;function ZL(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:o,blockScrollOnMount:s,allowPinchZoom:a,finalFocusRef:l,returnFocusOnClose:u,preserveScrollBarGap:f,lockFocusAcrossFrames:p,isOpen:m}=ec(),[v,y]=oM();h.useEffect(()=>{!v&&y&&setTimeout(y)},[v,y]);const S=D6(r,m);return i.jsx(c6,{autoFocus:t,isDisabled:!n,initialFocusRef:o,finalFocusRef:l,restoreFocus:u,contentRef:r,lockFocusAcrossFrames:p,children:i.jsx(XL,{removeScrollBar:!f,allowPinchZoom:a,enabled:S===1&&s,forwardProps:!0,children:e.children})})}var nl=Be((e,t)=>{const{className:n,children:r,containerProps:o,motionProps:s,...a}=e,{getDialogProps:l,getDialogContainerProps:u}=ec(),f=l(a,t),p=u(o),m=Ot("chakra-modal__content",n),v=Hu(),y={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...v.dialog},S={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...v.dialogContainer},{motionPreset:x}=ec();return i.jsx(ZL,{children:i.jsx(Oe.div,{...p,className:"chakra-modal__content-container",tabIndex:-1,__css:S,children:i.jsx(M6,{preset:x,motionProps:s,className:m,...f,__css:y,children:r})})})});nl.displayName="ModalContent";function Ng(e){const{leastDestructiveRef:t,...n}=e;return i.jsx(tl,{...n,initialFocusRef:t})}var zg=Be((e,t)=>i.jsx(nl,{ref:t,role:"alertdialog",...e})),ga=Be((e,t)=>{const{className:
|
||
|
M${E.x},${E.y}h${E.width}v${E.height}h${-E.width}z`,fill:u,fillRule:"evenodd",stroke:f,strokeWidth:p,pointerEvents:"none"})]})})}Sj.displayName="MiniMap";var LF=h.memo(Sj),ia;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(ia||(ia={}));function BF({color:e,dimensions:t,lineWidth:n}){return i.jsx("path",{stroke:e,strokeWidth:n,d:`M${t[0]/2} 0 V${t[1]} M0 ${t[1]/2} H${t[0]}`})}function FF({color:e,radius:t}){return i.jsx("circle",{cx:t,cy:t,r:t,fill:e})}const HF={[ia.Dots]:"#91919a",[ia.Lines]:"#eee",[ia.Cross]:"#e2e2e2"},VF={[ia.Dots]:1,[ia.Lines]:1,[ia.Cross]:6},WF=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function Cj({id:e,variant:t=ia.Dots,gap:n=20,size:r,lineWidth:o=1,offset:s=2,color:a,style:l,className:u}){const f=h.useRef(null),{transform:p,patternId:m}=Bh(WF,vx),v=a||HF[t],y=r||VF[t],S=t===ia.Dots,x=t===ia.Cross,w=Array.isArray(n)?n:[n,n],_=[w[0]*p[2]||1,w[1]*p[2]||1],k=y*p[2],P=x?[k,k]:_,I=S?[k/s,k/s]:[P[0]/s,P[1]/s];return i.jsxs("svg",{className:wg(["react-flow__background",u]),style:{...l,position:"absolute",width:"100%",height:"100%",top:0,left:0},ref:f,"data-testid":"rf__background",children:[i.jsx("pattern",{id:m+e,x:p[0]%_[0],y:p[1]%_[1],width:_[0],height:_[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${I[0]},-${I[1]})`,children:S?i.jsx(FF,{color:v,radius:k/s}):i.jsx(BF,{dimensions:P,color:v,lineWidth:o})}),i.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${m+e})`})]})}Cj.displayName="Background";var UF=h.memo(Cj),Ad;(function(e){e.Line="line",e.Handle="handle"})(Ad||(Ad={}));function GF({width:e,prevWidth:t,height:n,prevHeight:r,invertX:o,invertY:s}){const a=e-t,l=n-r,u=[a>0?1:a<0?-1:0,l>0?1:l<0?-1:0];return a&&o&&(u[0]=u[0]*-1),l&&s&&(u[1]=u[1]*-1),u}const _j={width:0,height:0,x:0,y:0},qF={..._j,pointerX:0,pointerY:0,aspectRatio:1};function YF({nodeId:e,position:t,variant:n=Ad.Handle,className:r,style:o={},children:s,color:a,minWidth:l=10,minHeight:u=10,maxWidth:f=Number.MAX_VALUE,maxHeight:p=Number.MAX_VALUE,keepAspectRatio:m=!1,shouldResize:v,onResizeStart:y,onResize:S,onResizeEnd:x}){const w=pM(),_=typeof e=="string"?e:w,k=J3(),P=h.useRef(null),I=h.useRef(qF),j=h.useRef(_j),E=hM(),T=n===Ad.Line?"right":"bottom-right",R=t??T;h.useEffect(()=>{if(!P.current||!_)return;const U=e5(P.current),z=R.includes("right")||R.includes("left"),F=R.includes("bottom")||R.includes("top"),H=R.includes("left"),G=R.includes("top"),A=mM().on("start",L=>{const W=k.getState().nodeInternals.get(_),{xSnapped:V,ySnapped:ee}=E(L);j.current={width:(W==null?void 0:W.width)??0,height:(W==null?void 0:W.height)??0,x:(W==null?void 0:W.position.x)??0,y:(W==null?void 0:W.position.y)??0},I.current={...j.current,pointerX:V,pointerY:ee,aspectRatio:j.current.width/j.current.height},y==null||y(L,{...j.current})}).on("drag",L=>{const{nodeInternals:W,triggerNodeChanges:V}=k.getState(),{xSnapped:ee,ySnapped:le}=E(L),oe=W.get(_);if(oe){const X=[],{pointerX:Q,pointerY:ie,width:ve,height:ye,x:se,y:de,aspectRatio:fe}=I.current,{x:xe,y:ke,width:ae,height:Pe}=j.current,tt=Math.floor(z?ee-Q:0),ze=Math.floor(F?le-ie:0);let We=rS(ve+(H?-tt:tt),l,f),It=rS(ye+(G?-ze:ze),u,p);if(m){const he=We/It,Re=z&&F,Ke=z&&!F,ge=F&&!z;We=he<=fe&&Re||ge?It*fe:We,It=he>fe&&Re||Ke?We/fe:It,We>=f?(We=f,It=f/fe):We<=l&&(We=l,It=l/fe),It>=p?(It=p,We=p*fe):It<=u&&(It=u,We=u*fe)}const pt=We!==ae,bn=It!==Pe;if(H||G){const he=H?se-(We-ve):se,Re=G?de-(It-ye):de,Ke=he!==xe&&pt,ge=Re!==ke&&bn;if(Ke||ge){const ut={id:oe.id,type:"position",position:{x:Ke?he:xe,y:ge?Re:ke}};X.push(ut),j.current.x=ut.position.x,j.current.y=ut.position.y}}if(pt||bn){const he={id:_,type:"dimensions",updateStyle:!0,resizing:!0,dimensions:{width:We,height:It}};X.push(he),j.current.width=We,j.current.height=It}if(X.length===0)return;const Y=GF({width:j.current.width,prevWidth:ae,height:j.current.height,prevHeight:Pe,invertX:H,invertY:G}),Se={...j.current,direction:Y};if((v==null?void 0:v(L,Se))===!1)return;S==null||S(L,Se),V(X)}}).on("end",L=>{const W={id:_,type:"dimensions",resizing:!1};x==null||x(L,{...j.current}),k.getState().triggerNo
|
||
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uH(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function dH(e){if(Array.isArray(e))return by(e)}function TC(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 RC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?TC(Object(n),!0).forEach(function(r){jj(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function jj(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zd(e,t){return hH(e)||pH(e,t)||Ij(e,t)||fH()}function fH(){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 Ij(e,t){if(e){if(typeof e=="string")return by(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 by(e,t)}}function by(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 pH(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,s=!1,a,l;try{for(n=n.call(e);!(o=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));o=!0);}catch(u){s=!0,l=u}finally{try{!o&&n.return!=null&&n.return()}finally{if(s)throw l}}return r}}function hH(e){if(Array.isArray(e))return e}var mH="file-invalid-type",gH="file-too-large",vH="file-too-small",yH="too-many-files",xH=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:mH,message:"File type must be ".concat(n)}},MC=function(t){return{code:gH,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},DC=function(t){return{code:vH,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},bH={code:yH,message:"Too many files"};function Ej(e,t){var n=e.type==="application/x-moz-file"||lH(e,t);return[n,n?null:xH(t)]}function Oj(e,t,n){if(Ml(e.size))if(Ml(t)&&Ml(n)){if(e.size>n)return[!1,MC(n)];if(e.size<t)return[!1,DC(t)]}else{if(Ml(t)&&e.size<t)return[!1,DC(t)];if(Ml(n)&&e.size>n)return[!1,MC(n)]}return[!0,null]}function Ml(e){return e!=null}function wH(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,s=e.multiple,a=e.maxFiles,l=e.validator;return!s&&t.length>1||s&&a>=1&&t.length>a?!1:t.every(function(u){var f=Ej(u,n),p=Zd(f,1),m=p[0],v=Oj(u,r,o),y=Zd(v,1),S=y[0],x=l?l(u):null;return m&&S&&!x})}function lm(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Vp(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 AC(e){e.preventDefault()}function SH(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function CH(e){return e.indexOf("Edge/")!==-1}function _H(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return SH(e)||CH(e)}function Da(){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),a=1;a<o;a++)s[a-1]=arguments[a];return t.some(function(l){return!lm(r)&&l&&l.apply(void 0,[r].concat(s)),lm(r)})}}function kH(){return"showOpenFilePicker"in window}function PH(e){if(Ml(e)){var t=Object.entries(e).filter(function(n){var r=Zd(n,2),o=r[0],s=r[1],a=!0;return Tj(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.')),a=!1),(!Array.isArray(s)||!s.every(Rj))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),a=!1),a}).reduce(function(n,r){var o=Zd(r,2),s=o[0],a=o[1];return RC(RC({},n),{},jj({},s,a))},{});return[{description:"Files",accept:t}]}return e}function jH(e){if(Ml(e))return Object.entries(e).reduce(function(t,n){var r=Zd(n,2),o=r[0],s=r[1];return[].concat(OC(t),[o],OC(s))},[]).filter(function(t){return Tj(t)||Rj(t)}).join(",")}function IH(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function EH(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function Tj(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function Rj(e){return/^.*\.[\w]+$/.test(e)}var OH=["children"],TH=["open"],RH=["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 NH(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function zH(e){if(Array.isArray(e))return wy(e)}function a1(e,t){return BH(e)||LH(e,t)||Mj(e,t)||$H()}function $H(){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 Mj(e,t){if(e){if(typeof e=="string")return wy(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 wy(e,t)}}function wy(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 LH(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,s=!1,a,l;try{for(n=n.call(e);!(o=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));o=!0);}catch(u){s=!0,l=u}finally{try{!o&&n.return!=null&&n.return()}finally{if(s)throw l}}return r}}function BH(e){if(Array.isArray(e))return e}function NC(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 Rr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?NC(Object(n),!0).forEach(function(r){Sy(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):NC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Sy(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cm(e,t){if(e==null)return{};var n=FH(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 FH(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 db=h.forwardRef(function(e,t){var n=e.children,r=cm(e,OH),o=fb(r),s=o.open,a=cm(o,TH);return h.useImperativeHandle(t,function(){return{open:s}},[s]),B.createElement(h.Fragment,null,n(Rr(Rr({},a),{},{open:s})))});db.displayName="Dropzone";var Dj={disabled:!1,getFilesFromEvent:JF,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};db.defaultProps=Dj;db.propTypes={children:sr.func,accept:sr.objectOf(sr.arrayOf(sr.string)),multiple:sr.bool,preventDropOnDocument:sr.bool,noClick:sr.bool,noKeyboard:sr.bool,noDrag:sr.bool,noDragEventsBubbling:sr.bool,minSize:sr.number,maxSize:sr.number,maxFiles:sr.number,disabled:sr.bool,getFilesFromEvent:sr.func,onFileDialogCancel:sr.func,onFileDialogOpen:sr.func,useFsAccessApi:sr.bool,autoFocus:sr.bool,onDragEnter:sr.func,onDragLeave:sr.func,onDragOver:sr.func,onDrop:sr.func,onDropAccepted:sr.func,onDropRejected:sr.func,onError:sr.func,validator:sr.func};var Cy={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=Rr(Rr({},Dj),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,s=t.maxSize,a=t.minSize,l=t.multiple,u=t.maxFiles,f=t.onDragEnter,p=t.onDragLeave,m=t.onDragOver,v=t.onDrop,y=t.onDropAccepted,S=t.onDropRejected,x=t.onFileDialogCancel,w=t.onFileDialogOpen,_=t.useFsAccessApi,k=t.autoFocus,P=t.preventDropOnDocument,I=t.noClick,j=t.noKeyboard,E=t.noDrag,T=t.noDragEventsBubbling,R=t.onError,M=t.validator,D=h.useMemo(function(){return jH(n)},[n]),N=h.useMemo(function(){return PH(n)},[n]),U=h.useMemo(function(){return typeof w=="function"?w:zC},[w]),z=h.useMemo(function(){return typeof x=="function"?x:zC},[x]),F=h.useRef(null),H=h.useRef(null),G=h.useReducer(HH,Cy),A=a1(G,2),L=A[0],W=A[1],V=L.isFocused,ee=L.isFileDialogActive,le=h.useRef(typeof window<"u"&&window.isSecureContext&&_&&kH()),oe=function(){!le.current&&ee&&setTimeout(function(){if(H.current){var he=H.current.files;he.length||(W({type:"closeDialog"}),z())}},300)};h.useEffect(functi
|
||
|
`),status:"error"})},[a,s]),m=h.useCallback(async I=>{n(t5({file:I,image_category:"user",is_intermediate:!1,postUploadAction:{type:"TOAST_UPLOADED"}}))},[n]),v=h.useCallback((I,j)=>{if(j.length>1){s({title:a("toast.uploadFailed"),description:a("toast.uploadFailedInvalidUploadDesc"),status:"error"});return}j.forEach(E=>{p(E)}),I.forEach(E=>{m(E)})},[a,s,m,p]),{getRootProps:y,getInputProps:S,isDragAccept:x,isDragReject:w,isDragActive:_,inputRef:k,open:P}=fb({accept:{"image/png":[".png"],"image/jpeg":[".jpg",".jpeg",".png"]},noClick:!0,onDrop:v,onDragOver:()=>u(!0),disabled:r,multiple:!1});return h.useEffect(()=>{const I=async j=>{var E,T;k.current&&(E=j.clipboardData)!=null&&E.files&&(k.current.files=j.clipboardData.files,(T=k.current)==null||T.dispatchEvent(new Event("change",{bubbles:!0})))};return f(P),document.addEventListener("paste",I),()=>{document.removeEventListener("paste",I),f(()=>{})}},[k,P,f]),i.jsxs(et,{...y({style:{}}),onKeyDown:I=>{I.key},children:[i.jsx("input",{...S()}),t,_&&l&&i.jsx(nV,{isDragAccept:x,isDragReject:w,setIsHandlingUpload:u})]})},sV=h.memo(oV),pl=e=>e.gallery;const aV=Be((e,t)=>{const{children:n,tooltip:r="",tooltipProps:o,isChecked:s,...a}=e;return i.jsx(er,{label:r,...o,children:i.jsx($u,{ref:t,"aria-checked":s,...a,children:n})})}),fn=h.memo(aV),Ae=(e,t)=>n=>n==="light"?e:t,iV=e=>{const{label:t,...n}=e,{colorMode:r}=fo();return i.jsx(fP,{colorScheme:"accent",...n,children:i.jsx(lt,{sx:{fontSize:"sm",color:Ae("base.800","base.200")(r)},children:t})})},qn=h.memo(iV),Fj=Be((e,t)=>{const{role:n,tooltip:r="",tooltipProps:o,isChecked:s,...a}=e;return i.jsx(er,{label:r,hasArrow:!0,...o,...o!=null&&o.placement?{placement:o.placement}:{placement:"top"},children:i.jsx(mi,{ref:t,role:n,"aria-checked":s!==void 0?s:void 0,...a})})});Fj.displayName="IAIIconButton";const Me=h.memo(Fj),lV=e=>{const{triggerComponent:t,children:n,hasArrow:r=!0,isLazy:o=!0,...s}=e;return i.jsxs(U6,{isLazy:o,...s,children:[i.jsx(W6,{children:t}),i.jsxs(Y6,{shadow:"dark-lg",children:[r&&i.jsx(G6,{}),n]})]})},ii=h.memo(lV);var Hj={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},LC=B.createContext&&B.createContext(Hj),Xi=globalThis&&globalThis.__assign||function(){return Xi=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},Xi.apply(this,arguments)},cV=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};function Vj(e){return e&&e.map(function(t,n){return B.createElement(t.tag,Xi({key:n},t.attr),Vj(t.child))})}function ct(e){return function(t){return B.createElement(uV,Xi({attr:Xi({},e.attr)},t),Vj(e.child))}}function uV(e){var t=function(n){var r=e.attr,o=e.size,s=e.title,a=cV(e,["attr","size","title"]),l=o||n.size||"1em",u;return n.className&&(u=n.className),e.className&&(u=(u?u+" ":"")+e.className),B.createElement("svg",Xi({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,a,{className:u,style:Xi(Xi({color:e.color||n.color},n.style),e.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),s&&B.createElement("title",null,s),e.children)};return LC!==void 0?B.createElement(LC.Consumer,null,function(n){return t(n)}):t(Hj)}function dV(e){return ct({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M19.002 3h-14c-1.103 0-2 .897-2 2v4h2V5h14v14h-14v-4h-2v4c0 1.103.897 2 2 2h14c1.103 0 2-.897 2-2V5c0-1.103-.898-2-2-2z"}},{tag:"path",attr:{d:"m11 16 5-4-5-4v3.001H3v2h8z"}}]})(e)}function Wj(e){return ct({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M12 16c1.671 0 3-1.331 3-3s-1.329-3-3-3-3 1.331-3 3 1.329 3 3 3z"}},{tag:"path",attr:{d:"M20.817 11.186a8.94 8.94 0 0 0-1.355-3.219 9.053 9.053 0 0 0-2.43-2.43 8.95 8.95 0 0 0-3.219-1.355 9.028 9.0
|
||
|
* OverlayScrollbars
|
||
|
* Version: 2.2.0
|
||
|
*
|
||
|
* Copyright (c) Rene Haas | KingSora.
|
||
|
* https://github.com/KingSora
|
||
|
*
|
||
|
* Released under the MIT license.
|
||
|
*/function Hn(e,t){if(ev(e))for(let n=0;n<e.length&&t(e[n],n,e)!==!1;n++);else e&&Hn(Object.keys(e),n=>t(e[n],n,e));return e}function wo(e,t){const n=hl(t);if(wa(t)||n){let o=n?"":{};if(e){const s=window.getComputedStyle(e,null);o=n?VC(e,s,t):t.reduce((a,l)=>(a[l]=VC(e,s,l),a),o)}return o}e&&Hn(fs(t),o=>RV(e,o,t[o]))}const na=(e,t)=>{const{o:n,u:r,_:o}=e;let s=n,a;const l=(p,m)=>{const v=s,y=p,S=m||(r?!r(v,y):v!==y);return(S||o)&&(s=y,a=v),[s,S,a]};return[t?p=>l(t(s,a),p):l,p=>[s,!!p,a]]},Ff=()=>typeof window<"u",Uj=Ff()&&Node.ELEMENT_NODE,{toString:vV,hasOwnProperty:c1}=Object.prototype,ki=e=>e===void 0,Jg=e=>e===null,yV=e=>ki(e)||Jg(e)?`${e}`:vV.call(e).replace(/^\[object (.+)\]$/,"$1").toLowerCase(),Zi=e=>typeof e=="number",hl=e=>typeof e=="string",pb=e=>typeof e=="boolean",ba=e=>typeof e=="function",wa=e=>Array.isArray(e),Qd=e=>typeof e=="object"&&!wa(e)&&!Jg(e),ev=e=>{const t=!!e&&e.length,n=Zi(t)&&t>-1&&t%1==0;return wa(e)||!ba(e)&&n?t>0&&Qd(e)?t-1 in e:!0:!1},ky=e=>{if(!e||!Qd(e)||yV(e)!=="object")return!1;let t;const n="constructor",r=e[n],o=r&&r.prototype,s=c1.call(e,n),a=o&&c1.call(o,"isPrototypeOf");if(r&&!s&&!a)return!1;for(t in e);return ki(t)||c1.call(e,t)},um=e=>{const t=HTMLElement;return e?t?e instanceof t:e.nodeType===Uj:!1},tv=e=>{const t=Element;return e?t?e instanceof t:e.nodeType===Uj:!1},hb=(e,t,n)=>e.indexOf(t,n),Jn=(e,t,n)=>(!n&&!hl(t)&&ev(t)?Array.prototype.push.apply(e,t):e.push(t),e),tc=e=>{const t=Array.from,n=[];return t&&e?t(e):(e instanceof Set?e.forEach(r=>{Jn(n,r)}):Hn(e,r=>{Jn(n,r)}),n)},mb=e=>!!e&&e.length===0,Ka=(e,t,n)=>{Hn(e,o=>o&&o.apply(void 0,t||[])),!n&&(e.length=0)},nv=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),fs=e=>e?Object.keys(e):[],Dr=(e,t,n,r,o,s,a)=>{const l=[t,n,r,o,s,a];return(typeof e!="object"||Jg(e))&&!ba(e)&&(e={}),Hn(l,u=>{Hn(fs(u),f=>{const p=u[f];if(e===p)return!0;const m=wa(p);if(p&&(ky(p)||m)){const v=e[f];let y=v;m&&!wa(v)?y=[]:!m&&!ky(v)&&(y={}),e[f]=Dr(y,p)}else e[f]=p})}),e},gb=e=>{for(const t in e)return!1;return!0},Gj=(e,t,n,r)=>{if(ki(r))return n?n[e]:t;n&&(hl(r)||Zi(r))&&(n[e]=r)},bo=(e,t,n)=>{if(ki(n))return e?e.getAttribute(t):null;e&&e.setAttribute(t,n)},Wo=(e,t)=>{e&&e.removeAttribute(t)},Gl=(e,t,n,r)=>{if(n){const o=bo(e,t)||"",s=new Set(o.split(" "));s[r?"add":"delete"](n);const a=tc(s).join(" ").trim();bo(e,t,a)}},xV=(e,t,n)=>{const r=bo(e,t)||"";return new Set(r.split(" ")).has(n)},la=(e,t)=>Gj("scrollLeft",0,e,t),li=(e,t)=>Gj("scrollTop",0,e,t),Py=Ff()&&Element.prototype,qj=(e,t)=>{const n=[],r=t?tv(t)?t:null:document;return r?Jn(n,r.querySelectorAll(e)):n},bV=(e,t)=>{const n=t?tv(t)?t:null:document;return n?n.querySelector(e):null},dm=(e,t)=>tv(e)?(Py.matches||Py.msMatchesSelector).call(e,t):!1,vb=e=>e?tc(e.childNodes):[],yi=e=>e?e.parentElement:null,Kc=(e,t)=>{if(tv(e)){const n=Py.closest;if(n)return n.call(e,t);do{if(dm(e,t))return e;e=yi(e)}while(e)}return null},wV=(e,t,n)=>{const r=e&&Kc(e,t),o=e&&bV(n,r),s=Kc(o,t)===r;return r&&o?r===e||o===e||s&&Kc(Kc(e,n),t)!==r:!1},yb=(e,t,n)=>{if(n&&e){let r=t,o;ev(n)?(o=document.createDocumentFragment(),Hn(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)}},Os=(e,t)=>{yb(e,null,t)},SV=(e,t)=>{yb(yi(e),e,t)},BC=(e,t)=>{yb(yi(e),e&&e.nextSibling,t)},Va=e=>{if(ev(e))Hn(tc(e),t=>Va(t));else if(e){const t=yi(e);t&&t.removeChild(e)}},ql=e=>{const t=document.createElement("div");return e&&bo(t,"class",e),t},Yj=e=>{const t=ql();return t.innerHTML=e.trim(),Hn(vb(t),n=>Va(n))},jy=e=>e.charAt(0).toUpperCase()+e.slice(1),CV=()=>ql().style,_V=["-webkit-","-moz-","-o-","-ms-"],kV=["WebKit","Moz","O","MS","webkit","moz","o","ms"],u1={},d1={},PV=e=>{let t=d1[e];if(nv(d1,e))return t;const n=jy(e),r=CV();return Hn(_V,o=>{const s=o.replace(/-/g,"");return!(t=[e,o+e,s+n,jy(s)+n].find(l=>r[l]!==void 0))}),d1[e]=t||""},Hf=e=>{if(Ff()){let t=u1[e]||window[e];return nv(u1,e)||(Hn(kV,n=>(t=t||window[n+jy(e)],!t)),u1[e]=t),t}},jV=Hf("MutationObserver"),FC=Hf("IntersectionObserver"),Xc=Hf("ResizeObserver"),Kj=Hf("cancelAnimationFrame"),X
|
||
|
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:Qe,mutationThunk:Mt,api:Z,serializeQueryArgs:ot,context:me}),Kr=Gn.buildInitiateQuery,xr=Gn.buildInitiateMutation;return Yr(Z.util,{getRunningOperationPromises:Gn.getRunningOperationPromises,getRunningOperationPromise:Gn.removalWarning,getRunningMutationThunk:Gn.getRunningMutationThunk,getRunningMutationsThunk:Gn.getRunningMutationsThunk,getRunningQueryThunk:Gn.getRunningQueryThunk,getRunningQueriesThunk:Gn.getRunningQueriesThunk}),{name:Ja,injectEndpoint:function(Dt,Vn){var Xn,br=Z;(Xn=br.endpoints)[Dt]!=null||(Xn[Dt]={}),se(Vn)?Yr(br.endpoints[Dt],{name:Dt,select:on(Dt,Vn),initiate:Kr(Dt,Vn)},Jt(Qe,Dt)):Vn.type===ie.mutation&&Yr(br.endpoints[Dt],{name:Dt,select:hn(),initiate:xr(Dt)},Jt(Mt,Dt))}}}}},Gs=ht(Ii())})(CE);SE.exports=CE;var cc=SE.exports;const dY=e=>{const{isOver:t,label:n="Drop"}=e,r=h.useRef(Fl()),{colorMode:o}=fo();return i.jsx(zo.div,{initial:{opacity:0},animate:{opacity:1,transition:{duration:.1}},exit:{opacity:0,transition:{duration:.1}},children:i.jsxs(K,{sx:{position:"absolute",top:0,insetInlineStart:0,w:"full",h:"full"},children:[i.jsx(K,{sx:{position:"absolute",top:0,insetInlineStart:0,w:"full",h:"full",bg:Ae("base.700","base.900")(o),opacity:.7,borderRadius:"base",alignItems:"center",justifyContent:"center",transitionProperty:"common",transitionDuration:"0.1s"}}),i.jsx(K,{sx:{position:"absolute",top:0,insetInlineStart:0,w:"full",h:"full",opacity:1,borderWidth:2,borderColor:t?Ae("base.50","base.200")(o):Ae("base.100","base.500")(o),borderRadius:"base",borderStyle:"dashed",transitionProperty:"common",transitionDuration:"0.1s",alignItems:"center",justifyContent:"center"},children:i.jsx(lt,{sx:{fontSize:"2xl",fontWeight:600,transform:t?"scale(1.1)":"scale(1)",color:t?Ae("base.100","base.100")(o):Ae("base.200","base.500")(o),transitionProperty:"common",transitionDuration:"0.1s"},children:n})})]})},r.current)},Su=h.memo(dY),_E=()=>{const[e,t]=hc("colors",["accent.400","accent.500"]),{colorMode:n}=fo();return i.jsx(zo.div,{initial:{opacity:0},animate:{opacity:1,transition:{duration:.1}},exit:{opacity:0,transition:{duration:.1}},style:{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",boxShadow:`inset 0px 0px 0px 2px ${Ae(e,t)(n)}`,borderRadius:"var(--invokeai-radii-base)"}})},kE=h.memo(({board:e,isSelected:t})=>{const n=ue(),{currentData:r}=lc(e.cover_image_name??cc.skipToken),{colorMode:o}=fo(),{board_name:s,board_id:a}=e,{onClickDeleteBoardImages:l}=h.useContext(c5),u=h.useCallback(()=>{n(u5(a))},[a,n]),[f,{isLoading:p}]=SM(),[m,{isLoading:v}]=CM(),[y,{isLoading:S}]=_M(),x=E=>{f({board_id:a,changes:{board_name:E}})},w=h.useCallback(()=>{m(a)},[a,m]),_=h.useCallback(()=>{console.log({board:e}),l(e)},[e,l]),k=h.useCallback(E=>{E.board_id!==a&&y({board_id:a,image_name:E.image_name})},[y,a]),{isOver:P,setNodeRef:I,active:j}=Cg({id:`board_droppable_${a}`,data:{handleDrop:k}});return i.jsx(et,{sx:{touchAction:"none"},children:i.jsx(DI,{menuProps:{size:"sm",isLazy:!0},renderMenu:()=>i.jsxs(Lf,{sx:{visibility:"visible !important"},children:[e.image_count>0&&i.jsx(os,{sx:{color:"error.300"},icon:i.jsx(Ls,{}),onClickCapture:_,children:"Delete Board and Images"}),i.jsx(os,{sx:{color:Ae("error.700","error.300")(o)},icon:i.jsx(Ls,{}),onClickCapture:w,children:"Delete Board"})]}),children:E=>i.jsxs(K,{userSelect:"none",ref:E,sx:{flexDir:"column",justifyContent:"space-between",alignItems:"center",cursor:"pointer",w:"full",h:"full"},children:[i.jsxs(K,{ref:I,onClick:u,sx:{position:"relative",justifyContent:"center",alignItems:"center",borderRadius:"base",w:"full",aspectRatio:"1/1",overflow:"hidden"},children:[e.cover_image_name&&(r==null?void 0:r.image_url)&&i.jsx(If,{src:r==null?void 0:r.image_url,draggable:!1}),!(e.cover_image_name&&(r!=null&&r.image_url))&&i.jsx(wE,{iconProps:{boxSize:8},as:My}),i.jsx(K,{sx:{position:"absolute",insetInlineEnd:0,top:0,p:1},children:i.jsx(mu,{variant:"solid",children:e.image_count})}),i.jsx(Co,{children:t&&i.jsx(_E,{})}),i.jsx(Co,{children:j&&i
|
||
|
position: relative;
|
||
|
width: -moz-fit-content;
|
||
|
width: fit-content;
|
||
|
height: -moz-fit-content;
|
||
|
height: fit-content;
|
||
|
overflow: hidden;
|
||
|
-webkit-touch-callout: none; /* iOS Safari */
|
||
|
-webkit-user-select: none; /* Safari */
|
||
|
-khtml-user-select: none; /* Konqueror HTML */
|
||
|
-moz-user-select: none; /* Firefox */
|
||
|
-ms-user-select: none; /* Internet Explorer/Edge */
|
||
|
user-select: none;
|
||
|
margin: 0;
|
||
|
padding: 0;
|
||
|
}
|
||
|
.transform-component-module_content__FBWxo {
|
||
|
display: flex;
|
||
|
flex-wrap: wrap;
|
||
|
width: -moz-fit-content;
|
||
|
width: fit-content;
|
||
|
height: -moz-fit-content;
|
||
|
height: fit-content;
|
||
|
margin: 0;
|
||
|
padding: 0;
|
||
|
transform-origin: 0% 0%;
|
||
|
}
|
||
|
.transform-component-module_content__FBWxo img {
|
||
|
pointer-events: none;
|
||
|
}
|
||
|
`,Xk={wrapper:"transform-component-module_wrapper__SPB86",content:"transform-component-module_content__FBWxo"};_re(kre);var Pre=function(e){var t=e.children,n=e.wrapperClass,r=n===void 0?"":n,o=e.contentClass,s=o===void 0?"":o,a=e.wrapperStyle,l=e.contentStyle,u=e.wrapperProps,f=u===void 0?{}:u,p=e.contentProps,m=p===void 0?{}:p,v=h.useContext(Iv).init,y=h.useRef(null),S=h.useRef(null);return h.useEffect(function(){var x=y.current,w=S.current;x!==null&&w!==null&&v&&v(x,w)},[]),B.createElement("div",Ji({},f,{ref:y,className:"react-transform-wrapper ".concat(Xk.wrapper," ").concat(r),style:a}),B.createElement("div",Ji({},m,{ref:S,className:"react-transform-component ".concat(Xk.content," ").concat(s),style:l}),t))},a8=function(){var e=h.useContext(Iv);if(!e)throw new Error("Transform context must be placed inside TransformWrapper");return e};const Zk=1.5,i8="28rem",jre=()=>{const[e,t]=h.useState(0),[n,r]=h.useState(1),[o,s]=h.useState(1);return{rotation:e,scaleX:n,scaleY:o,flipHorizontally:()=>{r(n*-1)},flipVertically:()=>{s(o*-1)},rotateCounterClockwise:()=>{t(e===-270?0:e-90)},rotateClockwise:()=>{t(e===270?0:e+90)},reset:()=>{t(0),r(1),s(1)}}},Ire=({flipHorizontally:e,flipVertically:t,rotateCounterClockwise:n,rotateClockwise:r,reset:o})=>{const{zoomIn:s,zoomOut:a,resetTransform:l}=a8(),{t:u}=Ce();return i.jsxs(Fr,{isAttached:!0,orientation:"vertical",children:[i.jsx(Me,{icon:i.jsx(hV,{}),"aria-label":u("accessibility.zoomIn"),tooltip:u("accessibility.zoomIn"),onClick:()=>s(),fontSize:20}),i.jsx(Me,{icon:i.jsx(mV,{}),"aria-label":u("accessibility.zoomOut"),tooltip:u("accessibility.zoomOut"),onClick:()=>a(),fontSize:20}),i.jsx(Me,{icon:i.jsx(fV,{}),"aria-label":u("accessibility.rotateCounterClockwise"),tooltip:u("accessibility.rotateCounterClockwise"),onClick:n,fontSize:20}),i.jsx(Me,{icon:i.jsx(pV,{}),"aria-label":u("accessibility.rotateClockwise"),tooltip:u("accessibility.rotateClockwise"),onClick:r,fontSize:20}),i.jsx(Me,{icon:i.jsx(p4,{}),"aria-label":u("accessibility.flipHorizontally"),tooltip:u("accessibility.flipHorizontally"),onClick:e,fontSize:20}),i.jsx(Me,{icon:i.jsx(p4,{style:{transform:"rotate(90deg)"}}),"aria-label":u("accessibility.flipVertically"),tooltip:u("accessibility.flipVertically"),onClick:t,fontSize:20}),i.jsx(Me,{icon:i.jsx(Wj,{}),"aria-label":u("accessibility.reset"),tooltip:u("accessibility.reset"),onClick:()=>{l(),o()},fontSize:20})]})};function Ere({image:e,alt:t,ref:n,styleClass:r,rotation:o,scaleX:s,scaleY:a}){const{centerView:l}=a8();return i.jsx(Pre,{wrapperStyle:{width:"100%",height:"100%"},children:i.jsx("img",{style:{transform:`rotate(${o}deg) scaleX(${s}) scaleY(${a})`,width:"100%"},src:e.image_url,alt:t,ref:n,className:r||"",onLoad:()=>l(1,0,"easeOut")})})}const Ore=Te([pl,po],(e,t)=>{const{currentImage:n}=e,{shouldShowImageDetails:r}=t;return{viewerImageToDisplay:n,shouldShowImageDetails:r}},{memoizeOptions:{resultEqualityCheck:Ut}});function Tre(){const e=ue(),t=q(v=>v.lightbox.isLightboxOpen),{rotation:n,scaleX:r,scaleY:o,flipHorizontally:s,flipVertically:a,rotateCounterClockwise:l,rotateClockwise:u,reset:f}=jre(),{viewerImageToDisplay:p,shouldShowImageDetails:m}=q(Ore);return nt("Esc",()=>{t&&e(Hd(!1))},[t]),i.jsx(Co,{children:t&&i.jsx(zo.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15,ease:"easeInOut"},style:{display:"flex",width:"100vw",height:`calc(100vh - ${Zk*4}px)`,position:"fixed",top:`${Zk*4}px`,background:"var(--invokeai-colors-base-900)",zIndex:99},children:i.jsxs(Cre,{centerOnInit:!0,minScale:.1,initialPositionX:50,initialPositionY:50,children:[i.jsxs(K,{sx:{flexDir:"column",position:"absolute",insetInlineStart:4,gap:4,zIndex:3,top:4},children:[i.jsx(Me,{icon:i.jsx(dV,{}),"aria-label":"Exit Viewer",className:"lightbox-close-btn",onClick:()=>{e(Hd(!1))},fontSize:20}),i.jsx(Ire,{flipHorizontally:s,flipVertically:a,rotateCounterClockwise:l,rotateClockwise:u,reset:f})]}),i.jsx(K,{sx:{position:"absolute",top:4,zIndex:3,insetInlineStart:"50%",transform:"translate(-50%, 0)"},children:i.jsx(WT,{})}),p&&i.jsxs(i.Fragment,{children:[i.jsx(
|
||
|
* @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 _ie=function(t){var n={},r=h,o=Ph,s=Object.assign;function a(c){for(var d="https://reactjs.org/docs/error-decoder.html?invariant="+c,g=1;g<arguments.length;g++)d+="&args[]="+encodeURIComponent(arguments[g]);return"Minified React error #"+c+"; visit "+d+" 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,u=Symbol.for("react.element"),f=Symbol.for("react.portal"),p=Symbol.for("react.fragment"),m=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),y=Symbol.for("react.provider"),S=Symbol.for("react.context"),x=Symbol.for("react.forward_ref"),w=Symbol.for("react.suspense"),_=Symbol.for("react.suspense_list"),k=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),I=Symbol.for("react.offscreen"),j=Symbol.iterator;function E(c){return c===null||typeof c!="object"?null:(c=j&&c[j]||c["@@iterator"],typeof c=="function"?c:null)}function T(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 p:return"Fragment";case f:return"Portal";case v:return"Profiler";case m:return"StrictMode";case w:return"Suspense";case _:return"SuspenseList"}if(typeof c=="object")switch(c.$$typeof){case S:return(c.displayName||"Context")+".Consumer";case y:return(c._context.displayName||"Context")+".Provider";case x:var d=c.render;return c=c.displayName,c||(c=d.displayName||d.name||"",c=c!==""?"ForwardRef("+c+")":"ForwardRef"),c;case k:return d=c.displayName||null,d!==null?d:T(c.type)||"Memo";case P:d=c._payload,c=c._init;try{return T(c(d))}catch{}}return null}function R(c){var d=c.type;switch(c.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 c=d.render,c=c.displayName||c.name||"",d.displayName||(c!==""?"ForwardRef("+c+")":"ForwardRef");case 7:return"Fragment";case 5:return d;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return T(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 M(c){var d=c,g=c;if(c.alternate)for(;d.return;)d=d.return;else{c=d;do d=c,d.flags&4098&&(g=d.return),c=d.return;while(c)}return d.tag===3?g:null}function D(c){if(M(c)!==c)throw Error(a(188))}function N(c){var d=c.alternate;if(!d){if(d=M(c),d===null)throw Error(a(188));return d!==c?null:c}for(var g=c,b=d;;){var C=g.return;if(C===null)break;var O=C.alternate;if(O===null){if(b=C.return,b!==null){g=b;continue}break}if(C.child===O.child){for(O=C.child;O;){if(O===g)return D(C),c;if(O===b)return D(C),d;O=O.sibling}throw Error(a(188))}if(g.return!==b.return)g=C,b=O;else{for(var $=!1,J=C.child;J;){if(J===g){$=!0,g=C,b=O;break}if(J===b){$=!0,b=C,g=O;break}J=J.sibling}if(!$){for(J=O.child;J;){if(J===g){$=!0,g=O,b=C;break}if(J===b){$=!0,b=O,g=C;break}J=J.sibling}if(!$)throw Error(a(189))}}if(g.alternate!==b)throw Error(a(190))}if(g.tag!==3)throw Error(a(188));return g.stateNode.current===g?c:d}function U(c){return c=N(c),c!==null?z(c):null}function z(c){if(c.tag===5||c.tag===6)return c;for(c=c.child;c!==null;){var d=z(c);if(d!==null)return d;c=c.sibling}return null}function F(c){if(c.tag===5||c.tag===6)return c;for(c=c.child;c!==null;){if(c.tag!==4){var d=F(c);if(d!==null)return d}c=c.sibling}return null}var H=Array.isArray,G=t.getPublicInstance,A=t.getRootHostContext,L=t.getChildHostContext,W=t.prepareForCommit,V=t.resetAfterCommit,ee=t.createInstance,le=t.appendInitialChild,oe=t.finalizeInitialChildren,X=t.prepareUpdate,Q=t.shouldSetTextContent,ie=t.createTextInstance,ve=t.scheduleTimeout,ye=t.cancelTimeout,se=t.noTimeout,de=t.isPrimaryRenderer,fe=t.supportsMutation,xe=t.supportsPersistence,ke=t.supportsHydration,ae=t.g
|
||
|
`+At+c}var Qt=!1;function sn(c,d){if(!c||Qt)return"";Qt=!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(Fe){var b=Fe}Reflect.construct(c,[],d)}else{try{d.call()}catch(Fe){b=Fe}c.call(d.prototype)}else{try{throw Error()}catch(Fe){b=Fe}c()}}catch(Fe){if(Fe&&b&&typeof Fe.stack=="string"){for(var C=Fe.stack.split(`
|
||
|
`),O=b.stack.split(`
|
||
|
`),$=C.length-1,J=O.length-1;1<=$&&0<=J&&C[$]!==O[J];)J--;for(;1<=$&&0<=J;$--,J--)if(C[$]!==O[J]){if($!==1||J!==1)do if($--,J--,0>J||C[$]!==O[J]){var pe=`
|
||
|
`+C[$].replace(" at new "," at ");return c.displayName&&pe.includes("<anonymous>")&&(pe=pe.replace("<anonymous>",c.displayName)),pe}while(1<=$&&0<=J);break}}}finally{Qt=!1,Error.prepareStackTrace=g}return(c=c?c.displayName||c.name:"")?Ft(c):""}var Jt=Object.prototype.hasOwnProperty,De=[],Pt=-1;function Vt(c){return{current:c}}function Wt(c){0>Pt||(c.current=De[Pt],De[Pt]=null,Pt--)}function Zt(c,d){Pt++,De[Pt]=c.current,c.current=d}var Rn={},on=Vt(Rn),hn=Vt(!1),Gn=Rn;function Kr(c,d){var g=c.type.contextTypes;if(!g)return Rn;var b=c.stateNode;if(b&&b.__reactInternalMemoizedUnmaskedChildContext===d)return b.__reactInternalMemoizedMaskedChildContext;var C={},O;for(O in g)C[O]=d[O];return b&&(c=c.stateNode,c.__reactInternalMemoizedUnmaskedChildContext=d,c.__reactInternalMemoizedMaskedChildContext=C),C}function xr(c){return c=c.childContextTypes,c!=null}function Dt(){Wt(hn),Wt(on)}function Vn(c,d,g){if(on.current!==Rn)throw Error(a(168));Zt(on,d),Zt(hn,g)}function Xn(c,d,g){var b=c.stateNode;if(d=d.childContextTypes,typeof b.getChildContext!="function")return g;b=b.getChildContext();for(var C in b)if(!(C in d))throw Error(a(108,R(c)||"Unknown",C));return s({},g,b)}function br(c){return c=(c=c.stateNode)&&c.__reactInternalMemoizedMergedChildContext||Rn,Gn=on.current,Zt(on,c),Zt(hn,hn.current),!0}function Ar(c,d,g){var b=c.stateNode;if(!b)throw Error(a(169));g?(c=Xn(c,d,Gn),b.__reactInternalMemoizedMergedChildContext=c,Wt(hn),Wt(on),Zt(on,c)):Wt(hn),Zt(hn,g)}var tr=Math.clz32?Math.clz32:$n,nr=Math.log,wn=Math.LN2;function $n(c){return c>>>=0,c===0?32:31-(nr(c)/wn|0)|0}var Wn=64,Mn=4194304;function Dn(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 Je(c,d){var g=c.pendingLanes;if(g===0)return 0;var b=0,C=c.suspendedLanes,O=c.pingedLanes,$=g&268435455;if($!==0){var J=$&~C;J!==0?b=Dn(J):(O&=$,O!==0&&(b=Dn(O)))}else $=g&~C,$!==0?b=Dn($):O!==0&&(b=Dn(O));if(b===0)return 0;if(d!==0&&d!==b&&!(d&C)&&(C=b&-b,O=d&-d,C>=O||C===16&&(O&4194240)!==0))return d;if(b&4&&(b|=g&16),d=c.entangledLanes,d!==0)for(c=c.entanglements,d&=b;0<d;)g=31-tr(d),C=1<<g,b|=c[g],d&=~C;return b}function Nt(c,d){switch(c){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 Et(c,d){for(var g=c.suspendedLanes,b=c.pingedLanes,C=c.expirationTimes,O=c.pendingLanes;0<O;){var $=31-tr(O),J=1<<$,pe=C[$];pe===-1?(!(J&g)||J&b)&&(C[$]=Nt(J,d)):pe<=d&&(c.expiredLanes|=J),O&=~J}}function dt(c){return c=c.pendingLanes&-1073741825,c!==0?c:c&1073741824?1073741824:0}function jt(){var c=Wn;return Wn<<=1,!(Wn&4194240)&&(Wn=64),c}function qt(c){for(var d=[],g=0;31>g;g++)d.push(c);return d}function St(c,d,g){c.pendingLanes|=d,d!==536870912&&(c.suspendedLanes=0,c.pingedLanes=0),c=c.eventTimes,d=31-tr(d),c[d]=g}function it(c,d){var g=c.pendingLanes&~d;c.pendingLanes=d,c.suspendedLanes=0,c.pingedLanes=0,c.expiredLanes&=d,c.mutableReadLanes&=d,c.entangledLanes&=d,d=c.entanglements;var b=c.eventTimes;for(c=c.expirationTimes;0<g;){var C=31-tr(g),O=1<<C;d[C]=0,b[C]=-1,c[C]=-1,g&=~O}}function Ne(c,d){var g=c.entangledLanes|=d;for(c=c.entanglements;g;){var b=31-tr(g),C=1<<b;C&d|c[b]&d&&(c[b]|=d),g&=~C}}var Ee=0;function Le(c){return c&=-c,1<c?4<c?c&268435455?16:536870912:4:1}var Ue=o.unstable_scheduleCallback,st=o.unstable_cancelCallback,$t=o.unsta
|
||
|
Error generating stack: `+O.message+`
|
||
|
`+O.stack}return{value:c,source:d,stack:C,digest:null}}function i0(c,d,g){return{value:c,source:null,stack:g??null,digest:d??null}}function l0(c,d){try{console.error(d.value)}catch(g){setTimeout(function(){throw g})}}var xR=typeof WeakMap=="function"?WeakMap:Map;function fw(c,d,g){g=ni(-1,g),g.tag=3,g.payload={element:null};var b=d.value;return g.callback=function(){jp||(jp=!0,I0=b),l0(c,d)},g}function pw(c,d,g){g=ni(-1,g),g.tag=3;var b=c.type.getDerivedStateFromError;if(typeof b=="function"){var C=d.value;g.payload=function(){return b(C)},g.callback=function(){l0(c,d)}}var O=c.stateNode;return O!==null&&typeof O.componentDidCatch=="function"&&(g.callback=function(){l0(c,d),typeof b!="function"&&(Ri===null?Ri=new Set([this]):Ri.add(this));var $=d.stack;this.componentDidCatch(d.value,{componentStack:$!==null?$:""})}),g}function hw(c,d,g){var b=c.pingCache;if(b===null){b=c.pingCache=new xR;var C=new Set;b.set(d,C)}else C=b.get(d),C===void 0&&(C=new Set,b.set(d,C));C.has(g)||(C.add(g),c=MR.bind(null,c,d,g),d.then(c,c))}function mw(c){do{var d;if((d=c.tag===13)&&(d=c.memoizedState,d=d!==null?d.dehydrated!==null:!0),d)return c;c=c.return}while(c!==null);return null}function gw(c,d,g,b,C){return c.mode&1?(c.flags|=65536,c.lanes=C,c):(c===d?c.flags|=65536:(c.flags|=128,g.flags|=131072,g.flags&=-52805,g.tag===1&&(g.alternate===null?g.tag=17:(d=ni(-1,1),d.tag=2,Ti(g,d,1))),g.lanes|=1),c)}var bR=l.ReactCurrentOwner,Bo=!1;function Oo(c,d,g,b){d.child=c===null?V2(d,null,g,b):_c(d,c.child,g,b)}function vw(c,d,g,b,C){g=g.render;var O=d.ref;return Cc(d,C),b=t0(c,d,g,b,O,C),g=n0(),c!==null&&!Bo?(d.updateQueue=c.updateQueue,d.flags&=-2053,c.lanes&=~C,ri(c,d,C)):(wr&&g&&Nv(d),d.flags|=1,Oo(c,d,b,C),d.child)}function yw(c,d,g,b,C){if(c===null){var O=g.type;return typeof O=="function"&&!D0(O)&&O.defaultProps===void 0&&g.compare===null&&g.defaultProps===void 0?(d.tag=15,d.type=O,xw(c,d,O,b,C)):(c=Mp(g.type,null,b,d,d.mode,C),c.ref=d.ref,c.return=d,d.child=c)}if(O=c.child,!(c.lanes&C)){var $=O.memoizedProps;if(g=g.compare,g=g!==null?g:tp,g($,b)&&c.ref===d.ref)return ri(c,d,C)}return d.flags|=1,c=Ni(O,b),c.ref=d.ref,c.return=d,d.child=c}function xw(c,d,g,b,C){if(c!==null){var O=c.memoizedProps;if(tp(O,b)&&c.ref===d.ref)if(Bo=!1,d.pendingProps=b=O,(c.lanes&C)!==0)c.flags&131072&&(Bo=!0);else return d.lanes=c.lanes,ri(c,d,C)}return c0(c,d,g,b,C)}function bw(c,d,g){var b=d.pendingProps,C=b.children,O=c!==null?c.memoizedState:null;if(b.mode==="hidden")if(!(d.mode&1))d.memoizedState={baseLanes:0,cachePool:null,transitions:null},Zt(Ec,ts),ts|=g;else{if(!(g&1073741824))return c=O!==null?O.baseLanes|g:g,d.lanes=d.childLanes=1073741824,d.memoizedState={baseLanes:c,cachePool:null,transitions:null},d.updateQueue=null,Zt(Ec,ts),ts|=c,null;d.memoizedState={baseLanes:0,cachePool:null,transitions:null},b=O!==null?O.baseLanes:g,Zt(Ec,ts),ts|=b}else O!==null?(b=O.baseLanes|g,d.memoizedState=null):b=g,Zt(Ec,ts),ts|=b;return Oo(c,d,C,g),d.child}function ww(c,d){var g=d.ref;(c===null&&g!==null||c!==null&&c.ref!==g)&&(d.flags|=512,d.flags|=2097152)}function c0(c,d,g,b,C){var O=xr(g)?Gn:on.current;return O=Kr(d,O),Cc(d,C),g=t0(c,d,g,b,O,C),b=n0(),c!==null&&!Bo?(d.updateQueue=c.updateQueue,d.flags&=-2053,c.lanes&=~C,ri(c,d,C)):(wr&&b&&Nv(d),d.flags|=1,Oo(c,d,g,C),d.child)}function Sw(c,d,g,b,C){if(xr(g)){var O=!0;br(d)}else O=!1;if(Cc(d,C),d.stateNode===null)mp(c,d),L2(d,g,b),Yv(d,g,b,C),b=!0;else if(c===null){var $=d.stateNode,J=d.memoizedProps;$.props=J;var pe=$.context,Fe=g.contextType;typeof Fe=="object"&&Fe!==null?Fe=ys(Fe):(Fe=xr(g)?Gn:on.current,Fe=Kr(d,Fe));var Ct=g.getDerivedStateFromProps,nn=typeof Ct=="function"||typeof $.getSnapshotBeforeUpdate=="function";nn||typeof $.UNSAFE_componentWillReceiveProps!="function"&&typeof $.componentWillReceiveProps!="function"||(J!==b||pe!==Fe)&&B2(d,$,b,Fe),Oi=!1;var ft=d.memoizedState;$.state=ft,sp(d,b,$,C),pe=d.memoizedState,J!==b||ft!==pe||hn.current||Oi?(typeof Ct=="function"&&(qv(d,g,Ct,b),pe=d.memoizedState),(J=Oi||$2(d,g,J,b,ft,pe,Fe))?(nn||typeof $.UNSAFE_componentWillMount!="function"&&typeof $.componentWillMo
|
||
|
`+(b.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 G(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:LR,findFiberByHostInstance:c.findFiberByHostInstance||BR,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")c=!1;else{var d=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(d.isDisabled||!d.supportsFiber)c=!0;else{try{hr=d.inject(c),In=d}catch{}c=!!d.checkDCE}}return c},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(c,d,g,b){if(!pt)throw Error(a(363));c=C0(c,d);var C=Ke(c,g,b).disconnect;return{disconnect:function(){C()}}},n.registerMutableSourceForHydration=function(c,d){var g=d._getVersion;g=g(d._source),c.mutableSourceEagerHydrationData==null?c.mutableSourceEagerHydrationData=[d,g]:c.mutableSourceEagerHydrationData.push(d,g)},n.runWithPriority=function(c,d){var g=Ee;try{return Ee=c,d()}finally{Ee=g}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(c,d,g,b){var C=d.current,O=xo(),$=Di(C);return g=Jw(g),d.context===null?d.context=g:d.pendingContext=g,d=ni(O,$),d.payload={element:c},b=b===void 0?null:b,b!==null&&(d.callback=b),c=Ti(C,d,$),c!==null&&(ws(c,C,$,O),op(c,C,$)),$},n};N8.exports=_ie;var kie=N8.exports;const Pie=kf(kie);var z8={exports:{}},bc={};/**
|
||
|
* @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.
|
||
|
*/bc.ConcurrentRoot=1;bc.ContinuousEventPriority=4;bc.DefaultEventPriority=16;bc.DiscreteEventPriority=1;bc.IdleEventPriority=536870912;bc.LegacyRoot=0;z8.exports=bc;var $8=z8.exports;const I3={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let E3=!1,O3=!1;const S2=".react-konva-event",jie=`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
|
||
|
`,Iie=`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
|
||
|
`,Eie={};function Mv(e,t,n=Eie){if(!E3&&"zIndex"in t&&(console.warn(Iie),E3=!0),!O3&&t.draggable){var r=t.x!==void 0||t.y!==void 0,o=t.onDragEnd||t.onDragMove;r&&!o&&(console.warn(jie),O3=!0)}for(var s in n)if(!I3[s]){var a=s.slice(0,2)==="on",l=n[s]!==t[s];if(a&&l){var u=s.substr(2).toLowerCase();u.substr(0,7)==="content"&&(u="content"+u.substr(7,1).toUpperCase()+u.substr(8)),e.off(u,n[s])}var f=!t.hasOwnProperty(s);f&&e.setAttr(s,void 0)}var p=t._useStrictMode,m={},v=!1;const y={};for(var s in t)if(!I3[s]){var a=s.slice(0,2)==="on",S=n[s]!==t[s];if(a&&S){var u=s.substr(2).toLowerCase();u.substr(0,7)==="content"&&(u="content"+u.substr(7,1).toUpperCase()+u.substr(8)),t[s]&&(y[u]=t[s])}!a&&(t[s]!==n[s]||p&&t[s]!==e.getAttr(s))&&(v=!0,m[s]=t[s])}v&&(e.setAttrs(m),bl(e));for(var u in y)e.on(u+S2,y[u])}function bl(e){if(!$7.Konva.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}const L8={},Oie={};Cf.Node.prototype._applyProps=Mv;function Tie(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),bl(e)}function Rie(e,t,n){let r=Cf[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=Cf.Group);const o={},s={};for(var a in t){var l=a.slice(0,2)==="on";l?s[a]=t[a]:o[a]=t[a]}const u=new r(o);return Mv(u,s),u}function Mie(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function Die(e,t,n){return!1}function Aie(e){return e}function Nie(){return null}function zie(){return null}function $ie(e,t,n,r){return Oie}function Lie(){}function Bie(e){}function Fie(e,t){return!1}function Hie(){return L8}function Vie(){return L8}const Wie=setTimeout,Uie=clearTimeout,Gie=-1;function qie(e,t){return!1}const Yie=!1,Kie=!0,Xie=!0;function Zie(e,t){t.parent===e?t.moveToTop():e.add(t),bl(e)}function Qie(e,t){t.parent===e?t.moveToTop():e.add(t),bl(e)}function B8(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),bl(e)}function Jie(e,t,n){B8(e,t,n)}function ele(e,t){t.destroy(),t.off(S2),bl(e)}function tle(e,t){t.destroy(),t.off(S2),bl(e)}function nle(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function rle(e,t,n){}function ole(e,t,n,r,o){Mv(e,o,r)}function sle(e){e.hide(),bl(e)}function ale(e){}function ile(e,t){(t.visible==null||t.visible)&&e.show()}function lle(e,t){}function cle(e){}function ule(){}const dle=()=>$8.DefaultEventPriority,fle=Object.freeze(Object.defineProperty({__proto__:null,appendChild:Zie,appendChildToContainer:Qie,appendInitialChild:Tie,cancelTimeout:Uie,clearContainer:cle,commitMount:rle,commitTextUpdate:nle,commitUpdate:ole,createInstance:Rie,createTextInstance:Mie,detachDeletedInstance:ule,finalizeInitialChildren:Die,getChildHostContext:Vie,getCurrentEventPriority:dle,getPublicInstance:Aie,getRootHostContext:Hie,hideInstance:sle,hideTextInstance:ale,idlePriority:Ph.unstable_IdlePriority,insertBefore:B8,insertInContainerBefore:Jie,isPrimaryRenderer:Yie,noTimeout:Gie,now:Ph.unstable_now,prepareForCommit:Nie,preparePortalMount:zie,prepareUpdate:$ie,removeChild:ele,removeChildFromContainer:tle,resetAfterCommit:Lie,resetTextContent:Bie,run:Ph.unstable_runWithPriority,scheduleTimeout:Wie,shouldDeprioritizeSubtree:Fie,shouldSetTextContent:qie,supportsMutation:Xie,unhideInstance:ile,unhideTextInstance:lle,warnsIfNotActing:Kie},Symbol.toStringTag,{value:"Module"}));var ple=Object.defineProperty,hle=Object.defineProperties,mle=Object.getOwnPropertyDescriptors,T3=Object.getOwnPropertySymbols,gle=Object.prototype.hasOwnProperty,vle=Object.prototype.propertyIsEnumerable,R3=(e,t,n)=>t in e?ple(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,M3=(e,t)=>{for(var n in t||(t={}))gle.call(t,n)&&R3(e,n,t[n]);if(T3)for(var n of T3(t))vle.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),Gle=e=>{const{...t}=e,{maskColorString:n,stageCoordinates:r,stageDimensions:o,stageScale:s}=q(Ule),[a,l]=h.useState(null),[u,f]=h.useState(0),p=h.useRef(null),m=h.useCallback(()=>{f(u+1),setTimeout(m,500)},[u]);return h.useEffect(()=>{if(a)return;const v=new Image;v.onload=()=>{l(v)},v.src=N3(n)},[a,n]),h.useEffect(()=>{a&&(a.src=N3(n))},[a,n]),h.useEffect(()=>{const v=setInterval(()=>f(y=>(y+1)%5),50);return()=>clearInterval(v)},[]),!a||!Rc(r.x)||!Rc(r.y)||!Rc(s)||!Rc(o.width)||!Rc(o.height)?null:i.jsx(Ga,{ref:p,offsetX:r.x/s,offsetY:r.y/s,height:o.height/s,width:o.width/s,fillPatternImage:a,fillPatternOffsetY:Rc(u)?u:0,fillPatternRepeat:"repeat",fillPatternScale:{x:1/s,y:1/s},listening:!0,globalCompositeOperation:"source-in",...t})},qle=Te([xn],e=>({objects:e.layerState.objects}),{memoizeOptions:{resultEqualityCheck:Ut}}),Yle=e=>{const{...t}=e,{objects:n}=q(qle);return i.jsx(wi,{listening:!1,...t,children:n.filter(Z7).map((r,o)=>i.jsx(yg,{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))})};var Tl=h,Kle=function(t,n,r){const o=Tl.useRef("loading"),s=Tl.useRef(),[a,l]=Tl.useState(0),u=Tl.useRef(),f=Tl.useRef(),p=Tl.useRef();return(u.current!==t||f.current!==n||p.current!==r)&&(o.current="loading",s.current=void 0,u.current=t,f.current=n,p.current=r),Tl.useLayoutEffect(function(){if(!t)return;var m=document.createElement("img");function v(){o.current="loaded",s.current=m,l(Math.random())}function y(){o.current="failed",s.current=void 0,l(Math.random())}return m.addEventListener("load",v),m.addEventListener("error",y),n&&(m.crossOrigin=n),r&&(m.referrerPolicy=r),m.src=t,function(){m.removeEventListener("load",v),m.removeEventListener("error",y)}},[t,n,r]),[s.current,o.current]};const Xle=kf(Kle),G8=e=>{const{width:t,height:n,x:r,y:o,imageName:s}=e.canvasImage,{currentData:a,isError:l}=lc(s??cc.skipToken),[u]=Xle((a==null?void 0:a.image_url)??"",Q7.get()?"use-credentials":"anonymous");return l?i.jsx(Ga,{x:r,y:o,width:t,height:n,fill:"red"}):i.jsx(W8,{x:r,y:o,image:u,listening:!1})},Zle=Te([xn],e=>{const{layerState:{objects:t}}=e;return{objects:t}},{memoizeOptions:{resultEqualityCheck:Ut}}),Qle=()=>{const{objects:e}=q(Zle);return e?i.jsx(wi,{name:"outpainting-objects",listening:!1,children:e.map((t,n)=>{if(J7(t))return i.jsx(G8,{canvasImage:t},n);if(e9(t)){const r=i.jsx(yg,{points:t.points,stroke:t.color?Zl(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?i.jsx(wi,{clipX:t.clip.x,clipY:t.clip.y,clipWidth:t.clip.width,clipHeight:t.clip.height,children:r},n):r}else{if(t9(t))return i.jsx(Ga,{x:t.x,y:t.y,width:t.width,height:t.height,fill:Zl(t.color)},n);if(n9(t))return i.jsx(Ga,{x:t.x,y:t.y,width:t.width,height:t.height,fill:"rgb(255, 255, 255)",globalCompositeOperation:"destination-out"},n)}})}):null},Jle=Te([xn],e=>{const{layerState:t,shouldShowStagingImage:n,shouldShowStagingOutline:r,boundingBoxCoordinates:{x:o,y:s},boundingBoxDimensions:{width:a,height:l}}=e,{selectedImageIndex:u,images:f}=t.stagingArea;return{currentStagingAreaImage:f.length>0&&u!==void 0?f[u]:void 0,isOnFirstImage:u===0,isOnLastImage:u===f.length-1,shouldShowStagingImage:n,shouldShowStagingOutline:r,x:o,y:s,width:a,height:l}},{memoizeOptions:{resultEqualityCheck:Ut}}),ece=e=>{const{...t}=e,{currentStagingAreaImage:n,shouldShowStagingImage:r,shouldShowStagingOutline:o,x:s,y:a,width:l,height:u}=q(Jle);return i.jsxs(wi,{...t,children:[r&&n&&i.jsx(G8,{canvasImage:n}),o&&i.jsxs(wi,{children:[i.jsx(Ga,{x:s,y:a,width:l,height:u,strokeWidth:1,stroke:"white",strokeScaleEnabled:!1}),i.jsx(Ga,{x:s,y:a,width:l,height:u,dash:[4,4],strokeWidth:1,stroke:"black",strokeScaleEnabled:!1})]})]})},tce=Te([xn],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n,sessionId:r}},shouldShowSta
|