@gallop.software/studio 2.3.149 → 2.3.151

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,94 @@
1
+ function Pm(i,s){for(var f=0;f<s.length;f++){const d=s[f];if(typeof d!="string"&&!Array.isArray(d)){for(const h in d)if(h!=="default"&&!(h in i)){const m=Object.getOwnPropertyDescriptor(d,h);m&&Object.defineProperty(i,h,m.get?m:{enumerable:!0,get:()=>d[h]})}}}return Object.freeze(Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}))}(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.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 w of m.addedNodes)w.tagName==="LINK"&&w.rel==="modulepreload"&&d(w)}).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 eg(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var Fc={exports:{}},ni={};var tp;function tg(){if(tp)return ni;tp=1;var i=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function f(d,h,m){var w=null;if(m!==void 0&&(w=""+m),h.key!==void 0&&(w=""+h.key),"key"in h){m={};for(var E in h)E!=="key"&&(m[E]=h[E])}else m=h;return h=m.ref,{$$typeof:i,type:d,key:w,ref:h!==void 0?h:null,props:m}}return ni.Fragment=s,ni.jsx=f,ni.jsxs=f,ni}var np;function ng(){return np||(np=1,Fc.exports=tg()),Fc.exports}var ii=ng(),Jc={exports:{}},Ye={};var ap;function ag(){if(ap)return Ye;ap=1;var i=Symbol.for("react.transitional.element"),s=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"),w=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),z=Symbol.for("react.activity"),U=Symbol.iterator;function q(x){return x===null||typeof x!="object"?null:(x=U&&x[U]||x["@@iterator"],typeof x=="function"?x:null)}var H={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Y=Object.assign,ie={};function Q(x,_,P){this.props=x,this.context=_,this.refs=ie,this.updater=P||H}Q.prototype.isReactComponent={},Q.prototype.setState=function(x,_){if(typeof x!="object"&&typeof x!="function"&&x!=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,x,_,"setState")},Q.prototype.forceUpdate=function(x){this.updater.enqueueForceUpdate(this,x,"forceUpdate")};function ce(){}ce.prototype=Q.prototype;function ae(x,_,P){this.props=x,this.context=_,this.refs=ie,this.updater=P||H}var fe=ae.prototype=new ce;fe.constructor=ae,Y(fe,Q.prototype),fe.isPureReactComponent=!0;var X=Array.isArray;function W(){}var I={H:null,A:null,T:null,S:null},te=Object.prototype.hasOwnProperty;function B(x,_,P){var oe=P.ref;return{$$typeof:i,type:x,key:_,ref:oe!==void 0?oe:null,props:P}}function K(x,_){return B(x.type,_,x.props)}function de(x){return typeof x=="object"&&x!==null&&x.$$typeof===i}function pe(x){var _={"=":"=0",":":"=2"};return"$"+x.replace(/[=:]/g,function(P){return _[P]})}var me=/\/+/g;function ne(x,_){return typeof x=="object"&&x!==null&&x.key!=null?pe(""+x.key):_.toString(36)}function Ae(x){switch(x.status){case"fulfilled":return x.value;case"rejected":throw x.reason;default:switch(typeof x.status=="string"?x.then(W,W):(x.status="pending",x.then(function(_){x.status==="pending"&&(x.status="fulfilled",x.value=_)},function(_){x.status==="pending"&&(x.status="rejected",x.reason=_)})),x.status){case"fulfilled":return x.value;case"rejected":throw x.reason}}throw x}function D(x,_,P,oe,Se){var De=typeof x;(De==="undefined"||De==="boolean")&&(x=null);var Ge=!1;if(x===null)Ge=!0;else switch(De){case"bigint":case"string":case"number":Ge=!0;break;case"object":switch(x.$$typeof){case i:case s:Ge=!0;break;case A:return Ge=x._init,D(Ge(x._payload),_,P,oe,Se)}}if(Ge)return Se=Se(x),Ge=oe===""?"."+ne(x,0):oe,X(Se)?(P="",Ge!=null&&(P=Ge.replace(me,"$&/")+"/"),D(Se,_,P,"",function(Kt){return Kt})):Se!=null&&(de(Se)&&(Se=K(Se,P+(Se.key==null||x&&x.key===Se.key?"":(""+Se.key).replace(me,"$&/")+"/")+Ge)),_.push(Se)),1;Ge=0;var yt=oe===""?".":oe+":";if(X(x))for(var He=0;He<x.length;He++)oe=x[He],De=yt+ne(oe,He),Ge+=D(oe,_,P,De,Se);else if(He=q(x),typeof He=="function")for(x=He.call(x),He=0;!(oe=x.next()).done;)oe=oe.value,De=yt+ne(oe,He++),Ge+=D(oe,_,P,De,Se);else if(De==="object"){if(typeof x.then=="function")return D(Ae(x),_,P,oe,Se);throw _=String(x),Error("Objects are not valid as a React child (found: "+(_==="[object Object]"?"object with keys {"+Object.keys(x).join(", ")+"}":_)+"). If you meant to render a collection of children, use an array instead.")}return Ge}function J(x,_,P){if(x==null)return x;var oe=[],Se=0;return D(x,oe,"","",function(De){return _.call(P,De,Se++)}),oe}function F(x){if(x._status===-1){var _=x._result;_=_(),_.then(function(P){(x._status===0||x._status===-1)&&(x._status=1,x._result=P)},function(P){(x._status===0||x._status===-1)&&(x._status=2,x._result=P)}),x._status===-1&&(x._status=0,x._result=_)}if(x._status===1)return x._result.default;throw x._result}var ke=typeof reportError=="function"?reportError:function(x){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var _=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof x=="object"&&x!==null&&typeof x.message=="string"?String(x.message):String(x),error:x});if(!window.dispatchEvent(_))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",x);return}console.error(x)},qe={map:J,forEach:function(x,_,P){J(x,function(){_.apply(this,arguments)},P)},count:function(x){var _=0;return J(x,function(){_++}),_},toArray:function(x){return J(x,function(_){return _})||[]},only:function(x){if(!de(x))throw Error("React.Children.only expected to receive a single React element child.");return x}};return Ye.Activity=z,Ye.Children=qe,Ye.Component=Q,Ye.Fragment=f,Ye.Profiler=h,Ye.PureComponent=ae,Ye.StrictMode=d,Ye.Suspense=C,Ye.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=I,Ye.__COMPILER_RUNTIME={__proto__:null,c:function(x){return I.H.useMemoCache(x)}},Ye.cache=function(x){return function(){return x.apply(null,arguments)}},Ye.cacheSignal=function(){return null},Ye.cloneElement=function(x,_,P){if(x==null)throw Error("The argument must be a React element, but you passed "+x+".");var oe=Y({},x.props),Se=x.key;if(_!=null)for(De in _.key!==void 0&&(Se=""+_.key),_)!te.call(_,De)||De==="key"||De==="__self"||De==="__source"||De==="ref"&&_.ref===void 0||(oe[De]=_[De]);var De=arguments.length-2;if(De===1)oe.children=P;else if(1<De){for(var Ge=Array(De),yt=0;yt<De;yt++)Ge[yt]=arguments[yt+2];oe.children=Ge}return B(x.type,Se,oe)},Ye.createContext=function(x){return x={$$typeof:w,_currentValue:x,_currentValue2:x,_threadCount:0,Provider:null,Consumer:null},x.Provider=x,x.Consumer={$$typeof:m,_context:x},x},Ye.createElement=function(x,_,P){var oe,Se={},De=null;if(_!=null)for(oe in _.key!==void 0&&(De=""+_.key),_)te.call(_,oe)&&oe!=="key"&&oe!=="__self"&&oe!=="__source"&&(Se[oe]=_[oe]);var Ge=arguments.length-2;if(Ge===1)Se.children=P;else if(1<Ge){for(var yt=Array(Ge),He=0;He<Ge;He++)yt[He]=arguments[He+2];Se.children=yt}if(x&&x.defaultProps)for(oe in Ge=x.defaultProps,Ge)Se[oe]===void 0&&(Se[oe]=Ge[oe]);return B(x,De,Se)},Ye.createRef=function(){return{current:null}},Ye.forwardRef=function(x){return{$$typeof:E,render:x}},Ye.isValidElement=de,Ye.lazy=function(x){return{$$typeof:A,_payload:{_status:-1,_result:x},_init:F}},Ye.memo=function(x,_){return{$$typeof:g,type:x,compare:_===void 0?null:_}},Ye.startTransition=function(x){var _=I.T,P={};I.T=P;try{var oe=x(),Se=I.S;Se!==null&&Se(P,oe),typeof oe=="object"&&oe!==null&&typeof oe.then=="function"&&oe.then(W,ke)}catch(De){ke(De)}finally{_!==null&&P.types!==null&&(_.types=P.types),I.T=_}},Ye.unstable_useCacheRefresh=function(){return I.H.useCacheRefresh()},Ye.use=function(x){return I.H.use(x)},Ye.useActionState=function(x,_,P){return I.H.useActionState(x,_,P)},Ye.useCallback=function(x,_){return I.H.useCallback(x,_)},Ye.useContext=function(x){return I.H.useContext(x)},Ye.useDebugValue=function(){},Ye.useDeferredValue=function(x,_){return I.H.useDeferredValue(x,_)},Ye.useEffect=function(x,_){return I.H.useEffect(x,_)},Ye.useEffectEvent=function(x){return I.H.useEffectEvent(x)},Ye.useId=function(){return I.H.useId()},Ye.useImperativeHandle=function(x,_,P){return I.H.useImperativeHandle(x,_,P)},Ye.useInsertionEffect=function(x,_){return I.H.useInsertionEffect(x,_)},Ye.useLayoutEffect=function(x,_){return I.H.useLayoutEffect(x,_)},Ye.useMemo=function(x,_){return I.H.useMemo(x,_)},Ye.useOptimistic=function(x,_){return I.H.useOptimistic(x,_)},Ye.useReducer=function(x,_,P){return I.H.useReducer(x,_,P)},Ye.useRef=function(x){return I.H.useRef(x)},Ye.useState=function(x){return I.H.useState(x)},Ye.useSyncExternalStore=function(x,_,P){return I.H.useSyncExternalStore(x,_,P)},Ye.useTransition=function(){return I.H.useTransition()},Ye.version="19.2.4",Ye}var lp;function su(){return lp||(lp=1,Jc.exports=ag()),Jc.exports}var v=su();const ut=eg(v),op=Pm({__proto__:null,default:ut},[v]);function lg(i){if(i.sheet)return i.sheet;for(var s=0;s<document.styleSheets.length;s++)if(document.styleSheets[s].ownerNode===i)return document.styleSheets[s]}function og(i){var s=document.createElement("style");return s.setAttribute("data-emotion",i.key),i.nonce!==void 0&&s.setAttribute("nonce",i.nonce),s.appendChild(document.createTextNode("")),s.setAttribute("data-s",""),s}var ig=(function(){function i(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 s=i.prototype;return s.hydrate=function(d){d.forEach(this._insertTag)},s.insert=function(d){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(og(this));var h=this.tags[this.tags.length-1];if(this.isSpeedy){var m=lg(h);try{m.insertRule(d,m.cssRules.length)}catch{}}else h.appendChild(document.createTextNode(d));this.ctr++},s.flush=function(){this.tags.forEach(function(d){var h;return(h=d.parentNode)==null?void 0:h.removeChild(d)}),this.tags=[],this.ctr=0},i})(),tn="-ms-",_r="-moz-",rt="-webkit-",Dp="comm",cu="rule",uu="decl",rg="@import",Ep="@keyframes",sg="@layer",cg=Math.abs,Hr=String.fromCharCode,ug=Object.assign;function dg(i,s){return It(i,0)^45?(((s<<2^It(i,0))<<2^It(i,1))<<2^It(i,2))<<2^It(i,3):0}function Tp(i){return i.trim()}function fg(i,s){return(i=s.exec(i))?i[0]:i}function st(i,s,f){return i.replace(s,f)}function ou(i,s){return i.indexOf(s)}function It(i,s){return i.charCodeAt(s)|0}function ri(i,s,f){return i.slice(s,f)}function Zn(i){return i.length}function du(i){return i.length}function Tr(i,s){return s.push(i),i}function hg(i,s){return i.map(s).join("")}var Ur=1,lo=1,Ap=0,fn=0,Yt=0,io="";function Br(i,s,f,d,h,m,w){return{value:i,root:s,parent:f,type:d,props:h,children:m,line:Ur,column:lo,length:w,return:""}}function ai(i,s){return ug(Br("",null,null,"",null,null,0),i,{length:-i.length},s)}function pg(){return Yt}function mg(){return Yt=fn>0?It(io,--fn):0,lo--,Yt===10&&(lo=1,Ur--),Yt}function Cn(){return Yt=fn<Ap?It(io,fn++):0,lo++,Yt===10&&(lo=1,Ur++),Yt}function Jn(){return It(io,fn)}function Ar(){return fn}function ui(i,s){return ri(io,i,s)}function si(i){switch(i){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 Rp(i){return Ur=lo=1,Ap=Zn(io=i),fn=0,[]}function Lp(i){return io="",i}function Rr(i){return Tp(ui(fn-1,iu(i===91?i+2:i===40?i+1:i)))}function gg(i){for(;(Yt=Jn())&&Yt<33;)Cn();return si(i)>2||si(Yt)>3?"":" "}function yg(i,s){for(;--s&&Cn()&&!(Yt<48||Yt>102||Yt>57&&Yt<65||Yt>70&&Yt<97););return ui(i,Ar()+(s<6&&Jn()==32&&Cn()==32))}function iu(i){for(;Cn();)switch(Yt){case i:return fn;case 34:case 39:i!==34&&i!==39&&iu(Yt);break;case 40:i===41&&iu(i);break;case 92:Cn();break}return fn}function bg(i,s){for(;Cn()&&i+Yt!==57;)if(i+Yt===84&&Jn()===47)break;return"/*"+ui(s,fn-1)+"*"+Hr(i===47?i:Cn())}function vg(i){for(;!si(Jn());)Cn();return ui(i,fn)}function xg(i){return Lp(Lr("",null,null,null,[""],i=Rp(i),0,[0],i))}function Lr(i,s,f,d,h,m,w,E,C){for(var g=0,A=0,z=w,U=0,q=0,H=0,Y=1,ie=1,Q=1,ce=0,ae="",fe=h,X=m,W=d,I=ae;ie;)switch(H=ce,ce=Cn()){case 40:if(H!=108&&It(I,z-1)==58){ou(I+=st(Rr(ce),"&","&\f"),"&\f")!=-1&&(Q=-1);break}case 34:case 39:case 91:I+=Rr(ce);break;case 9:case 10:case 13:case 32:I+=gg(H);break;case 92:I+=yg(Ar()-1,7);continue;case 47:switch(Jn()){case 42:case 47:Tr(Sg(bg(Cn(),Ar()),s,f),C);break;default:I+="/"}break;case 123*Y:E[g++]=Zn(I)*Q;case 125*Y:case 59:case 0:switch(ce){case 0:case 125:ie=0;case 59+A:Q==-1&&(I=st(I,/\f/g,"")),q>0&&Zn(I)-z&&Tr(q>32?rp(I+";",d,f,z-1):rp(st(I," ","")+";",d,f,z-2),C);break;case 59:I+=";";default:if(Tr(W=ip(I,s,f,g,A,h,E,ae,fe=[],X=[],z),m),ce===123)if(A===0)Lr(I,s,W,W,fe,m,z,E,X);else switch(U===99&&It(I,3)===110?100:U){case 100:case 108:case 109:case 115:Lr(i,W,W,d&&Tr(ip(i,W,W,0,0,h,E,ae,h,fe=[],z),X),h,X,z,E,d?fe:X);break;default:Lr(I,W,W,W,[""],X,0,E,X)}}g=A=q=0,Y=Q=1,ae=I="",z=w;break;case 58:z=1+Zn(I),q=H;default:if(Y<1){if(ce==123)--Y;else if(ce==125&&Y++==0&&mg()==125)continue}switch(I+=Hr(ce),ce*Y){case 38:Q=A>0?1:(I+="\f",-1);break;case 44:E[g++]=(Zn(I)-1)*Q,Q=1;break;case 64:Jn()===45&&(I+=Rr(Cn())),U=Jn(),A=z=Zn(ae=I+=vg(Ar())),ce++;break;case 45:H===45&&Zn(I)==2&&(Y=0)}}return m}function ip(i,s,f,d,h,m,w,E,C,g,A){for(var z=h-1,U=h===0?m:[""],q=du(U),H=0,Y=0,ie=0;H<d;++H)for(var Q=0,ce=ri(i,z+1,z=cg(Y=w[H])),ae=i;Q<q;++Q)(ae=Tp(Y>0?U[Q]+" "+ce:st(ce,/&\f/g,U[Q])))&&(C[ie++]=ae);return Br(i,s,f,h===0?cu:E,C,g,A)}function Sg(i,s,f){return Br(i,s,f,Dp,Hr(pg()),ri(i,2,-2),0)}function rp(i,s,f,d){return Br(i,s,f,uu,ri(i,0,d),ri(i,d+1,-1),d)}function no(i,s){for(var f="",d=du(i),h=0;h<d;h++)f+=s(i[h],h,i,s)||"";return f}function Cg(i,s,f,d){switch(i.type){case sg:if(i.children.length)break;case rg:case uu:return i.return=i.return||i.value;case Dp:return"";case Ep:return i.return=i.value+"{"+no(i.children,d)+"}";case cu:i.value=i.props.join(",")}return Zn(f=no(i.children,d))?i.return=i.value+"{"+f+"}":""}function wg(i){var s=du(i);return function(f,d,h,m){for(var w="",E=0;E<s;E++)w+=i[E](f,d,h,m)||"";return w}}function kg(i){return function(s){s.root||(s=s.return)&&i(s)}}function zg(i){var s=Object.create(null);return function(f){return s[f]===void 0&&(s[f]=i(f)),s[f]}}var Mg=function(s,f,d){for(var h=0,m=0;h=m,m=Jn(),h===38&&m===12&&(f[d]=1),!si(m);)Cn();return ui(s,fn)},Dg=function(s,f){var d=-1,h=44;do switch(si(h)){case 0:h===38&&Jn()===12&&(f[d]=1),s[d]+=Mg(fn-1,f,d);break;case 2:s[d]+=Rr(h);break;case 4:if(h===44){s[++d]=Jn()===58?"&\f":"",f[d]=s[d].length;break}default:s[d]+=Hr(h)}while(h=Cn());return s},Eg=function(s,f){return Lp(Dg(Rp(s),f))},sp=new WeakMap,Tg=function(s){if(!(s.type!=="rule"||!s.parent||s.length<1)){for(var f=s.value,d=s.parent,h=s.column===d.column&&s.line===d.line;d.type!=="rule";)if(d=d.parent,!d)return;if(!(s.props.length===1&&f.charCodeAt(0)!==58&&!sp.get(d))&&!h){sp.set(s,!0);for(var m=[],w=Eg(f,m),E=d.props,C=0,g=0;C<w.length;C++)for(var A=0;A<E.length;A++,g++)s.props[g]=m[C]?w[C].replace(/&\f/g,E[A]):E[A]+" "+w[C]}}},Ag=function(s){if(s.type==="decl"){var f=s.value;f.charCodeAt(0)===108&&f.charCodeAt(2)===98&&(s.return="",s.value="")}};function _p(i,s){switch(dg(i,s)){case 5103:return rt+"print-"+i+i;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 rt+i+i;case 5349:case 4246:case 4810:case 6968:case 2756:return rt+i+_r+i+tn+i+i;case 6828:case 4268:return rt+i+tn+i+i;case 6165:return rt+i+tn+"flex-"+i+i;case 5187:return rt+i+st(i,/(\w+).+(:[^]+)/,rt+"box-$1$2"+tn+"flex-$1$2")+i;case 5443:return rt+i+tn+"flex-item-"+st(i,/flex-|-self/,"")+i;case 4675:return rt+i+tn+"flex-line-pack"+st(i,/align-content|flex-|-self/,"")+i;case 5548:return rt+i+tn+st(i,"shrink","negative")+i;case 5292:return rt+i+tn+st(i,"basis","preferred-size")+i;case 6060:return rt+"box-"+st(i,"-grow","")+rt+i+tn+st(i,"grow","positive")+i;case 4554:return rt+st(i,/([^-])(transform)/g,"$1"+rt+"$2")+i;case 6187:return st(st(st(i,/(zoom-|grab)/,rt+"$1"),/(image-set)/,rt+"$1"),i,"")+i;case 5495:case 3959:return st(i,/(image-set\([^]*)/,rt+"$1$`$1");case 4968:return st(st(i,/(.+:)(flex-)?(.*)/,rt+"box-pack:$3"+tn+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+rt+i+i;case 4095:case 3583:case 4068:case 2532:return st(i,/(.+)-inline(.+)/,rt+"$1$2")+i;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(Zn(i)-1-s>6)switch(It(i,s+1)){case 109:if(It(i,s+4)!==45)break;case 102:return st(i,/(.+:)(.+)-([^]+)/,"$1"+rt+"$2-$3$1"+_r+(It(i,s+3)==108?"$3":"$2-$3"))+i;case 115:return~ou(i,"stretch")?_p(st(i,"stretch","fill-available"),s)+i:i}break;case 4949:if(It(i,s+1)!==115)break;case 6444:switch(It(i,Zn(i)-3-(~ou(i,"!important")&&10))){case 107:return st(i,":",":"+rt)+i;case 101:return st(i,/(.+:)([^;!]+)(;|!.+)?/,"$1"+rt+(It(i,14)===45?"inline-":"")+"box$3$1"+rt+"$2$3$1"+tn+"$2box$3")+i}break;case 5936:switch(It(i,s+11)){case 114:return rt+i+tn+st(i,/[svh]\w+-[tblr]{2}/,"tb")+i;case 108:return rt+i+tn+st(i,/[svh]\w+-[tblr]{2}/,"tb-rl")+i;case 45:return rt+i+tn+st(i,/[svh]\w+-[tblr]{2}/,"lr")+i}return rt+i+tn+i+i}return i}var Rg=function(s,f,d,h){if(s.length>-1&&!s.return)switch(s.type){case uu:s.return=_p(s.value,s.length);break;case Ep:return no([ai(s,{value:st(s.value,"@","@"+rt)})],h);case cu:if(s.length)return hg(s.props,function(m){switch(fg(m,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return no([ai(s,{props:[st(m,/:(read-\w+)/,":"+_r+"$1")]})],h);case"::placeholder":return no([ai(s,{props:[st(m,/:(plac\w+)/,":"+rt+"input-$1")]}),ai(s,{props:[st(m,/:(plac\w+)/,":"+_r+"$1")]}),ai(s,{props:[st(m,/:(plac\w+)/,tn+"input-$1")]})],h)}return""})}},Lg=[Rg],_g=function(s){var f=s.key;if(f==="css"){var d=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(d,function(Y){var ie=Y.getAttribute("data-emotion");ie.indexOf(" ")!==-1&&(document.head.appendChild(Y),Y.setAttribute("data-s",""))})}var h=s.stylisPlugins||Lg,m={},w,E=[];w=s.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+f+' "]'),function(Y){for(var ie=Y.getAttribute("data-emotion").split(" "),Q=1;Q<ie.length;Q++)m[ie[Q]]=!0;E.push(Y)});var C,g=[Tg,Ag];{var A,z=[Cg,kg(function(Y){A.insert(Y)})],U=wg(g.concat(h,z)),q=function(ie){return no(xg(ie),U)};C=function(ie,Q,ce,ae){A=ce,q(ie?ie+"{"+Q.styles+"}":Q.styles),ae&&(H.inserted[Q.name]=!0)}}var H={key:f,sheet:new ig({key:f,container:w,nonce:s.nonce,speedy:s.speedy,prepend:s.prepend,insertionPoint:s.insertionPoint}),nonce:s.nonce,inserted:m,registered:{},insert:C};return H.sheet.hydrate(E),H},$c={exports:{}},ct={};var cp;function Og(){if(cp)return ct;cp=1;var i=typeof Symbol=="function"&&Symbol.for,s=i?Symbol.for("react.element"):60103,f=i?Symbol.for("react.portal"):60106,d=i?Symbol.for("react.fragment"):60107,h=i?Symbol.for("react.strict_mode"):60108,m=i?Symbol.for("react.profiler"):60114,w=i?Symbol.for("react.provider"):60109,E=i?Symbol.for("react.context"):60110,C=i?Symbol.for("react.async_mode"):60111,g=i?Symbol.for("react.concurrent_mode"):60111,A=i?Symbol.for("react.forward_ref"):60112,z=i?Symbol.for("react.suspense"):60113,U=i?Symbol.for("react.suspense_list"):60120,q=i?Symbol.for("react.memo"):60115,H=i?Symbol.for("react.lazy"):60116,Y=i?Symbol.for("react.block"):60121,ie=i?Symbol.for("react.fundamental"):60117,Q=i?Symbol.for("react.responder"):60118,ce=i?Symbol.for("react.scope"):60119;function ae(X){if(typeof X=="object"&&X!==null){var W=X.$$typeof;switch(W){case s:switch(X=X.type,X){case C:case g:case d:case m:case h:case z:return X;default:switch(X=X&&X.$$typeof,X){case E:case A:case H:case q:case w:return X;default:return W}}case f:return W}}}function fe(X){return ae(X)===g}return ct.AsyncMode=C,ct.ConcurrentMode=g,ct.ContextConsumer=E,ct.ContextProvider=w,ct.Element=s,ct.ForwardRef=A,ct.Fragment=d,ct.Lazy=H,ct.Memo=q,ct.Portal=f,ct.Profiler=m,ct.StrictMode=h,ct.Suspense=z,ct.isAsyncMode=function(X){return fe(X)||ae(X)===C},ct.isConcurrentMode=fe,ct.isContextConsumer=function(X){return ae(X)===E},ct.isContextProvider=function(X){return ae(X)===w},ct.isElement=function(X){return typeof X=="object"&&X!==null&&X.$$typeof===s},ct.isForwardRef=function(X){return ae(X)===A},ct.isFragment=function(X){return ae(X)===d},ct.isLazy=function(X){return ae(X)===H},ct.isMemo=function(X){return ae(X)===q},ct.isPortal=function(X){return ae(X)===f},ct.isProfiler=function(X){return ae(X)===m},ct.isStrictMode=function(X){return ae(X)===h},ct.isSuspense=function(X){return ae(X)===z},ct.isValidElementType=function(X){return typeof X=="string"||typeof X=="function"||X===d||X===g||X===m||X===h||X===z||X===U||typeof X=="object"&&X!==null&&(X.$$typeof===H||X.$$typeof===q||X.$$typeof===w||X.$$typeof===E||X.$$typeof===A||X.$$typeof===ie||X.$$typeof===Q||X.$$typeof===ce||X.$$typeof===Y)},ct.typeOf=ae,ct}var up;function Hg(){return up||(up=1,$c.exports=Og()),$c.exports}var Wc,dp;function Ug(){if(dp)return Wc;dp=1;var i=Hg(),s={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[i.ForwardRef]=d,m[i.Memo]=h;function w(H){return i.isMemo(H)?h:m[H.$$typeof]||s}var E=Object.defineProperty,C=Object.getOwnPropertyNames,g=Object.getOwnPropertySymbols,A=Object.getOwnPropertyDescriptor,z=Object.getPrototypeOf,U=Object.prototype;function q(H,Y,ie){if(typeof Y!="string"){if(U){var Q=z(Y);Q&&Q!==U&&q(H,Q,ie)}var ce=C(Y);g&&(ce=ce.concat(g(Y)));for(var ae=w(H),fe=w(Y),X=0;X<ce.length;++X){var W=ce[X];if(!f[W]&&!(ie&&ie[W])&&!(fe&&fe[W])&&!(ae&&ae[W])){var I=A(Y,W);try{E(H,W,I)}catch{}}}}return H}return Wc=q,Wc}Ug();var Bg=!0;function Ng(i,s,f){var d="";return f.split(" ").forEach(function(h){i[h]!==void 0?s.push(i[h]+";"):h&&(d+=h+" ")}),d}var Op=function(s,f,d){var h=s.key+"-"+f.name;(d===!1||Bg===!1)&&s.registered[h]===void 0&&(s.registered[h]=f.styles)},jg=function(s,f,d){Op(s,f,d);var h=s.key+"-"+f.name;if(s.inserted[f.name]===void 0){var m=f;do s.insert(f===m?"."+h:"",m,s.sheet,!0),m=m.next;while(m!==void 0)}};function qg(i){for(var s=0,f,d=0,h=i.length;h>=4;++d,h-=4)f=i.charCodeAt(d)&255|(i.charCodeAt(++d)&255)<<8|(i.charCodeAt(++d)&255)<<16|(i.charCodeAt(++d)&255)<<24,f=(f&65535)*1540483477+((f>>>16)*59797<<16),f^=f>>>24,s=(f&65535)*1540483477+((f>>>16)*59797<<16)^(s&65535)*1540483477+((s>>>16)*59797<<16);switch(h){case 3:s^=(i.charCodeAt(d+2)&255)<<16;case 2:s^=(i.charCodeAt(d+1)&255)<<8;case 1:s^=i.charCodeAt(d)&255,s=(s&65535)*1540483477+((s>>>16)*59797<<16)}return s^=s>>>13,s=(s&65535)*1540483477+((s>>>16)*59797<<16),((s^s>>>15)>>>0).toString(36)}var Yg={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},Gg=/[A-Z]|^ms/g,Xg=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Hp=function(s){return s.charCodeAt(1)===45},fp=function(s){return s!=null&&typeof s!="boolean"},Ic=zg(function(i){return Hp(i)?i:i.replace(Gg,"-$&").toLowerCase()}),hp=function(s,f){switch(s){case"animation":case"animationName":if(typeof f=="string")return f.replace(Xg,function(d,h,m){return Fn={name:h,styles:m,next:Fn},h})}return Yg[s]!==1&&!Hp(s)&&typeof f=="number"&&f!==0?f+"px":f};function ci(i,s,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 Fn={name:h.name,styles:h.styles,next:Fn},h.name;var m=f;if(m.styles!==void 0){var w=m.next;if(w!==void 0)for(;w!==void 0;)Fn={name:w.name,styles:w.styles,next:Fn},w=w.next;var E=m.styles+";";return E}return Vg(i,s,f)}case"function":{if(i!==void 0){var C=Fn,g=f(i);return Fn=C,ci(i,s,g)}break}}var A=f;return A}function Vg(i,s,f){var d="";if(Array.isArray(f))for(var h=0;h<f.length;h++)d+=ci(i,s,f[h])+";";else for(var m in f){var w=f[m];if(typeof w!="object"){var E=w;fp(E)&&(d+=Ic(m)+":"+hp(m,E)+";")}else if(Array.isArray(w)&&typeof w[0]=="string"&&s==null)for(var C=0;C<w.length;C++)fp(w[C])&&(d+=Ic(m)+":"+hp(m,w[C])+";");else{var g=ci(i,s,w);switch(m){case"animation":case"animationName":{d+=Ic(m)+":"+g+";";break}default:d+=m+"{"+g+"}"}}}return d}var pp=/label:\s*([^\s;{]+)\s*(;|$)/g,Fn;function Up(i,s,f){if(i.length===1&&typeof i[0]=="object"&&i[0]!==null&&i[0].styles!==void 0)return i[0];var d=!0,h="";Fn=void 0;var m=i[0];if(m==null||m.raw===void 0)d=!1,h+=ci(f,s,m);else{var w=m;h+=w[0]}for(var E=1;E<i.length;E++)if(h+=ci(f,s,i[E]),d){var C=m;h+=C[E]}pp.lastIndex=0;for(var g="",A;(A=pp.exec(h))!==null;)g+="-"+A[1];var z=qg(h)+g;return{name:z,styles:h,next:Fn}}var Qg=function(s){return s()},Kg=op.useInsertionEffect?op.useInsertionEffect:!1,Zg=Kg||Qg,Bp=v.createContext(typeof HTMLElement<"u"?_g({key:"css"}):null);Bp.Provider;var Fg=function(s){return v.forwardRef(function(f,d){var h=v.useContext(Bp);return s(f,h,d)})},Jg=v.createContext({}),di={}.hasOwnProperty,ru="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",fu=function(s,f){var d={};for(var h in f)di.call(f,h)&&(d[h]=f[h]);return d[ru]=s,d},$g=function(s){var f=s.cache,d=s.serialized,h=s.isStringTag;return Op(f,d,h),Zg(function(){return jg(f,d,h)}),null},Wg=Fg(function(i,s,f){var d=i.css;typeof d=="string"&&s.registered[d]!==void 0&&(d=s.registered[d]);var h=i[ru],m=[d],w="";typeof i.className=="string"?w=Ng(s.registered,m,i.className):i.className!=null&&(w=i.className+" ");var E=Up(m,void 0,v.useContext(Jg));w+=s.key+"-"+E.name;var C={};for(var g in i)di.call(i,g)&&g!=="css"&&g!==ru&&(C[g]=i[g]);return C.className=w,f&&(C.ref=f),v.createElement(v.Fragment,null,v.createElement($g,{cache:s,serialized:E,isStringTag:typeof h=="string"}),v.createElement(h,C))}),hu=Wg,tt=ii.Fragment,r=function(s,f,d){return di.call(f,"css")?ii.jsx(hu,fu(s,f),d):ii.jsx(s,f,d)},b=function(s,f,d){return di.call(f,"css")?ii.jsxs(hu,fu(s,f),d):ii.jsxs(s,f,d)},Pc={exports:{}},li={},eu={exports:{}},tu={};var mp;function Ig(){return mp||(mp=1,(function(i){function s(D,J){var F=D.length;D.push(J);e:for(;0<F;){var ke=F-1>>>1,qe=D[ke];if(0<h(qe,J))D[ke]=J,D[F]=qe,F=ke;else break e}}function f(D){return D.length===0?null:D[0]}function d(D){if(D.length===0)return null;var J=D[0],F=D.pop();if(F!==J){D[0]=F;e:for(var ke=0,qe=D.length,x=qe>>>1;ke<x;){var _=2*(ke+1)-1,P=D[_],oe=_+1,Se=D[oe];if(0>h(P,F))oe<qe&&0>h(Se,P)?(D[ke]=Se,D[oe]=F,ke=oe):(D[ke]=P,D[_]=F,ke=_);else if(oe<qe&&0>h(Se,F))D[ke]=Se,D[oe]=F,ke=oe;else break e}}return J}function h(D,J){var F=D.sortIndex-J.sortIndex;return F!==0?F:D.id-J.id}if(i.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var m=performance;i.unstable_now=function(){return m.now()}}else{var w=Date,E=w.now();i.unstable_now=function(){return w.now()-E}}var C=[],g=[],A=1,z=null,U=3,q=!1,H=!1,Y=!1,ie=!1,Q=typeof setTimeout=="function"?setTimeout:null,ce=typeof clearTimeout=="function"?clearTimeout:null,ae=typeof setImmediate<"u"?setImmediate:null;function fe(D){for(var J=f(g);J!==null;){if(J.callback===null)d(g);else if(J.startTime<=D)d(g),J.sortIndex=J.expirationTime,s(C,J);else break;J=f(g)}}function X(D){if(Y=!1,fe(D),!H)if(f(C)!==null)H=!0,W||(W=!0,pe());else{var J=f(g);J!==null&&Ae(X,J.startTime-D)}}var W=!1,I=-1,te=5,B=-1;function K(){return ie?!0:!(i.unstable_now()-B<te)}function de(){if(ie=!1,W){var D=i.unstable_now();B=D;var J=!0;try{e:{H=!1,Y&&(Y=!1,ce(I),I=-1),q=!0;var F=U;try{t:{for(fe(D),z=f(C);z!==null&&!(z.expirationTime>D&&K());){var ke=z.callback;if(typeof ke=="function"){z.callback=null,U=z.priorityLevel;var qe=ke(z.expirationTime<=D);if(D=i.unstable_now(),typeof qe=="function"){z.callback=qe,fe(D),J=!0;break t}z===f(C)&&d(C),fe(D)}else d(C);z=f(C)}if(z!==null)J=!0;else{var x=f(g);x!==null&&Ae(X,x.startTime-D),J=!1}}break e}finally{z=null,U=F,q=!1}J=void 0}}finally{J?pe():W=!1}}}var pe;if(typeof ae=="function")pe=function(){ae(de)};else if(typeof MessageChannel<"u"){var me=new MessageChannel,ne=me.port2;me.port1.onmessage=de,pe=function(){ne.postMessage(null)}}else pe=function(){Q(de,0)};function Ae(D,J){I=Q(function(){D(i.unstable_now())},J)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(D){D.callback=null},i.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):te=0<D?Math.floor(1e3/D):5},i.unstable_getCurrentPriorityLevel=function(){return U},i.unstable_next=function(D){switch(U){case 1:case 2:case 3:var J=3;break;default:J=U}var F=U;U=J;try{return D()}finally{U=F}},i.unstable_requestPaint=function(){ie=!0},i.unstable_runWithPriority=function(D,J){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var F=U;U=D;try{return J()}finally{U=F}},i.unstable_scheduleCallback=function(D,J,F){var ke=i.unstable_now();switch(typeof F=="object"&&F!==null?(F=F.delay,F=typeof F=="number"&&0<F?ke+F:ke):F=ke,D){case 1:var qe=-1;break;case 2:qe=250;break;case 5:qe=1073741823;break;case 4:qe=1e4;break;default:qe=5e3}return qe=F+qe,D={id:A++,callback:J,priorityLevel:D,startTime:F,expirationTime:qe,sortIndex:-1},F>ke?(D.sortIndex=F,s(g,D),f(C)===null&&D===f(g)&&(Y?(ce(I),I=-1):Y=!0,Ae(X,F-ke))):(D.sortIndex=qe,s(C,D),H||q||(H=!0,W||(W=!0,pe()))),D},i.unstable_shouldYield=K,i.unstable_wrapCallback=function(D){var J=U;return function(){var F=U;U=J;try{return D.apply(this,arguments)}finally{U=F}}}})(tu)),tu}var gp;function Pg(){return gp||(gp=1,eu.exports=Ig()),eu.exports}var nu={exports:{}},en={};var yp;function e1(){if(yp)return en;yp=1;var i=su();function s(C){var g="https://react.dev/errors/"+C;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var A=2;A<arguments.length;A++)g+="&args[]="+encodeURIComponent(arguments[A])}return"Minified React error #"+C+"; 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(s(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(C,g,A){var z=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:h,key:z==null?null:""+z,children:C,containerInfo:g,implementation:A}}var w=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function E(C,g){if(C==="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(C,g){var A=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(s(299));return m(C,g,null,A)},en.flushSync=function(C){var g=w.T,A=d.p;try{if(w.T=null,d.p=2,C)return C()}finally{w.T=g,d.p=A,d.d.f()}},en.preconnect=function(C,g){typeof C=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,d.d.C(C,g))},en.prefetchDNS=function(C){typeof C=="string"&&d.d.D(C)},en.preinit=function(C,g){if(typeof C=="string"&&g&&typeof g.as=="string"){var A=g.as,z=E(A,g.crossOrigin),U=typeof g.integrity=="string"?g.integrity:void 0,q=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;A==="style"?d.d.S(C,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:z,integrity:U,fetchPriority:q}):A==="script"&&d.d.X(C,{crossOrigin:z,integrity:U,fetchPriority:q,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},en.preinitModule=function(C,g){if(typeof C=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var A=E(g.as,g.crossOrigin);d.d.M(C,{crossOrigin:A,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&d.d.M(C)},en.preload=function(C,g){if(typeof C=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var A=g.as,z=E(A,g.crossOrigin);d.d.L(C,A,{crossOrigin:z,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(C,g){if(typeof C=="string")if(g){var A=E(g.as,g.crossOrigin);d.d.m(C,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:A,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else d.d.m(C)},en.requestFormReset=function(C){d.d.r(C)},en.unstable_batchedUpdates=function(C,g){return C(g)},en.useFormState=function(C,g,A){return w.H.useFormState(C,g,A)},en.useFormStatus=function(){return w.H.useHostTransitionStatus()},en.version="19.2.4",en}var bp;function t1(){if(bp)return nu.exports;bp=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(s){console.error(s)}}return i(),nu.exports=e1(),nu.exports}var vp;function n1(){if(vp)return li;vp=1;var i=Pg(),s=su(),f=t1();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 w(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 E(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 C(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 o=l.alternate;if(o===null){if(a=l.return,a!==null){n=a;continue}break}if(l.child===o.child){for(o=l.child;o;){if(o===n)return C(l),e;if(o===a)return C(l),t;o=o.sibling}throw Error(d(188))}if(n.return!==a.return)n=l,a=o;else{for(var c=!1,p=l.child;p;){if(p===n){c=!0,n=l,a=o;break}if(p===a){c=!0,a=l,n=o;break}p=p.sibling}if(!c){for(p=o.child;p;){if(p===n){c=!0,n=o,a=l;break}if(p===a){c=!0,a=o,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 A(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=A(e),t!==null)return t;e=e.sibling}return null}var z=Object.assign,U=Symbol.for("react.element"),q=Symbol.for("react.transitional.element"),H=Symbol.for("react.portal"),Y=Symbol.for("react.fragment"),ie=Symbol.for("react.strict_mode"),Q=Symbol.for("react.profiler"),ce=Symbol.for("react.consumer"),ae=Symbol.for("react.context"),fe=Symbol.for("react.forward_ref"),X=Symbol.for("react.suspense"),W=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),te=Symbol.for("react.lazy"),B=Symbol.for("react.activity"),K=Symbol.for("react.memo_cache_sentinel"),de=Symbol.iterator;function pe(e){return e===null||typeof e!="object"?null:(e=de&&e[de]||e["@@iterator"],typeof e=="function"?e:null)}var me=Symbol.for("react.client.reference");function ne(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===me?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Y:return"Fragment";case Q:return"Profiler";case ie:return"StrictMode";case X:return"Suspense";case W:return"SuspenseList";case B:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case H:return"Portal";case ae:return e.displayName||"Context";case ce:return(e._context.displayName||"Context")+".Consumer";case fe:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case I:return t=e.displayName||null,t!==null?t:ne(e.type)||"Memo";case te:t=e._payload,e=e._init;try{return ne(e(t))}catch{}}return null}var Ae=Array.isArray,D=s.__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},ke=[],qe=-1;function x(e){return{current:e}}function _(e){0>qe||(e.current=ke[qe],ke[qe]=null,qe--)}function P(e,t){qe++,ke[qe]=e.current,e.current=t}var oe=x(null),Se=x(null),De=x(null),Ge=x(null);function yt(e,t){switch(P(De,t),P(Se,e),P(oe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?kh(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=kh(t),e=zh(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}_(oe),P(oe,e)}function He(){_(oe),_(Se),_(De)}function Kt(e){e.memoizedState!==null&&P(Ge,e);var t=oe.current,n=zh(t,e.type);t!==n&&(P(Se,e),P(oe,n))}function Ke(e){Se.current===e&&(_(oe),_(Se)),Ge.current===e&&(_(Ge),Io._currentValue=F)}var ee,Ee;function Je(e){if(ee===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);ee=t&&t[1]||"",Ee=-1<n.stack.indexOf(`
2
+ at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
3
+ `+ee+e+Ee}var ot=!1;function _t(e,t){if(!e||ot)return"";ot=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var G=function(){throw Error()};if(Object.defineProperty(G.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(G,[])}catch(O){var L=O}Reflect.construct(e,[],G)}else{try{G.call()}catch(O){L=O}e.call(G.prototype)}}else{try{throw Error()}catch(O){L=O}(G=e())&&typeof G.catch=="function"&&G.catch(function(){})}}catch(O){if(O&&L&&typeof O.stack=="string")return[O.stack,L.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 o=a.DetermineComponentFrameRoot(),c=o[0],p=o[1];if(c&&p){var S=c.split(`
4
+ `),R=p.split(`
5
+ `);for(l=a=0;a<S.length&&!S[a].includes("DetermineComponentFrameRoot");)a++;for(;l<R.length&&!R[l].includes("DetermineComponentFrameRoot");)l++;if(a===S.length||l===R.length)for(a=S.length-1,l=R.length-1;1<=a&&0<=l&&S[a]!==R[l];)l--;for(;1<=a&&0<=l;a--,l--)if(S[a]!==R[l]){if(a!==1||l!==1)do if(a--,l--,0>l||S[a]!==R[l]){var N=`
6
+ `+S[a].replace(" at new "," at ");return e.displayName&&N.includes("<anonymous>")&&(N=N.replace("<anonymous>",e.displayName)),N}while(1<=a&&0<=l);break}}}finally{ot=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Je(n):""}function Gt(e,t){switch(e.tag){case 26:case 27:case 5:return Je(e.type);case 16:return Je("Lazy");case 13:return e.child!==t&&t!==null?Je("Suspense Fallback"):Je("Suspense");case 19:return Je("SuspenseList");case 0:case 15:return _t(e.type,!1);case 11:return _t(e.type.render,!1);case 1:return _t(e.type,!0);case 31:return Je("Activity");default:return""}}function hn(e){try{var t="",n=null;do t+=Gt(e,n),n=e,e=e.return;while(e);return t}catch(a){return`
7
+ Error generating stack: `+a.message+`
8
+ `+a.stack}}var Pt=Object.prototype.hasOwnProperty,ht=i.unstable_scheduleCallback,Vt=i.unstable_cancelCallback,zt=i.unstable_shouldYield,Le=i.unstable_requestPaint,Tt=i.unstable_now,wn=i.unstable_getCurrentPriorityLevel,Yn=i.unstable_ImmediatePriority,Hn=i.unstable_UserBlockingPriority,kn=i.unstable_NormalPriority,Z=i.unstable_LowPriority,se=i.unstable_IdlePriority,Xe=i.log,nt=i.unstable_setDisableYieldValue,Ne=null,Me=null;function Ct(e){if(typeof Xe=="function"&&nt(e),Me&&typeof Me.setStrictMode=="function")try{Me.setStrictMode(Ne,e)}catch{}}var bt=Math.clz32?Math.clz32:Nr,ml=Math.log,Qa=Math.LN2;function Nr(e){return e>>>=0,e===0?32:31-(ml(e)/Qa|0)|0}var gl=256,yl=262144,Ka=4194304;function $n(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 bl(e,t,n){var a=e.pendingLanes;if(a===0)return 0;var l=0,o=e.suspendedLanes,c=e.pingedLanes;e=e.warmLanes;var p=a&134217727;return p!==0?(a=p&~o,a!==0?l=$n(a):(c&=p,c!==0?l=$n(c):n||(n=p&~e,n!==0&&(l=$n(n))))):(p=a&~o,p!==0?l=$n(p):c!==0?l=$n(c):n||(n=a&~e,n!==0&&(l=$n(n)))),l===0?0:t!==0&&t!==l&&(t&o)===0&&(o=l&-l,n=t&-t,o>=n||o===32&&(n&4194048)!==0)?t:l}function Za(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function jr(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 hi(){var e=Ka;return Ka<<=1,(Ka&62914560)===0&&(Ka=4194304),e}function so(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Fa(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function qr(e,t,n,a,l,o){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,S=e.expirationTimes,R=e.hiddenUpdates;for(n=c&~n;0<n;){var N=31-bt(n),G=1<<N;p[N]=0,S[N]=-1;var L=R[N];if(L!==null)for(R[N]=null,N=0;N<L.length;N++){var O=L[N];O!==null&&(O.lane&=-536870913)}n&=~G}a!==0&&pi(e,a,0),o!==0&&l===0&&e.tag!==0&&(e.suspendedLanes|=o&~(c&~t))}function pi(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-bt(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|n&261930}function mi(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var a=31-bt(n),l=1<<a;l&t|e[a]&t&&(e[a]|=t),n&=~l}}function co(e,t){var n=t&-t;return n=(n&42)!==0?1:Wn(n),(n&(e.suspendedLanes|t))!==0?0:n}function Wn(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 uo(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function gi(){var e=J.p;return e!==0?e:(e=window.event,e===void 0?32:Fh(e.type))}function Un(e,t){var n=J.p;try{return J.p=e,t()}finally{J.p=n}}var Gn=Math.random().toString(36).slice(2),Mt="__reactFiber$"+Gn,Ot="__reactProps$"+Gn,pn="__reactContainer$"+Gn,vl="__reactEvents$"+Gn,ya="__reactListeners$"+Gn,ba="__reactHandles$"+Gn,fo="__reactResources$"+Gn,Ja="__reactMarker$"+Gn;function ho(e){delete e[Mt],delete e[Ot],delete e[vl],delete e[ya],delete e[ba]}function In(e){var t=e[Mt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[pn]||n[Mt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Lh(e);e!==null;){if(n=e[Mt])return n;e=Lh(e)}return t}e=n,n=e.parentNode}return null}function he(e){if(e=e[Mt]||e[pn]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function le(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(d(33))}function ye(e){var t=e[fo];return t||(t=e[fo]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function be(e){e[Ja]=!0}var _e=new Set,Ue={};function Pe(e,t){et(e,t),et(e+"Capture",t)}function et(e,t){for(Ue[e]=t,e=0;e<t.length;e++)_e.add(t[e])}var Be=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]*$"),nn={},po={};function Qp(e){return Pt.call(po,e)?!0:Pt.call(nn,e)?!1:Be.test(e)?po[e]=!0:(nn[e]=!0,!1)}function yi(e,t,n){if(Qp(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 bi(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 Pn(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 zn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function mu(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Kp(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,o=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(c){n=""+c,o.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 Yr(e){if(!e._valueTracker){var t=mu(e)?"checked":"value";e._valueTracker=Kp(e,t,""+e[t])}}function gu(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),a="";return e&&(a=mu(e)?e.checked?"true":"false":e.value),e=a,e!==n?(t.setValue(e),!0):!1}function vi(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 Zp=/[\n"\\]/g;function Mn(e){return e.replace(Zp,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Gr(e,t,n,a,l,o,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=""+zn(t)):e.value!==""+zn(t)&&(e.value=""+zn(t)):c!=="submit"&&c!=="reset"||e.removeAttribute("value"),t!=null?Xr(e,c,zn(t)):n!=null?Xr(e,c,zn(n)):a!=null&&e.removeAttribute("value"),l==null&&o!=null&&(e.defaultChecked=!!o),l!=null&&(e.checked=l&&typeof l!="function"&&typeof l!="symbol"),p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"?e.name=""+zn(p):e.removeAttribute("name")}function yu(e,t,n,a,l,o,c,p){if(o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.type=o),t!=null||n!=null){if(!(o!=="submit"&&o!=="reset"||t!=null)){Yr(e);return}n=n!=null?""+zn(n):"",t=t!=null?""+zn(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),Yr(e)}function Xr(e,t,n){t==="number"&&vi(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function xl(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=""+zn(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 bu(e,t,n){if(t!=null&&(t=""+zn(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+zn(n):""}function vu(e,t,n,a){if(t==null){if(a!=null){if(n!=null)throw Error(d(92));if(Ae(a)){if(1<a.length)throw Error(d(93));a=a[0]}n=a}n==null&&(n=""),t=n}n=zn(t),e.defaultValue=n,a=e.textContent,a===n&&a!==""&&a!==null&&(e.value=a),Yr(e)}function Sl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Fp=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 xu(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||Fp.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function Su(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&&xu(e,l,a)}else for(var o in t)t.hasOwnProperty(o)&&xu(e,o,t[o])}function Vr(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 Jp=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"]]),$p=/^[\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 xi(e){return $p.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ea(){}var Qr=null;function Kr(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Cl=null,wl=null;function Cu(e){var t=he(e);if(t&&(e=t.stateNode)){var n=e[Ot]||null;e:switch(e=t.stateNode,t.type){case"input":if(Gr(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="'+Mn(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var a=n[t];if(a!==e&&a.form===e.form){var l=a[Ot]||null;if(!l)throw Error(d(90));Gr(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&&gu(a)}break e;case"textarea":bu(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&xl(e,!!n.multiple,t,!1)}}}var Zr=!1;function wu(e,t,n){if(Zr)return e(t,n);Zr=!0;try{var a=e(t);return a}finally{if(Zr=!1,(Cl!==null||wl!==null)&&(rr(),Cl&&(t=Cl,e=wl,wl=Cl=null,Cu(t),e)))for(t=0;t<e.length;t++)Cu(e[t])}}function mo(e,t){var n=e.stateNode;if(n===null)return null;var a=n[Ot]||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 ta=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Fr=!1;if(ta)try{var go={};Object.defineProperty(go,"passive",{get:function(){Fr=!0}}),window.addEventListener("test",go,go),window.removeEventListener("test",go,go)}catch{Fr=!1}var va=null,Jr=null,Si=null;function ku(){if(Si)return Si;var e,t=Jr,n=t.length,a,l="value"in va?va.value:va.textContent,o=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[o-a];a++);return Si=l.slice(e,1<a?1-a:void 0)}function Ci(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 wi(){return!0}function zu(){return!1}function on(e){function t(n,a,l,o,c){this._reactName=n,this._targetInst=l,this.type=a,this.nativeEvent=o,this.target=c,this.currentTarget=null;for(var p in e)e.hasOwnProperty(p)&&(n=e[p],this[p]=n?n(o):o[p]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?wi:zu,this.isPropagationStopped=zu,this}return z(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=wi)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=wi)},persist:function(){},isPersistent:wi}),t}var $a={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ki=on($a),yo=z({},$a,{view:0,detail:0}),Wp=on(yo),$r,Wr,bo,zi=z({},yo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Pr,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!==bo&&(bo&&e.type==="mousemove"?($r=e.screenX-bo.screenX,Wr=e.screenY-bo.screenY):Wr=$r=0,bo=e),$r)},movementY:function(e){return"movementY"in e?e.movementY:Wr}}),Mu=on(zi),Ip=z({},zi,{dataTransfer:0}),Pp=on(Ip),e0=z({},yo,{relatedTarget:0}),Ir=on(e0),t0=z({},$a,{animationName:0,elapsedTime:0,pseudoElement:0}),n0=on(t0),a0=z({},$a,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),l0=on(a0),o0=z({},$a,{data:0}),Du=on(o0),i0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},r0={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"},s0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function c0(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=s0[e])?!!t[e]:!1}function Pr(){return c0}var u0=z({},yo,{key:function(e){if(e.key){var t=i0[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ci(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?r0[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Pr,charCode:function(e){return e.type==="keypress"?Ci(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ci(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),d0=on(u0),f0=z({},zi,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Eu=on(f0),h0=z({},yo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Pr}),p0=on(h0),m0=z({},$a,{propertyName:0,elapsedTime:0,pseudoElement:0}),g0=on(m0),y0=z({},zi,{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}),b0=on(y0),v0=z({},$a,{newState:0,oldState:0}),x0=on(v0),S0=[9,13,27,32],es=ta&&"CompositionEvent"in window,vo=null;ta&&"documentMode"in document&&(vo=document.documentMode);var C0=ta&&"TextEvent"in window&&!vo,Tu=ta&&(!es||vo&&8<vo&&11>=vo),Au=" ",Ru=!1;function Lu(e,t){switch(e){case"keyup":return S0.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 kl=!1;function w0(e,t){switch(e){case"compositionend":return _u(t);case"keypress":return t.which!==32?null:(Ru=!0,Au);case"textInput":return e=t.data,e===Au&&Ru?null:e;default:return null}}function k0(e,t){if(kl)return e==="compositionend"||!es&&Lu(e,t)?(e=ku(),Si=Jr=va=null,kl=!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 Tu&&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 Hu(e,t,n,a){Cl?wl?wl.push(a):wl=[a]:Cl=a,t=pr(t,"onChange"),0<t.length&&(n=new ki("onChange","change",null,n,a),e.push({event:n,listeners:t}))}var xo=null,So=null;function M0(e){bh(e,0)}function Mi(e){var t=le(e);if(gu(t))return e}function Uu(e,t){if(e==="change")return t}var Bu=!1;if(ta){var ts;if(ta){var ns="oninput"in document;if(!ns){var Nu=document.createElement("div");Nu.setAttribute("oninput","return;"),ns=typeof Nu.oninput=="function"}ts=ns}else ts=!1;Bu=ts&&(!document.documentMode||9<document.documentMode)}function ju(){xo&&(xo.detachEvent("onpropertychange",qu),So=xo=null)}function qu(e){if(e.propertyName==="value"&&Mi(So)){var t=[];Hu(t,So,e,Kr(e)),wu(M0,t)}}function D0(e,t,n){e==="focusin"?(ju(),xo=t,So=n,xo.attachEvent("onpropertychange",qu)):e==="focusout"&&ju()}function E0(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Mi(So)}function T0(e,t){if(e==="click")return Mi(t)}function A0(e,t){if(e==="input"||e==="change")return Mi(t)}function R0(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var mn=typeof Object.is=="function"?Object.is:R0;function Co(e,t){if(mn(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(!Pt.call(t,l)||!mn(e[l],t[l]))return!1}return!0}function Yu(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Gu(e,t){var n=Yu(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=Yu(n)}}function Xu(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Xu(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Vu(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=vi(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=vi(e.document)}return t}function as(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 L0=ta&&"documentMode"in document&&11>=document.documentMode,zl=null,ls=null,wo=null,os=!1;function Qu(e,t,n){var a=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;os||zl==null||zl!==vi(a)||(a=zl,"selectionStart"in a&&as(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}),wo&&Co(wo,a)||(wo=a,a=pr(ls,"onSelect"),0<a.length&&(t=new ki("onSelect","select",null,t,n),e.push({event:t,listeners:a}),t.target=zl)))}function Wa(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ml={animationend:Wa("Animation","AnimationEnd"),animationiteration:Wa("Animation","AnimationIteration"),animationstart:Wa("Animation","AnimationStart"),transitionrun:Wa("Transition","TransitionRun"),transitionstart:Wa("Transition","TransitionStart"),transitioncancel:Wa("Transition","TransitionCancel"),transitionend:Wa("Transition","TransitionEnd")},is={},Ku={};ta&&(Ku=document.createElement("div").style,"AnimationEvent"in window||(delete Ml.animationend.animation,delete Ml.animationiteration.animation,delete Ml.animationstart.animation),"TransitionEvent"in window||delete Ml.transitionend.transition);function Ia(e){if(is[e])return is[e];if(!Ml[e])return e;var t=Ml[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Ku)return is[e]=t[n];return e}var Zu=Ia("animationend"),Fu=Ia("animationiteration"),Ju=Ia("animationstart"),_0=Ia("transitionrun"),O0=Ia("transitionstart"),H0=Ia("transitioncancel"),$u=Ia("transitionend"),Wu=new Map,rs="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(" ");rs.push("scrollEnd");function Bn(e,t){Wu.set(e,t),Pe(t,[e])}var Di=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=[],Dl=0,ss=0;function Ei(){for(var e=Dl,t=ss=Dl=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 o=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}o!==0&&Iu(n,l,o)}}function Ti(e,t,n,a){Dn[Dl++]=e,Dn[Dl++]=t,Dn[Dl++]=n,Dn[Dl++]=a,ss|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function cs(e,t,n,a){return Ti(e,t,n,a),Ai(e)}function Pa(e,t){return Ti(e,null,null,t),Ai(e)}function Iu(e,t,n){e.lanes|=n;var a=e.alternate;a!==null&&(a.lanes|=n);for(var l=!1,o=e.return;o!==null;)o.childLanes|=n,a=o.alternate,a!==null&&(a.childLanes|=n),o.tag===22&&(e=o.stateNode,e===null||e._visibility&1||(l=!0)),e=o,o=o.return;return e.tag===3?(o=e.stateNode,l&&t!==null&&(l=31-bt(n),e=o.hiddenUpdates,a=e[l],a===null?e[l]=[t]:a.push(t),t.lane=n|536870912),o):null}function Ai(e){if(50<Qo)throw Qo=0,bc=null,Error(d(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var El={};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 gn(e,t,n,a){return new U0(e,t,n,a)}function us(e){return e=e.prototype,!(!e||!e.isReactComponent)}function na(e,t){var n=e.alternate;return n===null?(n=gn(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 Pu(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 Ri(e,t,n,a,l,o){var c=0;if(a=e,typeof e=="function")us(e)&&(c=1);else if(typeof e=="string")c=Ym(e,n,oe.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case B:return e=gn(31,n,t,l),e.elementType=B,e.lanes=o,e;case Y:return el(n.children,l,o,t);case ie:c=8,l|=24;break;case Q:return e=gn(12,n,t,l|2),e.elementType=Q,e.lanes=o,e;case X:return e=gn(13,n,t,l),e.elementType=X,e.lanes=o,e;case W:return e=gn(19,n,t,l),e.elementType=W,e.lanes=o,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ae:c=10;break e;case ce:c=9;break e;case fe:c=11;break e;case I:c=14;break e;case te:c=16,a=null;break e}c=29,n=Error(d(130,e===null?"null":typeof e,"")),a=null}return t=gn(c,n,t,l),t.elementType=e,t.type=a,t.lanes=o,t}function el(e,t,n,a){return e=gn(7,e,a,t),e.lanes=n,e}function ds(e,t,n){return e=gn(6,e,null,t),e.lanes=n,e}function ed(e){var t=gn(18,null,null,0);return t.stateNode=e,t}function fs(e,t,n){return t=gn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var td=new WeakMap;function En(e,t){if(typeof e=="object"&&e!==null){var n=td.get(e);return n!==void 0?n:(t={value:e,source:t,stack:hn(t)},td.set(e,t),t)}return{value:e,source:t,stack:hn(t)}}var Tl=[],Al=0,Li=null,ko=0,Tn=[],An=0,xa=null,Xn=1,Vn="";function aa(e,t){Tl[Al++]=ko,Tl[Al++]=Li,Li=e,ko=t}function nd(e,t,n){Tn[An++]=Xn,Tn[An++]=Vn,Tn[An++]=xa,xa=e;var a=Xn;e=Vn;var l=32-bt(a)-1;a&=~(1<<l),n+=1;var o=32-bt(t)+l;if(30<o){var c=l-l%5;o=(a&(1<<c)-1).toString(32),a>>=c,l-=c,Xn=1<<32-bt(t)+l|n<<l|a,Vn=o+e}else Xn=1<<o|n<<l|a,Vn=e}function hs(e){e.return!==null&&(aa(e,1),nd(e,1,0))}function ps(e){for(;e===Li;)Li=Tl[--Al],Tl[Al]=null,ko=Tl[--Al],Tl[Al]=null;for(;e===xa;)xa=Tn[--An],Tn[An]=null,Vn=Tn[--An],Tn[An]=null,Xn=Tn[--An],Tn[An]=null}function ad(e,t){Tn[An++]=Xn,Tn[An++]=Vn,Tn[An++]=xa,Xn=t.id,Vn=t.overflow,xa=e}var Zt=null,wt=null,Ie=!1,Sa=null,Rn=!1,ms=Error(d(519));function Ca(e){var t=Error(d(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw zo(En(t,e)),ms}function ld(e){var t=e.stateNode,n=e.type,a=e.memoizedProps;switch(t[Mt]=e,t[Ot]=a,n){case"dialog":Fe("cancel",t),Fe("close",t);break;case"iframe":case"object":case"embed":Fe("load",t);break;case"video":case"audio":for(n=0;n<Zo.length;n++)Fe(Zo[n],t);break;case"source":Fe("error",t);break;case"img":case"image":case"link":Fe("error",t),Fe("load",t);break;case"details":Fe("toggle",t);break;case"input":Fe("invalid",t),yu(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":Fe("invalid",t);break;case"textarea":Fe("invalid",t),vu(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||Ch(t.textContent,n)?(a.popover!=null&&(Fe("beforetoggle",t),Fe("toggle",t)),a.onScroll!=null&&Fe("scroll",t),a.onScrollEnd!=null&&Fe("scrollend",t),a.onClick!=null&&(t.onclick=ea),t=!0):t=!1,t||Ca(e,!0)}function od(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 Rl(e){if(e!==Zt)return!1;if(!Ie)return od(e),Ie=!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&&wt&&Ca(e),od(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(d(317));wt=Rh(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(d(317));wt=Rh(e)}else t===27?(t=wt,Ua(e.type)?(e=Nc,Nc=null,wt=e):wt=t):wt=Zt?_n(e.stateNode.nextSibling):null;return!0}function tl(){wt=Zt=null,Ie=!1}function gs(){var e=Sa;return e!==null&&(un===null?un=e:un.push.apply(un,e),Sa=null),e}function zo(e){Sa===null?Sa=[e]:Sa.push(e)}var ys=x(null),nl=null,la=null;function wa(e,t,n){P(ys,t._currentValue),t._currentValue=n}function oa(e){e._currentValue=ys.current,_(ys)}function bs(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 vs(e,t,n,a){var l=e.child;for(l!==null&&(l.return=e);l!==null;){var o=l.dependencies;if(o!==null){var c=l.child;o=o.firstContext;e:for(;o!==null;){var p=o;o=l;for(var S=0;S<t.length;S++)if(p.context===t[S]){o.lanes|=n,p=o.alternate,p!==null&&(p.lanes|=n),bs(o.return,n,e),a||(c=null);break e}o=p.next}}else if(l.tag===18){if(c=l.return,c===null)throw Error(d(341));c.lanes|=n,o=c.alternate,o!==null&&(o.lanes|=n),bs(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 Ll(e,t,n,a){e=null;for(var l=t,o=!1;l!==null;){if(!o){if((l.flags&524288)!==0)o=!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;mn(l.pendingProps.value,c.value)||(e!==null?e.push(p):e=[p])}}else if(l===Ge.current){if(c=l.alternate,c===null)throw Error(d(387));c.memoizedState.memoizedState!==l.memoizedState.memoizedState&&(e!==null?e.push(Io):e=[Io])}l=l.return}e!==null&&vs(t,e,n,a),t.flags|=262144}function _i(e){for(e=e.firstContext;e!==null;){if(!mn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function al(e){nl=e,la=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ft(e){return id(nl,e)}function Oi(e,t){return nl===null&&al(e),id(e,t)}function id(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},la===null){if(e===null)throw Error(d(308));la=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else la=la.next=t;return n}var B0=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()})}},N0=i.unstable_scheduleCallback,j0=i.unstable_NormalPriority,Bt={$$typeof:ae,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function xs(){return{controller:new B0,data:new Map,refCount:0}}function Mo(e){e.refCount--,e.refCount===0&&N0(j0,function(){e.controller.abort()})}var Do=null,Ss=0,_l=0,Ol=null;function q0(e,t){if(Do===null){var n=Do=[];Ss=0,_l=kc(),Ol={status:"pending",value:void 0,then:function(a){n.push(a)}}}return Ss++,t.then(rd,rd),t}function rd(){if(--Ss===0&&Do!==null){Ol!==null&&(Ol.status="fulfilled");var e=Do;Do=null,_l=0,Ol=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Y0(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 sd=D.S;D.S=function(e,t){Kf=Tt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&q0(e,t),sd!==null&&sd(e,t)};var ll=x(null);function Cs(){var e=ll.current;return e!==null?e:vt.pooledCache}function Hi(e,t){t===null?P(ll,ll.current):P(ll,t.pool)}function cd(){var e=Cs();return e===null?null:{parent:Bt._currentValue,pool:e}}var Hl=Error(d(460)),ws=Error(d(474)),Ui=Error(d(542)),Bi={then:function(){}};function ud(e){return e=e.status,e==="fulfilled"||e==="rejected"}function dd(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(ea,ea),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,hd(e),e;default:if(typeof t.status=="string")t.then(ea,ea);else{if(e=vt,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,hd(e),e}throw il=t,Hl}}function ol(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(il=n,Hl):n}}var il=null;function fd(){if(il===null)throw Error(d(459));var e=il;return il=null,e}function hd(e){if(e===Hl||e===Ui)throw Error(d(483))}var Ul=null,Eo=0;function Ni(e){var t=Eo;return Eo+=1,Ul===null&&(Ul=[]),dd(Ul,e,t)}function To(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function ji(e,t){throw t.$$typeof===U?Error(d(525)):(e=Object.prototype.toString.call(t),Error(d(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function pd(e){function t(M,k){if(e){var T=M.deletions;T===null?(M.deletions=[k],M.flags|=16):T.push(k)}}function n(M,k){if(!e)return null;for(;k!==null;)t(M,k),k=k.sibling;return null}function a(M){for(var k=new Map;M!==null;)M.key!==null?k.set(M.key,M):k.set(M.index,M),M=M.sibling;return k}function l(M,k){return M=na(M,k),M.index=0,M.sibling=null,M}function o(M,k,T){return M.index=T,e?(T=M.alternate,T!==null?(T=T.index,T<k?(M.flags|=67108866,k):T):(M.flags|=67108866,k)):(M.flags|=1048576,k)}function c(M){return e&&M.alternate===null&&(M.flags|=67108866),M}function p(M,k,T,j){return k===null||k.tag!==6?(k=ds(T,M.mode,j),k.return=M,k):(k=l(k,T),k.return=M,k)}function S(M,k,T,j){var ze=T.type;return ze===Y?N(M,k,T.props.children,j,T.key):k!==null&&(k.elementType===ze||typeof ze=="object"&&ze!==null&&ze.$$typeof===te&&ol(ze)===k.type)?(k=l(k,T.props),To(k,T),k.return=M,k):(k=Ri(T.type,T.key,T.props,null,M.mode,j),To(k,T),k.return=M,k)}function R(M,k,T,j){return k===null||k.tag!==4||k.stateNode.containerInfo!==T.containerInfo||k.stateNode.implementation!==T.implementation?(k=fs(T,M.mode,j),k.return=M,k):(k=l(k,T.children||[]),k.return=M,k)}function N(M,k,T,j,ze){return k===null||k.tag!==7?(k=el(T,M.mode,j,ze),k.return=M,k):(k=l(k,T),k.return=M,k)}function G(M,k,T){if(typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint")return k=ds(""+k,M.mode,T),k.return=M,k;if(typeof k=="object"&&k!==null){switch(k.$$typeof){case q:return T=Ri(k.type,k.key,k.props,null,M.mode,T),To(T,k),T.return=M,T;case H:return k=fs(k,M.mode,T),k.return=M,k;case te:return k=ol(k),G(M,k,T)}if(Ae(k)||pe(k))return k=el(k,M.mode,T,null),k.return=M,k;if(typeof k.then=="function")return G(M,Ni(k),T);if(k.$$typeof===ae)return G(M,Oi(M,k),T);ji(M,k)}return null}function L(M,k,T,j){var ze=k!==null?k.key:null;if(typeof T=="string"&&T!==""||typeof T=="number"||typeof T=="bigint")return ze!==null?null:p(M,k,""+T,j);if(typeof T=="object"&&T!==null){switch(T.$$typeof){case q:return T.key===ze?S(M,k,T,j):null;case H:return T.key===ze?R(M,k,T,j):null;case te:return T=ol(T),L(M,k,T,j)}if(Ae(T)||pe(T))return ze!==null?null:N(M,k,T,j,null);if(typeof T.then=="function")return L(M,k,Ni(T),j);if(T.$$typeof===ae)return L(M,k,Oi(M,T),j);ji(M,T)}return null}function O(M,k,T,j,ze){if(typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint")return M=M.get(T)||null,p(k,M,""+j,ze);if(typeof j=="object"&&j!==null){switch(j.$$typeof){case q:return M=M.get(j.key===null?T:j.key)||null,S(k,M,j,ze);case H:return M=M.get(j.key===null?T:j.key)||null,R(k,M,j,ze);case te:return j=ol(j),O(M,k,T,j,ze)}if(Ae(j)||pe(j))return M=M.get(T)||null,N(k,M,j,ze,null);if(typeof j.then=="function")return O(M,k,T,Ni(j),ze);if(j.$$typeof===ae)return O(M,k,T,Oi(k,j),ze);ji(k,j)}return null}function ge(M,k,T,j){for(var ze=null,at=null,Ce=k,Qe=k=0,We=null;Ce!==null&&Qe<T.length;Qe++){Ce.index>Qe?(We=Ce,Ce=null):We=Ce.sibling;var lt=L(M,Ce,T[Qe],j);if(lt===null){Ce===null&&(Ce=We);break}e&&Ce&&lt.alternate===null&&t(M,Ce),k=o(lt,k,Qe),at===null?ze=lt:at.sibling=lt,at=lt,Ce=We}if(Qe===T.length)return n(M,Ce),Ie&&aa(M,Qe),ze;if(Ce===null){for(;Qe<T.length;Qe++)Ce=G(M,T[Qe],j),Ce!==null&&(k=o(Ce,k,Qe),at===null?ze=Ce:at.sibling=Ce,at=Ce);return Ie&&aa(M,Qe),ze}for(Ce=a(Ce);Qe<T.length;Qe++)We=O(Ce,M,Qe,T[Qe],j),We!==null&&(e&&We.alternate!==null&&Ce.delete(We.key===null?Qe:We.key),k=o(We,k,Qe),at===null?ze=We:at.sibling=We,at=We);return e&&Ce.forEach(function(Ya){return t(M,Ya)}),Ie&&aa(M,Qe),ze}function Te(M,k,T,j){if(T==null)throw Error(d(151));for(var ze=null,at=null,Ce=k,Qe=k=0,We=null,lt=T.next();Ce!==null&&!lt.done;Qe++,lt=T.next()){Ce.index>Qe?(We=Ce,Ce=null):We=Ce.sibling;var Ya=L(M,Ce,lt.value,j);if(Ya===null){Ce===null&&(Ce=We);break}e&&Ce&&Ya.alternate===null&&t(M,Ce),k=o(Ya,k,Qe),at===null?ze=Ya:at.sibling=Ya,at=Ya,Ce=We}if(lt.done)return n(M,Ce),Ie&&aa(M,Qe),ze;if(Ce===null){for(;!lt.done;Qe++,lt=T.next())lt=G(M,lt.value,j),lt!==null&&(k=o(lt,k,Qe),at===null?ze=lt:at.sibling=lt,at=lt);return Ie&&aa(M,Qe),ze}for(Ce=a(Ce);!lt.done;Qe++,lt=T.next())lt=O(Ce,M,Qe,lt.value,j),lt!==null&&(e&&lt.alternate!==null&&Ce.delete(lt.key===null?Qe:lt.key),k=o(lt,k,Qe),at===null?ze=lt:at.sibling=lt,at=lt);return e&&Ce.forEach(function(Im){return t(M,Im)}),Ie&&aa(M,Qe),ze}function gt(M,k,T,j){if(typeof T=="object"&&T!==null&&T.type===Y&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case q:e:{for(var ze=T.key;k!==null;){if(k.key===ze){if(ze=T.type,ze===Y){if(k.tag===7){n(M,k.sibling),j=l(k,T.props.children),j.return=M,M=j;break e}}else if(k.elementType===ze||typeof ze=="object"&&ze!==null&&ze.$$typeof===te&&ol(ze)===k.type){n(M,k.sibling),j=l(k,T.props),To(j,T),j.return=M,M=j;break e}n(M,k);break}else t(M,k);k=k.sibling}T.type===Y?(j=el(T.props.children,M.mode,j,T.key),j.return=M,M=j):(j=Ri(T.type,T.key,T.props,null,M.mode,j),To(j,T),j.return=M,M=j)}return c(M);case H:e:{for(ze=T.key;k!==null;){if(k.key===ze)if(k.tag===4&&k.stateNode.containerInfo===T.containerInfo&&k.stateNode.implementation===T.implementation){n(M,k.sibling),j=l(k,T.children||[]),j.return=M,M=j;break e}else{n(M,k);break}else t(M,k);k=k.sibling}j=fs(T,M.mode,j),j.return=M,M=j}return c(M);case te:return T=ol(T),gt(M,k,T,j)}if(Ae(T))return ge(M,k,T,j);if(pe(T)){if(ze=pe(T),typeof ze!="function")throw Error(d(150));return T=ze.call(T),Te(M,k,T,j)}if(typeof T.then=="function")return gt(M,k,Ni(T),j);if(T.$$typeof===ae)return gt(M,k,Oi(M,T),j);ji(M,T)}return typeof T=="string"&&T!==""||typeof T=="number"||typeof T=="bigint"?(T=""+T,k!==null&&k.tag===6?(n(M,k.sibling),j=l(k,T),j.return=M,M=j):(n(M,k),j=ds(T,M.mode,j),j.return=M,M=j),c(M)):n(M,k)}return function(M,k,T,j){try{Eo=0;var ze=gt(M,k,T,j);return Ul=null,ze}catch(Ce){if(Ce===Hl||Ce===Ui)throw Ce;var at=gn(29,Ce,null,M.mode);return at.lanes=j,at.return=M,at}}}var rl=pd(!0),md=pd(!1),ka=!1;function ks(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,(it&2)!==0){var l=a.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),a.pending=t,t=Ai(e),Iu(e,null,n),t}return Ti(e,a,t,n),Ai(e)}function Ao(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,mi(e,n)}}function Ms(e,t){var n=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,n===a)){var l=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var c={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};o===null?l=o=c:o=o.next=c,n=n.next}while(n!==null);o===null?l=o=t:o=o.next=t}else l=o=t;n={baseState:a.baseState,firstBaseUpdate:l,lastBaseUpdate:o,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 Ds=!1;function Ro(){if(Ds){var e=Ol;if(e!==null)throw e}}function Lo(e,t,n,a){Ds=!1;var l=e.updateQueue;ka=!1;var o=l.firstBaseUpdate,c=l.lastBaseUpdate,p=l.shared.pending;if(p!==null){l.shared.pending=null;var S=p,R=S.next;S.next=null,c===null?o=R:c.next=R,c=S;var N=e.alternate;N!==null&&(N=N.updateQueue,p=N.lastBaseUpdate,p!==c&&(p===null?N.firstBaseUpdate=R:p.next=R,N.lastBaseUpdate=S))}if(o!==null){var G=l.baseState;c=0,N=R=S=null,p=o;do{var L=p.lane&-536870913,O=L!==p.lane;if(O?($e&L)===L:(a&L)===L){L!==0&&L===_l&&(Ds=!0),N!==null&&(N=N.next={lane:0,tag:p.tag,payload:p.payload,callback:null,next:null});e:{var ge=e,Te=p;L=t;var gt=n;switch(Te.tag){case 1:if(ge=Te.payload,typeof ge=="function"){G=ge.call(gt,G,L);break e}G=ge;break e;case 3:ge.flags=ge.flags&-65537|128;case 0:if(ge=Te.payload,L=typeof ge=="function"?ge.call(gt,G,L):ge,L==null)break e;G=z({},G,L);break e;case 2:ka=!0}}L=p.callback,L!==null&&(e.flags|=64,O&&(e.flags|=8192),O=l.callbacks,O===null?l.callbacks=[L]:O.push(L))}else O={lane:L,tag:p.tag,payload:p.payload,callback:p.callback,next:null},N===null?(R=N=O,S=G):N=N.next=O,c|=L;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);N===null&&(S=G),l.baseState=S,l.firstBaseUpdate=R,l.lastBaseUpdate=N,o===null&&(l.shared.lanes=0),Ra|=c,e.lanes=c,e.memoizedState=G}}function gd(e,t){if(typeof e!="function")throw Error(d(191,e));e.call(t)}function yd(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)gd(n[e],t)}var Bl=x(null),qi=x(0);function bd(e,t){e=pa,P(qi,e),P(Bl,t),pa=e|t.baseLanes}function Es(){P(qi,pa),P(Bl,Bl.current)}function Ts(){pa=qi.current,_(Bl),_(qi)}var yn=x(null),Ln=null;function Da(e){var t=e.alternate;P(Ht,Ht.current&1),P(yn,e),Ln===null&&(t===null||Bl.current!==null||t.memoizedState!==null)&&(Ln=e)}function As(e){P(Ht,Ht.current),P(yn,e),Ln===null&&(Ln=e)}function vd(e){e.tag===22?(P(Ht,Ht.current),P(yn,e),Ln===null&&(Ln=e)):Ea()}function Ea(){P(Ht,Ht.current),P(yn,yn.current)}function bn(e){_(yn),Ln===e&&(Ln=null),_(Ht)}var Ht=x(0);function Yi(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)||Bc(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 ia=0,Ve=null,pt=null,Nt=null,Gi=!1,Nl=!1,sl=!1,Xi=0,_o=0,jl=null,G0=0;function At(){throw Error(d(321))}function Rs(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!mn(e[n],t[n]))return!1;return!0}function Ls(e,t,n,a,l,o){return ia=o,Ve=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,D.H=e===null||e.memoizedState===null?nf:Zs,sl=!1,o=n(a,l),sl=!1,Nl&&(o=Sd(t,n,a,l)),xd(e),o}function xd(e){D.H=Uo;var t=pt!==null&&pt.next!==null;if(ia=0,Nt=pt=Ve=null,Gi=!1,_o=0,jl=null,t)throw Error(d(300));e===null||jt||(e=e.dependencies,e!==null&&_i(e)&&(jt=!0))}function Sd(e,t,n,a){Ve=e;var l=0;do{if(Nl&&(jl=null),_o=0,Nl=!1,25<=l)throw Error(d(301));if(l+=1,Nt=pt=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}D.H=af,o=t(n,a)}while(Nl);return o}function X0(){var e=D.H,t=e.useState()[0];return t=typeof t.then=="function"?Oo(t):t,e=e.useState()[0],(pt!==null?pt.memoizedState:null)!==e&&(Ve.flags|=1024),t}function _s(){var e=Xi!==0;return Xi=0,e}function Os(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Hs(e){if(Gi){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Gi=!1}ia=0,Nt=pt=Ve=null,Nl=!1,_o=Xi=0,jl=null}function an(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Nt===null?Ve.memoizedState=Nt=e:Nt=Nt.next=e,Nt}function Ut(){if(pt===null){var e=Ve.alternate;e=e!==null?e.memoizedState:null}else e=pt.next;var t=Nt===null?Ve.memoizedState:Nt.next;if(t!==null)Nt=t,pt=e;else{if(e===null)throw Ve.alternate===null?Error(d(467)):Error(d(310));pt=e,e={memoizedState:pt.memoizedState,baseState:pt.baseState,baseQueue:pt.baseQueue,queue:pt.queue,next:null},Nt===null?Ve.memoizedState=Nt=e:Nt=Nt.next=e}return Nt}function Vi(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Oo(e){var t=_o;return _o+=1,jl===null&&(jl=[]),e=dd(jl,e,t),t=Ve,(Nt===null?t.memoizedState:Nt.next)===null&&(t=t.alternate,D.H=t===null||t.memoizedState===null?nf:Zs),e}function Qi(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Oo(e);if(e.$$typeof===ae)return Ft(e)}throw Error(d(438,String(e)))}function Us(e){var t=null,n=Ve.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var a=Ve.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=Vi(),Ve.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]=K;return t.index++,n}function ra(e,t){return typeof t=="function"?t(e):t}function Ki(e){var t=Ut();return Bs(t,pt,e)}function Bs(e,t,n){var a=e.queue;if(a===null)throw Error(d(311));a.lastRenderedReducer=n;var l=e.baseQueue,o=a.pending;if(o!==null){if(l!==null){var c=l.next;l.next=o.next,o.next=c}t.baseQueue=l=o,a.pending=null}if(o=e.baseState,l===null)e.memoizedState=o;else{t=l.next;var p=c=null,S=null,R=t,N=!1;do{var G=R.lane&-536870913;if(G!==R.lane?($e&G)===G:(ia&G)===G){var L=R.revertLane;if(L===0)S!==null&&(S=S.next={lane:0,revertLane:0,gesture:null,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null}),G===_l&&(N=!0);else if((ia&L)===L){R=R.next,L===_l&&(N=!0);continue}else G={lane:0,revertLane:R.revertLane,gesture:null,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null},S===null?(p=S=G,c=o):S=S.next=G,Ve.lanes|=L,Ra|=L;G=R.action,sl&&n(o,G),o=R.hasEagerState?R.eagerState:n(o,G)}else L={lane:G,revertLane:R.revertLane,gesture:R.gesture,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null},S===null?(p=S=L,c=o):S=S.next=L,Ve.lanes|=G,Ra|=G;R=R.next}while(R!==null&&R!==t);if(S===null?c=o:S.next=p,!mn(o,e.memoizedState)&&(jt=!0,N&&(n=Ol,n!==null)))throw n;e.memoizedState=o,e.baseState=c,e.baseQueue=S,a.lastRenderedState=o}return l===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function Ns(e){var t=Ut(),n=t.queue;if(n===null)throw Error(d(311));n.lastRenderedReducer=e;var a=n.dispatch,l=n.pending,o=t.memoizedState;if(l!==null){n.pending=null;var c=l=l.next;do o=e(o,c.action),c=c.next;while(c!==l);mn(o,t.memoizedState)||(jt=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,a]}function Cd(e,t,n){var a=Ve,l=Ut(),o=Ie;if(o){if(n===void 0)throw Error(d(407));n=n()}else n=t();var c=!mn((pt||l).memoizedState,n);if(c&&(l.memoizedState=n,jt=!0),l=l.queue,Ys(zd.bind(null,a,l,e),[e]),l.getSnapshot!==t||c||Nt!==null&&Nt.memoizedState.tag&1){if(a.flags|=2048,ql(9,{destroy:void 0},kd.bind(null,a,l,n,t),null),vt===null)throw Error(d(349));o||(ia&127)!==0||wd(a,t,n)}return n}function wd(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ve.updateQueue,t===null?(t=Vi(),Ve.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function kd(e,t,n,a){t.value=n,t.getSnapshot=a,Md(t)&&Dd(e)}function zd(e,t,n){return n(function(){Md(t)&&Dd(e)})}function Md(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!mn(e,n)}catch{return!0}}function Dd(e){var t=Pa(e,2);t!==null&&dn(t,e,2)}function js(e){var t=an();if(typeof e=="function"){var n=e;if(e=n(),sl){Ct(!0);try{n()}finally{Ct(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ra,lastRenderedState:e},t}function Ed(e,t,n,a){return e.baseState=n,Bs(e,pt,typeof a=="function"?a:ra)}function V0(e,t,n,a,l){if(Ji(e))throw Error(d(485));if(e=t.action,e!==null){var o={payload:l,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(c){o.listeners.push(c)}};D.T!==null?n(!0):o.isTransition=!1,a(o),n=t.pending,n===null?(o.next=t.pending=o,Td(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Td(e,t){var n=t.action,a=t.payload,l=e.state;if(t.isTransition){var o=D.T,c={};D.T=c;try{var p=n(l,a),S=D.S;S!==null&&S(c,p),Ad(e,t,p)}catch(R){qs(e,t,R)}finally{o!==null&&c.types!==null&&(o.types=c.types),D.T=o}}else try{o=n(l,a),Ad(e,t,o)}catch(R){qs(e,t,R)}}function Ad(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(a){Rd(e,t,a)},function(a){return qs(e,t,a)}):Rd(e,t,n)}function Rd(e,t,n){t.status="fulfilled",t.value=n,Ld(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Td(e,n)))}function qs(e,t,n){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=n,Ld(t),t=t.next;while(t!==a)}e.action=null}function Ld(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(Ie){var n=vt.formState;if(n!==null){e:{var a=Ve;if(Ie){if(wt){t:{for(var l=wt,o=Rn;l.nodeType!==8;){if(!o){l=null;break t}if(l=_n(l.nextSibling),l===null){l=null;break t}}o=l.data,l=o==="F!"||o==="F"?l:null}if(l){wt=_n(l.nextSibling),a=l.data==="F!";break e}}Ca(a)}a=!1}a&&(t=n[0])}}return n=an(),n.memoizedState=n.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:_d,lastRenderedState:t},n.queue=a,n=Pd.bind(null,Ve,a),a.dispatch=n,a=js(!1),o=Ks.bind(null,Ve,!1,a.queue),a=an(),l={state:t,dispatch:null,action:e,pending:null},a.queue=l,n=V0.bind(null,Ve,l,o,n),l.dispatch=n,a.memoizedState=e,[t,n,!1]}function Hd(e){var t=Ut();return Ud(t,pt,e)}function Ud(e,t,n){if(t=Bs(e,t,_d)[0],e=Ki(ra)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=Oo(t)}catch(c){throw c===Hl?Ui:c}else a=t;t=Ut();var l=t.queue,o=l.dispatch;return n!==t.memoizedState&&(Ve.flags|=2048,ql(9,{destroy:void 0},Q0.bind(null,l,n),null)),[a,o,e]}function Q0(e,t){e.action=t}function Bd(e){var t=Ut(),n=pt;if(n!==null)return Ud(t,n,e);Ut(),t=t.memoizedState,n=Ut();var a=n.queue.dispatch;return n.memoizedState=e,[t,a,!1]}function ql(e,t,n,a){return e={tag:e,create:n,deps:a,inst:t,next:null},t=Ve.updateQueue,t===null&&(t=Vi(),Ve.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 Nd(){return Ut().memoizedState}function Zi(e,t,n,a){var l=an();Ve.flags|=e,l.memoizedState=ql(1|t,{destroy:void 0},n,a===void 0?null:a)}function Fi(e,t,n,a){var l=Ut();a=a===void 0?null:a;var o=l.memoizedState.inst;pt!==null&&a!==null&&Rs(a,pt.memoizedState.deps)?l.memoizedState=ql(t,o,n,a):(Ve.flags|=e,l.memoizedState=ql(1|t,o,n,a))}function jd(e,t){Zi(8390656,8,e,t)}function Ys(e,t){Fi(2048,8,e,t)}function K0(e){Ve.flags|=4;var t=Ve.updateQueue;if(t===null)t=Vi(),Ve.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function qd(e){var t=Ut().memoizedState;return K0({ref:t,nextImpl:e}),function(){if((it&2)!==0)throw Error(d(440));return t.impl.apply(void 0,arguments)}}function Yd(e,t){return Fi(4,2,e,t)}function Gd(e,t){return Fi(4,4,e,t)}function Xd(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 Vd(e,t,n){n=n!=null?n.concat([e]):null,Fi(4,4,Xd.bind(null,t,e),n)}function Gs(){}function Qd(e,t){var n=Ut();t=t===void 0?null:t;var a=n.memoizedState;return t!==null&&Rs(t,a[1])?a[0]:(n.memoizedState=[e,t],e)}function Kd(e,t){var n=Ut();t=t===void 0?null:t;var a=n.memoizedState;if(t!==null&&Rs(t,a[1]))return a[0];if(a=e(),sl){Ct(!0);try{e()}finally{Ct(!1)}}return n.memoizedState=[a,t],a}function Xs(e,t,n){return n===void 0||(ia&1073741824)!==0&&($e&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=Ff(),Ve.lanes|=e,Ra|=e,n)}function Zd(e,t,n,a){return mn(n,t)?n:Bl.current!==null?(e=Xs(e,n,a),mn(e,t)||(jt=!0),e):(ia&42)===0||(ia&1073741824)!==0&&($e&261930)===0?(jt=!0,e.memoizedState=n):(e=Ff(),Ve.lanes|=e,Ra|=e,t)}function Fd(e,t,n,a,l){var o=J.p;J.p=o!==0&&8>o?o:8;var c=D.T,p={};D.T=p,Ks(e,!1,t,n);try{var S=l(),R=D.S;if(R!==null&&R(p,S),S!==null&&typeof S=="object"&&typeof S.then=="function"){var N=Y0(S,a);Ho(e,t,N,Sn(e))}else Ho(e,t,a,Sn(e))}catch(G){Ho(e,t,{then:function(){},status:"rejected",reason:G},Sn())}finally{J.p=o,c!==null&&p.types!==null&&(c.types=p.types),D.T=c}}function Z0(){}function Vs(e,t,n,a){if(e.tag!==5)throw Error(d(476));var l=Jd(e).queue;Fd(e,l,t,F,n===null?Z0:function(){return $d(e),n(a)})}function Jd(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:ra,lastRenderedState:F},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ra,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function $d(e){var t=Jd(e);t.next===null&&(t=e.alternate.memoizedState),Ho(e,t.next.queue,{},Sn())}function Qs(){return Ft(Io)}function Wd(){return Ut().memoizedState}function Id(){return Ut().memoizedState}function F0(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Sn();e=za(n);var a=Ma(t,e,n);a!==null&&(dn(a,t,n),Ao(a,t,n)),t={cache:xs()},e.payload=t;return}t=t.return}}function J0(e,t,n){var a=Sn();n={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ji(e)?ef(t,n):(n=cs(e,t,n,a),n!==null&&(dn(n,e,a),tf(n,t,a)))}function Pd(e,t,n){var a=Sn();Ho(e,t,n,a)}function Ho(e,t,n,a){var l={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ji(e))ef(t,l);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var c=t.lastRenderedState,p=o(c,n);if(l.hasEagerState=!0,l.eagerState=p,mn(p,c))return Ti(e,t,l,0),vt===null&&Ei(),!1}catch{}if(n=cs(e,t,l,a),n!==null)return dn(n,e,a),tf(n,t,a),!0}return!1}function Ks(e,t,n,a){if(a={lane:2,revertLane:kc(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Ji(e)){if(t)throw Error(d(479))}else t=cs(e,n,a,2),t!==null&&dn(t,e,2)}function Ji(e){var t=e.alternate;return e===Ve||t!==null&&t===Ve}function ef(e,t){Nl=Gi=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function tf(e,t,n){if((n&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,mi(e,n)}}var Uo={readContext:Ft,use:Qi,useCallback:At,useContext:At,useEffect:At,useImperativeHandle:At,useLayoutEffect:At,useInsertionEffect:At,useMemo:At,useReducer:At,useRef:At,useState:At,useDebugValue:At,useDeferredValue:At,useTransition:At,useSyncExternalStore:At,useId:At,useHostTransitionStatus:At,useFormState:At,useActionState:At,useOptimistic:At,useMemoCache:At,useCacheRefresh:At};Uo.useEffectEvent=At;var nf={readContext:Ft,use:Qi,useCallback:function(e,t){return an().memoizedState=[e,t===void 0?null:t],e},useContext:Ft,useEffect:jd,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Zi(4194308,4,Xd.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Zi(4194308,4,e,t)},useInsertionEffect:function(e,t){Zi(4,2,e,t)},useMemo:function(e,t){var n=an();t=t===void 0?null:t;var a=e();if(sl){Ct(!0);try{e()}finally{Ct(!1)}}return n.memoizedState=[a,t],a},useReducer:function(e,t,n){var a=an();if(n!==void 0){var l=n(t);if(sl){Ct(!0);try{n(t)}finally{Ct(!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=J0.bind(null,Ve,e),[a.memoizedState,e]},useRef:function(e){var t=an();return e={current:e},t.memoizedState=e},useState:function(e){e=js(e);var t=e.queue,n=Pd.bind(null,Ve,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Gs,useDeferredValue:function(e,t){var n=an();return Xs(n,e,t)},useTransition:function(){var e=js(!1);return e=Fd.bind(null,Ve,e.queue,!0,!1),an().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var a=Ve,l=an();if(Ie){if(n===void 0)throw Error(d(407));n=n()}else{if(n=t(),vt===null)throw Error(d(349));($e&127)!==0||wd(a,t,n)}l.memoizedState=n;var o={value:n,getSnapshot:t};return l.queue=o,jd(zd.bind(null,a,o,e),[e]),a.flags|=2048,ql(9,{destroy:void 0},kd.bind(null,a,o,n,t),null),n},useId:function(){var e=an(),t=vt.identifierPrefix;if(Ie){var n=Vn,a=Xn;n=(a&~(1<<32-bt(a)-1)).toString(32)+n,t="_"+t+"R_"+n,n=Xi++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=G0++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Qs,useFormState:Od,useActionState:Od,useOptimistic:function(e){var t=an();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Ks.bind(null,Ve,!0,n),n.dispatch=t,[e,t]},useMemoCache:Us,useCacheRefresh:function(){return an().memoizedState=F0.bind(null,Ve)},useEffectEvent:function(e){var t=an(),n={impl:e};return t.memoizedState=n,function(){if((it&2)!==0)throw Error(d(440));return n.impl.apply(void 0,arguments)}}},Zs={readContext:Ft,use:Qi,useCallback:Qd,useContext:Ft,useEffect:Ys,useImperativeHandle:Vd,useInsertionEffect:Yd,useLayoutEffect:Gd,useMemo:Kd,useReducer:Ki,useRef:Nd,useState:function(){return Ki(ra)},useDebugValue:Gs,useDeferredValue:function(e,t){var n=Ut();return Zd(n,pt.memoizedState,e,t)},useTransition:function(){var e=Ki(ra)[0],t=Ut().memoizedState;return[typeof e=="boolean"?e:Oo(e),t]},useSyncExternalStore:Cd,useId:Wd,useHostTransitionStatus:Qs,useFormState:Hd,useActionState:Hd,useOptimistic:function(e,t){var n=Ut();return Ed(n,pt,e,t)},useMemoCache:Us,useCacheRefresh:Id};Zs.useEffectEvent=qd;var af={readContext:Ft,use:Qi,useCallback:Qd,useContext:Ft,useEffect:Ys,useImperativeHandle:Vd,useInsertionEffect:Yd,useLayoutEffect:Gd,useMemo:Kd,useReducer:Ns,useRef:Nd,useState:function(){return Ns(ra)},useDebugValue:Gs,useDeferredValue:function(e,t){var n=Ut();return pt===null?Xs(n,e,t):Zd(n,pt.memoizedState,e,t)},useTransition:function(){var e=Ns(ra)[0],t=Ut().memoizedState;return[typeof e=="boolean"?e:Oo(e),t]},useSyncExternalStore:Cd,useId:Wd,useHostTransitionStatus:Qs,useFormState:Bd,useActionState:Bd,useOptimistic:function(e,t){var n=Ut();return pt!==null?Ed(n,pt,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:Us,useCacheRefresh:Id};af.useEffectEvent=qd;function Fs(e,t,n,a){t=e.memoizedState,n=n(a,t),n=n==null?t:z({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Js={enqueueSetState:function(e,t,n){e=e._reactInternals;var a=Sn(),l=za(a);l.payload=t,n!=null&&(l.callback=n),t=Ma(e,l,a),t!==null&&(dn(t,e,a),Ao(t,e,a))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var a=Sn(),l=za(a);l.tag=1,l.payload=t,n!=null&&(l.callback=n),t=Ma(e,l,a),t!==null&&(dn(t,e,a),Ao(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Sn(),a=za(n);a.tag=2,t!=null&&(a.callback=t),t=Ma(e,a,n),t!==null&&(dn(t,e,n),Ao(t,e,n))}};function lf(e,t,n,a,l,o,c){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,o,c):t.prototype&&t.prototype.isPureReactComponent?!Co(n,a)||!Co(l,o):!0}function of(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&&Js.enqueueReplaceState(t,t.state,null)}function cl(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=z({},n));for(var l in e)n[l]===void 0&&(n[l]=e[l])}return n}function rf(e){Di(e)}function sf(e){console.error(e)}function cf(e){Di(e)}function $i(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function uf(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 $s(e,t,n){return n=za(n),n.tag=3,n.payload={element:null},n.callback=function(){$i(e,t)},n}function df(e){return e=za(e),e.tag=3,e}function ff(e,t,n,a){var l=n.type.getDerivedStateFromError;if(typeof l=="function"){var o=a.value;e.payload=function(){return l(o)},e.callback=function(){uf(t,n,a)}}var c=n.stateNode;c!==null&&typeof c.componentDidCatch=="function"&&(e.callback=function(){uf(t,n,a),typeof l!="function"&&(La===null?La=new Set([this]):La.add(this));var p=a.stack;this.componentDidCatch(a.value,{componentStack:p!==null?p:""})})}function $0(e,t,n,a,l){if(n.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=n.alternate,t!==null&&Ll(t,n,l,!0),n=yn.current,n!==null){switch(n.tag){case 31:case 13:return Ln===null?sr():n.alternate===null&&Rt===0&&(Rt=3),n.flags&=-257,n.flags|=65536,n.lanes=l,a===Bi?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([a]):t.add(a),Sc(e,a,l)),!1;case 22:return n.flags|=65536,a===Bi?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)),Sc(e,a,l)),!1}throw Error(d(435,n.tag))}return Sc(e,a,l),sr(),!1}if(Ie)return t=yn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=l,a!==ms&&(e=Error(d(422),{cause:a}),zo(En(e,n)))):(a!==ms&&(t=Error(d(423),{cause:a}),zo(En(t,n))),e=e.current.alternate,e.flags|=65536,l&=-l,e.lanes|=l,a=En(a,n),l=$s(e.stateNode,a,l),Ms(e,l),Rt!==4&&(Rt=2)),!1;var o=Error(d(520),{cause:a});if(o=En(o,n),Vo===null?Vo=[o]:Vo.push(o),Rt!==4&&(Rt=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=$s(n.stateNode,a,e),Ms(n,e),!1;case 1:if(t=n.type,o=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||o!==null&&typeof o.componentDidCatch=="function"&&(La===null||!La.has(o))))return n.flags|=65536,l&=-l,n.lanes|=l,l=df(l),ff(l,e,n,a),Ms(n,l),!1}n=n.return}while(n!==null);return!1}var Ws=Error(d(461)),jt=!1;function Jt(e,t,n,a){t.child=e===null?md(t,null,n,a):rl(t,e.child,n,a)}function hf(e,t,n,a,l){n=n.render;var o=t.ref;if("ref"in a){var c={};for(var p in a)p!=="ref"&&(c[p]=a[p])}else c=a;return al(t),a=Ls(e,t,n,c,o,l),p=_s(),e!==null&&!jt?(Os(e,t,l),sa(e,t,l)):(Ie&&p&&hs(t),t.flags|=1,Jt(e,t,a,l),t.child)}function pf(e,t,n,a,l){if(e===null){var o=n.type;return typeof o=="function"&&!us(o)&&o.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=o,mf(e,t,o,a,l)):(e=Ri(n.type,null,a,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!oc(e,l)){var c=o.memoizedProps;if(n=n.compare,n=n!==null?n:Co,n(c,a)&&e.ref===t.ref)return sa(e,t,l)}return t.flags|=1,e=na(o,a),e.ref=t.ref,e.return=t,t.child=e}function mf(e,t,n,a,l){if(e!==null){var o=e.memoizedProps;if(Co(o,a)&&e.ref===t.ref)if(jt=!1,t.pendingProps=a=o,oc(e,l))(e.flags&131072)!==0&&(jt=!0);else return t.lanes=e.lanes,sa(e,t,l)}return Is(e,t,n,a,l)}function gf(e,t,n,a){var l=a.children,o=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(o=o!==null?o.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&~o}else a=0,t.child=null;return yf(e,t,o,n,a)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Hi(t,o!==null?o.cachePool:null),o!==null?bd(t,o):Es(),vd(t);else return a=t.lanes=536870912,yf(e,t,o!==null?o.baseLanes|n:n,n,a)}else o!==null?(Hi(t,o.cachePool),bd(t,o),Ea(),t.memoizedState=null):(e!==null&&Hi(t,null),Es(),Ea());return Jt(e,t,l,n),t.child}function Bo(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function yf(e,t,n,a,l){var o=Cs();return o=o===null?null:{parent:Bt._currentValue,pool:o},t.memoizedState={baseLanes:n,cachePool:o},e!==null&&Hi(t,null),Es(),vd(t),e!==null&&Ll(e,t,a,!0),t.childLanes=l,null}function Wi(e,t){return t=Pi({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function bf(e,t,n){return rl(t,e.child,null,n),e=Wi(t,t.pendingProps),e.flags|=2,bn(t),t.memoizedState=null,e}function W0(e,t,n){var a=t.pendingProps,l=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ie){if(a.mode==="hidden")return e=Wi(t,a),t.lanes=536870912,Bo(null,e);if(As(t),(e=wt)?(e=Ah(e,Rn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:xa!==null?{id:Xn,overflow:Vn}:null,retryLane:536870912,hydrationErrors:null},n=ed(e),n.return=t,t.child=n,Zt=t,wt=null)):e=null,e===null)throw Ca(t);return t.lanes=536870912,null}return Wi(t,a)}var o=e.memoizedState;if(o!==null){var c=o.dehydrated;if(As(t),l)if(t.flags&256)t.flags&=-257,t=bf(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(d(558));else if(jt||Ll(e,t,n,!1),l=(n&e.childLanes)!==0,jt||l){if(a=vt,a!==null&&(c=co(a,n),c!==0&&c!==o.retryLane))throw o.retryLane=c,Pa(e,c),dn(a,e,c),Ws;sr(),t=bf(e,t,n)}else e=o.treeContext,wt=_n(c.nextSibling),Zt=t,Ie=!0,Sa=null,Rn=!1,e!==null&&ad(t,e),t=Wi(t,a),t.flags|=4096;return t}return e=na(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Ii(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 Is(e,t,n,a,l){return al(t),n=Ls(e,t,n,a,void 0,l),a=_s(),e!==null&&!jt?(Os(e,t,l),sa(e,t,l)):(Ie&&a&&hs(t),t.flags|=1,Jt(e,t,n,l),t.child)}function vf(e,t,n,a,l,o){return al(t),t.updateQueue=null,n=Sd(t,a,n,l),xd(e),a=_s(),e!==null&&!jt?(Os(e,t,o),sa(e,t,o)):(Ie&&a&&hs(t),t.flags|=1,Jt(e,t,n,o),t.child)}function xf(e,t,n,a,l){if(al(t),t.stateNode===null){var o=El,c=n.contextType;typeof c=="object"&&c!==null&&(o=Ft(c)),o=new n(a,o),t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=Js,t.stateNode=o,o._reactInternals=t,o=t.stateNode,o.props=a,o.state=t.memoizedState,o.refs={},ks(t),c=n.contextType,o.context=typeof c=="object"&&c!==null?Ft(c):El,o.state=t.memoizedState,c=n.getDerivedStateFromProps,typeof c=="function"&&(Fs(t,n,c,a),o.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(c=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),c!==o.state&&Js.enqueueReplaceState(o,o.state,null),Lo(t,a,o,l),Ro(),o.state=t.memoizedState),typeof o.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){o=t.stateNode;var p=t.memoizedProps,S=cl(n,p);o.props=S;var R=o.context,N=n.contextType;c=El,typeof N=="object"&&N!==null&&(c=Ft(N));var G=n.getDerivedStateFromProps;N=typeof G=="function"||typeof o.getSnapshotBeforeUpdate=="function",p=t.pendingProps!==p,N||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(p||R!==c)&&of(t,o,a,c),ka=!1;var L=t.memoizedState;o.state=L,Lo(t,a,o,l),Ro(),R=t.memoizedState,p||L!==R||ka?(typeof G=="function"&&(Fs(t,n,G,a),R=t.memoizedState),(S=ka||lf(t,n,S,a,L,R,c))?(N||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=R),o.props=a,o.state=R,o.context=c,a=S):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{o=t.stateNode,zs(e,t),c=t.memoizedProps,N=cl(n,c),o.props=N,G=t.pendingProps,L=o.context,R=n.contextType,S=El,typeof R=="object"&&R!==null&&(S=Ft(R)),p=n.getDerivedStateFromProps,(R=typeof p=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(c!==G||L!==S)&&of(t,o,a,S),ka=!1,L=t.memoizedState,o.state=L,Lo(t,a,o,l),Ro();var O=t.memoizedState;c!==G||L!==O||ka||e!==null&&e.dependencies!==null&&_i(e.dependencies)?(typeof p=="function"&&(Fs(t,n,p,a),O=t.memoizedState),(N=ka||lf(t,n,N,a,L,O,S)||e!==null&&e.dependencies!==null&&_i(e.dependencies))?(R||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(a,O,S),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(a,O,S)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||c===e.memoizedProps&&L===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&L===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=O),o.props=a,o.state=O,o.context=S,a=N):(typeof o.componentDidUpdate!="function"||c===e.memoizedProps&&L===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&L===e.memoizedState||(t.flags|=1024),a=!1)}return o=a,Ii(e,t),a=(t.flags&128)!==0,o||a?(o=t.stateNode,n=a&&typeof n.getDerivedStateFromError!="function"?null:o.render(),t.flags|=1,e!==null&&a?(t.child=rl(t,e.child,null,l),t.child=rl(t,null,n,l)):Jt(e,t,n,l),t.memoizedState=o.state,e=t.child):e=sa(e,t,l),e}function Sf(e,t,n,a){return tl(),t.flags|=256,Jt(e,t,n,a),t.child}var Ps={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function ec(e){return{baseLanes:e,cachePool:cd()}}function tc(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=xn),e}function Cf(e,t,n){var a=t.pendingProps,l=!1,o=(t.flags&128)!==0,c;if((c=o)||(c=e!==null&&e.memoizedState===null?!1:(Ht.current&2)!==0),c&&(l=!0,t.flags&=-129),c=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ie){if(l?Da(t):Ea(),(e=wt)?(e=Ah(e,Rn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:xa!==null?{id:Xn,overflow:Vn}:null,retryLane:536870912,hydrationErrors:null},n=ed(e),n.return=t,t.child=n,Zt=t,wt=null)):e=null,e===null)throw Ca(t);return Bc(e)?t.lanes=32:t.lanes=536870912,null}var p=a.children;return a=a.fallback,l?(Ea(),l=t.mode,p=Pi({mode:"hidden",children:p},l),a=el(a,l,n,null),p.return=t,a.return=t,p.sibling=a,t.child=p,a=t.child,a.memoizedState=ec(n),a.childLanes=tc(e,c,n),t.memoizedState=Ps,Bo(null,a)):(Da(t),nc(t,p))}var S=e.memoizedState;if(S!==null&&(p=S.dehydrated,p!==null)){if(o)t.flags&256?(Da(t),t.flags&=-257,t=ac(e,t,n)):t.memoizedState!==null?(Ea(),t.child=e.child,t.flags|=128,t=null):(Ea(),p=a.fallback,l=t.mode,a=Pi({mode:"visible",children:a.children},l),p=el(p,l,n,null),p.flags|=2,a.return=t,p.return=t,a.sibling=p,t.child=a,rl(t,e.child,null,n),a=t.child,a.memoizedState=ec(n),a.childLanes=tc(e,c,n),t.memoizedState=Ps,t=Bo(null,a));else if(Da(t),Bc(p)){if(c=p.nextSibling&&p.nextSibling.dataset,c)var R=c.dgst;c=R,a=Error(d(419)),a.stack="",a.digest=c,zo({value:a,source:null,stack:null}),t=ac(e,t,n)}else if(jt||Ll(e,t,n,!1),c=(n&e.childLanes)!==0,jt||c){if(c=vt,c!==null&&(a=co(c,n),a!==0&&a!==S.retryLane))throw S.retryLane=a,Pa(e,a),dn(c,e,a),Ws;Uc(p)||sr(),t=ac(e,t,n)}else Uc(p)?(t.flags|=192,t.child=e.child,t=null):(e=S.treeContext,wt=_n(p.nextSibling),Zt=t,Ie=!0,Sa=null,Rn=!1,e!==null&&ad(t,e),t=nc(t,a.children),t.flags|=4096);return t}return l?(Ea(),p=a.fallback,l=t.mode,S=e.child,R=S.sibling,a=na(S,{mode:"hidden",children:a.children}),a.subtreeFlags=S.subtreeFlags&65011712,R!==null?p=na(R,p):(p=el(p,l,n,null),p.flags|=2),p.return=t,a.return=t,a.sibling=p,t.child=a,Bo(null,a),a=t.child,p=e.child.memoizedState,p===null?p=ec(n):(l=p.cachePool,l!==null?(S=Bt._currentValue,l=l.parent!==S?{parent:S,pool:S}:l):l=cd(),p={baseLanes:p.baseLanes|n,cachePool:l}),a.memoizedState=p,a.childLanes=tc(e,c,n),t.memoizedState=Ps,Bo(e.child,a)):(Da(t),n=e.child,e=n.sibling,n=na(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 nc(e,t){return t=Pi({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Pi(e,t){return e=gn(22,e,null,t),e.lanes=0,e}function ac(e,t,n){return rl(t,e.child,null,n),e=nc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function wf(e,t,n){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),bs(e.return,t,n)}function lc(e,t,n,a,l,o){var c=e.memoizedState;c===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:n,tailMode:l,treeForkCount:o}:(c.isBackwards=t,c.rendering=null,c.renderingStartTime=0,c.last=a,c.tail=n,c.tailMode=l,c.treeForkCount=o)}function kf(e,t,n){var a=t.pendingProps,l=a.revealOrder,o=a.tail;a=a.children;var c=Ht.current,p=(c&2)!==0;if(p?(c=c&1|2,t.flags|=128):c&=1,P(Ht,c),Jt(e,t,a,n),a=Ie?ko:0,!p&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&wf(e,n,t);else if(e.tag===19)wf(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&&Yi(e)===null&&(l=n),n=n.sibling;n=l,n===null?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),lc(t,!1,l,n,o,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&&Yi(e)===null){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}lc(t,!0,n,null,o,a);break;case"together":lc(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function sa(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ra|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Ll(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=na(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=na(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function oc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&_i(e)))}function I0(e,t,n){switch(t.tag){case 3:yt(t,t.stateNode.containerInfo),wa(t,Bt,e.memoizedState.cache),tl();break;case 27:case 5:Kt(t);break;case 4:yt(t,t.stateNode.containerInfo);break;case 10:wa(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?(Da(t),t.flags|=128,null):(n&t.child.childLanes)!==0?Cf(e,t,n):(Da(t),e=sa(e,t,n),e!==null?e.sibling:null);Da(t);break;case 19:var l=(e.flags&128)!==0;if(a=(n&t.childLanes)!==0,a||(Ll(e,t,n,!1),a=(n&t.childLanes)!==0),l){if(a)return kf(e,t,n);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),P(Ht,Ht.current),a)break;return null;case 22:return t.lanes=0,gf(e,t,n,t.pendingProps);case 24:wa(t,Bt,e.memoizedState.cache)}return sa(e,t,n)}function zf(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)jt=!0;else{if(!oc(e,n)&&(t.flags&128)===0)return jt=!1,I0(e,t,n);jt=(e.flags&131072)!==0}else jt=!1,Ie&&(t.flags&1048576)!==0&&nd(t,ko,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=ol(t.elementType),t.type=e,typeof e=="function")us(e)?(a=cl(e,a),t.tag=1,t=xf(null,t,e,a,n)):(t.tag=0,t=Is(null,t,e,a,n));else{if(e!=null){var l=e.$$typeof;if(l===fe){t.tag=11,t=hf(null,t,e,a,n);break e}else if(l===I){t.tag=14,t=pf(null,t,e,a,n);break e}}throw t=ne(e)||e,Error(d(306,t,""))}}return t;case 0:return Is(e,t,t.type,t.pendingProps,n);case 1:return a=t.type,l=cl(a,t.pendingProps),xf(e,t,a,l,n);case 3:e:{if(yt(t,t.stateNode.containerInfo),e===null)throw Error(d(387));a=t.pendingProps;var o=t.memoizedState;l=o.element,zs(e,t),Lo(t,a,null,n);var c=t.memoizedState;if(a=c.cache,wa(t,Bt,a),a!==o.cache&&vs(t,[Bt],n,!0),Ro(),a=c.element,o.isDehydrated)if(o={element:a,isDehydrated:!1,cache:c.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=Sf(e,t,a,n);break e}else if(a!==l){l=En(Error(d(424)),t),zo(l),t=Sf(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,wt=_n(e.firstChild),Zt=t,Ie=!0,Sa=null,Rn=!0,n=md(t,null,a,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(tl(),a===l){t=sa(e,t,n);break e}Jt(e,t,a,n)}t=t.child}return t;case 26:return Ii(e,t),e===null?(n=Uh(t.type,null,t.pendingProps,null))?t.memoizedState=n:Ie||(n=t.type,e=t.pendingProps,a=mr(De.current).createElement(n),a[Mt]=t,a[Ot]=e,$t(a,n,e),be(a),t.stateNode=a):t.memoizedState=Uh(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Kt(t),e===null&&Ie&&(a=t.stateNode=_h(t.type,t.pendingProps,De.current),Zt=t,Rn=!0,l=wt,Ua(t.type)?(Nc=l,wt=_n(a.firstChild)):wt=l),Jt(e,t,t.pendingProps.children,n),Ii(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ie&&((l=a=wt)&&(a=Em(a,t.type,t.pendingProps,Rn),a!==null?(t.stateNode=a,Zt=t,wt=_n(a.firstChild),Rn=!1,l=!0):l=!1),l||Ca(t)),Kt(t),l=t.type,o=t.pendingProps,c=e!==null?e.memoizedProps:null,a=o.children,_c(l,o)?a=null:c!==null&&_c(l,c)&&(t.flags|=32),t.memoizedState!==null&&(l=Ls(e,t,X0,null,null,n),Io._currentValue=l),Ii(e,t),Jt(e,t,a,n),t.child;case 6:return e===null&&Ie&&((e=n=wt)&&(n=Tm(n,t.pendingProps,Rn),n!==null?(t.stateNode=n,Zt=t,wt=null,e=!0):e=!1),e||Ca(t)),null;case 13:return Cf(e,t,n);case 4:return yt(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=rl(t,null,a,n):Jt(e,t,a,n),t.child;case 11:return hf(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,wa(t,t.type,a.value),Jt(e,t,a.children,n),t.child;case 9:return l=t.type._context,a=t.pendingProps.children,al(t),l=Ft(l),a=a(l),t.flags|=1,Jt(e,t,a,n),t.child;case 14:return pf(e,t,t.type,t.pendingProps,n);case 15:return mf(e,t,t.type,t.pendingProps,n);case 19:return kf(e,t,n);case 31:return W0(e,t,n);case 22:return gf(e,t,n,t.pendingProps);case 24:return al(t),a=Ft(Bt),e===null?(l=Cs(),l===null&&(l=vt,o=xs(),l.pooledCache=o,o.refCount++,o!==null&&(l.pooledCacheLanes|=n),l=o),t.memoizedState={parent:a,cache:l},ks(t),wa(t,Bt,l)):((e.lanes&n)!==0&&(zs(e,t),Lo(t,null,null,n),Ro()),l=e.memoizedState,o=t.memoizedState,l.parent!==a?(l={parent:a,cache:a},t.memoizedState=l,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=l),wa(t,Bt,a)):(a=o.cache,wa(t,Bt,a),a!==l.cache&&vs(t,[Bt],n,!0))),Jt(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(d(156,t.tag))}function ca(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(If())e.flags|=8192;else throw il=Bi,ws}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,!Yh(t))if(If())e.flags|=8192;else throw il=Bi,ws}function er(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?hi():536870912,e.lanes|=t,Vl|=t)}function No(e,t){if(!Ie)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 kt(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 P0(e,t,n){var a=t.pendingProps;switch(ps(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return kt(t),null;case 1:return kt(t),null;case 3:return n=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),oa(Bt),He(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Rl(t)?ca(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,gs())),kt(t),null;case 26:var l=t.type,o=t.memoizedState;return e===null?(ca(t),o!==null?(kt(t),Mf(t,o)):(kt(t),ic(t,l,null,a,n))):o?o!==e.memoizedState?(ca(t),kt(t),Mf(t,o)):(kt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&ca(t),kt(t),ic(t,l,e,a,n)),null;case 27:if(Ke(t),n=De.current,l=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&ca(t);else{if(!a){if(t.stateNode===null)throw Error(d(166));return kt(t),null}e=oe.current,Rl(t)?ld(t):(e=_h(l,a,n),t.stateNode=e,ca(t))}return kt(t),null;case 5:if(Ke(t),l=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&ca(t);else{if(!a){if(t.stateNode===null)throw Error(d(166));return kt(t),null}if(o=oe.current,Rl(t))ld(t);else{var c=mr(De.current);switch(o){case 1:o=c.createElementNS("http://www.w3.org/2000/svg",l);break;case 2:o=c.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;default:switch(l){case"svg":o=c.createElementNS("http://www.w3.org/2000/svg",l);break;case"math":o=c.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;case"script":o=c.createElement("div"),o.innerHTML="<script><\/script>",o=o.removeChild(o.firstChild);break;case"select":o=typeof a.is=="string"?c.createElement("select",{is:a.is}):c.createElement("select"),a.multiple?o.multiple=!0:a.size&&(o.size=a.size);break;default:o=typeof a.is=="string"?c.createElement(l,{is:a.is}):c.createElement(l)}}o[Mt]=t,o[Ot]=a;e:for(c=t.child;c!==null;){if(c.tag===5||c.tag===6)o.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=o;e:switch($t(o,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&&ca(t)}}return kt(t),ic(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&ca(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(d(166));if(e=De.current,Rl(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[Mt]=t,e=!!(e.nodeValue===n||a!==null&&a.suppressHydrationWarning===!0||Ch(e.nodeValue,n)),e||Ca(t,!0)}else e=mr(e).createTextNode(a),e[Mt]=t,t.stateNode=e}return kt(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(a=Rl(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[Mt]=t}else tl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;kt(t),e=!1}else n=gs(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(bn(t),t):(bn(t),null);if((t.flags&128)!==0)throw Error(d(558))}return kt(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(l=Rl(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[Mt]=t}else tl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;kt(t),l=!1}else l=gs(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),l=!0;if(!l)return t.flags&256?(bn(t),t):(bn(t),null)}return bn(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),o=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(o=a.memoizedState.cachePool.pool),o!==l&&(a.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),er(t,t.updateQueue),kt(t),null);case 4:return He(),e===null&&Ec(t.stateNode.containerInfo),kt(t),null;case 10:return oa(t.type),kt(t),null;case 19:if(_(Ht),a=t.memoizedState,a===null)return kt(t),null;if(l=(t.flags&128)!==0,o=a.rendering,o===null)if(l)No(a,!1);else{if(Rt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(o=Yi(e),o!==null){for(t.flags|=128,No(a,!1),e=o.updateQueue,t.updateQueue=e,er(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Pu(n,e),n=n.sibling;return P(Ht,Ht.current&1|2),Ie&&aa(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&Tt()>or&&(t.flags|=128,l=!0,No(a,!1),t.lanes=4194304)}else{if(!l)if(e=Yi(o),e!==null){if(t.flags|=128,l=!0,e=e.updateQueue,t.updateQueue=e,er(t,e),No(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!Ie)return kt(t),null}else 2*Tt()-a.renderingStartTime>or&&n!==536870912&&(t.flags|=128,l=!0,No(a,!1),t.lanes=4194304);a.isBackwards?(o.sibling=t.child,t.child=o):(e=a.last,e!==null?e.sibling=o:t.child=o,a.last=o)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=Tt(),e.sibling=null,n=Ht.current,P(Ht,l?n&1|2:n&1),Ie&&aa(t,a.treeForkCount),e):(kt(t),null);case 22:case 23:return bn(t),Ts(),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&&(kt(t),t.subtreeFlags&6&&(t.flags|=8192)):kt(t),n=t.updateQueue,n!==null&&er(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&&_(ll),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),oa(Bt),kt(t),null;case 25:return null;case 30:return null}throw Error(d(156,t.tag))}function em(e,t){switch(ps(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return oa(Bt),He(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ke(t),null;case 31:if(t.memoizedState!==null){if(bn(t),t.alternate===null)throw Error(d(340));tl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(bn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(d(340));tl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return _(Ht),null;case 4:return He(),null;case 10:return oa(t.type),null;case 22:case 23:return bn(t),Ts(),e!==null&&_(ll),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return oa(Bt),null;case 25:return null;default:return null}}function Df(e,t){switch(ps(t),t.tag){case 3:oa(Bt),He();break;case 26:case 27:case 5:Ke(t);break;case 4:He();break;case 31:t.memoizedState!==null&&bn(t);break;case 13:bn(t);break;case 19:_(Ht);break;case 10:oa(t.type);break;case 22:case 23:bn(t),Ts(),e!==null&&_(ll);break;case 24:oa(Bt)}}function jo(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 o=n.create,c=n.inst;a=o(),c.destroy=a}n=n.next}while(n!==l)}}catch(p){ft(t,t.return,p)}}function Ta(e,t,n){try{var a=t.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var o=l.next;a=o;do{if((a.tag&e)===e){var c=a.inst,p=c.destroy;if(p!==void 0){c.destroy=void 0,l=t;var S=n,R=p;try{R()}catch(N){ft(l,S,N)}}}a=a.next}while(a!==o)}}catch(N){ft(t,t.return,N)}}function Ef(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{yd(t,n)}catch(a){ft(e,e.return,a)}}}function Tf(e,t,n){n.props=cl(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(a){ft(e,t,a)}}function qo(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){ft(e,t,l)}}function Qn(e,t){var n=e.ref,a=e.refCleanup;if(n!==null)if(typeof a=="function")try{a()}catch(l){ft(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){ft(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){ft(e,e.return,l)}}function rc(e,t,n){try{var a=e.stateNode;Cm(a,e.type,n,t),a[Ot]=t}catch(l){ft(e,e.return,l)}}function Rf(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ua(e.type)||e.tag===4}function sc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Rf(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 cc(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=ea));else if(a!==4&&(a===27&&Ua(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(cc(e,t,n),e=e.sibling;e!==null;)cc(e,t,n),e=e.sibling}function tr(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(tr(e,t,n),e=e.sibling;e!==null;)tr(e,t,n),e=e.sibling}function Lf(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[Mt]=e,t[Ot]=n}catch(o){ft(e,e.return,o)}}var ua=!1,qt=!1,uc=!1,_f=typeof WeakSet=="function"?WeakSet:Set,Qt=null;function tm(e,t){if(e=e.containerInfo,Rc=Cr,e=Vu(e),as(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,o=a.focusNode;a=a.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var c=0,p=-1,S=-1,R=0,N=0,G=e,L=null;t:for(;;){for(var O;G!==n||l!==0&&G.nodeType!==3||(p=c+l),G!==o||a!==0&&G.nodeType!==3||(S=c+a),G.nodeType===3&&(c+=G.nodeValue.length),(O=G.firstChild)!==null;)L=G,G=O;for(;;){if(G===e)break t;if(L===n&&++R===l&&(p=c),L===o&&++N===a&&(S=c),(O=G.nextSibling)!==null)break;G=L,L=G.parentNode}G=O}n=p===-1||S===-1?null:{start:p,end:S}}else n=null}n=n||{start:0,end:0}}else n=null;for(Lc={focusedElem:e,selectionRange:n},Cr=!1,Qt=t;Qt!==null;)if(t=Qt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Qt=e;else for(;Qt!==null;){switch(t=Qt,o=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&&o!==null){e=void 0,n=t,l=o.memoizedProps,o=o.memoizedState,a=n.stateNode;try{var ge=cl(n.type,l);e=a.getSnapshotBeforeUpdate(ge,o),a.__reactInternalSnapshotBeforeUpdate=e}catch(Te){ft(n,n.return,Te)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)Hc(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Hc(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,Qt=e;break}Qt=t.return}}function Of(e,t,n){var a=n.flags;switch(n.tag){case 0:case 11:case 15:fa(e,n),a&4&&jo(5,n);break;case 1:if(fa(e,n),a&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(c){ft(n,n.return,c)}else{var l=cl(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(l,t,e.__reactInternalSnapshotBeforeUpdate)}catch(c){ft(n,n.return,c)}}a&64&&Ef(n),a&512&&qo(n,n.return);break;case 3:if(fa(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{yd(e,t)}catch(c){ft(n,n.return,c)}}break;case 27:t===null&&a&4&&Lf(n);case 26:case 5:fa(e,n),t===null&&a&4&&Af(n),a&512&&qo(n,n.return);break;case 12:fa(e,n);break;case 31:fa(e,n),a&4&&Bf(e,n);break;case 13:fa(e,n),a&4&&Nf(e,n),a&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=um.bind(null,n),Am(e,n))));break;case 22:if(a=n.memoizedState!==null||ua,!a){t=t!==null&&t.memoizedState!==null||qt,l=ua;var o=qt;ua=a,(qt=t)&&!o?ha(e,n,(n.subtreeFlags&8772)!==0):fa(e,n),ua=l,qt=o}break;case 30:break;default:fa(e,n)}}function Hf(e){var t=e.alternate;t!==null&&(e.alternate=null,Hf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ho(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 Dt=null,rn=!1;function da(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:qt||Qn(n,t),da(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:qt||Qn(n,t);var a=Dt,l=rn;Ua(n.type)&&(Dt=n.stateNode,rn=!1),da(e,t,n),Jo(n.stateNode),Dt=a,rn=l;break;case 5:qt||Qn(n,t);case 6:if(a=Dt,l=rn,Dt=null,da(e,t,n),Dt=a,rn=l,Dt!==null)if(rn)try{(Dt.nodeType===9?Dt.body:Dt.nodeName==="HTML"?Dt.ownerDocument.body:Dt).removeChild(n.stateNode)}catch(o){ft(n,t,o)}else try{Dt.removeChild(n.stateNode)}catch(o){ft(n,t,o)}break;case 18:Dt!==null&&(rn?(e=Dt,Eh(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Il(e)):Eh(Dt,n.stateNode));break;case 4:a=Dt,l=rn,Dt=n.stateNode.containerInfo,rn=!0,da(e,t,n),Dt=a,rn=l;break;case 0:case 11:case 14:case 15:Ta(2,n,t),qt||Ta(4,n,t),da(e,t,n);break;case 1:qt||(Qn(n,t),a=n.stateNode,typeof a.componentWillUnmount=="function"&&Tf(n,t,a)),da(e,t,n);break;case 21:da(e,t,n);break;case 22:qt=(a=qt)||n.memoizedState!==null,da(e,t,n),qt=a;break;default:da(e,t,n)}}function Bf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Il(e)}catch(n){ft(t,t.return,n)}}}function Nf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Il(e)}catch(n){ft(t,t.return,n)}}function nm(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 nr(e,t){var n=nm(e);t.forEach(function(a){if(!n.has(a)){n.add(a);var l=dm.bind(null,e,a);a.then(l,l)}})}function sn(e,t){var n=t.deletions;if(n!==null)for(var a=0;a<n.length;a++){var l=n[a],o=e,c=t,p=c;e:for(;p!==null;){switch(p.tag){case 27:if(Ua(p.type)){Dt=p.stateNode,rn=!1;break e}break;case 5:Dt=p.stateNode,rn=!1;break e;case 3:case 4:Dt=p.stateNode.containerInfo,rn=!0;break e}p=p.return}if(Dt===null)throw Error(d(160));Uf(o,c,l),Dt=null,rn=!1,o=l.alternate,o!==null&&(o.return=null),l.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)jf(t,e),t=t.sibling}var Nn=null;function jf(e,t){var n=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:sn(t,e),cn(e),a&4&&(Ta(3,e,e.return),jo(3,e),Ta(5,e,e.return));break;case 1:sn(t,e),cn(e),a&512&&(qt||n===null||Qn(n,n.return)),a&64&&ua&&(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=Nn;if(sn(t,e),cn(e),a&512&&(qt||n===null||Qn(n,n.return)),a&4){var o=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":o=l.getElementsByTagName("title")[0],(!o||o[Ja]||o[Mt]||o.namespaceURI==="http://www.w3.org/2000/svg"||o.hasAttribute("itemprop"))&&(o=l.createElement(a),l.head.insertBefore(o,l.querySelector("head > title"))),$t(o,a,n),o[Mt]=e,be(o),a=o;break e;case"link":var c=jh("link","href",l).get(a+(n.href||""));if(c){for(var p=0;p<c.length;p++)if(o=c[p],o.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&o.getAttribute("rel")===(n.rel==null?null:n.rel)&&o.getAttribute("title")===(n.title==null?null:n.title)&&o.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){c.splice(p,1);break t}}o=l.createElement(a),$t(o,a,n),l.head.appendChild(o);break;case"meta":if(c=jh("meta","content",l).get(a+(n.content||""))){for(p=0;p<c.length;p++)if(o=c[p],o.getAttribute("content")===(n.content==null?null:""+n.content)&&o.getAttribute("name")===(n.name==null?null:n.name)&&o.getAttribute("property")===(n.property==null?null:n.property)&&o.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute("charset")===(n.charSet==null?null:n.charSet)){c.splice(p,1);break t}}o=l.createElement(a),$t(o,a,n),l.head.appendChild(o);break;default:throw Error(d(468,a))}o[Mt]=e,be(o),a=o}e.stateNode=a}else qh(l,e.type,e.stateNode);else e.stateNode=Nh(l,a,e.memoizedProps);else o!==a?(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,a===null?qh(l,e.type,e.stateNode):Nh(l,a,e.memoizedProps)):a===null&&e.stateNode!==null&&rc(e,e.memoizedProps,n.memoizedProps)}break;case 27:sn(t,e),cn(e),a&512&&(qt||n===null||Qn(n,n.return)),n!==null&&a&4&&rc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(sn(t,e),cn(e),a&512&&(qt||n===null||Qn(n,n.return)),e.flags&32){l=e.stateNode;try{Sl(l,"")}catch(ge){ft(e,e.return,ge)}}a&4&&e.stateNode!=null&&(l=e.memoizedProps,rc(e,l,n!==null?n.memoizedProps:l)),a&1024&&(uc=!0);break;case 6:if(sn(t,e),cn(e),a&4){if(e.stateNode===null)throw Error(d(162));a=e.memoizedProps,n=e.stateNode;try{n.nodeValue=a}catch(ge){ft(e,e.return,ge)}}break;case 3:if(br=null,l=Nn,Nn=gr(t.containerInfo),sn(t,e),Nn=l,cn(e),a&4&&n!==null&&n.memoizedState.isDehydrated)try{Il(t.containerInfo)}catch(ge){ft(e,e.return,ge)}uc&&(uc=!1,qf(e));break;case 4:a=Nn,Nn=gr(e.stateNode.containerInfo),sn(t,e),cn(e),Nn=a;break;case 12:sn(t,e),cn(e);break;case 31:sn(t,e),cn(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,nr(e,a)));break;case 13:sn(t,e),cn(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(lr=Tt()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,nr(e,a)));break;case 22:l=e.memoizedState!==null;var S=n!==null&&n.memoizedState!==null,R=ua,N=qt;if(ua=R||l,qt=N||S,sn(t,e),qt=N,ua=R,cn(e),a&8192)e:for(t=e.stateNode,t._visibility=l?t._visibility&-2:t._visibility|1,l&&(n===null||S||ua||qt||ul(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){S=n=t;try{if(o=S.stateNode,l)c=o.style,typeof c.setProperty=="function"?c.setProperty("display","none","important"):c.display="none";else{p=S.stateNode;var G=S.memoizedProps.style,L=G!=null&&G.hasOwnProperty("display")?G.display:null;p.style.display=L==null||typeof L=="boolean"?"":(""+L).trim()}}catch(ge){ft(S,S.return,ge)}}}else if(t.tag===6){if(n===null){S=t;try{S.stateNode.nodeValue=l?"":S.memoizedProps}catch(ge){ft(S,S.return,ge)}}}else if(t.tag===18){if(n===null){S=t;try{var O=S.stateNode;l?Th(O,!0):Th(S.stateNode,!1)}catch(ge){ft(S,S.return,ge)}}}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,nr(e,n))));break;case 19:sn(t,e),cn(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,nr(e,a)));break;case 30:break;case 21:break;default:sn(t,e),cn(e)}}function cn(e){var t=e.flags;if(t&2){try{for(var n,a=e.return;a!==null;){if(Rf(a)){n=a;break}a=a.return}if(n==null)throw Error(d(160));switch(n.tag){case 27:var l=n.stateNode,o=sc(e);tr(e,o,l);break;case 5:var c=n.stateNode;n.flags&32&&(Sl(c,""),n.flags&=-33);var p=sc(e);tr(e,p,c);break;case 3:case 4:var S=n.stateNode.containerInfo,R=sc(e);cc(e,R,S);break;default:throw Error(d(161))}}catch(N){ft(e,e.return,N)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function qf(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;qf(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function fa(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Of(e,t.alternate,t),t=t.sibling}function ul(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ta(4,t,t.return),ul(t);break;case 1:Qn(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&Tf(t,t.return,n),ul(t);break;case 27:Jo(t.stateNode);case 26:case 5:Qn(t,t.return),ul(t);break;case 22:t.memoizedState===null&&ul(t);break;case 30:ul(t);break;default:ul(t)}e=e.sibling}}function ha(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,l=e,o=t,c=o.flags;switch(o.tag){case 0:case 11:case 15:ha(l,o,n),jo(4,o);break;case 1:if(ha(l,o,n),a=o,l=a.stateNode,typeof l.componentDidMount=="function")try{l.componentDidMount()}catch(R){ft(a,a.return,R)}if(a=o,l=a.updateQueue,l!==null){var p=a.stateNode;try{var S=l.shared.hiddenCallbacks;if(S!==null)for(l.shared.hiddenCallbacks=null,l=0;l<S.length;l++)gd(S[l],p)}catch(R){ft(a,a.return,R)}}n&&c&64&&Ef(o),qo(o,o.return);break;case 27:Lf(o);case 26:case 5:ha(l,o,n),n&&a===null&&c&4&&Af(o),qo(o,o.return);break;case 12:ha(l,o,n);break;case 31:ha(l,o,n),n&&c&4&&Bf(l,o);break;case 13:ha(l,o,n),n&&c&4&&Nf(l,o);break;case 22:o.memoizedState===null&&ha(l,o,n),qo(o,o.return);break;case 30:break;default:ha(l,o,n)}t=t.sibling}}function dc(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&&Mo(n))}function fc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Mo(e))}function jn(e,t,n,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Yf(e,t,n,a),t=t.sibling}function Yf(e,t,n,a){var l=t.flags;switch(t.tag){case 0:case 11:case 15:jn(e,t,n,a),l&2048&&jo(9,t);break;case 1:jn(e,t,n,a);break;case 3:jn(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&&Mo(e)));break;case 12:if(l&2048){jn(e,t,n,a),e=t.stateNode;try{var o=t.memoizedProps,c=o.id,p=o.onPostCommit;typeof p=="function"&&p(c,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(S){ft(t,t.return,S)}}else jn(e,t,n,a);break;case 31:jn(e,t,n,a);break;case 13:jn(e,t,n,a);break;case 23:break;case 22:o=t.stateNode,c=t.alternate,t.memoizedState!==null?o._visibility&2?jn(e,t,n,a):Yo(e,t):o._visibility&2?jn(e,t,n,a):(o._visibility|=2,Yl(e,t,n,a,(t.subtreeFlags&10256)!==0||!1)),l&2048&&dc(c,t);break;case 24:jn(e,t,n,a),l&2048&&fc(t.alternate,t);break;default:jn(e,t,n,a)}}function Yl(e,t,n,a,l){for(l=l&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var o=e,c=t,p=n,S=a,R=c.flags;switch(c.tag){case 0:case 11:case 15:Yl(o,c,p,S,l),jo(8,c);break;case 23:break;case 22:var N=c.stateNode;c.memoizedState!==null?N._visibility&2?Yl(o,c,p,S,l):Yo(o,c):(N._visibility|=2,Yl(o,c,p,S,l)),l&&R&2048&&dc(c.alternate,c);break;case 24:Yl(o,c,p,S,l),l&&R&2048&&fc(c.alternate,c);break;default:Yl(o,c,p,S,l)}t=t.sibling}}function Yo(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:Yo(n,a),l&2048&&dc(a.alternate,a);break;case 24:Yo(n,a),l&2048&&fc(a.alternate,a);break;default:Yo(n,a)}t=t.sibling}}var Go=8192;function Gl(e,t,n){if(e.subtreeFlags&Go)for(e=e.child;e!==null;)Gf(e,t,n),e=e.sibling}function Gf(e,t,n){switch(e.tag){case 26:Gl(e,t,n),e.flags&Go&&e.memoizedState!==null&&Gm(n,Nn,e.memoizedState,e.memoizedProps);break;case 5:Gl(e,t,n);break;case 3:case 4:var a=Nn;Nn=gr(e.stateNode.containerInfo),Gl(e,t,n),Nn=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=Go,Go=16777216,Gl(e,t,n),Go=a):Gl(e,t,n));break;default:Gl(e,t,n)}}function Xf(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 Xo(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];Qt=a,Qf(a,e)}Xf(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Vf(e),e=e.sibling}function Vf(e){switch(e.tag){case 0:case 11:case 15:Xo(e),e.flags&2048&&Ta(9,e,e.return);break;case 3:Xo(e);break;case 12:Xo(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,ar(e)):Xo(e);break;default:Xo(e)}}function ar(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];Qt=a,Qf(a,e)}Xf(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ta(8,t,t.return),ar(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,ar(t));break;default:ar(t)}e=e.sibling}}function Qf(e,t){for(;Qt!==null;){var n=Qt;switch(n.tag){case 0:case 11:case 15:Ta(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:Mo(n.memoizedState.cache)}if(a=n.child,a!==null)a.return=n,Qt=a;else e:for(n=e;Qt!==null;){a=Qt;var l=a.sibling,o=a.return;if(Hf(a),a===n){Qt=null;break e}if(l!==null){l.return=o,Qt=l;break e}Qt=o}}}var am={getCacheForType:function(e){var t=Ft(Bt),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Ft(Bt).controller.signal}},lm=typeof WeakMap=="function"?WeakMap:Map,it=0,vt=null,Ze=null,$e=0,dt=0,vn=null,Aa=!1,Xl=!1,hc=!1,pa=0,Rt=0,Ra=0,dl=0,pc=0,xn=0,Vl=0,Vo=null,un=null,mc=!1,lr=0,Kf=0,or=1/0,ir=null,La=null,Xt=0,_a=null,Ql=null,ma=0,gc=0,yc=null,Zf=null,Qo=0,bc=null;function Sn(){return(it&2)!==0&&$e!==0?$e&-$e:D.T!==null?kc():gi()}function Ff(){if(xn===0)if(($e&536870912)===0||Ie){var e=yl;yl<<=1,(yl&3932160)===0&&(yl=262144),xn=e}else xn=536870912;return e=yn.current,e!==null&&(e.flags|=32),xn}function dn(e,t,n){(e===vt&&(dt===2||dt===9)||e.cancelPendingCommit!==null)&&(Kl(e,0),Oa(e,$e,xn,!1)),Fa(e,n),((it&2)===0||e!==vt)&&(e===vt&&((it&2)===0&&(dl|=n),Rt===4&&Oa(e,$e,xn,!1)),Kn(e))}function Jf(e,t,n){if((it&6)!==0)throw Error(d(327));var a=!n&&(t&127)===0&&(t&e.expiredLanes)===0||Za(e,t),l=a?rm(e,t):xc(e,t,!0),o=a;do{if(l===0){Xl&&!a&&Oa(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!om(n)){l=xc(e,t,!1),o=!1;continue}if(l===2){if(o=t,e.errorRecoveryDisabledLanes&o)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=Vo;var S=p.current.memoizedState.isDehydrated;if(S&&(Kl(p,c).flags|=256),c=xc(p,c,!1),c!==2){if(hc&&!S){p.errorRecoveryDisabledLanes|=o,dl|=o,l=4;break e}o=un,un=l,o!==null&&(un===null?un=o:un.push.apply(un,o))}l=c}if(o=!1,l!==2)continue}}if(l===1){Kl(e,0),Oa(e,t,0,!0);break}e:{switch(a=e,o=l,o){case 0:case 1:throw Error(d(345));case 4:if((t&4194048)!==t)break;case 6:Oa(a,t,xn,!Aa);break e;case 2:un=null;break;case 3:case 5:break;default:throw Error(d(329))}if((t&62914560)===t&&(l=lr+300-Tt(),10<l)){if(Oa(a,t,xn,!Aa),bl(a,0,!0)!==0)break e;ma=t,a.timeoutHandle=Mh($f.bind(null,a,n,un,ir,mc,t,xn,dl,Vl,Aa,o,"Throttled",-0,0),l);break e}$f(a,n,un,ir,mc,t,xn,dl,Vl,Aa,o,null,-0,0)}}break}while(!0);Kn(e)}function $f(e,t,n,a,l,o,c,p,S,R,N,G,L,O){if(e.timeoutHandle=-1,G=t.subtreeFlags,G&8192||(G&16785408)===16785408){G={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ea},Gf(t,o,G);var ge=(o&62914560)===o?lr-Tt():(o&4194048)===o?Kf-Tt():0;if(ge=Xm(G,ge),ge!==null){ma=o,e.cancelPendingCommit=ge(lh.bind(null,e,t,o,n,a,l,c,p,S,N,G,null,L,O)),Oa(e,o,c,!R);return}}lh(e,t,o,n,a,l,c,p,S)}function om(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],o=l.getSnapshot;l=l.value;try{if(!mn(o(),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&=~pc,t&=~dl,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var l=t;0<l;){var o=31-bt(l),c=1<<o;a[o]=-1,l&=~c}n!==0&&pi(e,n,t)}function rr(){return(it&6)===0?(Ko(0),!1):!0}function vc(){if(Ze!==null){if(dt===0)var e=Ze.return;else e=Ze,la=nl=null,Hs(e),Ul=null,Eo=0,e=Ze;for(;e!==null;)Df(e.alternate,e),e=e.return;Ze=null}}function Kl(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,zm(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),ma=0,vc(),vt=e,Ze=n=na(e.current,null),$e=t,dt=0,vn=null,Aa=!1,Xl=Za(e,t),hc=!1,Vl=xn=pc=dl=Ra=Rt=0,un=Vo=null,mc=!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-bt(a),o=1<<l;t|=e[l],a&=~o}return pa=t,Ei(),n}function Wf(e,t){Ve=null,D.H=Uo,t===Hl||t===Ui?(t=fd(),dt=3):t===ws?(t=fd(),dt=4):dt=t===Ws?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,vn=t,Ze===null&&(Rt=1,$i(e,En(t,e.current)))}function If(){var e=yn.current;return e===null?!0:($e&4194048)===$e?Ln===null:($e&62914560)===$e||($e&536870912)!==0?e===Ln:!1}function Pf(){var e=D.H;return D.H=Uo,e===null?Uo:e}function eh(){var e=D.A;return D.A=am,e}function sr(){Rt=4,Aa||($e&4194048)!==$e&&yn.current!==null||(Xl=!0),(Ra&134217727)===0&&(dl&134217727)===0||vt===null||Oa(vt,$e,xn,!1)}function xc(e,t,n){var a=it;it|=2;var l=Pf(),o=eh();(vt!==e||$e!==t)&&(ir=null,Kl(e,t)),t=!1;var c=Rt;e:do try{if(dt!==0&&Ze!==null){var p=Ze,S=vn;switch(dt){case 8:vc(),c=6;break e;case 3:case 2:case 9:case 6:yn.current===null&&(t=!0);var R=dt;if(dt=0,vn=null,Zl(e,p,S,R),n&&Xl){c=0;break e}break;default:R=dt,dt=0,vn=null,Zl(e,p,S,R)}}im(),c=Rt;break}catch(N){Wf(e,N)}while(!0);return t&&e.shellSuspendCounter++,la=nl=null,it=a,D.H=l,D.A=o,Ze===null&&(vt=null,$e=0,Ei()),c}function im(){for(;Ze!==null;)th(Ze)}function rm(e,t){var n=it;it|=2;var a=Pf(),l=eh();vt!==e||$e!==t?(ir=null,or=Tt()+500,Kl(e,t)):Xl=Za(e,t);e:do try{if(dt!==0&&Ze!==null){t=Ze;var o=vn;t:switch(dt){case 1:dt=0,vn=null,Zl(e,t,o,1);break;case 2:case 9:if(ud(o)){dt=0,vn=null,nh(t);break}t=function(){dt!==2&&dt!==9||vt!==e||(dt=7),Kn(e)},o.then(t,t);break e;case 3:dt=7;break e;case 4:dt=5;break e;case 7:ud(o)?(dt=0,vn=null,nh(t)):(dt=0,vn=null,Zl(e,t,o,7));break;case 5:var c=null;switch(Ze.tag){case 26:c=Ze.memoizedState;case 5:case 27:var p=Ze;if(c?Yh(c):p.stateNode.complete){dt=0,vn=null;var S=p.sibling;if(S!==null)Ze=S;else{var R=p.return;R!==null?(Ze=R,cr(R)):Ze=null}break t}}dt=0,vn=null,Zl(e,t,o,5);break;case 6:dt=0,vn=null,Zl(e,t,o,6);break;case 8:vc(),Rt=6;break e;default:throw Error(d(462))}}sm();break}catch(N){Wf(e,N)}while(!0);return la=nl=null,D.H=a,D.A=l,it=n,Ze!==null?0:(vt=null,$e=0,Ei(),Rt)}function sm(){for(;Ze!==null&&!zt();)th(Ze)}function th(e){var t=zf(e.alternate,e,pa);e.memoizedProps=e.pendingProps,t===null?cr(e):Ze=t}function nh(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=vf(n,t,t.pendingProps,t.type,void 0,$e);break;case 11:t=vf(n,t,t.pendingProps,t.type.render,t.ref,$e);break;case 5:Hs(t);default:Df(n,t),t=Ze=Pu(t,pa),t=zf(n,t,pa)}e.memoizedProps=e.pendingProps,t===null?cr(e):Ze=t}function Zl(e,t,n,a){la=nl=null,Hs(t),Ul=null,Eo=0;var l=t.return;try{if($0(e,l,t,n,$e)){Rt=1,$i(e,En(n,e.current)),Ze=null;return}}catch(o){if(l!==null)throw Ze=l,o;Rt=1,$i(e,En(n,e.current)),Ze=null;return}t.flags&32768?(Ie||a===1?e=!0:Xl||($e&536870912)!==0?e=!1:(Aa=e=!0,(a===2||a===9||a===3||a===6)&&(a=yn.current,a!==null&&a.tag===13&&(a.flags|=16384))),ah(t,e)):cr(t)}function cr(e){var t=e;do{if((t.flags&32768)!==0){ah(t,Aa);return}e=t.return;var n=P0(t.alternate,t,pa);if(n!==null){Ze=n;return}if(t=t.sibling,t!==null){Ze=t;return}Ze=t=e}while(t!==null);Rt===0&&(Rt=5)}function ah(e,t){do{var n=em(e.alternate,e);if(n!==null){n.flags&=32767,Ze=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Ze=e;return}Ze=e=n}while(e!==null);Rt=6,Ze=null}function lh(e,t,n,a,l,o,c,p,S){e.cancelPendingCommit=null;do ur();while(Xt!==0);if((it&6)!==0)throw Error(d(327));if(t!==null){if(t===e.current)throw Error(d(177));if(o=t.lanes|t.childLanes,o|=ss,qr(e,n,o,c,p,S),e===vt&&(Ze=vt=null,$e=0),Ql=t,_a=e,ma=n,gc=o,yc=l,Zf=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,fm(kn,function(){return ch(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=D.T,D.T=null,l=J.p,J.p=2,c=it,it|=4;try{tm(e,t,n)}finally{it=c,J.p=l,D.T=a}}Xt=1,oh(),ih(),rh()}}function oh(){if(Xt===1){Xt=0;var e=_a,t=Ql,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=D.T,D.T=null;var a=J.p;J.p=2;var l=it;it|=4;try{jf(t,e);var o=Lc,c=Vu(e.containerInfo),p=o.focusedElem,S=o.selectionRange;if(c!==p&&p&&p.ownerDocument&&Xu(p.ownerDocument.documentElement,p)){if(S!==null&&as(p)){var R=S.start,N=S.end;if(N===void 0&&(N=R),"selectionStart"in p)p.selectionStart=R,p.selectionEnd=Math.min(N,p.value.length);else{var G=p.ownerDocument||document,L=G&&G.defaultView||window;if(L.getSelection){var O=L.getSelection(),ge=p.textContent.length,Te=Math.min(S.start,ge),gt=S.end===void 0?Te:Math.min(S.end,ge);!O.extend&&Te>gt&&(c=gt,gt=Te,Te=c);var M=Gu(p,Te),k=Gu(p,gt);if(M&&k&&(O.rangeCount!==1||O.anchorNode!==M.node||O.anchorOffset!==M.offset||O.focusNode!==k.node||O.focusOffset!==k.offset)){var T=G.createRange();T.setStart(M.node,M.offset),O.removeAllRanges(),Te>gt?(O.addRange(T),O.extend(k.node,k.offset)):(T.setEnd(k.node,k.offset),O.addRange(T))}}}}for(G=[],O=p;O=O.parentNode;)O.nodeType===1&&G.push({element:O,left:O.scrollLeft,top:O.scrollTop});for(typeof p.focus=="function"&&p.focus(),p=0;p<G.length;p++){var j=G[p];j.element.scrollLeft=j.left,j.element.scrollTop=j.top}}Cr=!!Rc,Lc=Rc=null}finally{it=l,J.p=a,D.T=n}}e.current=t,Xt=2}}function ih(){if(Xt===2){Xt=0;var e=_a,t=Ql,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=D.T,D.T=null;var a=J.p;J.p=2;var l=it;it|=4;try{Of(e,t.alternate,t)}finally{it=l,J.p=a,D.T=n}}Xt=3}}function rh(){if(Xt===4||Xt===3){Xt=0,Le();var e=_a,t=Ql,n=ma,a=Zf;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Xt=5:(Xt=0,Ql=_a=null,sh(e,e.pendingLanes));var l=e.pendingLanes;if(l===0&&(La=null),uo(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=D.T,l=J.p,J.p=2,D.T=null;try{for(var o=e.onRecoverableError,c=0;c<a.length;c++){var p=a[c];o(p.value,{componentStack:p.stack})}}finally{D.T=t,J.p=l}}(ma&3)!==0&&ur(),Kn(e),l=e.pendingLanes,(n&261930)!==0&&(l&42)!==0?e===bc?Qo++:(Qo=0,bc=e):Qo=0,Ko(0)}}function sh(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Mo(t)))}function ur(){return oh(),ih(),rh(),ch()}function ch(){if(Xt!==5)return!1;var e=_a,t=gc;gc=0;var n=uo(ma),a=D.T,l=J.p;try{J.p=32>n?32:n,D.T=null,n=yc,yc=null;var o=_a,c=ma;if(Xt=0,Ql=_a=null,ma=0,(it&6)!==0)throw Error(d(331));var p=it;if(it|=4,Vf(o.current),Yf(o,o.current,c,n),it=p,Ko(0,!1),Me&&typeof Me.onPostCommitFiberRoot=="function")try{Me.onPostCommitFiberRoot(Ne,o)}catch{}return!0}finally{J.p=l,D.T=a,sh(e,t)}}function uh(e,t,n){t=En(n,t),t=$s(e.stateNode,t,2),e=Ma(e,t,2),e!==null&&(Fa(e,2),Kn(e))}function ft(e,t,n){if(e.tag===3)uh(e,e,n);else for(;t!==null;){if(t.tag===3){uh(t,e,n);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(La===null||!La.has(a))){e=En(n,e),n=df(2),a=Ma(t,n,2),a!==null&&(ff(n,a,t,e),Fa(a,2),Kn(a));break}}t=t.return}}function Sc(e,t,n){var a=e.pingCache;if(a===null){a=e.pingCache=new lm;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)||(hc=!0,l.add(n),e=cm.bind(null,e,t,n),t.then(e,e))}function cm(e,t,n){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,vt===e&&($e&n)===n&&(Rt===4||Rt===3&&($e&62914560)===$e&&300>Tt()-lr?(it&2)===0&&Kl(e,0):pc|=n,Vl===$e&&(Vl=0)),Kn(e)}function dh(e,t){t===0&&(t=hi()),e=Pa(e,t),e!==null&&(Fa(e,t),Kn(e))}function um(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),dh(e,n)}function dm(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),dh(e,n)}function fm(e,t){return ht(e,t)}var dr=null,Fl=null,Cc=!1,fr=!1,wc=!1,Ha=0;function Kn(e){e!==Fl&&e.next===null&&(Fl===null?dr=Fl=e:Fl=Fl.next=e),fr=!0,Cc||(Cc=!0,pm())}function Ko(e,t){if(!wc&&fr){wc=!0;do for(var n=!1,a=dr;a!==null;){if(e!==0){var l=a.pendingLanes;if(l===0)var o=0;else{var c=a.suspendedLanes,p=a.pingedLanes;o=(1<<31-bt(42|e)+1)-1,o&=l&~(c&~p),o=o&201326741?o&201326741|1:o?o|2:0}o!==0&&(n=!0,mh(a,o))}else o=$e,o=bl(a,a===vt?o:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(o&3)===0||Za(a,o)||(n=!0,mh(a,o));a=a.next}while(n);wc=!1}}function hm(){fh()}function fh(){fr=Cc=!1;var e=0;Ha!==0&&km()&&(e=Ha);for(var t=Tt(),n=null,a=dr;a!==null;){var l=a.next,o=hh(a,t);o===0?(a.next=null,n===null?dr=l:n.next=l,l===null&&(Fl=n)):(n=a,(e!==0||(o&3)!==0)&&(fr=!0)),a=l}Xt!==0&&Xt!==5||Ko(e),Ha!==0&&(Ha=0)}function hh(e,t){for(var n=e.suspendedLanes,a=e.pingedLanes,l=e.expirationTimes,o=e.pendingLanes&-62914561;0<o;){var c=31-bt(o),p=1<<c,S=l[c];S===-1?((p&n)===0||(p&a)!==0)&&(l[c]=jr(p,t)):S<=t&&(e.expiredLanes|=p),o&=~p}if(t=vt,n=$e,n=bl(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,n===0||e===t&&(dt===2||dt===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&Vt(a),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||Za(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(a!==null&&Vt(a),uo(n)){case 2:case 8:n=Hn;break;case 32:n=kn;break;case 268435456:n=se;break;default:n=kn}return a=ph.bind(null,e),n=ht(n,a),e.callbackPriority=t,e.callbackNode=n,t}return a!==null&&a!==null&&Vt(a),e.callbackPriority=2,e.callbackNode=null,2}function ph(e,t){if(Xt!==0&&Xt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(ur()&&e.callbackNode!==n)return null;var a=$e;return a=bl(e,e===vt?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(Jf(e,a,t),hh(e,Tt()),e.callbackNode!=null&&e.callbackNode===n?ph.bind(null,e):null)}function mh(e,t){if(ur())return null;Jf(e,t,!0)}function pm(){Mm(function(){(it&6)!==0?ht(Yn,hm):fh()})}function kc(){if(Ha===0){var e=_l;e===0&&(e=gl,gl<<=1,(gl&261888)===0&&(gl=256)),Ha=e}return Ha}function gh(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:xi(""+e)}function yh(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 mm(e,t,n,a,l){if(t==="submit"&&n&&n.stateNode===l){var o=gh((l[Ot]||null).action),c=a.submitter;c&&(t=(t=c[Ot]||null)?gh(t.formAction):c.getAttribute("formAction"),t!==null&&(o=t,c=null));var p=new ki("action","action",null,a,l);e.push({event:p,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(Ha!==0){var S=c?yh(l,c):new FormData(l);Vs(n,{pending:!0,data:S,method:l.method,action:o},null,S)}}else typeof o=="function"&&(p.preventDefault(),S=c?yh(l,c):new FormData(l),Vs(n,{pending:!0,data:S,method:l.method,action:o},o,S))},currentTarget:l}]})}}for(var zc=0;zc<rs.length;zc++){var Mc=rs[zc],gm=Mc.toLowerCase(),ym=Mc[0].toUpperCase()+Mc.slice(1);Bn(gm,"on"+ym)}Bn(Zu,"onAnimationEnd"),Bn(Fu,"onAnimationIteration"),Bn(Ju,"onAnimationStart"),Bn("dblclick","onDoubleClick"),Bn("focusin","onFocus"),Bn("focusout","onBlur"),Bn(_0,"onTransitionRun"),Bn(O0,"onTransitionStart"),Bn(H0,"onTransitionCancel"),Bn($u,"onTransitionEnd"),et("onMouseEnter",["mouseout","mouseover"]),et("onMouseLeave",["mouseout","mouseover"]),et("onPointerEnter",["pointerout","pointerover"]),et("onPointerLeave",["pointerout","pointerover"]),Pe("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Pe("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Pe("onBeforeInput",["compositionend","keypress","textInput","paste"]),Pe("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Pe("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Pe("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Zo="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(" "),bm=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Zo));function bh(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 o=void 0;if(t)for(var c=a.length-1;0<=c;c--){var p=a[c],S=p.instance,R=p.currentTarget;if(p=p.listener,S!==o&&l.isPropagationStopped())break e;o=p,l.currentTarget=R;try{o(l)}catch(N){Di(N)}l.currentTarget=null,o=S}else for(c=0;c<a.length;c++){if(p=a[c],S=p.instance,R=p.currentTarget,p=p.listener,S!==o&&l.isPropagationStopped())break e;o=p,l.currentTarget=R;try{o(l)}catch(N){Di(N)}l.currentTarget=null,o=S}}}}function Fe(e,t){var n=t[vl];n===void 0&&(n=t[vl]=new Set);var a=e+"__bubble";n.has(a)||(vh(t,e,2,!1),n.add(a))}function Dc(e,t,n){var a=0;t&&(a|=4),vh(n,e,a,t)}var hr="_reactListening"+Math.random().toString(36).slice(2);function Ec(e){if(!e[hr]){e[hr]=!0,_e.forEach(function(n){n!=="selectionchange"&&(bm.has(n)||Dc(n,!1,e),Dc(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[hr]||(t[hr]=!0,Dc("selectionchange",!1,t))}}function vh(e,t,n,a){switch(Fh(t)){case 2:var l=Km;break;case 8:l=Zm;break;default:l=Xc}n=l.bind(null,t,n,e),l=void 0,!Fr||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 Tc(e,t,n,a,l){var o=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 S=c.tag;if((S===3||S===4)&&c.stateNode.containerInfo===l)return;c=c.return}for(;p!==null;){if(c=In(p),c===null)return;if(S=c.tag,S===5||S===6||S===26||S===27){a=o=c;continue e}p=p.parentNode}}a=a.return}wu(function(){var R=o,N=Kr(n),G=[];e:{var L=Wu.get(e);if(L!==void 0){var O=ki,ge=e;switch(e){case"keypress":if(Ci(n)===0)break e;case"keydown":case"keyup":O=d0;break;case"focusin":ge="focus",O=Ir;break;case"focusout":ge="blur",O=Ir;break;case"beforeblur":case"afterblur":O=Ir;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=Pp;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":O=p0;break;case Zu:case Fu:case Ju:O=n0;break;case $u:O=g0;break;case"scroll":case"scrollend":O=Wp;break;case"wheel":O=b0;break;case"copy":case"cut":case"paste":O=l0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":O=Eu;break;case"toggle":case"beforetoggle":O=x0}var Te=(t&4)!==0,gt=!Te&&(e==="scroll"||e==="scrollend"),M=Te?L!==null?L+"Capture":null:L;Te=[];for(var k=R,T;k!==null;){var j=k;if(T=j.stateNode,j=j.tag,j!==5&&j!==26&&j!==27||T===null||M===null||(j=mo(k,M),j!=null&&Te.push(Fo(k,j,T))),gt)break;k=k.return}0<Te.length&&(L=new O(L,ge,null,n,N),G.push({event:L,listeners:Te}))}}if((t&7)===0){e:{if(L=e==="mouseover"||e==="pointerover",O=e==="mouseout"||e==="pointerout",L&&n!==Qr&&(ge=n.relatedTarget||n.fromElement)&&(In(ge)||ge[pn]))break e;if((O||L)&&(L=N.window===N?N:(L=N.ownerDocument)?L.defaultView||L.parentWindow:window,O?(ge=n.relatedTarget||n.toElement,O=R,ge=ge?In(ge):null,ge!==null&&(gt=m(ge),Te=ge.tag,ge!==gt||Te!==5&&Te!==27&&Te!==6)&&(ge=null)):(O=null,ge=R),O!==ge)){if(Te=Mu,j="onMouseLeave",M="onMouseEnter",k="mouse",(e==="pointerout"||e==="pointerover")&&(Te=Eu,j="onPointerLeave",M="onPointerEnter",k="pointer"),gt=O==null?L:le(O),T=ge==null?L:le(ge),L=new Te(j,k+"leave",O,n,N),L.target=gt,L.relatedTarget=T,j=null,In(N)===R&&(Te=new Te(M,k+"enter",ge,n,N),Te.target=T,Te.relatedTarget=gt,j=Te),gt=j,O&&ge)t:{for(Te=vm,M=O,k=ge,T=0,j=M;j;j=Te(j))T++;j=0;for(var ze=k;ze;ze=Te(ze))j++;for(;0<T-j;)M=Te(M),T--;for(;0<j-T;)k=Te(k),j--;for(;T--;){if(M===k||k!==null&&M===k.alternate){Te=M;break t}M=Te(M),k=Te(k)}Te=null}else Te=null;O!==null&&xh(G,L,O,Te,!1),ge!==null&&gt!==null&&xh(G,gt,ge,Te,!0)}}e:{if(L=R?le(R):window,O=L.nodeName&&L.nodeName.toLowerCase(),O==="select"||O==="input"&&L.type==="file")var at=Uu;else if(Ou(L))if(Bu)at=A0;else{at=E0;var Ce=D0}else O=L.nodeName,!O||O.toLowerCase()!=="input"||L.type!=="checkbox"&&L.type!=="radio"?R&&Vr(R.elementType)&&(at=Uu):at=T0;if(at&&(at=at(e,R))){Hu(G,at,n,N);break e}Ce&&Ce(e,L,R),e==="focusout"&&R&&L.type==="number"&&R.memoizedProps.value!=null&&Xr(L,"number",L.value)}switch(Ce=R?le(R):window,e){case"focusin":(Ou(Ce)||Ce.contentEditable==="true")&&(zl=Ce,ls=R,wo=null);break;case"focusout":wo=ls=zl=null;break;case"mousedown":os=!0;break;case"contextmenu":case"mouseup":case"dragend":os=!1,Qu(G,n,N);break;case"selectionchange":if(L0)break;case"keydown":case"keyup":Qu(G,n,N)}var Qe;if(es)e:{switch(e){case"compositionstart":var We="onCompositionStart";break e;case"compositionend":We="onCompositionEnd";break e;case"compositionupdate":We="onCompositionUpdate";break e}We=void 0}else kl?Lu(e,n)&&(We="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(We="onCompositionStart");We&&(Tu&&n.locale!=="ko"&&(kl||We!=="onCompositionStart"?We==="onCompositionEnd"&&kl&&(Qe=ku()):(va=N,Jr="value"in va?va.value:va.textContent,kl=!0)),Ce=pr(R,We),0<Ce.length&&(We=new Du(We,e,null,n,N),G.push({event:We,listeners:Ce}),Qe?We.data=Qe:(Qe=_u(n),Qe!==null&&(We.data=Qe)))),(Qe=C0?w0(e,n):k0(e,n))&&(We=pr(R,"onBeforeInput"),0<We.length&&(Ce=new Du("onBeforeInput","beforeinput",null,n,N),G.push({event:Ce,listeners:We}),Ce.data=Qe)),mm(G,e,R,n,N)}bh(G,t)})}function Fo(e,t,n){return{instance:e,listener:t,currentTarget:n}}function pr(e,t){for(var n=t+"Capture",a=[];e!==null;){var l=e,o=l.stateNode;if(l=l.tag,l!==5&&l!==26&&l!==27||o===null||(l=mo(e,n),l!=null&&a.unshift(Fo(e,l,o)),l=mo(e,t),l!=null&&a.push(Fo(e,l,o))),e.tag===3)return a;e=e.return}return[]}function vm(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function xh(e,t,n,a,l){for(var o=t._reactName,c=[];n!==null&&n!==a;){var p=n,S=p.alternate,R=p.stateNode;if(p=p.tag,S!==null&&S===a)break;p!==5&&p!==26&&p!==27||R===null||(S=R,l?(R=mo(n,o),R!=null&&c.unshift(Fo(n,R,S))):l||(R=mo(n,o),R!=null&&c.push(Fo(n,R,S)))),n=n.return}c.length!==0&&e.push({event:t,listeners:c})}var xm=/\r\n?/g,Sm=/\u0000|\uFFFD/g;function Sh(e){return(typeof e=="string"?e:""+e).replace(xm,`
9
+ `).replace(Sm,"")}function Ch(e,t){return t=Sh(t),Sh(e)===t}function mt(e,t,n,a,l,o){switch(n){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||Sl(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&Sl(e,""+a);break;case"className":bi(e,"class",a);break;case"tabIndex":bi(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":bi(e,n,a);break;case"style":Su(e,a,o);break;case"data":if(t!=="object"){bi(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=xi(""+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 o=="function"&&(n==="formAction"?(t!=="input"&&mt(e,t,"name",l.name,l,null),mt(e,t,"formEncType",l.formEncType,l,null),mt(e,t,"formMethod",l.formMethod,l,null),mt(e,t,"formTarget",l.formTarget,l,null)):(mt(e,t,"encType",l.encType,l,null),mt(e,t,"method",l.method,l,null),mt(e,t,"target",l.target,l,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=xi(""+a),e.setAttribute(n,a);break;case"onClick":a!=null&&(e.onclick=ea);break;case"onScroll":a!=null&&Fe("scroll",e);break;case"onScrollEnd":a!=null&&Fe("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=xi(""+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":Fe("beforetoggle",e),Fe("toggle",e),yi(e,"popover",a);break;case"xlinkActuate":Pn(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":Pn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":Pn(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":Pn(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":Pn(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":Pn(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":Pn(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":Pn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":Pn(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":yi(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=Jp.get(n)||n,yi(e,n,a))}}function Ac(e,t,n,a,l,o){switch(n){case"style":Su(e,a,o);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"?Sl(e,a):(typeof a=="number"||typeof a=="bigint")&&Sl(e,""+a);break;case"onScroll":a!=null&&Fe("scroll",e);break;case"onScrollEnd":a!=null&&Fe("scrollend",e);break;case"onClick":a!=null&&(e.onclick=ea);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ue.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(l=n.endsWith("Capture"),t=n.slice(2,l?n.length-7:void 0),o=e[Ot]||null,o=o!=null?o[n]:null,typeof o=="function"&&e.removeEventListener(t,o,l),typeof a=="function")){typeof o!="function"&&o!==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,""):yi(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":Fe("error",e),Fe("load",e);var a=!1,l=!1,o;for(o in n)if(n.hasOwnProperty(o)){var c=n[o];if(c!=null)switch(o){case"src":a=!0;break;case"srcSet":l=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(d(137,t));default:mt(e,t,o,c,n,null)}}l&&mt(e,t,"srcSet",n.srcSet,n,null),a&&mt(e,t,"src",n.src,n,null);return;case"input":Fe("invalid",e);var p=o=c=l=null,S=null,R=null;for(a in n)if(n.hasOwnProperty(a)){var N=n[a];if(N!=null)switch(a){case"name":l=N;break;case"type":c=N;break;case"checked":S=N;break;case"defaultChecked":R=N;break;case"value":o=N;break;case"defaultValue":p=N;break;case"children":case"dangerouslySetInnerHTML":if(N!=null)throw Error(d(137,t));break;default:mt(e,t,a,N,n,null)}}yu(e,o,p,S,R,c,l,!1);return;case"select":Fe("invalid",e),a=c=o=null;for(l in n)if(n.hasOwnProperty(l)&&(p=n[l],p!=null))switch(l){case"value":o=p;break;case"defaultValue":c=p;break;case"multiple":a=p;default:mt(e,t,l,p,n,null)}t=o,n=c,e.multiple=!!a,t!=null?xl(e,!!a,t,!1):n!=null&&xl(e,!!a,n,!0);return;case"textarea":Fe("invalid",e),o=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":o=p;break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(d(91));break;default:mt(e,t,c,p,n,null)}vu(e,a,l,o);return;case"option":for(S in n)n.hasOwnProperty(S)&&(a=n[S],a!=null)&&(S==="selected"?e.selected=a&&typeof a!="function"&&typeof a!="symbol":mt(e,t,S,a,n,null));return;case"dialog":Fe("beforetoggle",e),Fe("toggle",e),Fe("cancel",e),Fe("close",e);break;case"iframe":case"object":Fe("load",e);break;case"video":case"audio":for(a=0;a<Zo.length;a++)Fe(Zo[a],e);break;case"image":Fe("error",e),Fe("load",e);break;case"details":Fe("toggle",e);break;case"embed":case"source":case"link":Fe("error",e),Fe("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(R in n)if(n.hasOwnProperty(R)&&(a=n[R],a!=null))switch(R){case"children":case"dangerouslySetInnerHTML":throw Error(d(137,t));default:mt(e,t,R,a,n,null)}return;default:if(Vr(t)){for(N in n)n.hasOwnProperty(N)&&(a=n[N],a!==void 0&&Ac(e,t,N,a,n,void 0));return}}for(p in n)n.hasOwnProperty(p)&&(a=n[p],a!=null&&mt(e,t,p,a,n,null))}function Cm(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,o=null,c=null,p=null,S=null,R=null,N=null;for(O in n){var G=n[O];if(n.hasOwnProperty(O)&&G!=null)switch(O){case"checked":break;case"value":break;case"defaultValue":S=G;default:a.hasOwnProperty(O)||mt(e,t,O,null,a,G)}}for(var L in a){var O=a[L];if(G=n[L],a.hasOwnProperty(L)&&(O!=null||G!=null))switch(L){case"type":o=O;break;case"name":l=O;break;case"checked":R=O;break;case"defaultChecked":N=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!==G&&mt(e,t,L,O,a,G)}}Gr(e,c,p,S,R,N,o,l);return;case"select":O=c=p=L=null;for(o in n)if(S=n[o],n.hasOwnProperty(o)&&S!=null)switch(o){case"value":break;case"multiple":O=S;default:a.hasOwnProperty(o)||mt(e,t,o,null,a,S)}for(l in a)if(o=a[l],S=n[l],a.hasOwnProperty(l)&&(o!=null||S!=null))switch(l){case"value":L=o;break;case"defaultValue":p=o;break;case"multiple":c=o;default:o!==S&&mt(e,t,l,o,a,S)}t=p,n=c,a=O,L!=null?xl(e,!!n,L,!1):!!a!=!!n&&(t!=null?xl(e,!!n,t,!0):xl(e,!!n,n?[]:"",!1));return;case"textarea":O=L=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:mt(e,t,p,null,a,l)}for(c in a)if(l=a[c],o=n[c],a.hasOwnProperty(c)&&(l!=null||o!=null))switch(c){case"value":L=l;break;case"defaultValue":O=l;break;case"children":break;case"dangerouslySetInnerHTML":if(l!=null)throw Error(d(91));break;default:l!==o&&mt(e,t,c,l,a,o)}bu(e,L,O);return;case"option":for(var ge in n)L=n[ge],n.hasOwnProperty(ge)&&L!=null&&!a.hasOwnProperty(ge)&&(ge==="selected"?e.selected=!1:mt(e,t,ge,null,a,L));for(S in a)L=a[S],O=n[S],a.hasOwnProperty(S)&&L!==O&&(L!=null||O!=null)&&(S==="selected"?e.selected=L&&typeof L!="function"&&typeof L!="symbol":mt(e,t,S,L,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 Te in n)L=n[Te],n.hasOwnProperty(Te)&&L!=null&&!a.hasOwnProperty(Te)&&mt(e,t,Te,null,a,L);for(R in a)if(L=a[R],O=n[R],a.hasOwnProperty(R)&&L!==O&&(L!=null||O!=null))switch(R){case"children":case"dangerouslySetInnerHTML":if(L!=null)throw Error(d(137,t));break;default:mt(e,t,R,L,a,O)}return;default:if(Vr(t)){for(var gt in n)L=n[gt],n.hasOwnProperty(gt)&&L!==void 0&&!a.hasOwnProperty(gt)&&Ac(e,t,gt,void 0,a,L);for(N in a)L=a[N],O=n[N],!a.hasOwnProperty(N)||L===O||L===void 0&&O===void 0||Ac(e,t,N,L,a,O);return}}for(var M in n)L=n[M],n.hasOwnProperty(M)&&L!=null&&!a.hasOwnProperty(M)&&mt(e,t,M,null,a,L);for(G in a)L=a[G],O=n[G],!a.hasOwnProperty(G)||L===O||L==null&&O==null||mt(e,t,G,L,a,O)}function wh(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function wm(){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],o=l.transferSize,c=l.initiatorType,p=l.duration;if(o&&p&&wh(c)){for(c=0,p=l.responseEnd,a+=1;a<n.length;a++){var S=n[a],R=S.startTime;if(R>p)break;var N=S.transferSize,G=S.initiatorType;N&&wh(G)&&(S=S.responseEnd,c+=N*(S<p?1:(p-R)/(S-R)))}if(--a,t+=8*(o+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 Rc=null,Lc=null;function mr(e){return e.nodeType===9?e:e.ownerDocument}function kh(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 km(){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,Dh=typeof Promise=="function"?Promise:void 0,Mm=typeof queueMicrotask=="function"?queueMicrotask:typeof Dh<"u"?function(e){return Dh.resolve(null).then(e).catch(Dm)}:Mh;function Dm(e){setTimeout(function(){throw e})}function Ua(e){return e==="head"}function Eh(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),Il(t);return}a--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")a++;else if(n==="html")Jo(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,Jo(n);for(var o=n.firstChild;o;){var c=o.nextSibling,p=o.nodeName;o[Ja]||p==="SCRIPT"||p==="STYLE"||p==="LINK"&&o.rel.toLowerCase()==="stylesheet"||n.removeChild(o),o=c}}else n==="body"&&Jo(e.ownerDocument.body);n=l}while(n);Il(t)}function Th(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 Hc(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":Hc(n),ho(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function Em(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[Ja])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(o=e.getAttribute("rel"),o==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(o!==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(o=e.getAttribute("src"),(o!==(l.src==null?null:l.src)||e.getAttribute("type")!==(l.type==null?null:l.type)||e.getAttribute("crossorigin")!==(l.crossOrigin==null?null:l.crossOrigin))&&o&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var o=l.name==null?null:""+l.name;if(l.type==="hidden"&&e.getAttribute("name")===o)return e}else return e;if(e=_n(e.nextSibling),e===null)break}return null}function Tm(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=_n(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=_n(e.nextSibling),e===null))return null;return e}function Uc(e){return e.data==="$?"||e.data==="$~"}function Bc(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 _n(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 Nc=null;function Rh(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return _n(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function Lh(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=mr(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 Jo(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ho(e)}var On=new Map,Oh=new Set;function gr(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ga=J.d;J.d={f:Rm,r:Lm,D:_m,C:Om,L:Hm,m:Um,X:Nm,S:Bm,M:jm};function Rm(){var e=ga.f(),t=rr();return e||t}function Lm(e){var t=he(e);t!==null&&t.tag===5&&t.type==="form"?$d(t):ga.r(e)}var Jl=typeof document>"u"?null:document;function Hh(e,t,n){var a=Jl;if(a&&typeof t=="string"&&t){var l=Mn(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),be(t),a.head.appendChild(t)))}}function _m(e){ga.D(e),Hh("dns-prefetch",e,null)}function Om(e,t){ga.C(e,t),Hh("preconnect",e,t)}function Hm(e,t,n){ga.L(e,t,n);var a=Jl;if(a&&e&&t){var l='link[rel="preload"][as="'+Mn(t)+'"]';t==="image"&&n&&n.imageSrcSet?(l+='[imagesrcset="'+Mn(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(l+='[imagesizes="'+Mn(n.imageSizes)+'"]')):l+='[href="'+Mn(e)+'"]';var o=l;switch(t){case"style":o=$l(e);break;case"script":o=Wl(e)}On.has(o)||(e=z({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),On.set(o,e),a.querySelector(l)!==null||t==="style"&&a.querySelector($o(o))||t==="script"&&a.querySelector(Wo(o))||(t=a.createElement("link"),$t(t,"link",e),be(t),a.head.appendChild(t)))}}function Um(e,t){ga.m(e,t);var n=Jl;if(n&&e){var a=t&&typeof t.as=="string"?t.as:"script",l='link[rel="modulepreload"][as="'+Mn(a)+'"][href="'+Mn(e)+'"]',o=l;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":o=Wl(e)}if(!On.has(o)&&(e=z({rel:"modulepreload",href:e},t),On.set(o,e),n.querySelector(l)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Wo(o)))return}a=n.createElement("link"),$t(a,"link",e),be(a),n.head.appendChild(a)}}}function Bm(e,t,n){ga.S(e,t,n);var a=Jl;if(a&&e){var l=ye(a).hoistableStyles,o=$l(e);t=t||"default";var c=l.get(o);if(!c){var p={loading:0,preload:null};if(c=a.querySelector($o(o)))p.loading=5;else{e=z({rel:"stylesheet",href:e,"data-precedence":t},n),(n=On.get(o))&&jc(e,n);var S=c=a.createElement("link");be(S),$t(S,"link",e),S._p=new Promise(function(R,N){S.onload=R,S.onerror=N}),S.addEventListener("load",function(){p.loading|=1}),S.addEventListener("error",function(){p.loading|=2}),p.loading|=4,yr(c,t,a)}c={type:"stylesheet",instance:c,count:1,state:p},l.set(o,c)}}}function Nm(e,t){ga.X(e,t);var n=Jl;if(n&&e){var a=ye(n).hoistableScripts,l=Wl(e),o=a.get(l);o||(o=n.querySelector(Wo(l)),o||(e=z({src:e,async:!0},t),(t=On.get(l))&&qc(e,t),o=n.createElement("script"),be(o),$t(o,"link",e),n.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},a.set(l,o))}}function jm(e,t){ga.M(e,t);var n=Jl;if(n&&e){var a=ye(n).hoistableScripts,l=Wl(e),o=a.get(l);o||(o=n.querySelector(Wo(l)),o||(e=z({src:e,async:!0,type:"module"},t),(t=On.get(l))&&qc(e,t),o=n.createElement("script"),be(o),$t(o,"link",e),n.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},a.set(l,o))}}function Uh(e,t,n,a){var l=(l=De.current)?gr(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=$l(n.href),n=ye(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=$l(n.href);var o=ye(l).hoistableStyles,c=o.get(e);if(c||(l=l.ownerDocument||l,c={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},o.set(e,c),(o=l.querySelector($o(e)))&&!o._p&&(c.instance=o,c.state.loading=5),On.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},On.set(e,n),o||qm(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=Wl(n),n=ye(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 $l(e){return'href="'+Mn(e)+'"'}function $o(e){return'link[rel="stylesheet"]['+e+"]"}function Bh(e){return z({},e,{"data-precedence":e.precedence,precedence:null})}function qm(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),be(t),e.head.appendChild(t))}function Wl(e){return'[src="'+Mn(e)+'"]'}function Wo(e){return"script[async]"+e}function Nh(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+Mn(n.href)+'"]');if(a)return t.instance=a,be(a),a;var l=z({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),be(a),$t(a,"style",l),yr(a,n.precedence,e),t.instance=a;case"stylesheet":l=$l(n.href);var o=e.querySelector($o(l));if(o)return t.state.loading|=4,t.instance=o,be(o),o;a=Bh(n),(l=On.get(l))&&jc(a,l),o=(e.ownerDocument||e).createElement("link"),be(o);var c=o;return c._p=new Promise(function(p,S){c.onload=p,c.onerror=S}),$t(o,"link",a),t.state.loading|=4,yr(o,n.precedence,e),t.instance=o;case"script":return o=Wl(n.src),(l=e.querySelector(Wo(o)))?(t.instance=l,be(l),l):(a=n,(l=On.get(o))&&(a=z({},n),qc(a,l)),e=e.ownerDocument||e,l=e.createElement("script"),be(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,yr(a,n.precedence,e));return t.instance}function yr(e,t,n){for(var a=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),l=a.length?a[a.length-1]:null,o=l,c=0;c<a.length;c++){var p=a[c];if(p.dataset.precedence===t)o=p;else if(o!==l)break}o?o.parentNode.insertBefore(e,o.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function jc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function qc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var br=null;function jh(e,t,n){if(br===null){var a=new Map,l=br=new Map;l.set(n,a)}else l=br,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 o=n[l];if(!(o[Ja]||o[Mt]||e==="link"&&o.getAttribute("rel")==="stylesheet")&&o.namespaceURI!=="http://www.w3.org/2000/svg"){var c=o.getAttribute(t)||"";c=e+c;var p=a.get(c);p?p.push(o):a.set(c,[o])}}return a}function qh(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function Ym(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 Yh(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Gm(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=$l(a.href),o=t.querySelector($o(l));if(o){t=o._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=vr.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=o,be(o);return}o=t.ownerDocument||t,a=Bh(a),(l=On.get(l))&&jc(a,l),o=o.createElement("link"),be(o);var c=o;c._p=new Promise(function(p,S){c.onload=p,c.onerror=S}),$t(o,"link",a),n.instance=o}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=vr.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Yc=0;function Xm(e,t){return e.stylesheets&&e.count===0&&Sr(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var a=setTimeout(function(){if(e.stylesheets&&Sr(e,e.stylesheets),e.unsuspend){var o=e.unsuspend;e.unsuspend=null,o()}},6e4+t);0<e.imgBytes&&Yc===0&&(Yc=62500*wm());var l=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Sr(e,e.stylesheets),e.unsuspend)){var o=e.unsuspend;e.unsuspend=null,o()}},(e.imgBytes>Yc?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(l)}}:null}function vr(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Sr(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var xr=null;function Sr(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,xr=new Map,t.forEach(Vm,e),xr=null,vr.call(e))}function Vm(e,t){if(!(t.state.loading&4)){var n=xr.get(e);if(n)var a=n.get(null);else{n=new Map,xr.set(e,n);for(var l=e.querySelectorAll("link[data-precedence],style[data-precedence]"),o=0;o<l.length;o++){var c=l[o];(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"),o=n.get(c)||a,o===a&&n.set(null,l),n.set(c,l),this.count++,a=vr.bind(this),l.addEventListener("load",a),l.addEventListener("error",a),o?o.parentNode.insertBefore(l,o.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(l,e.firstChild)),t.state.loading|=4}}var Io={$$typeof:ae,Provider:null,Consumer:null,_currentValue:F,_currentValue2:F,_threadCount:0};function Qm(e,t,n,a,l,o,c,p,S){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=so(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=so(0),this.hiddenUpdates=so(null),this.identifierPrefix=a,this.onUncaughtError=l,this.onCaughtError=o,this.onRecoverableError=c,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=S,this.incompleteTransitions=new Map}function Gh(e,t,n,a,l,o,c,p,S,R,N,G){return e=new Qm(e,t,n,c,S,R,N,G,p),t=1,o===!0&&(t|=24),o=gn(3,null,null,t),e.current=o,o.stateNode=e,t=xs(),t.refCount++,e.pooledCache=t,t.refCount++,o.memoizedState={element:a,isDehydrated:n,cache:t},ks(o),e}function Xh(e){return e?(e=El,e):El}function Vh(e,t,n,a,l,o){l=Xh(l),a.context===null?a.context=l:a.pendingContext=l,a=za(t),a.payload={element:n},o=o===void 0?null:o,o!==null&&(a.callback=o),n=Ma(e,a,t),n!==null&&(dn(n,e,t),Ao(n,e,t))}function Qh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Gc(e,t){Qh(e,t),(e=e.alternate)&&Qh(e,t)}function Kh(e){if(e.tag===13||e.tag===31){var t=Pa(e,67108864);t!==null&&dn(t,e,67108864),Gc(e,67108864)}}function Zh(e){if(e.tag===13||e.tag===31){var t=Sn();t=Wn(t);var n=Pa(e,t);n!==null&&dn(n,e,t),Gc(e,t)}}var Cr=!0;function Km(e,t,n,a){var l=D.T;D.T=null;var o=J.p;try{J.p=2,Xc(e,t,n,a)}finally{J.p=o,D.T=l}}function Zm(e,t,n,a){var l=D.T;D.T=null;var o=J.p;try{J.p=8,Xc(e,t,n,a)}finally{J.p=o,D.T=l}}function Xc(e,t,n,a){if(Cr){var l=Vc(a);if(l===null)Tc(e,t,a,wr,n),Jh(e,a);else if(Jm(l,e,t,n,a))a.stopPropagation();else if(Jh(e,a),t&4&&-1<Fm.indexOf(e)){for(;l!==null;){var o=he(l);if(o!==null)switch(o.tag){case 3:if(o=o.stateNode,o.current.memoizedState.isDehydrated){var c=$n(o.pendingLanes);if(c!==0){var p=o;for(p.pendingLanes|=2,p.entangledLanes|=2;c;){var S=1<<31-bt(c);p.entanglements[1]|=S,c&=~S}Kn(o),(it&6)===0&&(or=Tt()+500,Ko(0))}}break;case 31:case 13:p=Pa(o,2),p!==null&&dn(p,o,2),rr(),Gc(o,2)}if(o=Vc(a),o===null&&Tc(e,t,a,wr,n),o===l)break;l=o}l!==null&&a.stopPropagation()}else Tc(e,t,a,null,n)}}function Vc(e){return e=Kr(e),Qc(e)}var wr=null;function Qc(e){if(wr=null,e=In(e),e!==null){var t=m(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=w(t),e!==null)return e;e=null}else if(n===31){if(e=E(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 wr=e,null}function Fh(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(wn()){case Yn:return 2;case Hn:return 8;case kn:case Z:return 32;case se:return 268435456;default:return 32}default:return 32}}var Kc=!1,Ba=null,Na=null,ja=null,Po=new Map,ei=new Map,qa=[],Fm="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 Jh(e,t){switch(e){case"focusin":case"focusout":Ba=null;break;case"dragenter":case"dragleave":Na=null;break;case"mouseover":case"mouseout":ja=null;break;case"pointerover":case"pointerout":Po.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ei.delete(t.pointerId)}}function ti(e,t,n,a,l,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:a,nativeEvent:o,targetContainers:[l]},t!==null&&(t=he(t),t!==null&&Kh(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,l!==null&&t.indexOf(l)===-1&&t.push(l),e)}function Jm(e,t,n,a,l){switch(t){case"focusin":return Ba=ti(Ba,e,t,n,a,l),!0;case"dragenter":return Na=ti(Na,e,t,n,a,l),!0;case"mouseover":return ja=ti(ja,e,t,n,a,l),!0;case"pointerover":var o=l.pointerId;return Po.set(o,ti(Po.get(o)||null,e,t,n,a,l)),!0;case"gotpointercapture":return o=l.pointerId,ei.set(o,ti(ei.get(o)||null,e,t,n,a,l)),!0}return!1}function $h(e){var t=In(e.target);if(t!==null){var n=m(t);if(n!==null){if(t=n.tag,t===13){if(t=w(n),t!==null){e.blockedOn=t,Un(e.priority,function(){Zh(n)});return}}else if(t===31){if(t=E(n),t!==null){e.blockedOn=t,Un(e.priority,function(){Zh(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 kr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Vc(e.nativeEvent);if(n===null){n=e.nativeEvent;var a=new n.constructor(n.type,n);Qr=a,n.target.dispatchEvent(a),Qr=null}else return t=he(n),t!==null&&Kh(t),e.blockedOn=n,!1;t.shift()}return!0}function Wh(e,t,n){kr(e)&&n.delete(t)}function $m(){Kc=!1,Ba!==null&&kr(Ba)&&(Ba=null),Na!==null&&kr(Na)&&(Na=null),ja!==null&&kr(ja)&&(ja=null),Po.forEach(Wh),ei.forEach(Wh)}function zr(e,t){e.blockedOn===t&&(e.blockedOn=null,Kc||(Kc=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,$m)))}var Mr=null;function Ih(e){Mr!==e&&(Mr=e,i.unstable_scheduleCallback(i.unstable_NormalPriority,function(){Mr===e&&(Mr=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(Qc(a||n)===null)continue;break}var o=he(n);o!==null&&(e.splice(t,3),t-=3,Vs(o,{pending:!0,data:l,method:n.method,action:a},a,l))}}))}function Il(e){function t(S){return zr(S,e)}Ba!==null&&zr(Ba,e),Na!==null&&zr(Na,e),ja!==null&&zr(ja,e),Po.forEach(t),ei.forEach(t);for(var n=0;n<qa.length;n++){var a=qa[n];a.blockedOn===e&&(a.blockedOn=null)}for(;0<qa.length&&(n=qa[0],n.blockedOn===null);)$h(n),n.blockedOn===null&&qa.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(a=0;a<n.length;a+=3){var l=n[a],o=n[a+1],c=l[Ot]||null;if(typeof o=="function")c||Ih(n);else if(c){var p=null;if(o&&o.hasAttribute("formAction")){if(l=o,c=o[Ot]||null)p=c.formAction;else if(Qc(l)!==null)continue}else p=c.action;typeof p=="function"?n[a+1]=p:(n.splice(a,3),a-=3),Ih(n)}}}function Ph(){function e(o){o.canIntercept&&o.info==="react-transition"&&o.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 o=navigation.currentEntry;o&&o.url!=null&&navigation.navigate(o.url,{state:o.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 Zc(e){this._internalRoot=e}Dr.prototype.render=Zc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(d(409));var n=t.current,a=Sn();Vh(n,a,e,t,null,null)},Dr.prototype.unmount=Zc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Vh(e.current,2,null,e,null,null),rr(),t[pn]=null}};function Dr(e){this._internalRoot=e}Dr.prototype.unstable_scheduleHydration=function(e){if(e){var t=gi();e={blockedOn:null,target:e,priority:t};for(var n=0;n<qa.length&&t!==0&&t<qa[n].priority;n++);qa.splice(n,0,e),n===0&&$h(e)}};var ep=s.version;if(ep!=="19.2.4")throw Error(d(527,ep,"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?A(e):null,e=e===null?null:e.stateNode,e};var Wm={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:D,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Er=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Er.isDisabled&&Er.supportsFiber)try{Ne=Er.inject(Wm),Me=Er}catch{}}return li.createRoot=function(e,t){if(!h(e))throw Error(d(299));var n=!1,a="",l=rf,o=sf,c=cf;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&&(o=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=Gh(e,1,!1,null,null,n,a,null,l,o,c,Ph),e[pn]=t.current,Ec(e),new Zc(t)},li.hydrateRoot=function(e,t,n){if(!h(e))throw Error(d(299));var a=!1,l="",o=rf,c=sf,p=cf,S=null;return n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(l=n.identifierPrefix),n.onUncaughtError!==void 0&&(o=n.onUncaughtError),n.onCaughtError!==void 0&&(c=n.onCaughtError),n.onRecoverableError!==void 0&&(p=n.onRecoverableError),n.formState!==void 0&&(S=n.formState)),t=Gh(e,1,!0,t,n??null,a,l,S,o,c,p,Ph),t.context=Xh(null),n=t.current,a=Sn(),a=Wn(a),l=za(a),l.callback=null,Ma(n,l,a),n=a,t.current.lanes=n,Fa(t,n),Kn(t),e[pn]=t.current,Ec(e),new Dr(t)},li.version="19.2.4",li}var xp;function a1(){if(xp)return Pc.exports;xp=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(s){console.error(s)}}return i(),Pc.exports=n1(),Pc.exports}var l1=a1(),Sp=function(s,f){var d=arguments;if(f==null||!di.call(f,"css"))return v.createElement.apply(void 0,d);var h=d.length,m=new Array(h);m[0]=hu,m[1]=fu(s,f);for(var w=2;w<h;w++)m[w]=d[w];return v.createElement.apply(null,m)};(function(i){var s;s||(s=i.JSX||(i.JSX={}))})(Sp||(Sp={}));function y(){for(var i=arguments.length,s=new Array(i),f=0;f<i;f++)s[f]=arguments[f];return Up(s)}function ln(){var i=y.apply(void 0,arguments),s="animation-"+i.name;return{name:s,styles:"@keyframes "+s+"{"+i.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}const o1={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:o1,requestDelete:()=>{},requestMove:()=>{},requestSync:()=>{},requestDownload:()=>{},requestProcess:()=>{},setProcessMode:()=>{},confirmDelete:async()=>{},confirmMove:async()=>{},confirmSync:async()=>{},confirmProcess:async()=>{},cancelAction:()=>{},closeProgress:()=>{},stopProcessing:()=>{},deleteOrphans:async()=>{}},Np=v.createContext(i1);function oo(){return v.useContext(Np)}const fi="-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"},V={xs:"13px",sm:"14px",base:"16px",lg:"19px",xl:"22px"},ro=y("font-family:",fi,";font-size:",V.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;}",""),r1=ln`
10
+ from { opacity: 0; }
11
+ to { opacity: 1; }
12
+ `,s1=ln`
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
+ `,c1=ln`
22
+ from { transform: rotate(0deg); }
23
+ to { transform: rotate(360deg); }
24
+ `,Oe={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:",r1," 0.15s ease-out;font-family:",fi,";",""),modal:y(ro," 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:",s1," 0.2s ease-out;overflow:hidden;",""),header:{name:"nsgk6m",styles:"padding:24px 24px 0"},title:y("font-size:",V.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:",V.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:",V.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 ao({title:i,message:s,confirmLabel:f="Confirm",cancelLabel:d="Cancel",variant:h="default",onConfirm:m,onCancel:w}){return r("div",{css:Oe.overlay,onClick:w,children:b("div",{css:Oe.modal,onClick:E=>E.stopPropagation(),children:[r("div",{css:Oe.header,children:r("h3",{css:Oe.title,children:i})}),r("div",{css:Oe.body,children:r("p",{css:Oe.message,children:s})}),b("div",{css:Oe.footer,children:[r("button",{css:[Oe.btn,Oe.btnCancel,"",""],onClick:w,children:d}),r("button",{css:[Oe.btn,h==="danger"?Oe.btnDanger:Oe.btnConfirm,"",""],onClick:m,children:f})]})]})})}const u1={input:y("width:100%;padding:10px 12px;font-size:",V.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 hl({title:i,message:s,inputLabel:f,defaultValue:d="",placeholder:h,confirmLabel:m="Confirm",cancelLabel:w="Cancel",isLoading:E=!1,loadingLabel:C="Processing...",onConfirm:g,onCancel:A}){const[z,U]=ut.useState(d),q=H=>{H.preventDefault(),z.trim()&&!E&&g(z.trim())};return r("div",{css:Oe.overlay,onClick:E?void 0:A,children:r("div",{css:Oe.modal,onClick:H=>H.stopPropagation(),children:b("form",{onSubmit:q,children:[r("div",{css:Oe.header,children:r("h3",{css:Oe.title,children:i})}),b("div",{css:Oe.body,children:[s&&r("p",{css:Oe.message,children:s}),f&&r("label",{css:Oe.message,children:f}),r("input",{css:u1.input,type:"text",value:z,onChange:H=>U(H.target.value),placeholder:h,autoFocus:!0,disabled:E})]}),b("div",{css:Oe.footer,children:[r("button",{type:"button",css:[Oe.btn,Oe.btnCancel,"",""],onClick:A,disabled:E,children:w}),r("button",{type:"submit",css:[Oe.btn,Oe.btnConfirm,"",""],disabled:!z.trim()||E,children:E?b(tt,{children:[r("span",{css:y("display:inline-block;width:14px;height:14px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:",c1," 0.75s linear infinite;margin-right:6px;","")}),C]}):m})]})]})})})}function pu({title:i,message:s,buttonLabel:f="OK",onClose:d}){return r("div",{css:Oe.overlay,onClick:d,children:b("div",{css:Oe.modal,onClick:h=>h.stopPropagation(),children:[r("div",{css:Oe.header,children:r("h3",{css:Oe.title,children:i})}),r("div",{css:Oe.body,children:r("p",{css:Oe.message,children:s})}),r("div",{css:Oe.footer,children:r("button",{css:[Oe.btn,Oe.btnConfirm,"",""],onClick:d,children:f})})]})})}const Ga={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:",V.sm,";color:",u.textSecondary,";margin:0;display:flex;justify-content:space-between;align-items:center;",""),currentFile:y("font-size:",V.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:",V.xs,";color:#991b1b;margin:0 0 4px;&:last-child{margin-bottom:0;}","")};function pl({title:i,progress:s,onClose:f,onDeleteOrphans:d,onStop:h}){const m=s.status==="complete",w=s.status==="error",E=s.status==="stopped",C=s.status==="stopping",g=m||w||E,A=!g||C;return r("div",{css:Oe.overlay,children:b("div",{css:Oe.modal,onClick:z=>z.stopPropagation(),children:[r("div",{css:Oe.header,children:r("h3",{css:Oe.title,children:i})}),r("div",{css:Oe.body,children:w?r("p",{css:Oe.message,children:s.message||"An error occurred"}):E?b("p",{css:Oe.message,children:["Processing stopped. Processed ",s.processed??s.current," image",(s.processed??s.current)!==1?"s":""," before stopping."]}):m?b(tt,{children:[b("p",{css:Oe.message,children:[s.message?s.message:s.isDelete?b(tt,{children:["Deleted ",s.processed," file",s.processed!==1?"s":"",".",s.errors!==void 0&&s.errors>0?b(tt,{children:[" ",s.errors," error",s.errors!==1?"s":""," occurred."]}):null]}):s.isMove?b(tt,{children:["Moved ",s.processed," file",s.processed!==1?"s":"",".",s.errors!==void 0&&s.errors>0?b(tt,{children:[" ",s.errors," error",s.errors!==1?"s":""," occurred."]}):null]}):s.isScan?b(tt,{children:[s.alreadyProcessed!==void 0&&s.alreadyProcessed>0?b(tt,{children:[s.alreadyProcessed," image",s.alreadyProcessed!==1?"s":""," already exist. "]}):null,"Scanned ",s.processed," new image",s.processed!==1?"s":"",".",s.orphanedEntries!==void 0&&s.orphanedEntries>0?b(tt,{children:[" Removed ",s.orphanedEntries," orphaned entr",s.orphanedEntries!==1?"ies":"y","."]}):null,s.pendingUpdates!==void 0&&s.pendingUpdates>0?b(tt,{children:[" ",s.pendingUpdates," file",s.pendingUpdates!==1?"s have":" has"," local updates pending."]}):null]}):b(tt,{children:["Processed ",s.processed," new image",s.processed!==1?"s":"",".",s.alreadyProcessed!==void 0&&s.alreadyProcessed>0?b(tt,{children:[" ",s.alreadyProcessed," already processed."]}):null]}),s.orphansRemoved!==void 0&&s.orphansRemoved>0?b(tt,{children:[" Removed ",s.orphansRemoved," orphaned thumbnail",s.orphansRemoved!==1?"s":"","."]}):null]}),s.errorMessages&&s.errorMessages.length>0&&b("div",{css:Ga.errorList,children:[s.errorMessages.slice(0,10).map((z,U)=>r("p",{css:Ga.errorItem,children:z},U)),s.errorMessages.length>10&&b("p",{css:Ga.errorItem,children:["...and ",s.errorMessages.length-10," more"]})]})]}):b(tt,{children:[r("p",{css:Oe.message,children:s.status==="cleanup"?s.message||"Cleaning up...":s.message||"Processing..."}),b("div",{css:Ga.progressContainer,children:[r("div",{css:Ga.progressBar,children:r("div",{css:Ga.progressFill,style:{width:`${s.percent}%`}})}),b("div",{css:Ga.progressText,children:[b("span",{children:[s.current," of ",s.total]}),b("span",{children:[s.percent,"%"]})]}),s.currentFile&&r("p",{css:Ga.currentFile,title:s.currentFile,children:s.currentFile})]})]})}),b("div",{css:Oe.footer,children:[A&&h&&r("button",{css:[Oe.btn,Oe.btnDanger,"",""],onClick:h,disabled:s.status==="stopping",children:s.status==="stopping"?"Stopping...":"Stop"}),g&&s.orphanedFiles&&s.orphanedFiles.length>0&&d&&b("button",{css:[Oe.btn,Oe.btnDanger,"",""],onClick:d,children:["Delete ",s.orphanedFiles.length," Orphan",s.orphanedFiles.length!==1?"s":""]}),g&&r("button",{css:[Oe.btn,Oe.btnConfirm,"",""],onClick:f,children:"Done"})]})]})})}function jp(i){const{setShowProgress:s,setProgressTitle:f,setProgressState:d,triggerRefresh:h}=i,m=v.useRef(null),w=v.useRef(!1),E=v.useRef(!1),C=v.useRef(null),g=v.useCallback(()=>{m.current&&m.current.abort()},[]);return{execute:v.useCallback(async z=>{const{endpoint:U,body:q,title:H,operationType:Y,onComplete:ie,onError:Q}=z;if(w.current){console.warn("Streaming operation already in progress");return}w.current=!0,E.current=!1;const ae=`${U.split("/").pop()?.replace("-stream","")||"op"}-${Date.now()}-${Math.random().toString(36).slice(2)}`;C.current=ae;const fe=new AbortController;m.current=fe;const X=async()=>{E.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{}};fe.signal.addEventListener("abort",X),f(H),s(!0),d({current:0,total:0,percent:0,status:"processing",message:`Starting ${H.toLowerCase()}...`});try{const W=await fetch(U,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...q,operationId:ae})});if(!W.ok){const K=await W.json().catch(()=>({}));throw new Error(K.error||`Request failed: ${W.status}`)}if(!W.body)throw new Error("No response body");const I=W.body.getReader(),te=new TextDecoder;let B="";try{for(;;){const{done:K,value:de}=await I.read();if(K)break;B+=te.decode(de,{stream:!0});const pe=B.split(`
25
+
26
+ `);B=pe.pop()||"";for(const me of pe)if(me.startsWith("data: "))try{const ne=JSON.parse(me.slice(6));if(ne.type==="start")d(Ae=>({...Ae,total:ne.total||Ae.total}));else if(ne.type==="progress")d({current:ne.current||0,total:ne.total||0,percent:ne.percent||Math.round((ne.current||0)/(ne.total||1)*100),status:"processing",currentFile:ne.currentFile,message:ne.message});else if(ne.type==="cleanup")d(Ae=>({...Ae,status:"cleanup",message:ne.message}));else if(ne.type==="complete"){const Ae=ne.cancelled===!0,D=ne.processed??ne.moved??ne.renamed??ne.pushed??ne.downloaded??ne.added??ne.imported??ne.deleted??ne.current??0;d({current:D,total:D,percent:100,status:Ae?"stopped":ne.errors&&ne.errors>0?"error":"complete",message:ne.message,processed:D,errors:ne.errors,orphanedFiles:ne.orphanedFiles,isDelete:Y==="delete",isMove:Y==="move",isScan:Y==="scan"}),h(),ie?.(ne)}else ne.type==="error"&&(d(Ae=>({...Ae,status:"error",message:ne.message})),Q?.(ne.message||"Unknown error"))}catch{}}}catch(K){if(!E.current)throw K}finally{fe.signal.removeEventListener("abort",X)}}catch(W){if(!E.current){const I=W instanceof Error?W.message:"Operation failed";console.error(`${H} error:`,W),d({current:0,total:0,percent:0,status:"error",message:I}),Q?.(I)}}finally{w.current=!1,m.current=null,C.current=null}},[s,f,d,h]),stop:g,get isRunning(){return w.current}}}const d1=ln`
27
+ from { opacity: 0; }
28
+ to { opacity: 1; }
29
+ `,f1=ln`
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
+ `,Lt={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:",d1," 0.15s ease-out;font-family:",fi,";",""),modal:y(ro," 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:",f1," 0.2s ease-out;overflow:hidden;",""),header:{name:"nsgk6m",styles:"padding:24px 24px 0"},title:y("font-size:",V.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:",V.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:",V.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:",V.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 qp({selectedItems:i,currentPath:s,onMove:f,onCancel:d}){const[h,m]=v.useState([]),[w,E]=v.useState(!0),[C,g]=v.useState(null);v.useEffect(()=>{async function H(){try{const Y=await fetch("/api/studio/list-folders");if(Y.ok){const ie=await Y.json();console.log("Loaded folders:",ie),m(ie.folders||[])}else console.error("Failed to load folders:",Y.status,await Y.text())}catch(Y){console.error("Failed to load folders:",Y)}finally{E(!1)}}H()},[]);const A=Array.from(i),z=h.filter(H=>!A.some(Y=>H.path===Y||H.path.startsWith(Y+"/"))),U=H=>H===s,q=()=>{C&&f(C)};return r("div",{css:Lt.overlay,onClick:d,children:b("div",{css:Lt.modal,onClick:H=>H.stopPropagation(),children:[r("div",{css:Lt.header,children:r("h3",{css:Lt.title,children:"Move Items"})}),b("div",{css:Lt.body,children:[b("p",{css:Lt.message,children:["Select a destination folder for ",i.size," item",i.size!==1?"s":"",":"]}),w?r("div",{css:Lt.loading,children:r("div",{css:Lt.spinner})}):z.length===0?r("div",{css:Lt.loading,children:"No available folders to move to."}):r("div",{css:Lt.folderList,children:z.map(H=>{const Y=U(H.path);return b("div",{css:[Lt.folderItem,C===H.path&&Lt.folderItemSelected,Y&&Lt.folderItemDisabled,"",""],style:{paddingLeft:12},onClick:()=>!Y&&g(H.path),children:[H.depth>0&&r("div",{css:Lt.treeIndent,children:Array.from({length:H.depth}).map((ie,Q)=>r("div",{css:Lt.treeLine},Q))}),r("svg",{css:Lt.folderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:r("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:Lt.folderName,children:[H.name,Y&&" (current)"]})]},H.path)})})]}),b("div",{css:Lt.footer,children:[r("button",{css:[Lt.btn,Lt.btnCancel,"",""],onClick:d,children:"Cancel"}),r("button",{css:[Lt.btn,Lt.btnConfirm,"",""],onClick:q,disabled:!C,children:"Move Here"})]})]})})}const h1=`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`,ve={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:",V.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:",V.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:",V.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:",V.base,";font-weight:500;color:",u.text,";margin:0 0 4px 0;",""),stepDesc:y("font-size:",V.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:",V.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:",V.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 Yp({isOpen:i,onClose:s}){const[f,d]=v.useState(!1),h=async()=>{try{await navigator.clipboard.writeText(h1),d(!0),setTimeout(()=>d(!1),2e3)}catch(m){console.error("Failed to copy:",m)}};return i?r("div",{css:ve.overlay,onClick:s,children:b("div",{css:ve.modal,onClick:m=>m.stopPropagation(),children:[b("div",{css:ve.header,children:[r("svg",{css:ve.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"})}),r("h2",{css:ve.title,children:"Set Up CDN Storage"}),r("button",{css:ve.closeBtn,onClick:s,children:r("svg",{css:ve.closeIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),b("div",{css:ve.content,children:[r("p",{css:ve.intro,children:"Sync your images to Cloudflare R2 for faster global delivery. R2 offers generous free tier with no egress fees."}),b("ol",{css:ve.steps,children:[b("li",{css:ve.step,children:[r("span",{css:ve.stepNumber,children:"1"}),b("div",{css:ve.stepContent,children:[r("h4",{css:ve.stepTitle,children:"Create a Cloudflare account"}),b("p",{css:ve.stepDesc,children:["Sign up at"," ",r("a",{css:ve.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:ve.step,children:[r("span",{css:ve.stepNumber,children:"2"}),b("div",{css:ve.stepContent,children:[r("h4",{css:ve.stepTitle,children:"Create an R2 bucket"}),b("p",{css:ve.stepDesc,children:["Go to R2 in your Cloudflare dashboard and create a new bucket. Choose a name like ",r("code",{children:"my-images"}),"."]})]})]}),b("li",{css:ve.step,children:[r("span",{css:ve.stepNumber,children:"3"}),b("div",{css:ve.stepContent,children:[r("h4",{css:ve.stepTitle,children:"Enable public access"}),b("p",{css:ve.stepDesc,children:['In bucket settings, enable "Public Access" and copy the public URL (e.g., ',r("code",{children:"https://pub-xxx.r2.dev"}),")."]})]})]}),b("li",{css:ve.step,children:[r("span",{css:ve.stepNumber,children:"4"}),b("div",{css:ve.stepContent,children:[r("h4",{css:ve.stepTitle,children:"Create API token"}),r("p",{css:ve.stepDesc,children:'Go to R2 → Manage R2 API Tokens → Create API Token. Select "Object Read & Write" permissions for your bucket.'})]})]}),b("li",{css:ve.step,children:[r("span",{css:ve.stepNumber,children:"5"}),b("div",{css:ve.stepContent,children:[r("h4",{css:ve.stepTitle,children:"Add environment variables"}),b("p",{css:ve.stepDesc,children:["Add these to your ",r("code",{children:".env.local"})," file:"]})]})]})]}),b("div",{css:ve.envVarsWrapper,children:[b("div",{css:ve.envVars,children:[b("span",{css:ve.envVar,children:[r("span",{css:ve.envKey,children:"CLOUDFLARE_R2_ACCOUNT_ID"}),"=",r("span",{css:ve.envValue,children:"your_account_id"})]}),b("span",{css:ve.envVar,children:[r("span",{css:ve.envKey,children:"CLOUDFLARE_R2_ACCESS_KEY_ID"}),"=",r("span",{css:ve.envValue,children:"your_access_key"})]}),b("span",{css:ve.envVar,children:[r("span",{css:ve.envKey,children:"CLOUDFLARE_R2_SECRET_ACCESS_KEY"}),"=",r("span",{css:ve.envValue,children:"your_secret_key"})]}),b("span",{css:ve.envVar,children:[r("span",{css:ve.envKey,children:"CLOUDFLARE_R2_BUCKET_NAME"}),"=",r("span",{css:ve.envValue,children:"your_bucket_name"})]}),b("span",{css:ve.envVar,children:[r("span",{css:ve.envKey,children:"CLOUDFLARE_R2_PUBLIC_URL"}),"=",r("span",{css:ve.envValue,children:"https://pub-xxx.r2.dev"})]}),b("span",{css:ve.envVar,children:[r("span",{css:ve.envKey,children:"NEXT_PUBLIC_CLOUDFLARE_R2_PUBLIC_URL"}),"=",r("span",{css:ve.envValue,children:"https://pub-xxx.r2.dev"})]})]}),b("button",{css:ve.copyBtn,onClick:h,title:"Copy to clipboard",children:[f&&r("span",{css:ve.copiedTooltip,children:"Copied!"}),r("svg",{css:ve.copyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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:ve.footer,children:[b("a",{css:ve.docsBtn,href:"https://developers.cloudflare.com/r2/get-started/",target:"_blank",rel:"noopener noreferrer",children:["R2 Documentation",r("svg",{css:ve.externalIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"})})]}),r("button",{css:ve.doneBtn,onClick:s,children:"Got it"})]})]})}):null}const p1=ln`
44
+ from { opacity: 0; }
45
+ to { opacity: 1; }
46
+ `,m1=ln`
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
+ `,xt={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:",p1," 0.15s ease-out;font-family:",fi,";",""),modal:y(ro," 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:",m1," 0.2s ease-out;overflow:hidden;",""),header:{name:"nsgk6m",styles:"padding:24px 24px 0"},title:y("font-size:",V.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:",V.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:",V.base,";color:",u.text,";margin:0 0 4px;",""),dropzoneHint:y("font-size:",V.sm,";color:",u.textSecondary,";margin:0;",""),textarea:y("width:100%;min-height:150px;padding:12px;font-size:",V.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:",V.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:",V.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:",V.sm,";color:",u.text,";","")};function g1({currentPath:i,onClose:s,onUploadComplete:f,streamingOperation:d,setShowProgress:h,setProgressTitle:m,setProgressState:w}){const[E,C]=v.useState("upload"),[g,A]=v.useState([]),[z,U]=v.useState(""),[q,H]=v.useState(!1),[Y,ie]=v.useState(!1),[Q,ce]=v.useState(!1),ae=v.useRef(null),fe=v.useCallback(B=>{B&&A(Array.from(B))},[]),X=v.useCallback(B=>{B.preventDefault(),H(!1),fe(B.dataTransfer.files)},[fe]),W=v.useRef(!1),I=v.useCallback(async()=>{if(g.length!==0){if(h&&m&&w){s(),W.current=!1,m("Uploading Files"),h(!0),w({current:0,total:g.length,percent:0,status:"processing",message:"Uploading..."});let B=0;const K=[];for(let de=0;de<g.length;de++){if(W.current){w(ne=>({...ne,status:"stopped",message:`Stopped. Uploaded ${B} file${B!==1?"s":""}.`})),f();return}const pe=g[de],me=new FormData;me.append("file",pe),me.append("path",i);try{(await fetch("/api/studio/upload",{method:"POST",body:me})).ok?B++:K.push(pe.name)}catch{K.push(pe.name)}w({current:de+1,total:g.length,percent:Math.round((de+1)/g.length*100),status:"processing",currentFile:pe.name})}w({current:g.length,total:g.length,percent:100,status:"complete",message:`Uploaded ${B} file${B!==1?"s":""}.${K.length>0?` ${K.length} failed.`:""}`}),f();return}ie(!0);try{for(const B of g){const K=new FormData;K.append("file",B),K.append("path",i),await fetch("/api/studio/upload",{method:"POST",body:K})}f(),s()}catch(B){console.error("Upload failed:",B)}finally{ie(!1)}}},[g,i,f,s,h,m,w]),te=v.useCallback(async()=>{const B=z.split(`
56
+ `).map(K=>K.trim()).filter(K=>K.length>0);if(B.length!==0){if(d){s(),await d.execute({endpoint:"/api/studio/import",body:{urls:B},title:"Importing URLs",onComplete:()=>{f()}});return}ce(!0);try{const de=(await fetch("/api/studio/import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({urls:B})})).body?.getReader();if(!de)throw new Error("No reader");const pe=new TextDecoder;for(;;){const{done:me,value:ne}=await de.read();if(me)break;const D=pe.decode(ne).split(`
57
+
58
+ `).filter(J=>J.startsWith("data: "));for(const J of D)JSON.parse(J.replace("data: ","")).type==="complete"&&(f(),s())}}catch(K){console.error("Import failed:",K)}finally{ce(!1)}}},[z,f,s,d]);return r("div",{css:xt.overlay,onClick:s,children:b("div",{css:xt.modal,onClick:B=>B.stopPropagation(),children:[b("div",{css:xt.header,children:[r("h3",{css:xt.title,children:"Add New"}),b("div",{css:xt.tabs,children:[r("button",{css:[xt.tab,E==="upload"&&xt.tabActive,"",""],onClick:()=>C("upload"),children:"Upload Files"}),r("button",{css:[xt.tab,E==="import"&&xt.tabActive,"",""],onClick:()=>C("import"),children:"Import URLs"})]})]}),r("div",{css:xt.body,children:E==="upload"?b(tt,{children:[b("div",{css:[xt.dropzone,q&&xt.dropzoneActive,"",""],onClick:()=>ae.current?.click(),onDragOver:B=>{B.preventDefault(),H(!0)},onDragLeave:()=>H(!1),onDrop:X,children:[r("svg",{css:xt.dropzoneIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"})}),r("p",{css:xt.dropzoneText,children:"Drop files here or click to browse"}),r("p",{css:xt.dropzoneHint,children:"Supports images and other media files"})]}),r("input",{ref:ae,type:"file",multiple:!0,css:xt.fileInput,onChange:B=>fe(B.target.files)}),g.length>0&&b("div",{css:xt.selectedFiles,children:[g.length," file",g.length!==1?"s":""," selected"]})]}):b(tt,{children:[r("p",{css:xt.textareaLabel,children:"Paste image URLs (one per line)"}),r("textarea",{css:xt.textarea,value:z,onChange:B=>U(B.target.value),placeholder:`https://cdn.example.com/photos/image1.jpg
59
+ https://cdn.example.com/photos/image2.jpg`})]})}),b("div",{css:xt.footer,children:[r("button",{css:[xt.btn,xt.btnCancel,"",""],onClick:s,children:"Cancel"}),E==="upload"?r("button",{css:[xt.btn,xt.btnConfirm,"",""],onClick:I,disabled:g.length===0||Y,children:Y?"Uploading...":"Upload"}):r("button",{css:[xt.btn,xt.btnConfirm,"",""],onClick:te,disabled:!z.trim()||Q,children:Q?"Importing...":"Import"})]})]})})}const y1="36px",je={btn:y("height:",y1,";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(ro," 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:",V.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:",V.base,";font-weight:600;color:",u.text,";margin:0 0 12px 0;",""),description:y("font-size:",V.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:",V.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:",V.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:",V.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:",V.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:",V.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:",V.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:",V.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:",V.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:",V.xs,";color:",u.danger,";margin-top:8px;padding:8px 12px;background:",u.dangerLight,";border-radius:6px;","")};function b1(){const[i,s]=v.useState(!1);return b(tt,{children:[r("button",{css:je.btn,onClick:()=>s(!0),"aria-label":"Settings",children:b("svg",{css:je.icon,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[r("circle",{cx:"12",cy:"12",r:"3"}),r("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"})]})}),i&&r(x1,{onClose:()=>s(!1)})]})}const v1=`# 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 x1({onClose:i}){const{triggerRefresh:s}=oo(),[f,d]=v.useState(!1),[h,m]=v.useState([]),[w,E]=v.useState(!0),[C,g]=v.useState(!1),[A,z]=v.useState(!1);v.useEffect(()=>{async function Q(){try{const ae=await(await fetch("/api/studio/cdns")).json();m(ae.cdns||[])}catch(ce){console.error("Failed to load CDN URLs:",ce)}finally{E(!1)}}Q()},[]);const U=()=>{navigator.clipboard.writeText(v1),d(!0),setTimeout(()=>d(!1),2e3)},q=v.useCallback((Q,ce)=>{m(ae=>{const fe=[...ae];return fe[Q]=ce,fe}),z(!0)},[]),H=v.useCallback(()=>{m(Q=>[...Q,""]),z(!0)},[]),Y=v.useCallback(Q=>{m(ce=>ce.filter((ae,fe)=>fe!==Q)),z(!0)},[]),ie=v.useCallback(async()=>{g(!0);try{(await fetch("/api/studio/cdns",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cdns:h})})).ok&&(z(!1),s(),i())}catch(Q){console.error("Failed to save CDN URLs:",Q)}finally{g(!1)}},[h,s,i]);return r("div",{css:je.overlay,onClick:i,children:b("div",{css:je.panel,onClick:Q=>Q.stopPropagation(),children:[b("div",{css:je.header,children:[r("h2",{css:je.title,children:"Settings"}),r("button",{css:je.closeBtn,onClick:i,children:r("svg",{css:je.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),b("div",{css:je.sections,children:[b("section",{children:[r("h3",{css:je.sectionTitle,children:"CDN URLs"}),r("p",{css:je.description,children:"Manage CDN base URLs used by your images:"}),w?r("p",{css:je.description,children:"Loading..."}):b(tt,{children:[r("div",{css:je.cdnList,children:h.map((Q,ce)=>b("div",{css:je.cdnRow,children:[r("span",{css:je.cdnIndex,children:ce}),r("input",{css:je.cdnInput,type:"text",value:Q,onChange:ae=>q(ce,ae.target.value),placeholder:"https://cdn.example.com"}),r("button",{css:je.cdnDeleteBtn,onClick:()=>Y(ce),title:"Delete CDN URL",children:r("svg",{width:"16",height:"16",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"})})})]},ce))}),b("button",{css:je.cdnAddBtn,onClick:H,children:[r("svg",{width:"14",height:"14",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})}),"Add CDN URL"]}),h.length>0&&r("p",{css:je.warning,children:"Warning: Changing CDN URLs may break image references. The index numbers correspond to image `c` values."})]})]}),b("section",{children:[r("h3",{css:je.sectionTitle,children:"Environment Variables"}),b("p",{css:je.description,children:["Configure in ",r("code",{children:".env.local"})," file (local development only, not needed in production):"]}),b("div",{css:je.codeWrapper,children:[b("button",{css:je.copyBtn,onClick:U,title:"Copy to clipboard",children:[f&&r("span",{css:je.tooltip,children:"Copied!"}),r("svg",{css:je.copyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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:je.code,children:[r("p",{css:je.codeLine,children:"NEXT_PUBLIC_PRODUCTION_URL=http://localhost:3000"}),r("p",{css:je.codeLine,children:" "}),r("p",{css:je.codeLine,children:"# Cloudflare R2 Storage"}),r("p",{css:je.codeLine,children:"CLOUDFLARE_R2_ACCOUNT_ID=your_account_id"}),r("p",{css:je.codeLine,children:"CLOUDFLARE_R2_ACCESS_KEY_ID=your_access_key_id"}),r("p",{css:je.codeLine,children:"CLOUDFLARE_R2_SECRET_ACCESS_KEY=your_secret_access_key"}),r("p",{css:je.codeLine,children:"CLOUDFLARE_R2_BUCKET_NAME=your_bucket_name"}),r("p",{css:je.codeLine,children:"CLOUDFLARE_R2_PUBLIC_URL=https://your-cdn.example.com"})]})]})]}),b("section",{children:[r("h3",{css:je.sectionTitle,children:"Thumbnail Sizes"}),b("div",{css:je.grid,children:[b("div",{children:[r("label",{css:je.label,children:"Small"}),r("input",{css:je.input,type:"number",defaultValue:300})]}),b("div",{children:[r("label",{css:je.label,children:"Medium"}),r("input",{css:je.input,type:"number",defaultValue:700})]}),b("div",{children:[r("label",{css:je.label,children:"Large"}),r("input",{css:je.input,type:"number",defaultValue:1400})]})]})]})]}),b("div",{css:je.footer,children:[r("button",{css:je.cancelBtn,onClick:i,children:"Cancel"}),r("button",{css:je.saveBtn,onClick:ie,disabled:C||!A,children:C?"Saving...":"Save Changes"})]})]})})}const au="36px",S1=ln`
68
+ to { transform: rotate(360deg); }
69
+ `,we={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:",au,";padding:0 14px;border-radius:6px;font-size:",V.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:",V.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:",S1," 1s linear infinite;",""),selectionCount:y("font-size:",V.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:",V.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:",au,";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:",au,";padding:0 32px 0 12px;border:1px solid ",u.border,";border-radius:6px;font-size:",V.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 C1(){const{selectedItems:i,viewMode:s,setViewMode:f,clearSelection:d,currentPath:h,triggerRefresh:m,focusedItem:w,scanRequested:E,clearScanRequest:C,fileItems:g,requestProcess:A,setProcessMode:z,actionState:U,cancelAction:q}=oo(),H=v.useRef(null),Y=v.useRef(null),[ie,Q]=v.useState(!1),[ce,ae]=v.useState(!1),[fe,X]=v.useState(!1),[W,I]=v.useState(!1),[te,B]=v.useState(!1),[K,de]=v.useState(0),[pe,me]=v.useState(!1),[ne,Ae]=v.useState(0),[D,J]=v.useState(!1),[F,ke]=v.useState(!1),[qe,x]=v.useState(!1),[_,P]=v.useState(0),[oe,Se]=v.useState(!1),[De,Ge]=v.useState("Processing Images"),[yt,He]=v.useState({current:0,total:0,percent:0,status:"processing"}),[Kt,Ke]=v.useState(null),[ee,Ee]=v.useState(!1),[Je,ot]=v.useState(!1),[_t,Gt]=v.useState(!1),[hn,Pt]=v.useState(!1),[ht,Vt]=v.useState(!1),[zt,Le]=v.useState(!1),[Tt,wn]=v.useState(!1),[Yn,Hn]=v.useState(!1),kn=v.useRef(null),Z=v.useRef(null),se=jp({setShowProgress:Se,setProgressTitle:Ge,setProgressState:He,triggerRefresh:m}),Xe=h==="public/images"||h.startsWith("public/images/");v.useCallback(()=>{H.current?.click()},[]);const nt=v.useCallback(()=>{I(!0),m(),setTimeout(()=>I(!1),600)},[m]),Ne=v.useCallback(async()=>{X(!0),Ge("Scanning Files"),Se(!0),He({current:0,total:0,percent:0,status:"processing",message:"Scanning for files..."});try{const le=(await fetch("/api/studio/scan",{method:"POST"})).body?.getReader();if(!le)throw new Error("No reader");const ye=new TextDecoder;let be="";for(;;){const{done:_e,value:Ue}=await le.read();if(_e)break;be+=ye.decode(Ue,{stream:!0});const Pe=be.split(`
70
+
71
+ `);be=Pe.pop()||"";for(const et of Pe){if(!et.startsWith("data: "))continue;const Be=JSON.parse(et.slice(6));if(Be.type==="start")He({current:0,total:Be.total,percent:0,status:"processing",message:`Scanning ${Be.total} files...`});else if(Be.type==="progress")He({current:Be.current,total:Be.total,percent:Be.percent,status:"processing",currentFile:Be.currentFile});else if(Be.type==="cleanup")He(nn=>({...nn,message:Be.message}));else if(Be.type==="complete"){let nn=Be.renamed>0?`${Be.renamed} file(s) renamed due to conflicts. `:"";Be.orphanedFiles&&Be.orphanedFiles.length>0&&(nn+=`Found ${Be.orphanedFiles.length} orphaned thumbnail(s) in images folder.`),He({current:Be.total||0,total:Be.total||0,percent:100,status:"complete",processed:Be.added,alreadyProcessed:Be.existingCount,errors:Be.errors,orphanedFiles:Be.orphanedFiles,pendingUpdates:Be.pendingUpdates,orphanedEntries:Be.orphanedEntries,message:nn||void 0,isScan:!0}),m()}else Be.type==="error"&&He({current:0,total:0,percent:0,status:"error",message:Be.message||"Scan failed"})}}}catch(he){console.error("Scan error:",he),He({current:0,total:0,percent:0,status:"error",message:"Scan failed"})}finally{X(!1)}},[m]);v.useEffect(()=>{const he=le=>{kn.current&&!kn.current.contains(le.target)&&wn(!1),Z.current&&!Z.current.contains(le.target)&&Hn(!1)};return document.addEventListener("mousedown",he),()=>document.removeEventListener("mousedown",he)},[]),v.useEffect(()=>{E&&!fe&&(C(),Ne())},[E,fe,C,Ne]);const Me=v.useCallback(async he=>{const le=he.target.files;if(!le||le.length===0)return;const ye=Array.from(le);ye.length>1?(He({current:0,total:ye.length,percent:0,status:"processing",message:"Uploading files..."}),Se(!0)):ae(!0);let be=0,_e=0;try{for(let Ue=0;Ue<ye.length;Ue++){const Pe=ye[Ue],et=new FormData;et.append("file",Pe),et.append("path",h);try{const Be=await fetch("/api/studio/upload",{method:"POST",body:et});if(Be.ok)be++;else{const nn=await Be.json();_e++,ye.length===1&&(Be.status>=500?(console.error("Upload error:",nn),Ke({title:"Upload Failed",message:`Failed to upload ${Pe.name}: ${nn.error||"Unknown error"}`})):Ke({title:"Cannot Upload Here",message:nn.error||"Upload not allowed in this location."}))}}catch{_e++}ye.length>1&&He({current:Ue+1,total:ye.length,percent:Math.round((Ue+1)/ye.length*100),status:"processing",currentFile:Pe.name})}ye.length>1&&He({current:ye.length,total:ye.length,percent:100,status:"complete",processed:be,errors:_e}),m()}catch(Ue){console.error("Upload error:",Ue),ye.length>1?He({current:0,total:0,percent:0,status:"error",message:"Upload failed."}):Ke({title:"Upload Failed",message:"Upload failed. Check console for details."})}finally{ae(!1),H.current&&(H.current.value="")}},[h,m]),Ct=v.useCallback(async he=>{if(i.size>0){const ye=Array.from(i),be=ye.filter(Ue=>(Ue.split("/").pop()||"").includes(".")&&!Ue.endsWith("/")),_e=ye.filter(Ue=>!(Ue.split("/").pop()||"").includes(".")||Ue.endsWith("/"));if(_e.length>0)try{const Pe=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(_e.join(","))}`)).json();if(Pe.images)for(const et of Pe.images){const Be=`public/${et}`;be.includes(Be)||be.push(Be)}}catch(Ue){console.error("Failed to get folder files:",Ue)}if(be.length===0){Ke({title:"No Files Found",message:"No files found in the selected items."});return}z(he),A(be)}else try{const be=await(await fetch("/api/studio/count-images")).json();if(!be.images||be.images.length===0){Ke({title:"No Images Found",message:"No images found in the public folder to process."});return}const _e=be.images.map(Ue=>`public/${Ue}`);z(he),A(_e)}catch(ye){console.error("Failed to get images:",ye),Ke({title:"Error",message:"Failed to get images."})}},[i,A,z]),bt=v.useCallback(()=>{se.stop(),Y.current&&(He(he=>({...he,status:"stopping"})),Y.current.abort())},[se]),ml=v.useCallback(async()=>{const he=yt.orphanedFiles;if(!(!he||he.length===0))try{const le=await fetch("/api/studio/delete-orphans",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:he})}),ye=await le.json();le.ok?(He(be=>({...be,orphanedFiles:void 0,orphansRemoved:ye.deleted,message:`Deleted ${ye.deleted} orphaned thumbnail${ye.deleted!==1?"s":""}.`})),m()):Ke({title:"Delete Failed",message:ye.error||"Failed to delete orphaned files."})}catch(le){console.error("Delete orphans error:",le),Ke({title:"Delete Failed",message:"Failed to delete orphaned files. Check console for details."})}},[yt.orphanedFiles,m]),Qa=v.useCallback(async()=>{if(i.size===0)return;const he=Array.from(i),le=he.filter(_e=>(_e.split("/").pop()||"").includes(".")&&!_e.endsWith("/")),ye=he.filter(_e=>!(_e.split("/").pop()||"").includes(".")||_e.endsWith("/"));let be=le.length;if(ye.length>0)try{const Ue=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(ye.join(","))}`)).json();Ue.images&&(be+=Ue.images.length)}catch(_e){console.error("Failed to get folder files:",_e)}de(be),B(!0)},[i]),Nr=v.useCallback(async()=>{B(!1);const he=Array.from(i);he.length!==0&&await se.execute({endpoint:"/api/studio/delete-stream",body:{paths:he},title:"Deleting Files",operationType:"delete",onComplete:()=>{d()}})},[i,d,se]),gl=v.useCallback(async()=>{if(i.size===0)return;const he=Array.from(i),le=he.filter(et=>(et.split("/").pop()||"").includes(".")&&!et.endsWith("/")),ye=he.filter(et=>!(et.split("/").pop()||"").includes(".")||et.endsWith("/")),be=ye.length>0;if(be)try{const Be=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(ye.join(","))}`)).json();if(Be.images)for(const nn of Be.images){const po=`public/${nn}`;le.includes(po)||le.push(po)}}catch(et){console.error("Failed to get folder files:",et)}if(le.length===0){Ke({title:"No Files Found",message:"No files found in the selected items."});return}let _e=!1,Ue=!1,Pe=0;for(const et of le){const Be=g.find(nn=>nn.path===et);Be?Be.isRemote?_e=!0:Be.cdnPushed?Pe++:Ue=!0:be&&(Ue=!0)}if(!be&&Pe===le.length){Ke({title:"Already Pushed",message:`All ${le.length} file${le.length!==1?"s are":" is"} already on the CDN.`});return}Ae(le.length),J(_e),ke(Ue),me(!0)},[i,g]),yl=v.useCallback(async()=>{me(!1);const he=Array.from(i),le=he.filter(_e=>(_e.split("/").pop()||"").includes(".")&&!_e.endsWith("/")),ye=he.filter(_e=>!(_e.split("/").pop()||"").includes(".")||_e.endsWith("/"));if(ye.length>0)try{const Ue=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(ye.join(","))}`)).json();if(Ue.images)for(const Pe of Ue.images){const et=`public/${Pe}`;le.includes(et)||le.push(et)}}catch(_e){console.error("Failed to get folder files:",_e)}const be=le.map(_e=>"/"+_e.replace(/^public\//,""));be.length!==0&&await se.execute({endpoint:"/api/studio/sync-stream",body:{imageKeys:be},title:"Pushing to CDN",onComplete:()=>{d()},onError:_e=>{(_e.includes("R2 not configured")||_e.includes("CLOUDFLARE_R2"))&&(Se(!1),Vt(!0))}})},[i,d,se]),[Ka,$n]=v.useState([]),[bl,Za]=v.useState(0),jr=v.useCallback(async()=>{if(i.size===0)return;const he=Array.from(i),le=he.filter(Ue=>(Ue.split("/").pop()||"").includes(".")&&!Ue.endsWith("/")),ye=he.filter(Ue=>!(Ue.split("/").pop()||"").includes(".")||Ue.endsWith("/")),be=ye.length>0;if(be)try{const Pe=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(ye.join(","))}`)).json();if(Pe.images)for(const et of Pe.images){const Be=`public/${et}`;le.includes(Be)||le.push(Be)}}catch(Ue){console.error("Failed to get folder files:",Ue)}if(le.length===0){Ke({title:"No Files Found",message:"No files found in the selected items."});return}let _e;if(be)_e=le;else if(_e=le.filter(Ue=>{const Pe=g.find(et=>et.path===Ue);return Pe&&Pe.cdnPushed&&!Pe.isRemote}),_e.length===0){Ke({title:"No CDN Files",message:`None of the ${le.length} selected file${le.length!==1?"s are":" is"} on the CDN.`});return}$n(_e),Za(le.length),P(_e.length),x(!0)},[i,g]),hi=v.useCallback(async()=>{x(!1),U.showDownloadConfirm&&q();const le=(U.showDownloadConfirm?U.actionPaths:Ka).map(ye=>"/"+ye.replace(/^public\//,""));await se.execute({endpoint:"/api/studio/download-stream",body:{imageKeys:le},title:"Downloading from CDN",onComplete:()=>d()})},[Ka,d,U.showDownloadConfirm,U.actionPaths,q,se]),so=v.useCallback(async()=>{if(i.size===0)return;const le=Array.from(i).filter(ye=>{const be=g.find(_e=>_e.path===ye);return be&&(be.hasUpdate||be.type==="folder"&&be.updateCount&&be.updateCount>0)});if(le.length===0){Ke({title:"No Updates",message:"No files with pending updates in selection."});return}await se.execute({endpoint:"/api/studio/push-updates-stream",body:{paths:le},title:"Pushing Updates",onComplete:()=>d()})},[i,g,d,se]),Fa=v.useCallback(async()=>{if(i.size===0)return;const le=Array.from(i).filter(ye=>{const be=g.find(_e=>_e.path===ye);return be&&(be.hasUpdate||be.type==="folder"&&be.updateCount&&be.updateCount>0)});if(le.length!==0)try{const ye=await fetch("/api/studio/cancel-updates",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:le})});if(ye.ok)d(),m();else{const be=await ye.json();Ke({title:"Cancel Failed",message:be.error||"Unknown error"})}}catch(ye){console.error("Cancel updates error:",ye),Ke({title:"Cancel Failed",message:"Failed to cancel updates. Check console for details."})}},[i,g,d,m]),qr=v.useCallback(async he=>{Ee(!1);try{const le=await fetch("/api/studio/create-folder",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({parentPath:h,name:he})});if(le.ok)m();else{const ye=await le.json();Ke({title:"Create Folder Failed",message:ye.error||"Unknown error"})}}catch(le){console.error("Create folder error:",le),Ke({title:"Create Folder Failed",message:"Failed to create folder. Check console for details."})}},[h,m]),pi=v.useCallback(()=>{i.size!==0&&Pt(!0)},[i]),mi=v.useCallback(async he=>{const le=Array.from(i);await se.execute({endpoint:"/api/studio/move",body:{paths:le,destination:he},title:"Moving Files",onComplete:()=>d()})},[i,d,se]),{searchQuery:co,setSearchQuery:Wn}=oo(),uo=v.useCallback(he=>{Wn(he.target.value)},[Wn]),gi=v.useCallback(he=>{he.key==="Escape"&&(he.stopPropagation(),Wn(""),he.target.blur())},[Wn]),Un=i.size>0;Un&&Array.from(i).some(he=>{const le=g.find(ye=>ye.path===he);return le&&le.cdnPushed&&!le.isRemote}),Un&&Array.from(i).every(he=>{const le=g.find(ye=>ye.path===he);return le&&le.type==="file"&&le.cdnPushed&&!le.isRemote});const Gn=Un&&Array.from(i).some(he=>{const le=g.find(ye=>ye.path===he);return le&&(le.hasUpdate||le.type==="folder"&&le.updateCount&&le.updateCount>0)}),Mt=Array.from(i),Ot=Mt.length===1&&!Mt[0].includes("."),pn=Ot?Mt[0]:null,vl=pn&&pn.split("/").pop()||"",ya=Mt.length===1&&Mt[0].includes("."),ba=ya?Mt[0]:null,fo=ba&&ba.split("/").pop()||"",Ja=v.useCallback(async he=>{pn&&(ot(!1),await se.execute({endpoint:"/api/studio/rename-stream",body:{oldPath:pn,newName:he},title:"Renaming Folder",onComplete:()=>d()}))},[pn,d,se]),ho=v.useCallback(async he=>{ba&&(Gt(!1),await se.execute({endpoint:"/api/studio/rename-stream",body:{oldPath:ba,newName:he},title:"Renaming File",onComplete:()=>d()}))},[ba,d,se]),In=b(tt,{children:[(qe||U.showDownloadConfirm)&&r(ao,{title:"Download from CDN",message:(()=>{const he=U.showDownloadConfirm?U.downloadImageCount:_,le=U.showDownloadConfirm?U.downloadTotalSelected:bl;return le>he?`Download ${he} of ${le} selected file${le!==1?"s":""} from Cloudflare R2? (${le-he} not on CDN)`:`Download ${he} image${he!==1?"s":""} from Cloudflare R2 to local storage? Images will be removed from the CDN.`})(),confirmLabel:"Download",onConfirm:hi,onCancel:()=>{x(!1),U.showDownloadConfirm&&q()}}),oe&&r(pl,{title:De,progress:yt,onStop:bt,onDeleteOrphans:ml,onClose:()=>{Se(!1),He({current:0,total:0,percent:0,status:"processing"}),m()}})]});return w?In:b(tt,{children:[In,te&&r(ao,{title:"Delete Items",message:`Are you sure you want to delete ${K} file${K!==1?"s":""}? This action cannot be undone.`,confirmLabel:"Delete",variant:"danger",onConfirm:Nr,onCancel:()=>B(!1)}),pe&&r(ao,{title:"Push to CDN",message:`Push ${ne} image${ne!==1?"s":""} to Cloudflare R2?${D?" Remote images will be downloaded first.":""}${F?" After pushing, local files will be deleted.":""}`,confirmLabel:"Push",onConfirm:yl,onCancel:()=>me(!1)}),ee&&r(hl,{title:"New Folder",message:"Enter a name for the new folder:",placeholder:"Folder name",confirmLabel:"Create",onConfirm:qr,onCancel:()=>Ee(!1)}),hn&&r(qp,{selectedItems:i,currentPath:h,onMove:he=>{Pt(!1),mi(he)},onCancel:()=>Pt(!1)}),Je&&pn&&r(hl,{title:"Rename Folder",message:"Enter a new name for the folder:",placeholder:vl,defaultValue:vl,confirmLabel:"Rename",onConfirm:Ja,onCancel:()=>ot(!1)}),_t&&ba&&r(hl,{title:"Rename File",message:"Enter a new name for the file:",placeholder:fo,defaultValue:fo,confirmLabel:"Rename",onConfirm:ho,onCancel:()=>Gt(!1)}),Kt&&r(pu,{title:Kt.title,message:Kt.message,onClose:()=>{Ke(null),m()}}),r(Yp,{isOpen:ht,onClose:()=>Vt(!1)}),ie&&r(g1,{currentPath:h,onClose:()=>Q(!1),onUploadComplete:()=>{Q(!1),m()},streamingOperation:se,setShowProgress:Se,setProgressTitle:Ge,setProgressState:He}),b("div",{css:we.toolbar,children:[r("input",{ref:H,type:"file",multiple:!0,accept:"image/*,video/*,audio/*,.pdf",onChange:Me,style:{display:"none"}}),b("div",{css:we.left,children:[b("button",{css:[we.btn,we.btnPrimary,"",""],onClick:()=>Q(!0),disabled:ce||Xe,children:[r(w1,{}),"Add New"]}),b("button",{css:we.btn,onClick:()=>{ya?Gt(!0):Ot?ot(!0):Ee(!0)},disabled:Xe&&!Ot&&!ya,title:Xe&&!Ot&&!ya?"Cannot create folders in protected images folder":void 0,children:[ya||Ot?r(E1,{}):r(D1,{}),ya?"Rename File":Ot?"Rename Folder":"New Folder"]}),r("div",{css:we.divider}),b("div",{css:we.cloudDropdownWrapper,ref:Z,children:[b("button",{css:we.btn,onClick:()=>Hn(!Yn),disabled:U.showProgress||Xe,title:Xe?"Cannot process images folder":void 0,children:[r(H1,{}),"Thumbnails",r("svg",{css:we.dropdownArrow,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),Yn&&b("div",{css:we.cloudDropdown,children:[b("button",{css:[we.cloudDropdownItem,we.cloudDropdownItemDefault,"",""],onClick:()=>{Hn(!1),Ct("generate")},children:[r(U1,{}),"Generate Thumbnails"]}),b("button",{css:[we.cloudDropdownItem,we.cloudDropdownItemDanger,"",""],onClick:()=>{Hn(!1),Ct("remove")},children:[r(B1,{}),"Remove Thumbnails"]})]})]}),b("button",{css:[we.btn,we.btnDanger,"",""],onClick:Qa,disabled:!Un,children:[r(M1,{}),"Delete"]}),b("button",{css:we.btn,onClick:pi,disabled:!Un,children:[r(T1,{}),"Move"]}),b("div",{css:we.cloudDropdownWrapper,ref:kn,children:[b("button",{css:[we.btn,we.btnCloud,"",""],onClick:()=>wn(!Tt),disabled:!Un,children:[r(Cp,{}),"Cloud",r("svg",{css:we.dropdownArrow,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),Tt&&Un&&b("div",{css:we.cloudDropdown,children:[Gn&&b(tt,{children:[b("button",{css:we.cloudDropdownItem,onClick:()=>{wn(!1),so()},children:[r(A1,{}),"Push Update"]}),b("button",{css:[we.cloudDropdownItem,we.cloudDropdownItemDanger,"",""],onClick:()=>{wn(!1),Fa()},children:[r(R1,{}),"Cancel Update"]}),r("div",{css:we.cloudDropdownDivider})]}),b("button",{css:we.cloudDropdownItem,onClick:()=>{wn(!1),gl()},children:[r(Cp,{}),"Push CDN"]}),b("button",{css:we.cloudDropdownItem,onClick:()=>{wn(!1),jr()},children:[r(L1,{}),"Download"]})]})]}),b("div",{css:we.searchWrapper,children:[r("input",{css:we.searchInput,type:"text",placeholder:"Search images...",value:co,onChange:uo,onKeyDown:gi}),co&&r("button",{css:we.searchClearBtn,onClick:()=>Wn(""),title:"Clear search",children:r("svg",{width:"14",height:"14",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})]}),b("div",{css:we.right,children:[Un&&b("span",{css:we.selectionCount,children:[i.size," selected",r("button",{css:we.clearBtn,onClick:d,children:"Clear"})]}),b("button",{css:we.btn,onClick:Ne,disabled:fe,children:[r(k1,{spinning:fe}),"Scan"]}),r("button",{css:we.btn,onClick:nt,title:"Refresh view",disabled:W,children:r(z1,{spinning:W})}),b("div",{css:we.viewToggle,children:[r("button",{css:[we.viewBtn,s==="grid"&&we.viewBtnActive,"",""],onClick:()=>f("grid"),"aria-label":"Grid view",children:r(_1,{})}),r("button",{css:[we.viewBtn,s==="list"&&we.viewBtnActive,"",""],onClick:()=>f("list"),"aria-label":"List view",children:r(O1,{})})]}),r(b1,{})]})]})]})}function w1(){return r("svg",{css:we.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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 k1({spinning:i}){return r("svg",{css:[we.icon,i&&we.iconSpin,"",""],fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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:i}){return r("svg",{css:[we.icon,i&&we.iconSpin,"",""],fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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 r("svg",{css:we.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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 D1(){return r("svg",{css:we.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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 E1(){return r("svg",{css:we.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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 T1(){return r("svg",{css:we.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4"})})}function Cp(){return r("svg",{css:we.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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 r("svg",{css:we.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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 R1(){return r("svg",{css:we.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}function L1(){return r("svg",{css:we.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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 r("svg",{css:we.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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 r("svg",{css:we.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 10h16M4 14h16M4 18h16"})})}function H1(){return r("svg",{css:we.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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 r("svg",{css:we.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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 B1(){return r("svg",{css:we.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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 N1{async get(s){const f=await fetch(s,{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(s,f){const d=await fetch(s,{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(s="public"){return this.get(`/api/studio/list?path=${encodeURIComponent(s)}`)}async search(s,f="public"){return this.get(`/api/studio/search?q=${encodeURIComponent(s)}&path=${encodeURIComponent(f)}`)}async listFolders(){return this.get("/api/studio/list-folders")}async countImages(){return this.get("/api/studio/count-images")}async folderImages(s){return this.get(`/api/studio/folder-images?folders=${encodeURIComponent(s.join(","))}`)}async upload(s,f="public"){const d=new FormData;d.append("file",s),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(s){return this.post("/api/studio/delete",{paths:s})}async createFolder(s,f){return this.post("/api/studio/create-folder",{parentPath:s,name:f})}async rename(s,f){return this.post("/api/studio/rename",{oldPath:s,newName:f})}async move(s,f){return this.post("/api/studio/move",{paths:s,destination:f})}async push(s){return this.post("/api/studio/sync",{imageKeys:s})}async reprocess(s){return this.post("/api/studio/reprocess",{imageKeys:s})}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 oi=new N1;function Gp(){const{currentPath:i,setCurrentPath:s,navigateUp:f,selectedItems:d,toggleSelection:h,selectRange:m,lastSelectedPath:w,selectAll:E,clearSelection:C,refreshKey:g,setFocusedItem:A,triggerRefresh:z,triggerScan:U,searchQuery:q,showError:H,setFileItems:Y,editedImageKey:ie}=oo(),[Q,ce]=v.useState([]),[ae,fe]=v.useState(!0),[X,W]=v.useState(!1),[I,te]=v.useState(null),B=v.useRef(!0),K=v.useRef(i);v.useEffect(()=>{async function x(){const _=K.current!==i;(B.current||_)&&fe(!0),K.current=i;try{const P=q&&q.length>=2?await oi.search(q,i):await oi.list(i),oe=P.items||[];ce(oe),Y(oe),W(P.isEmpty===!0)}catch(P){const oe=P instanceof Error?P.message:"Failed to load items";H("Load Error",oe),ce([]),Y([]),W(!1)}fe(!1),B.current=!1}x()},[i,g,q,H,Y]),v.useEffect(()=>{async function x(){if(i!=="public"){te(null);return}try{const _=await oi.checkFeaturedImage();te(_)}catch{te(null)}}x()},[i,g]);const de=i==="public",pe=q&&q.length>=2,me=[...Q].sort((x,_)=>x.type==="folder"&&_.type!=="folder"?-1:x.type!=="folder"&&_.type==="folder"?1:x.name.localeCompare(_.name)),ne=me.length>0&&me.every(x=>d.has(x.path)),Ae=me.some(x=>d.has(x.path)),D=v.useCallback((x,_)=>{_.shiftKey&&w?m(w,x.path,me):h(x.path)},[w,m,me,h]),J=v.useCallback(x=>{x.type==="folder"?s(x.path):A(x)},[s,A]),F=v.useCallback(async x=>{try{const _="/"+x.path.replace(/^public\//,"");await oi.reprocess([_]),z()}catch(_){const P=_ instanceof Error?_.message:"Failed to generate thumbnail";H("Processing Error",P)}},[z,H]),ke=v.useCallback(()=>{ne?C():E(me)},[ne,C,E,me]),qe=I&&!I.exists?I:null;return{items:Q,loading:ae,sortedItems:me,metaEmpty:X,missingFeaturedImage:qe,isAtRoot:de,isSearching:pe,allItemsSelected:ne,someItemsSelected:Ae,currentPath:i,selectedItems:d,navigateUp:f,editedImageKey:ie,handleItemClick:D,handleOpen:J,handleGenerateThumbnail:F,handleSelectAll:ke,triggerScan:U,triggerRefresh:z}}const j1=ln`
72
+ from { opacity: 0; }
73
+ to { opacity: 1; }
74
+ `,q1=ln`
75
+ from { transform: translateY(-20px); opacity: 0; }
76
+ to { transform: translateY(0); opacity: 1; }
77
+ `,Y1=ln`
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:",j1," 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:",q1," 0.2s ease;overflow:hidden;",""),header:y("padding:20px 24px;border-bottom:1px solid ",u.border,";",""),title:y("font-size:",V.lg,";font-weight:600;color:",u.text,";margin:0;",""),subtitle:y("font-size:",V.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:",Y1," 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:",V.xs,";font-weight:600;color:",u.textSecondary,";text-transform:uppercase;letter-spacing:0.05em;",""),urlValue:y("font-size:",V.base,";font-weight:500;color:",u.text,";word-break:break-all;",""),noOptions:y("padding:20px;text-align:center;color:",u.textSecondary,";font-size:",V.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:",V.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 Xp({isOpen:i,onClose:s,onSelect:f}){const[d,h]=v.useState(!0),[m,w]=v.useState(null),[E,C]=v.useState(null);if(v.useEffect(()=>{if(!i)return;async function A(){h(!0);try{const z=await oi.getFeaturedImageOptions();w(z.devUrl),C(z.productionUrl)}catch(z){console.error("Failed to load featured image options:",z)}h(!1)}A()},[i]),!i)return null;const g=m||E;return r("div",{css:Wt.overlay,onClick:s,children:b("div",{css:Wt.modal,onClick:A=>A.stopPropagation(),children:[b("div",{css:Wt.header,children:[r("h2",{css:Wt.title,children:"Generate Screenshot"}),r("p",{css:Wt.subtitle,children:"Choose which URL to screenshot"})]}),r("div",{css:Wt.body,children:d?r("div",{css:Wt.loading,children:r("div",{css:Wt.spinner})}):g?b(tt,{children:[m&&b("button",{css:Wt.urlButton,onClick:()=>f(m),children:[r("span",{css:Wt.urlLabel,children:"Development"}),r("span",{css:Wt.urlValue,children:m})]}),E&&b("button",{css:Wt.urlButton,onClick:()=>f(E),children:[r("span",{css:Wt.urlLabel,children:"Production"}),r("span",{css:Wt.urlValue,children:E})]})]}):b("div",{css:Wt.noOptions,children:["No URLs configured. Set ",r("code",{children:"NEXT_PUBLIC_PRODUCTION_URL"})," in .env.local and/or .env.production."]})}),r("div",{css:Wt.footer,children:r("button",{css:Wt.cancelBtn,onClick:s,children:"Cancel"})})]})})}const G1=ln`
80
+ to { transform: rotate(360deg); }
81
+ `,re={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:",G1," 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:",V.base,";margin:0 0 4px 0;&:last-child{color:",u.textMuted,";font-size:",V.sm,";}",""),scanButton:y("margin-top:16px;padding:10px 24px;font-size:",V.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:",V.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:",V.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:",V.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:",V.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:",V.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:",V.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:",V.base,";font-weight:500;color:",u.textSecondary,";cursor:pointer;&:hover{color:",u.text,";}",""),selectAllCheckbox:y("width:16px;height:16px;accent-color:",u.primary,";","")};function X1(){const{loading:i,sortedItems:s,metaEmpty:f,missingFeaturedImage:d,isAtRoot:h,isSearching:m,allItemsSelected:w,someItemsSelected:E,selectedItems:C,navigateUp:g,handleItemClick:A,handleOpen:z,handleGenerateThumbnail:U,handleSelectAll:q,triggerScan:H,triggerRefresh:Y,editedImageKey:ie}=Gp(),[Q,ce]=v.useState(!1),[ae,fe]=v.useState(!1),[X,W]=v.useState({current:0,total:3,percent:0,status:"processing",message:"Generating screenshot..."}),I=()=>{ce(!0)},te=async B=>{ce(!1),fe(!0),W({current:0,total:4,percent:0,status:"processing",message:"Starting..."});try{const K=await fetch("/api/studio/generate-featured-image",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:B})});if(!K.ok){const me=await K.json();W({current:0,total:4,percent:0,status:"error",message:me.error||"Failed to generate screenshot"});return}const de=K.body?.getReader(),pe=new TextDecoder;if(de){let me="";for(;;){const{done:ne,value:Ae}=await de.read();if(ne)break;me+=pe.decode(Ae,{stream:!0});const D=me.split(`
82
+ `);me=D.pop()||"";for(const J of D)if(J.startsWith("data: "))try{const F=JSON.parse(J.slice(6));F.type==="start"?W(ke=>({...ke,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}),Y()):F.type==="error"&&W(ke=>({...ke,status:"error",message:F.message}))}catch{}}}}catch(K){console.error("Featured image generation error:",K),W({current:0,total:3,percent:0,status:"error",message:"An error occurred while generating the screenshot"})}};return i?b(tt,{children:[ae&&r(pl,{title:"Generating Screenshot",progress:X,onClose:()=>fe(!1)}),r("div",{css:re.loading,children:r("div",{css:re.spinner})})]}):f&&h?b("div",{css:re.empty,children:[r("svg",{css:re.emptyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),r("p",{css:re.emptyText,children:"No files tracked yet"}),r("p",{css:re.emptyText,children:"Click Scan to discover files in your public folder"}),r("button",{css:re.scanButton,onClick:H,children:"Scan for Files"})]}):s.length===0&&h?b("div",{css:re.empty,children:[r("svg",{css:re.emptyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"})}),r("p",{css:re.emptyText,children:"No files in this folder"}),r("p",{css:re.emptyText,children:"Upload images or click Scan in the toolbar"})]}):b(tt,{children:[r(Xp,{isOpen:Q,onClose:()=>ce(!1),onSelect:te}),ae&&r(pl,{title:"Generating Screenshot",progress:X,onClose:()=>fe(!1)}),b("div",{children:[s.length>0&&r("div",{css:re.selectAllRow,children:b("label",{css:re.selectAllLabel,children:[r("input",{type:"checkbox",css:re.selectAllCheckbox,checked:w,ref:B=>{B&&(B.indeterminate=E&&!w)},onChange:q}),"Select all (",s.length,")"]})}),b("div",{css:re.grid,children:[!h&&!m&&b("div",{css:[re.item,re.parentItem,"",""],onClick:g,children:[r("div",{css:re.content,children:r("svg",{css:re.parentIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M3 10h10a8 8 0 018 8v2M3 10l6 6m-6-6l6-6"})})}),b("div",{css:re.label,children:[r("p",{css:re.name,children:".."}),r("p",{css:re.size,children:"Parent folder"})]})]}),s.map(B=>r(Q1,{item:B,isSelected:C.has(B.path),onClick:K=>A(B,K),onOpen:()=>z(B),onGenerateThumbnail:()=>U(B),editedImageKey:ie},B.path)),h&&d&&!m&&b("div",{css:re.featuredPlaceholder,onClick:I,title:`Generate ${d.filename}`,children:[b("div",{css:re.featuredContent,children:[r("svg",{css:re.featuredIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"})}),r("span",{css:re.featuredText,children:"Generate Screenshot"})]}),b("div",{css:re.featuredLabel,children:[r("p",{css:re.name,children:d.filename}),r("p",{css:re.size,children:"Click to screenshot homepage"})]})]})]})]})]})}function V1(i){return i.includes("/images/sm/")?"SM":i.includes("/images/md/")?"MD":i.includes("/images/lg/")?"LG":i.includes("/images/full/")?"FULL":null}function Q1({item:i,isSelected:s,onClick:f,onOpen:d,onGenerateThumbnail:h,editedImageKey:m}){const[w,E]=v.useState(!1),C=i.type==="folder",g=!C&&i.thumbnail!==void 0,A=i.thumbnail&&m&&m.path===i.path?`${i.thumbnail}?v=${m.key}`:i.thumbnail,z=i.isProtected||C&&i.name==="images"&&i.path==="public/images",U=V1(i.path),q=!C&&(i.hasSm||i.hasMd||i.hasLg||i.hasFull||U),H=ie=>{ie.stopPropagation();const Q="/"+i.path.replace(/^public\//,"");navigator.clipboard.writeText(Q),E(!0),setTimeout(()=>E(!1),1500)},Y=ie=>{if(z){ie.stopPropagation(),d();return}f(ie)};return b("div",{css:[re.item,s&&!z&&re.itemSelected,"",""],onClick:Y,children:[!z&&r("div",{css:re.checkboxWrapper,onClick:ie=>ie.stopPropagation(),children:r("input",{type:"checkbox",css:re.checkbox,checked:s,onChange:()=>f({})})}),b("div",{css:[re.content,i.isCloud&&re.contentCloud,i.isRemote&&re.contentRemote,"",""],children:[b("button",{css:re.copyBtn,onClick:H,title:"Copy file path",children:[w&&r("span",{css:re.tooltip,children:"Copied!"}),r("svg",{css:re.copyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"})})]}),r("button",{css:re.openBtn,onClick:ie=>{ie.stopPropagation(),d()},children:"Open"}),C?z?b("div",{css:re.imagesFolderWrapper,children:[r("svg",{css:re.imagesFolderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:r("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"})}),r("svg",{css:re.lockIcon,fill:"currentColor",viewBox:"0 0 20 20",children:r("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"})})]}):r("svg",{css:re.folderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:r("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&&A?r("img",{css:re.image,src:A,alt:i.name,loading:"lazy"}):r("svg",{css:re.fileIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"})})]}),r("div",{css:re.label,children:r("div",{css:re.labelRow,children:b("div",{css:re.labelText,children:[r("p",{css:re.name,title:i.name,children:i.name}),C?b("div",{css:re.folderStats,children:[i.localCount!==void 0&&i.localCount>0&&b("span",{css:[re.folderStat,re.folderStatLocal,"",""],title:`${i.localCount} local`,children:[r("svg",{css:re.folderStatIconLocal,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"})}),i.localCount]}),i.cloudCount!==void 0&&i.cloudCount>0&&b("span",{css:[re.folderStat,re.folderStatCloud,"",""],title:`${i.cloudCount} in cloud`,children:[r("svg",{css:re.folderStatIconCloud,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"})}),i.cloudCount]}),i.remoteCount!==void 0&&i.remoteCount>0&&b("span",{css:[re.folderStat,re.folderStatRemote,"",""],title:`${i.remoteCount} remote`,children:[r("svg",{css:re.folderStatIconRemote,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"})}),i.remoteCount]}),i.updateCount!==void 0&&i.updateCount>0&&b("span",{css:[re.folderStat,re.folderStatUpdate,"",""],title:`${i.updateCount} pending update${i.updateCount!==1?"s":""}`,children:[r("svg",{css:re.folderStatIconUpdate,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"})}),i.updateCount]}),!i.localCount&&!i.cloudCount&&!i.remoteCount&&!i.updateCount&&i.fileCount!==void 0&&b("span",{css:re.size,children:[i.fileCount," files"]})]}):b("div",{css:re.statusRow,children:[r("div",{css:re.statusLeft,children:i.hasUpdate?b(tt,{children:[r("svg",{css:re.updateCloudIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"})}),r("svg",{css:re.updateSyncIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"})}),r("span",{css:re.updateLabel,children:"update"})]}):i.cdnPushed?r("svg",{css:i.isRemote?re.storedIconRemote:re.storedIconCloud,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:i.isRemote?r("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"}):r("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"})}):i.size!==void 0?r("span",{css:re.size,children:K1(i.size)}):null}),q&&r("span",{css:re.thumbChips,children:U?r("span",{css:re.thumbChip,children:U}):b(tt,{children:[i.hasSm&&r("span",{css:re.thumbChip,children:"SM"}),i.hasMd&&r("span",{css:re.thumbChip,children:"MD"}),i.hasLg&&r("span",{css:re.thumbChip,children:"LG"}),i.hasFull&&r("span",{css:re.thumbChip,children:"FULL"})]})})]})]})})})]})}function K1(i){return i<1024?`${i} B`:i<1024*1024?`${(i/1024).toFixed(1)} KB`:`${(i/(1024*1024)).toFixed(1)} MB`}const Z1=ln`
83
+ to { transform: rotate(360deg); }
84
+ `,$={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:",Z1," 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:",V.sm,";color:",u.textMuted,";margin-top:4px;",""),scanButton:y("margin-top:16px;padding:10px 24px;font-size:",V.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:",V.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:",V.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:",V.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:",V.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:",V.sm,";color:",u.textSecondary,";",""),cdnBadge:y("display:inline-flex;align-items:center;gap:4px;font-size:",V.xs,";font-weight:500;color:",u.success,";",""),cdnBadgeRemote:y("display:inline-flex;align-items:center;font-size:",V.xs,";font-weight:500;color:#ef4444;",""),cdnIcon:{name:"1suksrg",styles:"width:12px;height:12px"},cdnEmpty:y("font-size:",V.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:",V.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 F1(){const{loading:i,sortedItems:s,metaEmpty:f,missingFeaturedImage:d,isAtRoot:h,isSearching:m,allItemsSelected:w,someItemsSelected:E,selectedItems:C,navigateUp:g,handleItemClick:A,handleOpen:z,handleGenerateThumbnail:U,handleSelectAll:q,triggerScan:H,triggerRefresh:Y,editedImageKey:ie}=Gp(),[Q,ce]=v.useState(!1),[ae,fe]=v.useState(!1),[X,W]=v.useState({current:0,total:3,percent:0,status:"processing",message:"Generating screenshot..."}),I=()=>{ce(!0)},te=async B=>{ce(!1),fe(!0),W({current:0,total:4,percent:0,status:"processing",message:"Starting..."});try{const K=await fetch("/api/studio/generate-featured-image",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:B})});if(!K.ok){const me=await K.json();W({current:0,total:4,percent:0,status:"error",message:me.error||"Failed to generate screenshot"});return}const de=K.body?.getReader(),pe=new TextDecoder;if(de){let me="";for(;;){const{done:ne,value:Ae}=await de.read();if(ne)break;me+=pe.decode(Ae,{stream:!0});const D=me.split(`
85
+ `);me=D.pop()||"";for(const J of D)if(J.startsWith("data: "))try{const F=JSON.parse(J.slice(6));F.type==="start"?W(ke=>({...ke,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}),Y()):F.type==="error"&&W(ke=>({...ke,status:"error",message:F.message}))}catch{}}}}catch(K){console.error("Featured image generation error:",K),W({current:0,total:3,percent:0,status:"error",message:"An error occurred while generating the screenshot"})}};return i?r("div",{css:$.loading,children:r("div",{css:$.spinner})}):f&&h?b("div",{css:$.empty,children:[r("p",{children:"No files tracked yet"}),r("p",{css:$.emptyHint,children:"Click Scan to discover files in your public folder"}),r("button",{css:$.scanButton,onClick:H,children:"Scan for Files"})]}):s.length===0&&h?b("div",{css:$.empty,children:[r("p",{children:"No files in this folder"}),r("p",{css:$.emptyHint,children:"Upload images or click Scan in the toolbar"})]}):b(tt,{children:[r(Xp,{isOpen:Q,onClose:()=>ce(!1),onSelect:te}),ae&&r(pl,{title:"Generating Screenshot",progress:X,onClose:()=>fe(!1)}),r("div",{css:$.tableWrapper,children:b("table",{css:$.table,children:[r("thead",{children:b("tr",{children:[r("th",{css:[$.th,$.thCheckbox,"",""],children:s.length>0&&r("input",{type:"checkbox",css:$.checkbox,checked:w,ref:B=>{B&&(B.indeterminate=E&&!w)},onChange:q})}),r("th",{css:$.th,children:"Name"}),r("th",{css:[$.th,$.thSize,"",""],children:"Size"}),r("th",{css:[$.th,$.thDimensions,"",""],children:"Dimensions"}),r("th",{css:[$.th,$.thCdn,"",""],children:"CDN"})]})}),b("tbody",{css:$.tbody,children:[!h&&!m&&b("tr",{css:$.parentRow,onClick:g,children:[r("td",{css:$.td}),r("td",{css:$.td,children:b("div",{css:$.nameCell,children:[r("svg",{css:$.parentIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M3 10h10a8 8 0 018 8v2M3 10l6 6m-6-6l6-6"})}),r("span",{css:$.name,children:".."})]})}),r("td",{css:[$.td,$.meta,"",""],children:"--"}),r("td",{css:[$.td,$.meta,"",""],children:"Parent folder"}),r("td",{css:$.td,children:"--"})]}),s.map(B=>r(J1,{item:B,isSelected:C.has(B.path),onClick:K=>A(B,K),onOpen:()=>z(B),onGenerateThumbnail:()=>U(B),editedImageKey:ie},B.path)),h&&d&&!m&&b("tr",{css:$.featuredRow,onClick:I,title:`Generate ${d.filename}`,children:[r("td",{css:$.td}),r("td",{css:$.td,children:b("div",{css:$.nameCell,children:[r("div",{css:$.folderIconWrapper,children:r("svg",{css:$.featuredIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"})})}),r("span",{css:[$.name,$.featuredText,"",""],children:d.filename})]})}),r("td",{css:[$.td,$.meta,$.featuredText,"",""],children:"--"}),r("td",{css:[$.td,$.meta,$.featuredText,"",""],children:"Click to generate"}),r("td",{css:[$.td,$.featuredText,"",""],children:"--"})]})]})]})})]})}function J1({item:i,isSelected:s,onClick:f,onOpen:d,onGenerateThumbnail:h,editedImageKey:m}){const[w,E]=v.useState(!1),C=i.type==="folder",g=!C&&i.thumbnail!==void 0,A=i.thumbnail&&m&&m.path===i.path?`${i.thumbnail}?v=${m.key}`:i.thumbnail,z=i.isProtected||C&&i.name==="images"&&i.path==="public/images",U=H=>{H.stopPropagation();const Y="/"+i.path.replace(/^public\//,"");navigator.clipboard.writeText(Y),E(!0),setTimeout(()=>E(!1),1500)},q=H=>{if(z){H.stopPropagation(),d();return}f(H)};return b("tr",{css:[$.row,s&&!z&&$.rowSelected,"",""],onClick:q,children:[r("td",{css:[$.td,$.checkboxCell,"",""],onClick:H=>H.stopPropagation(),children:!z&&r("input",{type:"checkbox",css:$.checkbox,checked:s,onChange:()=>f({})})}),r("td",{css:$.td,children:b("div",{css:$.nameCell,children:[C?z?b("div",{css:$.imagesFolderWrapper,children:[r("svg",{css:$.imagesFolderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:r("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"})}),r("svg",{css:$.lockIcon,fill:"currentColor",viewBox:"0 0 20 20",children:r("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"})})]}):r("div",{css:$.folderIconWrapper,children:r("svg",{css:$.folderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:r("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&&A?r("div",{css:[$.thumbnailWrapper,i.isCloud&&$.thumbnailCloud,i.isRemote&&$.thumbnailRemote,"",""],children:r("img",{css:$.thumbnail,src:A,alt:i.name,loading:"lazy"})}):r("div",{css:[$.thumbnailWrapper,i.isCloud&&$.thumbnailCloud,i.isRemote&&$.thumbnailRemote,"",""],children:r("svg",{css:$.fileIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"})})}),r("span",{css:$.name,title:i.name,children:$1(i.name)}),b("div",{css:$.actionsCell,children:[b("button",{css:$.copyBtn,onClick:U,title:"Copy file path",children:[w&&r("span",{css:$.tooltip,children:"Copied!"}),r("svg",{css:$.copyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"})})]}),r("button",{css:$.openBtn,onClick:H=>{H.stopPropagation(),d()},children:"Open"})]})]})}),r("td",{css:[$.td,$.meta,"",""],children:C?b("div",{css:$.folderStats,children:[i.localCount!==void 0&&i.localCount>0&&b("span",{css:[$.folderStat,$.folderStatLocal,"",""],title:`${i.localCount} local`,children:[r("svg",{css:$.folderStatIconLocal,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"})}),i.localCount]}),i.cloudCount!==void 0&&i.cloudCount>0&&b("span",{css:[$.folderStat,$.folderStatCloud,"",""],title:`${i.cloudCount} in cloud`,children:[r("svg",{css:$.folderStatIconCloud,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"})}),i.cloudCount]}),i.remoteCount!==void 0&&i.remoteCount>0&&b("span",{css:[$.folderStat,$.folderStatRemote,"",""],title:`${i.remoteCount} remote`,children:[r("svg",{css:$.folderStatIconRemote,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"})}),i.remoteCount]}),i.updateCount!==void 0&&i.updateCount>0&&b("span",{css:[$.folderStat,$.folderStatUpdate,"",""],title:`${i.updateCount} pending update${i.updateCount!==1?"s":""}`,children:[r("svg",{css:$.folderStatIconUpdate,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"})}),i.updateCount]}),!i.localCount&&!i.cloudCount&&!i.remoteCount&&!i.updateCount&&i.fileCount!==void 0&&b("span",{children:[i.fileCount," files"]}),!i.localCount&&!i.cloudCount&&!i.remoteCount&&!i.updateCount&&i.fileCount===void 0&&"--"]}):i.hasUpdate?b("span",{css:$.updateLabel,children:[r("svg",{css:$.updateCloudIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"})}),r("svg",{css:$.updateSyncIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"]}):i.cdnPushed?r("span",{css:$.storedLabel,children:r("svg",{css:i.isRemote?$.storedIconRemote:$.storedIconCloud,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:i.isRemote?r("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"}):r("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"})})}):i.size!==void 0?wp(i.size):"--"}),r("td",{css:[$.td,$.meta,"",""],children:C?i.totalSize!==void 0?wp(i.totalSize):"--":i.dimensions?`${i.dimensions.width}x${i.dimensions.height}`:"--"}),r("td",{css:$.td,children:i.cdnPushed?i.isRemote?r("span",{css:$.cdnBadgeRemote,children:"Remote"}):b("span",{css:$.cdnBadge,children:[r("svg",{css:$.cdnIcon,fill:"currentColor",viewBox:"0 0 20 20",children:r("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"]}):r("span",{css:$.cdnEmpty,children:"--"})})]})}function wp(i){return i<1024?`${i} B`:i<1024*1024?`${(i/1024).toFixed(1)} KB`:`${(i/(1024*1024)).toFixed(1)} MB`}function $1(i,s=32){if(i.length<=s)return i;const f=i.lastIndexOf("."),d=f>0?i.substring(f):"",h=f>0?i.substring(0,f):i,m=s-d.length-3;if(m<6)return i.substring(0,s-3)+"...";const w=Math.ceil(m/2),E=Math.floor(m/2);return h.substring(0,w)+"..."+h.substring(h.length-E)+d}var W1=Object.defineProperty,I1=(i,s,f)=>s in i?W1(i,s,{enumerable:!0,configurable:!0,writable:!0,value:f}):i[s]=f,Et=(i,s,f)=>I1(i,typeof s!="symbol"?s+"":s,f);const Or={x:0,y:0,width:0,height:0,unit:"px"},Pl=(i,s,f)=>Math.min(Math.max(i,s),f),P1=(...i)=>i.filter(s=>s&&typeof s=="string").join(" "),kp=(i,s)=>i===s||i.width===s.width&&i.height===s.height&&i.x===s.x&&i.y===s.y&&i.unit===s.unit;function eo(i,s,f){return i.unit==="%"?{...Or,...i,unit:"%"}:{unit:"%",x:i.x?i.x/s*100:0,y:i.y?i.y/f*100:0,width:i.width?i.width/s*100:0,height:i.height?i.height/f*100:0}}function Xa(i,s,f){return i.unit?i.unit==="px"?{...Or,...i,unit:"px"}:{unit:"px",x:i.x?i.x*s/100:0,y:i.y?i.y*f/100:0,width:i.width?i.width*s/100:0,height:i.height?i.height*f/100:0}:{...Or,...i,unit:"px"}}function zp(i,s,f,d,h,m=0,w=0,E=d,C=h){const g={...i};let A=Math.min(m,d),z=Math.min(w,h),U=Math.min(E,d),q=Math.min(C,h);s&&(s>1?(A=w?w*s:A,z=A/s,U=E*s):(z=m?m/s:z,A=z*s,q=C/s)),g.y<0&&(g.height=Math.max(g.height+g.y,z),g.y=0),g.x<0&&(g.width=Math.max(g.width+g.x,A),g.x=0);const H=d-(g.x+g.width);H<0&&(g.x=Math.min(g.x,d-A),g.width+=H);const Y=h-(g.y+g.height);if(Y<0&&(g.y=Math.min(g.y,h-z),g.height+=Y),g.width<A&&((f==="sw"||f=="nw")&&(g.x-=A-g.width),g.width=A),g.height<z&&((f==="nw"||f=="ne")&&(g.y-=z-g.height),g.height=z),g.width>U&&((f==="sw"||f=="nw")&&(g.x-=U-g.width),g.width=U),g.height>q&&((f==="nw"||f=="ne")&&(g.y-=q-g.height),g.height=q),s){const ie=g.width/g.height;if(ie<s){const Q=Math.max(g.width/s,z);(f==="nw"||f=="ne")&&(g.y-=Q-g.height),g.height=Q}else if(ie>s){const Q=Math.max(g.height*s,A);(f==="sw"||f=="nw")&&(g.x-=Q-g.width),g.width=Q}}return g}function e2(i,s,f,d){const h={...i};return s==="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):s==="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)),s==="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):s==="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 to={capture:!0,passive:!1};let t2=0;const Va=class qn extends v.PureComponent{constructor(){super(...arguments),Et(this,"docMoveBound",!1),Et(this,"mouseDownOnCrop",!1),Et(this,"dragStarted",!1),Et(this,"evData",{startClientX:0,startClientY:0,startCropX:0,startCropY:0,clientX:0,clientY:0,isResize:!0}),Et(this,"componentRef",v.createRef()),Et(this,"mediaRef",v.createRef()),Et(this,"resizeObserver"),Et(this,"initChangeCalled",!1),Et(this,"instanceId",`rc-${t2++}`),Et(this,"state",{cropIsActive:!1,newCropIsBeingDrawn:!1}),Et(this,"onCropPointerDown",s=>{const{crop:f,disabled:d}=this.props,h=this.getBox();if(!f)return;const m=Xa(f,h.width,h.height);if(d)return;s.cancelable&&s.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});const w=s.target.dataset.ord,E=!!w;let C=s.clientX,g=s.clientY,A=m.x,z=m.y;if(w){const U=s.clientX-h.x,q=s.clientY-h.y;let H=0,Y=0;w==="ne"||w=="e"?(H=U-(m.x+m.width),Y=q-m.y,A=m.x,z=m.y+m.height):w==="se"||w==="s"?(H=U-(m.x+m.width),Y=q-(m.y+m.height),A=m.x,z=m.y):w==="sw"||w=="w"?(H=U-m.x,Y=q-(m.y+m.height),A=m.x+m.width,z=m.y):(w==="nw"||w=="n")&&(H=U-m.x,Y=q-m.y,A=m.x+m.width,z=m.y+m.height),C=A+h.x+H,g=z+h.y+Y}this.evData={startClientX:C,startClientY:g,startCropX:A,startCropY:z,clientX:s.clientX,clientY:s.clientY,isResize:E,ord:w},this.mouseDownOnCrop=!0,this.setState({cropIsActive:!0})}),Et(this,"onComponentPointerDown",s=>{const{crop:f,disabled:d,locked:h,keepSelection:m,onChange:w}=this.props,E=this.getBox();if(d||h||m&&f)return;s.cancelable&&s.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});const C=s.clientX-E.x,g=s.clientY-E.y,A={unit:"px",x:C,y:g,width:0,height:0};this.evData={startClientX:s.clientX,startClientY:s.clientY,startCropX:C,startCropY:g,clientX:s.clientX,clientY:s.clientY,isResize:!0},this.mouseDownOnCrop=!0,w(Xa(A,E.width,E.height),eo(A,E.width,E.height)),this.setState({cropIsActive:!0,newCropIsBeingDrawn:!0})}),Et(this,"onDocPointerMove",s=>{const{crop:f,disabled:d,onChange:h,onDragStart:m}=this.props,w=this.getBox();if(d||!f||!this.mouseDownOnCrop)return;s.cancelable&&s.preventDefault(),this.dragStarted||(this.dragStarted=!0,m&&m(s));const{evData:E}=this;E.clientX=s.clientX,E.clientY=s.clientY;let C;E.isResize?C=this.resizeCrop():C=this.dragCrop(),kp(f,C)||h(Xa(C,w.width,w.height),eo(C,w.width,w.height))}),Et(this,"onComponentKeyDown",s=>{const{crop:f,disabled:d,onChange:h,onComplete:m}=this.props;if(d)return;const w=s.key;let E=!1;if(!f)return;const C=this.getBox(),g=this.makePixelCrop(C),A=(navigator.platform.match("Mac")?s.metaKey:s.ctrlKey)?qn.nudgeStepLarge:s.shiftKey?qn.nudgeStepMedium:qn.nudgeStep;if(w==="ArrowLeft"?(g.x-=A,E=!0):w==="ArrowRight"?(g.x+=A,E=!0):w==="ArrowUp"?(g.y-=A,E=!0):w==="ArrowDown"&&(g.y+=A,E=!0),E){s.cancelable&&s.preventDefault(),g.x=Pl(g.x,0,C.width-g.width),g.y=Pl(g.y,0,C.height-g.height);const z=Xa(g,C.width,C.height),U=eo(g,C.width,C.height);h(z,U),m&&m(z,U)}}),Et(this,"onHandlerKeyDown",(s,f)=>{const{aspect:d=0,crop:h,disabled:m,minWidth:w=0,minHeight:E=0,maxWidth:C,maxHeight:g,onChange:A,onComplete:z}=this.props,U=this.getBox();if(m||!h)return;if(s.key==="ArrowUp"||s.key==="ArrowDown"||s.key==="ArrowLeft"||s.key==="ArrowRight")s.stopPropagation(),s.preventDefault();else return;const q=(navigator.platform.match("Mac")?s.metaKey:s.ctrlKey)?qn.nudgeStepLarge:s.shiftKey?qn.nudgeStepMedium:qn.nudgeStep,H=Xa(h,U.width,U.height),Y=e2(H,s.key,q,f),ie=zp(Y,d,f,U.width,U.height,w,E,C,g);if(!kp(h,ie)){const Q=eo(ie,U.width,U.height);A(ie,Q),z&&z(ie,Q)}}),Et(this,"onDocPointerDone",s=>{const{crop:f,disabled:d,onComplete:h,onDragEnd:m}=this.props,w=this.getBox();this.unbindDocMove(),!(d||!f)&&this.mouseDownOnCrop&&(this.mouseDownOnCrop=!1,this.dragStarted=!1,m&&m(s),h&&h(Xa(f,w.width,w.height),eo(f,w.width,w.height)),this.setState({cropIsActive:!1,newCropIsBeingDrawn:!1}))}),Et(this,"onDragFocus",()=>{var s;(s=this.componentRef.current)==null||s.scrollTo(0,0)})}get document(){return document}getBox(){const s=this.mediaRef.current;if(!s)return{x:0,y:0,width:0,height:0};const{x:f,y:d,width:h,height:m}=s.getBoundingClientRect();return{x:f,y:d,width:h,height:m}}componentDidUpdate(s){const{crop:f,onComplete:d}=this.props;if(d&&!s.crop&&f){const{width:h,height:m}=this.getBox();h&&m&&d(Xa(f,h,m),eo(f,h,m))}}componentWillUnmount(){this.resizeObserver&&this.resizeObserver.disconnect(),this.unbindDocMove()}bindDocMove(){this.docMoveBound||(this.document.addEventListener("pointermove",this.onDocPointerMove,to),this.document.addEventListener("pointerup",this.onDocPointerDone,to),this.document.addEventListener("pointercancel",this.onDocPointerDone,to),this.docMoveBound=!0)}unbindDocMove(){this.docMoveBound&&(this.document.removeEventListener("pointermove",this.onDocPointerMove,to),this.document.removeEventListener("pointerup",this.onDocPointerDone,to),this.document.removeEventListener("pointercancel",this.onDocPointerDone,to),this.docMoveBound=!1)}getCropStyle(){const{crop:s}=this.props;if(s)return{top:`${s.y}${s.unit}`,left:`${s.x}${s.unit}`,width:`${s.width}${s.unit}`,height:`${s.height}${s.unit}`}}dragCrop(){const{evData:s}=this,f=this.getBox(),d=this.makePixelCrop(f),h=s.clientX-s.startClientX,m=s.clientY-s.startClientY;return d.x=Pl(s.startCropX+h,0,f.width-d.width),d.y=Pl(s.startCropY+m,0,f.height-d.height),d}getPointRegion(s,f,d,h){const{evData:m}=this,w=m.clientX-s.x,E=m.clientY-s.y;let C;h&&f?C=f==="nw"||f==="n"||f==="ne":C=E<m.startCropY;let g;return d&&f?g=f==="nw"||f==="w"||f==="sw":g=w<m.startCropX,g?C?"nw":"sw":C?"ne":"se"}resolveMinDimensions(s,f,d=0,h=0){const m=Math.min(d,s.width),w=Math.min(h,s.height);return!f||!m&&!w?[m,w]:f>1?m?[m,m/f]:[w*f,w]:w?[w*f,w]:[m,m/f]}resizeCrop(){const{evData:s}=this,{aspect:f=0,maxWidth:d,maxHeight:h}=this.props,m=this.getBox(),[w,E]=this.resolveMinDimensions(m,f,this.props.minWidth,this.props.minHeight);let C=this.makePixelCrop(m);const g=this.getPointRegion(m,s.ord,w,E),A=s.ord||g;let z=s.clientX-s.startClientX,U=s.clientY-s.startClientY;(w&&A==="nw"||A==="w"||A==="sw")&&(z=Math.min(z,-w)),(E&&A==="nw"||A==="n"||A==="ne")&&(U=Math.min(U,-E));const q={unit:"px",x:0,y:0,width:0,height:0};g==="ne"?(q.x=s.startCropX,q.width=z,f?(q.height=q.width/f,q.y=s.startCropY-q.height):(q.height=Math.abs(U),q.y=s.startCropY-q.height)):g==="se"?(q.x=s.startCropX,q.y=s.startCropY,q.width=z,f?q.height=q.width/f:q.height=U):g==="sw"?(q.x=s.startCropX+z,q.y=s.startCropY,q.width=Math.abs(z),f?q.height=q.width/f:q.height=U):g==="nw"&&(q.x=s.startCropX+z,q.width=Math.abs(z),f?(q.height=q.width/f,q.y=s.startCropY-q.height):(q.height=Math.abs(U),q.y=s.startCropY+U));const H=zp(q,f,g,m.width,m.height,w,E,d,h);return f||qn.xyOrds.indexOf(A)>-1?C=H:qn.xOrds.indexOf(A)>-1?(C.x=H.x,C.width=H.width):qn.yOrds.indexOf(A)>-1&&(C.y=H.y,C.height=H.height),C.x=Pl(C.x,0,m.width-C.width),C.y=Pl(C.y,0,m.height-C.height),C}renderCropSelection(){const{ariaLabels:s=qn.defaultProps.ariaLabels,disabled:f,locked:d,renderSelectionAddon:h,ruleOfThirds:m,crop:w}=this.props,E=this.getCropStyle();if(w)return ut.createElement("div",{style:E,className:"ReactCrop__crop-selection",onPointerDown:this.onCropPointerDown,"aria-label":s.cropArea,tabIndex:0,onKeyDown:this.onComponentKeyDown,role:"group"},!f&&!d&&ut.createElement("div",{className:"ReactCrop__drag-elements",onFocus:this.onDragFocus},ut.createElement("div",{className:"ReactCrop__drag-bar ord-n","data-ord":"n"}),ut.createElement("div",{className:"ReactCrop__drag-bar ord-e","data-ord":"e"}),ut.createElement("div",{className:"ReactCrop__drag-bar ord-s","data-ord":"s"}),ut.createElement("div",{className:"ReactCrop__drag-bar ord-w","data-ord":"w"}),ut.createElement("div",{className:"ReactCrop__drag-handle ord-nw","data-ord":"nw",tabIndex:0,"aria-label":s.nwDragHandle,onKeyDown:C=>this.onHandlerKeyDown(C,"nw"),role:"button"}),ut.createElement("div",{className:"ReactCrop__drag-handle ord-n","data-ord":"n",tabIndex:0,"aria-label":s.nDragHandle,onKeyDown:C=>this.onHandlerKeyDown(C,"n"),role:"button"}),ut.createElement("div",{className:"ReactCrop__drag-handle ord-ne","data-ord":"ne",tabIndex:0,"aria-label":s.neDragHandle,onKeyDown:C=>this.onHandlerKeyDown(C,"ne"),role:"button"}),ut.createElement("div",{className:"ReactCrop__drag-handle ord-e","data-ord":"e",tabIndex:0,"aria-label":s.eDragHandle,onKeyDown:C=>this.onHandlerKeyDown(C,"e"),role:"button"}),ut.createElement("div",{className:"ReactCrop__drag-handle ord-se","data-ord":"se",tabIndex:0,"aria-label":s.seDragHandle,onKeyDown:C=>this.onHandlerKeyDown(C,"se"),role:"button"}),ut.createElement("div",{className:"ReactCrop__drag-handle ord-s","data-ord":"s",tabIndex:0,"aria-label":s.sDragHandle,onKeyDown:C=>this.onHandlerKeyDown(C,"s"),role:"button"}),ut.createElement("div",{className:"ReactCrop__drag-handle ord-sw","data-ord":"sw",tabIndex:0,"aria-label":s.swDragHandle,onKeyDown:C=>this.onHandlerKeyDown(C,"sw"),role:"button"}),ut.createElement("div",{className:"ReactCrop__drag-handle ord-w","data-ord":"w",tabIndex:0,"aria-label":s.wDragHandle,onKeyDown:C=>this.onHandlerKeyDown(C,"w"),role:"button"})),h&&ut.createElement("div",{className:"ReactCrop__selection-addon",onPointerDown:C=>C.stopPropagation()},h(this.state)),m&&ut.createElement(ut.Fragment,null,ut.createElement("div",{className:"ReactCrop__rule-of-thirds-hz"}),ut.createElement("div",{className:"ReactCrop__rule-of-thirds-vt"})))}makePixelCrop(s){const f={...Or,...this.props.crop||{}};return Xa(f,s.width,s.height)}render(){const{aspect:s,children:f,circularCrop:d,className:h,crop:m,disabled:w,locked:E,style:C,ruleOfThirds:g}=this.props,{cropIsActive:A,newCropIsBeingDrawn:z}=this.state,U=m?this.renderCropSelection():null,q=P1("ReactCrop",h,A&&"ReactCrop--active",w&&"ReactCrop--disabled",E&&"ReactCrop--locked",z&&"ReactCrop--new-crop",m&&s&&"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 ut.createElement("div",{ref:this.componentRef,className:q,style:C},ut.createElement("div",{ref:this.mediaRef,className:"ReactCrop__child-wrapper",onPointerDown:this.onComponentPointerDown},f),m?ut.createElement("svg",{className:"ReactCrop__crop-mask",width:"100%",height:"100%"},ut.createElement("defs",null,ut.createElement("mask",{id:`hole-${this.instanceId}`},ut.createElement("rect",{width:"100%",height:"100%",fill:"white"}),d?ut.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"}):ut.createElement("rect",{x:`${m.x}${m.unit}`,y:`${m.y}${m.unit}`,width:`${m.width}${m.unit}`,height:`${m.height}${m.unit}`,fill:"black"}))),ut.createElement("rect",{fill:"black",fillOpacity:.5,width:"100%",height:"100%",mask:`url(#hole-${this.instanceId})`})):void 0,U)}};Et(Va,"xOrds",["e","w"]),Et(Va,"yOrds",["n","s"]),Et(Va,"xyOrds",["nw","ne","se","sw"]),Et(Va,"nudgeStep",1),Et(Va,"nudgeStepMedium",10),Et(Va,"nudgeStepLarge",100),Et(Va,"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 n2=Va;const a2=ln`
86
+ from { opacity: 0; }
87
+ to { opacity: 1; }
88
+ `,xe={overlay:y("position:fixed;inset:0;z-index:10001;display:flex;background:transparent;animation:",a2," 0.15s ease-out;font-family:",fi,";",""),container:y(ro," 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:",V.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:",V.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:",V.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:",V.sm,";font-weight:600;color:",u.text,";",""),subSectionLabel:y("font-size:",V.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:",V.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:",V.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:",V.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:",V.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:",V.sm,";color:",u.text,";text-align:right;",""),fileSize:y("font-size:",V.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:",V.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:",V.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:",V.xs,";color:",u.textMuted,";font-style:italic;",""),clearBtn:y("margin-top:8px;padding:6px 12px;font-size:",V.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,";}","")},l2=[{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 o2(i){return i<1024?`${i} B`:i<1024*1024?`${(i/1024).toFixed(1)} KB`:`${(i/(1024*1024)).toFixed(2)} MB`}function i2({imagePath:i,imageSrc:s,dimensions:f,fileSize:d,onClose:h,onSaveComplete:m,triggerRefresh:w}){const E=v.useRef(null),[C,g]=v.useState(),[A,z]=v.useState(),[U,q]=v.useState(void 0),[H,Y]=v.useState(f.width),[ie,Q]=v.useState(f.height),[ce,ae]=v.useState(!1),[fe,X]=v.useState(!1),[W,I]=v.useState({width:f.width,height:f.height}),[te,B]=v.useState(1),[K,de]=v.useState(!1),[pe,me]=v.useState(0),[ne,Ae]=v.useState(!1),D=H!==W.width||ie!==W.height,[J,F]=v.useState(0),[ke,qe]=v.useState(0),[x,_]=v.useState(!1),[P,oe]=v.useState(0),[Se,De]=v.useState(null),[Ge,yt]=v.useState(d),[He,Kt]=v.useState(95),[Ke,ee]=v.useState(0),Ee=Ke!==0,Je=Z=>{const se=Z.currentTarget,{naturalWidth:Xe,naturalHeight:nt,width:Ne,height:Me}=se;I({width:Xe,height:nt}),B(Xe/Ne),X(!0),Y(Xe),Q(nt)},ot=()=>{if(!fe||!E.current||K||D||Ee)return;const Z=E.current.width,se=E.current.height;if(de(!0),U){const Xe=Z/se;let nt,Ne;U>Xe?(nt=100,Ne=Xe/U*100):(Ne=100,nt=U/Xe*100);const Me={unit:"%",x:(100-nt)/2,y:(100-Ne)/2,width:nt,height:Ne};g(Me);const Ct={unit:"px",x:Math.round(Me.x/100*Z),y:Math.round(Me.y/100*se),width:Math.round(Me.width/100*Z),height:Math.round(Me.height/100*se)};z(Ct)}else g({unit:"%",x:0,y:0,width:100,height:100}),z({unit:"px",x:0,y:0,width:Z,height:se})},_t=()=>{de(!1),g(void 0),z(void 0)};v.useEffect(()=>{if(A&&fe&&te>0){const Z=Math.round(A.width*te),se=Math.round(A.height*te);F(Z),qe(se)}else K||(F(0),qe(0))},[A,fe,te,K]);const Gt=()=>{ee(Z=>(Z+90)%360)},hn=()=>{ee(Z=>(Z-90+360)%360)},Pt=()=>{ee(0)},ht=()=>{ne&&m({name:i.split("/").pop()||"",path:i,type:"file",dimensions:W}),h()},Vt=Z=>{if(q(Z),!fe||!E.current)return;const se=E.current.width,Xe=E.current.height;if(Z){const nt=se/Xe;let Ne,Me;Z>nt?(Ne=100,Me=nt/Z*100):(Me=100,Ne=Z/nt*100);const Ct={unit:"%",x:(100-Ne)/2,y:(100-Me)/2,width:Ne,height:Me};g(Ct);const bt={unit:"px",x:Math.round(Ct.x/100*se),y:Math.round(Ct.y/100*Xe),width:Math.round(Ct.width/100*se),height:Math.round(Ct.height/100*Xe)};z(bt)}else g({unit:"%",x:0,y:0,width:100,height:100}),z({unit:"px",x:0,y:0,width:se,height:Xe})},zt=W.width/W.height,Le=Z=>{if(K)return;const se=parseInt(Z.target.value)||0;Y(se),se>0&&Q(Math.round(se/zt))},Tt=Z=>{if(K)return;const se=parseInt(Z.target.value)||0;Q(se),se>0&&Y(Math.round(se*zt))},wn=()=>{Y(W.width),Q(W.height)},Yn=Z=>{if(!A||!E.current)return;const se=parseInt(Z.target.value)||0;if(se<=0)return;let Xe=ke;U&&(Xe=Math.round(se/U));const nt=se/te,Ne=Xe/te,Me={unit:"px",x:A.x,y:A.y,width:nt,height:Ne},Ct=E.current.width-Me.x,bt=E.current.height-Me.y;Me.width=Math.min(nt,Ct),Me.height=Math.min(Ne,bt),z(Me),g({unit:"px",x:Me.x,y:Me.y,width:Me.width,height:Me.height})},Hn=Z=>{if(!A||!E.current)return;const se=parseInt(Z.target.value)||0;if(se<=0)return;let Xe=J;U&&(Xe=Math.round(se*U));const nt=Xe/te,Ne=se/te,Me={unit:"px",x:A.x,y:A.y,width:nt,height:Ne},Ct=E.current.width-Me.x,bt=E.current.height-Me.y;Me.width=Math.min(nt,Ct),Me.height=Math.min(Ne,bt),z(Me),g({unit:"px",x:Me.x,y:Me.y,width:Me.width,height:Me.height})},kn=async()=>{if(fe){ae(!0);try{const Z=A?{x:Math.round(A.x*te),y:Math.round(A.y*te),width:Math.round(A.width*te),height:Math.round(A.height*te)}:{x:0,y:0,width:W.width,height:W.height};let se=K?J:D?H:W.width,Xe=K?ke:D?ie:W.height;if(Ke===90||Ke===270){const Me=se;se=Xe,Xe=Me}const Ne=await(await fetch("/api/studio/edit-image",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({imagePath:i,crop:Z,rotation:Ke,resize:{width:se,height:Xe},quality:He})})).json();Ne.success?(w(),m(Ne.updatedItem),I({width:Ne.dimensions.width,height:Ne.dimensions.height}),Y(Ne.dimensions.width),Q(Ne.dimensions.height),Ne.updatedItem?.size&&yt(Ne.updatedItem.size),de(!1),g(void 0),z(void 0),ee(0),Ae(!0),me(Date.now()),oe(Me=>Me+1),_(!0),setTimeout(()=>_(!1),3e3)):(console.error("Edit failed:",Ne.error),De(Ne.error||"Failed to save image"))}catch(Z){console.error("Edit error:",Z),De("An error occurred while saving the image")}finally{ae(!1)}}};return b("div",{css:xe.overlay,children:[b("div",{css:xe.container,children:[b("div",{css:xe.main,children:[r("div",{css:xe.headerButtons,children:r("button",{css:xe.closeBtn,onClick:ht,children:r("svg",{css:xe.closeIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})}),b("div",{css:xe.rotationWrapper,onClick:ot,children:[r(n2,{crop:K?C:void 0,onChange:Z=>g(Z),onComplete:Z=>z(Z),aspect:U,css:xe.cropWrapper,disabled:!K,children:r("img",{ref:E,src:pe?`${s}?v=${pe}`:s,alt:"Edit",onLoad:Je,style:{cursor:K?"crosshair":"pointer"}})}),!K&&fe&&r("div",{css:xe.cropHint,children:Ee?"Save rotation first to enable crop":D?"Save resize first to enable crop":"Click to enable crop selection"}),x&&r("div",{css:xe.successBanner,children:"Image updated"},P)]})]}),b("div",{css:xe.sidebar,children:[r("div",{css:xe.sidebarHeader,children:r("h2",{css:xe.sidebarTitle,children:"Edit Image"})}),b("div",{css:xe.sidebarContent,children:[b("div",{css:xe.section,children:[r("span",{css:xe.sectionLabel,children:"Crop Selection"}),r("span",{css:xe.subSectionLabel,children:"Aspect Ratio"}),r("div",{css:xe.aspectButtons,children:l2.map(Z=>r("button",{css:[xe.aspectBtn,U===Z.value&&xe.aspectBtnActive,"",""],onClick:()=>Vt(Z.value),disabled:D||Ee,children:Z.label},Z.label))}),K&&b(tt,{children:[r("span",{css:xe.subSectionLabel,children:"Selection Size"}),b("div",{css:xe.resizeRow,children:[r("input",{type:"number",css:xe.resizeInput,value:J,onChange:Yn,min:1}),r("span",{css:xe.resizeX,children:"×"}),r("input",{type:"number",css:xe.resizeInput,value:ke,onChange:Hn,min:1}),r("span",{css:xe.resizeX,children:"px"})]})]}),r("p",{css:xe.hint,children:Ee?"Save rotation first to enable crop":D?"Save resize first to enable crop":K?"Drag corners to resize crop area":"Click image to enable crop"}),K&&r("button",{css:xe.clearBtn,onClick:_t,children:"Clear Selection"})]}),b("div",{css:xe.section,children:[r("span",{css:xe.sectionLabel,children:"Rotation"}),r("div",{css:xe.rotatePreview,children:r("img",{src:pe?`${s}?v=${pe}`:s,alt:"Rotation preview",style:{transform:`rotate(${Ke}deg)`}})}),b("div",{css:xe.rotateButtons,children:[b("button",{css:xe.rotateBtn,onClick:hn,disabled:ce||K||D,children:[r("svg",{css:xe.rotateIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 10h10a8 8 0 018 8v2M3 10l6 6m-6-6l6-6"})}),"CCW"]}),b("button",{css:xe.rotateBtn,onClick:Gt,disabled:ce||K||D,children:[r("svg",{css:xe.rotateIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 10h-10a8 8 0 00-8 8v2M21 10l-6 6m6-6l-6-6"})}),"CW"]})]}),Ee&&r("button",{css:xe.clearBtn,onClick:Pt,children:"Reset Rotation"}),r("p",{css:xe.hint,children:K||D?"Save other changes first to rotate":Ee?"Click Save Changes to apply rotation":"Preview rotation before saving"})]}),b("div",{css:xe.section,children:[r("span",{css:xe.sectionLabel,children:"Resize Image"}),b("div",{css:xe.resizeRow,children:[r("input",{type:"number",css:xe.resizeInput,value:H,onChange:Le,min:1,disabled:K||Ee}),r("span",{css:xe.resizeX,children:"×"}),r("input",{type:"number",css:xe.resizeInput,value:ie,onChange:Tt,min:1,disabled:K||Ee}),r("span",{css:xe.resizeX,children:"px"})]}),D&&!K&&!Ee&&r("button",{css:xe.clearBtn,onClick:wn,children:"Reset to Original"}),Ee?r("p",{css:xe.hint,children:"Save rotation first to resize"}):K?r("p",{css:xe.hint,children:"Clear crop selection to resize"}):D?r("p",{css:xe.hint,children:"Save to apply resize, then crop"}):r("p",{css:xe.hint,children:"Maintains aspect ratio"})]}),b("div",{css:xe.section,children:[r("span",{css:xe.sectionLabel,children:"Quality"}),b("div",{css:xe.qualityRow,children:[r("input",{type:"range",css:xe.qualitySlider,min:1,max:100,value:He,onChange:Z=>Kt(parseInt(Z.target.value))}),b("span",{css:xe.qualityValue,children:[He,"%"]})]}),r("p",{css:xe.hint,children:"Lower quality = smaller file size"})]}),b("div",{css:xe.section,children:[r("span",{css:xe.sectionLabel,children:"File Size"}),r("p",{css:xe.fileSize,children:o2(Ge)})]})]}),b("div",{css:xe.sidebarFooter,children:[r("button",{css:xe.actionBtn,onClick:kn,disabled:ce||!fe,children:ce?b(tt,{children:[r("span",{css:xe.spinner}),"Saving..."]}):"Save Changes"}),r("button",{css:xe.cancelBtn,onClick:ht,disabled:ce,children:"Close"})]})]})]}),Se&&r(pu,{title:"Error",message:Se,onClose:()=>De(null)})]})}const r2=[".jpg",".jpeg",".png",".gif",".webp",".svg",".ico",".bmp",".tiff",".tif"],s2=[".mp4",".webm",".mov",".avi",".mkv",".m4v"];function c2(i){const s=i.toLowerCase().substring(i.lastIndexOf("."));return r2.includes(s)}function u2(i){const s=i.toLowerCase().substring(i.lastIndexOf("."));return s2.includes(s)}const ue={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:",V.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:",V.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:",V.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:",V.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 d2(){const{focusedItem:i,setFocusedItem:s,triggerRefresh:f,fileItems:d,setEditedImageKey:h,requestDelete:m,requestMove:w,requestSync:E,requestDownload:C,requestProcess:g,setProcessMode:A,actionState:z}=oo(),[U,q]=v.useState(!1),[H,Y]=v.useState(!1),[ie,Q]=v.useState({current:0,total:1,percent:0,status:"processing",message:"Renaming..."}),[ce,ae]=v.useState(!1),[fe,X]=v.useState(null),[W,I]=v.useState(!1),[te,B]=v.useState(!1),[K,de]=v.useState({current:0,total:3,percent:0,status:"processing",message:"Generating favicons..."}),[pe,me]=v.useState(!1),[ne,Ae]=v.useState(0),D=z.showProgress,J=i?i.name.toLowerCase()==="favicon.png"||i.name.toLowerCase()==="favicon.jpg":!1,F=i&&!i.isProtected&&/\.(jpg|jpeg|png|webp|gif)$/i.test(i.name)&&(!i.isCloud||i.hasUpdate),ke=ee=>{s(ee),Ae(Date.now()),h(ee.path)};if(!i)return null;const qe=c2(i.name),x=u2(i.name),_="/"+i.path.replace(/^public\//,""),P=i.cdnPushed&&i.cdnBaseUrl?`${i.cdnBaseUrl}${_}`:_,oe=ne?`${P}?v=${ne}`:P,Se=typeof window<"u"?window.location.origin:"",De=i.cdnPushed&&i.cdnBaseUrl?`${i.cdnBaseUrl}${_}`:`${Se}${_}`,Ge=()=>{s(null)},yt=()=>{navigator.clipboard.writeText(De),I(!0),setTimeout(()=>I(!1),1500)},He=async ee=>{if(ee&&ee!==i.name){q(!1),Y(!0),Q({current:0,total:1,percent:0,status:"processing",message:"Renaming file..."});try{const Ee=await fetch("/api/studio/rename-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({oldPath:i.path,newName:ee})});if(!Ee.body)throw new Error("No response body");const Je=Ee.body.getReader(),ot=new TextDecoder;let _t="",Gt="";for(;;){const{done:hn,value:Pt}=await Je.read();if(hn)break;_t+=ot.decode(Pt,{stream:!0});const ht=_t.split(`
89
+ `);_t=ht.pop()||"";for(const Vt of ht){if(!Vt.startsWith("data: "))continue;const zt=JSON.parse(Vt.slice(6));zt.type==="start"?Q({current:0,total:zt.total,percent:0,status:"processing",message:zt.message}):zt.type==="progress"?Q({current:zt.current,total:zt.total,percent:Math.round(zt.current/zt.total*100),status:"processing",message:zt.message}):zt.type==="complete"?(Gt=zt.newPath,Q({current:zt.renamed,total:zt.renamed,percent:100,status:"complete",message:"Renamed successfully"})):zt.type==="error"&&(Q(Le=>({...Le,status:"error",message:zt.message})),X({title:"Rename Failed",message:zt.message}))}}Gt&&(s({...i,path:Gt,name:Gt.split("/").pop()||ee}),f())}catch(Ee){console.error("Rename error:",Ee),Q(Je=>({...Je,status:"error",message:"Failed to rename"})),X({title:"Rename Failed",message:"An error occurred while renaming the file"})}}},Kt=async()=>{if(i){B(!0),de({current:0,total:3,percent:0,status:"processing",message:"Generating favicons..."});try{const ee=await fetch("/api/studio/generate-favicon",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({imagePath:"/"+i.path.replace(/^public\//,"")})});if(!ee.ok){const ot=await ee.json();de({current:0,total:3,percent:0,status:"error",message:ot.error||"Failed to generate favicons"});return}const Ee=ee.body?.getReader(),Je=new TextDecoder;if(Ee){let ot="";for(;;){const{done:_t,value:Gt}=await Ee.read();if(_t)break;ot+=Je.decode(Gt,{stream:!0});const hn=ot.split(`
90
+ `);ot=hn.pop()||"";for(const Pt of hn)if(Pt.startsWith("data: "))try{const ht=JSON.parse(Pt.slice(6));ht.type==="start"?de(Vt=>({...Vt,total:ht.total})):ht.type==="progress"?de({current:ht.current,total:ht.total,percent:ht.percent,status:"processing",message:ht.message}):ht.type==="complete"?de({current:ht.processed,total:ht.processed,percent:100,status:ht.errors>0?"error":"complete",message:ht.message}):ht.type==="error"&&de(Vt=>({...Vt,status:"error",message:ht.message}))}catch{}}}}catch(ee){console.error("Favicon generation error:",ee),de({current:0,total:3,percent:0,status:"error",message:"An error occurred while generating favicons"})}}},Ke=()=>qe?r("img",{css:ue.image,src:oe,alt:i.name}):x?r("video",{css:ue.video,src:oe,controls:!0}):b("div",{css:ue.filePlaceholder,children:[r("svg",{css:ue.fileIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"})}),r("p",{css:ue.fileName,children:i.name})]});return b(tt,{children:[fe&&r(pu,{title:fe.title,message:fe.message,onClose:()=>X(null)}),r(Yp,{isOpen:ce,onClose:()=>ae(!1)}),U&&r(hl,{title:"Rename File",message:"Enter a new name for the file:",defaultValue:i.name,placeholder:"Enter new filename",confirmLabel:"Rename",onConfirm:He,onCancel:()=>q(!1)}),H&&r(pl,{title:"Renaming",progress:ie,onClose:()=>{Y(!1),f()}}),te&&r(pl,{title:"Generating Favicons",progress:K,onClose:()=>B(!1)}),r("div",{css:ue.overlay,onClick:Ge,children:b("div",{css:ue.container,onClick:ee=>ee.stopPropagation(),children:[b("div",{css:ue.main,children:[b("div",{css:ue.headerButtons,children:[i.cdnPushed&&!i.isRemote&&r("span",{css:ue.statusIcon,title:"Pushed to CDN",children:r("svg",{css:ue.cloudIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"})})}),i.isRemote&&r("span",{css:ue.statusIcon,title:"Remote image",children:r("svg",{css:ue.globeIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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:ue.copyBtn,onClick:yt,title:"Copy file path",children:[W&&r("span",{css:ue.tooltip,children:"Copied!"}),r("svg",{css:ue.copyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"})})]}),r("button",{css:ue.mainCloseBtn,onClick:Ge,"aria-label":"Close",children:r("svg",{css:ue.mainCloseIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),r("div",{css:ue.mediaWrapper,children:Ke()})]}),b("div",{css:ue.sidebar,children:[r("div",{css:ue.sidebarHeader,children:r("h3",{css:ue.sidebarTitle,children:"Details"})}),b("div",{css:ue.sidebarContent,children:[b("div",{css:ue.info,children:[b("div",{css:ue.infoRow,children:[r("span",{css:ue.infoLabel,children:"Name"}),r("span",{css:ue.infoValueWrap,children:i.name})]}),b("div",{css:ue.infoRow,children:[r("span",{css:ue.infoLabel,children:"Path"}),r("span",{css:ue.infoValueWrap,children:i.path.replace(/^public\//,"")})]}),i.size!==void 0&&b("div",{css:ue.infoRow,children:[r("span",{css:ue.infoLabel,children:"Size"}),r("span",{css:ue.infoValue,children:f2(i.size)})]}),i.dimensions&&b("div",{css:ue.infoRow,children:[r("span",{css:ue.infoLabel,children:"Dimensions"}),b("span",{css:ue.infoValue,children:[i.dimensions.width," × ",i.dimensions.height]})]}),(i.hasSm||i.hasMd||i.hasLg||i.hasFull)&&b("div",{css:ue.infoRow,children:[r("span",{css:ue.infoLabel,children:"Thumbnails"}),r("span",{css:ue.infoValue,children:b("span",{css:ue.thumbChips,children:[i.hasSm&&r("span",{css:ue.thumbChip,children:"SM"}),i.hasMd&&r("span",{css:ue.thumbChip,children:"MD"}),i.hasLg&&r("span",{css:ue.thumbChip,children:"LG"}),i.hasFull&&r("span",{css:ue.thumbChip,children:"FULL"})]})})]}),b("div",{css:ue.infoRow,children:[r("span",{css:ue.infoLabel,children:"CDN Status"}),r("span",{css:ue.infoValue,children:i.cdnPushed?i.isRemote?"Remote":"Pushed":"Local"})]}),b("div",{css:ue.infoRow,children:[r("span",{css:ue.infoLabel,children:"URL"}),r("a",{href:De,target:"_blank",rel:"noopener noreferrer",css:ue.infoLink,title:De,children:De})]})]}),b("div",{css:ue.actions,children:[b("button",{css:ue.actionBtn,onClick:()=>q(!0),disabled:i.isProtected,children:[r("svg",{css:ue.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"]}),qe&&b("button",{css:ue.actionBtn,onClick:()=>me(!0),disabled:D||!F,title:F?void 0:"Download image first to edit",children:[r("svg",{css:ue.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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:ue.actionBtn,onClick:()=>w([i.path]),disabled:D||i.isProtected,children:[r("svg",{css:ue.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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:[ue.actionBtn,ue.actionBtnCloud,"",""],onClick:()=>E([i.path],d),disabled:D||i.isProtected||i.cdnPushed&&!i.isRemote,title:i.cdnPushed&&!i.isRemote?"Already in R2":void 0,children:[r("svg",{css:ue.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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:[ue.actionBtn,ue.actionBtnCloud,"",""],onClick:()=>C([i.path],d),disabled:D||!i.cdnPushed||i.isRemote,title:i.cdnPushed?i.isRemote?"Remote image":"Download from CDN to local":"Not on CDN",children:[r("svg",{css:ue.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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:ue.actionBtn,onClick:()=>{A("generate"),g([i.path])},disabled:D||i.isProtected,children:[r("svg",{css:ue.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"]}),(i.hasSm||i.hasMd||i.hasLg||i.hasFull)&&b("button",{css:ue.actionBtn,onClick:()=>{A("remove"),g([i.path])},disabled:D||i.isProtected,children:[r("svg",{css:ue.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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:ue.actionBtn,onClick:Kt,disabled:te||i.isProtected,children:[r("svg",{css:ue.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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:[ue.actionBtn,ue.actionBtnDanger,"",""],onClick:()=>m([i.path]),disabled:D||i.isProtected,children:[r("svg",{css:ue.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"]})]})]})]})]})}),pe&&i.dimensions&&r(i2,{imagePath:i.path,imageSrc:oe,dimensions:i.dimensions,fileSize:i.size||0,onClose:()=>me(!1),onSaveComplete:ke,triggerRefresh:f})]})}function f2(i){return i<1024?`${i} B`:i<1024*1024?`${(i/1024).toFixed(1)} KB`:`${(i/(1024*1024)).toFixed(1)} MB`}const fl={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:",V.lg,";font-weight:600;color:",u.text,";margin:0;",""),message:y("font-size:",V.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:",V.base,";font-weight:500;border:none;background:",u.primary,";color:white;cursor:pointer;transition:background 0.15s ease;&:hover{background:",u.primaryHover,";}","")};function h2(){const{error:i,clearError:s}=oo();return i?r("div",{css:fl.overlay,onClick:s,children:b("div",{css:fl.modal,onClick:f=>f.stopPropagation(),children:[b("div",{css:fl.header,children:[r("svg",{css:fl.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"})}),r("h3",{css:fl.title,children:i.title})]}),r("p",{css:fl.message,children:i.message}),r("button",{css:fl.button,onClick:s,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 p2({triggerRefresh:i,clearSelection:s,setFocusedItem:f,showError:d}){const[h,m]=v.useState(Mp),w=v.useCallback(te=>{m(B=>({...B,progressState:typeof te=="function"?te(B.progressState):{...B.progressState,...te}}))},[]),E=v.useCallback(te=>{m(B=>({...B,showProgress:te}))},[]),C=v.useCallback(te=>{m(B=>({...B,progressTitle:te}))},[]),g=jp({setShowProgress:E,setProgressTitle:C,setProgressState:w,triggerRefresh:i}),A=v.useCallback(te=>{m(B=>({...B,actionPaths:te,showDeleteConfirm:!0}))},[]),z=v.useCallback(te=>{m(B=>({...B,actionPaths:te,showMoveModal:!0}))},[]),U=v.useCallback((te,B)=>{const K=te.map(me=>"/"+me.replace(/^public\//,""));let de=!1,pe=!1;for(const me of te){const ne=B.find(Ae=>Ae.path===me);ne&&(ne.isRemote?de=!0:ne.cdnPushed||(pe=!0))}m(me=>({...me,actionPaths:te,syncImageCount:K.length,syncHasRemote:de,syncHasLocal:pe,showSyncConfirm:!0}))},[]),q=v.useCallback((te,B)=>{const K=[];for(const de of te){const pe=B.find(me=>me.path===de);pe&&pe.cdnPushed&&!pe.isRemote&&K.push(de)}m(de=>({...de,actionPaths:K,downloadImageCount:K.length,downloadTotalSelected:te.length,showDownloadConfirm:!0}))},[]),H=v.useCallback(te=>{m(B=>({...B,actionPaths:te,showProcessConfirm:!0}))},[]),Y=v.useCallback(te=>{m(B=>({...B,processMode:te}))},[]),ie=v.useCallback(()=>{m(te=>({...te,showDeleteConfirm:!1,showMoveModal:!1,showSyncConfirm:!1,showProcessConfirm:!1,showDownloadConfirm:!1}))},[]),Q=v.useCallback(()=>{m(Mp)},[]),ce=v.useCallback(()=>{g.stop()},[g]),ae=v.useCallback(async()=>{const te=h.actionPaths;m(B=>({...B,showDeleteConfirm:!1}));try{const B=await fetch("/api/studio/delete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:te})});if(B.ok)s(),f(null),i();else{const K=await B.json();d("Delete Failed",K.error||"Unknown error")}}catch(B){console.error("Delete error:",B),d("Delete Failed","Delete failed. Check console for details.")}},[h.actionPaths,s,f,i,d]),fe=v.useCallback(async te=>{const B=h.actionPaths;m(K=>({...K,showMoveModal:!1})),await g.execute({endpoint:"/api/studio/move",body:{paths:B,destination:te},title:"Moving Files",onComplete:K=>{K.errors&&K.errors>0&&K.errorMessages?.length&&d("Move Failed",K.errorMessages.join(`
91
+ `)),s(),f(null)}})},[h.actionPaths,s,f,d,g]),X=v.useCallback(async()=>{const B=h.actionPaths.map(pe=>"/"+pe.replace(/^public\//,""));m(pe=>({...pe,showSyncConfirm:!1,showProgress:!0,progressTitle:"Pushing to CDN",progressState:{current:0,total:B.length,percent:0,status:"processing",message:"Pushing to CDN..."}}));let K=0;const de=[];for(let pe=0;pe<B.length;pe++){const me=B[pe];try{const ne=await fetch("/api/studio/sync",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({imageKeys:[me]})});if(ne.ok)K++;else{const Ae=await ne.json();de.push(`${me}: ${Ae.error||"Unknown error"}`)}}catch(ne){de.push(`${me}: ${ne instanceof Error?ne.message:"Unknown error"}`)}w({current:pe+1,total:B.length,percent:Math.round((pe+1)/B.length*100),status:"processing",message:`Pushed ${me}`})}w({current:B.length,total:B.length,percent:100,status:de.length>0?"error":"complete",message:`Pushed ${K} file${K!==1?"s":""}${de.length>0?`, ${de.length} error${de.length!==1?"s":""}`:""}`}),de.length>0&&d("Push Errors",de.join(`
92
+ `)),s(),i()},[h.actionPaths,s,i,d,w]),W=v.useCallback(async()=>{const te=h.actionPaths,B=h.processMode,K=te.map(ne=>{const Ae=ne.replace(/^public\//,"");return Ae.startsWith("/")?Ae:`/${Ae}`}),de=B==="remove",pe=de?"/api/studio/unprocess-stream":"/api/studio/reprocess-stream",me=de?"Removing Thumbnails":"Generating Thumbnails";m(ne=>({...ne,showProcessConfirm:!1})),await g.execute({endpoint:pe,body:{imageKeys:K},title:me})},[h.actionPaths,h.processMode,g]),I=v.useCallback(async()=>{const te=h.progressState.orphanedFiles;if(!(!te||te.length===0))try{const B=await fetch("/api/studio/delete-orphans",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({files:te})});if(B.ok)w(K=>({...K,orphanedFiles:void 0,message:K.message?.replace(/Found \d+ orphaned thumbnail\(s\).*/,"Orphaned thumbnails deleted.")})),i();else{const K=await B.json();d("Delete Failed",K.error||"Failed to delete orphaned files")}}catch(B){console.error("Delete orphans error:",B),d("Delete Failed","Failed to delete orphaned files. Check console for details.")}},[h.progressState.orphanedFiles,i,d,w]);return{actionState:h,setActionState:m,requestDelete:A,requestMove:z,requestSync:U,requestDownload:q,requestProcess:H,setProcessMode:Y,cancelAction:ie,closeProgress:Q,stopProcessing:ce,confirmDelete:ae,confirmMove:fe,confirmSync:X,confirmProcess:W,deleteOrphans:I}}const m2="36px",g2=ln`
93
+ to { transform: rotate(360deg); }
94
+ `,Re={container:{name:"xt6tct",styles:"flex:1;display:flex;flex-direction:column;overflow:hidden"},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,";@media (min-width: 768px){padding:12px 24px;}",""),toolbarLeft:{name:"17nohj2",styles:"display:flex;flex-wrap:nowrap;flex-shrink:0;align-items:center;gap:8px"},toolbarRight:{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:",m2,";padding:0 14px;border-radius:6px;font-size:",V.base,";font-weight:500;background:",u.surface,";border:1px solid ",u.border,";cursor:pointer;transition:all 0.15s ease;color:",u.text,";&: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,";}",""),btnIcon:{name:"157xhr7",styles:"width:16px;height:16px"},content:{name:"1tznmxd",styles:"flex:1;overflow:auto;padding:20px 24px"},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:",g2," 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:",V.base,";margin:0 0 4px 0;&:last-child{color:",u.textMuted,";font-size:",V.sm,";}",""),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:",V.base,";font-weight:500;color:",u.textSecondary,";cursor:pointer;&:hover{color:",u.text,";}",""),selectAllCheckbox:y("width:16px;height:16px;accent-color:",u.primary,";",""),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,";",""),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;",""),itemContent:y("position:relative;aspect-ratio:1;display:flex;align-items:center;justify-content:center;padding:16px;background:",u.background,";",""),folderIcon:{name:"k1w47f",styles:"width:56px;height:56px;color:#f9935e"},parentIcon:y("width:56px;height:56px;color:",u.textMuted,";",""),fileIcon:y("width:40px;height:40px;color:",u.textMuted,";",""),openBtn:y("position:absolute;bottom:8px;right:8px;z-index:10;height:28px;font-size:",V.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,";}",""),label:y("padding:10px 12px;background-color:",u.surface,";border-top:1px solid ",u.borderLight,";",""),labelName:y("font-size:",V.sm,";font-weight:500;color:",u.text,";margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;",""),labelMeta:y("font-size:",V.xs,";color:",u.textMuted,";margin:2px 0 0 0;",""),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:",V.lg,";font-weight:600;",""),dropIcon:{name:"18jhpep",styles:"width:48px;height:48px"},createBtn:y("margin-top:16px;padding:10px 24px;font-size:",V.base,";font-weight:500;background:",u.primary,";color:white;border:none;border-radius:8px;cursor:pointer;transition:background 0.15s ease;&:hover{background:",u.primaryHover,";}","")};function y2(i){return i<1024?i+" B":i<1024*1024?(i/1024).toFixed(1)+" KB":(i/(1024*1024)).toFixed(1)+" MB"}function b2({currentPath:i,setCurrentPath:s,refreshKey:f,triggerRefresh:d}){const[h,m]=v.useState([]),[w,E]=v.useState(!0),[C,g]=v.useState(new Set),[A,z]=v.useState(!1),[U,q]=v.useState(!1),[H,Y]=v.useState(!1),[ie,Q]=v.useState(!1),[ce,ae]=v.useState(!1),[fe,X]=v.useState(!1),W=v.useCallback(async()=>{try{E(!0);const ee=await fetch(`/api/studio/fonts/list?path=${encodeURIComponent(i)}`);if(ee.ok){const Ee=await ee.json();m(Ee.items||[]),z(Ee.canCreate===!0)}}catch(ee){console.error("Failed to fetch fonts:",ee),m([])}finally{E(!1)}},[i]);v.useEffect(()=>{W(),g(new Set)},[W,f]);const I=i==="_fonts";i==="src"||i.startsWith("src/");const te=v.useCallback((ee,Ee)=>{Ee.stopPropagation(),g(Je=>{const ot=new Set(Je);return ot.has(ee.path)?ot.delete(ee.path):ot.add(ee.path),ot})},[]),B=v.useCallback(ee=>{ee.type==="folder"&&(s(ee.path),g(new Set))},[s]),K=v.useCallback(()=>{const ee=i.split("/");ee.pop();const Ee=ee.join("/")||"_fonts";s(Ee),g(new Set)},[i,s]),de=h.length>0&&C.size===h.length,pe=C.size>0,me=v.useCallback(()=>{g(de?new Set:new Set(h.map(ee=>ee.path)))},[de,h]),ne=Array.from(C),Ae=ne.length===1&&h.find(ee=>ee.path===ne[0])?.type==="folder",D=Ae?ne[0]:null,J=D&&D.split("/").pop()||"",F=ne.length===1&&h.find(ee=>ee.path===ne[0])?.type==="file",ke=F?ne[0]:null,qe=ke&&ke.split("/").pop()||"",x=v.useCallback(async ee=>{if(D){Y(!1);try{(await fetch("/api/studio/fonts/rename",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({oldPath:D,newName:ee})})).ok&&(g(new Set),d())}catch(Ee){console.error("Rename failed:",Ee)}}},[D,d]),_=v.useCallback(async ee=>{if(ke){Q(!1);try{(await fetch("/api/studio/fonts/rename",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({oldPath:ke,newName:ee})})).ok&&(g(new Set),d())}catch(Ee){console.error("Rename file failed:",Ee)}}},[ke,d]),P=v.useCallback(()=>{C.size!==0&&X(!0)},[C.size]),oe=v.useCallback(async()=>{X(!1);try{(await fetch("/api/studio/fonts/delete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:Array.from(C)})})).ok&&(g(new Set),d())}catch(ee){console.error("Delete failed:",ee)}},[C,d]),Se=v.useCallback(()=>{ae(!0)},[]),De=v.useCallback(async ee=>{ae(!1);try{(await fetch("/api/studio/fonts/create-folder",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:i,name:ee})})).ok&&d()}catch(Ee){console.error("Create folder failed:",Ee)}},[i,d]),Ge=v.useCallback(ee=>{ee.preventDefault(),ee.stopPropagation(),i.startsWith("_fonts")&&q(!0)},[i]),yt=v.useCallback(ee=>{ee.preventDefault(),ee.stopPropagation(),q(!1)},[]),He=v.useCallback(async ee=>{if(ee.preventDefault(),ee.stopPropagation(),q(!1),!i.startsWith("_fonts"))return;const Ee=Array.from(ee.dataTransfer.files).filter(Je=>Je.name.toLowerCase().endsWith(".ttf"));if(Ee.length!==0){for(const Je of Ee){const ot=new FormData;ot.append("file",Je),ot.append("path",i);try{await fetch("/api/studio/fonts/upload",{method:"POST",body:ot})}catch(_t){console.error("Upload failed:",_t)}}d()}},[i,d]),Kt=v.useCallback(ee=>{ee&&ee.addEventListener("change",async Ee=>{const Je=Ee.target.files;if(!(!Je||Je.length===0)){for(const ot of Array.from(Je)){if(!ot.name.toLowerCase().endsWith(".ttf"))continue;const _t=new FormData;_t.append("file",ot),_t.append("path",i);try{await fetch("/api/studio/fonts/upload",{method:"POST",body:_t})}catch(Gt){console.error("Upload failed:",Gt)}}d(),ee.value=""}})},[i,d]);if(w)return b("div",{css:Re.container,children:[r("div",{css:Re.toolbar}),r("div",{css:Re.loading,children:r("div",{css:Re.spinner})})]});const Ke=i.startsWith("_fonts");return b("div",{css:Re.container,children:[b("div",{css:Re.toolbar,children:[b("div",{css:Re.toolbarLeft,children:[Ke&&b(tt,{children:[b("button",{css:[Re.btn,Re.btnPrimary,"",""],onClick:()=>document.getElementById("font-file-input")?.click(),children:[r(v2,{}),"Add New"]}),r("input",{id:"font-file-input",type:"file",accept:".ttf",multiple:!0,style:{display:"none"},ref:Kt})]}),b("button",{css:Re.btn,onClick:()=>{F?Q(!0):Ae?Y(!0):Se()},children:[F||Ae?r(C2,{}):r(x2,{}),F?"Rename File":Ae?"Rename Folder":"New Folder"]}),b("button",{css:[Re.btn,Re.btnDanger,"",""],onClick:P,disabled:C.size===0,children:[r(S2,{}),"Delete"]})]}),r("div",{css:Re.toolbarRight,children:b("span",{style:{color:u.textSecondary,fontSize:V.sm},children:[h.length," item",h.length!==1?"s":""]})})]}),b("div",{css:Re.content,onDragOver:Ge,onDragLeave:yt,onDrop:He,style:{position:"relative"},children:[U&&r("div",{css:Re.dropOverlay,children:b("div",{css:Re.dropMessage,children:[r(w2,{}),r("span",{children:"Drop TTF files to upload"})]})}),h.length===0&&!A?b("div",{css:Re.empty,children:[r(lu,{css:Re.emptyIcon}),r("p",{css:Re.emptyText,children:"No files yet"}),r("p",{css:Re.emptyText,children:Ke?'Drop TTF files here or click "Add New"':"This folder is empty"})]}):h.length===0&&A?b("div",{css:Re.empty,children:[r(lu,{css:Re.emptyIcon}),r("p",{css:Re.emptyText,children:"Folder doesn't exist"}),r("button",{css:Re.createBtn,onClick:Se,children:"Create Folder"})]}):b(tt,{children:[h.length>0&&r("div",{css:Re.selectAllRow,children:b("label",{css:Re.selectAllLabel,children:[r("input",{type:"checkbox",css:Re.selectAllCheckbox,checked:de,ref:ee=>{ee&&(ee.indeterminate=pe&&!de)},onChange:me}),"Select all (",h.length,")"]})}),b("div",{css:Re.grid,children:[!I&&b("div",{css:Re.item,onClick:K,onDoubleClick:K,children:[r("div",{css:Re.itemContent,children:r(k2,{})}),b("div",{css:Re.label,children:[r("p",{css:Re.labelName,children:".."}),r("p",{css:Re.labelMeta,children:"Parent folder"})]})]}),h.map(ee=>{const Ee=C.has(ee.path);return b("div",{css:[Re.item,Ee&&Re.itemSelected,"",""],onClick:Je=>te(ee,Je),onDoubleClick:()=>B(ee),children:[r("div",{css:Re.checkboxWrapper,onClick:Je=>{Je.stopPropagation(),te(ee,Je)},children:r("input",{type:"checkbox",css:Re.checkbox,checked:Ee,onChange:()=>{}})}),b("div",{css:Re.itemContent,children:[r("button",{css:Re.openBtn,onClick:Je=>{Je.stopPropagation(),B(ee)},children:"Open"}),ee.type==="folder"?r(lu,{}):r(z2,{})]}),b("div",{css:Re.label,children:[r("p",{css:Re.labelName,children:ee.name}),r("p",{css:Re.labelMeta,children:ee.type==="folder"?`${ee.fileCount||0} files`:ee.size?y2(ee.size):""})]})]},ee.path)})]})]})]}),ce&&r(hl,{title:"New Folder",message:"Enter a name for the new folder:",placeholder:"Folder name",confirmLabel:"Create",onConfirm:De,onCancel:()=>ae(!1)}),H&&D&&r(hl,{title:"Rename Folder",message:"Enter a new name for the folder:",placeholder:J,defaultValue:J,confirmLabel:"Rename",onConfirm:x,onCancel:()=>Y(!1)}),ie&&ke&&r(hl,{title:"Rename File",message:"Enter a new name for the file:",placeholder:qe,defaultValue:qe,confirmLabel:"Rename",onConfirm:_,onCancel:()=>Q(!1)}),fe&&r(ao,{title:"Delete Items",message:`Are you sure you want to delete ${C.size} item${C.size!==1?"s":""}? This action cannot be undone.`,confirmLabel:"Delete",variant:"danger",onConfirm:oe,onCancel:()=>X(!1)})]})}function v2(){return r("svg",{css:Re.btnIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})})}function x2(){return r("svg",{css:Re.btnIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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 S2(){return r("svg",{css:Re.btnIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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 C2(){return r("svg",{css:Re.btnIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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 w2(){return r("svg",{css:Re.dropIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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 lu(){return r("svg",{css:Re.folderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:r("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"})})}function k2(){return r("svg",{css:Re.parentIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M3 10h10a8 8 0 018 8v2M3 10l6 6m-6-6l6-6"})})}function z2(){return r("svg",{css:Re.fileIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"})})}const M2="36px",St={container:y(ro," 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);padding:4px;z-index:100;",""),dropdownItem:y("display:flex;align-items:center;gap:8px;width:100%;padding:10px 12px;background:transparent;border:none;border-radius:6px;white-space:nowrap;position:relative;top:1px;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("&::after{content:'';display:inline-block;width:8px;height:8px;background:",u.primary,";border-radius:50%;position:relative;top:1px;}",""),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:",V.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:",M2,";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:",V.lg,";font-weight:600;",""),dropIcon:{name:"18jhpep",styles:"width:48px;height:48px"}};function D2({onClose:i,isVisible:s=!0,standaloneMode:f=!1,workspacePath:d,siteUrl:h}){const m=i||(()=>{}),[w,E]=v.useState("public"),[C,g]=v.useState(new Set),[A,z]=v.useState(null),[U,q]=v.useState("grid"),[H,Y]=v.useState(null),[ie,Q]=v.useState(null),[ce,ae]=v.useState(!1),[fe,X]=v.useState(0),[W,I]=v.useState(!1),[te,B]=v.useState(""),[K,de]=v.useState(null),[pe,me]=v.useState([]),[ne,Ae]=v.useState(!1),[D,J]=v.useState(()=>{if(typeof window<"u"){const Z=window.location.hash.slice(1);if(Z==="fonts")return"fonts";if(Z==="media")return"media"}return"media"}),[F,ke]=v.useState(!1),qe=v.useRef(null);v.useEffect(()=>{const Z=()=>{const se=window.location.hash.slice(1);se==="fonts"?J("fonts"):se==="media"&&J("media")};return window.addEventListener("hashchange",Z),()=>window.removeEventListener("hashchange",Z)},[]);const[x,_]=v.useState("_fonts"),[P,oe]=v.useState(0),Se=v.useCallback(()=>{X(Z=>Z+1)},[]),[De,Ge]=v.useState(null),yt=v.useCallback(Z=>{Ge({path:Z,key:Date.now()})},[]);v.useEffect(()=>{if(H&&pe.length>0){const Z=pe.find(se=>se.path===H.path);Z&&JSON.stringify(Z)!==JSON.stringify(H)&&Y(Z)}},[pe,H]);const He=v.useCallback(()=>{I(!0)},[]),Kt=v.useCallback(()=>{I(!1)},[]),Ke=v.useCallback((Z,se)=>{de({title:Z,message:se})},[]),ee=v.useCallback(()=>{de(null)},[]),Ee=v.useCallback(Z=>{Z.preventDefault(),Z.stopPropagation(),Ae(!0)},[]),Je=v.useCallback(Z=>{Z.preventDefault(),Z.stopPropagation(),Ae(!1)},[]),ot=v.useCallback(async Z=>{Z.preventDefault(),Z.stopPropagation(),Ae(!1);const se=Array.from(Z.dataTransfer.files);if(se.length!==0&&!(w==="public/images"||w.startsWith("public/images/"))){for(const Xe of se){const nt=new FormData;nt.append("file",Xe),nt.append("path",w);try{await fetch("/api/studio/upload",{method:"POST",body:nt})}catch(Ne){console.error("Upload error:",Ne)}}Se()}},[w,Se]),_t=v.useCallback(()=>{if(w==="public")return;const Z=w.split("/");Z.pop(),E(Z.join("/")||"public"),g(new Set)},[w]),Gt=v.useCallback(Z=>{E(Z),g(new Set),Y(null)},[]),hn=v.useCallback(Z=>{g(se=>{const Xe=new Set(se);return Xe.has(Z)?Xe.delete(Z):Xe.add(Z),Xe}),z(Z)},[]),Pt=v.useCallback((Z,se,Xe)=>{const nt=Xe.findIndex(bt=>bt.path===Z),Ne=Xe.findIndex(bt=>bt.path===se);if(nt===-1||Ne===-1)return;const Me=Math.min(nt,Ne),Ct=Math.max(nt,Ne);g(bt=>{const ml=new Set(bt);for(let Qa=Me;Qa<=Ct;Qa++)ml.add(Xe[Qa].path);return ml}),z(se)},[]),ht=v.useCallback(Z=>{g(new Set(Z.map(se=>se.path)))},[]),Vt=v.useCallback(()=>{g(new Set)},[]),zt=v.useCallback(Z=>{Y(Z)},[]),Le=p2({triggerRefresh:Se,clearSelection:Vt,setFocusedItem:zt,showError:Ke}),Tt=v.useCallback(Z=>{if(Z.key==="Escape"){const se=Z.target;if(se.tagName==="INPUT"||se.tagName==="TEXTAREA")return;H?Y(null):f||m()}},[m,H,f]);v.useEffect(()=>(s&&(document.addEventListener("keydown",Tt),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",Tt),document.body.style.overflow=""}),[Tt,s]),v.useEffect(()=>{const Z=se=>{qe.current&&!qe.current.contains(se.target)&&ke(!1)};return F&&document.addEventListener("mousedown",Z),()=>{document.removeEventListener("mousedown",Z)}},[F]);const wn=v.useCallback(()=>{ke(Z=>!Z)},[]),Yn=v.useCallback(Z=>{J(Z),ke(!1),window.location.hash=Z},[]),Hn=v.useCallback(()=>{oe(Z=>Z+1)},[]),kn={isOpen:!0,openStudio:()=>{},closeStudio:m,toggleStudio:m,currentPath:w,setCurrentPath:Gt,navigateUp:_t,selectedItems:C,toggleSelection:hn,selectRange:Pt,selectAll:ht,clearSelection:Vt,lastSelectedPath:A,viewMode:U,setViewMode:q,focusedItem:H,setFocusedItem:Y,meta:ie,setMeta:Q,isLoading:ce,setIsLoading:ae,refreshKey:fe,triggerRefresh:Se,editedImageKey:De,setEditedImageKey:yt,scanRequested:W,triggerScan:He,clearScanRequest:Kt,searchQuery:te,setSearchQuery:B,error:K,showError:Ke,clearError:ee,fileItems:pe,setFileItems:me,actionState:Le.actionState,requestDelete:Le.requestDelete,requestMove:Le.requestMove,requestSync:Le.requestSync,requestDownload:Le.requestDownload,requestProcess:Le.requestProcess,setProcessMode:Le.setProcessMode,confirmDelete:Le.confirmDelete,confirmMove:Le.confirmMove,confirmSync:Le.confirmSync,confirmProcess:Le.confirmProcess,cancelAction:Le.cancelAction,closeProgress:Le.closeProgress,stopProcessing:Le.stopProcessing,deleteOrphans:Le.deleteOrphans};return r(Np.Provider,{value:kn,children:b("div",{css:St.container,children:[b("div",{css:St.header,children:[r("div",{css:St.headerLeft,children:b("div",{css:St.titleDropdown,ref:qe,children:[b("button",{css:St.titleButton,onClick:wn,children:[r("span",{children:"gallop.studio"}),r(O2,{isOpen:F})]}),F&&b("div",{css:St.dropdownMenu,children:[r("button",{css:[St.dropdownItem,D==="media"&&St.dropdownItemActive,"",""],onClick:()=>Yn("media"),children:"media & files"}),r("button",{css:[St.dropdownItem,D==="fonts"&&St.dropdownItemActive,"",""],onClick:()=>Yn("fonts"),children:"fonts"})]})]})}),r("div",{css:St.headerCenter,children:r(R2,{currentPath:w,onNavigate:Gt,projectName:d?d.split("/").pop():void 0})}),b("div",{css:St.headerActions,children:[h&&r("a",{href:h,target:"_blank",rel:"noopener noreferrer",css:St.headerIconBtn,title:`Open ${h}`,children:r(L2,{})}),!f&&r("button",{css:St.headerBtn,onClick:m,"aria-label":"Close Studio",children:r(_2,{})})]})]}),D==="media"?b(tt,{children:[r(C1,{}),b("div",{css:St.content,onDragOver:Ee,onDragLeave:Je,onDrop:ot,children:[ne&&r("div",{css:St.dropOverlay,children:b("div",{css:St.dropMessage,children:[r("svg",{css:St.dropIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"})}),r("span",{children:"Drop files to upload"})]})}),r("div",{css:St.fileBrowser,children:U==="grid"?r(X1,{}):r(F1,{})})]}),H&&r(d2,{}),r(h2,{}),Le.actionState.showDeleteConfirm&&r(ao,{title:"Delete Files",message:`Are you sure you want to delete ${Le.actionState.actionPaths.length} item${Le.actionState.actionPaths.length!==1?"s":""}? This action cannot be undone.`,confirmLabel:"Delete",variant:"danger",onConfirm:Le.confirmDelete,onCancel:Le.cancelAction}),Le.actionState.showSyncConfirm&&r(ao,{title:"Push to CDN",message:`Push ${Le.actionState.syncImageCount} image${Le.actionState.syncImageCount!==1?"s":""} to Cloudflare R2?${Le.actionState.syncHasRemote?" Remote images will be downloaded first.":""}${Le.actionState.syncHasLocal?" After pushing, local files will be deleted.":""}`,confirmLabel:"Push",onConfirm:Le.confirmSync,onCancel:Le.cancelAction}),Le.actionState.showProcessConfirm&&r(A2,{imageCount:Le.actionState.actionPaths.length,mode:Le.actionState.processMode,onConfirm:Le.confirmProcess,onCancel:Le.cancelAction}),Le.actionState.showMoveModal&&r(qp,{selectedItems:new Set(Le.actionState.actionPaths),currentPath:w,onMove:Z=>Le.confirmMove(Z),onCancel:Le.cancelAction}),Le.actionState.showProgress&&r(pl,{title:Le.actionState.progressTitle,progress:Le.actionState.progressState,onStop:Le.stopProcessing,onDeleteOrphans:Le.deleteOrphans,onClose:Le.closeProgress})]}):r(b2,{currentPath:x,setCurrentPath:_,refreshKey:P,triggerRefresh:Hn})]})})}var E2={name:"1cm5yut",styles:"display:flex;gap:12px;justify-content:flex-end"},T2={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 A2({imageCount:i,mode:s,onConfirm:f,onCancel:d}){const h={overlay:T2,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:",V.lg,";font-weight:600;color:",u.text,";margin:0 0 16px;",""),message:y("font-size:",V.base,";color:",u.textSecondary,";margin:0 0 20px;line-height:1.5;",""),actions:E2,cancelBtn:y("padding:10px 20px;border:1px solid ",u.border,";border-radius:8px;background:",u.background,";color:",u.text,";font-size:",V.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:",V.base,";font-weight:500;cursor:pointer;transition:all 0.15s ease;&:hover{background:",u.primaryHover,";}",""),confirmBtnDanger:y("background:",u.danger,";&:hover{background:#dc2626;}","")},m=s==="remove",w=m?"Remove Thumbnails":"Generate Thumbnails",E=m?`Remove generated thumbnails for ${i} image${i!==1?"s":""}? Original images will be kept.`:`Generate thumbnails for ${i} image${i!==1?"s":""}?`,C=m?"Remove":"Generate";return r("div",{css:h.overlay,onClick:d,children:b("div",{css:h.container,onClick:g=>g.stopPropagation(),children:[r("h2",{css:h.title,children:w}),r("p",{css:h.message,children:E}),b("div",{css:h.actions,children:[r("button",{css:h.cancelBtn,onClick:d,children:"Cancel"}),r("button",{css:[h.confirmBtn,m&&h.confirmBtnDanger,"",""],onClick:f,children:C})]})]})})}function R2({currentPath:i,onNavigate:s,projectName:f}){const d=i.split("/").filter(Boolean),h=d.map((m,w)=>({name:w===0&&m==="public"&&f?f:m,path:d.slice(0,w+1).join("/")}));return r("div",{css:St.breadcrumbs,children:h.map((m,w)=>b("span",{style:{display:"flex",alignItems:"center",gap:6},children:[w>0&&r("span",{css:St.breadcrumbSeparator,children:"/"}),w===h.length-1?r("span",{css:St.breadcrumbCurrent,children:m.name}):r("span",{css:St.breadcrumbItem,onClick:()=>s(m.path),children:m.name})]},m.path))})}function L2(){return b("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[r("circle",{cx:"12",cy:"12",r:"10"}),r("line",{x1:"2",y1:"12",x2:"22",y2:"12"}),r("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 _2(){return b("svg",{css:St.headerIcon,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[r("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),r("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}function O2({isOpen:i}){return r("svg",{css:[St.titleChevron,i&&St.titleChevronOpen,"",""],viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:r("polyline",{points:"6 9 12 15 18 9"})})}const Vp=document.getElementById("root");if(!Vp)throw new Error("Root element not found");const H2=window.__STUDIO_WORKSPACE__||"Unknown",U2=window.__STUDIO_SITE_URL__||"";l1.createRoot(Vp).render(r(v.StrictMode,{children:r("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,background:"#0a0a0a"},children:r(D2,{isVisible:!0,standaloneMode:!0,workspacePath:H2,siteUrl:U2})})}));