@gallop.software/studio 2.3.134 → 2.3.135

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,92 @@
1
+ function Im(o,r){for(var f=0;f<r.length;f++){const d=r[f];if(typeof d!="string"&&!Array.isArray(d)){for(const h in d)if(h!=="default"&&!(h in o)){const m=Object.getOwnPropertyDescriptor(d,h);m&&Object.defineProperty(o,h,m.get?m:{enumerable:!0,get:()=>d[h]})}}}return Object.freeze(Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}))}(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const h of document.querySelectorAll('link[rel="modulepreload"]'))d(h);new MutationObserver(h=>{for(const m of h)if(m.type==="childList")for(const C of m.addedNodes)C.tagName==="LINK"&&C.rel==="modulepreload"&&d(C)}).observe(document,{childList:!0,subtree:!0});function f(h){const m={};return h.integrity&&(m.integrity=h.integrity),h.referrerPolicy&&(m.referrerPolicy=h.referrerPolicy),h.crossOrigin==="use-credentials"?m.credentials="include":h.crossOrigin==="anonymous"?m.credentials="omit":m.credentials="same-origin",m}function d(h){if(h.ep)return;h.ep=!0;const m=f(h);fetch(h.href,m)}})();function Pm(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}var Zc={exports:{}},$i={};var ep;function eg(){if(ep)return $i;ep=1;var o=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function f(d,h,m){var C=null;if(m!==void 0&&(C=""+m),h.key!==void 0&&(C=""+h.key),"key"in h){m={};for(var D in h)D!=="key"&&(m[D]=h[D])}else m=h;return h=m.ref,{$$typeof:o,type:d,key:C,ref:h!==void 0?h:null,props:m}}return $i.Fragment=r,$i.jsx=f,$i.jsxs=f,$i}var tp;function tg(){return tp||(tp=1,Zc.exports=eg()),Zc.exports}var to=tg(),Fc={exports:{}},Be={};var np;function ng(){if(np)return Be;np=1;var o=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),f=Symbol.for("react.fragment"),d=Symbol.for("react.strict_mode"),h=Symbol.for("react.profiler"),m=Symbol.for("react.consumer"),C=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),w=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),R=Symbol.for("react.lazy"),k=Symbol.for("react.activity"),B=Symbol.iterator;function Y(v){return v===null||typeof v!="object"?null:(v=B&&v[B]||v["@@iterator"],typeof v=="function"?v:null)}var U={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},G=Object.assign,ie={};function V(v,L,I){this.props=v,this.context=L,this.refs=ie,this.updater=I||U}V.prototype.isReactComponent={},V.prototype.setState=function(v,L){if(typeof v!="object"&&typeof v!="function"&&v!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,v,L,"setState")},V.prototype.forceUpdate=function(v){this.updater.enqueueForceUpdate(this,v,"forceUpdate")};function oe(){}oe.prototype=V.prototype;function ae(v,L,I){this.props=v,this.context=L,this.refs=ie,this.updater=I||U}var ce=ae.prototype=new oe;ce.constructor=ae,G(ce,V.prototype),ce.isPureReactComponent=!0;var X=Array.isArray;function W(){}var $={H:null,A:null,T:null,S:null},P=Object.prototype.hasOwnProperty;function N(v,L,I){var le=I.ref;return{$$typeof:o,type:v,key:L,ref:le!==void 0?le:null,props:I}}function Q(v,L){return N(v.type,L,v.props)}function ue(v){return typeof v=="object"&&v!==null&&v.$$typeof===o}function he(v){var L={"=":"=0",":":"=2"};return"$"+v.replace(/[=:]/g,function(I){return L[I]})}var pe=/\/+/g;function te(v,L){return typeof v=="object"&&v!==null&&v.key!=null?he(""+v.key):L.toString(36)}function Ue(v){switch(v.status){case"fulfilled":return v.value;case"rejected":throw v.reason;default:switch(typeof v.status=="string"?v.then(W,W):(v.status="pending",v.then(function(L){v.status==="pending"&&(v.status="fulfilled",v.value=L)},function(L){v.status==="pending"&&(v.status="rejected",v.reason=L)})),v.status){case"fulfilled":return v.value;case"rejected":throw v.reason}}throw v}function E(v,L,I,le,Ce){var Ee=typeof v;(Ee==="undefined"||Ee==="boolean")&&(v=null);var je=!1;if(v===null)je=!0;else switch(Ee){case"bigint":case"string":case"number":je=!0;break;case"object":switch(v.$$typeof){case o:case r:je=!0;break;case R:return je=v._init,E(je(v._payload),L,I,le,Ce)}}if(je)return Ce=Ce(v),je=le===""?"."+te(v,0):le,X(Ce)?(I="",je!=null&&(I=je.replace(pe,"$&/")+"/"),E(Ce,L,I,"",function(nn){return nn})):Ce!=null&&(ue(Ce)&&(Ce=Q(Ce,I+(Ce.key==null||v&&v.key===Ce.key?"":(""+Ce.key).replace(pe,"$&/")+"/")+je)),L.push(Ce)),1;je=0;var vt=le===""?".":le+":";if(X(v))for(var Le=0;Le<v.length;Le++)le=v[Le],Ee=vt+te(le,Le),je+=E(le,L,I,Ee,Ce);else if(Le=Y(v),typeof Le=="function")for(v=Le.call(v),Le=0;!(le=v.next()).done;)le=le.value,Ee=vt+te(le,Le++),je+=E(le,L,I,Ee,Ce);else if(Ee==="object"){if(typeof v.then=="function")return E(Ue(v),L,I,le,Ce);throw L=String(v),Error("Objects are not valid as a React child (found: "+(L==="[object Object]"?"object with keys {"+Object.keys(v).join(", ")+"}":L)+"). If you meant to render a collection of children, use an array instead.")}return je}function J(v,L,I){if(v==null)return v;var le=[],Ce=0;return E(v,le,"","",function(Ee){return L.call(I,Ee,Ce++)}),le}function F(v){if(v._status===-1){var L=v._result;L=L(),L.then(function(I){(v._status===0||v._status===-1)&&(v._status=1,v._result=I)},function(I){(v._status===0||v._status===-1)&&(v._status=2,v._result=I)}),v._status===-1&&(v._status=0,v._result=L)}if(v._status===1)return v._result.default;throw v._result}var De=typeof reportError=="function"?reportError:function(v){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var L=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof v=="object"&&v!==null&&typeof v.message=="string"?String(v.message):String(v),error:v});if(!window.dispatchEvent(L))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",v);return}console.error(v)},Ye={map:J,forEach:function(v,L,I){J(v,function(){L.apply(this,arguments)},I)},count:function(v){var L=0;return J(v,function(){L++}),L},toArray:function(v){return J(v,function(L){return L})||[]},only:function(v){if(!ue(v))throw Error("React.Children.only expected to receive a single React element child.");return v}};return Be.Activity=k,Be.Children=Ye,Be.Component=V,Be.Fragment=f,Be.Profiler=h,Be.PureComponent=ae,Be.StrictMode=d,Be.Suspense=w,Be.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=$,Be.__COMPILER_RUNTIME={__proto__:null,c:function(v){return $.H.useMemoCache(v)}},Be.cache=function(v){return function(){return v.apply(null,arguments)}},Be.cacheSignal=function(){return null},Be.cloneElement=function(v,L,I){if(v==null)throw Error("The argument must be a React element, but you passed "+v+".");var le=G({},v.props),Ce=v.key;if(L!=null)for(Ee in L.key!==void 0&&(Ce=""+L.key),L)!P.call(L,Ee)||Ee==="key"||Ee==="__self"||Ee==="__source"||Ee==="ref"&&L.ref===void 0||(le[Ee]=L[Ee]);var Ee=arguments.length-2;if(Ee===1)le.children=I;else if(1<Ee){for(var je=Array(Ee),vt=0;vt<Ee;vt++)je[vt]=arguments[vt+2];le.children=je}return N(v.type,Ce,le)},Be.createContext=function(v){return v={$$typeof:C,_currentValue:v,_currentValue2:v,_threadCount:0,Provider:null,Consumer:null},v.Provider=v,v.Consumer={$$typeof:m,_context:v},v},Be.createElement=function(v,L,I){var le,Ce={},Ee=null;if(L!=null)for(le in L.key!==void 0&&(Ee=""+L.key),L)P.call(L,le)&&le!=="key"&&le!=="__self"&&le!=="__source"&&(Ce[le]=L[le]);var je=arguments.length-2;if(je===1)Ce.children=I;else if(1<je){for(var vt=Array(je),Le=0;Le<je;Le++)vt[Le]=arguments[Le+2];Ce.children=vt}if(v&&v.defaultProps)for(le in je=v.defaultProps,je)Ce[le]===void 0&&(Ce[le]=je[le]);return N(v,Ee,Ce)},Be.createRef=function(){return{current:null}},Be.forwardRef=function(v){return{$$typeof:D,render:v}},Be.isValidElement=ue,Be.lazy=function(v){return{$$typeof:R,_payload:{_status:-1,_result:v},_init:F}},Be.memo=function(v,L){return{$$typeof:g,type:v,compare:L===void 0?null:L}},Be.startTransition=function(v){var L=$.T,I={};$.T=I;try{var le=v(),Ce=$.S;Ce!==null&&Ce(I,le),typeof le=="object"&&le!==null&&typeof le.then=="function"&&le.then(W,De)}catch(Ee){De(Ee)}finally{L!==null&&I.types!==null&&(L.types=I.types),$.T=L}},Be.unstable_useCacheRefresh=function(){return $.H.useCacheRefresh()},Be.use=function(v){return $.H.use(v)},Be.useActionState=function(v,L,I){return $.H.useActionState(v,L,I)},Be.useCallback=function(v,L){return $.H.useCallback(v,L)},Be.useContext=function(v){return $.H.useContext(v)},Be.useDebugValue=function(){},Be.useDeferredValue=function(v,L){return $.H.useDeferredValue(v,L)},Be.useEffect=function(v,L){return $.H.useEffect(v,L)},Be.useEffectEvent=function(v){return $.H.useEffectEvent(v)},Be.useId=function(){return $.H.useId()},Be.useImperativeHandle=function(v,L,I){return $.H.useImperativeHandle(v,L,I)},Be.useInsertionEffect=function(v,L){return $.H.useInsertionEffect(v,L)},Be.useLayoutEffect=function(v,L){return $.H.useLayoutEffect(v,L)},Be.useMemo=function(v,L){return $.H.useMemo(v,L)},Be.useOptimistic=function(v,L){return $.H.useOptimistic(v,L)},Be.useReducer=function(v,L,I){return $.H.useReducer(v,L,I)},Be.useRef=function(v){return $.H.useRef(v)},Be.useState=function(v){return $.H.useState(v)},Be.useSyncExternalStore=function(v,L,I){return $.H.useSyncExternalStore(v,L,I)},Be.useTransition=function(){return $.H.useTransition()},Be.version="19.2.4",Be}var ap;function ru(){return ap||(ap=1,Fc.exports=ng()),Fc.exports}var S=ru();const ot=Pm(S),lp=Im({__proto__:null,default:ot},[S]);function ag(o){if(o.sheet)return o.sheet;for(var r=0;r<document.styleSheets.length;r++)if(document.styleSheets[r].ownerNode===o)return document.styleSheets[r]}function lg(o){var r=document.createElement("style");return r.setAttribute("data-emotion",o.key),o.nonce!==void 0&&r.setAttribute("nonce",o.nonce),r.appendChild(document.createTextNode("")),r.setAttribute("data-s",""),r}var ig=(function(){function o(f){var d=this;this._insertTag=function(h){var m;d.tags.length===0?d.insertionPoint?m=d.insertionPoint.nextSibling:d.prepend?m=d.container.firstChild:m=d.before:m=d.tags[d.tags.length-1].nextSibling,d.container.insertBefore(h,m),d.tags.push(h)},this.isSpeedy=f.speedy===void 0?!0:f.speedy,this.tags=[],this.ctr=0,this.nonce=f.nonce,this.key=f.key,this.container=f.container,this.prepend=f.prepend,this.insertionPoint=f.insertionPoint,this.before=null}var r=o.prototype;return r.hydrate=function(d){d.forEach(this._insertTag)},r.insert=function(d){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(lg(this));var h=this.tags[this.tags.length-1];if(this.isSpeedy){var m=ag(h);try{m.insertRule(d,m.cssRules.length)}catch{}}else h.appendChild(document.createTextNode(d));this.ctr++},r.flush=function(){this.tags.forEach(function(d){var h;return(h=d.parentNode)==null?void 0:h.removeChild(d)}),this.tags=[],this.ctr=0},o})(),tn="-ms-",Tr="-moz-",tt="-webkit-",kp="comm",su="rule",cu="decl",og="@import",Dp="@keyframes",rg="@layer",sg=Math.abs,_r=String.fromCharCode,cg=Object.assign;function ug(o,r){return It(o,0)^45?(((r<<2^It(o,0))<<2^It(o,1))<<2^It(o,2))<<2^It(o,3):0}function Ep(o){return o.trim()}function dg(o,r){return(o=r.exec(o))?o[0]:o}function nt(o,r,f){return o.replace(r,f)}function lu(o,r){return o.indexOf(r)}function It(o,r){return o.charCodeAt(r)|0}function no(o,r,f){return o.slice(r,f)}function Qn(o){return o.length}function uu(o){return o.length}function Mr(o,r){return r.push(o),o}function fg(o,r){return o.map(r).join("")}var Or=1,Pl=1,Ap=0,hn=0,Nt=0,ti="";function Lr(o,r,f,d,h,m,C){return{value:o,root:r,parent:f,type:d,props:h,children:m,line:Or,column:Pl,length:C,return:""}}function Wi(o,r){return cg(Lr("",null,null,"",null,null,0),o,{length:-o.length},r)}function hg(){return Nt}function pg(){return Nt=hn>0?It(ti,--hn):0,Pl--,Nt===10&&(Pl=1,Or--),Nt}function zn(){return Nt=hn<Ap?It(ti,hn++):0,Pl++,Nt===10&&(Pl=1,Or++),Nt}function Zn(){return It(ti,hn)}function kr(){return hn}function io(o,r){return no(ti,o,r)}function ao(o){switch(o){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Tp(o){return Or=Pl=1,Ap=Qn(ti=o),hn=0,[]}function Rp(o){return ti="",o}function Dr(o){return Ep(io(hn-1,iu(o===91?o+2:o===40?o+1:o)))}function mg(o){for(;(Nt=Zn())&&Nt<33;)zn();return ao(o)>2||ao(Nt)>3?"":" "}function gg(o,r){for(;--r&&zn()&&!(Nt<48||Nt>102||Nt>57&&Nt<65||Nt>70&&Nt<97););return io(o,kr()+(r<6&&Zn()==32&&zn()==32))}function iu(o){for(;zn();)switch(Nt){case o:return hn;case 34:case 39:o!==34&&o!==39&&iu(Nt);break;case 40:o===41&&iu(o);break;case 92:zn();break}return hn}function yg(o,r){for(;zn()&&o+Nt!==57;)if(o+Nt===84&&Zn()===47)break;return"/*"+io(r,hn-1)+"*"+_r(o===47?o:zn())}function bg(o){for(;!ao(Zn());)zn();return io(o,hn)}function vg(o){return Rp(Er("",null,null,null,[""],o=Tp(o),0,[0],o))}function Er(o,r,f,d,h,m,C,D,w){for(var g=0,R=0,k=C,B=0,Y=0,U=0,G=1,ie=1,V=1,oe=0,ae="",ce=h,X=m,W=d,$=ae;ie;)switch(U=oe,oe=zn()){case 40:if(U!=108&&It($,k-1)==58){lu($+=nt(Dr(oe),"&","&\f"),"&\f")!=-1&&(V=-1);break}case 34:case 39:case 91:$+=Dr(oe);break;case 9:case 10:case 13:case 32:$+=mg(U);break;case 92:$+=gg(kr()-1,7);continue;case 47:switch(Zn()){case 42:case 47:Mr(xg(yg(zn(),kr()),r,f),w);break;default:$+="/"}break;case 123*G:D[g++]=Qn($)*V;case 125*G:case 59:case 0:switch(oe){case 0:case 125:ie=0;case 59+R:V==-1&&($=nt($,/\f/g,"")),Y>0&&Qn($)-k&&Mr(Y>32?op($+";",d,f,k-1):op(nt($," ","")+";",d,f,k-2),w);break;case 59:$+=";";default:if(Mr(W=ip($,r,f,g,R,h,D,ae,ce=[],X=[],k),m),oe===123)if(R===0)Er($,r,W,W,ce,m,k,D,X);else switch(B===99&&It($,3)===110?100:B){case 100:case 108:case 109:case 115:Er(o,W,W,d&&Mr(ip(o,W,W,0,0,h,D,ae,h,ce=[],k),X),h,X,k,D,d?ce:X);break;default:Er($,W,W,W,[""],X,0,D,X)}}g=R=Y=0,G=V=1,ae=$="",k=C;break;case 58:k=1+Qn($),Y=U;default:if(G<1){if(oe==123)--G;else if(oe==125&&G++==0&&pg()==125)continue}switch($+=_r(oe),oe*G){case 38:V=R>0?1:($+="\f",-1);break;case 44:D[g++]=(Qn($)-1)*V,V=1;break;case 64:Zn()===45&&($+=Dr(zn())),B=Zn(),R=k=Qn(ae=$+=bg(kr())),oe++;break;case 45:U===45&&Qn($)==2&&(G=0)}}return m}function ip(o,r,f,d,h,m,C,D,w,g,R){for(var k=h-1,B=h===0?m:[""],Y=uu(B),U=0,G=0,ie=0;U<d;++U)for(var V=0,oe=no(o,k+1,k=sg(G=C[U])),ae=o;V<Y;++V)(ae=Ep(G>0?B[V]+" "+oe:nt(oe,/&\f/g,B[V])))&&(w[ie++]=ae);return Lr(o,r,f,h===0?su:D,w,g,R)}function xg(o,r,f){return Lr(o,r,f,kp,_r(hg()),no(o,2,-2),0)}function op(o,r,f,d){return Lr(o,r,f,cu,no(o,0,d),no(o,d+1,-1),d)}function Il(o,r){for(var f="",d=uu(o),h=0;h<d;h++)f+=r(o[h],h,o,r)||"";return f}function Sg(o,r,f,d){switch(o.type){case rg:if(o.children.length)break;case og:case cu:return o.return=o.return||o.value;case kp:return"";case Dp:return o.return=o.value+"{"+Il(o.children,d)+"}";case su:o.value=o.props.join(",")}return Qn(f=Il(o.children,d))?o.return=o.value+"{"+f+"}":""}function Cg(o){var r=uu(o);return function(f,d,h,m){for(var C="",D=0;D<r;D++)C+=o[D](f,d,h,m)||"";return C}}function wg(o){return function(r){r.root||(r=r.return)&&o(r)}}function zg(o){var r=Object.create(null);return function(f){return r[f]===void 0&&(r[f]=o(f)),r[f]}}var Mg=function(r,f,d){for(var h=0,m=0;h=m,m=Zn(),h===38&&m===12&&(f[d]=1),!ao(m);)zn();return io(r,hn)},kg=function(r,f){var d=-1,h=44;do switch(ao(h)){case 0:h===38&&Zn()===12&&(f[d]=1),r[d]+=Mg(hn-1,f,d);break;case 2:r[d]+=Dr(h);break;case 4:if(h===44){r[++d]=Zn()===58?"&\f":"",f[d]=r[d].length;break}default:r[d]+=_r(h)}while(h=zn());return r},Dg=function(r,f){return Rp(kg(Tp(r),f))},rp=new WeakMap,Eg=function(r){if(!(r.type!=="rule"||!r.parent||r.length<1)){for(var f=r.value,d=r.parent,h=r.column===d.column&&r.line===d.line;d.type!=="rule";)if(d=d.parent,!d)return;if(!(r.props.length===1&&f.charCodeAt(0)!==58&&!rp.get(d))&&!h){rp.set(r,!0);for(var m=[],C=Dg(f,m),D=d.props,w=0,g=0;w<C.length;w++)for(var R=0;R<D.length;R++,g++)r.props[g]=m[w]?C[w].replace(/&\f/g,D[R]):D[R]+" "+C[w]}}},Ag=function(r){if(r.type==="decl"){var f=r.value;f.charCodeAt(0)===108&&f.charCodeAt(2)===98&&(r.return="",r.value="")}};function _p(o,r){switch(ug(o,r)){case 5103:return tt+"print-"+o+o;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return tt+o+o;case 5349:case 4246:case 4810:case 6968:case 2756:return tt+o+Tr+o+tn+o+o;case 6828:case 4268:return tt+o+tn+o+o;case 6165:return tt+o+tn+"flex-"+o+o;case 5187:return tt+o+nt(o,/(\w+).+(:[^]+)/,tt+"box-$1$2"+tn+"flex-$1$2")+o;case 5443:return tt+o+tn+"flex-item-"+nt(o,/flex-|-self/,"")+o;case 4675:return tt+o+tn+"flex-line-pack"+nt(o,/align-content|flex-|-self/,"")+o;case 5548:return tt+o+tn+nt(o,"shrink","negative")+o;case 5292:return tt+o+tn+nt(o,"basis","preferred-size")+o;case 6060:return tt+"box-"+nt(o,"-grow","")+tt+o+tn+nt(o,"grow","positive")+o;case 4554:return tt+nt(o,/([^-])(transform)/g,"$1"+tt+"$2")+o;case 6187:return nt(nt(nt(o,/(zoom-|grab)/,tt+"$1"),/(image-set)/,tt+"$1"),o,"")+o;case 5495:case 3959:return nt(o,/(image-set\([^]*)/,tt+"$1$`$1");case 4968:return nt(nt(o,/(.+:)(flex-)?(.*)/,tt+"box-pack:$3"+tn+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+tt+o+o;case 4095:case 3583:case 4068:case 2532:return nt(o,/(.+)-inline(.+)/,tt+"$1$2")+o;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Qn(o)-1-r>6)switch(It(o,r+1)){case 109:if(It(o,r+4)!==45)break;case 102:return nt(o,/(.+:)(.+)-([^]+)/,"$1"+tt+"$2-$3$1"+Tr+(It(o,r+3)==108?"$3":"$2-$3"))+o;case 115:return~lu(o,"stretch")?_p(nt(o,"stretch","fill-available"),r)+o:o}break;case 4949:if(It(o,r+1)!==115)break;case 6444:switch(It(o,Qn(o)-3-(~lu(o,"!important")&&10))){case 107:return nt(o,":",":"+tt)+o;case 101:return nt(o,/(.+:)([^;!]+)(;|!.+)?/,"$1"+tt+(It(o,14)===45?"inline-":"")+"box$3$1"+tt+"$2$3$1"+tn+"$2box$3")+o}break;case 5936:switch(It(o,r+11)){case 114:return tt+o+tn+nt(o,/[svh]\w+-[tblr]{2}/,"tb")+o;case 108:return tt+o+tn+nt(o,/[svh]\w+-[tblr]{2}/,"tb-rl")+o;case 45:return tt+o+tn+nt(o,/[svh]\w+-[tblr]{2}/,"lr")+o}return tt+o+tn+o+o}return o}var Tg=function(r,f,d,h){if(r.length>-1&&!r.return)switch(r.type){case cu:r.return=_p(r.value,r.length);break;case Dp:return Il([Wi(r,{value:nt(r.value,"@","@"+tt)})],h);case su:if(r.length)return fg(r.props,function(m){switch(dg(m,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Il([Wi(r,{props:[nt(m,/:(read-\w+)/,":"+Tr+"$1")]})],h);case"::placeholder":return Il([Wi(r,{props:[nt(m,/:(plac\w+)/,":"+tt+"input-$1")]}),Wi(r,{props:[nt(m,/:(plac\w+)/,":"+Tr+"$1")]}),Wi(r,{props:[nt(m,/:(plac\w+)/,tn+"input-$1")]})],h)}return""})}},Rg=[Tg],_g=function(r){var f=r.key;if(f==="css"){var d=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(d,function(G){var ie=G.getAttribute("data-emotion");ie.indexOf(" ")!==-1&&(document.head.appendChild(G),G.setAttribute("data-s",""))})}var h=r.stylisPlugins||Rg,m={},C,D=[];C=r.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+f+' "]'),function(G){for(var ie=G.getAttribute("data-emotion").split(" "),V=1;V<ie.length;V++)m[ie[V]]=!0;D.push(G)});var w,g=[Eg,Ag];{var R,k=[Sg,wg(function(G){R.insert(G)})],B=Cg(g.concat(h,k)),Y=function(ie){return Il(vg(ie),B)};w=function(ie,V,oe,ae){R=oe,Y(ie?ie+"{"+V.styles+"}":V.styles),ae&&(U.inserted[V.name]=!0)}}var U={key:f,sheet:new ig({key:f,container:C,nonce:r.nonce,speedy:r.speedy,prepend:r.prepend,insertionPoint:r.insertionPoint}),nonce:r.nonce,inserted:m,registered:{},insert:w};return U.sheet.hydrate(D),U},Jc={exports:{}},it={};var sp;function Og(){if(sp)return it;sp=1;var o=typeof Symbol=="function"&&Symbol.for,r=o?Symbol.for("react.element"):60103,f=o?Symbol.for("react.portal"):60106,d=o?Symbol.for("react.fragment"):60107,h=o?Symbol.for("react.strict_mode"):60108,m=o?Symbol.for("react.profiler"):60114,C=o?Symbol.for("react.provider"):60109,D=o?Symbol.for("react.context"):60110,w=o?Symbol.for("react.async_mode"):60111,g=o?Symbol.for("react.concurrent_mode"):60111,R=o?Symbol.for("react.forward_ref"):60112,k=o?Symbol.for("react.suspense"):60113,B=o?Symbol.for("react.suspense_list"):60120,Y=o?Symbol.for("react.memo"):60115,U=o?Symbol.for("react.lazy"):60116,G=o?Symbol.for("react.block"):60121,ie=o?Symbol.for("react.fundamental"):60117,V=o?Symbol.for("react.responder"):60118,oe=o?Symbol.for("react.scope"):60119;function ae(X){if(typeof X=="object"&&X!==null){var W=X.$$typeof;switch(W){case r:switch(X=X.type,X){case w:case g:case d:case m:case h:case k:return X;default:switch(X=X&&X.$$typeof,X){case D:case R:case U:case Y:case C:return X;default:return W}}case f:return W}}}function ce(X){return ae(X)===g}return it.AsyncMode=w,it.ConcurrentMode=g,it.ContextConsumer=D,it.ContextProvider=C,it.Element=r,it.ForwardRef=R,it.Fragment=d,it.Lazy=U,it.Memo=Y,it.Portal=f,it.Profiler=m,it.StrictMode=h,it.Suspense=k,it.isAsyncMode=function(X){return ce(X)||ae(X)===w},it.isConcurrentMode=ce,it.isContextConsumer=function(X){return ae(X)===D},it.isContextProvider=function(X){return ae(X)===C},it.isElement=function(X){return typeof X=="object"&&X!==null&&X.$$typeof===r},it.isForwardRef=function(X){return ae(X)===R},it.isFragment=function(X){return ae(X)===d},it.isLazy=function(X){return ae(X)===U},it.isMemo=function(X){return ae(X)===Y},it.isPortal=function(X){return ae(X)===f},it.isProfiler=function(X){return ae(X)===m},it.isStrictMode=function(X){return ae(X)===h},it.isSuspense=function(X){return ae(X)===k},it.isValidElementType=function(X){return typeof X=="string"||typeof X=="function"||X===d||X===g||X===m||X===h||X===k||X===B||typeof X=="object"&&X!==null&&(X.$$typeof===U||X.$$typeof===Y||X.$$typeof===C||X.$$typeof===D||X.$$typeof===R||X.$$typeof===ie||X.$$typeof===V||X.$$typeof===oe||X.$$typeof===G)},it.typeOf=ae,it}var cp;function Lg(){return cp||(cp=1,Jc.exports=Og()),Jc.exports}var $c,up;function Ug(){if(up)return $c;up=1;var o=Lg(),r={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},f={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},d={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},h={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},m={};m[o.ForwardRef]=d,m[o.Memo]=h;function C(U){return o.isMemo(U)?h:m[U.$$typeof]||r}var D=Object.defineProperty,w=Object.getOwnPropertyNames,g=Object.getOwnPropertySymbols,R=Object.getOwnPropertyDescriptor,k=Object.getPrototypeOf,B=Object.prototype;function Y(U,G,ie){if(typeof G!="string"){if(B){var V=k(G);V&&V!==B&&Y(U,V,ie)}var oe=w(G);g&&(oe=oe.concat(g(G)));for(var ae=C(U),ce=C(G),X=0;X<oe.length;++X){var W=oe[X];if(!f[W]&&!(ie&&ie[W])&&!(ce&&ce[W])&&!(ae&&ae[W])){var $=R(G,W);try{D(U,W,$)}catch{}}}}return U}return $c=Y,$c}Ug();var Hg=!0;function Bg(o,r,f){var d="";return f.split(" ").forEach(function(h){o[h]!==void 0?r.push(o[h]+";"):h&&(d+=h+" ")}),d}var Op=function(r,f,d){var h=r.key+"-"+f.name;(d===!1||Hg===!1)&&r.registered[h]===void 0&&(r.registered[h]=f.styles)},Ng=function(r,f,d){Op(r,f,d);var h=r.key+"-"+f.name;if(r.inserted[f.name]===void 0){var m=f;do r.insert(f===m?"."+h:"",m,r.sheet,!0),m=m.next;while(m!==void 0)}};function jg(o){for(var r=0,f,d=0,h=o.length;h>=4;++d,h-=4)f=o.charCodeAt(d)&255|(o.charCodeAt(++d)&255)<<8|(o.charCodeAt(++d)&255)<<16|(o.charCodeAt(++d)&255)<<24,f=(f&65535)*1540483477+((f>>>16)*59797<<16),f^=f>>>24,r=(f&65535)*1540483477+((f>>>16)*59797<<16)^(r&65535)*1540483477+((r>>>16)*59797<<16);switch(h){case 3:r^=(o.charCodeAt(d+2)&255)<<16;case 2:r^=(o.charCodeAt(d+1)&255)<<8;case 1:r^=o.charCodeAt(d)&255,r=(r&65535)*1540483477+((r>>>16)*59797<<16)}return r^=r>>>13,r=(r&65535)*1540483477+((r>>>16)*59797<<16),((r^r>>>15)>>>0).toString(36)}var qg={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Yg=/[A-Z]|^ms/g,Gg=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Lp=function(r){return r.charCodeAt(1)===45},dp=function(r){return r!=null&&typeof r!="boolean"},Wc=zg(function(o){return Lp(o)?o:o.replace(Yg,"-$&").toLowerCase()}),fp=function(r,f){switch(r){case"animation":case"animationName":if(typeof f=="string")return f.replace(Gg,function(d,h,m){return Kn={name:h,styles:m,next:Kn},h})}return qg[r]!==1&&!Lp(r)&&typeof f=="number"&&f!==0?f+"px":f};function lo(o,r,f){if(f==null)return"";var d=f;if(d.__emotion_styles!==void 0)return d;switch(typeof f){case"boolean":return"";case"object":{var h=f;if(h.anim===1)return Kn={name:h.name,styles:h.styles,next:Kn},h.name;var m=f;if(m.styles!==void 0){var C=m.next;if(C!==void 0)for(;C!==void 0;)Kn={name:C.name,styles:C.styles,next:Kn},C=C.next;var D=m.styles+";";return D}return Xg(o,r,f)}case"function":{if(o!==void 0){var w=Kn,g=f(o);return Kn=w,lo(o,r,g)}break}}var R=f;return R}function Xg(o,r,f){var d="";if(Array.isArray(f))for(var h=0;h<f.length;h++)d+=lo(o,r,f[h])+";";else for(var m in f){var C=f[m];if(typeof C!="object"){var D=C;dp(D)&&(d+=Wc(m)+":"+fp(m,D)+";")}else if(Array.isArray(C)&&typeof C[0]=="string"&&r==null)for(var w=0;w<C.length;w++)dp(C[w])&&(d+=Wc(m)+":"+fp(m,C[w])+";");else{var g=lo(o,r,C);switch(m){case"animation":case"animationName":{d+=Wc(m)+":"+g+";";break}default:d+=m+"{"+g+"}"}}}return d}var hp=/label:\s*([^\s;{]+)\s*(;|$)/g,Kn;function Up(o,r,f){if(o.length===1&&typeof o[0]=="object"&&o[0]!==null&&o[0].styles!==void 0)return o[0];var d=!0,h="";Kn=void 0;var m=o[0];if(m==null||m.raw===void 0)d=!1,h+=lo(f,r,m);else{var C=m;h+=C[0]}for(var D=1;D<o.length;D++)if(h+=lo(f,r,o[D]),d){var w=m;h+=w[D]}hp.lastIndex=0;for(var g="",R;(R=hp.exec(h))!==null;)g+="-"+R[1];var k=jg(h)+g;return{name:k,styles:h,next:Kn}}var Vg=function(r){return r()},Qg=lp.useInsertionEffect?lp.useInsertionEffect:!1,Kg=Qg||Vg,Hp=S.createContext(typeof HTMLElement<"u"?_g({key:"css"}):null);Hp.Provider;var Zg=function(r){return S.forwardRef(function(f,d){var h=S.useContext(Hp);return r(f,h,d)})},Fg=S.createContext({}),oo={}.hasOwnProperty,ou="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",du=function(r,f){var d={};for(var h in f)oo.call(f,h)&&(d[h]=f[h]);return d[ou]=r,d},Jg=function(r){var f=r.cache,d=r.serialized,h=r.isStringTag;return Op(f,d,h),Kg(function(){return Ng(f,d,h)}),null},$g=Zg(function(o,r,f){var d=o.css;typeof d=="string"&&r.registered[d]!==void 0&&(d=r.registered[d]);var h=o[ou],m=[d],C="";typeof o.className=="string"?C=Bg(r.registered,m,o.className):o.className!=null&&(C=o.className+" ");var D=Up(m,void 0,S.useContext(Fg));C+=r.key+"-"+D.name;var w={};for(var g in o)oo.call(o,g)&&g!=="css"&&g!==ou&&(w[g]=o[g]);return w.className=C,f&&(w.ref=f),S.createElement(S.Fragment,null,S.createElement(Jg,{cache:r,serialized:D,isStringTag:typeof h=="string"}),S.createElement(h,w))}),fu=$g,at=to.Fragment,s=function(r,f,d){return oo.call(f,"css")?to.jsx(fu,du(r,f),d):to.jsx(r,f,d)},b=function(r,f,d){return oo.call(f,"css")?to.jsxs(fu,du(r,f),d):to.jsxs(r,f,d)},Ic={exports:{}},Ii={},Pc={exports:{}},eu={};var pp;function Wg(){return pp||(pp=1,(function(o){function r(E,J){var F=E.length;E.push(J);e:for(;0<F;){var De=F-1>>>1,Ye=E[De];if(0<h(Ye,J))E[De]=J,E[F]=Ye,F=De;else break e}}function f(E){return E.length===0?null:E[0]}function d(E){if(E.length===0)return null;var J=E[0],F=E.pop();if(F!==J){E[0]=F;e:for(var De=0,Ye=E.length,v=Ye>>>1;De<v;){var L=2*(De+1)-1,I=E[L],le=L+1,Ce=E[le];if(0>h(I,F))le<Ye&&0>h(Ce,I)?(E[De]=Ce,E[le]=F,De=le):(E[De]=I,E[L]=F,De=L);else if(le<Ye&&0>h(Ce,F))E[De]=Ce,E[le]=F,De=le;else break e}}return J}function h(E,J){var F=E.sortIndex-J.sortIndex;return F!==0?F:E.id-J.id}if(o.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var m=performance;o.unstable_now=function(){return m.now()}}else{var C=Date,D=C.now();o.unstable_now=function(){return C.now()-D}}var w=[],g=[],R=1,k=null,B=3,Y=!1,U=!1,G=!1,ie=!1,V=typeof setTimeout=="function"?setTimeout:null,oe=typeof clearTimeout=="function"?clearTimeout:null,ae=typeof setImmediate<"u"?setImmediate:null;function ce(E){for(var J=f(g);J!==null;){if(J.callback===null)d(g);else if(J.startTime<=E)d(g),J.sortIndex=J.expirationTime,r(w,J);else break;J=f(g)}}function X(E){if(G=!1,ce(E),!U)if(f(w)!==null)U=!0,W||(W=!0,he());else{var J=f(g);J!==null&&Ue(X,J.startTime-E)}}var W=!1,$=-1,P=5,N=-1;function Q(){return ie?!0:!(o.unstable_now()-N<P)}function ue(){if(ie=!1,W){var E=o.unstable_now();N=E;var J=!0;try{e:{U=!1,G&&(G=!1,oe($),$=-1),Y=!0;var F=B;try{t:{for(ce(E),k=f(w);k!==null&&!(k.expirationTime>E&&Q());){var De=k.callback;if(typeof De=="function"){k.callback=null,B=k.priorityLevel;var Ye=De(k.expirationTime<=E);if(E=o.unstable_now(),typeof Ye=="function"){k.callback=Ye,ce(E),J=!0;break t}k===f(w)&&d(w),ce(E)}else d(w);k=f(w)}if(k!==null)J=!0;else{var v=f(g);v!==null&&Ue(X,v.startTime-E),J=!1}}break e}finally{k=null,B=F,Y=!1}J=void 0}}finally{J?he():W=!1}}}var he;if(typeof ae=="function")he=function(){ae(ue)};else if(typeof MessageChannel<"u"){var pe=new MessageChannel,te=pe.port2;pe.port1.onmessage=ue,he=function(){te.postMessage(null)}}else he=function(){V(ue,0)};function Ue(E,J){$=V(function(){E(o.unstable_now())},J)}o.unstable_IdlePriority=5,o.unstable_ImmediatePriority=1,o.unstable_LowPriority=4,o.unstable_NormalPriority=3,o.unstable_Profiling=null,o.unstable_UserBlockingPriority=2,o.unstable_cancelCallback=function(E){E.callback=null},o.unstable_forceFrameRate=function(E){0>E||125<E?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<E?Math.floor(1e3/E):5},o.unstable_getCurrentPriorityLevel=function(){return B},o.unstable_next=function(E){switch(B){case 1:case 2:case 3:var J=3;break;default:J=B}var F=B;B=J;try{return E()}finally{B=F}},o.unstable_requestPaint=function(){ie=!0},o.unstable_runWithPriority=function(E,J){switch(E){case 1:case 2:case 3:case 4:case 5:break;default:E=3}var F=B;B=E;try{return J()}finally{B=F}},o.unstable_scheduleCallback=function(E,J,F){var De=o.unstable_now();switch(typeof F=="object"&&F!==null?(F=F.delay,F=typeof F=="number"&&0<F?De+F:De):F=De,E){case 1:var Ye=-1;break;case 2:Ye=250;break;case 5:Ye=1073741823;break;case 4:Ye=1e4;break;default:Ye=5e3}return Ye=F+Ye,E={id:R++,callback:J,priorityLevel:E,startTime:F,expirationTime:Ye,sortIndex:-1},F>De?(E.sortIndex=F,r(g,E),f(w)===null&&E===f(g)&&(G?(oe($),$=-1):G=!0,Ue(X,F-De))):(E.sortIndex=Ye,r(w,E),U||Y||(U=!0,W||(W=!0,he()))),E},o.unstable_shouldYield=Q,o.unstable_wrapCallback=function(E){var J=B;return function(){var F=B;B=J;try{return E.apply(this,arguments)}finally{B=F}}}})(eu)),eu}var mp;function Ig(){return mp||(mp=1,Pc.exports=Wg()),Pc.exports}var tu={exports:{}},en={};var gp;function Pg(){if(gp)return en;gp=1;var o=ru();function r(w){var g="https://react.dev/errors/"+w;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var R=2;R<arguments.length;R++)g+="&args[]="+encodeURIComponent(arguments[R])}return"Minified React error #"+w+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function f(){}var d={d:{f,r:function(){throw Error(r(522))},D:f,C:f,L:f,m:f,X:f,S:f,M:f},p:0,findDOMNode:null},h=Symbol.for("react.portal");function m(w,g,R){var k=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:h,key:k==null?null:""+k,children:w,containerInfo:g,implementation:R}}var C=o.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function D(w,g){if(w==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return en.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=d,en.createPortal=function(w,g){var R=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(r(299));return m(w,g,null,R)},en.flushSync=function(w){var g=C.T,R=d.p;try{if(C.T=null,d.p=2,w)return w()}finally{C.T=g,d.p=R,d.d.f()}},en.preconnect=function(w,g){typeof w=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,d.d.C(w,g))},en.prefetchDNS=function(w){typeof w=="string"&&d.d.D(w)},en.preinit=function(w,g){if(typeof w=="string"&&g&&typeof g.as=="string"){var R=g.as,k=D(R,g.crossOrigin),B=typeof g.integrity=="string"?g.integrity:void 0,Y=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;R==="style"?d.d.S(w,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:k,integrity:B,fetchPriority:Y}):R==="script"&&d.d.X(w,{crossOrigin:k,integrity:B,fetchPriority:Y,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},en.preinitModule=function(w,g){if(typeof w=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var R=D(g.as,g.crossOrigin);d.d.M(w,{crossOrigin:R,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&d.d.M(w)},en.preload=function(w,g){if(typeof w=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var R=g.as,k=D(R,g.crossOrigin);d.d.L(w,R,{crossOrigin:k,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},en.preloadModule=function(w,g){if(typeof w=="string")if(g){var R=D(g.as,g.crossOrigin);d.d.m(w,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:R,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else d.d.m(w)},en.requestFormReset=function(w){d.d.r(w)},en.unstable_batchedUpdates=function(w,g){return w(g)},en.useFormState=function(w,g,R){return C.H.useFormState(w,g,R)},en.useFormStatus=function(){return C.H.useHostTransitionStatus()},en.version="19.2.4",en}var yp;function e1(){if(yp)return tu.exports;yp=1;function o(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(o)}catch(r){console.error(r)}}return o(),tu.exports=Pg(),tu.exports}var bp;function t1(){if(bp)return Ii;bp=1;var o=Ig(),r=ru(),f=e1();function d(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function h(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function m(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function C(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function D(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function w(e){if(m(e)!==e)throw Error(d(188))}function g(e){var t=e.alternate;if(!t){if(t=m(e),t===null)throw Error(d(188));return t!==e?null:e}for(var n=e,a=t;;){var l=n.return;if(l===null)break;var i=l.alternate;if(i===null){if(a=l.return,a!==null){n=a;continue}break}if(l.child===i.child){for(i=l.child;i;){if(i===n)return w(l),e;if(i===a)return w(l),t;i=i.sibling}throw Error(d(188))}if(n.return!==a.return)n=l,a=i;else{for(var c=!1,p=l.child;p;){if(p===n){c=!0,n=l,a=i;break}if(p===a){c=!0,a=l,n=i;break}p=p.sibling}if(!c){for(p=i.child;p;){if(p===n){c=!0,n=i,a=l;break}if(p===a){c=!0,a=i,n=l;break}p=p.sibling}if(!c)throw Error(d(189))}}if(n.alternate!==a)throw Error(d(190))}if(n.tag!==3)throw Error(d(188));return n.stateNode.current===n?e:t}function R(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=R(e),t!==null)return t;e=e.sibling}return null}var k=Object.assign,B=Symbol.for("react.element"),Y=Symbol.for("react.transitional.element"),U=Symbol.for("react.portal"),G=Symbol.for("react.fragment"),ie=Symbol.for("react.strict_mode"),V=Symbol.for("react.profiler"),oe=Symbol.for("react.consumer"),ae=Symbol.for("react.context"),ce=Symbol.for("react.forward_ref"),X=Symbol.for("react.suspense"),W=Symbol.for("react.suspense_list"),$=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),N=Symbol.for("react.activity"),Q=Symbol.for("react.memo_cache_sentinel"),ue=Symbol.iterator;function he(e){return e===null||typeof e!="object"?null:(e=ue&&e[ue]||e["@@iterator"],typeof e=="function"?e:null)}var pe=Symbol.for("react.client.reference");function te(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===pe?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case G:return"Fragment";case V:return"Profiler";case ie:return"StrictMode";case X:return"Suspense";case W:return"SuspenseList";case N:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case U:return"Portal";case ae:return e.displayName||"Context";case oe:return(e._context.displayName||"Context")+".Consumer";case ce:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case $:return t=e.displayName||null,t!==null?t:te(e.type)||"Memo";case P:t=e._payload,e=e._init;try{return te(e(t))}catch{}}return null}var Ue=Array.isArray,E=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J=f.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F={pending:!1,data:null,method:null,action:null},De=[],Ye=-1;function v(e){return{current:e}}function L(e){0>Ye||(e.current=De[Ye],De[Ye]=null,Ye--)}function I(e,t){Ye++,De[Ye]=e.current,e.current=t}var le=v(null),Ce=v(null),Ee=v(null),je=v(null);function vt(e,t){switch(I(Ee,t),I(Ce,e),I(le,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?wh(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=wh(t),e=zh(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}L(le),I(le,e)}function Le(){L(le),L(Ce),L(Ee)}function nn(e){e.memoizedState!==null&&I(je,e);var t=le.current,n=zh(t,e.type);t!==n&&(I(Ce,e),I(le,n))}function Je(e){Ce.current===e&&(L(le),L(Ce)),je.current===e&&(L(je),Ki._currentValue=F)}var ut,dt;function jt(e){if(ut===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);ut=t&&t[1]||"",dt=-1<n.stack.indexOf(`
2
+ at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
3
+ `+ut+e+dt}var qt=!1;function an(e,t){if(!e||qt)return"";qt=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var q=function(){throw Error()};if(Object.defineProperty(q.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(q,[])}catch(O){var _=O}Reflect.construct(e,[],q)}else{try{q.call()}catch(O){_=O}e.call(q.prototype)}}else{try{throw Error()}catch(O){_=O}(q=e())&&typeof q.catch=="function"&&q.catch(function(){})}}catch(O){if(O&&_&&typeof O.stack=="string")return[O.stack,_.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var l=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");l&&l.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=a.DetermineComponentFrameRoot(),c=i[0],p=i[1];if(c&&p){var x=c.split(`
4
+ `),T=p.split(`
5
+ `);for(l=a=0;a<x.length&&!x[a].includes("DetermineComponentFrameRoot");)a++;for(;l<T.length&&!T[l].includes("DetermineComponentFrameRoot");)l++;if(a===x.length||l===T.length)for(a=x.length-1,l=T.length-1;1<=a&&0<=l&&x[a]!==T[l];)l--;for(;1<=a&&0<=l;a--,l--)if(x[a]!==T[l]){if(a!==1||l!==1)do if(a--,l--,0>l||x[a]!==T[l]){var H=`
6
+ `+x[a].replace(" at new "," at ");return e.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",e.displayName)),H}while(1<=a&&0<=l);break}}}finally{qt=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?jt(n):""}function Vt(e,t){switch(e.tag){case 26:case 27:case 5:return jt(e.type);case 16:return jt("Lazy");case 13:return e.child!==t&&t!==null?jt("Suspense Fallback"):jt("Suspense");case 19:return jt("SuspenseList");case 0:case 15:return an(e.type,!1);case 11:return an(e.type.render,!1);case 1:return an(e.type,!0);case 31:return jt("Activity");default:return""}}function mn(e){try{var t="",n=null;do t+=Vt(e,n),n=e,e=e.return;while(e);return t}catch(a){return`
7
+ Error generating stack: `+a.message+`
8
+ `+a.stack}}var Se=Object.prototype.hasOwnProperty,lt=o.unstable_scheduleCallback,Qt=o.unstable_cancelCallback,xt=o.unstable_shouldYield,ma=o.unstable_requestPaint,de=o.unstable_now,rt=o.unstable_getCurrentPriorityLevel,Gt=o.unstable_ImmediatePriority,Kt=o.unstable_UserBlockingPriority,Pt=o.unstable_NormalPriority,Ae=o.unstable_LowPriority,we=o.unstable_IdlePriority,Xe=o.log,mt=o.unstable_setDisableYieldValue,Ne=null,Me=null;function kt(e){if(typeof Xe=="function"&&mt(e),Me&&typeof Me.setStrictMode=="function")try{Me.setStrictMode(Ne,e)}catch{}}var Tt=Math.clz32?Math.clz32:Br,Ur=Math.log,Hr=Math.LN2;function Br(e){return e>>>=0,e===0?32:31-(Ur(e)/Hr|0)|0}var fl=256,hl=262144,Va=4194304;function Fn(e){var t=e&42;if(t!==0)return t;switch(e&-e){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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function pl(e,t,n){var a=e.pendingLanes;if(a===0)return 0;var l=0,i=e.suspendedLanes,c=e.pingedLanes;e=e.warmLanes;var p=a&134217727;return p!==0?(a=p&~i,a!==0?l=Fn(a):(c&=p,c!==0?l=Fn(c):n||(n=p&~e,n!==0&&(l=Fn(n))))):(p=a&~i,p!==0?l=Fn(p):c!==0?l=Fn(c):n||(n=a&~e,n!==0&&(l=Fn(n)))),l===0?0:t!==0&&t!==l&&(t&i)===0&&(i=l&-l,n=t&-t,i>=n||i===32&&(n&4194048)!==0)?t:l}function Qa(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Nr(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32: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 t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function so(){var e=Va;return Va<<=1,(Va&62914560)===0&&(Va=4194304),e}function ai(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ka(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function jr(e,t,n,a,l,i){var c=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var p=e.entanglements,x=e.expirationTimes,T=e.hiddenUpdates;for(n=c&~n;0<n;){var H=31-Tt(n),q=1<<H;p[H]=0,x[H]=-1;var _=T[H];if(_!==null)for(T[H]=null,H=0;H<_.length;H++){var O=_[H];O!==null&&(O.lane&=-536870913)}n&=~q}a!==0&&co(e,a,0),i!==0&&l===0&&e.tag!==0&&(e.suspendedLanes|=i&~(c&~t))}function co(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-Tt(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|n&261930}function uo(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var a=31-Tt(n),l=1<<a;l&t|e[a]&t&&(e[a]|=t),n&=~l}}function li(e,t){var n=t&-t;return n=(n&42)!==0?1:Jn(n),(n&(e.suspendedLanes|t))!==0?0:n}function Jn(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;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:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function ii(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function fo(){var e=J.p;return e!==0?e:(e=window.event,e===void 0?32:Zh(e.type))}function Un(e,t){var n=J.p;try{return J.p=e,t()}finally{J.p=n}}var qn=Math.random().toString(36).slice(2),wt="__reactFiber$"+qn,Rt="__reactProps$"+qn,gn="__reactContainer$"+qn,ml="__reactEvents$"+qn,ga="__reactListeners$"+qn,ya="__reactHandles$"+qn,oi="__reactResources$"+qn,Za="__reactMarker$"+qn;function ri(e){delete e[wt],delete e[Rt],delete e[ml],delete e[ga],delete e[ya]}function $n(e){var t=e[wt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[gn]||n[wt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Rh(e);e!==null;){if(n=e[wt])return n;e=Rh(e)}return t}e=n,n=e.parentNode}return null}function se(e){if(e=e[wt]||e[gn]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ee(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(d(33))}function me(e){var t=e[oi];return t||(t=e[oi]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function ge(e){e[Za]=!0}var Te=new Set,_e={};function $e(e,t){We(e,t),We(e+"Capture",t)}function We(e,t){for(_e[e]=t,e=0;e<t.length;e++)Te.add(t[e])}var Oe=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),ln={},si={};function Vp(e){return Se.call(si,e)?!0:Se.call(ln,e)?!1:Oe.test(e)?si[e]=!0:(ln[e]=!0,!1)}function ho(e,t,n){if(Vp(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function po(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function Wn(e,t,n,a){if(a===null)e.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+a)}}function Mn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function pu(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Qp(e,t,n){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var l=a.get,i=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(c){n=""+c,i.call(this,c)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return n},setValue:function(c){n=""+c},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function qr(e){if(!e._valueTracker){var t=pu(e)?"checked":"value";e._valueTracker=Qp(e,t,""+e[t])}}function mu(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),a="";return e&&(a=pu(e)?e.checked?"true":"false":e.value),e=a,e!==n?(t.setValue(e),!0):!1}function mo(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Kp=/[\n"\\]/g;function kn(e){return e.replace(Kp,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Yr(e,t,n,a,l,i,c,p){e.name="",c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"?e.type=c:e.removeAttribute("type"),t!=null?c==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Mn(t)):e.value!==""+Mn(t)&&(e.value=""+Mn(t)):c!=="submit"&&c!=="reset"||e.removeAttribute("value"),t!=null?Gr(e,c,Mn(t)):n!=null?Gr(e,c,Mn(n)):a!=null&&e.removeAttribute("value"),l==null&&i!=null&&(e.defaultChecked=!!i),l!=null&&(e.checked=l&&typeof l!="function"&&typeof l!="symbol"),p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"?e.name=""+Mn(p):e.removeAttribute("name")}function gu(e,t,n,a,l,i,c,p){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||n!=null){if(!(i!=="submit"&&i!=="reset"||t!=null)){qr(e);return}n=n!=null?""+Mn(n):"",t=t!=null?""+Mn(t):n,p||t===e.value||(e.value=t),e.defaultValue=t}a=a??l,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=p?e.checked:!!a,e.defaultChecked=!!a,c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.name=c),qr(e)}function Gr(e,t,n){t==="number"&&mo(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function gl(e,t,n,a){if(e=e.options,t){t={};for(var l=0;l<n.length;l++)t["$"+n[l]]=!0;for(n=0;n<e.length;n++)l=t.hasOwnProperty("$"+e[n].value),e[n].selected!==l&&(e[n].selected=l),l&&a&&(e[n].defaultSelected=!0)}else{for(n=""+Mn(n),t=null,l=0;l<e.length;l++){if(e[l].value===n){e[l].selected=!0,a&&(e[l].defaultSelected=!0);return}t!==null||e[l].disabled||(t=e[l])}t!==null&&(t.selected=!0)}}function yu(e,t,n){if(t!=null&&(t=""+Mn(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Mn(n):""}function bu(e,t,n,a){if(t==null){if(a!=null){if(n!=null)throw Error(d(92));if(Ue(a)){if(1<a.length)throw Error(d(93));a=a[0]}n=a}n==null&&(n=""),t=n}n=Mn(t),e.defaultValue=n,a=e.textContent,a===n&&a!==""&&a!==null&&(e.value=a),qr(e)}function yl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Zp=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function vu(e,t,n){var a=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,n):typeof n!="number"||n===0||Zp.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function xu(e,t,n){if(t!=null&&typeof t!="object")throw Error(d(62));if(e=e.style,n!=null){for(var a in n)!n.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var l in t)a=t[l],t.hasOwnProperty(l)&&n[l]!==a&&vu(e,l,a)}else for(var i in t)t.hasOwnProperty(i)&&vu(e,i,t[i])}function Xr(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Fp=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Jp=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function go(e){return Jp.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function In(){}var Vr=null;function Qr(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var bl=null,vl=null;function Su(e){var t=se(e);if(t&&(e=t.stateNode)){var n=e[Rt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Yr(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+kn(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var a=n[t];if(a!==e&&a.form===e.form){var l=a[Rt]||null;if(!l)throw Error(d(90));Yr(a,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name)}}for(t=0;t<n.length;t++)a=n[t],a.form===e.form&&mu(a)}break e;case"textarea":yu(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&gl(e,!!n.multiple,t,!1)}}}var Kr=!1;function Cu(e,t,n){if(Kr)return e(t,n);Kr=!0;try{var a=e(t);return a}finally{if(Kr=!1,(bl!==null||vl!==null)&&(ar(),bl&&(t=bl,e=vl,vl=bl=null,Su(t),e)))for(t=0;t<e.length;t++)Su(e[t])}}function ci(e,t){var n=e.stateNode;if(n===null)return null;var a=n[Rt]||null;if(a===null)return null;n=a[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(d(231,t,typeof n));return n}var Pn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Zr=!1;if(Pn)try{var ui={};Object.defineProperty(ui,"passive",{get:function(){Zr=!0}}),window.addEventListener("test",ui,ui),window.removeEventListener("test",ui,ui)}catch{Zr=!1}var ba=null,Fr=null,yo=null;function wu(){if(yo)return yo;var e,t=Fr,n=t.length,a,l="value"in ba?ba.value:ba.textContent,i=l.length;for(e=0;e<n&&t[e]===l[e];e++);var c=n-e;for(a=1;a<=c&&t[n-a]===l[i-a];a++);return yo=l.slice(e,1<a?1-a:void 0)}function bo(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function vo(){return!0}function zu(){return!1}function rn(e){function t(n,a,l,i,c){this._reactName=n,this._targetInst=l,this.type=a,this.nativeEvent=i,this.target=c,this.currentTarget=null;for(var p in e)e.hasOwnProperty(p)&&(n=e[p],this[p]=n?n(i):i[p]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?vo:zu,this.isPropagationStopped=zu,this}return k(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=vo)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=vo)},persist:function(){},isPersistent:vo}),t}var Fa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},xo=rn(Fa),di=k({},Fa,{view:0,detail:0}),$p=rn(di),Jr,$r,fi,So=k({},di,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ir,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==fi&&(fi&&e.type==="mousemove"?(Jr=e.screenX-fi.screenX,$r=e.screenY-fi.screenY):$r=Jr=0,fi=e),Jr)},movementY:function(e){return"movementY"in e?e.movementY:$r}}),Mu=rn(So),Wp=k({},So,{dataTransfer:0}),Ip=rn(Wp),Pp=k({},di,{relatedTarget:0}),Wr=rn(Pp),e0=k({},Fa,{animationName:0,elapsedTime:0,pseudoElement:0}),t0=rn(e0),n0=k({},Fa,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),a0=rn(n0),l0=k({},Fa,{data:0}),ku=rn(l0),i0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},o0={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},r0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function s0(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=r0[e])?!!t[e]:!1}function Ir(){return s0}var c0=k({},di,{key:function(e){if(e.key){var t=i0[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=bo(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?o0[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ir,charCode:function(e){return e.type==="keypress"?bo(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?bo(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),u0=rn(c0),d0=k({},So,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Du=rn(d0),f0=k({},di,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ir}),h0=rn(f0),p0=k({},Fa,{propertyName:0,elapsedTime:0,pseudoElement:0}),m0=rn(p0),g0=k({},So,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),y0=rn(g0),b0=k({},Fa,{newState:0,oldState:0}),v0=rn(b0),x0=[9,13,27,32],Pr=Pn&&"CompositionEvent"in window,hi=null;Pn&&"documentMode"in document&&(hi=document.documentMode);var S0=Pn&&"TextEvent"in window&&!hi,Eu=Pn&&(!Pr||hi&&8<hi&&11>=hi),Au=" ",Tu=!1;function Ru(e,t){switch(e){case"keyup":return x0.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function _u(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var xl=!1;function C0(e,t){switch(e){case"compositionend":return _u(t);case"keypress":return t.which!==32?null:(Tu=!0,Au);case"textInput":return e=t.data,e===Au&&Tu?null:e;default:return null}}function w0(e,t){if(xl)return e==="compositionend"||!Pr&&Ru(e,t)?(e=wu(),yo=Fr=ba=null,xl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Eu&&t.locale!=="ko"?null:t.data;default:return null}}var z0={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Ou(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!z0[e.type]:t==="textarea"}function Lu(e,t,n,a){bl?vl?vl.push(a):vl=[a]:bl=a,t=ur(t,"onChange"),0<t.length&&(n=new xo("onChange","change",null,n,a),e.push({event:n,listeners:t}))}var pi=null,mi=null;function M0(e){yh(e,0)}function Co(e){var t=ee(e);if(mu(t))return e}function Uu(e,t){if(e==="change")return t}var Hu=!1;if(Pn){var es;if(Pn){var ts="oninput"in document;if(!ts){var Bu=document.createElement("div");Bu.setAttribute("oninput","return;"),ts=typeof Bu.oninput=="function"}es=ts}else es=!1;Hu=es&&(!document.documentMode||9<document.documentMode)}function Nu(){pi&&(pi.detachEvent("onpropertychange",ju),mi=pi=null)}function ju(e){if(e.propertyName==="value"&&Co(mi)){var t=[];Lu(t,mi,e,Qr(e)),Cu(M0,t)}}function k0(e,t,n){e==="focusin"?(Nu(),pi=t,mi=n,pi.attachEvent("onpropertychange",ju)):e==="focusout"&&Nu()}function D0(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Co(mi)}function E0(e,t){if(e==="click")return Co(t)}function A0(e,t){if(e==="input"||e==="change")return Co(t)}function T0(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var yn=typeof Object.is=="function"?Object.is:T0;function gi(e,t){if(yn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;for(a=0;a<n.length;a++){var l=n[a];if(!Se.call(t,l)||!yn(e[l],t[l]))return!1}return!0}function qu(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Yu(e,t){var n=qu(e);e=0;for(var a;n;){if(n.nodeType===3){if(a=e+n.textContent.length,e<=t&&a>=t)return{node:n,offset:t-e};e=a}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=qu(n)}}function Gu(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Gu(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Xu(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=mo(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=mo(e.document)}return t}function ns(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var R0=Pn&&"documentMode"in document&&11>=document.documentMode,Sl=null,as=null,yi=null,ls=!1;function Vu(e,t,n){var a=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ls||Sl==null||Sl!==mo(a)||(a=Sl,"selectionStart"in a&&ns(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),yi&&gi(yi,a)||(yi=a,a=ur(as,"onSelect"),0<a.length&&(t=new xo("onSelect","select",null,t,n),e.push({event:t,listeners:a}),t.target=Sl)))}function Ja(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Cl={animationend:Ja("Animation","AnimationEnd"),animationiteration:Ja("Animation","AnimationIteration"),animationstart:Ja("Animation","AnimationStart"),transitionrun:Ja("Transition","TransitionRun"),transitionstart:Ja("Transition","TransitionStart"),transitioncancel:Ja("Transition","TransitionCancel"),transitionend:Ja("Transition","TransitionEnd")},is={},Qu={};Pn&&(Qu=document.createElement("div").style,"AnimationEvent"in window||(delete Cl.animationend.animation,delete Cl.animationiteration.animation,delete Cl.animationstart.animation),"TransitionEvent"in window||delete Cl.transitionend.transition);function $a(e){if(is[e])return is[e];if(!Cl[e])return e;var t=Cl[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Qu)return is[e]=t[n];return e}var Ku=$a("animationend"),Zu=$a("animationiteration"),Fu=$a("animationstart"),_0=$a("transitionrun"),O0=$a("transitionstart"),L0=$a("transitioncancel"),Ju=$a("transitionend"),$u=new Map,os="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");os.push("scrollEnd");function Hn(e,t){$u.set(e,t),$e(t,[e])}var wo=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Dn=[],wl=0,rs=0;function zo(){for(var e=wl,t=rs=wl=0;t<e;){var n=Dn[t];Dn[t++]=null;var a=Dn[t];Dn[t++]=null;var l=Dn[t];Dn[t++]=null;var i=Dn[t];if(Dn[t++]=null,a!==null&&l!==null){var c=a.pending;c===null?l.next=l:(l.next=c.next,c.next=l),a.pending=l}i!==0&&Wu(n,l,i)}}function Mo(e,t,n,a){Dn[wl++]=e,Dn[wl++]=t,Dn[wl++]=n,Dn[wl++]=a,rs|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function ss(e,t,n,a){return Mo(e,t,n,a),ko(e)}function Wa(e,t){return Mo(e,null,null,t),ko(e)}function Wu(e,t,n){e.lanes|=n;var a=e.alternate;a!==null&&(a.lanes|=n);for(var l=!1,i=e.return;i!==null;)i.childLanes|=n,a=i.alternate,a!==null&&(a.childLanes|=n),i.tag===22&&(e=i.stateNode,e===null||e._visibility&1||(l=!0)),e=i,i=i.return;return e.tag===3?(i=e.stateNode,l&&t!==null&&(l=31-Tt(n),e=i.hiddenUpdates,a=e[l],a===null?e[l]=[t]:a.push(t),t.lane=n|536870912),i):null}function ko(e){if(50<ji)throw ji=0,yc=null,Error(d(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var zl={};function U0(e,t,n,a){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function bn(e,t,n,a){return new U0(e,t,n,a)}function cs(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ea(e,t){var n=e.alternate;return n===null?(n=bn(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Iu(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Do(e,t,n,a,l,i){var c=0;if(a=e,typeof e=="function")cs(e)&&(c=1);else if(typeof e=="string")c=qm(e,n,le.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case N:return e=bn(31,n,t,l),e.elementType=N,e.lanes=i,e;case G:return Ia(n.children,l,i,t);case ie:c=8,l|=24;break;case V:return e=bn(12,n,t,l|2),e.elementType=V,e.lanes=i,e;case X:return e=bn(13,n,t,l),e.elementType=X,e.lanes=i,e;case W:return e=bn(19,n,t,l),e.elementType=W,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ae:c=10;break e;case oe:c=9;break e;case ce:c=11;break e;case $:c=14;break e;case P:c=16,a=null;break e}c=29,n=Error(d(130,e===null?"null":typeof e,"")),a=null}return t=bn(c,n,t,l),t.elementType=e,t.type=a,t.lanes=i,t}function Ia(e,t,n,a){return e=bn(7,e,a,t),e.lanes=n,e}function us(e,t,n){return e=bn(6,e,null,t),e.lanes=n,e}function Pu(e){var t=bn(18,null,null,0);return t.stateNode=e,t}function ds(e,t,n){return t=bn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var ed=new WeakMap;function En(e,t){if(typeof e=="object"&&e!==null){var n=ed.get(e);return n!==void 0?n:(t={value:e,source:t,stack:mn(t)},ed.set(e,t),t)}return{value:e,source:t,stack:mn(t)}}var Ml=[],kl=0,Eo=null,bi=0,An=[],Tn=0,va=null,Yn=1,Gn="";function ta(e,t){Ml[kl++]=bi,Ml[kl++]=Eo,Eo=e,bi=t}function td(e,t,n){An[Tn++]=Yn,An[Tn++]=Gn,An[Tn++]=va,va=e;var a=Yn;e=Gn;var l=32-Tt(a)-1;a&=~(1<<l),n+=1;var i=32-Tt(t)+l;if(30<i){var c=l-l%5;i=(a&(1<<c)-1).toString(32),a>>=c,l-=c,Yn=1<<32-Tt(t)+l|n<<l|a,Gn=i+e}else Yn=1<<i|n<<l|a,Gn=e}function fs(e){e.return!==null&&(ta(e,1),td(e,1,0))}function hs(e){for(;e===Eo;)Eo=Ml[--kl],Ml[kl]=null,bi=Ml[--kl],Ml[kl]=null;for(;e===va;)va=An[--Tn],An[Tn]=null,Gn=An[--Tn],An[Tn]=null,Yn=An[--Tn],An[Tn]=null}function nd(e,t){An[Tn++]=Yn,An[Tn++]=Gn,An[Tn++]=va,Yn=t.id,Gn=t.overflow,va=e}var Zt=null,St=null,Fe=!1,xa=null,Rn=!1,ps=Error(d(519));function Sa(e){var t=Error(d(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw vi(En(t,e)),ps}function ad(e){var t=e.stateNode,n=e.type,a=e.memoizedProps;switch(t[wt]=e,t[Rt]=a,n){case"dialog":Qe("cancel",t),Qe("close",t);break;case"iframe":case"object":case"embed":Qe("load",t);break;case"video":case"audio":for(n=0;n<Yi.length;n++)Qe(Yi[n],t);break;case"source":Qe("error",t);break;case"img":case"image":case"link":Qe("error",t),Qe("load",t);break;case"details":Qe("toggle",t);break;case"input":Qe("invalid",t),gu(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":Qe("invalid",t);break;case"textarea":Qe("invalid",t),bu(t,a.value,a.defaultValue,a.children)}n=a.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||a.suppressHydrationWarning===!0||Sh(t.textContent,n)?(a.popover!=null&&(Qe("beforetoggle",t),Qe("toggle",t)),a.onScroll!=null&&Qe("scroll",t),a.onScrollEnd!=null&&Qe("scrollend",t),a.onClick!=null&&(t.onclick=In),t=!0):t=!1,t||Sa(e,!0)}function ld(e){for(Zt=e.return;Zt;)switch(Zt.tag){case 5:case 31:case 13:Rn=!1;return;case 27:case 3:Rn=!0;return;default:Zt=Zt.return}}function Dl(e){if(e!==Zt)return!1;if(!Fe)return ld(e),Fe=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||_c(e.type,e.memoizedProps)),n=!n),n&&St&&Sa(e),ld(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(d(317));St=Th(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(d(317));St=Th(e)}else t===27?(t=St,Ua(e.type)?(e=Bc,Bc=null,St=e):St=t):St=Zt?On(e.stateNode.nextSibling):null;return!0}function Pa(){St=Zt=null,Fe=!1}function ms(){var e=xa;return e!==null&&(dn===null?dn=e:dn.push.apply(dn,e),xa=null),e}function vi(e){xa===null?xa=[e]:xa.push(e)}var gs=v(null),el=null,na=null;function Ca(e,t,n){I(gs,t._currentValue),t._currentValue=n}function aa(e){e._currentValue=gs.current,L(gs)}function ys(e,t,n){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===n)break;e=e.return}}function bs(e,t,n,a){var l=e.child;for(l!==null&&(l.return=e);l!==null;){var i=l.dependencies;if(i!==null){var c=l.child;i=i.firstContext;e:for(;i!==null;){var p=i;i=l;for(var x=0;x<t.length;x++)if(p.context===t[x]){i.lanes|=n,p=i.alternate,p!==null&&(p.lanes|=n),ys(i.return,n,e),a||(c=null);break e}i=p.next}}else if(l.tag===18){if(c=l.return,c===null)throw Error(d(341));c.lanes|=n,i=c.alternate,i!==null&&(i.lanes|=n),ys(c,n,e),c=null}else c=l.child;if(c!==null)c.return=l;else for(c=l;c!==null;){if(c===e){c=null;break}if(l=c.sibling,l!==null){l.return=c.return,c=l;break}c=c.return}l=c}}function El(e,t,n,a){e=null;for(var l=t,i=!1;l!==null;){if(!i){if((l.flags&524288)!==0)i=!0;else if((l.flags&262144)!==0)break}if(l.tag===10){var c=l.alternate;if(c===null)throw Error(d(387));if(c=c.memoizedProps,c!==null){var p=l.type;yn(l.pendingProps.value,c.value)||(e!==null?e.push(p):e=[p])}}else if(l===je.current){if(c=l.alternate,c===null)throw Error(d(387));c.memoizedState.memoizedState!==l.memoizedState.memoizedState&&(e!==null?e.push(Ki):e=[Ki])}l=l.return}e!==null&&bs(t,e,n,a),t.flags|=262144}function Ao(e){for(e=e.firstContext;e!==null;){if(!yn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function tl(e){el=e,na=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ft(e){return id(el,e)}function To(e,t){return el===null&&tl(e),id(e,t)}function id(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},na===null){if(e===null)throw Error(d(308));na=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else na=na.next=t;return n}var H0=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},B0=o.unstable_scheduleCallback,N0=o.unstable_NormalPriority,Lt={$$typeof:ae,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function vs(){return{controller:new H0,data:new Map,refCount:0}}function xi(e){e.refCount--,e.refCount===0&&B0(N0,function(){e.controller.abort()})}var Si=null,xs=0,Al=0,Tl=null;function j0(e,t){if(Si===null){var n=Si=[];xs=0,Al=wc(),Tl={status:"pending",value:void 0,then:function(a){n.push(a)}}}return xs++,t.then(od,od),t}function od(){if(--xs===0&&Si!==null){Tl!==null&&(Tl.status="fulfilled");var e=Si;Si=null,Al=0,Tl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function q0(e,t){var n=[],a={status:"pending",value:null,reason:null,then:function(l){n.push(l)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var l=0;l<n.length;l++)(0,n[l])(t)},function(l){for(a.status="rejected",a.reason=l,l=0;l<n.length;l++)(0,n[l])(void 0)}),a}var rd=E.S;E.S=function(e,t){Qf=de(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&j0(e,t),rd!==null&&rd(e,t)};var nl=v(null);function Ss(){var e=nl.current;return e!==null?e:gt.pooledCache}function Ro(e,t){t===null?I(nl,nl.current):I(nl,t.pool)}function sd(){var e=Ss();return e===null?null:{parent:Lt._currentValue,pool:e}}var Rl=Error(d(460)),Cs=Error(d(474)),_o=Error(d(542)),Oo={then:function(){}};function cd(e){return e=e.status,e==="fulfilled"||e==="rejected"}function ud(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(In,In),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,fd(e),e;default:if(typeof t.status=="string")t.then(In,In);else{if(e=gt,e!==null&&100<e.shellSuspendCounter)throw Error(d(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var l=t;l.status="fulfilled",l.value=a}},function(a){if(t.status==="pending"){var l=t;l.status="rejected",l.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,fd(e),e}throw ll=t,Rl}}function al(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(ll=n,Rl):n}}var ll=null;function dd(){if(ll===null)throw Error(d(459));var e=ll;return ll=null,e}function fd(e){if(e===Rl||e===_o)throw Error(d(483))}var _l=null,Ci=0;function Lo(e){var t=Ci;return Ci+=1,_l===null&&(_l=[]),ud(_l,e,t)}function wi(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Uo(e,t){throw t.$$typeof===B?Error(d(525)):(e=Object.prototype.toString.call(t),Error(d(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function hd(e){function t(M,z){if(e){var A=M.deletions;A===null?(M.deletions=[z],M.flags|=16):A.push(z)}}function n(M,z){if(!e)return null;for(;z!==null;)t(M,z),z=z.sibling;return null}function a(M){for(var z=new Map;M!==null;)M.key!==null?z.set(M.key,M):z.set(M.index,M),M=M.sibling;return z}function l(M,z){return M=ea(M,z),M.index=0,M.sibling=null,M}function i(M,z,A){return M.index=A,e?(A=M.alternate,A!==null?(A=A.index,A<z?(M.flags|=67108866,z):A):(M.flags|=67108866,z)):(M.flags|=1048576,z)}function c(M){return e&&M.alternate===null&&(M.flags|=67108866),M}function p(M,z,A,j){return z===null||z.tag!==6?(z=us(A,M.mode,j),z.return=M,z):(z=l(z,A),z.return=M,z)}function x(M,z,A,j){var ze=A.type;return ze===G?H(M,z,A.props.children,j,A.key):z!==null&&(z.elementType===ze||typeof ze=="object"&&ze!==null&&ze.$$typeof===P&&al(ze)===z.type)?(z=l(z,A.props),wi(z,A),z.return=M,z):(z=Do(A.type,A.key,A.props,null,M.mode,j),wi(z,A),z.return=M,z)}function T(M,z,A,j){return z===null||z.tag!==4||z.stateNode.containerInfo!==A.containerInfo||z.stateNode.implementation!==A.implementation?(z=ds(A,M.mode,j),z.return=M,z):(z=l(z,A.children||[]),z.return=M,z)}function H(M,z,A,j,ze){return z===null||z.tag!==7?(z=Ia(A,M.mode,j,ze),z.return=M,z):(z=l(z,A),z.return=M,z)}function q(M,z,A){if(typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint")return z=us(""+z,M.mode,A),z.return=M,z;if(typeof z=="object"&&z!==null){switch(z.$$typeof){case Y:return A=Do(z.type,z.key,z.props,null,M.mode,A),wi(A,z),A.return=M,A;case U:return z=ds(z,M.mode,A),z.return=M,z;case P:return z=al(z),q(M,z,A)}if(Ue(z)||he(z))return z=Ia(z,M.mode,A,null),z.return=M,z;if(typeof z.then=="function")return q(M,Lo(z),A);if(z.$$typeof===ae)return q(M,To(M,z),A);Uo(M,z)}return null}function _(M,z,A,j){var ze=z!==null?z.key:null;if(typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint")return ze!==null?null:p(M,z,""+A,j);if(typeof A=="object"&&A!==null){switch(A.$$typeof){case Y:return A.key===ze?x(M,z,A,j):null;case U:return A.key===ze?T(M,z,A,j):null;case P:return A=al(A),_(M,z,A,j)}if(Ue(A)||he(A))return ze!==null?null:H(M,z,A,j,null);if(typeof A.then=="function")return _(M,z,Lo(A),j);if(A.$$typeof===ae)return _(M,z,To(M,A),j);Uo(M,A)}return null}function O(M,z,A,j,ze){if(typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint")return M=M.get(A)||null,p(z,M,""+j,ze);if(typeof j=="object"&&j!==null){switch(j.$$typeof){case Y:return M=M.get(j.key===null?A:j.key)||null,x(z,M,j,ze);case U:return M=M.get(j.key===null?A:j.key)||null,T(z,M,j,ze);case P:return j=al(j),O(M,z,A,j,ze)}if(Ue(j)||he(j))return M=M.get(A)||null,H(z,M,j,ze,null);if(typeof j.then=="function")return O(M,z,A,Lo(j),ze);if(j.$$typeof===ae)return O(M,z,A,To(z,j),ze);Uo(z,j)}return null}function fe(M,z,A,j){for(var ze=null,Ie=null,ve=z,Ge=z=0,Ze=null;ve!==null&&Ge<A.length;Ge++){ve.index>Ge?(Ze=ve,ve=null):Ze=ve.sibling;var Pe=_(M,ve,A[Ge],j);if(Pe===null){ve===null&&(ve=Ze);break}e&&ve&&Pe.alternate===null&&t(M,ve),z=i(Pe,z,Ge),Ie===null?ze=Pe:Ie.sibling=Pe,Ie=Pe,ve=Ze}if(Ge===A.length)return n(M,ve),Fe&&ta(M,Ge),ze;if(ve===null){for(;Ge<A.length;Ge++)ve=q(M,A[Ge],j),ve!==null&&(z=i(ve,z,Ge),Ie===null?ze=ve:Ie.sibling=ve,Ie=ve);return Fe&&ta(M,Ge),ze}for(ve=a(ve);Ge<A.length;Ge++)Ze=O(ve,M,Ge,A[Ge],j),Ze!==null&&(e&&Ze.alternate!==null&&ve.delete(Ze.key===null?Ge:Ze.key),z=i(Ze,z,Ge),Ie===null?ze=Ze:Ie.sibling=Ze,Ie=Ze);return e&&ve.forEach(function(qa){return t(M,qa)}),Fe&&ta(M,Ge),ze}function ke(M,z,A,j){if(A==null)throw Error(d(151));for(var ze=null,Ie=null,ve=z,Ge=z=0,Ze=null,Pe=A.next();ve!==null&&!Pe.done;Ge++,Pe=A.next()){ve.index>Ge?(Ze=ve,ve=null):Ze=ve.sibling;var qa=_(M,ve,Pe.value,j);if(qa===null){ve===null&&(ve=Ze);break}e&&ve&&qa.alternate===null&&t(M,ve),z=i(qa,z,Ge),Ie===null?ze=qa:Ie.sibling=qa,Ie=qa,ve=Ze}if(Pe.done)return n(M,ve),Fe&&ta(M,Ge),ze;if(ve===null){for(;!Pe.done;Ge++,Pe=A.next())Pe=q(M,Pe.value,j),Pe!==null&&(z=i(Pe,z,Ge),Ie===null?ze=Pe:Ie.sibling=Pe,Ie=Pe);return Fe&&ta(M,Ge),ze}for(ve=a(ve);!Pe.done;Ge++,Pe=A.next())Pe=O(ve,M,Ge,Pe.value,j),Pe!==null&&(e&&Pe.alternate!==null&&ve.delete(Pe.key===null?Ge:Pe.key),z=i(Pe,z,Ge),Ie===null?ze=Pe:Ie.sibling=Pe,Ie=Pe);return e&&ve.forEach(function(Wm){return t(M,Wm)}),Fe&&ta(M,Ge),ze}function pt(M,z,A,j){if(typeof A=="object"&&A!==null&&A.type===G&&A.key===null&&(A=A.props.children),typeof A=="object"&&A!==null){switch(A.$$typeof){case Y:e:{for(var ze=A.key;z!==null;){if(z.key===ze){if(ze=A.type,ze===G){if(z.tag===7){n(M,z.sibling),j=l(z,A.props.children),j.return=M,M=j;break e}}else if(z.elementType===ze||typeof ze=="object"&&ze!==null&&ze.$$typeof===P&&al(ze)===z.type){n(M,z.sibling),j=l(z,A.props),wi(j,A),j.return=M,M=j;break e}n(M,z);break}else t(M,z);z=z.sibling}A.type===G?(j=Ia(A.props.children,M.mode,j,A.key),j.return=M,M=j):(j=Do(A.type,A.key,A.props,null,M.mode,j),wi(j,A),j.return=M,M=j)}return c(M);case U:e:{for(ze=A.key;z!==null;){if(z.key===ze)if(z.tag===4&&z.stateNode.containerInfo===A.containerInfo&&z.stateNode.implementation===A.implementation){n(M,z.sibling),j=l(z,A.children||[]),j.return=M,M=j;break e}else{n(M,z);break}else t(M,z);z=z.sibling}j=ds(A,M.mode,j),j.return=M,M=j}return c(M);case P:return A=al(A),pt(M,z,A,j)}if(Ue(A))return fe(M,z,A,j);if(he(A)){if(ze=he(A),typeof ze!="function")throw Error(d(150));return A=ze.call(A),ke(M,z,A,j)}if(typeof A.then=="function")return pt(M,z,Lo(A),j);if(A.$$typeof===ae)return pt(M,z,To(M,A),j);Uo(M,A)}return typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint"?(A=""+A,z!==null&&z.tag===6?(n(M,z.sibling),j=l(z,A),j.return=M,M=j):(n(M,z),j=us(A,M.mode,j),j.return=M,M=j),c(M)):n(M,z)}return function(M,z,A,j){try{Ci=0;var ze=pt(M,z,A,j);return _l=null,ze}catch(ve){if(ve===Rl||ve===_o)throw ve;var Ie=bn(29,ve,null,M.mode);return Ie.lanes=j,Ie.return=M,Ie}}}var il=hd(!0),pd=hd(!1),wa=!1;function ws(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function zs(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function za(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ma(e,t,n){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(et&2)!==0){var l=a.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),a.pending=t,t=ko(e),Wu(e,null,n),t}return Mo(e,a,t,n),ko(e)}function zi(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,uo(e,n)}}function Ms(e,t){var n=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,n===a)){var l=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var c={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};i===null?l=i=c:i=i.next=c,n=n.next}while(n!==null);i===null?l=i=t:i=i.next=t}else l=i=t;n={baseState:a.baseState,firstBaseUpdate:l,lastBaseUpdate:i,shared:a.shared,callbacks:a.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var ks=!1;function Mi(){if(ks){var e=Tl;if(e!==null)throw e}}function ki(e,t,n,a){ks=!1;var l=e.updateQueue;wa=!1;var i=l.firstBaseUpdate,c=l.lastBaseUpdate,p=l.shared.pending;if(p!==null){l.shared.pending=null;var x=p,T=x.next;x.next=null,c===null?i=T:c.next=T,c=x;var H=e.alternate;H!==null&&(H=H.updateQueue,p=H.lastBaseUpdate,p!==c&&(p===null?H.firstBaseUpdate=T:p.next=T,H.lastBaseUpdate=x))}if(i!==null){var q=l.baseState;c=0,H=T=x=null,p=i;do{var _=p.lane&-536870913,O=_!==p.lane;if(O?(Ke&_)===_:(a&_)===_){_!==0&&_===Al&&(ks=!0),H!==null&&(H=H.next={lane:0,tag:p.tag,payload:p.payload,callback:null,next:null});e:{var fe=e,ke=p;_=t;var pt=n;switch(ke.tag){case 1:if(fe=ke.payload,typeof fe=="function"){q=fe.call(pt,q,_);break e}q=fe;break e;case 3:fe.flags=fe.flags&-65537|128;case 0:if(fe=ke.payload,_=typeof fe=="function"?fe.call(pt,q,_):fe,_==null)break e;q=k({},q,_);break e;case 2:wa=!0}}_=p.callback,_!==null&&(e.flags|=64,O&&(e.flags|=8192),O=l.callbacks,O===null?l.callbacks=[_]:O.push(_))}else O={lane:_,tag:p.tag,payload:p.payload,callback:p.callback,next:null},H===null?(T=H=O,x=q):H=H.next=O,c|=_;if(p=p.next,p===null){if(p=l.shared.pending,p===null)break;O=p,p=O.next,O.next=null,l.lastBaseUpdate=O,l.shared.pending=null}}while(!0);H===null&&(x=q),l.baseState=x,l.firstBaseUpdate=T,l.lastBaseUpdate=H,i===null&&(l.shared.lanes=0),Ta|=c,e.lanes=c,e.memoizedState=q}}function md(e,t){if(typeof e!="function")throw Error(d(191,e));e.call(t)}function gd(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)md(n[e],t)}var Ol=v(null),Ho=v(0);function yd(e,t){e=fa,I(Ho,e),I(Ol,t),fa=e|t.baseLanes}function Ds(){I(Ho,fa),I(Ol,Ol.current)}function Es(){fa=Ho.current,L(Ol),L(Ho)}var vn=v(null),_n=null;function ka(e){var t=e.alternate;I(_t,_t.current&1),I(vn,e),_n===null&&(t===null||Ol.current!==null||t.memoizedState!==null)&&(_n=e)}function As(e){I(_t,_t.current),I(vn,e),_n===null&&(_n=e)}function bd(e){e.tag===22?(I(_t,_t.current),I(vn,e),_n===null&&(_n=e)):Da()}function Da(){I(_t,_t.current),I(vn,vn.current)}function xn(e){L(vn),_n===e&&(_n=null),L(_t)}var _t=v(0);function Bo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||Uc(n)||Hc(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var la=0,qe=null,ft=null,Ut=null,No=!1,Ll=!1,ol=!1,jo=0,Di=0,Ul=null,Y0=0;function Dt(){throw Error(d(321))}function Ts(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!yn(e[n],t[n]))return!1;return!0}function Rs(e,t,n,a,l,i){return la=i,qe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,E.H=e===null||e.memoizedState===null?tf:Ks,ol=!1,i=n(a,l),ol=!1,Ll&&(i=xd(t,n,a,l)),vd(e),i}function vd(e){E.H=Ti;var t=ft!==null&&ft.next!==null;if(la=0,Ut=ft=qe=null,No=!1,Di=0,Ul=null,t)throw Error(d(300));e===null||Ht||(e=e.dependencies,e!==null&&Ao(e)&&(Ht=!0))}function xd(e,t,n,a){qe=e;var l=0;do{if(Ll&&(Ul=null),Di=0,Ll=!1,25<=l)throw Error(d(301));if(l+=1,Ut=ft=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}E.H=nf,i=t(n,a)}while(Ll);return i}function G0(){var e=E.H,t=e.useState()[0];return t=typeof t.then=="function"?Ei(t):t,e=e.useState()[0],(ft!==null?ft.memoizedState:null)!==e&&(qe.flags|=1024),t}function _s(){var e=jo!==0;return jo=0,e}function Os(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Ls(e){if(No){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}No=!1}la=0,Ut=ft=qe=null,Ll=!1,Di=jo=0,Ul=null}function on(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ut===null?qe.memoizedState=Ut=e:Ut=Ut.next=e,Ut}function Ot(){if(ft===null){var e=qe.alternate;e=e!==null?e.memoizedState:null}else e=ft.next;var t=Ut===null?qe.memoizedState:Ut.next;if(t!==null)Ut=t,ft=e;else{if(e===null)throw qe.alternate===null?Error(d(467)):Error(d(310));ft=e,e={memoizedState:ft.memoizedState,baseState:ft.baseState,baseQueue:ft.baseQueue,queue:ft.queue,next:null},Ut===null?qe.memoizedState=Ut=e:Ut=Ut.next=e}return Ut}function qo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ei(e){var t=Di;return Di+=1,Ul===null&&(Ul=[]),e=ud(Ul,e,t),t=qe,(Ut===null?t.memoizedState:Ut.next)===null&&(t=t.alternate,E.H=t===null||t.memoizedState===null?tf:Ks),e}function Yo(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Ei(e);if(e.$$typeof===ae)return Ft(e)}throw Error(d(438,String(e)))}function Us(e){var t=null,n=qe.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var a=qe.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(l){return l.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=qo(),qe.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),a=0;a<e;a++)n[a]=Q;return t.index++,n}function ia(e,t){return typeof t=="function"?t(e):t}function Go(e){var t=Ot();return Hs(t,ft,e)}function Hs(e,t,n){var a=e.queue;if(a===null)throw Error(d(311));a.lastRenderedReducer=n;var l=e.baseQueue,i=a.pending;if(i!==null){if(l!==null){var c=l.next;l.next=i.next,i.next=c}t.baseQueue=l=i,a.pending=null}if(i=e.baseState,l===null)e.memoizedState=i;else{t=l.next;var p=c=null,x=null,T=t,H=!1;do{var q=T.lane&-536870913;if(q!==T.lane?(Ke&q)===q:(la&q)===q){var _=T.revertLane;if(_===0)x!==null&&(x=x.next={lane:0,revertLane:0,gesture:null,action:T.action,hasEagerState:T.hasEagerState,eagerState:T.eagerState,next:null}),q===Al&&(H=!0);else if((la&_)===_){T=T.next,_===Al&&(H=!0);continue}else q={lane:0,revertLane:T.revertLane,gesture:null,action:T.action,hasEagerState:T.hasEagerState,eagerState:T.eagerState,next:null},x===null?(p=x=q,c=i):x=x.next=q,qe.lanes|=_,Ta|=_;q=T.action,ol&&n(i,q),i=T.hasEagerState?T.eagerState:n(i,q)}else _={lane:q,revertLane:T.revertLane,gesture:T.gesture,action:T.action,hasEagerState:T.hasEagerState,eagerState:T.eagerState,next:null},x===null?(p=x=_,c=i):x=x.next=_,qe.lanes|=q,Ta|=q;T=T.next}while(T!==null&&T!==t);if(x===null?c=i:x.next=p,!yn(i,e.memoizedState)&&(Ht=!0,H&&(n=Tl,n!==null)))throw n;e.memoizedState=i,e.baseState=c,e.baseQueue=x,a.lastRenderedState=i}return l===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function Bs(e){var t=Ot(),n=t.queue;if(n===null)throw Error(d(311));n.lastRenderedReducer=e;var a=n.dispatch,l=n.pending,i=t.memoizedState;if(l!==null){n.pending=null;var c=l=l.next;do i=e(i,c.action),c=c.next;while(c!==l);yn(i,t.memoizedState)||(Ht=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,a]}function Sd(e,t,n){var a=qe,l=Ot(),i=Fe;if(i){if(n===void 0)throw Error(d(407));n=n()}else n=t();var c=!yn((ft||l).memoizedState,n);if(c&&(l.memoizedState=n,Ht=!0),l=l.queue,qs(zd.bind(null,a,l,e),[e]),l.getSnapshot!==t||c||Ut!==null&&Ut.memoizedState.tag&1){if(a.flags|=2048,Hl(9,{destroy:void 0},wd.bind(null,a,l,n,t),null),gt===null)throw Error(d(349));i||(la&127)!==0||Cd(a,t,n)}return n}function Cd(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=qe.updateQueue,t===null?(t=qo(),qe.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function wd(e,t,n,a){t.value=n,t.getSnapshot=a,Md(t)&&kd(e)}function zd(e,t,n){return n(function(){Md(t)&&kd(e)})}function Md(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!yn(e,n)}catch{return!0}}function kd(e){var t=Wa(e,2);t!==null&&fn(t,e,2)}function Ns(e){var t=on();if(typeof e=="function"){var n=e;if(e=n(),ol){kt(!0);try{n()}finally{kt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ia,lastRenderedState:e},t}function Dd(e,t,n,a){return e.baseState=n,Hs(e,ft,typeof a=="function"?a:ia)}function X0(e,t,n,a,l){if(Qo(e))throw Error(d(485));if(e=t.action,e!==null){var i={payload:l,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(c){i.listeners.push(c)}};E.T!==null?n(!0):i.isTransition=!1,a(i),n=t.pending,n===null?(i.next=t.pending=i,Ed(t,i)):(i.next=n.next,t.pending=n.next=i)}}function Ed(e,t){var n=t.action,a=t.payload,l=e.state;if(t.isTransition){var i=E.T,c={};E.T=c;try{var p=n(l,a),x=E.S;x!==null&&x(c,p),Ad(e,t,p)}catch(T){js(e,t,T)}finally{i!==null&&c.types!==null&&(i.types=c.types),E.T=i}}else try{i=n(l,a),Ad(e,t,i)}catch(T){js(e,t,T)}}function Ad(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(a){Td(e,t,a)},function(a){return js(e,t,a)}):Td(e,t,n)}function Td(e,t,n){t.status="fulfilled",t.value=n,Rd(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Ed(e,n)))}function js(e,t,n){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=n,Rd(t),t=t.next;while(t!==a)}e.action=null}function Rd(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function _d(e,t){return t}function Od(e,t){if(Fe){var n=gt.formState;if(n!==null){e:{var a=qe;if(Fe){if(St){t:{for(var l=St,i=Rn;l.nodeType!==8;){if(!i){l=null;break t}if(l=On(l.nextSibling),l===null){l=null;break t}}i=l.data,l=i==="F!"||i==="F"?l:null}if(l){St=On(l.nextSibling),a=l.data==="F!";break e}}Sa(a)}a=!1}a&&(t=n[0])}}return n=on(),n.memoizedState=n.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:_d,lastRenderedState:t},n.queue=a,n=Id.bind(null,qe,a),a.dispatch=n,a=Ns(!1),i=Qs.bind(null,qe,!1,a.queue),a=on(),l={state:t,dispatch:null,action:e,pending:null},a.queue=l,n=X0.bind(null,qe,l,i,n),l.dispatch=n,a.memoizedState=e,[t,n,!1]}function Ld(e){var t=Ot();return Ud(t,ft,e)}function Ud(e,t,n){if(t=Hs(e,t,_d)[0],e=Go(ia)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=Ei(t)}catch(c){throw c===Rl?_o:c}else a=t;t=Ot();var l=t.queue,i=l.dispatch;return n!==t.memoizedState&&(qe.flags|=2048,Hl(9,{destroy:void 0},V0.bind(null,l,n),null)),[a,i,e]}function V0(e,t){e.action=t}function Hd(e){var t=Ot(),n=ft;if(n!==null)return Ud(t,n,e);Ot(),t=t.memoizedState,n=Ot();var a=n.queue.dispatch;return n.memoizedState=e,[t,a,!1]}function Hl(e,t,n,a){return e={tag:e,create:n,deps:a,inst:t,next:null},t=qe.updateQueue,t===null&&(t=qo(),qe.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(a=n.next,n.next=e,e.next=a,t.lastEffect=e),e}function Bd(){return Ot().memoizedState}function Xo(e,t,n,a){var l=on();qe.flags|=e,l.memoizedState=Hl(1|t,{destroy:void 0},n,a===void 0?null:a)}function Vo(e,t,n,a){var l=Ot();a=a===void 0?null:a;var i=l.memoizedState.inst;ft!==null&&a!==null&&Ts(a,ft.memoizedState.deps)?l.memoizedState=Hl(t,i,n,a):(qe.flags|=e,l.memoizedState=Hl(1|t,i,n,a))}function Nd(e,t){Xo(8390656,8,e,t)}function qs(e,t){Vo(2048,8,e,t)}function Q0(e){qe.flags|=4;var t=qe.updateQueue;if(t===null)t=qo(),qe.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function jd(e){var t=Ot().memoizedState;return Q0({ref:t,nextImpl:e}),function(){if((et&2)!==0)throw Error(d(440));return t.impl.apply(void 0,arguments)}}function qd(e,t){return Vo(4,2,e,t)}function Yd(e,t){return Vo(4,4,e,t)}function Gd(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Xd(e,t,n){n=n!=null?n.concat([e]):null,Vo(4,4,Gd.bind(null,t,e),n)}function Ys(){}function Vd(e,t){var n=Ot();t=t===void 0?null:t;var a=n.memoizedState;return t!==null&&Ts(t,a[1])?a[0]:(n.memoizedState=[e,t],e)}function Qd(e,t){var n=Ot();t=t===void 0?null:t;var a=n.memoizedState;if(t!==null&&Ts(t,a[1]))return a[0];if(a=e(),ol){kt(!0);try{e()}finally{kt(!1)}}return n.memoizedState=[a,t],a}function Gs(e,t,n){return n===void 0||(la&1073741824)!==0&&(Ke&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=Zf(),qe.lanes|=e,Ta|=e,n)}function Kd(e,t,n,a){return yn(n,t)?n:Ol.current!==null?(e=Gs(e,n,a),yn(e,t)||(Ht=!0),e):(la&42)===0||(la&1073741824)!==0&&(Ke&261930)===0?(Ht=!0,e.memoizedState=n):(e=Zf(),qe.lanes|=e,Ta|=e,t)}function Zd(e,t,n,a,l){var i=J.p;J.p=i!==0&&8>i?i:8;var c=E.T,p={};E.T=p,Qs(e,!1,t,n);try{var x=l(),T=E.S;if(T!==null&&T(p,x),x!==null&&typeof x=="object"&&typeof x.then=="function"){var H=q0(x,a);Ai(e,t,H,wn(e))}else Ai(e,t,a,wn(e))}catch(q){Ai(e,t,{then:function(){},status:"rejected",reason:q},wn())}finally{J.p=i,c!==null&&p.types!==null&&(c.types=p.types),E.T=c}}function K0(){}function Xs(e,t,n,a){if(e.tag!==5)throw Error(d(476));var l=Fd(e).queue;Zd(e,l,t,F,n===null?K0:function(){return Jd(e),n(a)})}function Fd(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:F,baseState:F,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ia,lastRenderedState:F},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ia,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Jd(e){var t=Fd(e);t.next===null&&(t=e.alternate.memoizedState),Ai(e,t.next.queue,{},wn())}function Vs(){return Ft(Ki)}function $d(){return Ot().memoizedState}function Wd(){return Ot().memoizedState}function Z0(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=wn();e=za(n);var a=Ma(t,e,n);a!==null&&(fn(a,t,n),zi(a,t,n)),t={cache:vs()},e.payload=t;return}t=t.return}}function F0(e,t,n){var a=wn();n={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Qo(e)?Pd(t,n):(n=ss(e,t,n,a),n!==null&&(fn(n,e,a),ef(n,t,a)))}function Id(e,t,n){var a=wn();Ai(e,t,n,a)}function Ai(e,t,n,a){var l={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Qo(e))Pd(t,l);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var c=t.lastRenderedState,p=i(c,n);if(l.hasEagerState=!0,l.eagerState=p,yn(p,c))return Mo(e,t,l,0),gt===null&&zo(),!1}catch{}if(n=ss(e,t,l,a),n!==null)return fn(n,e,a),ef(n,t,a),!0}return!1}function Qs(e,t,n,a){if(a={lane:2,revertLane:wc(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Qo(e)){if(t)throw Error(d(479))}else t=ss(e,n,a,2),t!==null&&fn(t,e,2)}function Qo(e){var t=e.alternate;return e===qe||t!==null&&t===qe}function Pd(e,t){Ll=No=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ef(e,t,n){if((n&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,uo(e,n)}}var Ti={readContext:Ft,use:Yo,useCallback:Dt,useContext:Dt,useEffect:Dt,useImperativeHandle:Dt,useLayoutEffect:Dt,useInsertionEffect:Dt,useMemo:Dt,useReducer:Dt,useRef:Dt,useState:Dt,useDebugValue:Dt,useDeferredValue:Dt,useTransition:Dt,useSyncExternalStore:Dt,useId:Dt,useHostTransitionStatus:Dt,useFormState:Dt,useActionState:Dt,useOptimistic:Dt,useMemoCache:Dt,useCacheRefresh:Dt};Ti.useEffectEvent=Dt;var tf={readContext:Ft,use:Yo,useCallback:function(e,t){return on().memoizedState=[e,t===void 0?null:t],e},useContext:Ft,useEffect:Nd,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Xo(4194308,4,Gd.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Xo(4194308,4,e,t)},useInsertionEffect:function(e,t){Xo(4,2,e,t)},useMemo:function(e,t){var n=on();t=t===void 0?null:t;var a=e();if(ol){kt(!0);try{e()}finally{kt(!1)}}return n.memoizedState=[a,t],a},useReducer:function(e,t,n){var a=on();if(n!==void 0){var l=n(t);if(ol){kt(!0);try{n(t)}finally{kt(!1)}}}else l=t;return a.memoizedState=a.baseState=l,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:l},a.queue=e,e=e.dispatch=F0.bind(null,qe,e),[a.memoizedState,e]},useRef:function(e){var t=on();return e={current:e},t.memoizedState=e},useState:function(e){e=Ns(e);var t=e.queue,n=Id.bind(null,qe,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Ys,useDeferredValue:function(e,t){var n=on();return Gs(n,e,t)},useTransition:function(){var e=Ns(!1);return e=Zd.bind(null,qe,e.queue,!0,!1),on().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var a=qe,l=on();if(Fe){if(n===void 0)throw Error(d(407));n=n()}else{if(n=t(),gt===null)throw Error(d(349));(Ke&127)!==0||Cd(a,t,n)}l.memoizedState=n;var i={value:n,getSnapshot:t};return l.queue=i,Nd(zd.bind(null,a,i,e),[e]),a.flags|=2048,Hl(9,{destroy:void 0},wd.bind(null,a,i,n,t),null),n},useId:function(){var e=on(),t=gt.identifierPrefix;if(Fe){var n=Gn,a=Yn;n=(a&~(1<<32-Tt(a)-1)).toString(32)+n,t="_"+t+"R_"+n,n=jo++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=Y0++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Vs,useFormState:Od,useActionState:Od,useOptimistic:function(e){var t=on();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Qs.bind(null,qe,!0,n),n.dispatch=t,[e,t]},useMemoCache:Us,useCacheRefresh:function(){return on().memoizedState=Z0.bind(null,qe)},useEffectEvent:function(e){var t=on(),n={impl:e};return t.memoizedState=n,function(){if((et&2)!==0)throw Error(d(440));return n.impl.apply(void 0,arguments)}}},Ks={readContext:Ft,use:Yo,useCallback:Vd,useContext:Ft,useEffect:qs,useImperativeHandle:Xd,useInsertionEffect:qd,useLayoutEffect:Yd,useMemo:Qd,useReducer:Go,useRef:Bd,useState:function(){return Go(ia)},useDebugValue:Ys,useDeferredValue:function(e,t){var n=Ot();return Kd(n,ft.memoizedState,e,t)},useTransition:function(){var e=Go(ia)[0],t=Ot().memoizedState;return[typeof e=="boolean"?e:Ei(e),t]},useSyncExternalStore:Sd,useId:$d,useHostTransitionStatus:Vs,useFormState:Ld,useActionState:Ld,useOptimistic:function(e,t){var n=Ot();return Dd(n,ft,e,t)},useMemoCache:Us,useCacheRefresh:Wd};Ks.useEffectEvent=jd;var nf={readContext:Ft,use:Yo,useCallback:Vd,useContext:Ft,useEffect:qs,useImperativeHandle:Xd,useInsertionEffect:qd,useLayoutEffect:Yd,useMemo:Qd,useReducer:Bs,useRef:Bd,useState:function(){return Bs(ia)},useDebugValue:Ys,useDeferredValue:function(e,t){var n=Ot();return ft===null?Gs(n,e,t):Kd(n,ft.memoizedState,e,t)},useTransition:function(){var e=Bs(ia)[0],t=Ot().memoizedState;return[typeof e=="boolean"?e:Ei(e),t]},useSyncExternalStore:Sd,useId:$d,useHostTransitionStatus:Vs,useFormState:Hd,useActionState:Hd,useOptimistic:function(e,t){var n=Ot();return ft!==null?Dd(n,ft,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:Us,useCacheRefresh:Wd};nf.useEffectEvent=jd;function Zs(e,t,n,a){t=e.memoizedState,n=n(a,t),n=n==null?t:k({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Fs={enqueueSetState:function(e,t,n){e=e._reactInternals;var a=wn(),l=za(a);l.payload=t,n!=null&&(l.callback=n),t=Ma(e,l,a),t!==null&&(fn(t,e,a),zi(t,e,a))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var a=wn(),l=za(a);l.tag=1,l.payload=t,n!=null&&(l.callback=n),t=Ma(e,l,a),t!==null&&(fn(t,e,a),zi(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=wn(),a=za(n);a.tag=2,t!=null&&(a.callback=t),t=Ma(e,a,n),t!==null&&(fn(t,e,n),zi(t,e,n))}};function af(e,t,n,a,l,i,c){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,i,c):t.prototype&&t.prototype.isPureReactComponent?!gi(n,a)||!gi(l,i):!0}function lf(e,t,n,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,a),t.state!==e&&Fs.enqueueReplaceState(t,t.state,null)}function rl(e,t){var n=t;if("ref"in t){n={};for(var a in t)a!=="ref"&&(n[a]=t[a])}if(e=e.defaultProps){n===t&&(n=k({},n));for(var l in e)n[l]===void 0&&(n[l]=e[l])}return n}function of(e){wo(e)}function rf(e){console.error(e)}function sf(e){wo(e)}function Ko(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function cf(e,t,n){try{var a=e.onCaughtError;a(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(l){setTimeout(function(){throw l})}}function Js(e,t,n){return n=za(n),n.tag=3,n.payload={element:null},n.callback=function(){Ko(e,t)},n}function uf(e){return e=za(e),e.tag=3,e}function df(e,t,n,a){var l=n.type.getDerivedStateFromError;if(typeof l=="function"){var i=a.value;e.payload=function(){return l(i)},e.callback=function(){cf(t,n,a)}}var c=n.stateNode;c!==null&&typeof c.componentDidCatch=="function"&&(e.callback=function(){cf(t,n,a),typeof l!="function"&&(Ra===null?Ra=new Set([this]):Ra.add(this));var p=a.stack;this.componentDidCatch(a.value,{componentStack:p!==null?p:""})})}function J0(e,t,n,a,l){if(n.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=n.alternate,t!==null&&El(t,n,l,!0),n=vn.current,n!==null){switch(n.tag){case 31:case 13:return _n===null?lr():n.alternate===null&&Et===0&&(Et=3),n.flags&=-257,n.flags|=65536,n.lanes=l,a===Oo?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([a]):t.add(a),xc(e,a,l)),!1;case 22:return n.flags|=65536,a===Oo?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([a]):n.add(a)),xc(e,a,l)),!1}throw Error(d(435,n.tag))}return xc(e,a,l),lr(),!1}if(Fe)return t=vn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=l,a!==ps&&(e=Error(d(422),{cause:a}),vi(En(e,n)))):(a!==ps&&(t=Error(d(423),{cause:a}),vi(En(t,n))),e=e.current.alternate,e.flags|=65536,l&=-l,e.lanes|=l,a=En(a,n),l=Js(e.stateNode,a,l),Ms(e,l),Et!==4&&(Et=2)),!1;var i=Error(d(520),{cause:a});if(i=En(i,n),Ni===null?Ni=[i]:Ni.push(i),Et!==4&&(Et=2),t===null)return!0;a=En(a,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=l&-l,n.lanes|=e,e=Js(n.stateNode,a,e),Ms(n,e),!1;case 1:if(t=n.type,i=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(Ra===null||!Ra.has(i))))return n.flags|=65536,l&=-l,n.lanes|=l,l=uf(l),df(l,e,n,a),Ms(n,l),!1}n=n.return}while(n!==null);return!1}var $s=Error(d(461)),Ht=!1;function Jt(e,t,n,a){t.child=e===null?pd(t,null,n,a):il(t,e.child,n,a)}function ff(e,t,n,a,l){n=n.render;var i=t.ref;if("ref"in a){var c={};for(var p in a)p!=="ref"&&(c[p]=a[p])}else c=a;return tl(t),a=Rs(e,t,n,c,i,l),p=_s(),e!==null&&!Ht?(Os(e,t,l),oa(e,t,l)):(Fe&&p&&fs(t),t.flags|=1,Jt(e,t,a,l),t.child)}function hf(e,t,n,a,l){if(e===null){var i=n.type;return typeof i=="function"&&!cs(i)&&i.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=i,pf(e,t,i,a,l)):(e=Do(n.type,null,a,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!lc(e,l)){var c=i.memoizedProps;if(n=n.compare,n=n!==null?n:gi,n(c,a)&&e.ref===t.ref)return oa(e,t,l)}return t.flags|=1,e=ea(i,a),e.ref=t.ref,e.return=t,t.child=e}function pf(e,t,n,a,l){if(e!==null){var i=e.memoizedProps;if(gi(i,a)&&e.ref===t.ref)if(Ht=!1,t.pendingProps=a=i,lc(e,l))(e.flags&131072)!==0&&(Ht=!0);else return t.lanes=e.lanes,oa(e,t,l)}return Ws(e,t,n,a,l)}function mf(e,t,n,a){var l=a.children,i=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((t.flags&128)!==0){if(i=i!==null?i.baseLanes|n:n,e!==null){for(a=t.child=e.child,l=0;a!==null;)l=l|a.lanes|a.childLanes,a=a.sibling;a=l&~i}else a=0,t.child=null;return gf(e,t,i,n,a)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ro(t,i!==null?i.cachePool:null),i!==null?yd(t,i):Ds(),bd(t);else return a=t.lanes=536870912,gf(e,t,i!==null?i.baseLanes|n:n,n,a)}else i!==null?(Ro(t,i.cachePool),yd(t,i),Da(),t.memoizedState=null):(e!==null&&Ro(t,null),Ds(),Da());return Jt(e,t,l,n),t.child}function Ri(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function gf(e,t,n,a,l){var i=Ss();return i=i===null?null:{parent:Lt._currentValue,pool:i},t.memoizedState={baseLanes:n,cachePool:i},e!==null&&Ro(t,null),Ds(),bd(t),e!==null&&El(e,t,a,!0),t.childLanes=l,null}function Zo(e,t){return t=Jo({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function yf(e,t,n){return il(t,e.child,null,n),e=Zo(t,t.pendingProps),e.flags|=2,xn(t),t.memoizedState=null,e}function $0(e,t,n){var a=t.pendingProps,l=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Fe){if(a.mode==="hidden")return e=Zo(t,a),t.lanes=536870912,Ri(null,e);if(As(t),(e=St)?(e=Ah(e,Rn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:va!==null?{id:Yn,overflow:Gn}:null,retryLane:536870912,hydrationErrors:null},n=Pu(e),n.return=t,t.child=n,Zt=t,St=null)):e=null,e===null)throw Sa(t);return t.lanes=536870912,null}return Zo(t,a)}var i=e.memoizedState;if(i!==null){var c=i.dehydrated;if(As(t),l)if(t.flags&256)t.flags&=-257,t=yf(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(d(558));else if(Ht||El(e,t,n,!1),l=(n&e.childLanes)!==0,Ht||l){if(a=gt,a!==null&&(c=li(a,n),c!==0&&c!==i.retryLane))throw i.retryLane=c,Wa(e,c),fn(a,e,c),$s;lr(),t=yf(e,t,n)}else e=i.treeContext,St=On(c.nextSibling),Zt=t,Fe=!0,xa=null,Rn=!1,e!==null&&nd(t,e),t=Zo(t,a),t.flags|=4096;return t}return e=ea(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Fo(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(d(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Ws(e,t,n,a,l){return tl(t),n=Rs(e,t,n,a,void 0,l),a=_s(),e!==null&&!Ht?(Os(e,t,l),oa(e,t,l)):(Fe&&a&&fs(t),t.flags|=1,Jt(e,t,n,l),t.child)}function bf(e,t,n,a,l,i){return tl(t),t.updateQueue=null,n=xd(t,a,n,l),vd(e),a=_s(),e!==null&&!Ht?(Os(e,t,i),oa(e,t,i)):(Fe&&a&&fs(t),t.flags|=1,Jt(e,t,n,i),t.child)}function vf(e,t,n,a,l){if(tl(t),t.stateNode===null){var i=zl,c=n.contextType;typeof c=="object"&&c!==null&&(i=Ft(c)),i=new n(a,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=Fs,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=a,i.state=t.memoizedState,i.refs={},ws(t),c=n.contextType,i.context=typeof c=="object"&&c!==null?Ft(c):zl,i.state=t.memoizedState,c=n.getDerivedStateFromProps,typeof c=="function"&&(Zs(t,n,c,a),i.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(c=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),c!==i.state&&Fs.enqueueReplaceState(i,i.state,null),ki(t,a,i,l),Mi(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){i=t.stateNode;var p=t.memoizedProps,x=rl(n,p);i.props=x;var T=i.context,H=n.contextType;c=zl,typeof H=="object"&&H!==null&&(c=Ft(H));var q=n.getDerivedStateFromProps;H=typeof q=="function"||typeof i.getSnapshotBeforeUpdate=="function",p=t.pendingProps!==p,H||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(p||T!==c)&&lf(t,i,a,c),wa=!1;var _=t.memoizedState;i.state=_,ki(t,a,i,l),Mi(),T=t.memoizedState,p||_!==T||wa?(typeof q=="function"&&(Zs(t,n,q,a),T=t.memoizedState),(x=wa||af(t,n,x,a,_,T,c))?(H||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=T),i.props=a,i.state=T,i.context=c,a=x):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{i=t.stateNode,zs(e,t),c=t.memoizedProps,H=rl(n,c),i.props=H,q=t.pendingProps,_=i.context,T=n.contextType,x=zl,typeof T=="object"&&T!==null&&(x=Ft(T)),p=n.getDerivedStateFromProps,(T=typeof p=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(c!==q||_!==x)&&lf(t,i,a,x),wa=!1,_=t.memoizedState,i.state=_,ki(t,a,i,l),Mi();var O=t.memoizedState;c!==q||_!==O||wa||e!==null&&e.dependencies!==null&&Ao(e.dependencies)?(typeof p=="function"&&(Zs(t,n,p,a),O=t.memoizedState),(H=wa||af(t,n,H,a,_,O,x)||e!==null&&e.dependencies!==null&&Ao(e.dependencies))?(T||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(a,O,x),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(a,O,x)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||c===e.memoizedProps&&_===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&_===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=O),i.props=a,i.state=O,i.context=x,a=H):(typeof i.componentDidUpdate!="function"||c===e.memoizedProps&&_===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&_===e.memoizedState||(t.flags|=1024),a=!1)}return i=a,Fo(e,t),a=(t.flags&128)!==0,i||a?(i=t.stateNode,n=a&&typeof n.getDerivedStateFromError!="function"?null:i.render(),t.flags|=1,e!==null&&a?(t.child=il(t,e.child,null,l),t.child=il(t,null,n,l)):Jt(e,t,n,l),t.memoizedState=i.state,e=t.child):e=oa(e,t,l),e}function xf(e,t,n,a){return Pa(),t.flags|=256,Jt(e,t,n,a),t.child}var Is={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ps(e){return{baseLanes:e,cachePool:sd()}}function ec(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=Cn),e}function Sf(e,t,n){var a=t.pendingProps,l=!1,i=(t.flags&128)!==0,c;if((c=i)||(c=e!==null&&e.memoizedState===null?!1:(_t.current&2)!==0),c&&(l=!0,t.flags&=-129),c=(t.flags&32)!==0,t.flags&=-33,e===null){if(Fe){if(l?ka(t):Da(),(e=St)?(e=Ah(e,Rn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:va!==null?{id:Yn,overflow:Gn}:null,retryLane:536870912,hydrationErrors:null},n=Pu(e),n.return=t,t.child=n,Zt=t,St=null)):e=null,e===null)throw Sa(t);return Hc(e)?t.lanes=32:t.lanes=536870912,null}var p=a.children;return a=a.fallback,l?(Da(),l=t.mode,p=Jo({mode:"hidden",children:p},l),a=Ia(a,l,n,null),p.return=t,a.return=t,p.sibling=a,t.child=p,a=t.child,a.memoizedState=Ps(n),a.childLanes=ec(e,c,n),t.memoizedState=Is,Ri(null,a)):(ka(t),tc(t,p))}var x=e.memoizedState;if(x!==null&&(p=x.dehydrated,p!==null)){if(i)t.flags&256?(ka(t),t.flags&=-257,t=nc(e,t,n)):t.memoizedState!==null?(Da(),t.child=e.child,t.flags|=128,t=null):(Da(),p=a.fallback,l=t.mode,a=Jo({mode:"visible",children:a.children},l),p=Ia(p,l,n,null),p.flags|=2,a.return=t,p.return=t,a.sibling=p,t.child=a,il(t,e.child,null,n),a=t.child,a.memoizedState=Ps(n),a.childLanes=ec(e,c,n),t.memoizedState=Is,t=Ri(null,a));else if(ka(t),Hc(p)){if(c=p.nextSibling&&p.nextSibling.dataset,c)var T=c.dgst;c=T,a=Error(d(419)),a.stack="",a.digest=c,vi({value:a,source:null,stack:null}),t=nc(e,t,n)}else if(Ht||El(e,t,n,!1),c=(n&e.childLanes)!==0,Ht||c){if(c=gt,c!==null&&(a=li(c,n),a!==0&&a!==x.retryLane))throw x.retryLane=a,Wa(e,a),fn(c,e,a),$s;Uc(p)||lr(),t=nc(e,t,n)}else Uc(p)?(t.flags|=192,t.child=e.child,t=null):(e=x.treeContext,St=On(p.nextSibling),Zt=t,Fe=!0,xa=null,Rn=!1,e!==null&&nd(t,e),t=tc(t,a.children),t.flags|=4096);return t}return l?(Da(),p=a.fallback,l=t.mode,x=e.child,T=x.sibling,a=ea(x,{mode:"hidden",children:a.children}),a.subtreeFlags=x.subtreeFlags&65011712,T!==null?p=ea(T,p):(p=Ia(p,l,n,null),p.flags|=2),p.return=t,a.return=t,a.sibling=p,t.child=a,Ri(null,a),a=t.child,p=e.child.memoizedState,p===null?p=Ps(n):(l=p.cachePool,l!==null?(x=Lt._currentValue,l=l.parent!==x?{parent:x,pool:x}:l):l=sd(),p={baseLanes:p.baseLanes|n,cachePool:l}),a.memoizedState=p,a.childLanes=ec(e,c,n),t.memoizedState=Is,Ri(e.child,a)):(ka(t),n=e.child,e=n.sibling,n=ea(n,{mode:"visible",children:a.children}),n.return=t,n.sibling=null,e!==null&&(c=t.deletions,c===null?(t.deletions=[e],t.flags|=16):c.push(e)),t.child=n,t.memoizedState=null,n)}function tc(e,t){return t=Jo({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Jo(e,t){return e=bn(22,e,null,t),e.lanes=0,e}function nc(e,t,n){return il(t,e.child,null,n),e=tc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Cf(e,t,n){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),ys(e.return,t,n)}function ac(e,t,n,a,l,i){var c=e.memoizedState;c===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:n,tailMode:l,treeForkCount:i}:(c.isBackwards=t,c.rendering=null,c.renderingStartTime=0,c.last=a,c.tail=n,c.tailMode=l,c.treeForkCount=i)}function wf(e,t,n){var a=t.pendingProps,l=a.revealOrder,i=a.tail;a=a.children;var c=_t.current,p=(c&2)!==0;if(p?(c=c&1|2,t.flags|=128):c&=1,I(_t,c),Jt(e,t,a,n),a=Fe?bi:0,!p&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Cf(e,n,t);else if(e.tag===19)Cf(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(l){case"forwards":for(n=t.child,l=null;n!==null;)e=n.alternate,e!==null&&Bo(e)===null&&(l=n),n=n.sibling;n=l,n===null?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),ac(t,!1,l,n,i,a);break;case"backwards":case"unstable_legacy-backwards":for(n=null,l=t.child,t.child=null;l!==null;){if(e=l.alternate,e!==null&&Bo(e)===null){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}ac(t,!0,n,null,i,a);break;case"together":ac(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function oa(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ta|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(El(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(d(153));if(t.child!==null){for(e=t.child,n=ea(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ea(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function lc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Ao(e)))}function W0(e,t,n){switch(t.tag){case 3:vt(t,t.stateNode.containerInfo),Ca(t,Lt,e.memoizedState.cache),Pa();break;case 27:case 5:nn(t);break;case 4:vt(t,t.stateNode.containerInfo);break;case 10:Ca(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,As(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(ka(t),t.flags|=128,null):(n&t.child.childLanes)!==0?Sf(e,t,n):(ka(t),e=oa(e,t,n),e!==null?e.sibling:null);ka(t);break;case 19:var l=(e.flags&128)!==0;if(a=(n&t.childLanes)!==0,a||(El(e,t,n,!1),a=(n&t.childLanes)!==0),l){if(a)return wf(e,t,n);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),I(_t,_t.current),a)break;return null;case 22:return t.lanes=0,mf(e,t,n,t.pendingProps);case 24:Ca(t,Lt,e.memoizedState.cache)}return oa(e,t,n)}function zf(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)Ht=!0;else{if(!lc(e,n)&&(t.flags&128)===0)return Ht=!1,W0(e,t,n);Ht=(e.flags&131072)!==0}else Ht=!1,Fe&&(t.flags&1048576)!==0&&td(t,bi,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=al(t.elementType),t.type=e,typeof e=="function")cs(e)?(a=rl(e,a),t.tag=1,t=vf(null,t,e,a,n)):(t.tag=0,t=Ws(null,t,e,a,n));else{if(e!=null){var l=e.$$typeof;if(l===ce){t.tag=11,t=ff(null,t,e,a,n);break e}else if(l===$){t.tag=14,t=hf(null,t,e,a,n);break e}}throw t=te(e)||e,Error(d(306,t,""))}}return t;case 0:return Ws(e,t,t.type,t.pendingProps,n);case 1:return a=t.type,l=rl(a,t.pendingProps),vf(e,t,a,l,n);case 3:e:{if(vt(t,t.stateNode.containerInfo),e===null)throw Error(d(387));a=t.pendingProps;var i=t.memoizedState;l=i.element,zs(e,t),ki(t,a,null,n);var c=t.memoizedState;if(a=c.cache,Ca(t,Lt,a),a!==i.cache&&bs(t,[Lt],n,!0),Mi(),a=c.element,i.isDehydrated)if(i={element:a,isDehydrated:!1,cache:c.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=xf(e,t,a,n);break e}else if(a!==l){l=En(Error(d(424)),t),vi(l),t=xf(e,t,a,n);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,St=On(e.firstChild),Zt=t,Fe=!0,xa=null,Rn=!0,n=pd(t,null,a,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Pa(),a===l){t=oa(e,t,n);break e}Jt(e,t,a,n)}t=t.child}return t;case 26:return Fo(e,t),e===null?(n=Uh(t.type,null,t.pendingProps,null))?t.memoizedState=n:Fe||(n=t.type,e=t.pendingProps,a=dr(Ee.current).createElement(n),a[wt]=t,a[Rt]=e,$t(a,n,e),ge(a),t.stateNode=a):t.memoizedState=Uh(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return nn(t),e===null&&Fe&&(a=t.stateNode=_h(t.type,t.pendingProps,Ee.current),Zt=t,Rn=!0,l=St,Ua(t.type)?(Bc=l,St=On(a.firstChild)):St=l),Jt(e,t,t.pendingProps.children,n),Fo(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Fe&&((l=a=St)&&(a=Dm(a,t.type,t.pendingProps,Rn),a!==null?(t.stateNode=a,Zt=t,St=On(a.firstChild),Rn=!1,l=!0):l=!1),l||Sa(t)),nn(t),l=t.type,i=t.pendingProps,c=e!==null?e.memoizedProps:null,a=i.children,_c(l,i)?a=null:c!==null&&_c(l,c)&&(t.flags|=32),t.memoizedState!==null&&(l=Rs(e,t,G0,null,null,n),Ki._currentValue=l),Fo(e,t),Jt(e,t,a,n),t.child;case 6:return e===null&&Fe&&((e=n=St)&&(n=Em(n,t.pendingProps,Rn),n!==null?(t.stateNode=n,Zt=t,St=null,e=!0):e=!1),e||Sa(t)),null;case 13:return Sf(e,t,n);case 4:return vt(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=il(t,null,a,n):Jt(e,t,a,n),t.child;case 11:return ff(e,t,t.type,t.pendingProps,n);case 7:return Jt(e,t,t.pendingProps,n),t.child;case 8:return Jt(e,t,t.pendingProps.children,n),t.child;case 12:return Jt(e,t,t.pendingProps.children,n),t.child;case 10:return a=t.pendingProps,Ca(t,t.type,a.value),Jt(e,t,a.children,n),t.child;case 9:return l=t.type._context,a=t.pendingProps.children,tl(t),l=Ft(l),a=a(l),t.flags|=1,Jt(e,t,a,n),t.child;case 14:return hf(e,t,t.type,t.pendingProps,n);case 15:return pf(e,t,t.type,t.pendingProps,n);case 19:return wf(e,t,n);case 31:return $0(e,t,n);case 22:return mf(e,t,n,t.pendingProps);case 24:return tl(t),a=Ft(Lt),e===null?(l=Ss(),l===null&&(l=gt,i=vs(),l.pooledCache=i,i.refCount++,i!==null&&(l.pooledCacheLanes|=n),l=i),t.memoizedState={parent:a,cache:l},ws(t),Ca(t,Lt,l)):((e.lanes&n)!==0&&(zs(e,t),ki(t,null,null,n),Mi()),l=e.memoizedState,i=t.memoizedState,l.parent!==a?(l={parent:a,cache:a},t.memoizedState=l,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=l),Ca(t,Lt,a)):(a=i.cache,Ca(t,Lt,a),a!==l.cache&&bs(t,[Lt],n,!0))),Jt(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(d(156,t.tag))}function ra(e){e.flags|=4}function ic(e,t,n,a,l){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(l&335544128)===l)if(e.stateNode.complete)e.flags|=8192;else if(Wf())e.flags|=8192;else throw ll=Oo,Cs}else e.flags&=-16777217}function Mf(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!qh(t))if(Wf())e.flags|=8192;else throw ll=Oo,Cs}function $o(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?so():536870912,e.lanes|=t,ql|=t)}function _i(e,t){if(!Fe)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var a=null;n!==null;)n.alternate!==null&&(a=n),n=n.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function Ct(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,a=0;if(t)for(var l=e.child;l!==null;)n|=l.lanes|l.childLanes,a|=l.subtreeFlags&65011712,a|=l.flags&65011712,l.return=e,l=l.sibling;else for(l=e.child;l!==null;)n|=l.lanes|l.childLanes,a|=l.subtreeFlags,a|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=a,e.childLanes=n,t}function I0(e,t,n){var a=t.pendingProps;switch(hs(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ct(t),null;case 1:return Ct(t),null;case 3:return n=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),aa(Lt),Le(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Dl(t)?ra(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,ms())),Ct(t),null;case 26:var l=t.type,i=t.memoizedState;return e===null?(ra(t),i!==null?(Ct(t),Mf(t,i)):(Ct(t),ic(t,l,null,a,n))):i?i!==e.memoizedState?(ra(t),Ct(t),Mf(t,i)):(Ct(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&ra(t),Ct(t),ic(t,l,e,a,n)),null;case 27:if(Je(t),n=Ee.current,l=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&ra(t);else{if(!a){if(t.stateNode===null)throw Error(d(166));return Ct(t),null}e=le.current,Dl(t)?ad(t):(e=_h(l,a,n),t.stateNode=e,ra(t))}return Ct(t),null;case 5:if(Je(t),l=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&ra(t);else{if(!a){if(t.stateNode===null)throw Error(d(166));return Ct(t),null}if(i=le.current,Dl(t))ad(t);else{var c=dr(Ee.current);switch(i){case 1:i=c.createElementNS("http://www.w3.org/2000/svg",l);break;case 2:i=c.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;default:switch(l){case"svg":i=c.createElementNS("http://www.w3.org/2000/svg",l);break;case"math":i=c.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;case"script":i=c.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof a.is=="string"?c.createElement("select",{is:a.is}):c.createElement("select"),a.multiple?i.multiple=!0:a.size&&(i.size=a.size);break;default:i=typeof a.is=="string"?c.createElement(l,{is:a.is}):c.createElement(l)}}i[wt]=t,i[Rt]=a;e:for(c=t.child;c!==null;){if(c.tag===5||c.tag===6)i.appendChild(c.stateNode);else if(c.tag!==4&&c.tag!==27&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===t)break e;for(;c.sibling===null;){if(c.return===null||c.return===t)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}t.stateNode=i;e:switch($t(i,l,a),l){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&ra(t)}}return Ct(t),ic(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&ra(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(d(166));if(e=Ee.current,Dl(t)){if(e=t.stateNode,n=t.memoizedProps,a=null,l=Zt,l!==null)switch(l.tag){case 27:case 5:a=l.memoizedProps}e[wt]=t,e=!!(e.nodeValue===n||a!==null&&a.suppressHydrationWarning===!0||Sh(e.nodeValue,n)),e||Sa(t,!0)}else e=dr(e).createTextNode(a),e[wt]=t,t.stateNode=e}return Ct(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(a=Dl(t),n!==null){if(e===null){if(!a)throw Error(d(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(d(557));e[wt]=t}else Pa(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ct(t),e=!1}else n=ms(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(xn(t),t):(xn(t),null);if((t.flags&128)!==0)throw Error(d(558))}return Ct(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(l=Dl(t),a!==null&&a.dehydrated!==null){if(e===null){if(!l)throw Error(d(318));if(l=t.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(d(317));l[wt]=t}else Pa(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ct(t),l=!1}else l=ms(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),l=!0;if(!l)return t.flags&256?(xn(t),t):(xn(t),null)}return xn(t),(t.flags&128)!==0?(t.lanes=n,t):(n=a!==null,e=e!==null&&e.memoizedState!==null,n&&(a=t.child,l=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(l=a.alternate.memoizedState.cachePool.pool),i=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(i=a.memoizedState.cachePool.pool),i!==l&&(a.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),$o(t,t.updateQueue),Ct(t),null);case 4:return Le(),e===null&&Dc(t.stateNode.containerInfo),Ct(t),null;case 10:return aa(t.type),Ct(t),null;case 19:if(L(_t),a=t.memoizedState,a===null)return Ct(t),null;if(l=(t.flags&128)!==0,i=a.rendering,i===null)if(l)_i(a,!1);else{if(Et!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=Bo(e),i!==null){for(t.flags|=128,_i(a,!1),e=i.updateQueue,t.updateQueue=e,$o(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Iu(n,e),n=n.sibling;return I(_t,_t.current&1|2),Fe&&ta(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&de()>tr&&(t.flags|=128,l=!0,_i(a,!1),t.lanes=4194304)}else{if(!l)if(e=Bo(i),e!==null){if(t.flags|=128,l=!0,e=e.updateQueue,t.updateQueue=e,$o(t,e),_i(a,!0),a.tail===null&&a.tailMode==="hidden"&&!i.alternate&&!Fe)return Ct(t),null}else 2*de()-a.renderingStartTime>tr&&n!==536870912&&(t.flags|=128,l=!0,_i(a,!1),t.lanes=4194304);a.isBackwards?(i.sibling=t.child,t.child=i):(e=a.last,e!==null?e.sibling=i:t.child=i,a.last=i)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=de(),e.sibling=null,n=_t.current,I(_t,l?n&1|2:n&1),Fe&&ta(t,a.treeForkCount),e):(Ct(t),null);case 22:case 23:return xn(t),Es(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(n&536870912)!==0&&(t.flags&128)===0&&(Ct(t),t.subtreeFlags&6&&(t.flags|=8192)):Ct(t),n=t.updateQueue,n!==null&&$o(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==n&&(t.flags|=2048),e!==null&&L(nl),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),aa(Lt),Ct(t),null;case 25:return null;case 30:return null}throw Error(d(156,t.tag))}function P0(e,t){switch(hs(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return aa(Lt),Le(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Je(t),null;case 31:if(t.memoizedState!==null){if(xn(t),t.alternate===null)throw Error(d(340));Pa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(xn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(d(340));Pa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return L(_t),null;case 4:return Le(),null;case 10:return aa(t.type),null;case 22:case 23:return xn(t),Es(),e!==null&&L(nl),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return aa(Lt),null;case 25:return null;default:return null}}function kf(e,t){switch(hs(t),t.tag){case 3:aa(Lt),Le();break;case 26:case 27:case 5:Je(t);break;case 4:Le();break;case 31:t.memoizedState!==null&&xn(t);break;case 13:xn(t);break;case 19:L(_t);break;case 10:aa(t.type);break;case 22:case 23:xn(t),Es(),e!==null&&L(nl);break;case 24:aa(Lt)}}function Oi(e,t){try{var n=t.updateQueue,a=n!==null?n.lastEffect:null;if(a!==null){var l=a.next;n=l;do{if((n.tag&e)===e){a=void 0;var i=n.create,c=n.inst;a=i(),c.destroy=a}n=n.next}while(n!==l)}}catch(p){ct(t,t.return,p)}}function Ea(e,t,n){try{var a=t.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var i=l.next;a=i;do{if((a.tag&e)===e){var c=a.inst,p=c.destroy;if(p!==void 0){c.destroy=void 0,l=t;var x=n,T=p;try{T()}catch(H){ct(l,x,H)}}}a=a.next}while(a!==i)}}catch(H){ct(t,t.return,H)}}function Df(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{gd(t,n)}catch(a){ct(e,e.return,a)}}}function Ef(e,t,n){n.props=rl(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(a){ct(e,t,a)}}function Li(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof n=="function"?e.refCleanup=n(a):n.current=a}}catch(l){ct(e,t,l)}}function Xn(e,t){var n=e.ref,a=e.refCleanup;if(n!==null)if(typeof a=="function")try{a()}catch(l){ct(e,t,l)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(l){ct(e,t,l)}else n.current=null}function Af(e){var t=e.type,n=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&a.focus();break e;case"img":n.src?a.src=n.src:n.srcSet&&(a.srcset=n.srcSet)}}catch(l){ct(e,e.return,l)}}function oc(e,t,n){try{var a=e.stateNode;Sm(a,e.type,n,t),a[Rt]=t}catch(l){ct(e,e.return,l)}}function Tf(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ua(e.type)||e.tag===4}function rc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Tf(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Ua(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function sc(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=In));else if(a!==4&&(a===27&&Ua(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(sc(e,t,n),e=e.sibling;e!==null;)sc(e,t,n),e=e.sibling}function Wo(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(a!==4&&(a===27&&Ua(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Wo(e,t,n),e=e.sibling;e!==null;)Wo(e,t,n),e=e.sibling}function Rf(e){var t=e.stateNode,n=e.memoizedProps;try{for(var a=e.type,l=t.attributes;l.length;)t.removeAttributeNode(l[0]);$t(t,a,n),t[wt]=e,t[Rt]=n}catch(i){ct(e,e.return,i)}}var sa=!1,Bt=!1,cc=!1,_f=typeof WeakSet=="function"?WeakSet:Set,Xt=null;function em(e,t){if(e=e.containerInfo,Tc=br,e=Xu(e),ns(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var a=n.getSelection&&n.getSelection();if(a&&a.rangeCount!==0){n=a.anchorNode;var l=a.anchorOffset,i=a.focusNode;a=a.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var c=0,p=-1,x=-1,T=0,H=0,q=e,_=null;t:for(;;){for(var O;q!==n||l!==0&&q.nodeType!==3||(p=c+l),q!==i||a!==0&&q.nodeType!==3||(x=c+a),q.nodeType===3&&(c+=q.nodeValue.length),(O=q.firstChild)!==null;)_=q,q=O;for(;;){if(q===e)break t;if(_===n&&++T===l&&(p=c),_===i&&++H===a&&(x=c),(O=q.nextSibling)!==null)break;q=_,_=q.parentNode}q=O}n=p===-1||x===-1?null:{start:p,end:x}}else n=null}n=n||{start:0,end:0}}else n=null;for(Rc={focusedElem:e,selectionRange:n},br=!1,Xt=t;Xt!==null;)if(t=Xt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Xt=e;else for(;Xt!==null;){switch(t=Xt,i=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n<e.length;n++)l=e[n],l.ref.impl=l.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&i!==null){e=void 0,n=t,l=i.memoizedProps,i=i.memoizedState,a=n.stateNode;try{var fe=rl(n.type,l);e=a.getSnapshotBeforeUpdate(fe,i),a.__reactInternalSnapshotBeforeUpdate=e}catch(ke){ct(n,n.return,ke)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)Lc(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Lc(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(d(163))}if(e=t.sibling,e!==null){e.return=t.return,Xt=e;break}Xt=t.return}}function Of(e,t,n){var a=n.flags;switch(n.tag){case 0:case 11:case 15:ua(e,n),a&4&&Oi(5,n);break;case 1:if(ua(e,n),a&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(c){ct(n,n.return,c)}else{var l=rl(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(l,t,e.__reactInternalSnapshotBeforeUpdate)}catch(c){ct(n,n.return,c)}}a&64&&Df(n),a&512&&Li(n,n.return);break;case 3:if(ua(e,n),a&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{gd(e,t)}catch(c){ct(n,n.return,c)}}break;case 27:t===null&&a&4&&Rf(n);case 26:case 5:ua(e,n),t===null&&a&4&&Af(n),a&512&&Li(n,n.return);break;case 12:ua(e,n);break;case 31:ua(e,n),a&4&&Hf(e,n);break;case 13:ua(e,n),a&4&&Bf(e,n),a&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=cm.bind(null,n),Am(e,n))));break;case 22:if(a=n.memoizedState!==null||sa,!a){t=t!==null&&t.memoizedState!==null||Bt,l=sa;var i=Bt;sa=a,(Bt=t)&&!i?da(e,n,(n.subtreeFlags&8772)!==0):ua(e,n),sa=l,Bt=i}break;case 30:break;default:ua(e,n)}}function Lf(e){var t=e.alternate;t!==null&&(e.alternate=null,Lf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ri(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var zt=null,sn=!1;function ca(e,t,n){for(n=n.child;n!==null;)Uf(e,t,n),n=n.sibling}function Uf(e,t,n){if(Me&&typeof Me.onCommitFiberUnmount=="function")try{Me.onCommitFiberUnmount(Ne,n)}catch{}switch(n.tag){case 26:Bt||Xn(n,t),ca(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Bt||Xn(n,t);var a=zt,l=sn;Ua(n.type)&&(zt=n.stateNode,sn=!1),ca(e,t,n),Xi(n.stateNode),zt=a,sn=l;break;case 5:Bt||Xn(n,t);case 6:if(a=zt,l=sn,zt=null,ca(e,t,n),zt=a,sn=l,zt!==null)if(sn)try{(zt.nodeType===9?zt.body:zt.nodeName==="HTML"?zt.ownerDocument.body:zt).removeChild(n.stateNode)}catch(i){ct(n,t,i)}else try{zt.removeChild(n.stateNode)}catch(i){ct(n,t,i)}break;case 18:zt!==null&&(sn?(e=zt,Dh(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Fl(e)):Dh(zt,n.stateNode));break;case 4:a=zt,l=sn,zt=n.stateNode.containerInfo,sn=!0,ca(e,t,n),zt=a,sn=l;break;case 0:case 11:case 14:case 15:Ea(2,n,t),Bt||Ea(4,n,t),ca(e,t,n);break;case 1:Bt||(Xn(n,t),a=n.stateNode,typeof a.componentWillUnmount=="function"&&Ef(n,t,a)),ca(e,t,n);break;case 21:ca(e,t,n);break;case 22:Bt=(a=Bt)||n.memoizedState!==null,ca(e,t,n),Bt=a;break;default:ca(e,t,n)}}function Hf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Fl(e)}catch(n){ct(t,t.return,n)}}}function Bf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Fl(e)}catch(n){ct(t,t.return,n)}}function tm(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new _f),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new _f),t;default:throw Error(d(435,e.tag))}}function Io(e,t){var n=tm(e);t.forEach(function(a){if(!n.has(a)){n.add(a);var l=um.bind(null,e,a);a.then(l,l)}})}function cn(e,t){var n=t.deletions;if(n!==null)for(var a=0;a<n.length;a++){var l=n[a],i=e,c=t,p=c;e:for(;p!==null;){switch(p.tag){case 27:if(Ua(p.type)){zt=p.stateNode,sn=!1;break e}break;case 5:zt=p.stateNode,sn=!1;break e;case 3:case 4:zt=p.stateNode.containerInfo,sn=!0;break e}p=p.return}if(zt===null)throw Error(d(160));Uf(i,c,l),zt=null,sn=!1,i=l.alternate,i!==null&&(i.return=null),l.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Nf(t,e),t=t.sibling}var Bn=null;function Nf(e,t){var n=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:cn(t,e),un(e),a&4&&(Ea(3,e,e.return),Oi(3,e),Ea(5,e,e.return));break;case 1:cn(t,e),un(e),a&512&&(Bt||n===null||Xn(n,n.return)),a&64&&sa&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?a:n.concat(a))));break;case 26:var l=Bn;if(cn(t,e),un(e),a&512&&(Bt||n===null||Xn(n,n.return)),a&4){var i=n!==null?n.memoizedState:null;if(a=e.memoizedState,n===null)if(a===null)if(e.stateNode===null){e:{a=e.type,n=e.memoizedProps,l=l.ownerDocument||l;t:switch(a){case"title":i=l.getElementsByTagName("title")[0],(!i||i[Za]||i[wt]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=l.createElement(a),l.head.insertBefore(i,l.querySelector("head > title"))),$t(i,a,n),i[wt]=e,ge(i),a=i;break e;case"link":var c=Nh("link","href",l).get(a+(n.href||""));if(c){for(var p=0;p<c.length;p++)if(i=c[p],i.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&i.getAttribute("rel")===(n.rel==null?null:n.rel)&&i.getAttribute("title")===(n.title==null?null:n.title)&&i.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){c.splice(p,1);break t}}i=l.createElement(a),$t(i,a,n),l.head.appendChild(i);break;case"meta":if(c=Nh("meta","content",l).get(a+(n.content||""))){for(p=0;p<c.length;p++)if(i=c[p],i.getAttribute("content")===(n.content==null?null:""+n.content)&&i.getAttribute("name")===(n.name==null?null:n.name)&&i.getAttribute("property")===(n.property==null?null:n.property)&&i.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&i.getAttribute("charset")===(n.charSet==null?null:n.charSet)){c.splice(p,1);break t}}i=l.createElement(a),$t(i,a,n),l.head.appendChild(i);break;default:throw Error(d(468,a))}i[wt]=e,ge(i),a=i}e.stateNode=a}else jh(l,e.type,e.stateNode);else e.stateNode=Bh(l,a,e.memoizedProps);else i!==a?(i===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):i.count--,a===null?jh(l,e.type,e.stateNode):Bh(l,a,e.memoizedProps)):a===null&&e.stateNode!==null&&oc(e,e.memoizedProps,n.memoizedProps)}break;case 27:cn(t,e),un(e),a&512&&(Bt||n===null||Xn(n,n.return)),n!==null&&a&4&&oc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(cn(t,e),un(e),a&512&&(Bt||n===null||Xn(n,n.return)),e.flags&32){l=e.stateNode;try{yl(l,"")}catch(fe){ct(e,e.return,fe)}}a&4&&e.stateNode!=null&&(l=e.memoizedProps,oc(e,l,n!==null?n.memoizedProps:l)),a&1024&&(cc=!0);break;case 6:if(cn(t,e),un(e),a&4){if(e.stateNode===null)throw Error(d(162));a=e.memoizedProps,n=e.stateNode;try{n.nodeValue=a}catch(fe){ct(e,e.return,fe)}}break;case 3:if(pr=null,l=Bn,Bn=fr(t.containerInfo),cn(t,e),Bn=l,un(e),a&4&&n!==null&&n.memoizedState.isDehydrated)try{Fl(t.containerInfo)}catch(fe){ct(e,e.return,fe)}cc&&(cc=!1,jf(e));break;case 4:a=Bn,Bn=fr(e.stateNode.containerInfo),cn(t,e),un(e),Bn=a;break;case 12:cn(t,e),un(e);break;case 31:cn(t,e),un(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Io(e,a)));break;case 13:cn(t,e),un(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(er=de()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Io(e,a)));break;case 22:l=e.memoizedState!==null;var x=n!==null&&n.memoizedState!==null,T=sa,H=Bt;if(sa=T||l,Bt=H||x,cn(t,e),Bt=H,sa=T,un(e),a&8192)e:for(t=e.stateNode,t._visibility=l?t._visibility&-2:t._visibility|1,l&&(n===null||x||sa||Bt||sl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){x=n=t;try{if(i=x.stateNode,l)c=i.style,typeof c.setProperty=="function"?c.setProperty("display","none","important"):c.display="none";else{p=x.stateNode;var q=x.memoizedProps.style,_=q!=null&&q.hasOwnProperty("display")?q.display:null;p.style.display=_==null||typeof _=="boolean"?"":(""+_).trim()}}catch(fe){ct(x,x.return,fe)}}}else if(t.tag===6){if(n===null){x=t;try{x.stateNode.nodeValue=l?"":x.memoizedProps}catch(fe){ct(x,x.return,fe)}}}else if(t.tag===18){if(n===null){x=t;try{var O=x.stateNode;l?Eh(O,!0):Eh(x.stateNode,!1)}catch(fe){ct(x,x.return,fe)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}a&4&&(a=e.updateQueue,a!==null&&(n=a.retryQueue,n!==null&&(a.retryQueue=null,Io(e,n))));break;case 19:cn(t,e),un(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Io(e,a)));break;case 30:break;case 21:break;default:cn(t,e),un(e)}}function un(e){var t=e.flags;if(t&2){try{for(var n,a=e.return;a!==null;){if(Tf(a)){n=a;break}a=a.return}if(n==null)throw Error(d(160));switch(n.tag){case 27:var l=n.stateNode,i=rc(e);Wo(e,i,l);break;case 5:var c=n.stateNode;n.flags&32&&(yl(c,""),n.flags&=-33);var p=rc(e);Wo(e,p,c);break;case 3:case 4:var x=n.stateNode.containerInfo,T=rc(e);sc(e,T,x);break;default:throw Error(d(161))}}catch(H){ct(e,e.return,H)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function jf(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;jf(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ua(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Of(e,t.alternate,t),t=t.sibling}function sl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ea(4,t,t.return),sl(t);break;case 1:Xn(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&Ef(t,t.return,n),sl(t);break;case 27:Xi(t.stateNode);case 26:case 5:Xn(t,t.return),sl(t);break;case 22:t.memoizedState===null&&sl(t);break;case 30:sl(t);break;default:sl(t)}e=e.sibling}}function da(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,l=e,i=t,c=i.flags;switch(i.tag){case 0:case 11:case 15:da(l,i,n),Oi(4,i);break;case 1:if(da(l,i,n),a=i,l=a.stateNode,typeof l.componentDidMount=="function")try{l.componentDidMount()}catch(T){ct(a,a.return,T)}if(a=i,l=a.updateQueue,l!==null){var p=a.stateNode;try{var x=l.shared.hiddenCallbacks;if(x!==null)for(l.shared.hiddenCallbacks=null,l=0;l<x.length;l++)md(x[l],p)}catch(T){ct(a,a.return,T)}}n&&c&64&&Df(i),Li(i,i.return);break;case 27:Rf(i);case 26:case 5:da(l,i,n),n&&a===null&&c&4&&Af(i),Li(i,i.return);break;case 12:da(l,i,n);break;case 31:da(l,i,n),n&&c&4&&Hf(l,i);break;case 13:da(l,i,n),n&&c&4&&Bf(l,i);break;case 22:i.memoizedState===null&&da(l,i,n),Li(i,i.return);break;case 30:break;default:da(l,i,n)}t=t.sibling}}function uc(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&xi(n))}function dc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&xi(e))}function Nn(e,t,n,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)qf(e,t,n,a),t=t.sibling}function qf(e,t,n,a){var l=t.flags;switch(t.tag){case 0:case 11:case 15:Nn(e,t,n,a),l&2048&&Oi(9,t);break;case 1:Nn(e,t,n,a);break;case 3:Nn(e,t,n,a),l&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&xi(e)));break;case 12:if(l&2048){Nn(e,t,n,a),e=t.stateNode;try{var i=t.memoizedProps,c=i.id,p=i.onPostCommit;typeof p=="function"&&p(c,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(x){ct(t,t.return,x)}}else Nn(e,t,n,a);break;case 31:Nn(e,t,n,a);break;case 13:Nn(e,t,n,a);break;case 23:break;case 22:i=t.stateNode,c=t.alternate,t.memoizedState!==null?i._visibility&2?Nn(e,t,n,a):Ui(e,t):i._visibility&2?Nn(e,t,n,a):(i._visibility|=2,Bl(e,t,n,a,(t.subtreeFlags&10256)!==0||!1)),l&2048&&uc(c,t);break;case 24:Nn(e,t,n,a),l&2048&&dc(t.alternate,t);break;default:Nn(e,t,n,a)}}function Bl(e,t,n,a,l){for(l=l&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var i=e,c=t,p=n,x=a,T=c.flags;switch(c.tag){case 0:case 11:case 15:Bl(i,c,p,x,l),Oi(8,c);break;case 23:break;case 22:var H=c.stateNode;c.memoizedState!==null?H._visibility&2?Bl(i,c,p,x,l):Ui(i,c):(H._visibility|=2,Bl(i,c,p,x,l)),l&&T&2048&&uc(c.alternate,c);break;case 24:Bl(i,c,p,x,l),l&&T&2048&&dc(c.alternate,c);break;default:Bl(i,c,p,x,l)}t=t.sibling}}function Ui(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,a=t,l=a.flags;switch(a.tag){case 22:Ui(n,a),l&2048&&uc(a.alternate,a);break;case 24:Ui(n,a),l&2048&&dc(a.alternate,a);break;default:Ui(n,a)}t=t.sibling}}var Hi=8192;function Nl(e,t,n){if(e.subtreeFlags&Hi)for(e=e.child;e!==null;)Yf(e,t,n),e=e.sibling}function Yf(e,t,n){switch(e.tag){case 26:Nl(e,t,n),e.flags&Hi&&e.memoizedState!==null&&Ym(n,Bn,e.memoizedState,e.memoizedProps);break;case 5:Nl(e,t,n);break;case 3:case 4:var a=Bn;Bn=fr(e.stateNode.containerInfo),Nl(e,t,n),Bn=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=Hi,Hi=16777216,Nl(e,t,n),Hi=a):Nl(e,t,n));break;default:Nl(e,t,n)}}function Gf(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Bi(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];Xt=a,Vf(a,e)}Gf(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Xf(e),e=e.sibling}function Xf(e){switch(e.tag){case 0:case 11:case 15:Bi(e),e.flags&2048&&Ea(9,e,e.return);break;case 3:Bi(e);break;case 12:Bi(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Po(e)):Bi(e);break;default:Bi(e)}}function Po(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];Xt=a,Vf(a,e)}Gf(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ea(8,t,t.return),Po(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Po(t));break;default:Po(t)}e=e.sibling}}function Vf(e,t){for(;Xt!==null;){var n=Xt;switch(n.tag){case 0:case 11:case 15:Ea(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var a=n.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:xi(n.memoizedState.cache)}if(a=n.child,a!==null)a.return=n,Xt=a;else e:for(n=e;Xt!==null;){a=Xt;var l=a.sibling,i=a.return;if(Lf(a),a===n){Xt=null;break e}if(l!==null){l.return=i,Xt=l;break e}Xt=i}}}var nm={getCacheForType:function(e){var t=Ft(Lt),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Ft(Lt).controller.signal}},am=typeof WeakMap=="function"?WeakMap:Map,et=0,gt=null,Ve=null,Ke=0,st=0,Sn=null,Aa=!1,jl=!1,fc=!1,fa=0,Et=0,Ta=0,cl=0,hc=0,Cn=0,ql=0,Ni=null,dn=null,pc=!1,er=0,Qf=0,tr=1/0,nr=null,Ra=null,Yt=0,_a=null,Yl=null,ha=0,mc=0,gc=null,Kf=null,ji=0,yc=null;function wn(){return(et&2)!==0&&Ke!==0?Ke&-Ke:E.T!==null?wc():fo()}function Zf(){if(Cn===0)if((Ke&536870912)===0||Fe){var e=hl;hl<<=1,(hl&3932160)===0&&(hl=262144),Cn=e}else Cn=536870912;return e=vn.current,e!==null&&(e.flags|=32),Cn}function fn(e,t,n){(e===gt&&(st===2||st===9)||e.cancelPendingCommit!==null)&&(Gl(e,0),Oa(e,Ke,Cn,!1)),Ka(e,n),((et&2)===0||e!==gt)&&(e===gt&&((et&2)===0&&(cl|=n),Et===4&&Oa(e,Ke,Cn,!1)),Vn(e))}function Ff(e,t,n){if((et&6)!==0)throw Error(d(327));var a=!n&&(t&127)===0&&(t&e.expiredLanes)===0||Qa(e,t),l=a?om(e,t):vc(e,t,!0),i=a;do{if(l===0){jl&&!a&&Oa(e,t,0,!1);break}else{if(n=e.current.alternate,i&&!lm(n)){l=vc(e,t,!1),i=!1;continue}if(l===2){if(i=t,e.errorRecoveryDisabledLanes&i)var c=0;else c=e.pendingLanes&-536870913,c=c!==0?c:c&536870912?536870912:0;if(c!==0){t=c;e:{var p=e;l=Ni;var x=p.current.memoizedState.isDehydrated;if(x&&(Gl(p,c).flags|=256),c=vc(p,c,!1),c!==2){if(fc&&!x){p.errorRecoveryDisabledLanes|=i,cl|=i,l=4;break e}i=dn,dn=l,i!==null&&(dn===null?dn=i:dn.push.apply(dn,i))}l=c}if(i=!1,l!==2)continue}}if(l===1){Gl(e,0),Oa(e,t,0,!0);break}e:{switch(a=e,i=l,i){case 0:case 1:throw Error(d(345));case 4:if((t&4194048)!==t)break;case 6:Oa(a,t,Cn,!Aa);break e;case 2:dn=null;break;case 3:case 5:break;default:throw Error(d(329))}if((t&62914560)===t&&(l=er+300-de(),10<l)){if(Oa(a,t,Cn,!Aa),pl(a,0,!0)!==0)break e;ha=t,a.timeoutHandle=Mh(Jf.bind(null,a,n,dn,nr,pc,t,Cn,cl,ql,Aa,i,"Throttled",-0,0),l);break e}Jf(a,n,dn,nr,pc,t,Cn,cl,ql,Aa,i,null,-0,0)}}break}while(!0);Vn(e)}function Jf(e,t,n,a,l,i,c,p,x,T,H,q,_,O){if(e.timeoutHandle=-1,q=t.subtreeFlags,q&8192||(q&16785408)===16785408){q={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:In},Yf(t,i,q);var fe=(i&62914560)===i?er-de():(i&4194048)===i?Qf-de():0;if(fe=Gm(q,fe),fe!==null){ha=i,e.cancelPendingCommit=fe(ah.bind(null,e,t,i,n,a,l,c,p,x,H,q,null,_,O)),Oa(e,i,c,!T);return}}ah(e,t,i,n,a,l,c,p,x)}function lm(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var a=0;a<n.length;a++){var l=n[a],i=l.getSnapshot;l=l.value;try{if(!yn(i(),l))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Oa(e,t,n,a){t&=~hc,t&=~cl,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var l=t;0<l;){var i=31-Tt(l),c=1<<i;a[i]=-1,l&=~c}n!==0&&co(e,n,t)}function ar(){return(et&6)===0?(qi(0),!1):!0}function bc(){if(Ve!==null){if(st===0)var e=Ve.return;else e=Ve,na=el=null,Ls(e),_l=null,Ci=0,e=Ve;for(;e!==null;)kf(e.alternate,e),e=e.return;Ve=null}}function Gl(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,zm(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),ha=0,bc(),gt=e,Ve=n=ea(e.current,null),Ke=t,st=0,Sn=null,Aa=!1,jl=Qa(e,t),fc=!1,ql=Cn=hc=cl=Ta=Et=0,dn=Ni=null,pc=!1,(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var l=31-Tt(a),i=1<<l;t|=e[l],a&=~i}return fa=t,zo(),n}function $f(e,t){qe=null,E.H=Ti,t===Rl||t===_o?(t=dd(),st=3):t===Cs?(t=dd(),st=4):st=t===$s?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Sn=t,Ve===null&&(Et=1,Ko(e,En(t,e.current)))}function Wf(){var e=vn.current;return e===null?!0:(Ke&4194048)===Ke?_n===null:(Ke&62914560)===Ke||(Ke&536870912)!==0?e===_n:!1}function If(){var e=E.H;return E.H=Ti,e===null?Ti:e}function Pf(){var e=E.A;return E.A=nm,e}function lr(){Et=4,Aa||(Ke&4194048)!==Ke&&vn.current!==null||(jl=!0),(Ta&134217727)===0&&(cl&134217727)===0||gt===null||Oa(gt,Ke,Cn,!1)}function vc(e,t,n){var a=et;et|=2;var l=If(),i=Pf();(gt!==e||Ke!==t)&&(nr=null,Gl(e,t)),t=!1;var c=Et;e:do try{if(st!==0&&Ve!==null){var p=Ve,x=Sn;switch(st){case 8:bc(),c=6;break e;case 3:case 2:case 9:case 6:vn.current===null&&(t=!0);var T=st;if(st=0,Sn=null,Xl(e,p,x,T),n&&jl){c=0;break e}break;default:T=st,st=0,Sn=null,Xl(e,p,x,T)}}im(),c=Et;break}catch(H){$f(e,H)}while(!0);return t&&e.shellSuspendCounter++,na=el=null,et=a,E.H=l,E.A=i,Ve===null&&(gt=null,Ke=0,zo()),c}function im(){for(;Ve!==null;)eh(Ve)}function om(e,t){var n=et;et|=2;var a=If(),l=Pf();gt!==e||Ke!==t?(nr=null,tr=de()+500,Gl(e,t)):jl=Qa(e,t);e:do try{if(st!==0&&Ve!==null){t=Ve;var i=Sn;t:switch(st){case 1:st=0,Sn=null,Xl(e,t,i,1);break;case 2:case 9:if(cd(i)){st=0,Sn=null,th(t);break}t=function(){st!==2&&st!==9||gt!==e||(st=7),Vn(e)},i.then(t,t);break e;case 3:st=7;break e;case 4:st=5;break e;case 7:cd(i)?(st=0,Sn=null,th(t)):(st=0,Sn=null,Xl(e,t,i,7));break;case 5:var c=null;switch(Ve.tag){case 26:c=Ve.memoizedState;case 5:case 27:var p=Ve;if(c?qh(c):p.stateNode.complete){st=0,Sn=null;var x=p.sibling;if(x!==null)Ve=x;else{var T=p.return;T!==null?(Ve=T,ir(T)):Ve=null}break t}}st=0,Sn=null,Xl(e,t,i,5);break;case 6:st=0,Sn=null,Xl(e,t,i,6);break;case 8:bc(),Et=6;break e;default:throw Error(d(462))}}rm();break}catch(H){$f(e,H)}while(!0);return na=el=null,E.H=a,E.A=l,et=n,Ve!==null?0:(gt=null,Ke=0,zo(),Et)}function rm(){for(;Ve!==null&&!xt();)eh(Ve)}function eh(e){var t=zf(e.alternate,e,fa);e.memoizedProps=e.pendingProps,t===null?ir(e):Ve=t}function th(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=bf(n,t,t.pendingProps,t.type,void 0,Ke);break;case 11:t=bf(n,t,t.pendingProps,t.type.render,t.ref,Ke);break;case 5:Ls(t);default:kf(n,t),t=Ve=Iu(t,fa),t=zf(n,t,fa)}e.memoizedProps=e.pendingProps,t===null?ir(e):Ve=t}function Xl(e,t,n,a){na=el=null,Ls(t),_l=null,Ci=0;var l=t.return;try{if(J0(e,l,t,n,Ke)){Et=1,Ko(e,En(n,e.current)),Ve=null;return}}catch(i){if(l!==null)throw Ve=l,i;Et=1,Ko(e,En(n,e.current)),Ve=null;return}t.flags&32768?(Fe||a===1?e=!0:jl||(Ke&536870912)!==0?e=!1:(Aa=e=!0,(a===2||a===9||a===3||a===6)&&(a=vn.current,a!==null&&a.tag===13&&(a.flags|=16384))),nh(t,e)):ir(t)}function ir(e){var t=e;do{if((t.flags&32768)!==0){nh(t,Aa);return}e=t.return;var n=I0(t.alternate,t,fa);if(n!==null){Ve=n;return}if(t=t.sibling,t!==null){Ve=t;return}Ve=t=e}while(t!==null);Et===0&&(Et=5)}function nh(e,t){do{var n=P0(e.alternate,e);if(n!==null){n.flags&=32767,Ve=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Ve=e;return}Ve=e=n}while(e!==null);Et=6,Ve=null}function ah(e,t,n,a,l,i,c,p,x){e.cancelPendingCommit=null;do or();while(Yt!==0);if((et&6)!==0)throw Error(d(327));if(t!==null){if(t===e.current)throw Error(d(177));if(i=t.lanes|t.childLanes,i|=rs,jr(e,n,i,c,p,x),e===gt&&(Ve=gt=null,Ke=0),Yl=t,_a=e,ha=n,mc=i,gc=l,Kf=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,dm(Pt,function(){return sh(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=E.T,E.T=null,l=J.p,J.p=2,c=et,et|=4;try{em(e,t,n)}finally{et=c,J.p=l,E.T=a}}Yt=1,lh(),ih(),oh()}}function lh(){if(Yt===1){Yt=0;var e=_a,t=Yl,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=E.T,E.T=null;var a=J.p;J.p=2;var l=et;et|=4;try{Nf(t,e);var i=Rc,c=Xu(e.containerInfo),p=i.focusedElem,x=i.selectionRange;if(c!==p&&p&&p.ownerDocument&&Gu(p.ownerDocument.documentElement,p)){if(x!==null&&ns(p)){var T=x.start,H=x.end;if(H===void 0&&(H=T),"selectionStart"in p)p.selectionStart=T,p.selectionEnd=Math.min(H,p.value.length);else{var q=p.ownerDocument||document,_=q&&q.defaultView||window;if(_.getSelection){var O=_.getSelection(),fe=p.textContent.length,ke=Math.min(x.start,fe),pt=x.end===void 0?ke:Math.min(x.end,fe);!O.extend&&ke>pt&&(c=pt,pt=ke,ke=c);var M=Yu(p,ke),z=Yu(p,pt);if(M&&z&&(O.rangeCount!==1||O.anchorNode!==M.node||O.anchorOffset!==M.offset||O.focusNode!==z.node||O.focusOffset!==z.offset)){var A=q.createRange();A.setStart(M.node,M.offset),O.removeAllRanges(),ke>pt?(O.addRange(A),O.extend(z.node,z.offset)):(A.setEnd(z.node,z.offset),O.addRange(A))}}}}for(q=[],O=p;O=O.parentNode;)O.nodeType===1&&q.push({element:O,left:O.scrollLeft,top:O.scrollTop});for(typeof p.focus=="function"&&p.focus(),p=0;p<q.length;p++){var j=q[p];j.element.scrollLeft=j.left,j.element.scrollTop=j.top}}br=!!Tc,Rc=Tc=null}finally{et=l,J.p=a,E.T=n}}e.current=t,Yt=2}}function ih(){if(Yt===2){Yt=0;var e=_a,t=Yl,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=E.T,E.T=null;var a=J.p;J.p=2;var l=et;et|=4;try{Of(e,t.alternate,t)}finally{et=l,J.p=a,E.T=n}}Yt=3}}function oh(){if(Yt===4||Yt===3){Yt=0,ma();var e=_a,t=Yl,n=ha,a=Kf;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Yt=5:(Yt=0,Yl=_a=null,rh(e,e.pendingLanes));var l=e.pendingLanes;if(l===0&&(Ra=null),ii(n),t=t.stateNode,Me&&typeof Me.onCommitFiberRoot=="function")try{Me.onCommitFiberRoot(Ne,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=E.T,l=J.p,J.p=2,E.T=null;try{for(var i=e.onRecoverableError,c=0;c<a.length;c++){var p=a[c];i(p.value,{componentStack:p.stack})}}finally{E.T=t,J.p=l}}(ha&3)!==0&&or(),Vn(e),l=e.pendingLanes,(n&261930)!==0&&(l&42)!==0?e===yc?ji++:(ji=0,yc=e):ji=0,qi(0)}}function rh(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,xi(t)))}function or(){return lh(),ih(),oh(),sh()}function sh(){if(Yt!==5)return!1;var e=_a,t=mc;mc=0;var n=ii(ha),a=E.T,l=J.p;try{J.p=32>n?32:n,E.T=null,n=gc,gc=null;var i=_a,c=ha;if(Yt=0,Yl=_a=null,ha=0,(et&6)!==0)throw Error(d(331));var p=et;if(et|=4,Xf(i.current),qf(i,i.current,c,n),et=p,qi(0,!1),Me&&typeof Me.onPostCommitFiberRoot=="function")try{Me.onPostCommitFiberRoot(Ne,i)}catch{}return!0}finally{J.p=l,E.T=a,rh(e,t)}}function ch(e,t,n){t=En(n,t),t=Js(e.stateNode,t,2),e=Ma(e,t,2),e!==null&&(Ka(e,2),Vn(e))}function ct(e,t,n){if(e.tag===3)ch(e,e,n);else for(;t!==null;){if(t.tag===3){ch(t,e,n);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Ra===null||!Ra.has(a))){e=En(n,e),n=uf(2),a=Ma(t,n,2),a!==null&&(df(n,a,t,e),Ka(a,2),Vn(a));break}}t=t.return}}function xc(e,t,n){var a=e.pingCache;if(a===null){a=e.pingCache=new am;var l=new Set;a.set(t,l)}else l=a.get(t),l===void 0&&(l=new Set,a.set(t,l));l.has(n)||(fc=!0,l.add(n),e=sm.bind(null,e,t,n),t.then(e,e))}function sm(e,t,n){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,gt===e&&(Ke&n)===n&&(Et===4||Et===3&&(Ke&62914560)===Ke&&300>de()-er?(et&2)===0&&Gl(e,0):hc|=n,ql===Ke&&(ql=0)),Vn(e)}function uh(e,t){t===0&&(t=so()),e=Wa(e,t),e!==null&&(Ka(e,t),Vn(e))}function cm(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),uh(e,n)}function um(e,t){var n=0;switch(e.tag){case 31:case 13:var a=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(d(314))}a!==null&&a.delete(t),uh(e,n)}function dm(e,t){return lt(e,t)}var rr=null,Vl=null,Sc=!1,sr=!1,Cc=!1,La=0;function Vn(e){e!==Vl&&e.next===null&&(Vl===null?rr=Vl=e:Vl=Vl.next=e),sr=!0,Sc||(Sc=!0,hm())}function qi(e,t){if(!Cc&&sr){Cc=!0;do for(var n=!1,a=rr;a!==null;){if(e!==0){var l=a.pendingLanes;if(l===0)var i=0;else{var c=a.suspendedLanes,p=a.pingedLanes;i=(1<<31-Tt(42|e)+1)-1,i&=l&~(c&~p),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(n=!0,ph(a,i))}else i=Ke,i=pl(a,a===gt?i:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(i&3)===0||Qa(a,i)||(n=!0,ph(a,i));a=a.next}while(n);Cc=!1}}function fm(){dh()}function dh(){sr=Sc=!1;var e=0;La!==0&&wm()&&(e=La);for(var t=de(),n=null,a=rr;a!==null;){var l=a.next,i=fh(a,t);i===0?(a.next=null,n===null?rr=l:n.next=l,l===null&&(Vl=n)):(n=a,(e!==0||(i&3)!==0)&&(sr=!0)),a=l}Yt!==0&&Yt!==5||qi(e),La!==0&&(La=0)}function fh(e,t){for(var n=e.suspendedLanes,a=e.pingedLanes,l=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var c=31-Tt(i),p=1<<c,x=l[c];x===-1?((p&n)===0||(p&a)!==0)&&(l[c]=Nr(p,t)):x<=t&&(e.expiredLanes|=p),i&=~p}if(t=gt,n=Ke,n=pl(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,n===0||e===t&&(st===2||st===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&Qt(a),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||Qa(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(a!==null&&Qt(a),ii(n)){case 2:case 8:n=Kt;break;case 32:n=Pt;break;case 268435456:n=we;break;default:n=Pt}return a=hh.bind(null,e),n=lt(n,a),e.callbackPriority=t,e.callbackNode=n,t}return a!==null&&a!==null&&Qt(a),e.callbackPriority=2,e.callbackNode=null,2}function hh(e,t){if(Yt!==0&&Yt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(or()&&e.callbackNode!==n)return null;var a=Ke;return a=pl(e,e===gt?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(Ff(e,a,t),fh(e,de()),e.callbackNode!=null&&e.callbackNode===n?hh.bind(null,e):null)}function ph(e,t){if(or())return null;Ff(e,t,!0)}function hm(){Mm(function(){(et&6)!==0?lt(Gt,fm):dh()})}function wc(){if(La===0){var e=Al;e===0&&(e=fl,fl<<=1,(fl&261888)===0&&(fl=256)),La=e}return La}function mh(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:go(""+e)}function gh(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function pm(e,t,n,a,l){if(t==="submit"&&n&&n.stateNode===l){var i=mh((l[Rt]||null).action),c=a.submitter;c&&(t=(t=c[Rt]||null)?mh(t.formAction):c.getAttribute("formAction"),t!==null&&(i=t,c=null));var p=new xo("action","action",null,a,l);e.push({event:p,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(La!==0){var x=c?gh(l,c):new FormData(l);Xs(n,{pending:!0,data:x,method:l.method,action:i},null,x)}}else typeof i=="function"&&(p.preventDefault(),x=c?gh(l,c):new FormData(l),Xs(n,{pending:!0,data:x,method:l.method,action:i},i,x))},currentTarget:l}]})}}for(var zc=0;zc<os.length;zc++){var Mc=os[zc],mm=Mc.toLowerCase(),gm=Mc[0].toUpperCase()+Mc.slice(1);Hn(mm,"on"+gm)}Hn(Ku,"onAnimationEnd"),Hn(Zu,"onAnimationIteration"),Hn(Fu,"onAnimationStart"),Hn("dblclick","onDoubleClick"),Hn("focusin","onFocus"),Hn("focusout","onBlur"),Hn(_0,"onTransitionRun"),Hn(O0,"onTransitionStart"),Hn(L0,"onTransitionCancel"),Hn(Ju,"onTransitionEnd"),We("onMouseEnter",["mouseout","mouseover"]),We("onMouseLeave",["mouseout","mouseover"]),We("onPointerEnter",["pointerout","pointerover"]),We("onPointerLeave",["pointerout","pointerover"]),$e("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),$e("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),$e("onBeforeInput",["compositionend","keypress","textInput","paste"]),$e("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),$e("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),$e("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Yi="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),ym=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Yi));function yh(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var a=e[n],l=a.event;a=a.listeners;e:{var i=void 0;if(t)for(var c=a.length-1;0<=c;c--){var p=a[c],x=p.instance,T=p.currentTarget;if(p=p.listener,x!==i&&l.isPropagationStopped())break e;i=p,l.currentTarget=T;try{i(l)}catch(H){wo(H)}l.currentTarget=null,i=x}else for(c=0;c<a.length;c++){if(p=a[c],x=p.instance,T=p.currentTarget,p=p.listener,x!==i&&l.isPropagationStopped())break e;i=p,l.currentTarget=T;try{i(l)}catch(H){wo(H)}l.currentTarget=null,i=x}}}}function Qe(e,t){var n=t[ml];n===void 0&&(n=t[ml]=new Set);var a=e+"__bubble";n.has(a)||(bh(t,e,2,!1),n.add(a))}function kc(e,t,n){var a=0;t&&(a|=4),bh(n,e,a,t)}var cr="_reactListening"+Math.random().toString(36).slice(2);function Dc(e){if(!e[cr]){e[cr]=!0,Te.forEach(function(n){n!=="selectionchange"&&(ym.has(n)||kc(n,!1,e),kc(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[cr]||(t[cr]=!0,kc("selectionchange",!1,t))}}function bh(e,t,n,a){switch(Zh(t)){case 2:var l=Qm;break;case 8:l=Km;break;default:l=Gc}n=l.bind(null,t,n,e),l=void 0,!Zr||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(l=!0),a?l!==void 0?e.addEventListener(t,n,{capture:!0,passive:l}):e.addEventListener(t,n,!0):l!==void 0?e.addEventListener(t,n,{passive:l}):e.addEventListener(t,n,!1)}function Ec(e,t,n,a,l){var i=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var c=a.tag;if(c===3||c===4){var p=a.stateNode.containerInfo;if(p===l)break;if(c===4)for(c=a.return;c!==null;){var x=c.tag;if((x===3||x===4)&&c.stateNode.containerInfo===l)return;c=c.return}for(;p!==null;){if(c=$n(p),c===null)return;if(x=c.tag,x===5||x===6||x===26||x===27){a=i=c;continue e}p=p.parentNode}}a=a.return}Cu(function(){var T=i,H=Qr(n),q=[];e:{var _=$u.get(e);if(_!==void 0){var O=xo,fe=e;switch(e){case"keypress":if(bo(n)===0)break e;case"keydown":case"keyup":O=u0;break;case"focusin":fe="focus",O=Wr;break;case"focusout":fe="blur",O=Wr;break;case"beforeblur":case"afterblur":O=Wr;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":O=Mu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":O=Ip;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":O=h0;break;case Ku:case Zu:case Fu:O=t0;break;case Ju:O=m0;break;case"scroll":case"scrollend":O=$p;break;case"wheel":O=y0;break;case"copy":case"cut":case"paste":O=a0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":O=Du;break;case"toggle":case"beforetoggle":O=v0}var ke=(t&4)!==0,pt=!ke&&(e==="scroll"||e==="scrollend"),M=ke?_!==null?_+"Capture":null:_;ke=[];for(var z=T,A;z!==null;){var j=z;if(A=j.stateNode,j=j.tag,j!==5&&j!==26&&j!==27||A===null||M===null||(j=ci(z,M),j!=null&&ke.push(Gi(z,j,A))),pt)break;z=z.return}0<ke.length&&(_=new O(_,fe,null,n,H),q.push({event:_,listeners:ke}))}}if((t&7)===0){e:{if(_=e==="mouseover"||e==="pointerover",O=e==="mouseout"||e==="pointerout",_&&n!==Vr&&(fe=n.relatedTarget||n.fromElement)&&($n(fe)||fe[gn]))break e;if((O||_)&&(_=H.window===H?H:(_=H.ownerDocument)?_.defaultView||_.parentWindow:window,O?(fe=n.relatedTarget||n.toElement,O=T,fe=fe?$n(fe):null,fe!==null&&(pt=m(fe),ke=fe.tag,fe!==pt||ke!==5&&ke!==27&&ke!==6)&&(fe=null)):(O=null,fe=T),O!==fe)){if(ke=Mu,j="onMouseLeave",M="onMouseEnter",z="mouse",(e==="pointerout"||e==="pointerover")&&(ke=Du,j="onPointerLeave",M="onPointerEnter",z="pointer"),pt=O==null?_:ee(O),A=fe==null?_:ee(fe),_=new ke(j,z+"leave",O,n,H),_.target=pt,_.relatedTarget=A,j=null,$n(H)===T&&(ke=new ke(M,z+"enter",fe,n,H),ke.target=A,ke.relatedTarget=pt,j=ke),pt=j,O&&fe)t:{for(ke=bm,M=O,z=fe,A=0,j=M;j;j=ke(j))A++;j=0;for(var ze=z;ze;ze=ke(ze))j++;for(;0<A-j;)M=ke(M),A--;for(;0<j-A;)z=ke(z),j--;for(;A--;){if(M===z||z!==null&&M===z.alternate){ke=M;break t}M=ke(M),z=ke(z)}ke=null}else ke=null;O!==null&&vh(q,_,O,ke,!1),fe!==null&&pt!==null&&vh(q,pt,fe,ke,!0)}}e:{if(_=T?ee(T):window,O=_.nodeName&&_.nodeName.toLowerCase(),O==="select"||O==="input"&&_.type==="file")var Ie=Uu;else if(Ou(_))if(Hu)Ie=A0;else{Ie=D0;var ve=k0}else O=_.nodeName,!O||O.toLowerCase()!=="input"||_.type!=="checkbox"&&_.type!=="radio"?T&&Xr(T.elementType)&&(Ie=Uu):Ie=E0;if(Ie&&(Ie=Ie(e,T))){Lu(q,Ie,n,H);break e}ve&&ve(e,_,T),e==="focusout"&&T&&_.type==="number"&&T.memoizedProps.value!=null&&Gr(_,"number",_.value)}switch(ve=T?ee(T):window,e){case"focusin":(Ou(ve)||ve.contentEditable==="true")&&(Sl=ve,as=T,yi=null);break;case"focusout":yi=as=Sl=null;break;case"mousedown":ls=!0;break;case"contextmenu":case"mouseup":case"dragend":ls=!1,Vu(q,n,H);break;case"selectionchange":if(R0)break;case"keydown":case"keyup":Vu(q,n,H)}var Ge;if(Pr)e:{switch(e){case"compositionstart":var Ze="onCompositionStart";break e;case"compositionend":Ze="onCompositionEnd";break e;case"compositionupdate":Ze="onCompositionUpdate";break e}Ze=void 0}else xl?Ru(e,n)&&(Ze="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(Ze="onCompositionStart");Ze&&(Eu&&n.locale!=="ko"&&(xl||Ze!=="onCompositionStart"?Ze==="onCompositionEnd"&&xl&&(Ge=wu()):(ba=H,Fr="value"in ba?ba.value:ba.textContent,xl=!0)),ve=ur(T,Ze),0<ve.length&&(Ze=new ku(Ze,e,null,n,H),q.push({event:Ze,listeners:ve}),Ge?Ze.data=Ge:(Ge=_u(n),Ge!==null&&(Ze.data=Ge)))),(Ge=S0?C0(e,n):w0(e,n))&&(Ze=ur(T,"onBeforeInput"),0<Ze.length&&(ve=new ku("onBeforeInput","beforeinput",null,n,H),q.push({event:ve,listeners:Ze}),ve.data=Ge)),pm(q,e,T,n,H)}yh(q,t)})}function Gi(e,t,n){return{instance:e,listener:t,currentTarget:n}}function ur(e,t){for(var n=t+"Capture",a=[];e!==null;){var l=e,i=l.stateNode;if(l=l.tag,l!==5&&l!==26&&l!==27||i===null||(l=ci(e,n),l!=null&&a.unshift(Gi(e,l,i)),l=ci(e,t),l!=null&&a.push(Gi(e,l,i))),e.tag===3)return a;e=e.return}return[]}function bm(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function vh(e,t,n,a,l){for(var i=t._reactName,c=[];n!==null&&n!==a;){var p=n,x=p.alternate,T=p.stateNode;if(p=p.tag,x!==null&&x===a)break;p!==5&&p!==26&&p!==27||T===null||(x=T,l?(T=ci(n,i),T!=null&&c.unshift(Gi(n,T,x))):l||(T=ci(n,i),T!=null&&c.push(Gi(n,T,x)))),n=n.return}c.length!==0&&e.push({event:t,listeners:c})}var vm=/\r\n?/g,xm=/\u0000|\uFFFD/g;function xh(e){return(typeof e=="string"?e:""+e).replace(vm,`
9
+ `).replace(xm,"")}function Sh(e,t){return t=xh(t),xh(e)===t}function ht(e,t,n,a,l,i){switch(n){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||yl(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&yl(e,""+a);break;case"className":po(e,"class",a);break;case"tabIndex":po(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":po(e,n,a);break;case"style":xu(e,a,i);break;case"data":if(t!=="object"){po(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=go(""+a),e.setAttribute(n,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof i=="function"&&(n==="formAction"?(t!=="input"&&ht(e,t,"name",l.name,l,null),ht(e,t,"formEncType",l.formEncType,l,null),ht(e,t,"formMethod",l.formMethod,l,null),ht(e,t,"formTarget",l.formTarget,l,null)):(ht(e,t,"encType",l.encType,l,null),ht(e,t,"method",l.method,l,null),ht(e,t,"target",l.target,l,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=go(""+a),e.setAttribute(n,a);break;case"onClick":a!=null&&(e.onclick=In);break;case"onScroll":a!=null&&Qe("scroll",e);break;case"onScrollEnd":a!=null&&Qe("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(d(61));if(n=a.__html,n!=null){if(l.children!=null)throw Error(d(60));e.innerHTML=n}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}n=go(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,""+a):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":a===!0?e.setAttribute(n,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,a):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(n,a):e.removeAttribute(n);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(n):e.setAttribute(n,a);break;case"popover":Qe("beforetoggle",e),Qe("toggle",e),ho(e,"popover",a);break;case"xlinkActuate":Wn(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":Wn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":Wn(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":Wn(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":Wn(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":Wn(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":Wn(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":Wn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":Wn(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":ho(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=Fp.get(n)||n,ho(e,n,a))}}function Ac(e,t,n,a,l,i){switch(n){case"style":xu(e,a,i);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(d(61));if(n=a.__html,n!=null){if(l.children!=null)throw Error(d(60));e.innerHTML=n}}break;case"children":typeof a=="string"?yl(e,a):(typeof a=="number"||typeof a=="bigint")&&yl(e,""+a);break;case"onScroll":a!=null&&Qe("scroll",e);break;case"onScrollEnd":a!=null&&Qe("scrollend",e);break;case"onClick":a!=null&&(e.onclick=In);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!_e.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(l=n.endsWith("Capture"),t=n.slice(2,l?n.length-7:void 0),i=e[Rt]||null,i=i!=null?i[n]:null,typeof i=="function"&&e.removeEventListener(t,i,l),typeof a=="function")){typeof i!="function"&&i!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,a,l);break e}n in e?e[n]=a:a===!0?e.setAttribute(n,""):ho(e,n,a)}}}function $t(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Qe("error",e),Qe("load",e);var a=!1,l=!1,i;for(i in n)if(n.hasOwnProperty(i)){var c=n[i];if(c!=null)switch(i){case"src":a=!0;break;case"srcSet":l=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(d(137,t));default:ht(e,t,i,c,n,null)}}l&&ht(e,t,"srcSet",n.srcSet,n,null),a&&ht(e,t,"src",n.src,n,null);return;case"input":Qe("invalid",e);var p=i=c=l=null,x=null,T=null;for(a in n)if(n.hasOwnProperty(a)){var H=n[a];if(H!=null)switch(a){case"name":l=H;break;case"type":c=H;break;case"checked":x=H;break;case"defaultChecked":T=H;break;case"value":i=H;break;case"defaultValue":p=H;break;case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(d(137,t));break;default:ht(e,t,a,H,n,null)}}gu(e,i,p,x,T,c,l,!1);return;case"select":Qe("invalid",e),a=c=i=null;for(l in n)if(n.hasOwnProperty(l)&&(p=n[l],p!=null))switch(l){case"value":i=p;break;case"defaultValue":c=p;break;case"multiple":a=p;default:ht(e,t,l,p,n,null)}t=i,n=c,e.multiple=!!a,t!=null?gl(e,!!a,t,!1):n!=null&&gl(e,!!a,n,!0);return;case"textarea":Qe("invalid",e),i=l=a=null;for(c in n)if(n.hasOwnProperty(c)&&(p=n[c],p!=null))switch(c){case"value":a=p;break;case"defaultValue":l=p;break;case"children":i=p;break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(d(91));break;default:ht(e,t,c,p,n,null)}bu(e,a,l,i);return;case"option":for(x in n)n.hasOwnProperty(x)&&(a=n[x],a!=null)&&(x==="selected"?e.selected=a&&typeof a!="function"&&typeof a!="symbol":ht(e,t,x,a,n,null));return;case"dialog":Qe("beforetoggle",e),Qe("toggle",e),Qe("cancel",e),Qe("close",e);break;case"iframe":case"object":Qe("load",e);break;case"video":case"audio":for(a=0;a<Yi.length;a++)Qe(Yi[a],e);break;case"image":Qe("error",e),Qe("load",e);break;case"details":Qe("toggle",e);break;case"embed":case"source":case"link":Qe("error",e),Qe("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(T in n)if(n.hasOwnProperty(T)&&(a=n[T],a!=null))switch(T){case"children":case"dangerouslySetInnerHTML":throw Error(d(137,t));default:ht(e,t,T,a,n,null)}return;default:if(Xr(t)){for(H in n)n.hasOwnProperty(H)&&(a=n[H],a!==void 0&&Ac(e,t,H,a,n,void 0));return}}for(p in n)n.hasOwnProperty(p)&&(a=n[p],a!=null&&ht(e,t,p,a,n,null))}function Sm(e,t,n,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var l=null,i=null,c=null,p=null,x=null,T=null,H=null;for(O in n){var q=n[O];if(n.hasOwnProperty(O)&&q!=null)switch(O){case"checked":break;case"value":break;case"defaultValue":x=q;default:a.hasOwnProperty(O)||ht(e,t,O,null,a,q)}}for(var _ in a){var O=a[_];if(q=n[_],a.hasOwnProperty(_)&&(O!=null||q!=null))switch(_){case"type":i=O;break;case"name":l=O;break;case"checked":T=O;break;case"defaultChecked":H=O;break;case"value":c=O;break;case"defaultValue":p=O;break;case"children":case"dangerouslySetInnerHTML":if(O!=null)throw Error(d(137,t));break;default:O!==q&&ht(e,t,_,O,a,q)}}Yr(e,c,p,x,T,H,i,l);return;case"select":O=c=p=_=null;for(i in n)if(x=n[i],n.hasOwnProperty(i)&&x!=null)switch(i){case"value":break;case"multiple":O=x;default:a.hasOwnProperty(i)||ht(e,t,i,null,a,x)}for(l in a)if(i=a[l],x=n[l],a.hasOwnProperty(l)&&(i!=null||x!=null))switch(l){case"value":_=i;break;case"defaultValue":p=i;break;case"multiple":c=i;default:i!==x&&ht(e,t,l,i,a,x)}t=p,n=c,a=O,_!=null?gl(e,!!n,_,!1):!!a!=!!n&&(t!=null?gl(e,!!n,t,!0):gl(e,!!n,n?[]:"",!1));return;case"textarea":O=_=null;for(p in n)if(l=n[p],n.hasOwnProperty(p)&&l!=null&&!a.hasOwnProperty(p))switch(p){case"value":break;case"children":break;default:ht(e,t,p,null,a,l)}for(c in a)if(l=a[c],i=n[c],a.hasOwnProperty(c)&&(l!=null||i!=null))switch(c){case"value":_=l;break;case"defaultValue":O=l;break;case"children":break;case"dangerouslySetInnerHTML":if(l!=null)throw Error(d(91));break;default:l!==i&&ht(e,t,c,l,a,i)}yu(e,_,O);return;case"option":for(var fe in n)_=n[fe],n.hasOwnProperty(fe)&&_!=null&&!a.hasOwnProperty(fe)&&(fe==="selected"?e.selected=!1:ht(e,t,fe,null,a,_));for(x in a)_=a[x],O=n[x],a.hasOwnProperty(x)&&_!==O&&(_!=null||O!=null)&&(x==="selected"?e.selected=_&&typeof _!="function"&&typeof _!="symbol":ht(e,t,x,_,a,O));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var ke in n)_=n[ke],n.hasOwnProperty(ke)&&_!=null&&!a.hasOwnProperty(ke)&&ht(e,t,ke,null,a,_);for(T in a)if(_=a[T],O=n[T],a.hasOwnProperty(T)&&_!==O&&(_!=null||O!=null))switch(T){case"children":case"dangerouslySetInnerHTML":if(_!=null)throw Error(d(137,t));break;default:ht(e,t,T,_,a,O)}return;default:if(Xr(t)){for(var pt in n)_=n[pt],n.hasOwnProperty(pt)&&_!==void 0&&!a.hasOwnProperty(pt)&&Ac(e,t,pt,void 0,a,_);for(H in a)_=a[H],O=n[H],!a.hasOwnProperty(H)||_===O||_===void 0&&O===void 0||Ac(e,t,H,_,a,O);return}}for(var M in n)_=n[M],n.hasOwnProperty(M)&&_!=null&&!a.hasOwnProperty(M)&&ht(e,t,M,null,a,_);for(q in a)_=a[q],O=n[q],!a.hasOwnProperty(q)||_===O||_==null&&O==null||ht(e,t,q,_,a,O)}function Ch(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Cm(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),a=0;a<n.length;a++){var l=n[a],i=l.transferSize,c=l.initiatorType,p=l.duration;if(i&&p&&Ch(c)){for(c=0,p=l.responseEnd,a+=1;a<n.length;a++){var x=n[a],T=x.startTime;if(T>p)break;var H=x.transferSize,q=x.initiatorType;H&&Ch(q)&&(x=x.responseEnd,c+=H*(x<p?1:(p-T)/(x-T)))}if(--a,t+=8*(i+c)/(l.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Tc=null,Rc=null;function dr(e){return e.nodeType===9?e:e.ownerDocument}function wh(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function zh(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function _c(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Oc=null;function wm(){var e=window.event;return e&&e.type==="popstate"?e===Oc?!1:(Oc=e,!0):(Oc=null,!1)}var Mh=typeof setTimeout=="function"?setTimeout:void 0,zm=typeof clearTimeout=="function"?clearTimeout:void 0,kh=typeof Promise=="function"?Promise:void 0,Mm=typeof queueMicrotask=="function"?queueMicrotask:typeof kh<"u"?function(e){return kh.resolve(null).then(e).catch(km)}:Mh;function km(e){setTimeout(function(){throw e})}function Ua(e){return e==="head"}function Dh(e,t){var n=t,a=0;do{var l=n.nextSibling;if(e.removeChild(n),l&&l.nodeType===8)if(n=l.data,n==="/$"||n==="/&"){if(a===0){e.removeChild(l),Fl(t);return}a--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")a++;else if(n==="html")Xi(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,Xi(n);for(var i=n.firstChild;i;){var c=i.nextSibling,p=i.nodeName;i[Za]||p==="SCRIPT"||p==="STYLE"||p==="LINK"&&i.rel.toLowerCase()==="stylesheet"||n.removeChild(i),i=c}}else n==="body"&&Xi(e.ownerDocument.body);n=l}while(n);Fl(t)}function Eh(e,t){var n=e;e=0;do{var a=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),a&&a.nodeType===8)if(n=a.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=a}while(n)}function Lc(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":Lc(n),ri(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function Dm(e,t,n,a){for(;e.nodeType===1;){var l=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[Za])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(i=e.getAttribute("rel"),i==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(i!==l.rel||e.getAttribute("href")!==(l.href==null||l.href===""?null:l.href)||e.getAttribute("crossorigin")!==(l.crossOrigin==null?null:l.crossOrigin)||e.getAttribute("title")!==(l.title==null?null:l.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(i=e.getAttribute("src"),(i!==(l.src==null?null:l.src)||e.getAttribute("type")!==(l.type==null?null:l.type)||e.getAttribute("crossorigin")!==(l.crossOrigin==null?null:l.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var i=l.name==null?null:""+l.name;if(l.type==="hidden"&&e.getAttribute("name")===i)return e}else return e;if(e=On(e.nextSibling),e===null)break}return null}function Em(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=On(e.nextSibling),e===null))return null;return e}function Ah(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=On(e.nextSibling),e===null))return null;return e}function Uc(e){return e.data==="$?"||e.data==="$~"}function Hc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Am(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var a=function(){t(),n.removeEventListener("DOMContentLoaded",a)};n.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function On(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Bc=null;function Th(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return On(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function Rh(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function _h(e,t,n){switch(t=dr(n),e){case"html":if(e=t.documentElement,!e)throw Error(d(452));return e;case"head":if(e=t.head,!e)throw Error(d(453));return e;case"body":if(e=t.body,!e)throw Error(d(454));return e;default:throw Error(d(451))}}function Xi(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ri(e)}var Ln=new Map,Oh=new Set;function fr(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var pa=J.d;J.d={f:Tm,r:Rm,D:_m,C:Om,L:Lm,m:Um,X:Bm,S:Hm,M:Nm};function Tm(){var e=pa.f(),t=ar();return e||t}function Rm(e){var t=se(e);t!==null&&t.tag===5&&t.type==="form"?Jd(t):pa.r(e)}var Ql=typeof document>"u"?null:document;function Lh(e,t,n){var a=Ql;if(a&&typeof t=="string"&&t){var l=kn(t);l='link[rel="'+e+'"][href="'+l+'"]',typeof n=="string"&&(l+='[crossorigin="'+n+'"]'),Oh.has(l)||(Oh.add(l),e={rel:e,crossOrigin:n,href:t},a.querySelector(l)===null&&(t=a.createElement("link"),$t(t,"link",e),ge(t),a.head.appendChild(t)))}}function _m(e){pa.D(e),Lh("dns-prefetch",e,null)}function Om(e,t){pa.C(e,t),Lh("preconnect",e,t)}function Lm(e,t,n){pa.L(e,t,n);var a=Ql;if(a&&e&&t){var l='link[rel="preload"][as="'+kn(t)+'"]';t==="image"&&n&&n.imageSrcSet?(l+='[imagesrcset="'+kn(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(l+='[imagesizes="'+kn(n.imageSizes)+'"]')):l+='[href="'+kn(e)+'"]';var i=l;switch(t){case"style":i=Kl(e);break;case"script":i=Zl(e)}Ln.has(i)||(e=k({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),Ln.set(i,e),a.querySelector(l)!==null||t==="style"&&a.querySelector(Vi(i))||t==="script"&&a.querySelector(Qi(i))||(t=a.createElement("link"),$t(t,"link",e),ge(t),a.head.appendChild(t)))}}function Um(e,t){pa.m(e,t);var n=Ql;if(n&&e){var a=t&&typeof t.as=="string"?t.as:"script",l='link[rel="modulepreload"][as="'+kn(a)+'"][href="'+kn(e)+'"]',i=l;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=Zl(e)}if(!Ln.has(i)&&(e=k({rel:"modulepreload",href:e},t),Ln.set(i,e),n.querySelector(l)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Qi(i)))return}a=n.createElement("link"),$t(a,"link",e),ge(a),n.head.appendChild(a)}}}function Hm(e,t,n){pa.S(e,t,n);var a=Ql;if(a&&e){var l=me(a).hoistableStyles,i=Kl(e);t=t||"default";var c=l.get(i);if(!c){var p={loading:0,preload:null};if(c=a.querySelector(Vi(i)))p.loading=5;else{e=k({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Ln.get(i))&&Nc(e,n);var x=c=a.createElement("link");ge(x),$t(x,"link",e),x._p=new Promise(function(T,H){x.onload=T,x.onerror=H}),x.addEventListener("load",function(){p.loading|=1}),x.addEventListener("error",function(){p.loading|=2}),p.loading|=4,hr(c,t,a)}c={type:"stylesheet",instance:c,count:1,state:p},l.set(i,c)}}}function Bm(e,t){pa.X(e,t);var n=Ql;if(n&&e){var a=me(n).hoistableScripts,l=Zl(e),i=a.get(l);i||(i=n.querySelector(Qi(l)),i||(e=k({src:e,async:!0},t),(t=Ln.get(l))&&jc(e,t),i=n.createElement("script"),ge(i),$t(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(l,i))}}function Nm(e,t){pa.M(e,t);var n=Ql;if(n&&e){var a=me(n).hoistableScripts,l=Zl(e),i=a.get(l);i||(i=n.querySelector(Qi(l)),i||(e=k({src:e,async:!0,type:"module"},t),(t=Ln.get(l))&&jc(e,t),i=n.createElement("script"),ge(i),$t(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(l,i))}}function Uh(e,t,n,a){var l=(l=Ee.current)?fr(l):null;if(!l)throw Error(d(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Kl(n.href),n=me(l).hoistableStyles,a=n.get(t),a||(a={type:"style",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=Kl(n.href);var i=me(l).hoistableStyles,c=i.get(e);if(c||(l=l.ownerDocument||l,c={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,c),(i=l.querySelector(Vi(e)))&&!i._p&&(c.instance=i,c.state.loading=5),Ln.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Ln.set(e,n),i||jm(l,e,n,c.state))),t&&a===null)throw Error(d(528,""));return c}if(t&&a!==null)throw Error(d(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Zl(n),n=me(l).hoistableScripts,a=n.get(t),a||(a={type:"script",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(d(444,e))}}function Kl(e){return'href="'+kn(e)+'"'}function Vi(e){return'link[rel="stylesheet"]['+e+"]"}function Hh(e){return k({},e,{"data-precedence":e.precedence,precedence:null})}function jm(e,t,n,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),$t(t,"link",n),ge(t),e.head.appendChild(t))}function Zl(e){return'[src="'+kn(e)+'"]'}function Qi(e){return"script[async]"+e}function Bh(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+kn(n.href)+'"]');if(a)return t.instance=a,ge(a),a;var l=k({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),ge(a),$t(a,"style",l),hr(a,n.precedence,e),t.instance=a;case"stylesheet":l=Kl(n.href);var i=e.querySelector(Vi(l));if(i)return t.state.loading|=4,t.instance=i,ge(i),i;a=Hh(n),(l=Ln.get(l))&&Nc(a,l),i=(e.ownerDocument||e).createElement("link"),ge(i);var c=i;return c._p=new Promise(function(p,x){c.onload=p,c.onerror=x}),$t(i,"link",a),t.state.loading|=4,hr(i,n.precedence,e),t.instance=i;case"script":return i=Zl(n.src),(l=e.querySelector(Qi(i)))?(t.instance=l,ge(l),l):(a=n,(l=Ln.get(i))&&(a=k({},n),jc(a,l)),e=e.ownerDocument||e,l=e.createElement("script"),ge(l),$t(l,"link",a),e.head.appendChild(l),t.instance=l);case"void":return null;default:throw Error(d(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,hr(a,n.precedence,e));return t.instance}function hr(e,t,n){for(var a=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),l=a.length?a[a.length-1]:null,i=l,c=0;c<a.length;c++){var p=a[c];if(p.dataset.precedence===t)i=p;else if(i!==l)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Nc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function jc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var pr=null;function Nh(e,t,n){if(pr===null){var a=new Map,l=pr=new Map;l.set(n,a)}else l=pr,a=l.get(n),a||(a=new Map,l.set(n,a));if(a.has(e))return a;for(a.set(e,null),n=n.getElementsByTagName(e),l=0;l<n.length;l++){var i=n[l];if(!(i[Za]||i[wt]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var c=i.getAttribute(t)||"";c=e+c;var p=a.get(c);p?p.push(i):a.set(c,[i])}}return a}function jh(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function qm(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function qh(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Ym(e,t,n,a){if(n.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var l=Kl(a.href),i=t.querySelector(Vi(l));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=mr.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=i,ge(i);return}i=t.ownerDocument||t,a=Hh(a),(l=Ln.get(l))&&Nc(a,l),i=i.createElement("link"),ge(i);var c=i;c._p=new Promise(function(p,x){c.onload=p,c.onerror=x}),$t(i,"link",a),n.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=mr.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var qc=0;function Gm(e,t){return e.stylesheets&&e.count===0&&yr(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var a=setTimeout(function(){if(e.stylesheets&&yr(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&qc===0&&(qc=62500*Cm());var l=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&yr(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>qc?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(l)}}:null}function mr(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)yr(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var gr=null;function yr(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,gr=new Map,t.forEach(Xm,e),gr=null,mr.call(e))}function Xm(e,t){if(!(t.state.loading&4)){var n=gr.get(e);if(n)var a=n.get(null);else{n=new Map,gr.set(e,n);for(var l=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<l.length;i++){var c=l[i];(c.nodeName==="LINK"||c.getAttribute("media")!=="not all")&&(n.set(c.dataset.precedence,c),a=c)}a&&n.set(null,a)}l=t.instance,c=l.getAttribute("data-precedence"),i=n.get(c)||a,i===a&&n.set(null,l),n.set(c,l),this.count++,a=mr.bind(this),l.addEventListener("load",a),l.addEventListener("error",a),i?i.parentNode.insertBefore(l,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(l,e.firstChild)),t.state.loading|=4}}var Ki={$$typeof:ae,Provider:null,Consumer:null,_currentValue:F,_currentValue2:F,_threadCount:0};function Vm(e,t,n,a,l,i,c,p,x){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ai(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ai(0),this.hiddenUpdates=ai(null),this.identifierPrefix=a,this.onUncaughtError=l,this.onCaughtError=i,this.onRecoverableError=c,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=x,this.incompleteTransitions=new Map}function Yh(e,t,n,a,l,i,c,p,x,T,H,q){return e=new Vm(e,t,n,c,x,T,H,q,p),t=1,i===!0&&(t|=24),i=bn(3,null,null,t),e.current=i,i.stateNode=e,t=vs(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:a,isDehydrated:n,cache:t},ws(i),e}function Gh(e){return e?(e=zl,e):zl}function Xh(e,t,n,a,l,i){l=Gh(l),a.context===null?a.context=l:a.pendingContext=l,a=za(t),a.payload={element:n},i=i===void 0?null:i,i!==null&&(a.callback=i),n=Ma(e,a,t),n!==null&&(fn(n,e,t),zi(n,e,t))}function Vh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Yc(e,t){Vh(e,t),(e=e.alternate)&&Vh(e,t)}function Qh(e){if(e.tag===13||e.tag===31){var t=Wa(e,67108864);t!==null&&fn(t,e,67108864),Yc(e,67108864)}}function Kh(e){if(e.tag===13||e.tag===31){var t=wn();t=Jn(t);var n=Wa(e,t);n!==null&&fn(n,e,t),Yc(e,t)}}var br=!0;function Qm(e,t,n,a){var l=E.T;E.T=null;var i=J.p;try{J.p=2,Gc(e,t,n,a)}finally{J.p=i,E.T=l}}function Km(e,t,n,a){var l=E.T;E.T=null;var i=J.p;try{J.p=8,Gc(e,t,n,a)}finally{J.p=i,E.T=l}}function Gc(e,t,n,a){if(br){var l=Xc(a);if(l===null)Ec(e,t,a,vr,n),Fh(e,a);else if(Fm(l,e,t,n,a))a.stopPropagation();else if(Fh(e,a),t&4&&-1<Zm.indexOf(e)){for(;l!==null;){var i=se(l);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var c=Fn(i.pendingLanes);if(c!==0){var p=i;for(p.pendingLanes|=2,p.entangledLanes|=2;c;){var x=1<<31-Tt(c);p.entanglements[1]|=x,c&=~x}Vn(i),(et&6)===0&&(tr=de()+500,qi(0))}}break;case 31:case 13:p=Wa(i,2),p!==null&&fn(p,i,2),ar(),Yc(i,2)}if(i=Xc(a),i===null&&Ec(e,t,a,vr,n),i===l)break;l=i}l!==null&&a.stopPropagation()}else Ec(e,t,a,null,n)}}function Xc(e){return e=Qr(e),Vc(e)}var vr=null;function Vc(e){if(vr=null,e=$n(e),e!==null){var t=m(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=C(t),e!==null)return e;e=null}else if(n===31){if(e=D(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return vr=e,null}function Zh(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(rt()){case Gt:return 2;case Kt:return 8;case Pt:case Ae:return 32;case we:return 268435456;default:return 32}default:return 32}}var Qc=!1,Ha=null,Ba=null,Na=null,Zi=new Map,Fi=new Map,ja=[],Zm="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Fh(e,t){switch(e){case"focusin":case"focusout":Ha=null;break;case"dragenter":case"dragleave":Ba=null;break;case"mouseover":case"mouseout":Na=null;break;case"pointerover":case"pointerout":Zi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Fi.delete(t.pointerId)}}function Ji(e,t,n,a,l,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:a,nativeEvent:i,targetContainers:[l]},t!==null&&(t=se(t),t!==null&&Qh(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,l!==null&&t.indexOf(l)===-1&&t.push(l),e)}function Fm(e,t,n,a,l){switch(t){case"focusin":return Ha=Ji(Ha,e,t,n,a,l),!0;case"dragenter":return Ba=Ji(Ba,e,t,n,a,l),!0;case"mouseover":return Na=Ji(Na,e,t,n,a,l),!0;case"pointerover":var i=l.pointerId;return Zi.set(i,Ji(Zi.get(i)||null,e,t,n,a,l)),!0;case"gotpointercapture":return i=l.pointerId,Fi.set(i,Ji(Fi.get(i)||null,e,t,n,a,l)),!0}return!1}function Jh(e){var t=$n(e.target);if(t!==null){var n=m(t);if(n!==null){if(t=n.tag,t===13){if(t=C(n),t!==null){e.blockedOn=t,Un(e.priority,function(){Kh(n)});return}}else if(t===31){if(t=D(n),t!==null){e.blockedOn=t,Un(e.priority,function(){Kh(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function xr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Xc(e.nativeEvent);if(n===null){n=e.nativeEvent;var a=new n.constructor(n.type,n);Vr=a,n.target.dispatchEvent(a),Vr=null}else return t=se(n),t!==null&&Qh(t),e.blockedOn=n,!1;t.shift()}return!0}function $h(e,t,n){xr(e)&&n.delete(t)}function Jm(){Qc=!1,Ha!==null&&xr(Ha)&&(Ha=null),Ba!==null&&xr(Ba)&&(Ba=null),Na!==null&&xr(Na)&&(Na=null),Zi.forEach($h),Fi.forEach($h)}function Sr(e,t){e.blockedOn===t&&(e.blockedOn=null,Qc||(Qc=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,Jm)))}var Cr=null;function Wh(e){Cr!==e&&(Cr=e,o.unstable_scheduleCallback(o.unstable_NormalPriority,function(){Cr===e&&(Cr=null);for(var t=0;t<e.length;t+=3){var n=e[t],a=e[t+1],l=e[t+2];if(typeof a!="function"){if(Vc(a||n)===null)continue;break}var i=se(n);i!==null&&(e.splice(t,3),t-=3,Xs(i,{pending:!0,data:l,method:n.method,action:a},a,l))}}))}function Fl(e){function t(x){return Sr(x,e)}Ha!==null&&Sr(Ha,e),Ba!==null&&Sr(Ba,e),Na!==null&&Sr(Na,e),Zi.forEach(t),Fi.forEach(t);for(var n=0;n<ja.length;n++){var a=ja[n];a.blockedOn===e&&(a.blockedOn=null)}for(;0<ja.length&&(n=ja[0],n.blockedOn===null);)Jh(n),n.blockedOn===null&&ja.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(a=0;a<n.length;a+=3){var l=n[a],i=n[a+1],c=l[Rt]||null;if(typeof i=="function")c||Wh(n);else if(c){var p=null;if(i&&i.hasAttribute("formAction")){if(l=i,c=i[Rt]||null)p=c.formAction;else if(Vc(l)!==null)continue}else p=c.action;typeof p=="function"?n[a+1]=p:(n.splice(a,3),a-=3),Wh(n)}}}function Ih(){function e(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(c){return l=c})},focusReset:"manual",scroll:"manual"})}function t(){l!==null&&(l(),l=null),a||setTimeout(n,20)}function n(){if(!a&&!navigation.transition){var i=navigation.currentEntry;i&&i.url!=null&&navigation.navigate(i.url,{state:i.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,l=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),l!==null&&(l(),l=null)}}}function Kc(e){this._internalRoot=e}wr.prototype.render=Kc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(d(409));var n=t.current,a=wn();Xh(n,a,e,t,null,null)},wr.prototype.unmount=Kc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Xh(e.current,2,null,e,null,null),ar(),t[gn]=null}};function wr(e){this._internalRoot=e}wr.prototype.unstable_scheduleHydration=function(e){if(e){var t=fo();e={blockedOn:null,target:e,priority:t};for(var n=0;n<ja.length&&t!==0&&t<ja[n].priority;n++);ja.splice(n,0,e),n===0&&Jh(e)}};var Ph=r.version;if(Ph!=="19.2.4")throw Error(d(527,Ph,"19.2.4"));J.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(d(188)):(e=Object.keys(e).join(","),Error(d(268,e)));return e=g(t),e=e!==null?R(e):null,e=e===null?null:e.stateNode,e};var $m={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:E,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var zr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zr.isDisabled&&zr.supportsFiber)try{Ne=zr.inject($m),Me=zr}catch{}}return Ii.createRoot=function(e,t){if(!h(e))throw Error(d(299));var n=!1,a="",l=of,i=rf,c=sf;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(l=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=Yh(e,1,!1,null,null,n,a,null,l,i,c,Ih),e[gn]=t.current,Dc(e),new Kc(t)},Ii.hydrateRoot=function(e,t,n){if(!h(e))throw Error(d(299));var a=!1,l="",i=of,c=rf,p=sf,x=null;return n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(l=n.identifierPrefix),n.onUncaughtError!==void 0&&(i=n.onUncaughtError),n.onCaughtError!==void 0&&(c=n.onCaughtError),n.onRecoverableError!==void 0&&(p=n.onRecoverableError),n.formState!==void 0&&(x=n.formState)),t=Yh(e,1,!0,t,n??null,a,l,x,i,c,p,Ih),t.context=Gh(null),n=t.current,a=wn(),a=Jn(a),l=za(a),l.callback=null,Ma(n,l,a),n=a,t.current.lanes=n,Ka(t,n),Vn(t),e[gn]=t.current,Dc(e),new wr(t)},Ii.version="19.2.4",Ii}var vp;function n1(){if(vp)return Ic.exports;vp=1;function o(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(o)}catch(r){console.error(r)}}return o(),Ic.exports=t1(),Ic.exports}var a1=n1(),xp=function(r,f){var d=arguments;if(f==null||!oo.call(f,"css"))return S.createElement.apply(void 0,d);var h=d.length,m=new Array(h);m[0]=fu,m[1]=du(r,f);for(var C=2;C<h;C++)m[C]=d[C];return S.createElement.apply(null,m)};(function(o){var r;r||(r=o.JSX||(o.JSX={}))})(xp||(xp={}));function y(){for(var o=arguments.length,r=new Array(o),f=0;f<o;f++)r[f]=arguments[f];return Up(r)}function pn(){var o=y.apply(void 0,arguments),r="animation-"+o.name;return{name:r,styles:"@keyframes "+r+"{"+o.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}const l1={showProgress:!1,progressTitle:"",progressState:{current:0,total:0,percent:0,status:"processing"},showDeleteConfirm:!1,showMoveModal:!1,showSyncConfirm:!1,showProcessConfirm:!1,showDownloadConfirm:!1,actionPaths:[],syncImageCount:0,syncHasRemote:!1,syncHasLocal:!1,processMode:"generate",downloadImageCount:0,downloadTotalSelected:0},i1={isOpen:!1,openStudio:()=>{},closeStudio:()=>{},toggleStudio:()=>{},currentPath:"public",setCurrentPath:()=>{},navigateUp:()=>{},selectedItems:new Set,toggleSelection:()=>{},selectRange:()=>{},selectAll:()=>{},clearSelection:()=>{},lastSelectedPath:null,viewMode:"grid",setViewMode:()=>{},focusedItem:null,setFocusedItem:()=>{},meta:null,setMeta:()=>{},isLoading:!1,setIsLoading:()=>{},refreshKey:0,triggerRefresh:()=>{},editedImageKey:null,setEditedImageKey:()=>{},scanRequested:!1,triggerScan:()=>{},clearScanRequest:()=>{},searchQuery:"",setSearchQuery:()=>{},error:null,showError:()=>{},clearError:()=>{},fileItems:[],setFileItems:()=>{},actionState:l1,requestDelete:()=>{},requestMove:()=>{},requestSync:()=>{},requestDownload:()=>{},requestProcess:()=>{},setProcessMode:()=>{},confirmDelete:async()=>{},confirmMove:async()=>{},confirmSync:async()=>{},confirmProcess:async()=>{},cancelAction:()=>{},closeProgress:()=>{},stopProcessing:()=>{},deleteOrphans:async()=>{}},Bp=S.createContext(i1);function ei(){return S.useContext(Bp)}const ro="-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Ubuntu, sans-serif",u={primary:"#635bff",primaryHover:"#5851e5",primaryLight:"#f0f0ff",background:"#f6f9fc",surface:"#ffffff",surfaceHover:"#f6f9fc",border:"#d8dee4",borderLight:"#e3e8ee",borderHover:"#c1c9d2",text:"#1a1f36",textSecondary:"#697386",textMuted:"#8792a2",success:"#0d7d4d",successLight:"#e6f7ef",danger:"#df1b41",dangerHover:"#c41535",dangerLight:"#fff5f7",imagesFolder:"#8b5cf6",hover:"#e8ecf0"},Z={xs:"13px",sm:"14px",base:"16px",lg:"19px",xl:"22px"},ni=y("font-family:",ro,";font-size:",Z.base,";line-height:1.5;color:",u.text,";-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;box-sizing:border-box;*,*::before,*::after{box-sizing:border-box;}button,input,select,textarea{font-family:inherit;font-size:inherit;}",""),o1=pn`
10
+ from { opacity: 0; }
11
+ to { opacity: 1; }
12
+ `,r1=pn`
13
+ from {
14
+ opacity: 0;
15
+ transform: translateY(-8px) scale(0.98);
16
+ }
17
+ to {
18
+ opacity: 1;
19
+ transform: translateY(0) scale(1);
20
+ }
21
+ `,s1=pn`
22
+ from { transform: rotate(0deg); }
23
+ to { transform: rotate(360deg); }
24
+ `,Re={overlay:y("position:fixed;inset:0;background-color:rgba(26, 31, 54, 0.4);backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;z-index:10000;animation:",o1," 0.15s ease-out;font-family:",ro,";",""),modal:y(ni," background-color:",u.surface,";border-radius:12px;box-shadow:0 30px 60px -12px rgba(50, 50, 93, 0.25),0 18px 36px -18px rgba(0, 0, 0, 0.3);max-width:420px;width:90%;animation:",r1," 0.2s ease-out;overflow:hidden;",""),header:{name:"nsgk6m",styles:"padding:24px 24px 0"},title:y("font-size:",Z.lg,";font-weight:600;color:",u.text,";margin:0;letter-spacing:-0.02em;",""),body:{name:"5e7rpo",styles:"padding:12px 24px 24px"},message:y("font-size:",Z.base,";color:",u.textSecondary,";margin:0;line-height:1.6;",""),footer:y("display:flex;justify-content:flex-end;gap:12px;padding:16px 24px;border-top:1px solid ",u.border,";background-color:",u.background,";",""),btn:y("padding:10px 18px;font-size:",Z.base,";font-weight:500;border-radius:6px;cursor:pointer;transition:all 0.15s ease;letter-spacing:-0.01em;",""),btnCancel:y("background-color:",u.surface,";border:1px solid ",u.border,";color:",u.text,";&:hover{background-color:",u.surfaceHover,";border-color:",u.borderHover,";}",""),btnConfirm:y("background-color:",u.primary,";border:1px solid ",u.primary,";color:white;&:hover{background-color:",u.primaryHover,";border-color:",u.primaryHover,";}",""),btnDanger:y("background-color:",u.danger,";border:1px solid ",u.danger,";color:white;&:hover{background-color:",u.dangerHover,";border-color:",u.dangerHover,";}","")};function eo({title:o,message:r,confirmLabel:f="Confirm",cancelLabel:d="Cancel",variant:h="default",onConfirm:m,onCancel:C}){return s("div",{css:Re.overlay,onClick:C,children:b("div",{css:Re.modal,onClick:D=>D.stopPropagation(),children:[s("div",{css:Re.header,children:s("h3",{css:Re.title,children:o})}),s("div",{css:Re.body,children:s("p",{css:Re.message,children:r})}),b("div",{css:Re.footer,children:[s("button",{css:[Re.btn,Re.btnCancel,"",""],onClick:C,children:d}),s("button",{css:[Re.btn,h==="danger"?Re.btnDanger:Re.btnConfirm,"",""],onClick:m,children:f})]})]})})}const c1={input:y("width:100%;padding:10px 12px;font-size:",Z.base,";border:1px solid ",u.border,";border-radius:6px;background:",u.surface,";color:",u.text,";margin-top:12px;transition:all 0.15s ease;&:focus{outline:none;border-color:",u.primary,";box-shadow:0 0 0 2px ",u.primaryLight,";}&::placeholder{color:",u.textMuted,";}","")};function Ar({title:o,message:r,inputLabel:f,defaultValue:d="",placeholder:h,confirmLabel:m="Confirm",cancelLabel:C="Cancel",isLoading:D=!1,loadingLabel:w="Processing...",onConfirm:g,onCancel:R}){const[k,B]=ot.useState(d),Y=U=>{U.preventDefault(),k.trim()&&!D&&g(k.trim())};return s("div",{css:Re.overlay,onClick:D?void 0:R,children:s("div",{css:Re.modal,onClick:U=>U.stopPropagation(),children:b("form",{onSubmit:Y,children:[s("div",{css:Re.header,children:s("h3",{css:Re.title,children:o})}),b("div",{css:Re.body,children:[r&&s("p",{css:Re.message,children:r}),f&&s("label",{css:Re.message,children:f}),s("input",{css:c1.input,type:"text",value:k,onChange:U=>B(U.target.value),placeholder:h,autoFocus:!0,disabled:D})]}),b("div",{css:Re.footer,children:[s("button",{type:"button",css:[Re.btn,Re.btnCancel,"",""],onClick:R,disabled:D,children:C}),s("button",{type:"submit",css:[Re.btn,Re.btnConfirm,"",""],disabled:!k.trim()||D,children:D?b(at,{children:[s("span",{css:y("display:inline-block;width:14px;height:14px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:",s1," 0.75s linear infinite;margin-right:6px;","")}),w]}):m})]})]})})})}function hu({title:o,message:r,buttonLabel:f="OK",onClose:d}){return s("div",{css:Re.overlay,onClick:d,children:b("div",{css:Re.modal,onClick:h=>h.stopPropagation(),children:[s("div",{css:Re.header,children:s("h3",{css:Re.title,children:o})}),s("div",{css:Re.body,children:s("p",{css:Re.message,children:r})}),s("div",{css:Re.footer,children:s("button",{css:[Re.btn,Re.btnConfirm,"",""],onClick:d,children:f})})]})})}const Ya={progressContainer:{name:"yz1nei",styles:"margin-top:16px"},progressBar:y("width:100%;height:8px;background-color:",u.background,";border-radius:4px;overflow:hidden;margin-bottom:12px;",""),progressFill:y("height:100%;background:linear-gradient(90deg, ",u.primary,", ",u.primaryHover,");border-radius:4px;transition:width 0.3s ease;",""),progressText:y("font-size:",Z.sm,";color:",u.textSecondary,";margin:0;display:flex;justify-content:space-between;align-items:center;",""),currentFile:y("font-size:",Z.xs,";color:",u.textMuted,";margin:8px 0 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;",""),errorList:{name:"1lw22n1",styles:"margin-top:12px;padding:12px;background:#fef2f2;border:1px solid #fecaca;border-radius:6px;max-height:200px;overflow-y:auto"},errorItem:y("font-size:",Z.xs,";color:#991b1b;margin:0 0 4px;&:last-child{margin-bottom:0;}","")};function dl({title:o,progress:r,onClose:f,onDeleteOrphans:d,onStop:h}){const m=r.status==="complete",C=r.status==="error",D=r.status==="stopped",w=r.status==="stopping",g=m||C||D,R=!g||w;return s("div",{css:Re.overlay,children:b("div",{css:Re.modal,onClick:k=>k.stopPropagation(),children:[s("div",{css:Re.header,children:s("h3",{css:Re.title,children:o})}),s("div",{css:Re.body,children:C?s("p",{css:Re.message,children:r.message||"An error occurred"}):D?b("p",{css:Re.message,children:["Processing stopped. Processed ",r.processed??r.current," image",(r.processed??r.current)!==1?"s":""," before stopping."]}):m?b(at,{children:[b("p",{css:Re.message,children:[r.message?r.message:r.isDelete?b(at,{children:["Deleted ",r.processed," file",r.processed!==1?"s":"",".",r.errors!==void 0&&r.errors>0?b(at,{children:[" ",r.errors," error",r.errors!==1?"s":""," occurred."]}):null]}):r.isMove?b(at,{children:["Moved ",r.processed," file",r.processed!==1?"s":"",".",r.errors!==void 0&&r.errors>0?b(at,{children:[" ",r.errors," error",r.errors!==1?"s":""," occurred."]}):null]}):r.isScan?b(at,{children:[r.alreadyProcessed!==void 0&&r.alreadyProcessed>0?b(at,{children:[r.alreadyProcessed," image",r.alreadyProcessed!==1?"s":""," already exist. "]}):null,"Scanned ",r.processed," new image",r.processed!==1?"s":"",".",r.orphanedEntries!==void 0&&r.orphanedEntries>0?b(at,{children:[" Removed ",r.orphanedEntries," orphaned entr",r.orphanedEntries!==1?"ies":"y","."]}):null,r.pendingUpdates!==void 0&&r.pendingUpdates>0?b(at,{children:[" ",r.pendingUpdates," file",r.pendingUpdates!==1?"s have":" has"," local updates pending."]}):null]}):b(at,{children:["Processed ",r.processed," new image",r.processed!==1?"s":"",".",r.alreadyProcessed!==void 0&&r.alreadyProcessed>0?b(at,{children:[" ",r.alreadyProcessed," already processed."]}):null]}),r.orphansRemoved!==void 0&&r.orphansRemoved>0?b(at,{children:[" Removed ",r.orphansRemoved," orphaned thumbnail",r.orphansRemoved!==1?"s":"","."]}):null]}),r.errorMessages&&r.errorMessages.length>0&&b("div",{css:Ya.errorList,children:[r.errorMessages.slice(0,10).map((k,B)=>s("p",{css:Ya.errorItem,children:k},B)),r.errorMessages.length>10&&b("p",{css:Ya.errorItem,children:["...and ",r.errorMessages.length-10," more"]})]})]}):b(at,{children:[s("p",{css:Re.message,children:r.status==="cleanup"?r.message||"Cleaning up...":r.message||"Processing..."}),b("div",{css:Ya.progressContainer,children:[s("div",{css:Ya.progressBar,children:s("div",{css:Ya.progressFill,style:{width:`${r.percent}%`}})}),b("div",{css:Ya.progressText,children:[b("span",{children:[r.current," of ",r.total]}),b("span",{children:[r.percent,"%"]})]}),r.currentFile&&s("p",{css:Ya.currentFile,title:r.currentFile,children:r.currentFile})]})]})}),b("div",{css:Re.footer,children:[R&&h&&s("button",{css:[Re.btn,Re.btnDanger,"",""],onClick:h,disabled:r.status==="stopping",children:r.status==="stopping"?"Stopping...":"Stop"}),g&&r.orphanedFiles&&r.orphanedFiles.length>0&&d&&b("button",{css:[Re.btn,Re.btnDanger,"",""],onClick:d,children:["Delete ",r.orphanedFiles.length," Orphan",r.orphanedFiles.length!==1?"s":""]}),g&&s("button",{css:[Re.btn,Re.btnConfirm,"",""],onClick:f,children:"Done"})]})]})})}function Np(o){const{setShowProgress:r,setProgressTitle:f,setProgressState:d,triggerRefresh:h}=o,m=S.useRef(null),C=S.useRef(!1),D=S.useRef(!1),w=S.useRef(null),g=S.useCallback(()=>{m.current&&m.current.abort()},[]);return{execute:S.useCallback(async k=>{const{endpoint:B,body:Y,title:U,operationType:G,onComplete:ie,onError:V}=k;if(C.current){console.warn("Streaming operation already in progress");return}C.current=!0,D.current=!1;const ae=`${B.split("/").pop()?.replace("-stream","")||"op"}-${Date.now()}-${Math.random().toString(36).slice(2)}`;w.current=ae;const ce=new AbortController;m.current=ce;const X=async()=>{D.current=!0,d(W=>({...W,status:"stopping"}));try{await fetch("/api/studio/cancel-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({operationId:ae})})}catch{}};ce.signal.addEventListener("abort",X),f(U),r(!0),d({current:0,total:0,percent:0,status:"processing",message:`Starting ${U.toLowerCase()}...`});try{const W=await fetch(B,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...Y,operationId:ae})});if(!W.ok){const Q=await W.json().catch(()=>({}));throw new Error(Q.error||`Request failed: ${W.status}`)}if(!W.body)throw new Error("No response body");const $=W.body.getReader(),P=new TextDecoder;let N="";try{for(;;){const{done:Q,value:ue}=await $.read();if(Q)break;N+=P.decode(ue,{stream:!0});const he=N.split(`
25
+
26
+ `);N=he.pop()||"";for(const pe of he)if(pe.startsWith("data: "))try{const te=JSON.parse(pe.slice(6));if(te.type==="start")d(Ue=>({...Ue,total:te.total||Ue.total}));else if(te.type==="progress")d({current:te.current||0,total:te.total||0,percent:te.percent||Math.round((te.current||0)/(te.total||1)*100),status:"processing",currentFile:te.currentFile,message:te.message});else if(te.type==="cleanup")d(Ue=>({...Ue,status:"cleanup",message:te.message}));else if(te.type==="complete"){const Ue=te.cancelled===!0,E=te.processed??te.moved??te.renamed??te.pushed??te.downloaded??te.added??te.imported??te.deleted??te.current??0;d({current:E,total:E,percent:100,status:Ue?"stopped":te.errors&&te.errors>0?"error":"complete",message:te.message,processed:E,errors:te.errors,orphanedFiles:te.orphanedFiles,isDelete:G==="delete",isMove:G==="move",isScan:G==="scan"}),h(),ie?.(te)}else te.type==="error"&&(d(Ue=>({...Ue,status:"error",message:te.message})),V?.(te.message||"Unknown error"))}catch{}}}catch(Q){if(!D.current)throw Q}finally{ce.signal.removeEventListener("abort",X)}}catch(W){if(!D.current){const $=W instanceof Error?W.message:"Operation failed";console.error(`${U} error:`,W),d({current:0,total:0,percent:0,status:"error",message:$}),V?.($)}}finally{C.current=!1,m.current=null,w.current=null}},[r,f,d,h]),stop:g,get isRunning(){return C.current}}}const u1=pn`
27
+ from { opacity: 0; }
28
+ to { opacity: 1; }
29
+ `,d1=pn`
30
+ from {
31
+ opacity: 0;
32
+ transform: translateY(-8px) scale(0.98);
33
+ }
34
+ to {
35
+ opacity: 1;
36
+ transform: translateY(0) scale(1);
37
+ }
38
+ `,At={overlay:y("position:fixed;inset:0;background-color:rgba(26, 31, 54, 0.4);backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;z-index:10000;animation:",u1," 0.15s ease-out;font-family:",ro,";",""),modal:y(ni," background-color:",u.surface,";border-radius:12px;box-shadow:0 30px 60px -12px rgba(50, 50, 93, 0.25),0 18px 36px -18px rgba(0, 0, 0, 0.3);max-width:480px;width:90%;max-height:80vh;display:flex;flex-direction:column;animation:",d1," 0.2s ease-out;overflow:hidden;",""),header:{name:"nsgk6m",styles:"padding:24px 24px 0"},title:y("font-size:",Z.lg,";font-weight:600;color:",u.text,";margin:0;letter-spacing:-0.02em;",""),body:{name:"zizupt",styles:"padding:12px 24px 24px;flex:1;overflow-y:auto;min-height:200px;max-height:400px"},message:y("font-size:",Z.base,";color:",u.textSecondary,";margin:0 0 16px;line-height:1.6;",""),folderList:{name:"1axgfg3",styles:"display:flex;flex-direction:column;gap:0"},folderItem:y("display:flex;align-items:center;gap:8px;padding:8px 12px;border-radius:6px;cursor:pointer;transition:all 0.15s ease;border:1px solid transparent;position:relative;&:hover{background-color:",u.surfaceHover,";}",""),treeIndent:{name:"197dxto",styles:"display:flex;align-items:center;height:100%"},treeLine:y("width:16px;height:100%;position:relative;flex-shrink:0;&::before{content:'';position:absolute;left:8px;top:0;bottom:50%;width:0;border-left:1px dashed ",u.textSecondary,";}&::after{content:'';position:absolute;left:8px;top:50%;width:8px;height:0;border-top:1px dashed ",u.textSecondary,";}",""),folderItemSelected:y("background-color:",u.primaryLight,";border-color:",u.primary,";&:hover{background-color:",u.primaryLight,";}",""),folderItemDisabled:{name:"181lhkw",styles:"opacity:0.5;cursor:not-allowed;&:hover{background-color:transparent;}"},folderIcon:{name:"17bs1oo",styles:"width:20px;height:20px;color:#f9935e;flex-shrink:0"},folderName:y("font-size:",Z.base,";color:",u.text,";flex:1;",""),footer:y("display:flex;justify-content:flex-end;gap:12px;padding:16px 24px;border-top:1px solid ",u.border,";background-color:",u.background,";",""),btn:y("padding:10px 18px;font-size:",Z.base,";font-weight:500;border-radius:6px;cursor:pointer;transition:all 0.15s ease;letter-spacing:-0.01em;",""),btnCancel:y("background-color:",u.surface,";border:1px solid ",u.border,";color:",u.text,";&:hover{background-color:",u.surfaceHover,";border-color:",u.borderHover,";}",""),btnConfirm:y("background-color:",u.primary,";border:1px solid ",u.primary,";color:white;&:hover:not(:disabled){background-color:",u.primaryHover,";border-color:",u.primaryHover,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),loading:y("display:flex;align-items:center;justify-content:center;padding:40px;color:",u.textSecondary,";",""),spinner:y("width:24px;height:24px;border-radius:50%;border:3px solid ",u.border,";border-top-color:",u.primary,";animation:spin 0.8s linear infinite;@keyframes spin{to{transform:rotate(360deg);}}","")};function jp({selectedItems:o,currentPath:r,onMove:f,onCancel:d}){const[h,m]=S.useState([]),[C,D]=S.useState(!0),[w,g]=S.useState(null);S.useEffect(()=>{async function U(){try{const G=await fetch("/api/studio/list-folders");if(G.ok){const ie=await G.json();console.log("Loaded folders:",ie),m(ie.folders||[])}else console.error("Failed to load folders:",G.status,await G.text())}catch(G){console.error("Failed to load folders:",G)}finally{D(!1)}}U()},[]);const R=Array.from(o),k=h.filter(U=>!R.some(G=>U.path===G||U.path.startsWith(G+"/"))),B=U=>U===r,Y=()=>{w&&f(w)};return s("div",{css:At.overlay,onClick:d,children:b("div",{css:At.modal,onClick:U=>U.stopPropagation(),children:[s("div",{css:At.header,children:s("h3",{css:At.title,children:"Move Items"})}),b("div",{css:At.body,children:[b("p",{css:At.message,children:["Select a destination folder for ",o.size," item",o.size!==1?"s":"",":"]}),C?s("div",{css:At.loading,children:s("div",{css:At.spinner})}):k.length===0?s("div",{css:At.loading,children:"No available folders to move to."}):s("div",{css:At.folderList,children:k.map(U=>{const G=B(U.path);return b("div",{css:[At.folderItem,w===U.path&&At.folderItemSelected,G&&At.folderItemDisabled,"",""],style:{paddingLeft:12},onClick:()=>!G&&g(U.path),children:[U.depth>0&&s("div",{css:At.treeIndent,children:Array.from({length:U.depth}).map((ie,V)=>s("div",{css:At.treeLine},V))}),s("svg",{css:At.folderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:s("path",{d:"M10 4H4a2 2 0 00-2 2v12a2 2 0 002 2h16a2 2 0 002-2V8a2 2 0 00-2-2h-8l-2-2z"})}),b("span",{css:At.folderName,children:[U.name,G&&" (current)"]})]},U.path)})})]}),b("div",{css:At.footer,children:[s("button",{css:[At.btn,At.btnCancel,"",""],onClick:d,children:"Cancel"}),s("button",{css:[At.btn,At.btnConfirm,"",""],onClick:Y,disabled:!w,children:"Move Here"})]})]})})}const f1=`CLOUDFLARE_R2_ACCOUNT_ID=your_account_id
39
+ CLOUDFLARE_R2_ACCESS_KEY_ID=your_access_key
40
+ CLOUDFLARE_R2_SECRET_ACCESS_KEY=your_secret_key
41
+ CLOUDFLARE_R2_BUCKET_NAME=your_bucket_name
42
+ CLOUDFLARE_R2_PUBLIC_URL=https://pub-xxx.r2.dev
43
+ NEXT_PUBLIC_CLOUDFLARE_R2_PUBLIC_URL=https://pub-xxx.r2.dev`,ye={overlay:{name:"8ivopw",styles:"position:fixed;inset:0;background:rgba(0, 0, 0, 0.6);display:flex;align-items:center;justify-content:center;z-index:1100;padding:20px"},modal:y("background:",u.surface,";border-radius:12px;max-width:560px;width:100%;max-height:90vh;overflow-y:auto;box-shadow:0 20px 40px rgba(0, 0, 0, 0.3);",""),header:y("display:flex;align-items:center;gap:12px;padding:20px 24px;border-bottom:1px solid ",u.border,";",""),icon:y("width:32px;height:32px;color:",u.primary,";flex-shrink:0;",""),title:y("font-size:",Z.xl,";font-weight:600;color:",u.text,";margin:0;",""),closeBtn:y("margin-left:auto;background:none;border:none;padding:4px;cursor:pointer;color:",u.textMuted,";border-radius:4px;&:hover{color:",u.text,";background:",u.surfaceHover,";}",""),closeIcon:{name:"1aynuae",styles:"width:20px;height:20px"},content:{name:"vxuddk",styles:"padding:24px"},intro:y("font-size:",Z.base,";color:",u.textSecondary,";margin:0 0 20px 0;line-height:1.6;",""),steps:{name:"1fs2p21",styles:"list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:16px"},step:{name:"1wesxqa",styles:"display:flex;gap:12px"},stepNumber:y("width:28px;height:28px;border-radius:50%;background:",u.primaryLight,";color:",u.primary,";font-size:",Z.sm,";font-weight:600;display:flex;align-items:center;justify-content:center;flex-shrink:0;",""),stepContent:{name:"pkc2k3",styles:"flex:1;padding-top:3px"},stepTitle:y("font-size:",Z.base,";font-weight:500;color:",u.text,";margin:0 0 4px 0;",""),stepDesc:y("font-size:",Z.sm,";color:",u.textSecondary,";margin:0;line-height:1.5;",""),link:y("color:",u.primary,";text-decoration:none;font-weight:500;&:hover{text-decoration:underline;}",""),envVarsWrapper:{name:"1ksolcl",styles:"position:relative;margin-top:20px"},envVars:y("background:",u.background,";border:1px solid ",u.border,";border-radius:8px;padding:16px;padding-right:48px;font-family:'SF Mono',Monaco,'Cascadia Code',monospace;font-size:13px;line-height:1.8;color:",u.text,";overflow-x:auto;",""),envVar:{name:"4zleql",styles:"display:block"},envKey:y("color:",u.primary,";",""),envValue:y("color:",u.textSecondary,";",""),copyBtn:y("position:absolute;top:8px;right:8px;width:32px;height:32px;display:flex;align-items:center;justify-content:center;background:",u.surface,";border:1px solid ",u.border,";border-radius:6px;cursor:pointer;color:",u.textMuted,";transition:all 0.15s ease;&:hover{background:",u.surfaceHover,";color:",u.text,";border-color:#d0d5dd;}",""),copyIcon:{name:"157xhr7",styles:"width:16px;height:16px"},copiedTooltip:{name:"9a5yd1",styles:"position:absolute;top:50%;right:100%;transform:translateY(-50%);background:#1a1f36;color:white;padding:4px 8px;border-radius:4px;font-size:12px;white-space:nowrap;margin-right:6px;pointer-events:none;&::before{content:'';position:absolute;right:-4px;top:50%;transform:translateY(-50%);border-left:4px solid #1a1f36;border-top:4px solid transparent;border-bottom:4px solid transparent;}"},footer:y("padding:16px 24px;border-top:1px solid ",u.border,";display:flex;justify-content:flex-end;gap:12px;",""),docsBtn:y("padding:10px 16px;border-radius:6px;font-size:",Z.base,";font-weight:500;border:1px solid ",u.border,";background:",u.surface,";color:",u.text,";cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;gap:6px;transition:all 0.15s ease;&:hover{background:",u.surfaceHover,";border-color:#d0d5dd;}",""),doneBtn:y("padding:10px 20px;border-radius:6px;font-size:",Z.base,";font-weight:500;border:none;background:",u.primary,";color:white;cursor:pointer;transition:background 0.15s ease;&:hover{background:",u.primaryHover,";}",""),externalIcon:{name:"1djxupe",styles:"width:14px;height:14px"}};function qp({isOpen:o,onClose:r}){const[f,d]=S.useState(!1),h=async()=>{try{await navigator.clipboard.writeText(f1),d(!0),setTimeout(()=>d(!1),2e3)}catch(m){console.error("Failed to copy:",m)}};return o?s("div",{css:ye.overlay,onClick:r,children:b("div",{css:ye.modal,onClick:m=>m.stopPropagation(),children:[b("div",{css:ye.header,children:[s("svg",{css:ye.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})}),s("h2",{css:ye.title,children:"Set Up CDN Storage"}),s("button",{css:ye.closeBtn,onClick:r,children:s("svg",{css:ye.closeIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),b("div",{css:ye.content,children:[s("p",{css:ye.intro,children:"Sync your images to Cloudflare R2 for faster global delivery. R2 offers generous free tier with no egress fees."}),b("ol",{css:ye.steps,children:[b("li",{css:ye.step,children:[s("span",{css:ye.stepNumber,children:"1"}),b("div",{css:ye.stepContent,children:[s("h4",{css:ye.stepTitle,children:"Create a Cloudflare account"}),b("p",{css:ye.stepDesc,children:["Sign up at"," ",s("a",{css:ye.link,href:"https://dash.cloudflare.com/sign-up",target:"_blank",rel:"noopener noreferrer",children:"dash.cloudflare.com"})," ","if you don't have one already."]})]})]}),b("li",{css:ye.step,children:[s("span",{css:ye.stepNumber,children:"2"}),b("div",{css:ye.stepContent,children:[s("h4",{css:ye.stepTitle,children:"Create an R2 bucket"}),b("p",{css:ye.stepDesc,children:["Go to R2 in your Cloudflare dashboard and create a new bucket. Choose a name like ",s("code",{children:"my-images"}),"."]})]})]}),b("li",{css:ye.step,children:[s("span",{css:ye.stepNumber,children:"3"}),b("div",{css:ye.stepContent,children:[s("h4",{css:ye.stepTitle,children:"Enable public access"}),b("p",{css:ye.stepDesc,children:['In bucket settings, enable "Public Access" and copy the public URL (e.g., ',s("code",{children:"https://pub-xxx.r2.dev"}),")."]})]})]}),b("li",{css:ye.step,children:[s("span",{css:ye.stepNumber,children:"4"}),b("div",{css:ye.stepContent,children:[s("h4",{css:ye.stepTitle,children:"Create API token"}),s("p",{css:ye.stepDesc,children:'Go to R2 → Manage R2 API Tokens → Create API Token. Select "Object Read & Write" permissions for your bucket.'})]})]}),b("li",{css:ye.step,children:[s("span",{css:ye.stepNumber,children:"5"}),b("div",{css:ye.stepContent,children:[s("h4",{css:ye.stepTitle,children:"Add environment variables"}),b("p",{css:ye.stepDesc,children:["Add these to your ",s("code",{children:".env.local"})," file:"]})]})]})]}),b("div",{css:ye.envVarsWrapper,children:[b("div",{css:ye.envVars,children:[b("span",{css:ye.envVar,children:[s("span",{css:ye.envKey,children:"CLOUDFLARE_R2_ACCOUNT_ID"}),"=",s("span",{css:ye.envValue,children:"your_account_id"})]}),b("span",{css:ye.envVar,children:[s("span",{css:ye.envKey,children:"CLOUDFLARE_R2_ACCESS_KEY_ID"}),"=",s("span",{css:ye.envValue,children:"your_access_key"})]}),b("span",{css:ye.envVar,children:[s("span",{css:ye.envKey,children:"CLOUDFLARE_R2_SECRET_ACCESS_KEY"}),"=",s("span",{css:ye.envValue,children:"your_secret_key"})]}),b("span",{css:ye.envVar,children:[s("span",{css:ye.envKey,children:"CLOUDFLARE_R2_BUCKET_NAME"}),"=",s("span",{css:ye.envValue,children:"your_bucket_name"})]}),b("span",{css:ye.envVar,children:[s("span",{css:ye.envKey,children:"CLOUDFLARE_R2_PUBLIC_URL"}),"=",s("span",{css:ye.envValue,children:"https://pub-xxx.r2.dev"})]}),b("span",{css:ye.envVar,children:[s("span",{css:ye.envKey,children:"NEXT_PUBLIC_CLOUDFLARE_R2_PUBLIC_URL"}),"=",s("span",{css:ye.envValue,children:"https://pub-xxx.r2.dev"})]})]}),b("button",{css:ye.copyBtn,onClick:h,title:"Copy to clipboard",children:[f&&s("span",{css:ye.copiedTooltip,children:"Copied!"}),s("svg",{css:ye.copyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})})]})]})]}),b("div",{css:ye.footer,children:[b("a",{css:ye.docsBtn,href:"https://developers.cloudflare.com/r2/get-started/",target:"_blank",rel:"noopener noreferrer",children:["R2 Documentation",s("svg",{css:ye.externalIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})})]}),s("button",{css:ye.doneBtn,onClick:r,children:"Got it"})]})]})}):null}const h1=pn`
44
+ from { opacity: 0; }
45
+ to { opacity: 1; }
46
+ `,p1=pn`
47
+ from {
48
+ opacity: 0;
49
+ transform: translateY(-8px) scale(0.98);
50
+ }
51
+ to {
52
+ opacity: 1;
53
+ transform: translateY(0) scale(1);
54
+ }
55
+ `,yt={overlay:y("position:fixed;inset:0;background-color:rgba(26, 31, 54, 0.4);backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;z-index:10000;animation:",h1," 0.15s ease-out;font-family:",ro,";",""),modal:y(ni," background-color:",u.surface,";border-radius:12px;box-shadow:0 30px 60px -12px rgba(50, 50, 93, 0.25),0 18px 36px -18px rgba(0, 0, 0, 0.3);max-width:520px;width:90%;animation:",p1," 0.2s ease-out;overflow:hidden;",""),header:{name:"nsgk6m",styles:"padding:24px 24px 0"},title:y("font-size:",Z.lg,";font-weight:600;color:",u.text,";margin:0;letter-spacing:-0.02em;",""),tabs:y("display:flex;gap:0;margin-top:16px;border-bottom:1px solid ",u.border,";",""),tab:y("padding:12px 20px;font-size:",Z.base,";font-weight:500;color:",u.textSecondary,";background:none;border:none;cursor:pointer;position:relative;transition:color 0.15s;&:hover{color:",u.text,";}",""),tabActive:y("color:",u.primary,";&::after{content:'';position:absolute;bottom:-1px;left:0;right:0;height:2px;background-color:",u.primary,";}",""),body:{name:"1po9b7e",styles:"padding:24px;min-height:200px"},dropzone:y("border:2px dashed ",u.border,";border-radius:8px;padding:40px 24px;text-align:center;cursor:pointer;transition:all 0.15s;&:hover{border-color:",u.primary,";background-color:",u.primaryLight,";}",""),dropzoneActive:y("border-color:",u.primary,";background-color:",u.primaryLight,";",""),dropzoneIcon:y("width:48px;height:48px;margin:0 auto 16px;color:",u.textMuted,";",""),dropzoneText:y("font-size:",Z.base,";color:",u.text,";margin:0 0 4px;",""),dropzoneHint:y("font-size:",Z.sm,";color:",u.textSecondary,";margin:0;",""),textarea:y("width:100%;min-height:150px;padding:12px;font-size:",Z.sm,";font-family:ui-monospace,SFMono-Regular,'SF Mono',Menlo,Consolas,monospace;border:1px solid ",u.border,";border-radius:8px;resize:vertical;&:focus{outline:none;border-color:",u.primary,";box-shadow:0 0 0 3px ",u.primaryLight,";}&::placeholder{color:",u.textMuted,";}",""),textareaLabel:y("font-size:",Z.sm,";color:",u.textSecondary,";margin:0 0 8px;",""),footer:y("display:flex;justify-content:flex-end;gap:12px;padding:16px 24px;border-top:1px solid ",u.border,";background-color:",u.background,";",""),btn:y("padding:10px 18px;font-size:",Z.base,";font-weight:500;border-radius:6px;cursor:pointer;transition:all 0.15s ease;letter-spacing:-0.01em;",""),btnCancel:y("background-color:",u.surface,";border:1px solid ",u.border,";color:",u.text,";&:hover{background-color:",u.surfaceHover,";border-color:",u.borderHover,";}",""),btnConfirm:y("background-color:",u.primary,";border:1px solid ",u.primary,";color:white;&:hover:not(:disabled){background-color:",u.primaryHover,";border-color:",u.primaryHover,";}&:disabled{opacity:0.6;cursor:not-allowed;}",""),fileInput:{name:"eivff4",styles:"display:none"},selectedFiles:y("margin-top:16px;padding:12px;background-color:",u.background,";border-radius:6px;font-size:",Z.sm,";color:",u.text,";","")};function m1({currentPath:o,onClose:r,onUploadComplete:f,streamingOperation:d,setShowProgress:h,setProgressTitle:m,setProgressState:C}){const[D,w]=S.useState("upload"),[g,R]=S.useState([]),[k,B]=S.useState(""),[Y,U]=S.useState(!1),[G,ie]=S.useState(!1),[V,oe]=S.useState(!1),ae=S.useRef(null),ce=S.useCallback(N=>{N&&R(Array.from(N))},[]),X=S.useCallback(N=>{N.preventDefault(),U(!1),ce(N.dataTransfer.files)},[ce]),W=S.useRef(!1),$=S.useCallback(async()=>{if(g.length!==0){if(h&&m&&C){r(),W.current=!1,m("Uploading Files"),h(!0),C({current:0,total:g.length,percent:0,status:"processing",message:"Uploading..."});let N=0;const Q=[];for(let ue=0;ue<g.length;ue++){if(W.current){C(te=>({...te,status:"stopped",message:`Stopped. Uploaded ${N} file${N!==1?"s":""}.`})),f();return}const he=g[ue],pe=new FormData;pe.append("file",he),pe.append("path",o);try{(await fetch("/api/studio/upload",{method:"POST",body:pe})).ok?N++:Q.push(he.name)}catch{Q.push(he.name)}C({current:ue+1,total:g.length,percent:Math.round((ue+1)/g.length*100),status:"processing",currentFile:he.name})}C({current:g.length,total:g.length,percent:100,status:"complete",message:`Uploaded ${N} file${N!==1?"s":""}.${Q.length>0?` ${Q.length} failed.`:""}`}),f();return}ie(!0);try{for(const N of g){const Q=new FormData;Q.append("file",N),Q.append("path",o),await fetch("/api/studio/upload",{method:"POST",body:Q})}f(),r()}catch(N){console.error("Upload failed:",N)}finally{ie(!1)}}},[g,o,f,r,h,m,C]),P=S.useCallback(async()=>{const N=k.split(`
56
+ `).map(Q=>Q.trim()).filter(Q=>Q.length>0);if(N.length!==0){if(d){r(),await d.execute({endpoint:"/api/studio/import",body:{urls:N},title:"Importing URLs",onComplete:()=>{f()}});return}oe(!0);try{const ue=(await fetch("/api/studio/import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({urls:N})})).body?.getReader();if(!ue)throw new Error("No reader");const he=new TextDecoder;for(;;){const{done:pe,value:te}=await ue.read();if(pe)break;const E=he.decode(te).split(`
57
+
58
+ `).filter(J=>J.startsWith("data: "));for(const J of E)JSON.parse(J.replace("data: ","")).type==="complete"&&(f(),r())}}catch(Q){console.error("Import failed:",Q)}finally{oe(!1)}}},[k,f,r,d]);return s("div",{css:yt.overlay,onClick:r,children:b("div",{css:yt.modal,onClick:N=>N.stopPropagation(),children:[b("div",{css:yt.header,children:[s("h3",{css:yt.title,children:"Add New"}),b("div",{css:yt.tabs,children:[s("button",{css:[yt.tab,D==="upload"&&yt.tabActive,"",""],onClick:()=>w("upload"),children:"Upload Files"}),s("button",{css:[yt.tab,D==="import"&&yt.tabActive,"",""],onClick:()=>w("import"),children:"Import URLs"})]})]}),s("div",{css:yt.body,children:D==="upload"?b(at,{children:[b("div",{css:[yt.dropzone,Y&&yt.dropzoneActive,"",""],onClick:()=>ae.current?.click(),onDragOver:N=>{N.preventDefault(),U(!0)},onDragLeave:()=>U(!1),onDrop:X,children:[s("svg",{css:yt.dropzoneIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})}),s("p",{css:yt.dropzoneText,children:"Drop files here or click to browse"}),s("p",{css:yt.dropzoneHint,children:"Supports images and other media files"})]}),s("input",{ref:ae,type:"file",multiple:!0,css:yt.fileInput,onChange:N=>ce(N.target.files)}),g.length>0&&b("div",{css:yt.selectedFiles,children:[g.length," file",g.length!==1?"s":""," selected"]})]}):b(at,{children:[s("p",{css:yt.textareaLabel,children:"Paste image URLs (one per line)"}),s("textarea",{css:yt.textarea,value:k,onChange:N=>B(N.target.value),placeholder:`https://cdn.example.com/photos/image1.jpg
59
+ https://cdn.example.com/photos/image2.jpg`})]})}),b("div",{css:yt.footer,children:[s("button",{css:[yt.btn,yt.btnCancel,"",""],onClick:r,children:"Cancel"}),D==="upload"?s("button",{css:[yt.btn,yt.btnConfirm,"",""],onClick:$,disabled:g.length===0||G,children:G?"Uploading...":"Upload"}):s("button",{css:[yt.btn,yt.btnConfirm,"",""],onClick:P,disabled:!k.trim()||V,children:V?"Importing...":"Import"})]})]})})}const g1="36px",He={btn:y("height:",g1,";padding:0 12px;background:",u.surface,";border:1px solid ",u.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{background-color:",u.surfaceHover,";border-color:",u.borderHover,";}",""),icon:y("width:16px;height:16px;color:",u.textSecondary,";",""),overlay:{name:"1cy1r91",styles:"position:fixed;top:0;right:0;bottom:0;left:0;z-index:10000;display:flex;align-items:flex-start;justify-content:center;background-color:rgba(26, 31, 54, 0.4);backdrop-filter:blur(4px);overflow-y:auto;scroll-behavior:smooth;padding:48px 24px"},panel:y(ni," position:relative;background-color:",u.surface,";border-radius:12px;box-shadow:0 30px 60px -12px rgba(50, 50, 93, 0.25),0 18px 36px -18px rgba(0, 0, 0, 0.3);width:100%;max-width:512px;padding:24px;margin:auto 0;",""),header:{name:"1o4fids",styles:"display:flex;align-items:center;justify-content:space-between;margin-bottom:24px"},title:y("font-size:",Z.xl,";font-weight:600;color:",u.text,";margin:0;letter-spacing:-0.02em;",""),closeBtn:y("padding:6px;background:",u.surface,";border:1px solid ",u.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{background-color:",u.surfaceHover,";border-color:",u.borderHover,";}",""),sections:{name:"klisov",styles:"display:flex;flex-direction:column;gap:24px"},sectionTitle:y("font-size:",Z.base,";font-weight:600;color:",u.text,";margin:0 0 12px 0;",""),description:y("font-size:",Z.sm,";color:",u.textSecondary,";margin:0 0 12px 0;",""),codeWrapper:{name:"bjn8wh",styles:"position:relative"},code:y("background-color:",u.background,";border-radius:8px;padding:12px;padding-right:40px;font-family:'SF Mono',Monaco,Consolas,monospace;font-size:",Z.xs,";color:",u.textSecondary,";border:1px solid ",u.border,";overflow-x:auto;white-space:nowrap;",""),copyBtn:y("position:absolute;top:8px;right:8px;padding:4px;background:",u.surface,";border:1px solid ",u.border,";border-radius:4px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{background-color:",u.surfaceHover,";border-color:",u.borderHover,";}",""),tooltip:{name:"6eskey",styles:"position:absolute;bottom:100%;left:50%;transform:translateX(-50%);background:#1a1f36;color:white;padding:4px 8px;border-radius:4px;font-size:12px;white-space:nowrap;margin-bottom:6px;pointer-events:none;z-index:100;&::after{content:'';position:absolute;top:100%;left:50%;transform:translateX(-50%);border:4px solid transparent;border-top-color:#1a1f36;}"},copyIcon:y("width:14px;height:14px;color:",u.textSecondary,";",""),codeLine:{name:"1bbvuqp",styles:"margin:0 0 4px 0;&:last-child{margin:0;}"},input:y("width:100%;padding:10px 14px;border:1px solid ",u.border,";border-radius:6px;font-size:",Z.base,";color:",u.text,";background:",u.surface,";transition:all 0.15s ease;&:focus{outline:none;border-color:",u.primary,";box-shadow:0 0 0 3px ",u.primaryLight,";}&::placeholder{color:",u.textMuted,";}",""),grid:{name:"xtlr5l",styles:"display:grid;grid-template-columns:repeat(3, 1fr);gap:12px"},label:y("font-size:",Z.xs,";font-weight:500;color:",u.textSecondary,";display:block;margin-bottom:6px;",""),footer:y("margin-top:24px;padding-top:20px;border-top:1px solid ",u.border,";display:flex;justify-content:flex-end;gap:12px;",""),cancelBtn:y("padding:10px 18px;font-size:",Z.base,";font-weight:500;color:",u.text,";background:",u.surface,";border:1px solid ",u.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;&:hover{background-color:",u.surfaceHover,";border-color:",u.borderHover,";}",""),saveBtn:y("padding:10px 18px;font-size:",Z.base,";font-weight:500;color:white;background-color:",u.primary,";border:1px solid ",u.primary,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;&:hover{background-color:",u.primaryHover,";border-color:",u.primaryHover,";}&:disabled{opacity:0.6;cursor:not-allowed;}",""),cdnList:{name:"3w0yoi",styles:"display:flex;flex-direction:column;gap:8px"},cdnRow:{name:"197tvr9",styles:"display:flex;gap:8px;align-items:center"},cdnInput:y("flex:1;padding:8px 12px;border:1px solid ",u.border,";border-radius:6px;font-size:",Z.sm,";color:",u.text,";background:",u.surface,";transition:all 0.15s ease;&:focus{outline:none;border-color:",u.primary,";box-shadow:0 0 0 3px ",u.primaryLight,";}",""),cdnIndex:y("font-size:",Z.xs,";color:",u.textMuted,";width:24px;text-align:center;flex-shrink:0;",""),cdnDeleteBtn:y("padding:6px;background:none;border:none;cursor:pointer;color:",u.textMuted,";transition:color 0.15s;flex-shrink:0;&:hover{color:",u.danger,";}",""),cdnAddBtn:y("padding:8px 12px;font-size:",Z.sm,";font-weight:500;color:",u.primary,";background:",u.primaryLight,";border:1px dashed ",u.primary,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;gap:6px;margin-top:8px;&:hover{background:",u.surface,";}",""),warning:y("font-size:",Z.xs,";color:",u.danger,";margin-top:8px;padding:8px 12px;background:",u.dangerLight,";border-radius:6px;","")};function y1(){const[o,r]=S.useState(!1);return b(at,{children:[s("button",{css:He.btn,onClick:()=>r(!0),"aria-label":"Settings",children:b("svg",{css:He.icon,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[s("circle",{cx:"12",cy:"12",r:"3"}),s("path",{d:"M19.4 15a1.65 1.65 0 00.33 1.82l.06.06a2 2 0 010 2.83 2 2 0 01-2.83 0l-.06-.06a1.65 1.65 0 00-1.82-.33 1.65 1.65 0 00-1 1.51V21a2 2 0 01-2 2 2 2 0 01-2-2v-.09A1.65 1.65 0 009 19.4a1.65 1.65 0 00-1.82.33l-.06.06a2 2 0 01-2.83 0 2 2 0 010-2.83l.06-.06a1.65 1.65 0 00.33-1.82 1.65 1.65 0 00-1.51-1H3a2 2 0 01-2-2 2 2 0 012-2h.09A1.65 1.65 0 004.6 9a1.65 1.65 0 00-.33-1.82l-.06-.06a2 2 0 010-2.83 2 2 0 012.83 0l.06.06a1.65 1.65 0 001.82.33H9a1.65 1.65 0 001-1.51V3a2 2 0 012-2 2 2 0 012 2v.09a1.65 1.65 0 001 1.51 1.65 1.65 0 001.82-.33l.06-.06a2 2 0 012.83 0 2 2 0 010 2.83l-.06.06a1.65 1.65 0 00-.33 1.82V9a1.65 1.65 0 001.51 1H21a2 2 0 012 2 2 2 0 01-2 2h-.09a1.65 1.65 0 00-1.51 1z"})]})}),o&&s(v1,{onClose:()=>r(!1)})]})}const b1=`# Dev site link (opens from Studio header)
60
+ STUDIO_DEV_SITE_URL=http://localhost:3000
61
+
62
+ # Cloudflare R2 Storage
63
+ CLOUDFLARE_R2_ACCOUNT_ID=your_account_id
64
+ CLOUDFLARE_R2_ACCESS_KEY_ID=your_access_key_id
65
+ CLOUDFLARE_R2_SECRET_ACCESS_KEY=your_secret_access_key
66
+ CLOUDFLARE_R2_BUCKET_NAME=your_bucket_name
67
+ CLOUDFLARE_R2_PUBLIC_URL=https://your-cdn.example.com`;function v1({onClose:o}){const{triggerRefresh:r}=ei(),[f,d]=S.useState(!1),[h,m]=S.useState([]),[C,D]=S.useState(!0),[w,g]=S.useState(!1),[R,k]=S.useState(!1);S.useEffect(()=>{async function V(){try{const ae=await(await fetch("/api/studio/cdns")).json();m(ae.cdns||[])}catch(oe){console.error("Failed to load CDN URLs:",oe)}finally{D(!1)}}V()},[]);const B=()=>{navigator.clipboard.writeText(b1),d(!0),setTimeout(()=>d(!1),2e3)},Y=S.useCallback((V,oe)=>{m(ae=>{const ce=[...ae];return ce[V]=oe,ce}),k(!0)},[]),U=S.useCallback(()=>{m(V=>[...V,""]),k(!0)},[]),G=S.useCallback(V=>{m(oe=>oe.filter((ae,ce)=>ce!==V)),k(!0)},[]),ie=S.useCallback(async()=>{g(!0);try{(await fetch("/api/studio/cdns",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cdns:h})})).ok&&(k(!1),r(),o())}catch(V){console.error("Failed to save CDN URLs:",V)}finally{g(!1)}},[h,r,o]);return s("div",{css:He.overlay,onClick:o,children:b("div",{css:He.panel,onClick:V=>V.stopPropagation(),children:[b("div",{css:He.header,children:[s("h2",{css:He.title,children:"Settings"}),s("button",{css:He.closeBtn,onClick:o,children:s("svg",{css:He.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),b("div",{css:He.sections,children:[b("section",{children:[s("h3",{css:He.sectionTitle,children:"CDN URLs"}),s("p",{css:He.description,children:"Manage CDN base URLs used by your images:"}),C?s("p",{css:He.description,children:"Loading..."}):b(at,{children:[s("div",{css:He.cdnList,children:h.map((V,oe)=>b("div",{css:He.cdnRow,children:[s("span",{css:He.cdnIndex,children:oe}),s("input",{css:He.cdnInput,type:"text",value:V,onChange:ae=>Y(oe,ae.target.value),placeholder:"https://cdn.example.com"}),s("button",{css:He.cdnDeleteBtn,onClick:()=>G(oe),title:"Delete CDN URL",children:s("svg",{width:"16",height:"16",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})})})]},oe))}),b("button",{css:He.cdnAddBtn,onClick:U,children:[s("svg",{width:"14",height:"14",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})}),"Add CDN URL"]}),h.length>0&&s("p",{css:He.warning,children:"Warning: Changing CDN URLs may break image references. The index numbers correspond to image `c` values."})]})]}),b("section",{children:[s("h3",{css:He.sectionTitle,children:"Environment Variables"}),b("p",{css:He.description,children:["Configure in ",s("code",{children:".env.local"})," file (local development only, not needed in production):"]}),b("div",{css:He.codeWrapper,children:[b("button",{css:He.copyBtn,onClick:B,title:"Copy to clipboard",children:[f&&s("span",{css:He.tooltip,children:"Copied!"}),s("svg",{css:He.copyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"})})]}),b("div",{css:He.code,children:[s("p",{css:He.codeLine,children:"NEXT_PUBLIC_PRODUCTION_URL=http://localhost:3000"}),s("p",{css:He.codeLine,children:" "}),s("p",{css:He.codeLine,children:"# Cloudflare R2 Storage"}),s("p",{css:He.codeLine,children:"CLOUDFLARE_R2_ACCOUNT_ID=your_account_id"}),s("p",{css:He.codeLine,children:"CLOUDFLARE_R2_ACCESS_KEY_ID=your_access_key_id"}),s("p",{css:He.codeLine,children:"CLOUDFLARE_R2_SECRET_ACCESS_KEY=your_secret_access_key"}),s("p",{css:He.codeLine,children:"CLOUDFLARE_R2_BUCKET_NAME=your_bucket_name"}),s("p",{css:He.codeLine,children:"CLOUDFLARE_R2_PUBLIC_URL=https://your-cdn.example.com"})]})]})]}),b("section",{children:[s("h3",{css:He.sectionTitle,children:"Thumbnail Sizes"}),b("div",{css:He.grid,children:[b("div",{children:[s("label",{css:He.label,children:"Small"}),s("input",{css:He.input,type:"number",defaultValue:300})]}),b("div",{children:[s("label",{css:He.label,children:"Medium"}),s("input",{css:He.input,type:"number",defaultValue:700})]}),b("div",{children:[s("label",{css:He.label,children:"Large"}),s("input",{css:He.input,type:"number",defaultValue:1400})]})]})]})]}),b("div",{css:He.footer,children:[s("button",{css:He.cancelBtn,onClick:o,children:"Cancel"}),s("button",{css:He.saveBtn,onClick:ie,disabled:w||!R,children:w?"Saving...":"Save Changes"})]})]})})}const nu="36px",x1=pn`
68
+ to { transform: rotate(360deg); }
69
+ `,xe={toolbar:y("display:flex;flex-wrap:nowrap;align-items:center;justify-content:space-between;gap:8px;padding:12px 16px;background-color:",u.surface,";border-bottom:1px solid ",u.border,";overflow:visible;min-width:0;@media (min-width: 768px){padding:12px 24px;}",""),left:{name:"17nohj2",styles:"display:flex;flex-wrap:nowrap;flex-shrink:0;align-items:center;gap:8px"},right:{name:"17nohj2",styles:"display:flex;flex-wrap:nowrap;flex-shrink:0;align-items:center;gap:8px"},btn:y("display:inline-flex;align-items:center;justify-content:center;gap:6px;height:",nu,";padding:0 14px;border-radius:6px;font-size:",Z.base,";font-weight:500;background:",u.surface,";border:1px solid ",u.border,";cursor:pointer;transition:all 0.15s ease;color:",u.text,";letter-spacing:-0.01em;&:hover:not(:disabled){background-color:",u.surfaceHover,";border-color:",u.borderHover,";}&:disabled{cursor:not-allowed;opacity:0.5;}",""),btnPrimary:y("background:",u.primary,";border-color:",u.primary,";color:white;&:hover:not(:disabled){background:",u.primaryHover,";border-color:",u.primaryHover,";}",""),btnDanger:y("color:",u.danger,";&:hover:not(:disabled){background-color:",u.dangerLight,";border-color:",u.danger,";}",""),btnCloud:{name:"1lzbs29",styles:"color:#f59e0b;&:hover:not(:disabled){background-color:rgba(245, 158, 11, 0.1);border-color:#f59e0b;}"},cloudDropdownWrapper:{name:"bjn8wh",styles:"position:relative"},dropdownArrow:{name:"1j1hlpy",styles:"width:12px;height:12px;margin-left:4px"},cloudDropdown:y("position:absolute;top:100%;left:0;z-index:1000;min-width:160px;margin-top:4px;background:white;border:1px solid ",u.border,";border-radius:6px;box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);overflow:hidden;",""),cloudDropdownItem:y("display:flex;align-items:center;gap:8px;width:100%;padding:10px 14px;border:none;background:none;font-size:",Z.sm,";color:",u.text,";cursor:pointer;text-align:left;white-space:nowrap;&:hover{background-color:",u.hover,";}svg{width:16px;height:16px;flex-shrink:0;color:#f59e0b;}",""),cloudDropdownItemDefault:y("svg{color:",u.text,";}",""),cloudDropdownItemDanger:y("color:",u.danger,";svg{color:",u.danger,";}",""),cloudDropdownDivider:y("height:1px;background-color:",u.border,";margin:4px 0;",""),icon:{name:"157xhr7",styles:"width:16px;height:16px"},iconSpin:y("animation:",x1," 1s linear infinite;",""),selectionCount:y("font-size:",Z.base,";color:",u.textSecondary,";display:flex;align-items:center;gap:8px;margin-right:8px;",""),clearBtn:y("color:",u.primary,";background:none;border:none;cursor:pointer;font-size:",Z.base,";font-weight:500;padding:0;&:hover{text-decoration:underline;}",""),divider:y("width:1px;height:24px;background:",u.border,";margin:0 4px;",""),viewToggle:y("display:flex;align-items:center;height:",nu,";background-color:",u.surface,";border:1px solid ",u.border,";border-radius:6px;overflow:hidden;",""),searchWrapper:{name:"9iujih",styles:"position:relative;display:flex;align-items:center"},searchInput:y("height:",nu,";padding:0 32px 0 12px;border:1px solid ",u.border,";border-radius:6px;font-size:",Z.base,";background:",u.surface,";color:",u.text,";width:180px;transition:all 0.15s ease;&:focus{outline:none;border-color:",u.primary,";box-shadow:0 0 0 2px ",u.primaryLight,";}&::placeholder{color:",u.textMuted,";}",""),searchClearBtn:y("position:absolute;right:5px;top:5px;bottom:5px;background:",u.primary,";border:none;padding:0 6px;cursor:pointer;color:white;display:flex;align-items:center;justify-content:center;border-radius:4px;transition:all 0.15s ease;&:hover{background:",u.primaryHover,";}",""),viewBtn:y("height:100%;padding:0 10px;background:transparent;border:none;cursor:pointer;color:",u.textSecondary,";transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{color:",u.text,";background-color:",u.surfaceHover,";}",""),viewBtnActive:y("background-color:",u.primaryLight,";color:",u.primary,";&:hover{background-color:",u.primaryLight,";color:",u.primary,";}","")};function S1(){const{selectedItems:o,viewMode:r,setViewMode:f,clearSelection:d,currentPath:h,triggerRefresh:m,focusedItem:C,scanRequested:D,clearScanRequest:w,fileItems:g,requestProcess:R,setProcessMode:k,actionState:B,cancelAction:Y}=ei(),U=S.useRef(null),G=S.useRef(null),[ie,V]=S.useState(!1),[oe,ae]=S.useState(!1),[ce,X]=S.useState(!1),[W,$]=S.useState(!1),[P,N]=S.useState(!1),[Q,ue]=S.useState(0),[he,pe]=S.useState(!1),[te,Ue]=S.useState(0),[E,J]=S.useState(!1),[F,De]=S.useState(!1),[Ye,v]=S.useState(!1),[L,I]=S.useState(0),[le,Ce]=S.useState(!1),[Ee,je]=S.useState("Processing Images"),[vt,Le]=S.useState({current:0,total:0,percent:0,status:"processing"}),[nn,Je]=S.useState(null),[ut,dt]=S.useState(!1),[jt,qt]=S.useState(!1),[an,Vt]=S.useState(!1),[mn,Se]=S.useState(!1),[lt,Qt]=S.useState(!1),[xt,ma]=S.useState(!1),[de,rt]=S.useState(!1),[Gt,Kt]=S.useState(!1),Pt=S.useRef(null),Ae=S.useRef(null),we=Np({setShowProgress:Ce,setProgressTitle:je,setProgressState:Le,triggerRefresh:m}),Xe=h==="public/images"||h.startsWith("public/images/");S.useCallback(()=>{U.current?.click()},[]);const mt=S.useCallback(()=>{$(!0),m(),setTimeout(()=>$(!1),600)},[m]),Ne=S.useCallback(async()=>{X(!0),je("Scanning Files"),Ce(!0),Le({current:0,total:0,percent:0,status:"processing",message:"Scanning for files..."});try{const ee=(await fetch("/api/studio/scan",{method:"POST"})).body?.getReader();if(!ee)throw new Error("No reader");const me=new TextDecoder;let ge="";for(;;){const{done:Te,value:_e}=await ee.read();if(Te)break;ge+=me.decode(_e,{stream:!0});const $e=ge.split(`
70
+
71
+ `);ge=$e.pop()||"";for(const We of $e){if(!We.startsWith("data: "))continue;const Oe=JSON.parse(We.slice(6));if(Oe.type==="start")Le({current:0,total:Oe.total,percent:0,status:"processing",message:`Scanning ${Oe.total} files...`});else if(Oe.type==="progress")Le({current:Oe.current,total:Oe.total,percent:Oe.percent,status:"processing",currentFile:Oe.currentFile});else if(Oe.type==="cleanup")Le(ln=>({...ln,message:Oe.message}));else if(Oe.type==="complete"){let ln=Oe.renamed>0?`${Oe.renamed} file(s) renamed due to conflicts. `:"";Oe.orphanedFiles&&Oe.orphanedFiles.length>0&&(ln+=`Found ${Oe.orphanedFiles.length} orphaned thumbnail(s) in images folder.`),Le({current:Oe.total||0,total:Oe.total||0,percent:100,status:"complete",processed:Oe.added,alreadyProcessed:Oe.existingCount,errors:Oe.errors,orphanedFiles:Oe.orphanedFiles,pendingUpdates:Oe.pendingUpdates,orphanedEntries:Oe.orphanedEntries,message:ln||void 0,isScan:!0}),m()}else Oe.type==="error"&&Le({current:0,total:0,percent:0,status:"error",message:Oe.message||"Scan failed"})}}}catch(se){console.error("Scan error:",se),Le({current:0,total:0,percent:0,status:"error",message:"Scan failed"})}finally{X(!1)}},[m]);S.useEffect(()=>{const se=ee=>{Pt.current&&!Pt.current.contains(ee.target)&&rt(!1),Ae.current&&!Ae.current.contains(ee.target)&&Kt(!1)};return document.addEventListener("mousedown",se),()=>document.removeEventListener("mousedown",se)},[]),S.useEffect(()=>{D&&!ce&&(w(),Ne())},[D,ce,w,Ne]);const Me=S.useCallback(async se=>{const ee=se.target.files;if(!ee||ee.length===0)return;const me=Array.from(ee);me.length>1?(Le({current:0,total:me.length,percent:0,status:"processing",message:"Uploading files..."}),Ce(!0)):ae(!0);let ge=0,Te=0;try{for(let _e=0;_e<me.length;_e++){const $e=me[_e],We=new FormData;We.append("file",$e),We.append("path",h);try{const Oe=await fetch("/api/studio/upload",{method:"POST",body:We});if(Oe.ok)ge++;else{const ln=await Oe.json();Te++,me.length===1&&(Oe.status>=500?(console.error("Upload error:",ln),Je({title:"Upload Failed",message:`Failed to upload ${$e.name}: ${ln.error||"Unknown error"}`})):Je({title:"Cannot Upload Here",message:ln.error||"Upload not allowed in this location."}))}}catch{Te++}me.length>1&&Le({current:_e+1,total:me.length,percent:Math.round((_e+1)/me.length*100),status:"processing",currentFile:$e.name})}me.length>1&&Le({current:me.length,total:me.length,percent:100,status:"complete",processed:ge,errors:Te}),m()}catch(_e){console.error("Upload error:",_e),me.length>1?Le({current:0,total:0,percent:0,status:"error",message:"Upload failed."}):Je({title:"Upload Failed",message:"Upload failed. Check console for details."})}finally{ae(!1),U.current&&(U.current.value="")}},[h,m]),kt=S.useCallback(async se=>{if(o.size>0){const me=Array.from(o),ge=me.filter(_e=>(_e.split("/").pop()||"").includes(".")&&!_e.endsWith("/")),Te=me.filter(_e=>!(_e.split("/").pop()||"").includes(".")||_e.endsWith("/"));if(Te.length>0)try{const $e=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(Te.join(","))}`)).json();if($e.images)for(const We of $e.images){const Oe=`public/${We}`;ge.includes(Oe)||ge.push(Oe)}}catch(_e){console.error("Failed to get folder files:",_e)}if(ge.length===0){Je({title:"No Files Found",message:"No files found in the selected items."});return}k(se),R(ge)}else try{const ge=await(await fetch("/api/studio/count-images")).json();if(!ge.images||ge.images.length===0){Je({title:"No Images Found",message:"No images found in the public folder to process."});return}const Te=ge.images.map(_e=>`public/${_e}`);k(se),R(Te)}catch(me){console.error("Failed to get images:",me),Je({title:"Error",message:"Failed to get images."})}},[o,R,k]),Tt=S.useCallback(()=>{we.stop(),G.current&&(Le(se=>({...se,status:"stopping"})),G.current.abort())},[we]),Ur=S.useCallback(async()=>{const se=vt.orphanedFiles;if(!(!se||se.length===0))try{const ee=await fetch("/api/studio/delete-orphans",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:se})}),me=await ee.json();ee.ok?(Le(ge=>({...ge,orphanedFiles:void 0,orphansRemoved:me.deleted,message:`Deleted ${me.deleted} orphaned thumbnail${me.deleted!==1?"s":""}.`})),m()):Je({title:"Delete Failed",message:me.error||"Failed to delete orphaned files."})}catch(ee){console.error("Delete orphans error:",ee),Je({title:"Delete Failed",message:"Failed to delete orphaned files. Check console for details."})}},[vt.orphanedFiles,m]),Hr=S.useCallback(async()=>{if(o.size===0)return;const se=Array.from(o),ee=se.filter(Te=>(Te.split("/").pop()||"").includes(".")&&!Te.endsWith("/")),me=se.filter(Te=>!(Te.split("/").pop()||"").includes(".")||Te.endsWith("/"));let ge=ee.length;if(me.length>0)try{const _e=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(me.join(","))}`)).json();_e.images&&(ge+=_e.images.length)}catch(Te){console.error("Failed to get folder files:",Te)}ue(ge),N(!0)},[o]),Br=S.useCallback(async()=>{N(!1);const se=Array.from(o);se.length!==0&&await we.execute({endpoint:"/api/studio/delete-stream",body:{paths:se},title:"Deleting Files",operationType:"delete",onComplete:()=>{d()}})},[o,d,we]),fl=S.useCallback(async()=>{if(o.size===0)return;const se=Array.from(o),ee=se.filter(We=>(We.split("/").pop()||"").includes(".")&&!We.endsWith("/")),me=se.filter(We=>!(We.split("/").pop()||"").includes(".")||We.endsWith("/")),ge=me.length>0;if(ge)try{const Oe=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(me.join(","))}`)).json();if(Oe.images)for(const ln of Oe.images){const si=`public/${ln}`;ee.includes(si)||ee.push(si)}}catch(We){console.error("Failed to get folder files:",We)}if(ee.length===0){Je({title:"No Files Found",message:"No files found in the selected items."});return}let Te=!1,_e=!1,$e=0;for(const We of ee){const Oe=g.find(ln=>ln.path===We);Oe?Oe.isRemote?Te=!0:Oe.cdnPushed?$e++:_e=!0:ge&&(_e=!0)}if(!ge&&$e===ee.length){Je({title:"Already Pushed",message:`All ${ee.length} file${ee.length!==1?"s are":" is"} already on the CDN.`});return}Ue(ee.length),J(Te),De(_e),pe(!0)},[o,g]),hl=S.useCallback(async()=>{pe(!1);const se=Array.from(o),ee=se.filter(Te=>(Te.split("/").pop()||"").includes(".")&&!Te.endsWith("/")),me=se.filter(Te=>!(Te.split("/").pop()||"").includes(".")||Te.endsWith("/"));if(me.length>0)try{const _e=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(me.join(","))}`)).json();if(_e.images)for(const $e of _e.images){const We=`public/${$e}`;ee.includes(We)||ee.push(We)}}catch(Te){console.error("Failed to get folder files:",Te)}const ge=ee.map(Te=>"/"+Te.replace(/^public\//,""));ge.length!==0&&await we.execute({endpoint:"/api/studio/sync-stream",body:{imageKeys:ge},title:"Pushing to CDN",onComplete:()=>{d()},onError:Te=>{(Te.includes("R2 not configured")||Te.includes("CLOUDFLARE_R2"))&&(Ce(!1),Qt(!0))}})},[o,d,we]),[Va,Fn]=S.useState([]),[pl,Qa]=S.useState(0),Nr=S.useCallback(async()=>{if(o.size===0)return;const se=Array.from(o),ee=se.filter(_e=>(_e.split("/").pop()||"").includes(".")&&!_e.endsWith("/")),me=se.filter(_e=>!(_e.split("/").pop()||"").includes(".")||_e.endsWith("/")),ge=me.length>0;if(ge)try{const $e=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(me.join(","))}`)).json();if($e.images)for(const We of $e.images){const Oe=`public/${We}`;ee.includes(Oe)||ee.push(Oe)}}catch(_e){console.error("Failed to get folder files:",_e)}if(ee.length===0){Je({title:"No Files Found",message:"No files found in the selected items."});return}let Te;if(ge)Te=ee;else if(Te=ee.filter(_e=>{const $e=g.find(We=>We.path===_e);return $e&&$e.cdnPushed&&!$e.isRemote}),Te.length===0){Je({title:"No CDN Files",message:`None of the ${ee.length} selected file${ee.length!==1?"s are":" is"} on the CDN.`});return}Fn(Te),Qa(ee.length),I(Te.length),v(!0)},[o,g]),so=S.useCallback(async()=>{v(!1),B.showDownloadConfirm&&Y();const ee=(B.showDownloadConfirm?B.actionPaths:Va).map(me=>"/"+me.replace(/^public\//,""));await we.execute({endpoint:"/api/studio/download-stream",body:{imageKeys:ee},title:"Downloading from CDN",onComplete:()=>d()})},[Va,d,B.showDownloadConfirm,B.actionPaths,Y,we]),ai=S.useCallback(async()=>{if(o.size===0)return;const ee=Array.from(o).filter(me=>{const ge=g.find(Te=>Te.path===me);return ge&&(ge.hasUpdate||ge.type==="folder"&&ge.updateCount&&ge.updateCount>0)});if(ee.length===0){Je({title:"No Updates",message:"No files with pending updates in selection."});return}await we.execute({endpoint:"/api/studio/push-updates-stream",body:{paths:ee},title:"Pushing Updates",onComplete:()=>d()})},[o,g,d,we]),Ka=S.useCallback(async()=>{if(o.size===0)return;const ee=Array.from(o).filter(me=>{const ge=g.find(Te=>Te.path===me);return ge&&(ge.hasUpdate||ge.type==="folder"&&ge.updateCount&&ge.updateCount>0)});if(ee.length!==0)try{const me=await fetch("/api/studio/cancel-updates",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:ee})});if(me.ok)d(),m();else{const ge=await me.json();Je({title:"Cancel Failed",message:ge.error||"Unknown error"})}}catch(me){console.error("Cancel updates error:",me),Je({title:"Cancel Failed",message:"Failed to cancel updates. Check console for details."})}},[o,g,d,m]),jr=S.useCallback(async se=>{dt(!1);try{const ee=await fetch("/api/studio/create-folder",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({parentPath:h,name:se})});if(ee.ok)m();else{const me=await ee.json();Je({title:"Create Folder Failed",message:me.error||"Unknown error"})}}catch(ee){console.error("Create folder error:",ee),Je({title:"Create Folder Failed",message:"Failed to create folder. Check console for details."})}},[h,m]),co=S.useCallback(()=>{o.size!==0&&Se(!0)},[o]),uo=S.useCallback(async se=>{const ee=Array.from(o);await we.execute({endpoint:"/api/studio/move",body:{paths:ee,destination:se},title:"Moving Files",onComplete:()=>d()})},[o,d,we]),{searchQuery:li,setSearchQuery:Jn}=ei(),ii=S.useCallback(se=>{Jn(se.target.value)},[Jn]),fo=S.useCallback(se=>{se.key==="Escape"&&(se.stopPropagation(),Jn(""),se.target.blur())},[Jn]),Un=o.size>0;Un&&Array.from(o).some(se=>{const ee=g.find(me=>me.path===se);return ee&&ee.cdnPushed&&!ee.isRemote}),Un&&Array.from(o).every(se=>{const ee=g.find(me=>me.path===se);return ee&&ee.type==="file"&&ee.cdnPushed&&!ee.isRemote});const qn=Un&&Array.from(o).some(se=>{const ee=g.find(me=>me.path===se);return ee&&(ee.hasUpdate||ee.type==="folder"&&ee.updateCount&&ee.updateCount>0)}),wt=Array.from(o),Rt=wt.length===1&&!wt[0].includes("."),gn=Rt?wt[0]:null,ml=gn&&gn.split("/").pop()||"",ga=wt.length===1&&wt[0].includes("."),ya=ga?wt[0]:null,oi=ya&&ya.split("/").pop()||"",Za=S.useCallback(async se=>{gn&&(qt(!1),await we.execute({endpoint:"/api/studio/rename-stream",body:{oldPath:gn,newName:se},title:"Renaming Folder",onComplete:()=>d()}))},[gn,d,we]),ri=S.useCallback(async se=>{ya&&(Vt(!1),await we.execute({endpoint:"/api/studio/rename-stream",body:{oldPath:ya,newName:se},title:"Renaming File",onComplete:()=>d()}))},[ya,d,we]),$n=b(at,{children:[(Ye||B.showDownloadConfirm)&&s(eo,{title:"Download from CDN",message:(()=>{const se=B.showDownloadConfirm?B.downloadImageCount:L,ee=B.showDownloadConfirm?B.downloadTotalSelected:pl;return ee>se?`Download ${se} of ${ee} selected file${ee!==1?"s":""} from Cloudflare R2? (${ee-se} not on CDN)`:`Download ${se} image${se!==1?"s":""} from Cloudflare R2 to local storage? Images will be removed from the CDN.`})(),confirmLabel:"Download",onConfirm:so,onCancel:()=>{v(!1),B.showDownloadConfirm&&Y()}}),le&&s(dl,{title:Ee,progress:vt,onStop:Tt,onDeleteOrphans:Ur,onClose:()=>{Ce(!1),Le({current:0,total:0,percent:0,status:"processing"}),m()}})]});return C?$n:b(at,{children:[$n,P&&s(eo,{title:"Delete Items",message:`Are you sure you want to delete ${Q} file${Q!==1?"s":""}? This action cannot be undone.`,confirmLabel:"Delete",variant:"danger",onConfirm:Br,onCancel:()=>N(!1)}),he&&s(eo,{title:"Push to CDN",message:`Push ${te} image${te!==1?"s":""} to Cloudflare R2?${E?" Remote images will be downloaded first.":""}${F?" After pushing, local files will be deleted.":""}`,confirmLabel:"Push",onConfirm:hl,onCancel:()=>pe(!1)}),ut&&s(Ar,{title:"New Folder",message:"Enter a name for the new folder:",placeholder:"Folder name",confirmLabel:"Create",onConfirm:jr,onCancel:()=>dt(!1)}),mn&&s(jp,{selectedItems:o,currentPath:h,onMove:se=>{Se(!1),uo(se)},onCancel:()=>Se(!1)}),jt&&gn&&s(Ar,{title:"Rename Folder",message:"Enter a new name for the folder:",placeholder:ml,defaultValue:ml,confirmLabel:"Rename",onConfirm:Za,onCancel:()=>qt(!1)}),an&&ya&&s(Ar,{title:"Rename File",message:"Enter a new name for the file:",placeholder:oi,defaultValue:oi,confirmLabel:"Rename",onConfirm:ri,onCancel:()=>Vt(!1)}),nn&&s(hu,{title:nn.title,message:nn.message,onClose:()=>{Je(null),m()}}),s(qp,{isOpen:lt,onClose:()=>Qt(!1)}),ie&&s(m1,{currentPath:h,onClose:()=>V(!1),onUploadComplete:()=>{V(!1),m()},streamingOperation:we,setShowProgress:Ce,setProgressTitle:je,setProgressState:Le}),b("div",{css:xe.toolbar,children:[s("input",{ref:U,type:"file",multiple:!0,accept:"image/*,video/*,audio/*,.pdf",onChange:Me,style:{display:"none"}}),b("div",{css:xe.left,children:[b("button",{css:[xe.btn,xe.btnPrimary,"",""],onClick:()=>V(!0),disabled:oe||Xe,children:[s(C1,{}),"Add New"]}),b("button",{css:xe.btn,onClick:()=>{ga?Vt(!0):Rt?qt(!0):dt(!0)},disabled:Xe&&!Rt&&!ga,title:Xe&&!Rt&&!ga?"Cannot create folders in protected images folder":void 0,children:[ga||Rt?s(D1,{}):s(k1,{}),ga?"Rename File":Rt?"Rename Folder":"New Folder"]}),s("div",{css:xe.divider}),b("div",{css:xe.cloudDropdownWrapper,ref:Ae,children:[b("button",{css:xe.btn,onClick:()=>Kt(!Gt),disabled:B.showProgress||Xe,title:Xe?"Cannot process images folder":void 0,children:[s(L1,{}),"Thumbnails",s("svg",{css:xe.dropdownArrow,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),Gt&&b("div",{css:xe.cloudDropdown,children:[b("button",{css:[xe.cloudDropdownItem,xe.cloudDropdownItemDefault,"",""],onClick:()=>{Kt(!1),kt("generate")},children:[s(U1,{}),"Generate Thumbnails"]}),b("button",{css:[xe.cloudDropdownItem,xe.cloudDropdownItemDanger,"",""],onClick:()=>{Kt(!1),kt("remove")},children:[s(H1,{}),"Remove Thumbnails"]})]})]}),b("button",{css:[xe.btn,xe.btnDanger,"",""],onClick:Hr,disabled:!Un,children:[s(M1,{}),"Delete"]}),b("button",{css:xe.btn,onClick:co,disabled:!Un,children:[s(E1,{}),"Move"]}),b("div",{css:xe.cloudDropdownWrapper,ref:Pt,children:[b("button",{css:[xe.btn,xe.btnCloud,"",""],onClick:()=>rt(!de),disabled:!Un,children:[s(Sp,{}),"Cloud",s("svg",{css:xe.dropdownArrow,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),de&&Un&&b("div",{css:xe.cloudDropdown,children:[qn&&b(at,{children:[b("button",{css:xe.cloudDropdownItem,onClick:()=>{rt(!1),ai()},children:[s(A1,{}),"Push Update"]}),b("button",{css:[xe.cloudDropdownItem,xe.cloudDropdownItemDanger,"",""],onClick:()=>{rt(!1),Ka()},children:[s(T1,{}),"Cancel Update"]}),s("div",{css:xe.cloudDropdownDivider})]}),b("button",{css:xe.cloudDropdownItem,onClick:()=>{rt(!1),fl()},children:[s(Sp,{}),"Push CDN"]}),b("button",{css:xe.cloudDropdownItem,onClick:()=>{rt(!1),Nr()},children:[s(R1,{}),"Download"]})]})]}),b("div",{css:xe.searchWrapper,children:[s("input",{css:xe.searchInput,type:"text",placeholder:"Search images...",value:li,onChange:ii,onKeyDown:fo}),li&&s("button",{css:xe.searchClearBtn,onClick:()=>Jn(""),title:"Clear search",children:s("svg",{width:"14",height:"14",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})]}),b("div",{css:xe.right,children:[Un&&b("span",{css:xe.selectionCount,children:[o.size," selected",s("button",{css:xe.clearBtn,onClick:d,children:"Clear"})]}),b("button",{css:xe.btn,onClick:Ne,disabled:ce,children:[s(w1,{spinning:ce}),"Scan"]}),s("button",{css:xe.btn,onClick:mt,title:"Refresh view",disabled:W,children:s(z1,{spinning:W})}),b("div",{css:xe.viewToggle,children:[s("button",{css:[xe.viewBtn,r==="grid"&&xe.viewBtnActive,"",""],onClick:()=>f("grid"),"aria-label":"Grid view",children:s(_1,{})}),s("button",{css:[xe.viewBtn,r==="list"&&xe.viewBtnActive,"",""],onClick:()=>f("list"),"aria-label":"List view",children:s(O1,{})})]}),s(y1,{})]})]})]})}function C1(){return s("svg",{css:xe.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"})})}function w1({spinning:o}){return s("svg",{css:[xe.icon,o&&xe.iconSpin,"",""],fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}function z1({spinning:o}){return s("svg",{css:[xe.icon,o&&xe.iconSpin,"",""],fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})})}function M1(){return s("svg",{css:xe.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})})}function k1(){return s("svg",{css:xe.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 13h6m-3-3v6m-9 1V7a2 2 0 012-2h6l2 2h6a2 2 0 012 2v8a2 2 0 01-2 2H5a2 2 0 01-2-2z"})})}function D1(){return s("svg",{css:xe.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})})}function E1(){return s("svg",{css:xe.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4"})})}function Sp(){return s("svg",{css:xe.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})})}function A1(){return s("svg",{css:xe.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})})}function T1(){return s("svg",{css:xe.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}function R1(){return s("svg",{css:xe.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M9 19l3 3m0 0l3-3m-3 3V10"})})}function _1(){return s("svg",{css:xe.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2V6zM14 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V6zM4 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2v-2zM14 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z"})})}function O1(){return s("svg",{css:xe.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 10h16M4 14h16M4 18h16"})})}function L1(){return s("svg",{css:xe.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})})}function U1(){return s("svg",{css:xe.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})})}function H1(){return s("svg",{css:xe.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})})}class B1{async get(r){const f=await fetch(r,{cache:"no-store",headers:{"Cache-Control":"no-cache"}});if(!f.ok){const d=await f.json().catch(()=>({}));throw new Error(d.error||`Request failed: ${f.status}`)}return f.json()}async post(r,f){const d=await fetch(r,{method:"POST",headers:f?{"Content-Type":"application/json"}:void 0,body:f?JSON.stringify(f):void 0});if(!d.ok){const h=await d.json().catch(()=>({}));throw new Error(h.error||`Request failed: ${d.status}`)}return d.json()}async list(r="public"){return this.get(`/api/studio/list?path=${encodeURIComponent(r)}`)}async search(r,f="public"){return this.get(`/api/studio/search?q=${encodeURIComponent(r)}&path=${encodeURIComponent(f)}`)}async listFolders(){return this.get("/api/studio/list-folders")}async countImages(){return this.get("/api/studio/count-images")}async folderImages(r){return this.get(`/api/studio/folder-images?folders=${encodeURIComponent(r.join(","))}`)}async upload(r,f="public"){const d=new FormData;d.append("file",r),d.append("path",f);const h=await fetch("/api/studio/upload",{method:"POST",body:d});if(!h.ok){const m=await h.json().catch(()=>({}));throw new Error(m.error||`Upload failed: ${h.status}`)}return h.json()}async delete(r){return this.post("/api/studio/delete",{paths:r})}async createFolder(r,f){return this.post("/api/studio/create-folder",{parentPath:r,name:f})}async rename(r,f){return this.post("/api/studio/rename",{oldPath:r,newName:f})}async move(r,f){return this.post("/api/studio/move",{paths:r,destination:f})}async push(r){return this.post("/api/studio/sync",{imageKeys:r})}async reprocess(r){return this.post("/api/studio/reprocess",{imageKeys:r})}processAllStream(){return new EventSource("/api/studio/process-all")}async checkFeaturedImage(){return this.get("/api/studio/check-featured-image")}async getFeaturedImageOptions(){return this.get("/api/studio/featured-image-options")}}const Pi=new B1;function Yp(){const{currentPath:o,setCurrentPath:r,navigateUp:f,selectedItems:d,toggleSelection:h,selectRange:m,lastSelectedPath:C,selectAll:D,clearSelection:w,refreshKey:g,setFocusedItem:R,triggerRefresh:k,triggerScan:B,searchQuery:Y,showError:U,setFileItems:G,editedImageKey:ie}=ei(),[V,oe]=S.useState([]),[ae,ce]=S.useState(!0),[X,W]=S.useState(!1),[$,P]=S.useState(null),N=S.useRef(!0),Q=S.useRef(o);S.useEffect(()=>{async function v(){const L=Q.current!==o;(N.current||L)&&ce(!0),Q.current=o;try{const I=Y&&Y.length>=2?await Pi.search(Y,o):await Pi.list(o),le=I.items||[];oe(le),G(le),W(I.isEmpty===!0)}catch(I){const le=I instanceof Error?I.message:"Failed to load items";U("Load Error",le),oe([]),G([]),W(!1)}ce(!1),N.current=!1}v()},[o,g,Y,U,G]),S.useEffect(()=>{async function v(){if(o!=="public"){P(null);return}try{const L=await Pi.checkFeaturedImage();P(L)}catch{P(null)}}v()},[o,g]);const ue=o==="public",he=Y&&Y.length>=2,pe=[...V].sort((v,L)=>v.type==="folder"&&L.type!=="folder"?-1:v.type!=="folder"&&L.type==="folder"?1:v.name.localeCompare(L.name)),te=pe.length>0&&pe.every(v=>d.has(v.path)),Ue=pe.some(v=>d.has(v.path)),E=S.useCallback((v,L)=>{L.shiftKey&&C?m(C,v.path,pe):h(v.path)},[C,m,pe,h]),J=S.useCallback(v=>{v.type==="folder"?r(v.path):R(v)},[r,R]),F=S.useCallback(async v=>{try{const L="/"+v.path.replace(/^public\//,"");await Pi.reprocess([L]),k()}catch(L){const I=L instanceof Error?L.message:"Failed to generate thumbnail";U("Processing Error",I)}},[k,U]),De=S.useCallback(()=>{te?w():D(pe)},[te,w,D,pe]),Ye=$&&!$.exists?$:null;return{items:V,loading:ae,sortedItems:pe,metaEmpty:X,missingFeaturedImage:Ye,isAtRoot:ue,isSearching:he,allItemsSelected:te,someItemsSelected:Ue,currentPath:o,selectedItems:d,navigateUp:f,editedImageKey:ie,handleItemClick:E,handleOpen:J,handleGenerateThumbnail:F,handleSelectAll:De,triggerScan:B,triggerRefresh:k}}const N1=pn`
72
+ from { opacity: 0; }
73
+ to { opacity: 1; }
74
+ `,j1=pn`
75
+ from { transform: translateY(-20px); opacity: 0; }
76
+ to { transform: translateY(0); opacity: 1; }
77
+ `,q1=pn`
78
+ to { transform: rotate(360deg); }
79
+ `,Wt={overlay:y("position:fixed;inset:0;z-index:1000;display:flex;align-items:center;justify-content:center;background:rgba(0, 0, 0, 0.5);animation:",N1," 0.15s ease;",""),modal:y("background:",u.surface,";border-radius:12px;box-shadow:0 20px 40px rgba(0, 0, 0, 0.2);width:100%;max-width:440px;animation:",j1," 0.2s ease;overflow:hidden;",""),header:y("padding:20px 24px;border-bottom:1px solid ",u.border,";",""),title:y("font-size:",Z.lg,";font-weight:600;color:",u.text,";margin:0;",""),subtitle:y("font-size:",Z.sm,";color:",u.textSecondary,";margin:4px 0 0 0;",""),body:{name:"1a7zdz",styles:"padding:24px;display:flex;flex-direction:column;gap:12px"},loading:{name:"uphaut",styles:"display:flex;align-items:center;justify-content:center;padding:40px"},spinner:y("width:24px;height:24px;border-radius:50%;border:2px solid ",u.border,";border-top-color:",u.primary,";animation:",q1," 0.8s linear infinite;",""),urlButton:y("display:flex;flex-direction:column;align-items:flex-start;gap:4px;padding:16px 20px;background:",u.background,";border:1px solid ",u.border,";border-radius:8px;cursor:pointer;transition:all 0.15s ease;text-align:left;&:hover:not(:disabled){background:",u.surfaceHover,";border-color:",u.primary,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),urlLabel:y("font-size:",Z.xs,";font-weight:600;color:",u.textSecondary,";text-transform:uppercase;letter-spacing:0.05em;",""),urlValue:y("font-size:",Z.base,";font-weight:500;color:",u.text,";word-break:break-all;",""),noOptions:y("padding:20px;text-align:center;color:",u.textSecondary,";font-size:",Z.sm,";",""),footer:y("padding:16px 24px;border-top:1px solid ",u.border,";display:flex;justify-content:flex-end;",""),cancelBtn:y("padding:10px 20px;font-size:",Z.base,";font-weight:500;background:",u.surface,";border:1px solid ",u.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;color:",u.text,";&:hover{background:",u.surfaceHover,";border-color:",u.borderHover,";}","")};function Gp({isOpen:o,onClose:r,onSelect:f}){const[d,h]=S.useState(!0),[m,C]=S.useState(null),[D,w]=S.useState(null);if(S.useEffect(()=>{if(!o)return;async function R(){h(!0);try{const k=await Pi.getFeaturedImageOptions();C(k.devUrl),w(k.productionUrl)}catch(k){console.error("Failed to load featured image options:",k)}h(!1)}R()},[o]),!o)return null;const g=m||D;return s("div",{css:Wt.overlay,onClick:r,children:b("div",{css:Wt.modal,onClick:R=>R.stopPropagation(),children:[b("div",{css:Wt.header,children:[s("h2",{css:Wt.title,children:"Generate Screenshot"}),s("p",{css:Wt.subtitle,children:"Choose which URL to screenshot"})]}),s("div",{css:Wt.body,children:d?s("div",{css:Wt.loading,children:s("div",{css:Wt.spinner})}):g?b(at,{children:[m&&b("button",{css:Wt.urlButton,onClick:()=>f(m),children:[s("span",{css:Wt.urlLabel,children:"Development"}),s("span",{css:Wt.urlValue,children:m})]}),D&&b("button",{css:Wt.urlButton,onClick:()=>f(D),children:[s("span",{css:Wt.urlLabel,children:"Production"}),s("span",{css:Wt.urlValue,children:D})]})]}):b("div",{css:Wt.noOptions,children:["No URLs configured. Set ",s("code",{children:"NEXT_PUBLIC_PRODUCTION_URL"})," in .env.local and/or .env.production."]})}),s("div",{css:Wt.footer,children:s("button",{css:Wt.cancelBtn,onClick:r,children:"Cancel"})})]})})}const Y1=pn`
80
+ to { transform: rotate(360deg); }
81
+ `,ne={loading:{name:"1d2ui9i",styles:"display:flex;align-items:center;justify-content:center;flex:1;min-height:300px"},spinner:y("width:32px;height:32px;border-radius:50%;border:3px solid ",u.border,";border-top-color:",u.primary,";animation:",Y1," 0.8s linear infinite;",""),empty:y("display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1;min-height:300px;color:",u.textSecondary,";",""),emptyIcon:{name:"1o3cbsn",styles:"width:48px;height:48px;margin-bottom:16px;opacity:0.5"},emptyText:y("font-size:",Z.base,";margin:0 0 4px 0;&:last-child{color:",u.textMuted,";font-size:",Z.sm,";}",""),scanButton:y("margin-top:16px;padding:10px 24px;font-size:",Z.base,";font-weight:500;background:",u.primary,";color:white;border:none;border-radius:8px;cursor:pointer;transition:background 0.15s ease;&:hover:not(:disabled){background:",u.primaryHover,";}&:disabled{opacity:0.6;cursor:not-allowed;}",""),grid:{name:"el23hk",styles:"display:grid;grid-template-columns:1fr;gap:12px;@media (min-width: 480px){grid-template-columns:repeat(2, 1fr);}@media (min-width: 768px){grid-template-columns:repeat(3, 1fr);}@media (min-width: 1024px){grid-template-columns:repeat(4, 1fr);}@media (min-width: 1280px){grid-template-columns:repeat(5, 1fr);}"},item:y("position:relative;border-radius:8px;border:1px solid ",u.border,";overflow:hidden;cursor:pointer;transition:all 0.15s ease;background-color:",u.surface,";user-select:none;box-shadow:0 1px 2px rgba(0, 0, 0, 0.04);&:hover{border-color:#d0d5dd;box-shadow:0 2px 4px rgba(0, 0, 0, 0.06);}",""),itemSelected:y("border-color:",u.primary,";box-shadow:0 0 0 1px ",u.primary,";&:hover{border-color:",u.primary,";box-shadow:0 0 0 1px ",u.primary,";}",""),parentItem:y("cursor:pointer;&:hover{border-color:",u.primary,";}",""),checkboxWrapper:{name:"v3lnpt",styles:"position:absolute;top:0;left:0;z-index:10;padding:8px;cursor:pointer"},checkbox:y("width:18px;height:18px;accent-color:",u.primary,";cursor:pointer;",""),content:y("position:relative;aspect-ratio:1;display:flex;align-items:center;justify-content:center;padding:16px;background:",u.background,";",""),contentCloud:y("",""),contentRemote:y("",""),folderIcon:{name:"k1w47f",styles:"width:56px;height:56px;color:#f9935e"},imagesFolderIcon:y("width:56px;height:56px;color:",u.imagesFolder,";",""),imagesFolderWrapper:{name:"bjn8wh",styles:"position:relative"},lockIcon:y("position:absolute;bottom:4px;right:4px;width:16px;height:16px;color:",u.imagesFolder,";background:white;border-radius:50%;padding:2px;",""),parentIcon:y("width:56px;height:56px;color:",u.textMuted,";",""),fileIcon:y("width:40px;height:40px;color:",u.textMuted,";",""),image:{name:"rm1wug",styles:"max-width:100%;max-height:100%;object-fit:contain;border-radius:4px"},label:y("padding:10px 12px;background-color:",u.surface,";border-top:1px solid ",u.borderLight,";",""),labelRow:{name:"1gkgtms",styles:"display:flex;flex-direction:column;gap:2px"},labelText:{name:"fxp7t8",styles:"flex:1;min-width:0"},copyBtn:y("position:absolute;top:4px;right:4px;z-index:10;height:28px;width:28px;color:",u.textMuted,";background:transparent;border:none;padding:0;cursor:pointer;border-radius:4px;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{color:",u.text,";}",""),copyIcon:{name:"1eg0rk6",styles:"width:18px;height:18px"},folderStats:{name:"905wvx",styles:"display:flex;align-items:center;gap:8px;margin:2px 0 0 0"},folderStat:y("display:flex;align-items:center;gap:3px;font-size:",Z.xs,";",""),folderStatLocal:y("color:",u.textMuted,";",""),folderStatCloud:{name:"1t8qh25",styles:"color:#f59e0b"},folderStatRemote:{name:"1lukubv",styles:"color:#ef4444"},folderStatUpdate:{name:"1t8qh25",styles:"color:#f59e0b"},folderStatIconCloud:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},folderStatIconLocal:y("width:14px;height:14px;color:",u.textSecondary,";",""),folderStatIconRemote:{name:"efr29r",styles:"width:14px;height:14px;color:#ef4444"},folderStatIconUpdate:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},updateLabel:y("color:#f59e0b;font-size:",Z.xs,";",""),updateCloudIcon:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},updateSyncIcon:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},statusRow:{name:"1b1nq65",styles:"display:flex;align-items:center;justify-content:space-between;margin:2px 0 0 0;gap:4px"},statusLeft:{name:"1j5vobt",styles:"display:flex;align-items:center;gap:4px"},thumbChips:{name:"x2l7ss",styles:"display:flex;align-items:center;gap:3px;margin-left:auto"},thumbChip:y("display:inline-flex;align-items:center;justify-content:center;padding:1px 4px;font-size:9px;font-weight:600;border-radius:3px;background:rgba(0, 0, 0, 0.08);color:",u.textMuted,";text-transform:uppercase;letter-spacing:0.02em;",""),storedIconCloud:{name:"1e09qmx",styles:"width:16px;height:16px;color:#f59e0b"},storedIconRemote:{name:"1mrh6ju",styles:"width:16px;height:16px;color:#ef4444"},tooltip:{name:"qoyfdh",styles:"position:absolute;top:50%;right:100%;transform:translateY(-50%);background:#1a1f36;color:white;padding:4px 8px;border-radius:4px;font-size:12px;white-space:nowrap;margin-right:6px;pointer-events:none;z-index:100;&::before{content:'';position:absolute;left:100%;top:50%;transform:translateY(-50%);border:4px solid transparent;border-left-color:#1a1f36;}"},openBtn:y("position:absolute;bottom:8px;right:8px;z-index:10;height:28px;font-size:",Z.sm,";font-weight:500;color:",u.primary,";background:",u.surface,";border:1px solid ",u.border,";padding:0 8px;cursor:pointer;border-radius:4px;transition:all 0.15s ease;display:flex;align-items:center;box-shadow:0 1px 2px rgba(0, 0, 0, 0.08);&:hover{background-color:",u.primaryLight,";border-color:",u.primary,";}",""),featuredPlaceholder:y("position:relative;border-radius:8px;border:2px dashed ",u.success,";overflow:hidden;cursor:pointer;transition:all 0.15s ease;background-color:",u.background,";&:hover{border-color:",u.success,";background-color:",u.successLight,";}",""),featuredContent:{name:"y8o17o",styles:"position:relative;aspect-ratio:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:16px;gap:8px"},featuredIcon:y("width:40px;height:40px;color:",u.success,";",""),featuredText:y("font-size:",Z.sm,";color:",u.success,";text-align:center;font-weight:500;",""),featuredLabel:y("padding:10px 12px;background-color:",u.surface,";border-top:1px solid ",u.borderLight,";",""),name:y("font-size:",Z.sm,";font-weight:500;color:",u.text,";white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0;letter-spacing:-0.01em;direction:rtl;text-align:left;",""),size:y("font-size:",Z.xs,";color:",u.textMuted,";margin:2px 0 0 0;",""),selectAllRow:y("display:flex;align-items:center;margin-bottom:16px;padding:12px 16px;background:",u.surface,";border-radius:8px;border:1px solid ",u.border,";",""),selectAllLabel:y("display:flex;align-items:center;gap:10px;font-size:",Z.base,";font-weight:500;color:",u.textSecondary,";cursor:pointer;&:hover{color:",u.text,";}",""),selectAllCheckbox:y("width:16px;height:16px;accent-color:",u.primary,";","")};function G1(){const{loading:o,sortedItems:r,metaEmpty:f,missingFeaturedImage:d,isAtRoot:h,isSearching:m,allItemsSelected:C,someItemsSelected:D,selectedItems:w,navigateUp:g,handleItemClick:R,handleOpen:k,handleGenerateThumbnail:B,handleSelectAll:Y,triggerScan:U,triggerRefresh:G,editedImageKey:ie}=Yp(),[V,oe]=S.useState(!1),[ae,ce]=S.useState(!1),[X,W]=S.useState({current:0,total:3,percent:0,status:"processing",message:"Generating screenshot..."}),$=()=>{oe(!0)},P=async N=>{oe(!1),ce(!0),W({current:0,total:4,percent:0,status:"processing",message:"Starting..."});try{const Q=await fetch("/api/studio/generate-featured-image",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:N})});if(!Q.ok){const pe=await Q.json();W({current:0,total:4,percent:0,status:"error",message:pe.error||"Failed to generate screenshot"});return}const ue=Q.body?.getReader(),he=new TextDecoder;if(ue){let pe="";for(;;){const{done:te,value:Ue}=await ue.read();if(te)break;pe+=he.decode(Ue,{stream:!0});const E=pe.split(`
82
+ `);pe=E.pop()||"";for(const J of E)if(J.startsWith("data: "))try{const F=JSON.parse(J.slice(6));F.type==="start"?W(De=>({...De,total:F.total,message:`Screenshotting ${F.url}...`})):F.type==="progress"?W({current:F.current,total:F.total,percent:F.percent,status:"processing",message:F.message}):F.type==="complete"?(W({current:F.processed,total:F.processed,percent:100,status:F.errors>0?"error":"complete",message:F.message}),G()):F.type==="error"&&W(De=>({...De,status:"error",message:F.message}))}catch{}}}}catch(Q){console.error("Featured image generation error:",Q),W({current:0,total:3,percent:0,status:"error",message:"An error occurred while generating the screenshot"})}};return o?b(at,{children:[ae&&s(dl,{title:"Generating Screenshot",progress:X,onClose:()=>ce(!1)}),s("div",{css:ne.loading,children:s("div",{css:ne.spinner})})]}):f&&h?b("div",{css:ne.empty,children:[s("svg",{css:ne.emptyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),s("p",{css:ne.emptyText,children:"No files tracked yet"}),s("p",{css:ne.emptyText,children:"Click Scan to discover files in your public folder"}),s("button",{css:ne.scanButton,onClick:U,children:"Scan for Files"})]}):r.length===0&&h?b("div",{css:ne.empty,children:[s("svg",{css:ne.emptyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),s("p",{css:ne.emptyText,children:"No files in this folder"}),s("p",{css:ne.emptyText,children:"Upload images or click Scan in the toolbar"})]}):b(at,{children:[s(Gp,{isOpen:V,onClose:()=>oe(!1),onSelect:P}),ae&&s(dl,{title:"Generating Screenshot",progress:X,onClose:()=>ce(!1)}),b("div",{children:[r.length>0&&s("div",{css:ne.selectAllRow,children:b("label",{css:ne.selectAllLabel,children:[s("input",{type:"checkbox",css:ne.selectAllCheckbox,checked:C,ref:N=>{N&&(N.indeterminate=D&&!C)},onChange:Y}),"Select all (",r.length,")"]})}),b("div",{css:ne.grid,children:[!h&&!m&&b("div",{css:[ne.item,ne.parentItem,"",""],onClick:g,children:[s("div",{css:ne.content,children:s("svg",{css:ne.parentIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M3 10h10a8 8 0 018 8v2M3 10l6 6m-6-6l6-6"})})}),b("div",{css:ne.label,children:[s("p",{css:ne.name,children:".."}),s("p",{css:ne.size,children:"Parent folder"})]})]}),r.map(N=>s(V1,{item:N,isSelected:w.has(N.path),onClick:Q=>R(N,Q),onOpen:()=>k(N),onGenerateThumbnail:()=>B(N),editedImageKey:ie},N.path)),h&&d&&!m&&b("div",{css:ne.featuredPlaceholder,onClick:$,title:`Generate ${d.filename}`,children:[b("div",{css:ne.featuredContent,children:[s("svg",{css:ne.featuredIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),s("span",{css:ne.featuredText,children:"Generate Screenshot"})]}),b("div",{css:ne.featuredLabel,children:[s("p",{css:ne.name,children:d.filename}),s("p",{css:ne.size,children:"Click to screenshot homepage"})]})]})]})]})]})}function X1(o){return o.includes("/images/sm/")?"SM":o.includes("/images/md/")?"MD":o.includes("/images/lg/")?"LG":o.includes("/images/full/")?"FULL":null}function V1({item:o,isSelected:r,onClick:f,onOpen:d,onGenerateThumbnail:h,editedImageKey:m}){const[C,D]=S.useState(!1),w=o.type==="folder",g=!w&&o.thumbnail!==void 0,R=o.thumbnail&&m&&m.path===o.path?`${o.thumbnail}?v=${m.key}`:o.thumbnail,k=o.isProtected||w&&o.name==="images"&&o.path==="public/images",B=X1(o.path),Y=!w&&(o.hasSm||o.hasMd||o.hasLg||o.hasFull||B),U=ie=>{ie.stopPropagation();const V="/"+o.path.replace(/^public\//,"");navigator.clipboard.writeText(V),D(!0),setTimeout(()=>D(!1),1500)},G=ie=>{if(k){ie.stopPropagation(),d();return}f(ie)};return b("div",{css:[ne.item,r&&!k&&ne.itemSelected,"",""],onClick:G,children:[!k&&s("div",{css:ne.checkboxWrapper,onClick:ie=>ie.stopPropagation(),children:s("input",{type:"checkbox",css:ne.checkbox,checked:r,onChange:()=>f({})})}),b("div",{css:[ne.content,o.isCloud&&ne.contentCloud,o.isRemote&&ne.contentRemote,"",""],children:[b("button",{css:ne.copyBtn,onClick:U,title:"Copy file path",children:[C&&s("span",{css:ne.tooltip,children:"Copied!"}),s("svg",{css:ne.copyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"})})]}),s("button",{css:ne.openBtn,onClick:ie=>{ie.stopPropagation(),d()},children:"Open"}),w?k?b("div",{css:ne.imagesFolderWrapper,children:[s("svg",{css:ne.imagesFolderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:s("path",{d:"M10 4H4a2 2 0 00-2 2v12a2 2 0 002 2h16a2 2 0 002-2V8a2 2 0 00-2-2h-8l-2-2z"})}),s("svg",{css:ne.lockIcon,fill:"currentColor",viewBox:"0 0 20 20",children:s("path",{fillRule:"evenodd",d:"M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z",clipRule:"evenodd"})})]}):s("svg",{css:ne.folderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:s("path",{d:"M10 4H4a2 2 0 00-2 2v12a2 2 0 002 2h16a2 2 0 002-2V8a2 2 0 00-2-2h-8l-2-2z"})}):g&&R?s("img",{css:ne.image,src:R,alt:o.name,loading:"lazy"}):s("svg",{css:ne.fileIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"})})]}),s("div",{css:ne.label,children:s("div",{css:ne.labelRow,children:b("div",{css:ne.labelText,children:[s("p",{css:ne.name,title:o.name,children:o.name}),w?b("div",{css:ne.folderStats,children:[o.localCount!==void 0&&o.localCount>0&&b("span",{css:[ne.folderStat,ne.folderStatLocal,"",""],title:`${o.localCount} local`,children:[s("svg",{css:ne.folderStatIconLocal,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),o.localCount]}),o.cloudCount!==void 0&&o.cloudCount>0&&b("span",{css:[ne.folderStat,ne.folderStatCloud,"",""],title:`${o.cloudCount} in cloud`,children:[s("svg",{css:ne.folderStatIconCloud,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})}),o.cloudCount]}),o.remoteCount!==void 0&&o.remoteCount>0&&b("span",{css:[ne.folderStat,ne.folderStatRemote,"",""],title:`${o.remoteCount} remote`,children:[s("svg",{css:ne.folderStatIconRemote,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"})}),o.remoteCount]}),o.updateCount!==void 0&&o.updateCount>0&&b("span",{css:[ne.folderStat,ne.folderStatUpdate,"",""],title:`${o.updateCount} pending update${o.updateCount!==1?"s":""}`,children:[s("svg",{css:ne.folderStatIconUpdate,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),o.updateCount]}),!o.localCount&&!o.cloudCount&&!o.remoteCount&&!o.updateCount&&o.fileCount!==void 0&&b("span",{css:ne.size,children:[o.fileCount," files"]})]}):b("div",{css:ne.statusRow,children:[s("div",{css:ne.statusLeft,children:o.hasUpdate?b(at,{children:[s("svg",{css:ne.updateCloudIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})}),s("svg",{css:ne.updateSyncIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),s("span",{css:ne.updateLabel,children:"update"})]}):o.cdnPushed?s("svg",{css:o.isRemote?ne.storedIconRemote:ne.storedIconCloud,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.isRemote?s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"}):s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})}):o.size!==void 0?s("span",{css:ne.size,children:Q1(o.size)}):null}),Y&&s("span",{css:ne.thumbChips,children:B?s("span",{css:ne.thumbChip,children:B}):b(at,{children:[o.hasSm&&s("span",{css:ne.thumbChip,children:"SM"}),o.hasMd&&s("span",{css:ne.thumbChip,children:"MD"}),o.hasLg&&s("span",{css:ne.thumbChip,children:"LG"}),o.hasFull&&s("span",{css:ne.thumbChip,children:"FULL"})]})})]})]})})})]})}function Q1(o){return o<1024?`${o} B`:o<1024*1024?`${(o/1024).toFixed(1)} KB`:`${(o/(1024*1024)).toFixed(1)} MB`}const K1=pn`
83
+ to { transform: rotate(360deg); }
84
+ `,K={loading:{name:"1d2ui9i",styles:"display:flex;align-items:center;justify-content:center;flex:1;min-height:300px"},spinner:y("width:32px;height:32px;border-radius:50%;border:3px solid ",u.border,";border-top-color:",u.primary,";animation:",K1," 0.8s linear infinite;",""),empty:y("display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1;min-height:300px;color:",u.textSecondary,";",""),emptyHint:y("font-size:",Z.sm,";color:",u.textMuted,";margin-top:4px;",""),scanButton:y("margin-top:16px;padding:10px 24px;font-size:",Z.base,";font-weight:500;background:",u.primary,";color:white;border:none;border-radius:8px;cursor:pointer;transition:background 0.15s ease;&:hover:not(:disabled){background:",u.primaryHover,";}&:disabled{opacity:0.6;cursor:not-allowed;}",""),tableWrapper:y("background:",u.surface,";border-radius:8px;border:1px solid ",u.border,";overflow-x:auto;",""),table:{name:"nufjao",styles:"width:100%;min-width:600px;border-collapse:collapse;white-space:nowrap"},th:y("text-align:left;font-size:11px;color:",u.textMuted,";text-transform:uppercase;letter-spacing:0.05em;padding:12px 16px;font-weight:600;background:",u.background,";border-bottom:1px solid ",u.border,";",""),thCheckbox:{name:"5iz1wr",styles:"width:48px"},thSize:{name:"yct5co",styles:"width:96px"},thDimensions:{name:"gu2s0e",styles:"width:128px"},thCdn:{name:"yct5co",styles:"width:96px"},tbody:y("",""),row:y("cursor:pointer;transition:background-color 0.15s ease;user-select:none;&:hover{background-color:",u.surfaceHover,";}&:not(:last-child) td{border-bottom:1px solid ",u.borderLight,";}",""),rowSelected:y("background-color:",u.primaryLight,";&:hover{background-color:",u.primaryLight,";}",""),parentRow:y("cursor:pointer;border-bottom:1px solid ",u.border,";&:hover{background-color:",u.surfaceHover,";}",""),td:{name:"i563hg",styles:"padding:12px 16px"},checkboxCell:{name:"sahq4q",styles:"padding:12px 16px;cursor:pointer;vertical-align:middle"},checkbox:y("width:18px;height:18px;accent-color:",u.primary,";cursor:pointer;display:block;",""),actionsCell:{name:"1w56d5c",styles:"display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-left:auto;flex-shrink:0"},copyBtn:y("position:relative;flex-shrink:0;height:32px;width:32px;font-size:",Z.xs,";color:",u.textSecondary,";background:",u.surface,";border:1px solid ",u.border,";padding:0;cursor:pointer;border-radius:4px;transition:all 0.15s ease;display:inline-flex;align-items:center;justify-content:center;&:hover{background:",u.surfaceHover,";border-color:",u.borderHover,";color:",u.text,";}",""),copyIcon:{name:"157xhr7",styles:"width:16px;height:16px"},folderStats:{name:"1yydxi7",styles:"display:flex;align-items:center;gap:8px"},folderStat:y("display:flex;align-items:center;gap:3px;font-size:",Z.xs,";",""),folderStatLocal:y("color:",u.textMuted,";",""),folderStatCloud:{name:"1t8qh25",styles:"color:#f59e0b"},folderStatRemote:{name:"1lukubv",styles:"color:#ef4444"},folderStatUpdate:{name:"1t8qh25",styles:"color:#f59e0b"},folderStatIconCloud:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},folderStatIconLocal:y("width:14px;height:14px;color:",u.textSecondary,";",""),folderStatIconRemote:{name:"efr29r",styles:"width:14px;height:14px;color:#ef4444"},folderStatIconUpdate:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},updateLabel:y("display:flex;align-items:center;gap:4px;color:#f59e0b;font-size:",Z.xs,";",""),updateCloudIcon:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},updateSyncIcon:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},storedLabel:{name:"s5xdrg",styles:"display:flex;align-items:center"},storedIconCloud:{name:"1e09qmx",styles:"width:16px;height:16px;color:#f59e0b"},storedIconRemote:{name:"1mrh6ju",styles:"width:16px;height:16px;color:#ef4444"},tooltip:{name:"1bu1odp",styles:"position:absolute;top:50%;right:100%;transform:translateY(-50%);background:#1a1f36;color:white;padding:4px 8px;border-radius:4px;font-size:12px;white-space:nowrap;margin-right:6px;pointer-events:none;z-index:100;&::after{content:'';position:absolute;left:100%;top:50%;transform:translateY(-50%);border:4px solid transparent;border-left-color:#1a1f36;}"},nameCell:{name:"9s3nhy",styles:"display:flex;align-items:center;gap:12px;flex:1"},thumbnailWrapper:{name:"f01c4l",styles:"width:48px;height:36px;display:flex;align-items:center;justify-content:center;flex-shrink:0;border-radius:4px"},thumbnailCloud:y("",""),thumbnailRemote:y("",""),folderIconWrapper:{name:"xfecxx",styles:"width:48px;height:36px;display:flex;align-items:center;justify-content:center;flex-shrink:0"},folderIcon:{name:"a45yt2",styles:"width:24px;height:24px;color:#f9935e"},imagesFolderWrapper:{name:"iqqile",styles:"width:48px;height:36px;display:flex;align-items:center;justify-content:center;flex-shrink:0;position:relative;align-items:center"},imagesFolderIcon:y("width:24px;height:24px;color:",u.imagesFolder,";",""),lockIcon:y("width:10px;height:10px;color:",u.imagesFolder,";margin-left:-6px;margin-top:8px;",""),parentIcon:y("width:20px;height:20px;color:",u.textMuted,";flex-shrink:0;",""),fileIcon:y("width:20px;height:20px;color:",u.textMuted,";flex-shrink:0;",""),thumbnail:y("max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;border-radius:4px;border:1px solid ",u.borderLight,";",""),name:y("font-size:",Z.base,";font-weight:500;color:",u.text,";letter-spacing:-0.01em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:300px;",""),meta:y("font-size:",Z.sm,";color:",u.textSecondary,";",""),cdnBadge:y("display:inline-flex;align-items:center;gap:4px;font-size:",Z.xs,";font-weight:500;color:",u.success,";",""),cdnBadgeRemote:y("display:inline-flex;align-items:center;font-size:",Z.xs,";font-weight:500;color:#ef4444;",""),cdnIcon:{name:"1suksrg",styles:"width:12px;height:12px"},cdnEmpty:y("font-size:",Z.sm,";color:",u.textMuted,";",""),featuredRow:y("cursor:pointer;transition:background-color 0.15s ease;border:2px dashed ",u.success,";&:hover{background-color:",u.successLight,";}td{border-bottom:none!important;}",""),featuredIcon:y("width:24px;height:24px;color:",u.success,";",""),featuredText:y("color:",u.success,";font-weight:500;",""),openBtn:y("height:32px;font-size:",Z.sm,";font-weight:500;color:",u.primary,";background:",u.surface,";border:1px solid ",u.border,";padding:0 14px;cursor:pointer;border-radius:4px;transition:all 0.15s ease;display:inline-flex;align-items:center;&:hover{background-color:",u.primaryLight,";border-color:",u.primary,";}","")};function Z1(){const{loading:o,sortedItems:r,metaEmpty:f,missingFeaturedImage:d,isAtRoot:h,isSearching:m,allItemsSelected:C,someItemsSelected:D,selectedItems:w,navigateUp:g,handleItemClick:R,handleOpen:k,handleGenerateThumbnail:B,handleSelectAll:Y,triggerScan:U,triggerRefresh:G,editedImageKey:ie}=Yp(),[V,oe]=S.useState(!1),[ae,ce]=S.useState(!1),[X,W]=S.useState({current:0,total:3,percent:0,status:"processing",message:"Generating screenshot..."}),$=()=>{oe(!0)},P=async N=>{oe(!1),ce(!0),W({current:0,total:4,percent:0,status:"processing",message:"Starting..."});try{const Q=await fetch("/api/studio/generate-featured-image",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:N})});if(!Q.ok){const pe=await Q.json();W({current:0,total:4,percent:0,status:"error",message:pe.error||"Failed to generate screenshot"});return}const ue=Q.body?.getReader(),he=new TextDecoder;if(ue){let pe="";for(;;){const{done:te,value:Ue}=await ue.read();if(te)break;pe+=he.decode(Ue,{stream:!0});const E=pe.split(`
85
+ `);pe=E.pop()||"";for(const J of E)if(J.startsWith("data: "))try{const F=JSON.parse(J.slice(6));F.type==="start"?W(De=>({...De,total:F.total,message:`Screenshotting ${F.url}...`})):F.type==="progress"?W({current:F.current,total:F.total,percent:F.percent,status:"processing",message:F.message}):F.type==="complete"?(W({current:F.processed,total:F.processed,percent:100,status:F.errors>0?"error":"complete",message:F.message}),G()):F.type==="error"&&W(De=>({...De,status:"error",message:F.message}))}catch{}}}}catch(Q){console.error("Featured image generation error:",Q),W({current:0,total:3,percent:0,status:"error",message:"An error occurred while generating the screenshot"})}};return o?s("div",{css:K.loading,children:s("div",{css:K.spinner})}):f&&h?b("div",{css:K.empty,children:[s("p",{children:"No files tracked yet"}),s("p",{css:K.emptyHint,children:"Click Scan to discover files in your public folder"}),s("button",{css:K.scanButton,onClick:U,children:"Scan for Files"})]}):r.length===0&&h?b("div",{css:K.empty,children:[s("p",{children:"No files in this folder"}),s("p",{css:K.emptyHint,children:"Upload images or click Scan in the toolbar"})]}):b(at,{children:[s(Gp,{isOpen:V,onClose:()=>oe(!1),onSelect:P}),ae&&s(dl,{title:"Generating Screenshot",progress:X,onClose:()=>ce(!1)}),s("div",{css:K.tableWrapper,children:b("table",{css:K.table,children:[s("thead",{children:b("tr",{children:[s("th",{css:[K.th,K.thCheckbox,"",""],children:r.length>0&&s("input",{type:"checkbox",css:K.checkbox,checked:C,ref:N=>{N&&(N.indeterminate=D&&!C)},onChange:Y})}),s("th",{css:K.th,children:"Name"}),s("th",{css:[K.th,K.thSize,"",""],children:"Size"}),s("th",{css:[K.th,K.thDimensions,"",""],children:"Dimensions"}),s("th",{css:[K.th,K.thCdn,"",""],children:"CDN"})]})}),b("tbody",{css:K.tbody,children:[!h&&!m&&b("tr",{css:K.parentRow,onClick:g,children:[s("td",{css:K.td}),s("td",{css:K.td,children:b("div",{css:K.nameCell,children:[s("svg",{css:K.parentIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M3 10h10a8 8 0 018 8v2M3 10l6 6m-6-6l6-6"})}),s("span",{css:K.name,children:".."})]})}),s("td",{css:[K.td,K.meta,"",""],children:"--"}),s("td",{css:[K.td,K.meta,"",""],children:"Parent folder"}),s("td",{css:K.td,children:"--"})]}),r.map(N=>s(F1,{item:N,isSelected:w.has(N.path),onClick:Q=>R(N,Q),onOpen:()=>k(N),onGenerateThumbnail:()=>B(N),editedImageKey:ie},N.path)),h&&d&&!m&&b("tr",{css:K.featuredRow,onClick:$,title:`Generate ${d.filename}`,children:[s("td",{css:K.td}),s("td",{css:K.td,children:b("div",{css:K.nameCell,children:[s("div",{css:K.folderIconWrapper,children:s("svg",{css:K.featuredIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})})}),s("span",{css:[K.name,K.featuredText,"",""],children:d.filename})]})}),s("td",{css:[K.td,K.meta,K.featuredText,"",""],children:"--"}),s("td",{css:[K.td,K.meta,K.featuredText,"",""],children:"Click to generate"}),s("td",{css:[K.td,K.featuredText,"",""],children:"--"})]})]})]})})]})}function F1({item:o,isSelected:r,onClick:f,onOpen:d,onGenerateThumbnail:h,editedImageKey:m}){const[C,D]=S.useState(!1),w=o.type==="folder",g=!w&&o.thumbnail!==void 0,R=o.thumbnail&&m&&m.path===o.path?`${o.thumbnail}?v=${m.key}`:o.thumbnail,k=o.isProtected||w&&o.name==="images"&&o.path==="public/images",B=U=>{U.stopPropagation();const G="/"+o.path.replace(/^public\//,"");navigator.clipboard.writeText(G),D(!0),setTimeout(()=>D(!1),1500)},Y=U=>{if(k){U.stopPropagation(),d();return}f(U)};return b("tr",{css:[K.row,r&&!k&&K.rowSelected,"",""],onClick:Y,children:[s("td",{css:[K.td,K.checkboxCell,"",""],onClick:U=>U.stopPropagation(),children:!k&&s("input",{type:"checkbox",css:K.checkbox,checked:r,onChange:()=>f({})})}),s("td",{css:K.td,children:b("div",{css:K.nameCell,children:[w?k?b("div",{css:K.imagesFolderWrapper,children:[s("svg",{css:K.imagesFolderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:s("path",{d:"M10 4H4a2 2 0 00-2 2v12a2 2 0 002 2h16a2 2 0 002-2V8a2 2 0 00-2-2h-8l-2-2z"})}),s("svg",{css:K.lockIcon,fill:"currentColor",viewBox:"0 0 20 20",children:s("path",{fillRule:"evenodd",d:"M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z",clipRule:"evenodd"})})]}):s("div",{css:K.folderIconWrapper,children:s("svg",{css:K.folderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:s("path",{d:"M10 4H4a2 2 0 00-2 2v12a2 2 0 002 2h16a2 2 0 002-2V8a2 2 0 00-2-2h-8l-2-2z"})})}):g&&R?s("div",{css:[K.thumbnailWrapper,o.isCloud&&K.thumbnailCloud,o.isRemote&&K.thumbnailRemote,"",""],children:s("img",{css:K.thumbnail,src:R,alt:o.name,loading:"lazy"})}):s("div",{css:[K.thumbnailWrapper,o.isCloud&&K.thumbnailCloud,o.isRemote&&K.thumbnailRemote,"",""],children:s("svg",{css:K.fileIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"})})}),s("span",{css:K.name,title:o.name,children:J1(o.name)}),b("div",{css:K.actionsCell,children:[b("button",{css:K.copyBtn,onClick:B,title:"Copy file path",children:[C&&s("span",{css:K.tooltip,children:"Copied!"}),s("svg",{css:K.copyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"})})]}),s("button",{css:K.openBtn,onClick:U=>{U.stopPropagation(),d()},children:"Open"})]})]})}),s("td",{css:[K.td,K.meta,"",""],children:w?b("div",{css:K.folderStats,children:[o.localCount!==void 0&&o.localCount>0&&b("span",{css:[K.folderStat,K.folderStatLocal,"",""],title:`${o.localCount} local`,children:[s("svg",{css:K.folderStatIconLocal,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),o.localCount]}),o.cloudCount!==void 0&&o.cloudCount>0&&b("span",{css:[K.folderStat,K.folderStatCloud,"",""],title:`${o.cloudCount} in cloud`,children:[s("svg",{css:K.folderStatIconCloud,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})}),o.cloudCount]}),o.remoteCount!==void 0&&o.remoteCount>0&&b("span",{css:[K.folderStat,K.folderStatRemote,"",""],title:`${o.remoteCount} remote`,children:[s("svg",{css:K.folderStatIconRemote,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"})}),o.remoteCount]}),o.updateCount!==void 0&&o.updateCount>0&&b("span",{css:[K.folderStat,K.folderStatUpdate,"",""],title:`${o.updateCount} pending update${o.updateCount!==1?"s":""}`,children:[s("svg",{css:K.folderStatIconUpdate,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),o.updateCount]}),!o.localCount&&!o.cloudCount&&!o.remoteCount&&!o.updateCount&&o.fileCount!==void 0&&b("span",{children:[o.fileCount," files"]}),!o.localCount&&!o.cloudCount&&!o.remoteCount&&!o.updateCount&&o.fileCount===void 0&&"--"]}):o.hasUpdate?b("span",{css:K.updateLabel,children:[s("svg",{css:K.updateCloudIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})}),s("svg",{css:K.updateSyncIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),"update"]}):o.cdnPushed?s("span",{css:K.storedLabel,children:s("svg",{css:o.isRemote?K.storedIconRemote:K.storedIconCloud,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.isRemote?s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"}):s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})})}):o.size!==void 0?Cp(o.size):"--"}),s("td",{css:[K.td,K.meta,"",""],children:w?o.totalSize!==void 0?Cp(o.totalSize):"--":o.dimensions?`${o.dimensions.width}x${o.dimensions.height}`:"--"}),s("td",{css:K.td,children:o.cdnPushed?o.isRemote?s("span",{css:K.cdnBadgeRemote,children:"Remote"}):b("span",{css:K.cdnBadge,children:[s("svg",{css:K.cdnIcon,fill:"currentColor",viewBox:"0 0 20 20",children:s("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})}),"Pushed"]}):s("span",{css:K.cdnEmpty,children:"--"})})]})}function Cp(o){return o<1024?`${o} B`:o<1024*1024?`${(o/1024).toFixed(1)} KB`:`${(o/(1024*1024)).toFixed(1)} MB`}function J1(o,r=32){if(o.length<=r)return o;const f=o.lastIndexOf("."),d=f>0?o.substring(f):"",h=f>0?o.substring(0,f):o,m=r-d.length-3;if(m<6)return o.substring(0,r-3)+"...";const C=Math.ceil(m/2),D=Math.floor(m/2);return h.substring(0,C)+"..."+h.substring(h.length-D)+d}var $1=Object.defineProperty,W1=(o,r,f)=>r in o?$1(o,r,{enumerable:!0,configurable:!0,writable:!0,value:f}):o[r]=f,Mt=(o,r,f)=>W1(o,typeof r!="symbol"?r+"":r,f);const Rr={x:0,y:0,width:0,height:0,unit:"px"},Jl=(o,r,f)=>Math.min(Math.max(o,r),f),I1=(...o)=>o.filter(r=>r&&typeof r=="string").join(" "),wp=(o,r)=>o===r||o.width===r.width&&o.height===r.height&&o.x===r.x&&o.y===r.y&&o.unit===r.unit;function $l(o,r,f){return o.unit==="%"?{...Rr,...o,unit:"%"}:{unit:"%",x:o.x?o.x/r*100:0,y:o.y?o.y/f*100:0,width:o.width?o.width/r*100:0,height:o.height?o.height/f*100:0}}function Ga(o,r,f){return o.unit?o.unit==="px"?{...Rr,...o,unit:"px"}:{unit:"px",x:o.x?o.x*r/100:0,y:o.y?o.y*f/100:0,width:o.width?o.width*r/100:0,height:o.height?o.height*f/100:0}:{...Rr,...o,unit:"px"}}function zp(o,r,f,d,h,m=0,C=0,D=d,w=h){const g={...o};let R=Math.min(m,d),k=Math.min(C,h),B=Math.min(D,d),Y=Math.min(w,h);r&&(r>1?(R=C?C*r:R,k=R/r,B=D*r):(k=m?m/r:k,R=k*r,Y=w/r)),g.y<0&&(g.height=Math.max(g.height+g.y,k),g.y=0),g.x<0&&(g.width=Math.max(g.width+g.x,R),g.x=0);const U=d-(g.x+g.width);U<0&&(g.x=Math.min(g.x,d-R),g.width+=U);const G=h-(g.y+g.height);if(G<0&&(g.y=Math.min(g.y,h-k),g.height+=G),g.width<R&&((f==="sw"||f=="nw")&&(g.x-=R-g.width),g.width=R),g.height<k&&((f==="nw"||f=="ne")&&(g.y-=k-g.height),g.height=k),g.width>B&&((f==="sw"||f=="nw")&&(g.x-=B-g.width),g.width=B),g.height>Y&&((f==="nw"||f=="ne")&&(g.y-=Y-g.height),g.height=Y),r){const ie=g.width/g.height;if(ie<r){const V=Math.max(g.width/r,k);(f==="nw"||f=="ne")&&(g.y-=V-g.height),g.height=V}else if(ie>r){const V=Math.max(g.height*r,R);(f==="sw"||f=="nw")&&(g.x-=V-g.width),g.width=V}}return g}function P1(o,r,f,d){const h={...o};return r==="ArrowLeft"?d==="nw"?(h.x-=f,h.y-=f,h.width+=f,h.height+=f):d==="w"?(h.x-=f,h.width+=f):d==="sw"?(h.x-=f,h.width+=f,h.height+=f):d==="ne"?(h.y+=f,h.width-=f,h.height-=f):d==="e"?h.width-=f:d==="se"&&(h.width-=f,h.height-=f):r==="ArrowRight"&&(d==="nw"?(h.x+=f,h.y+=f,h.width-=f,h.height-=f):d==="w"?(h.x+=f,h.width-=f):d==="sw"?(h.x+=f,h.width-=f,h.height-=f):d==="ne"?(h.y-=f,h.width+=f,h.height+=f):d==="e"?h.width+=f:d==="se"&&(h.width+=f,h.height+=f)),r==="ArrowUp"?d==="nw"?(h.x-=f,h.y-=f,h.width+=f,h.height+=f):d==="n"?(h.y-=f,h.height+=f):d==="ne"?(h.y-=f,h.width+=f,h.height+=f):d==="sw"?(h.x+=f,h.width-=f,h.height-=f):d==="s"?h.height-=f:d==="se"&&(h.width-=f,h.height-=f):r==="ArrowDown"&&(d==="nw"?(h.x+=f,h.y+=f,h.width-=f,h.height-=f):d==="n"?(h.y+=f,h.height-=f):d==="ne"?(h.y+=f,h.width-=f,h.height-=f):d==="sw"?(h.x-=f,h.width+=f,h.height+=f):d==="s"?h.height+=f:d==="se"&&(h.width+=f,h.height+=f)),h}const Wl={capture:!0,passive:!1};let e2=0;const Xa=class jn extends S.PureComponent{constructor(){super(...arguments),Mt(this,"docMoveBound",!1),Mt(this,"mouseDownOnCrop",!1),Mt(this,"dragStarted",!1),Mt(this,"evData",{startClientX:0,startClientY:0,startCropX:0,startCropY:0,clientX:0,clientY:0,isResize:!0}),Mt(this,"componentRef",S.createRef()),Mt(this,"mediaRef",S.createRef()),Mt(this,"resizeObserver"),Mt(this,"initChangeCalled",!1),Mt(this,"instanceId",`rc-${e2++}`),Mt(this,"state",{cropIsActive:!1,newCropIsBeingDrawn:!1}),Mt(this,"onCropPointerDown",r=>{const{crop:f,disabled:d}=this.props,h=this.getBox();if(!f)return;const m=Ga(f,h.width,h.height);if(d)return;r.cancelable&&r.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});const C=r.target.dataset.ord,D=!!C;let w=r.clientX,g=r.clientY,R=m.x,k=m.y;if(C){const B=r.clientX-h.x,Y=r.clientY-h.y;let U=0,G=0;C==="ne"||C=="e"?(U=B-(m.x+m.width),G=Y-m.y,R=m.x,k=m.y+m.height):C==="se"||C==="s"?(U=B-(m.x+m.width),G=Y-(m.y+m.height),R=m.x,k=m.y):C==="sw"||C=="w"?(U=B-m.x,G=Y-(m.y+m.height),R=m.x+m.width,k=m.y):(C==="nw"||C=="n")&&(U=B-m.x,G=Y-m.y,R=m.x+m.width,k=m.y+m.height),w=R+h.x+U,g=k+h.y+G}this.evData={startClientX:w,startClientY:g,startCropX:R,startCropY:k,clientX:r.clientX,clientY:r.clientY,isResize:D,ord:C},this.mouseDownOnCrop=!0,this.setState({cropIsActive:!0})}),Mt(this,"onComponentPointerDown",r=>{const{crop:f,disabled:d,locked:h,keepSelection:m,onChange:C}=this.props,D=this.getBox();if(d||h||m&&f)return;r.cancelable&&r.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});const w=r.clientX-D.x,g=r.clientY-D.y,R={unit:"px",x:w,y:g,width:0,height:0};this.evData={startClientX:r.clientX,startClientY:r.clientY,startCropX:w,startCropY:g,clientX:r.clientX,clientY:r.clientY,isResize:!0},this.mouseDownOnCrop=!0,C(Ga(R,D.width,D.height),$l(R,D.width,D.height)),this.setState({cropIsActive:!0,newCropIsBeingDrawn:!0})}),Mt(this,"onDocPointerMove",r=>{const{crop:f,disabled:d,onChange:h,onDragStart:m}=this.props,C=this.getBox();if(d||!f||!this.mouseDownOnCrop)return;r.cancelable&&r.preventDefault(),this.dragStarted||(this.dragStarted=!0,m&&m(r));const{evData:D}=this;D.clientX=r.clientX,D.clientY=r.clientY;let w;D.isResize?w=this.resizeCrop():w=this.dragCrop(),wp(f,w)||h(Ga(w,C.width,C.height),$l(w,C.width,C.height))}),Mt(this,"onComponentKeyDown",r=>{const{crop:f,disabled:d,onChange:h,onComplete:m}=this.props;if(d)return;const C=r.key;let D=!1;if(!f)return;const w=this.getBox(),g=this.makePixelCrop(w),R=(navigator.platform.match("Mac")?r.metaKey:r.ctrlKey)?jn.nudgeStepLarge:r.shiftKey?jn.nudgeStepMedium:jn.nudgeStep;if(C==="ArrowLeft"?(g.x-=R,D=!0):C==="ArrowRight"?(g.x+=R,D=!0):C==="ArrowUp"?(g.y-=R,D=!0):C==="ArrowDown"&&(g.y+=R,D=!0),D){r.cancelable&&r.preventDefault(),g.x=Jl(g.x,0,w.width-g.width),g.y=Jl(g.y,0,w.height-g.height);const k=Ga(g,w.width,w.height),B=$l(g,w.width,w.height);h(k,B),m&&m(k,B)}}),Mt(this,"onHandlerKeyDown",(r,f)=>{const{aspect:d=0,crop:h,disabled:m,minWidth:C=0,minHeight:D=0,maxWidth:w,maxHeight:g,onChange:R,onComplete:k}=this.props,B=this.getBox();if(m||!h)return;if(r.key==="ArrowUp"||r.key==="ArrowDown"||r.key==="ArrowLeft"||r.key==="ArrowRight")r.stopPropagation(),r.preventDefault();else return;const Y=(navigator.platform.match("Mac")?r.metaKey:r.ctrlKey)?jn.nudgeStepLarge:r.shiftKey?jn.nudgeStepMedium:jn.nudgeStep,U=Ga(h,B.width,B.height),G=P1(U,r.key,Y,f),ie=zp(G,d,f,B.width,B.height,C,D,w,g);if(!wp(h,ie)){const V=$l(ie,B.width,B.height);R(ie,V),k&&k(ie,V)}}),Mt(this,"onDocPointerDone",r=>{const{crop:f,disabled:d,onComplete:h,onDragEnd:m}=this.props,C=this.getBox();this.unbindDocMove(),!(d||!f)&&this.mouseDownOnCrop&&(this.mouseDownOnCrop=!1,this.dragStarted=!1,m&&m(r),h&&h(Ga(f,C.width,C.height),$l(f,C.width,C.height)),this.setState({cropIsActive:!1,newCropIsBeingDrawn:!1}))}),Mt(this,"onDragFocus",()=>{var r;(r=this.componentRef.current)==null||r.scrollTo(0,0)})}get document(){return document}getBox(){const r=this.mediaRef.current;if(!r)return{x:0,y:0,width:0,height:0};const{x:f,y:d,width:h,height:m}=r.getBoundingClientRect();return{x:f,y:d,width:h,height:m}}componentDidUpdate(r){const{crop:f,onComplete:d}=this.props;if(d&&!r.crop&&f){const{width:h,height:m}=this.getBox();h&&m&&d(Ga(f,h,m),$l(f,h,m))}}componentWillUnmount(){this.resizeObserver&&this.resizeObserver.disconnect(),this.unbindDocMove()}bindDocMove(){this.docMoveBound||(this.document.addEventListener("pointermove",this.onDocPointerMove,Wl),this.document.addEventListener("pointerup",this.onDocPointerDone,Wl),this.document.addEventListener("pointercancel",this.onDocPointerDone,Wl),this.docMoveBound=!0)}unbindDocMove(){this.docMoveBound&&(this.document.removeEventListener("pointermove",this.onDocPointerMove,Wl),this.document.removeEventListener("pointerup",this.onDocPointerDone,Wl),this.document.removeEventListener("pointercancel",this.onDocPointerDone,Wl),this.docMoveBound=!1)}getCropStyle(){const{crop:r}=this.props;if(r)return{top:`${r.y}${r.unit}`,left:`${r.x}${r.unit}`,width:`${r.width}${r.unit}`,height:`${r.height}${r.unit}`}}dragCrop(){const{evData:r}=this,f=this.getBox(),d=this.makePixelCrop(f),h=r.clientX-r.startClientX,m=r.clientY-r.startClientY;return d.x=Jl(r.startCropX+h,0,f.width-d.width),d.y=Jl(r.startCropY+m,0,f.height-d.height),d}getPointRegion(r,f,d,h){const{evData:m}=this,C=m.clientX-r.x,D=m.clientY-r.y;let w;h&&f?w=f==="nw"||f==="n"||f==="ne":w=D<m.startCropY;let g;return d&&f?g=f==="nw"||f==="w"||f==="sw":g=C<m.startCropX,g?w?"nw":"sw":w?"ne":"se"}resolveMinDimensions(r,f,d=0,h=0){const m=Math.min(d,r.width),C=Math.min(h,r.height);return!f||!m&&!C?[m,C]:f>1?m?[m,m/f]:[C*f,C]:C?[C*f,C]:[m,m/f]}resizeCrop(){const{evData:r}=this,{aspect:f=0,maxWidth:d,maxHeight:h}=this.props,m=this.getBox(),[C,D]=this.resolveMinDimensions(m,f,this.props.minWidth,this.props.minHeight);let w=this.makePixelCrop(m);const g=this.getPointRegion(m,r.ord,C,D),R=r.ord||g;let k=r.clientX-r.startClientX,B=r.clientY-r.startClientY;(C&&R==="nw"||R==="w"||R==="sw")&&(k=Math.min(k,-C)),(D&&R==="nw"||R==="n"||R==="ne")&&(B=Math.min(B,-D));const Y={unit:"px",x:0,y:0,width:0,height:0};g==="ne"?(Y.x=r.startCropX,Y.width=k,f?(Y.height=Y.width/f,Y.y=r.startCropY-Y.height):(Y.height=Math.abs(B),Y.y=r.startCropY-Y.height)):g==="se"?(Y.x=r.startCropX,Y.y=r.startCropY,Y.width=k,f?Y.height=Y.width/f:Y.height=B):g==="sw"?(Y.x=r.startCropX+k,Y.y=r.startCropY,Y.width=Math.abs(k),f?Y.height=Y.width/f:Y.height=B):g==="nw"&&(Y.x=r.startCropX+k,Y.width=Math.abs(k),f?(Y.height=Y.width/f,Y.y=r.startCropY-Y.height):(Y.height=Math.abs(B),Y.y=r.startCropY+B));const U=zp(Y,f,g,m.width,m.height,C,D,d,h);return f||jn.xyOrds.indexOf(R)>-1?w=U:jn.xOrds.indexOf(R)>-1?(w.x=U.x,w.width=U.width):jn.yOrds.indexOf(R)>-1&&(w.y=U.y,w.height=U.height),w.x=Jl(w.x,0,m.width-w.width),w.y=Jl(w.y,0,m.height-w.height),w}renderCropSelection(){const{ariaLabels:r=jn.defaultProps.ariaLabels,disabled:f,locked:d,renderSelectionAddon:h,ruleOfThirds:m,crop:C}=this.props,D=this.getCropStyle();if(C)return ot.createElement("div",{style:D,className:"ReactCrop__crop-selection",onPointerDown:this.onCropPointerDown,"aria-label":r.cropArea,tabIndex:0,onKeyDown:this.onComponentKeyDown,role:"group"},!f&&!d&&ot.createElement("div",{className:"ReactCrop__drag-elements",onFocus:this.onDragFocus},ot.createElement("div",{className:"ReactCrop__drag-bar ord-n","data-ord":"n"}),ot.createElement("div",{className:"ReactCrop__drag-bar ord-e","data-ord":"e"}),ot.createElement("div",{className:"ReactCrop__drag-bar ord-s","data-ord":"s"}),ot.createElement("div",{className:"ReactCrop__drag-bar ord-w","data-ord":"w"}),ot.createElement("div",{className:"ReactCrop__drag-handle ord-nw","data-ord":"nw",tabIndex:0,"aria-label":r.nwDragHandle,onKeyDown:w=>this.onHandlerKeyDown(w,"nw"),role:"button"}),ot.createElement("div",{className:"ReactCrop__drag-handle ord-n","data-ord":"n",tabIndex:0,"aria-label":r.nDragHandle,onKeyDown:w=>this.onHandlerKeyDown(w,"n"),role:"button"}),ot.createElement("div",{className:"ReactCrop__drag-handle ord-ne","data-ord":"ne",tabIndex:0,"aria-label":r.neDragHandle,onKeyDown:w=>this.onHandlerKeyDown(w,"ne"),role:"button"}),ot.createElement("div",{className:"ReactCrop__drag-handle ord-e","data-ord":"e",tabIndex:0,"aria-label":r.eDragHandle,onKeyDown:w=>this.onHandlerKeyDown(w,"e"),role:"button"}),ot.createElement("div",{className:"ReactCrop__drag-handle ord-se","data-ord":"se",tabIndex:0,"aria-label":r.seDragHandle,onKeyDown:w=>this.onHandlerKeyDown(w,"se"),role:"button"}),ot.createElement("div",{className:"ReactCrop__drag-handle ord-s","data-ord":"s",tabIndex:0,"aria-label":r.sDragHandle,onKeyDown:w=>this.onHandlerKeyDown(w,"s"),role:"button"}),ot.createElement("div",{className:"ReactCrop__drag-handle ord-sw","data-ord":"sw",tabIndex:0,"aria-label":r.swDragHandle,onKeyDown:w=>this.onHandlerKeyDown(w,"sw"),role:"button"}),ot.createElement("div",{className:"ReactCrop__drag-handle ord-w","data-ord":"w",tabIndex:0,"aria-label":r.wDragHandle,onKeyDown:w=>this.onHandlerKeyDown(w,"w"),role:"button"})),h&&ot.createElement("div",{className:"ReactCrop__selection-addon",onPointerDown:w=>w.stopPropagation()},h(this.state)),m&&ot.createElement(ot.Fragment,null,ot.createElement("div",{className:"ReactCrop__rule-of-thirds-hz"}),ot.createElement("div",{className:"ReactCrop__rule-of-thirds-vt"})))}makePixelCrop(r){const f={...Rr,...this.props.crop||{}};return Ga(f,r.width,r.height)}render(){const{aspect:r,children:f,circularCrop:d,className:h,crop:m,disabled:C,locked:D,style:w,ruleOfThirds:g}=this.props,{cropIsActive:R,newCropIsBeingDrawn:k}=this.state,B=m?this.renderCropSelection():null,Y=I1("ReactCrop",h,R&&"ReactCrop--active",C&&"ReactCrop--disabled",D&&"ReactCrop--locked",k&&"ReactCrop--new-crop",m&&r&&"ReactCrop--fixed-aspect",m&&d&&"ReactCrop--circular-crop",m&&g&&"ReactCrop--rule-of-thirds",!this.dragStarted&&m&&!m.width&&!m.height&&"ReactCrop--invisible-crop",d&&"ReactCrop--no-animate");return ot.createElement("div",{ref:this.componentRef,className:Y,style:w},ot.createElement("div",{ref:this.mediaRef,className:"ReactCrop__child-wrapper",onPointerDown:this.onComponentPointerDown},f),m?ot.createElement("svg",{className:"ReactCrop__crop-mask",width:"100%",height:"100%"},ot.createElement("defs",null,ot.createElement("mask",{id:`hole-${this.instanceId}`},ot.createElement("rect",{width:"100%",height:"100%",fill:"white"}),d?ot.createElement("ellipse",{cx:`${m.x+m.width/2}${m.unit}`,cy:`${m.y+m.height/2}${m.unit}`,rx:`${m.width/2}${m.unit}`,ry:`${m.height/2}${m.unit}`,fill:"black"}):ot.createElement("rect",{x:`${m.x}${m.unit}`,y:`${m.y}${m.unit}`,width:`${m.width}${m.unit}`,height:`${m.height}${m.unit}`,fill:"black"}))),ot.createElement("rect",{fill:"black",fillOpacity:.5,width:"100%",height:"100%",mask:`url(#hole-${this.instanceId})`})):void 0,B)}};Mt(Xa,"xOrds",["e","w"]),Mt(Xa,"yOrds",["n","s"]),Mt(Xa,"xyOrds",["nw","ne","se","sw"]),Mt(Xa,"nudgeStep",1),Mt(Xa,"nudgeStepMedium",10),Mt(Xa,"nudgeStepLarge",100),Mt(Xa,"defaultProps",{ariaLabels:{cropArea:"Use the arrow keys to move the crop selection area",nwDragHandle:"Use the arrow keys to move the north west drag handle to change the crop selection area",nDragHandle:"Use the up and down arrow keys to move the north drag handle to change the crop selection area",neDragHandle:"Use the arrow keys to move the north east drag handle to change the crop selection area",eDragHandle:"Use the up and down arrow keys to move the east drag handle to change the crop selection area",seDragHandle:"Use the arrow keys to move the south east drag handle to change the crop selection area",sDragHandle:"Use the up and down arrow keys to move the south drag handle to change the crop selection area",swDragHandle:"Use the arrow keys to move the south west drag handle to change the crop selection area",wDragHandle:"Use the up and down arrow keys to move the west drag handle to change the crop selection area"}});let t2=Xa;const n2=pn`
86
+ from { opacity: 0; }
87
+ to { opacity: 1; }
88
+ `,be={overlay:y("position:fixed;inset:0;z-index:10001;display:flex;background:transparent;animation:",n2," 0.15s ease-out;font-family:",ro,";",""),container:y(ni," display:flex;flex:1;margin:24px;background:",u.surface,";border:1px solid ",u.border,";border-radius:12px;overflow:hidden;box-shadow:0 20px 40px rgba(0, 0, 0, 0.2);",""),main:y("position:relative;flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:24px;background:",u.background,";overflow:hidden;.ReactCrop__crop-selection{border:2px solid ",u.primary,";}",""),headerButtons:{name:"8wfhwn",styles:"position:absolute;top:16px;right:16px;display:flex;gap:8px;z-index:10"},closeBtn:y("padding:8px;background:",u.surface,";border:1px solid ",u.border,";border-radius:8px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 4px rgba(0, 0, 0, 0.08);&:hover{background-color:",u.surfaceHover,";border-color:",u.borderHover,";}",""),closeIcon:y("width:20px;height:20px;color:",u.textSecondary,";",""),rotationWrapper:{name:"1xwnw1d",styles:"transition:transform 0.3s ease;position:relative;cursor:pointer"},cropHint:y("position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);background:rgba(0, 0, 0, 0.7);color:white;padding:12px 20px;border-radius:8px;font-size:",Z.sm,";pointer-events:none;white-space:nowrap;",""),successBanner:y("position:absolute;top:24px;left:50%;transform:translateX(-50%);background:#22c55e;color:#fff;padding:12px 24px;border-radius:8px;font-size:",Z.sm,";font-weight:600;pointer-events:none;z-index:10;animation:fadeInOut 3s ease-in-out forwards;@keyframes fadeInOut{0%{opacity:0;transform:translateX(-50%) scale(0.9);}10%{opacity:1;transform:translateX(-50%) scale(1);}90%{opacity:1;transform:translateX(-50%) scale(1);}100%{opacity:0;transform:translateX(-50%) scale(0.9);}}",""),cropWrapper:{name:"12wysvm",styles:"max-width:100%;max-height:calc(100vh - 150px);img{max-width:100%;max-height:calc(100vh - 150px);display:block;}"},sidebar:y("width:280px;background:",u.surface,";border-left:1px solid ",u.border,";display:flex;flex-direction:column;overflow:hidden;",""),sidebarHeader:y("padding:16px 20px;border-bottom:1px solid ",u.border,";",""),sidebarTitle:y("font-size:",Z.base,";font-weight:600;color:",u.text,";margin:0;",""),sidebarContent:{name:"1uv1qvv",styles:"flex:1;padding:20px;overflow:auto;display:flex;flex-direction:column;gap:20px"},section:{name:"1c3pogw",styles:"display:flex;flex-direction:column;gap:10px"},sectionLabel:y("font-size:",Z.sm,";font-weight:600;color:",u.text,";",""),subSectionLabel:y("font-size:",Z.xs,";font-weight:500;color:",u.textMuted,";text-transform:uppercase;letter-spacing:0.5px;",""),aspectButtons:{name:"13l5m7f",styles:"display:flex;gap:6px;flex-wrap:wrap"},aspectBtn:y("padding:6px 10px;font-size:",Z.sm,";border:1px solid ",u.border,";background:",u.surface,";color:",u.text,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;&:hover:not(:disabled){background-color:",u.surfaceHover,";border-color:",u.borderHover,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),aspectBtnActive:y("background-color:",u.primary,";border-color:",u.primary,";color:white;&:hover:not(:disabled){background-color:",u.primary,";border-color:",u.primary,";}",""),rotateButtons:{name:"11jf4ye",styles:"display:flex;gap:8px"},rotateBtn:y("flex:1;display:flex;align-items:center;justify-content:center;gap:6px;padding:10px 12px;font-size:",Z.sm,";font-weight:500;background:",u.surface,";border:1px solid ",u.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;color:",u.text,";&:hover:not(:disabled){background-color:",u.surfaceHover,";border-color:",u.borderHover,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),rotateIcon:{name:"157xhr7",styles:"width:16px;height:16px"},rotatePreview:y("width:80px;height:80px;border:1px solid ",u.border,";border-radius:6px;overflow:hidden;display:flex;align-items:center;justify-content:center;background:",u.background,";margin:8px auto;img{max-width:100%;max-height:100%;object-fit:contain;transition:transform 0.3s ease;}",""),resizeRow:{name:"1yydxi7",styles:"display:flex;align-items:center;gap:8px"},resizeInput:y("width:80px;min-width:0;padding:8px 6px;font-size:",Z.sm,";border:1px solid ",u.border,";border-radius:6px;background:",u.surface,";color:",u.text,";text-align:center;&:focus{outline:none;border-color:",u.primary,";}&:disabled{opacity:0.5;cursor:not-allowed;background:",u.surfaceHover,";}&::-webkit-outer-spin-button,&::-webkit-inner-spin-button{-webkit-appearance:none;margin:0;}-moz-appearance:textfield;",""),resizeX:y("font-size:",Z.sm,";color:",u.textMuted,";",""),qualitySlider:y("width:100%;height:6px;border-radius:3px;background:",u.border,";outline:none;cursor:pointer;&::-webkit-slider-thumb{-webkit-appearance:none;width:16px;height:16px;border-radius:50%;background:",u.primary,";cursor:pointer;}&::-moz-range-thumb{width:16px;height:16px;border-radius:50%;background:",u.primary,";cursor:pointer;border:none;}",""),qualityRow:{name:"uh5xjc",styles:"display:flex;align-items:center;gap:12px"},qualityValue:y("min-width:40px;font-size:",Z.sm,";color:",u.text,";text-align:right;",""),fileSize:y("font-size:",Z.sm,";color:",u.textMuted,";padding:8px 0;",""),sidebarFooter:y("padding:16px 20px;border-top:1px solid ",u.border,";display:flex;flex-direction:column;gap:8px;",""),actionBtn:y("display:flex;align-items:center;justify-content:center;gap:10px;width:100%;padding:12px 14px;font-size:",Z.base,";font-weight:500;background:",u.primary,";border:1px solid ",u.primary,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;color:white;&:hover:not(:disabled){background-color:",u.primaryHover,";border-color:",u.primaryHover,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),cancelBtn:y("display:flex;align-items:center;justify-content:center;gap:10px;width:100%;padding:12px 14px;font-size:",Z.base,";font-weight:500;background:",u.surface,";border:1px solid ",u.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;color:",u.text,";&:hover{background-color:",u.surfaceHover,";border-color:",u.borderHover,";}",""),spinner:{name:"1b4712p",styles:"width:16px;height:16px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:spin 0.75s linear infinite;@keyframes spin{to{transform:rotate(360deg);}}"},hint:y("font-size:",Z.xs,";color:",u.textMuted,";font-style:italic;",""),clearBtn:y("margin-top:8px;padding:6px 12px;font-size:",Z.xs,";color:",u.textSecondary,";background:transparent;border:1px solid ",u.border,";border-radius:4px;cursor:pointer;transition:all 0.15s ease;&:hover{background:",u.surfaceHover,";color:",u.text,";}","")},a2=[{label:"Free",value:void 0},{label:"1:1",value:1},{label:"4:3",value:4/3},{label:"3:2",value:3/2},{label:"16:9",value:16/9},{label:"2:3",value:2/3},{label:"9:16",value:9/16}];function l2(o){return o<1024?`${o} B`:o<1024*1024?`${(o/1024).toFixed(1)} KB`:`${(o/(1024*1024)).toFixed(2)} MB`}function i2({imagePath:o,imageSrc:r,dimensions:f,fileSize:d,onClose:h,onSaveComplete:m,triggerRefresh:C}){const D=S.useRef(null),[w,g]=S.useState(),[R,k]=S.useState(),[B,Y]=S.useState(void 0),[U,G]=S.useState(f.width),[ie,V]=S.useState(f.height),[oe,ae]=S.useState(!1),[ce,X]=S.useState(!1),[W,$]=S.useState({width:f.width,height:f.height}),[P,N]=S.useState(1),[Q,ue]=S.useState(!1),[he,pe]=S.useState(0),[te,Ue]=S.useState(!1),E=U!==W.width||ie!==W.height,[J,F]=S.useState(0),[De,Ye]=S.useState(0),[v,L]=S.useState(!1),[I,le]=S.useState(0),[Ce,Ee]=S.useState(null),[je,vt]=S.useState(d),[Le,nn]=S.useState(95),[Je,ut]=S.useState(0),dt=Je!==0,jt=Ae=>{const we=Ae.currentTarget,{naturalWidth:Xe,naturalHeight:mt,width:Ne,height:Me}=we;$({width:Xe,height:mt}),N(Xe/Ne),X(!0),G(Xe),V(mt)},qt=()=>{if(!ce||!D.current||Q||E||dt)return;const Ae=D.current.width,we=D.current.height;if(ue(!0),B){const Xe=Ae/we;let mt,Ne;B>Xe?(mt=100,Ne=Xe/B*100):(Ne=100,mt=B/Xe*100);const Me={unit:"%",x:(100-mt)/2,y:(100-Ne)/2,width:mt,height:Ne};g(Me);const kt={unit:"px",x:Math.round(Me.x/100*Ae),y:Math.round(Me.y/100*we),width:Math.round(Me.width/100*Ae),height:Math.round(Me.height/100*we)};k(kt)}else g({unit:"%",x:0,y:0,width:100,height:100}),k({unit:"px",x:0,y:0,width:Ae,height:we})},an=()=>{ue(!1),g(void 0),k(void 0)};S.useEffect(()=>{if(R&&ce&&P>0){const Ae=Math.round(R.width*P),we=Math.round(R.height*P);F(Ae),Ye(we)}else Q||(F(0),Ye(0))},[R,ce,P,Q]);const Vt=()=>{ut(Ae=>(Ae+90)%360)},mn=()=>{ut(Ae=>(Ae-90+360)%360)},Se=()=>{ut(0)},lt=()=>{te&&m({name:o.split("/").pop()||"",path:o,type:"file",dimensions:W}),h()},Qt=Ae=>{if(Y(Ae),!ce||!D.current)return;const we=D.current.width,Xe=D.current.height;if(Ae){const mt=we/Xe;let Ne,Me;Ae>mt?(Ne=100,Me=mt/Ae*100):(Me=100,Ne=Ae/mt*100);const kt={unit:"%",x:(100-Ne)/2,y:(100-Me)/2,width:Ne,height:Me};g(kt);const Tt={unit:"px",x:Math.round(kt.x/100*we),y:Math.round(kt.y/100*Xe),width:Math.round(kt.width/100*we),height:Math.round(kt.height/100*Xe)};k(Tt)}else g({unit:"%",x:0,y:0,width:100,height:100}),k({unit:"px",x:0,y:0,width:we,height:Xe})},xt=W.width/W.height,ma=Ae=>{if(Q)return;const we=parseInt(Ae.target.value)||0;G(we),we>0&&V(Math.round(we/xt))},de=Ae=>{if(Q)return;const we=parseInt(Ae.target.value)||0;V(we),we>0&&G(Math.round(we*xt))},rt=()=>{G(W.width),V(W.height)},Gt=Ae=>{if(!R||!D.current)return;const we=parseInt(Ae.target.value)||0;if(we<=0)return;let Xe=De;B&&(Xe=Math.round(we/B));const mt=we/P,Ne=Xe/P,Me={unit:"px",x:R.x,y:R.y,width:mt,height:Ne},kt=D.current.width-Me.x,Tt=D.current.height-Me.y;Me.width=Math.min(mt,kt),Me.height=Math.min(Ne,Tt),k(Me),g({unit:"px",x:Me.x,y:Me.y,width:Me.width,height:Me.height})},Kt=Ae=>{if(!R||!D.current)return;const we=parseInt(Ae.target.value)||0;if(we<=0)return;let Xe=J;B&&(Xe=Math.round(we*B));const mt=Xe/P,Ne=we/P,Me={unit:"px",x:R.x,y:R.y,width:mt,height:Ne},kt=D.current.width-Me.x,Tt=D.current.height-Me.y;Me.width=Math.min(mt,kt),Me.height=Math.min(Ne,Tt),k(Me),g({unit:"px",x:Me.x,y:Me.y,width:Me.width,height:Me.height})},Pt=async()=>{if(ce){ae(!0);try{const Ae=R?{x:Math.round(R.x*P),y:Math.round(R.y*P),width:Math.round(R.width*P),height:Math.round(R.height*P)}:{x:0,y:0,width:W.width,height:W.height};let we=Q?J:E?U:W.width,Xe=Q?De:E?ie:W.height;if(Je===90||Je===270){const Me=we;we=Xe,Xe=Me}const Ne=await(await fetch("/api/studio/edit-image",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({imagePath:o,crop:Ae,rotation:Je,resize:{width:we,height:Xe},quality:Le})})).json();Ne.success?(C(),m(Ne.updatedItem),$({width:Ne.dimensions.width,height:Ne.dimensions.height}),G(Ne.dimensions.width),V(Ne.dimensions.height),Ne.updatedItem?.size&&vt(Ne.updatedItem.size),ue(!1),g(void 0),k(void 0),ut(0),Ue(!0),pe(Date.now()),le(Me=>Me+1),L(!0),setTimeout(()=>L(!1),3e3)):(console.error("Edit failed:",Ne.error),Ee(Ne.error||"Failed to save image"))}catch(Ae){console.error("Edit error:",Ae),Ee("An error occurred while saving the image")}finally{ae(!1)}}};return b("div",{css:be.overlay,children:[b("div",{css:be.container,children:[b("div",{css:be.main,children:[s("div",{css:be.headerButtons,children:s("button",{css:be.closeBtn,onClick:lt,children:s("svg",{css:be.closeIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})}),b("div",{css:be.rotationWrapper,onClick:qt,children:[s(t2,{crop:Q?w:void 0,onChange:Ae=>g(Ae),onComplete:Ae=>k(Ae),aspect:B,css:be.cropWrapper,disabled:!Q,children:s("img",{ref:D,src:he?`${r}?v=${he}`:r,alt:"Edit",onLoad:jt,style:{cursor:Q?"crosshair":"pointer"}})}),!Q&&ce&&s("div",{css:be.cropHint,children:dt?"Save rotation first to enable crop":E?"Save resize first to enable crop":"Click to enable crop selection"}),v&&s("div",{css:be.successBanner,children:"Image updated"},I)]})]}),b("div",{css:be.sidebar,children:[s("div",{css:be.sidebarHeader,children:s("h2",{css:be.sidebarTitle,children:"Edit Image"})}),b("div",{css:be.sidebarContent,children:[b("div",{css:be.section,children:[s("span",{css:be.sectionLabel,children:"Crop Selection"}),s("span",{css:be.subSectionLabel,children:"Aspect Ratio"}),s("div",{css:be.aspectButtons,children:a2.map(Ae=>s("button",{css:[be.aspectBtn,B===Ae.value&&be.aspectBtnActive,"",""],onClick:()=>Qt(Ae.value),disabled:E||dt,children:Ae.label},Ae.label))}),Q&&b(at,{children:[s("span",{css:be.subSectionLabel,children:"Selection Size"}),b("div",{css:be.resizeRow,children:[s("input",{type:"number",css:be.resizeInput,value:J,onChange:Gt,min:1}),s("span",{css:be.resizeX,children:"×"}),s("input",{type:"number",css:be.resizeInput,value:De,onChange:Kt,min:1}),s("span",{css:be.resizeX,children:"px"})]})]}),s("p",{css:be.hint,children:dt?"Save rotation first to enable crop":E?"Save resize first to enable crop":Q?"Drag corners to resize crop area":"Click image to enable crop"}),Q&&s("button",{css:be.clearBtn,onClick:an,children:"Clear Selection"})]}),b("div",{css:be.section,children:[s("span",{css:be.sectionLabel,children:"Rotation"}),s("div",{css:be.rotatePreview,children:s("img",{src:he?`${r}?v=${he}`:r,alt:"Rotation preview",style:{transform:`rotate(${Je}deg)`}})}),b("div",{css:be.rotateButtons,children:[b("button",{css:be.rotateBtn,onClick:mn,disabled:oe||Q||E,children:[s("svg",{css:be.rotateIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 10h10a8 8 0 018 8v2M3 10l6 6m-6-6l6-6"})}),"CCW"]}),b("button",{css:be.rotateBtn,onClick:Vt,disabled:oe||Q||E,children:[s("svg",{css:be.rotateIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 10h-10a8 8 0 00-8 8v2M21 10l-6 6m6-6l-6-6"})}),"CW"]})]}),dt&&s("button",{css:be.clearBtn,onClick:Se,children:"Reset Rotation"}),s("p",{css:be.hint,children:Q||E?"Save other changes first to rotate":dt?"Click Save Changes to apply rotation":"Preview rotation before saving"})]}),b("div",{css:be.section,children:[s("span",{css:be.sectionLabel,children:"Resize Image"}),b("div",{css:be.resizeRow,children:[s("input",{type:"number",css:be.resizeInput,value:U,onChange:ma,min:1,disabled:Q||dt}),s("span",{css:be.resizeX,children:"×"}),s("input",{type:"number",css:be.resizeInput,value:ie,onChange:de,min:1,disabled:Q||dt}),s("span",{css:be.resizeX,children:"px"})]}),E&&!Q&&!dt&&s("button",{css:be.clearBtn,onClick:rt,children:"Reset to Original"}),dt?s("p",{css:be.hint,children:"Save rotation first to resize"}):Q?s("p",{css:be.hint,children:"Clear crop selection to resize"}):E?s("p",{css:be.hint,children:"Save to apply resize, then crop"}):s("p",{css:be.hint,children:"Maintains aspect ratio"})]}),b("div",{css:be.section,children:[s("span",{css:be.sectionLabel,children:"Quality"}),b("div",{css:be.qualityRow,children:[s("input",{type:"range",css:be.qualitySlider,min:1,max:100,value:Le,onChange:Ae=>nn(parseInt(Ae.target.value))}),b("span",{css:be.qualityValue,children:[Le,"%"]})]}),s("p",{css:be.hint,children:"Lower quality = smaller file size"})]}),b("div",{css:be.section,children:[s("span",{css:be.sectionLabel,children:"File Size"}),s("p",{css:be.fileSize,children:l2(je)})]})]}),b("div",{css:be.sidebarFooter,children:[s("button",{css:be.actionBtn,onClick:Pt,disabled:oe||!ce,children:oe?b(at,{children:[s("span",{css:be.spinner}),"Saving..."]}):"Save Changes"}),s("button",{css:be.cancelBtn,onClick:lt,disabled:oe,children:"Close"})]})]})]}),Ce&&s(hu,{title:"Error",message:Ce,onClose:()=>Ee(null)})]})}const o2=[".jpg",".jpeg",".png",".gif",".webp",".svg",".ico",".bmp",".tiff",".tif"],r2=[".mp4",".webm",".mov",".avi",".mkv",".m4v"];function s2(o){const r=o.toLowerCase().substring(o.lastIndexOf("."));return o2.includes(r)}function c2(o){const r=o.toLowerCase().substring(o.lastIndexOf("."));return r2.includes(r)}const re={overlay:{name:"1crgpqk",styles:"position:absolute;top:0;left:0;right:0;bottom:0;z-index:100;display:flex;background:transparent"},container:y("display:flex;flex:1;margin:24px;background:",u.surface,";border:1px solid ",u.border,";border-radius:12px;overflow:hidden;box-shadow:0 20px 40px rgba(0, 0, 0, 0.2);",""),main:y("position:relative;flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:24px;background:",u.background,";overflow:auto;",""),headerButtons:{name:"8wfhwn",styles:"position:absolute;top:16px;right:16px;display:flex;gap:8px;z-index:10"},copyBtn:y("position:relative;padding:8px;background:",u.surface,";border:1px solid ",u.border,";border-radius:8px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 4px rgba(0, 0, 0, 0.08);&:hover{background-color:",u.surfaceHover,";border-color:",u.borderHover,";}",""),copyIcon:y("width:20px;height:20px;color:",u.textSecondary,";",""),statusIcon:y("display:flex;align-items:center;justify-content:center;padding:8px;background:",u.surface,";border:1px solid ",u.border,";border-radius:8px;box-shadow:0 2px 4px rgba(0, 0, 0, 0.08);",""),cloudIcon:{name:"1byef48",styles:"width:22px;height:22px;color:#f59e0b;transform:translateY(1px)"},globeIcon:{name:"jso3j5",styles:"width:20px;height:20px;color:#ef4444"},tooltip:{name:"1w9prgf",styles:"position:absolute;right:100%;top:50%;transform:translateY(-50%);background:#1a1f36;color:white;padding:4px 8px;border-radius:4px;font-size:12px;white-space:nowrap;margin-right:8px;pointer-events:none;z-index:100;&::after{content:'';position:absolute;left:100%;top:50%;transform:translateY(-50%);border:4px solid transparent;border-left-color:#1a1f36;}"},mainCloseBtn:y("padding:8px;background:",u.surface,";border:1px solid ",u.border,";border-radius:8px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 4px rgba(0, 0, 0, 0.08);&:hover{background-color:",u.surfaceHover,";border-color:",u.borderHover,";}",""),mainCloseIcon:y("width:20px;height:20px;color:",u.textSecondary,";",""),mediaWrapper:{name:"zr0bjt",styles:"max-width:100%;max-height:100%;display:flex;align-items:center;justify-content:center"},image:{name:"4gte4n",styles:"max-width:100%;max-height:calc(100vh - 200px);object-fit:contain;border-radius:8px;box-shadow:0 4px 12px rgba(0, 0, 0, 0.1)"},video:{name:"1talud7",styles:"max-width:100%;max-height:calc(100vh - 200px);border-radius:8px;box-shadow:0 4px 12px rgba(0, 0, 0, 0.1)"},filePlaceholder:y("display:flex;flex-direction:column;align-items:center;justify-content:center;padding:48px;background:",u.surface,";border-radius:12px;border:1px solid ",u.border,";",""),fileIcon:y("width:80px;height:80px;color:",u.textMuted,";margin-bottom:16px;",""),fileName:y("font-size:",Z.lg,";font-weight:600;color:",u.text,";margin:0;",""),sidebar:y("width:280px;background:",u.surface,";border-left:1px solid ",u.border,";display:flex;flex-direction:column;overflow:hidden;",""),sidebarHeader:y("padding:16px 20px;border-bottom:1px solid ",u.border,";",""),sidebarTitle:y("font-size:",Z.base,";font-weight:600;color:",u.text,";margin:0;",""),sidebarContent:{name:"esl95u",styles:"flex:1;padding:20px;overflow:auto"},info:{name:"bh1r16",styles:"display:flex;flex-direction:column;gap:12px;margin-bottom:24px"},infoRow:y("display:flex;justify-content:space-between;font-size:",Z.sm,";",""),infoLabel:y("color:",u.textSecondary,";",""),infoValue:y("color:",u.text,";font-weight:500;text-align:right;max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;",""),infoValueWrap:y("color:",u.text,";font-weight:500;text-align:right;max-width:160px;word-break:break-all;white-space:normal;",""),infoLink:y("color:",u.primary,";font-weight:500;text-align:right;max-width:160px;word-break:break-all;white-space:normal;text-decoration:none;&:hover{text-decoration:underline;}",""),thumbChips:{name:"1w7hks3",styles:"display:flex;gap:4px;flex-wrap:wrap;justify-content:flex-end"},thumbChip:y("font-size:10px;font-weight:600;padding:2px 6px;border-radius:4px;background:",u.primary,";color:white;",""),actions:{name:"3w0yoi",styles:"display:flex;flex-direction:column;gap:8px"},actionBtn:y("display:flex;align-items:center;gap:10px;width:100%;padding:12px 14px;font-size:",Z.base,";font-weight:500;background:",u.surface,";border:1px solid ",u.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;color:",u.text,";text-align:left;&:hover:not(:disabled){background-color:",u.surfaceHover,";border-color:",u.borderHover,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),actionBtnDanger:y("color:",u.danger,";&:hover:not(:disabled){background-color:",u.dangerLight,";border-color:",u.danger,";}",""),actionBtnCloud:{name:"1lzbs29",styles:"color:#f59e0b;&:hover:not(:disabled){background-color:rgba(245, 158, 11, 0.1);border-color:#f59e0b;}"},actionIcon:{name:"a4lfw4",styles:"width:16px;height:16px;flex-shrink:0"}};function u2(){const{focusedItem:o,setFocusedItem:r,triggerRefresh:f,fileItems:d,setEditedImageKey:h,requestDelete:m,requestMove:C,requestSync:D,requestDownload:w,requestProcess:g,setProcessMode:R,actionState:k}=ei(),[B,Y]=S.useState(!1),[U,G]=S.useState(!1),[ie,V]=S.useState({current:0,total:1,percent:0,status:"processing",message:"Renaming..."}),[oe,ae]=S.useState(!1),[ce,X]=S.useState(null),[W,$]=S.useState(!1),[P,N]=S.useState(!1),[Q,ue]=S.useState({current:0,total:3,percent:0,status:"processing",message:"Generating favicons..."}),[he,pe]=S.useState(!1),[te,Ue]=S.useState(0),E=k.showProgress,J=o?o.name.toLowerCase()==="favicon.png"||o.name.toLowerCase()==="favicon.jpg":!1,F=o&&!o.isProtected&&/\.(jpg|jpeg|png|webp|gif)$/i.test(o.name)&&(!o.isCloud||o.hasUpdate),De=ut=>{r(ut),Ue(Date.now()),h(ut.path)};if(!o)return null;const Ye=s2(o.name),v=c2(o.name),L="/"+o.path.replace(/^public\//,""),I=o.cdnPushed&&o.cdnBaseUrl?`${o.cdnBaseUrl}${L}`:L,le=te?`${I}?v=${te}`:I,Ce=typeof window<"u"?window.location.origin:"",Ee=o.cdnPushed&&o.cdnBaseUrl?`${o.cdnBaseUrl}${L}`:`${Ce}${L}`,je=()=>{r(null)},vt=()=>{navigator.clipboard.writeText(Ee),$(!0),setTimeout(()=>$(!1),1500)},Le=async ut=>{if(ut&&ut!==o.name){Y(!1),G(!0),V({current:0,total:1,percent:0,status:"processing",message:"Renaming file..."});try{const dt=await fetch("/api/studio/rename-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({oldPath:o.path,newName:ut})});if(!dt.body)throw new Error("No response body");const jt=dt.body.getReader(),qt=new TextDecoder;let an="",Vt="";for(;;){const{done:mn,value:Se}=await jt.read();if(mn)break;an+=qt.decode(Se,{stream:!0});const lt=an.split(`
89
+ `);an=lt.pop()||"";for(const Qt of lt){if(!Qt.startsWith("data: "))continue;const xt=JSON.parse(Qt.slice(6));xt.type==="start"?V({current:0,total:xt.total,percent:0,status:"processing",message:xt.message}):xt.type==="progress"?V({current:xt.current,total:xt.total,percent:Math.round(xt.current/xt.total*100),status:"processing",message:xt.message}):xt.type==="complete"?(Vt=xt.newPath,V({current:xt.renamed,total:xt.renamed,percent:100,status:"complete",message:"Renamed successfully"})):xt.type==="error"&&(V(ma=>({...ma,status:"error",message:xt.message})),X({title:"Rename Failed",message:xt.message}))}}Vt&&(r({...o,path:Vt,name:Vt.split("/").pop()||ut}),f())}catch(dt){console.error("Rename error:",dt),V(jt=>({...jt,status:"error",message:"Failed to rename"})),X({title:"Rename Failed",message:"An error occurred while renaming the file"})}}},nn=async()=>{if(o){N(!0),ue({current:0,total:3,percent:0,status:"processing",message:"Generating favicons..."});try{const ut=await fetch("/api/studio/generate-favicon",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({imagePath:"/"+o.path.replace(/^public\//,"")})});if(!ut.ok){const qt=await ut.json();ue({current:0,total:3,percent:0,status:"error",message:qt.error||"Failed to generate favicons"});return}const dt=ut.body?.getReader(),jt=new TextDecoder;if(dt){let qt="";for(;;){const{done:an,value:Vt}=await dt.read();if(an)break;qt+=jt.decode(Vt,{stream:!0});const mn=qt.split(`
90
+ `);qt=mn.pop()||"";for(const Se of mn)if(Se.startsWith("data: "))try{const lt=JSON.parse(Se.slice(6));lt.type==="start"?ue(Qt=>({...Qt,total:lt.total})):lt.type==="progress"?ue({current:lt.current,total:lt.total,percent:lt.percent,status:"processing",message:lt.message}):lt.type==="complete"?ue({current:lt.processed,total:lt.processed,percent:100,status:lt.errors>0?"error":"complete",message:lt.message}):lt.type==="error"&&ue(Qt=>({...Qt,status:"error",message:lt.message}))}catch{}}}}catch(ut){console.error("Favicon generation error:",ut),ue({current:0,total:3,percent:0,status:"error",message:"An error occurred while generating favicons"})}}},Je=()=>Ye?s("img",{css:re.image,src:le,alt:o.name}):v?s("video",{css:re.video,src:le,controls:!0}):b("div",{css:re.filePlaceholder,children:[s("svg",{css:re.fileIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"})}),s("p",{css:re.fileName,children:o.name})]});return b(at,{children:[ce&&s(hu,{title:ce.title,message:ce.message,onClose:()=>X(null)}),s(qp,{isOpen:oe,onClose:()=>ae(!1)}),B&&s(Ar,{title:"Rename File",message:"Enter a new name for the file:",defaultValue:o.name,placeholder:"Enter new filename",confirmLabel:"Rename",onConfirm:Le,onCancel:()=>Y(!1)}),U&&s(dl,{title:"Renaming",progress:ie,onClose:()=>{G(!1),f()}}),P&&s(dl,{title:"Generating Favicons",progress:Q,onClose:()=>N(!1)}),s("div",{css:re.overlay,onClick:je,children:b("div",{css:re.container,onClick:ut=>ut.stopPropagation(),children:[b("div",{css:re.main,children:[b("div",{css:re.headerButtons,children:[o.cdnPushed&&!o.isRemote&&s("span",{css:re.statusIcon,title:"Pushed to CDN",children:s("svg",{css:re.cloudIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})})}),o.isRemote&&s("span",{css:re.statusIcon,title:"Remote image",children:s("svg",{css:re.globeIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"})})}),b("button",{css:re.copyBtn,onClick:vt,title:"Copy file path",children:[W&&s("span",{css:re.tooltip,children:"Copied!"}),s("svg",{css:re.copyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"})})]}),s("button",{css:re.mainCloseBtn,onClick:je,"aria-label":"Close",children:s("svg",{css:re.mainCloseIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),s("div",{css:re.mediaWrapper,children:Je()})]}),b("div",{css:re.sidebar,children:[s("div",{css:re.sidebarHeader,children:s("h3",{css:re.sidebarTitle,children:"Details"})}),b("div",{css:re.sidebarContent,children:[b("div",{css:re.info,children:[b("div",{css:re.infoRow,children:[s("span",{css:re.infoLabel,children:"Name"}),s("span",{css:re.infoValueWrap,children:o.name})]}),b("div",{css:re.infoRow,children:[s("span",{css:re.infoLabel,children:"Path"}),s("span",{css:re.infoValueWrap,children:o.path.replace(/^public\//,"")})]}),o.size!==void 0&&b("div",{css:re.infoRow,children:[s("span",{css:re.infoLabel,children:"Size"}),s("span",{css:re.infoValue,children:d2(o.size)})]}),o.dimensions&&b("div",{css:re.infoRow,children:[s("span",{css:re.infoLabel,children:"Dimensions"}),b("span",{css:re.infoValue,children:[o.dimensions.width," × ",o.dimensions.height]})]}),(o.hasSm||o.hasMd||o.hasLg||o.hasFull)&&b("div",{css:re.infoRow,children:[s("span",{css:re.infoLabel,children:"Thumbnails"}),s("span",{css:re.infoValue,children:b("span",{css:re.thumbChips,children:[o.hasSm&&s("span",{css:re.thumbChip,children:"SM"}),o.hasMd&&s("span",{css:re.thumbChip,children:"MD"}),o.hasLg&&s("span",{css:re.thumbChip,children:"LG"}),o.hasFull&&s("span",{css:re.thumbChip,children:"FULL"})]})})]}),b("div",{css:re.infoRow,children:[s("span",{css:re.infoLabel,children:"CDN Status"}),s("span",{css:re.infoValue,children:o.cdnPushed?o.isRemote?"Remote":"Pushed":"Local"})]}),b("div",{css:re.infoRow,children:[s("span",{css:re.infoLabel,children:"URL"}),s("a",{href:Ee,target:"_blank",rel:"noopener noreferrer",css:re.infoLink,title:Ee,children:Ee})]})]}),b("div",{css:re.actions,children:[b("button",{css:re.actionBtn,onClick:()=>Y(!0),disabled:o.isProtected,children:[s("svg",{css:re.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})}),"Rename"]}),Ye&&b("button",{css:re.actionBtn,onClick:()=>pe(!0),disabled:E||!F,title:F?void 0:"Download image first to edit",children:[s("svg",{css:re.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14M14 8l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2"})}),F?"Edit Image":"Download to Edit"]}),b("button",{css:re.actionBtn,onClick:()=>C([o.path]),disabled:E||o.isProtected,children:[s("svg",{css:re.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4"})}),"Move"]}),b("button",{css:[re.actionBtn,re.actionBtnCloud,"",""],onClick:()=>D([o.path],d),disabled:E||o.isProtected||o.cdnPushed&&!o.isRemote,title:o.cdnPushed&&!o.isRemote?"Already in R2":void 0,children:[s("svg",{css:re.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})}),"Push to CDN"]}),b("button",{css:[re.actionBtn,re.actionBtnCloud,"",""],onClick:()=>w([o.path],d),disabled:E||!o.cdnPushed||o.isRemote,title:o.cdnPushed?o.isRemote?"Remote image":"Download from CDN to local":"Not on CDN",children:[s("svg",{css:re.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M9 19l3 3m0 0l3-3m-3 3V10"})}),"Download from CDN"]}),b("button",{css:re.actionBtn,onClick:()=>{R("generate"),g([o.path])},disabled:E||o.isProtected,children:[s("svg",{css:re.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),"Generate Thumbnails"]}),(o.hasSm||o.hasMd||o.hasLg||o.hasFull)&&b("button",{css:re.actionBtn,onClick:()=>{R("remove"),g([o.path])},disabled:E||o.isProtected,children:[s("svg",{css:re.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})}),"Remove Thumbnails"]}),J&&b("button",{css:re.actionBtn,onClick:nn,disabled:P||o.isProtected,children:[s("svg",{css:re.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 3v4M3 5h4M6 17v4m-2-2h4m5-16l2.286 6.857L21 12l-5.714 2.143L13 21l-2.286-6.857L5 12l5.714-2.143L13 3z"})}),"Generate Favicons"]}),b("button",{css:[re.actionBtn,re.actionBtnDanger,"",""],onClick:()=>m([o.path]),disabled:E||o.isProtected,children:[s("svg",{css:re.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})}),"Delete"]})]})]})]})]})}),he&&o.dimensions&&s(i2,{imagePath:o.path,imageSrc:le,dimensions:o.dimensions,fileSize:o.size||0,onClose:()=>pe(!1),onSaveComplete:De,triggerRefresh:f})]})}function d2(o){return o<1024?`${o} B`:o<1024*1024?`${(o/1024).toFixed(1)} KB`:`${(o/(1024*1024)).toFixed(1)} MB`}const ul={overlay:{name:"1u8n9cx",styles:"position:fixed;inset:0;background:rgba(0, 0, 0, 0.5);display:flex;align-items:center;justify-content:center;z-index:1100"},modal:y("background:",u.surface,";border-radius:12px;padding:24px;max-width:400px;width:90%;box-shadow:0 20px 40px rgba(0, 0, 0, 0.2);",""),header:{name:"c6eghz",styles:"display:flex;align-items:center;gap:12px;margin-bottom:12px"},icon:y("width:24px;height:24px;color:",u.danger,";flex-shrink:0;",""),title:y("font-size:",Z.lg,";font-weight:600;color:",u.text,";margin:0;",""),message:y("font-size:",Z.base,";color:",u.textSecondary,";margin:0 0 20px 0;line-height:1.5;",""),button:y("width:100%;padding:10px 16px;border-radius:6px;font-size:",Z.base,";font-weight:500;border:none;background:",u.primary,";color:white;cursor:pointer;transition:background 0.15s ease;&:hover{background:",u.primaryHover,";}","")};function f2(){const{error:o,clearError:r}=ei();return o?s("div",{css:ul.overlay,onClick:r,children:b("div",{css:ul.modal,onClick:f=>f.stopPropagation(),children:[b("div",{css:ul.header,children:[s("svg",{css:ul.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}),s("h3",{css:ul.title,children:o.title})]}),s("p",{css:ul.message,children:o.message}),s("button",{css:ul.button,onClick:r,children:"OK"})]})}):null}const Mp={showProgress:!1,progressTitle:"",progressState:{current:0,total:0,percent:0,status:"processing"},showDeleteConfirm:!1,showMoveModal:!1,showSyncConfirm:!1,showProcessConfirm:!1,showDownloadConfirm:!1,actionPaths:[],syncImageCount:0,syncHasRemote:!1,syncHasLocal:!1,processMode:"generate",downloadImageCount:0,downloadTotalSelected:0};function h2({triggerRefresh:o,clearSelection:r,setFocusedItem:f,showError:d}){const[h,m]=S.useState(Mp),C=S.useCallback(P=>{m(N=>({...N,progressState:typeof P=="function"?P(N.progressState):{...N.progressState,...P}}))},[]),D=S.useCallback(P=>{m(N=>({...N,showProgress:P}))},[]),w=S.useCallback(P=>{m(N=>({...N,progressTitle:P}))},[]),g=Np({setShowProgress:D,setProgressTitle:w,setProgressState:C,triggerRefresh:o}),R=S.useCallback(P=>{m(N=>({...N,actionPaths:P,showDeleteConfirm:!0}))},[]),k=S.useCallback(P=>{m(N=>({...N,actionPaths:P,showMoveModal:!0}))},[]),B=S.useCallback((P,N)=>{const Q=P.map(pe=>"/"+pe.replace(/^public\//,""));let ue=!1,he=!1;for(const pe of P){const te=N.find(Ue=>Ue.path===pe);te&&(te.isRemote?ue=!0:te.cdnPushed||(he=!0))}m(pe=>({...pe,actionPaths:P,syncImageCount:Q.length,syncHasRemote:ue,syncHasLocal:he,showSyncConfirm:!0}))},[]),Y=S.useCallback((P,N)=>{const Q=[];for(const ue of P){const he=N.find(pe=>pe.path===ue);he&&he.cdnPushed&&!he.isRemote&&Q.push(ue)}m(ue=>({...ue,actionPaths:Q,downloadImageCount:Q.length,downloadTotalSelected:P.length,showDownloadConfirm:!0}))},[]),U=S.useCallback(P=>{m(N=>({...N,actionPaths:P,showProcessConfirm:!0}))},[]),G=S.useCallback(P=>{m(N=>({...N,processMode:P}))},[]),ie=S.useCallback(()=>{m(P=>({...P,showDeleteConfirm:!1,showMoveModal:!1,showSyncConfirm:!1,showProcessConfirm:!1,showDownloadConfirm:!1}))},[]),V=S.useCallback(()=>{m(Mp)},[]),oe=S.useCallback(()=>{g.stop()},[g]),ae=S.useCallback(async()=>{const P=h.actionPaths;m(N=>({...N,showDeleteConfirm:!1}));try{const N=await fetch("/api/studio/delete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:P})});if(N.ok)r(),f(null),o();else{const Q=await N.json();d("Delete Failed",Q.error||"Unknown error")}}catch(N){console.error("Delete error:",N),d("Delete Failed","Delete failed. Check console for details.")}},[h.actionPaths,r,f,o,d]),ce=S.useCallback(async P=>{const N=h.actionPaths;m(Q=>({...Q,showMoveModal:!1})),await g.execute({endpoint:"/api/studio/move",body:{paths:N,destination:P},title:"Moving Files",onComplete:Q=>{Q.errors&&Q.errors>0&&Q.errorMessages?.length&&d("Move Failed",Q.errorMessages.join(`
91
+ `)),r(),f(null)}})},[h.actionPaths,r,f,d,g]),X=S.useCallback(async()=>{const N=h.actionPaths.map(he=>"/"+he.replace(/^public\//,""));m(he=>({...he,showSyncConfirm:!1,showProgress:!0,progressTitle:"Pushing to CDN",progressState:{current:0,total:N.length,percent:0,status:"processing",message:"Pushing to CDN..."}}));let Q=0;const ue=[];for(let he=0;he<N.length;he++){const pe=N[he];try{const te=await fetch("/api/studio/sync",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({imageKeys:[pe]})});if(te.ok)Q++;else{const Ue=await te.json();ue.push(`${pe}: ${Ue.error||"Unknown error"}`)}}catch(te){ue.push(`${pe}: ${te instanceof Error?te.message:"Unknown error"}`)}C({current:he+1,total:N.length,percent:Math.round((he+1)/N.length*100),status:"processing",message:`Pushed ${pe}`})}C({current:N.length,total:N.length,percent:100,status:ue.length>0?"error":"complete",message:`Pushed ${Q} file${Q!==1?"s":""}${ue.length>0?`, ${ue.length} error${ue.length!==1?"s":""}`:""}`}),ue.length>0&&d("Push Errors",ue.join(`
92
+ `)),r(),o()},[h.actionPaths,r,o,d,C]),W=S.useCallback(async()=>{const P=h.actionPaths,N=h.processMode,Q=P.map(te=>{const Ue=te.replace(/^public\//,"");return Ue.startsWith("/")?Ue:`/${Ue}`}),ue=N==="remove",he=ue?"/api/studio/unprocess-stream":"/api/studio/reprocess-stream",pe=ue?"Removing Thumbnails":"Generating Thumbnails";m(te=>({...te,showProcessConfirm:!1})),await g.execute({endpoint:he,body:{imageKeys:Q},title:pe})},[h.actionPaths,h.processMode,g]),$=S.useCallback(async()=>{const P=h.progressState.orphanedFiles;if(!(!P||P.length===0))try{const N=await fetch("/api/studio/delete-orphans",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({files:P})});if(N.ok)C(Q=>({...Q,orphanedFiles:void 0,message:Q.message?.replace(/Found \d+ orphaned thumbnail\(s\).*/,"Orphaned thumbnails deleted.")})),o();else{const Q=await N.json();d("Delete Failed",Q.error||"Failed to delete orphaned files")}}catch(N){console.error("Delete orphans error:",N),d("Delete Failed","Failed to delete orphaned files. Check console for details.")}},[h.progressState.orphanedFiles,o,d,C]);return{actionState:h,setActionState:m,requestDelete:R,requestMove:k,requestSync:B,requestDownload:Y,requestProcess:U,setProcessMode:G,cancelAction:ie,closeProgress:V,stopProcessing:oe,confirmDelete:ae,confirmMove:ce,confirmSync:X,confirmProcess:W,deleteOrphans:$}}const p2="36px",bt={container:y(ni," display:flex;flex-direction:column;height:100%;background:",u.background,";",""),header:y("display:flex;align-items:center;justify-content:space-between;padding:12px 24px;background:",u.surface,";border-bottom:1px solid ",u.border,";position:relative;",""),titleDropdown:{name:"bjn8wh",styles:"position:relative"},titleButton:y("display:flex;align-items:center;gap:6px;font-size:19px!important;font-weight:600;color:",u.text,";background:transparent;border:none;padding:4px 8px;margin:-4px -8px;border-radius:6px;cursor:pointer;letter-spacing:-0.02em;transition:background 0.15s ease;&:hover{background:",u.surfaceHover,";}",""),titleChevron:y("width:18px;height:18px;color:",u.textSecondary,";transition:transform 0.15s ease;margin-top:2px;stroke-width:2.5;",""),titleChevronOpen:{name:"21xn5r",styles:"transform:rotate(180deg)"},dropdownMenu:y("position:absolute;top:calc(100% + 8px);left:0;background:",u.surface,";border:1px solid ",u.border,";border-radius:8px;box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);min-width:180px;padding:4px;z-index:100;",""),dropdownItem:y("display:block;width:100%;padding:10px 12px;background:transparent;border:none;border-radius:6px;font-size:19px!important;font-weight:600;letter-spacing:-0.02em;color:",u.text,";cursor:pointer;transition:all 0.15s ease;text-align:left;&:hover{background:",u.surfaceHover,";}",""),dropdownItemActive:y("color:",u.primary,";&:hover{background:rgba(99, 91, 255, 0.1);color:",u.primaryHover,";}",""),headerLeft:{name:"16ur2v6",styles:"display:flex;align-items:center;gap:12px;flex:1;min-width:0"},headerCenter:{name:"1fsejhz",styles:"position:absolute;left:50%;transform:translateX(-50%);display:flex;align-items:center;max-width:50%"},breadcrumbs:y("display:flex;align-items:center;gap:6px;font-size:",Z.base,";color:",u.textSecondary,";overflow:hidden;",""),breadcrumbSeparator:y("color:",u.border,";flex-shrink:0;",""),breadcrumbItem:y("color:",u.textSecondary,";text-decoration:none;cursor:pointer;transition:color 0.15s ease;white-space:nowrap;&:hover{color:",u.primary,";}",""),breadcrumbCurrent:y("color:",u.text,";font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;",""),headerIconBtn:y("display:flex;align-items:center;justify-content:center;width:32px;height:32px;color:",u.textMuted,";background:transparent;border:none;border-radius:6px;cursor:pointer;transition:all 0.15s ease;&:hover{color:",u.text,";background:",u.surface,";}",""),headerActions:{name:"1yydxi7",styles:"display:flex;align-items:center;gap:8px"},headerBtn:y("height:",p2,";padding:0 12px;background:",u.surface,";border:1px solid ",u.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{background-color:",u.surfaceHover,";border-color:",u.borderHover,";}",""),headerIcon:y("width:16px;height:16px;color:",u.textSecondary,";",""),content:{name:"1rtaly3",styles:"flex:1;display:flex;overflow:hidden"},fileBrowser:{name:"upomw9",styles:"flex:1;min-width:0;overflow:auto;padding:20px 24px;display:flex;flex-direction:column"},dropOverlay:y("position:absolute;top:0;left:0;right:0;bottom:0;background:rgba(99, 91, 255, 0.1);border:3px dashed ",u.primary,";border-radius:8px;display:flex;align-items:center;justify-content:center;z-index:50;pointer-events:none;",""),dropMessage:y("display:flex;flex-direction:column;align-items:center;gap:12px;color:",u.primary,";font-size:",Z.lg,";font-weight:600;",""),dropIcon:{name:"18jhpep",styles:"width:48px;height:48px"}};function m2({onClose:o,isVisible:r=!0,standaloneMode:f=!1,workspacePath:d,siteUrl:h}){const m=o||(()=>{}),[C,D]=S.useState("public"),[w,g]=S.useState(new Set),[R,k]=S.useState(null),[B,Y]=S.useState("grid"),[U,G]=S.useState(null),[ie,V]=S.useState(null),[oe,ae]=S.useState(!1),[ce,X]=S.useState(0),[W,$]=S.useState(!1),[P,N]=S.useState(""),[Q,ue]=S.useState(null),[he,pe]=S.useState([]),[te,Ue]=S.useState(!1),[E,J]=S.useState("media"),[F,De]=S.useState(!1),Ye=S.useRef(null),v=S.useCallback(()=>{X(de=>de+1)},[]),[L,I]=S.useState(null),le=S.useCallback(de=>{I({path:de,key:Date.now()})},[]);S.useEffect(()=>{if(U&&he.length>0){const de=he.find(rt=>rt.path===U.path);de&&JSON.stringify(de)!==JSON.stringify(U)&&G(de)}},[he,U]);const Ce=S.useCallback(()=>{$(!0)},[]),Ee=S.useCallback(()=>{$(!1)},[]),je=S.useCallback((de,rt)=>{ue({title:de,message:rt})},[]),vt=S.useCallback(()=>{ue(null)},[]),Le=S.useCallback(de=>{de.preventDefault(),de.stopPropagation(),Ue(!0)},[]),nn=S.useCallback(de=>{de.preventDefault(),de.stopPropagation(),Ue(!1)},[]),Je=S.useCallback(async de=>{de.preventDefault(),de.stopPropagation(),Ue(!1);const rt=Array.from(de.dataTransfer.files);if(rt.length!==0&&!(C==="public/images"||C.startsWith("public/images/"))){for(const Gt of rt){const Kt=new FormData;Kt.append("file",Gt),Kt.append("path",C);try{await fetch("/api/studio/upload",{method:"POST",body:Kt})}catch(Pt){console.error("Upload error:",Pt)}}v()}},[C,v]),ut=S.useCallback(()=>{if(C==="public")return;const de=C.split("/");de.pop(),D(de.join("/")||"public"),g(new Set)},[C]),dt=S.useCallback(de=>{D(de),g(new Set),G(null)},[]),jt=S.useCallback(de=>{g(rt=>{const Gt=new Set(rt);return Gt.has(de)?Gt.delete(de):Gt.add(de),Gt}),k(de)},[]),qt=S.useCallback((de,rt,Gt)=>{const Kt=Gt.findIndex(Xe=>Xe.path===de),Pt=Gt.findIndex(Xe=>Xe.path===rt);if(Kt===-1||Pt===-1)return;const Ae=Math.min(Kt,Pt),we=Math.max(Kt,Pt);g(Xe=>{const mt=new Set(Xe);for(let Ne=Ae;Ne<=we;Ne++)mt.add(Gt[Ne].path);return mt}),k(rt)},[]),an=S.useCallback(de=>{g(new Set(de.map(rt=>rt.path)))},[]),Vt=S.useCallback(()=>{g(new Set)},[]),mn=S.useCallback(de=>{G(de)},[]),Se=h2({triggerRefresh:v,clearSelection:Vt,setFocusedItem:mn,showError:je}),lt=S.useCallback(de=>{if(de.key==="Escape"){const rt=de.target;if(rt.tagName==="INPUT"||rt.tagName==="TEXTAREA")return;U?G(null):f||m()}},[m,U,f]);S.useEffect(()=>(r&&(document.addEventListener("keydown",lt),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",lt),document.body.style.overflow=""}),[lt,r]),S.useEffect(()=>{const de=rt=>{Ye.current&&!Ye.current.contains(rt.target)&&De(!1)};return F&&document.addEventListener("mousedown",de),()=>{document.removeEventListener("mousedown",de)}},[F]);const Qt=S.useCallback(()=>{De(de=>!de)},[]),xt=S.useCallback(de=>{J(de),De(!1)},[]),ma={isOpen:!0,openStudio:()=>{},closeStudio:m,toggleStudio:m,currentPath:C,setCurrentPath:dt,navigateUp:ut,selectedItems:w,toggleSelection:jt,selectRange:qt,selectAll:an,clearSelection:Vt,lastSelectedPath:R,viewMode:B,setViewMode:Y,focusedItem:U,setFocusedItem:G,meta:ie,setMeta:V,isLoading:oe,setIsLoading:ae,refreshKey:ce,triggerRefresh:v,editedImageKey:L,setEditedImageKey:le,scanRequested:W,triggerScan:Ce,clearScanRequest:Ee,searchQuery:P,setSearchQuery:N,error:Q,showError:je,clearError:vt,fileItems:he,setFileItems:pe,actionState:Se.actionState,requestDelete:Se.requestDelete,requestMove:Se.requestMove,requestSync:Se.requestSync,requestDownload:Se.requestDownload,requestProcess:Se.requestProcess,setProcessMode:Se.setProcessMode,confirmDelete:Se.confirmDelete,confirmMove:Se.confirmMove,confirmSync:Se.confirmSync,confirmProcess:Se.confirmProcess,cancelAction:Se.cancelAction,closeProgress:Se.closeProgress,stopProcessing:Se.stopProcessing,deleteOrphans:Se.deleteOrphans};return s(Bp.Provider,{value:ma,children:b("div",{css:bt.container,children:[b("div",{css:bt.header,children:[s("div",{css:bt.headerLeft,children:b("div",{css:bt.titleDropdown,ref:Ye,children:[b("button",{css:bt.titleButton,onClick:Qt,children:[s("span",{children:"gallop.studio"}),s(C2,{isOpen:F})]}),F&&b("div",{css:bt.dropdownMenu,children:[s("button",{css:[bt.dropdownItem,E==="media"&&bt.dropdownItemActive,"",""],onClick:()=>xt("media"),children:"media & files"}),s("button",{css:[bt.dropdownItem,E==="fonts"&&bt.dropdownItemActive,"",""],onClick:()=>xt("fonts"),children:"fonts"})]})]})}),s("div",{css:bt.headerCenter,children:s(v2,{currentPath:C,onNavigate:dt,projectName:d?d.split("/").pop():void 0})}),b("div",{css:bt.headerActions,children:[h&&s("a",{href:h,target:"_blank",rel:"noopener noreferrer",css:bt.headerIconBtn,title:`Open ${h}`,children:s(x2,{})}),!f&&s("button",{css:bt.headerBtn,onClick:m,"aria-label":"Close Studio",children:s(S2,{})})]})]}),E==="media"?b(at,{children:[s(S1,{}),b("div",{css:bt.content,onDragOver:Le,onDragLeave:nn,onDrop:Je,children:[te&&s("div",{css:bt.dropOverlay,children:b("div",{css:bt.dropMessage,children:[s("svg",{css:bt.dropIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"})}),s("span",{children:"Drop files to upload"})]})}),s("div",{css:bt.fileBrowser,children:B==="grid"?s(G1,{}):s(Z1,{})})]}),U&&s(u2,{}),s(f2,{}),Se.actionState.showDeleteConfirm&&s(eo,{title:"Delete Files",message:`Are you sure you want to delete ${Se.actionState.actionPaths.length} item${Se.actionState.actionPaths.length!==1?"s":""}? This action cannot be undone.`,confirmLabel:"Delete",variant:"danger",onConfirm:Se.confirmDelete,onCancel:Se.cancelAction}),Se.actionState.showSyncConfirm&&s(eo,{title:"Push to CDN",message:`Push ${Se.actionState.syncImageCount} image${Se.actionState.syncImageCount!==1?"s":""} to Cloudflare R2?${Se.actionState.syncHasRemote?" Remote images will be downloaded first.":""}${Se.actionState.syncHasLocal?" After pushing, local files will be deleted.":""}`,confirmLabel:"Push",onConfirm:Se.confirmSync,onCancel:Se.cancelAction}),Se.actionState.showProcessConfirm&&s(b2,{imageCount:Se.actionState.actionPaths.length,mode:Se.actionState.processMode,onConfirm:Se.confirmProcess,onCancel:Se.cancelAction}),Se.actionState.showMoveModal&&s(jp,{selectedItems:new Set(Se.actionState.actionPaths),currentPath:C,onMove:de=>Se.confirmMove(de),onCancel:Se.cancelAction}),Se.actionState.showProgress&&s(dl,{title:Se.actionState.progressTitle,progress:Se.actionState.progressState,onStop:Se.stopProcessing,onDeleteOrphans:Se.deleteOrphans,onClose:Se.closeProgress})]}):s(w2,{})]})})}var g2={name:"1cm5yut",styles:"display:flex;gap:12px;justify-content:flex-end"},y2={name:"1ca3l8d",styles:"position:fixed;inset:0;background:rgba(0, 0, 0, 0.5);display:flex;align-items:center;justify-content:center;z-index:10000"};function b2({imageCount:o,mode:r,onConfirm:f,onCancel:d}){const h={overlay:y2,container:y("background:",u.surface,";border-radius:12px;padding:24px;max-width:420px;width:90%;box-shadow:0 20px 25px -5px rgba(0, 0, 0, 0.1),0 10px 10px -5px rgba(0, 0, 0, 0.04);",""),title:y("font-size:",Z.lg,";font-weight:600;color:",u.text,";margin:0 0 16px;",""),message:y("font-size:",Z.base,";color:",u.textSecondary,";margin:0 0 20px;line-height:1.5;",""),actions:g2,cancelBtn:y("padding:10px 20px;border:1px solid ",u.border,";border-radius:8px;background:",u.background,";color:",u.text,";font-size:",Z.base,";font-weight:500;cursor:pointer;transition:all 0.15s ease;&:hover{background:",u.surfaceHover,";border-color:",u.borderHover,";}",""),confirmBtn:y("padding:10px 20px;border:none;border-radius:8px;background:",u.primary,";color:white;font-size:",Z.base,";font-weight:500;cursor:pointer;transition:all 0.15s ease;&:hover{background:",u.primaryHover,";}",""),confirmBtnDanger:y("background:",u.danger,";&:hover{background:#dc2626;}","")},m=r==="remove",C=m?"Remove Thumbnails":"Generate Thumbnails",D=m?`Remove generated thumbnails for ${o} image${o!==1?"s":""}? Original images will be kept.`:`Generate thumbnails for ${o} image${o!==1?"s":""}?`,w=m?"Remove":"Generate";return s("div",{css:h.overlay,onClick:d,children:b("div",{css:h.container,onClick:g=>g.stopPropagation(),children:[s("h2",{css:h.title,children:C}),s("p",{css:h.message,children:D}),b("div",{css:h.actions,children:[s("button",{css:h.cancelBtn,onClick:d,children:"Cancel"}),s("button",{css:[h.confirmBtn,m&&h.confirmBtnDanger,"",""],onClick:f,children:w})]})]})})}function v2({currentPath:o,onNavigate:r,projectName:f}){const d=o.split("/").filter(Boolean),h=d.map((m,C)=>({name:C===0&&m==="public"&&f?f:m,path:d.slice(0,C+1).join("/")}));return s("div",{css:bt.breadcrumbs,children:h.map((m,C)=>b("span",{style:{display:"flex",alignItems:"center",gap:6},children:[C>0&&s("span",{css:bt.breadcrumbSeparator,children:"/"}),C===h.length-1?s("span",{css:bt.breadcrumbCurrent,children:m.name}):s("span",{css:bt.breadcrumbItem,onClick:()=>r(m.path),children:m.name})]},m.path))})}function x2(){return b("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[s("circle",{cx:"12",cy:"12",r:"10"}),s("line",{x1:"2",y1:"12",x2:"22",y2:"12"}),s("path",{d:"M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"})]})}function S2(){return b("svg",{css:bt.headerIcon,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[s("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),s("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}function C2({isOpen:o}){return s("svg",{css:[bt.titleChevron,o&&bt.titleChevronOpen,"",""],viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:s("polyline",{points:"6 9 12 15 18 9"})})}const au={container:y("flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px;color:",u.textSecondary,";",""),title:y("font-size:",Z.xl,";font-weight:600;color:",u.text,";margin:0 0 8px;",""),description:y("font-size:",Z.base,";margin:0;","")};function w2(){return b("div",{css:au.container,children:[s("h2",{css:au.title,children:"Fonts"}),s("p",{css:au.description,children:"Font management coming soon."})]})}const Xp=document.getElementById("root");if(!Xp)throw new Error("Root element not found");const z2=window.__STUDIO_WORKSPACE__||"Unknown",M2=window.__STUDIO_SITE_URL__||"";a1.createRoot(Xp).render(s(S.StrictMode,{children:s("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,background:"#0a0a0a"},children:s(m2,{isVisible:!0,standaloneMode:!0,workspacePath:z2,siteUrl:M2})})}));
@@ -11,7 +11,7 @@
11
11
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
12
12
  }
13
13
  </style>
14
- <script type="module" crossorigin src="/assets/index-D6z5xlZG.js"></script>
14
+ <script type="module" crossorigin src="/assets/index-CyMBtvIS.js"></script>
15
15
  <link rel="stylesheet" crossorigin href="/assets/index-DfPQBmNf.css">
16
16
  </head>
17
17
  <body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gallop.software/studio",
3
- "version": "2.3.134",
3
+ "version": "2.3.135",
4
4
  "description": "Standalone media manager - upload, process, and sync images to CDN",
5
5
  "type": "module",
6
6
  "bin": {