@gallop.software/studio 2.3.30 → 2.3.32

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,82 @@
1
+ function Hm(o,s){for(var h=0;h<s.length;h++){const u=s[h];if(typeof u!="string"&&!Array.isArray(u)){for(const p in u)if(p!=="default"&&!(p in o)){const m=Object.getOwnPropertyDescriptor(u,p);m&&Object.defineProperty(o,p,m.get?m:{enumerable:!0,get:()=>u[p]})}}}return Object.freeze(Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}))}(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const p of document.querySelectorAll('link[rel="modulepreload"]'))u(p);new MutationObserver(p=>{for(const m of p)if(m.type==="childList")for(const k of m.addedNodes)k.tagName==="LINK"&&k.rel==="modulepreload"&&u(k)}).observe(document,{childList:!0,subtree:!0});function h(p){const m={};return p.integrity&&(m.integrity=p.integrity),p.referrerPolicy&&(m.referrerPolicy=p.referrerPolicy),p.crossOrigin==="use-credentials"?m.credentials="include":p.crossOrigin==="anonymous"?m.credentials="omit":m.credentials="same-origin",m}function u(p){if(p.ep)return;p.ep=!0;const m=h(p);fetch(p.href,m)}})();function Bm(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}var Us={exports:{}},Hi={};var G0;function jm(){if(G0)return Hi;G0=1;var o=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function h(u,p,m){var k=null;if(m!==void 0&&(k=""+m),p.key!==void 0&&(k=""+p.key),"key"in p){m={};for(var _ in p)_!=="key"&&(m[_]=p[_])}else m=p;return p=m.ref,{$$typeof:o,type:u,key:k,ref:p!==void 0?p:null,props:m}}return Hi.Fragment=s,Hi.jsx=h,Hi.jsxs=h,Hi}var V0;function qm(){return V0||(V0=1,Us.exports=jm()),Us.exports}var Yi=qm(),Ns={exports:{}},Oe={};var X0;function Ym(){if(X0)return Oe;X0=1;var o=Symbol.for("react.transitional.element"),s=Symbol.for("react.portal"),h=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),p=Symbol.for("react.profiler"),m=Symbol.for("react.consumer"),k=Symbol.for("react.context"),_=Symbol.for("react.forward_ref"),R=Symbol.for("react.suspense"),S=Symbol.for("react.memo"),G=Symbol.for("react.lazy"),H=Symbol.for("react.activity"),Q=Symbol.iterator;function le(y){return y===null||typeof y!="object"?null:(y=Q&&y[Q]||y["@@iterator"],typeof y=="function"?y:null)}var U={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Y=Object.assign,be={};function W(y,E,V){this.props=y,this.context=E,this.refs=be,this.updater=V||U}W.prototype.isReactComponent={},W.prototype.setState=function(y,E){if(typeof y!="object"&&typeof y!="function"&&y!=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,y,E,"setState")},W.prototype.forceUpdate=function(y){this.updater.enqueueForceUpdate(this,y,"forceUpdate")};function he(){}he.prototype=W.prototype;function ne(y,E,V){this.props=y,this.context=E,this.refs=be,this.updater=V||U}var oe=ne.prototype=new he;oe.constructor=ne,Y(oe,W.prototype),oe.isPureReactComponent=!0;var q=Array.isArray;function J(){}var L={H:null,A:null,T:null,S:null},fe=Object.prototype.hasOwnProperty;function Se(y,E,V){var $=V.ref;return{$$typeof:o,type:y,key:E,ref:$!==void 0?$:null,props:V}}function ke(y,E){return Se(y.type,E,y.props)}function _e(y){return typeof y=="object"&&y!==null&&y.$$typeof===o}function Te(y){var E={"=":"=0",":":"=2"};return"$"+y.replace(/[=:]/g,function(V){return E[V]})}var at=/\/+/g;function $e(y,E){return typeof y=="object"&&y!==null&&y.key!=null?Te(""+y.key):E.toString(36)}function Ye(y){switch(y.status){case"fulfilled":return y.value;case"rejected":throw y.reason;default:switch(typeof y.status=="string"?y.then(J,J):(y.status="pending",y.then(function(E){y.status==="pending"&&(y.status="fulfilled",y.value=E)},function(E){y.status==="pending"&&(y.status="rejected",y.reason=E)})),y.status){case"fulfilled":return y.value;case"rejected":throw y.reason}}throw y}function T(y,E,V,$,Z){var Ee=typeof y;(Ee==="undefined"||Ee==="boolean")&&(y=null);var pe=!1;if(y===null)pe=!0;else switch(Ee){case"bigint":case"string":case"number":pe=!0;break;case"object":switch(y.$$typeof){case o:case s:pe=!0;break;case G:return pe=y._init,T(pe(y._payload),E,V,$,Z)}}if(pe)return Z=Z(y),pe=$===""?"."+$e(y,0):$,q(Z)?(V="",pe!=null&&(V=pe.replace(at,"$&/")+"/"),T(Z,E,V,"",function($t){return $t})):Z!=null&&(_e(Z)&&(Z=ke(Z,V+(Z.key==null||y&&y.key===Z.key?"":(""+Z.key).replace(at,"$&/")+"/")+pe)),E.push(Z)),1;pe=0;var dt=$===""?".":$+":";if(q(y))for(var Re=0;Re<y.length;Re++)$=y[Re],Ee=dt+$e($,Re),pe+=T($,E,V,Ee,Z);else if(Re=le(y),typeof Re=="function")for(y=Re.call(y),Re=0;!($=y.next()).done;)$=$.value,Ee=dt+$e($,Re++),pe+=T($,E,V,Ee,Z);else if(Ee==="object"){if(typeof y.then=="function")return T(Ye(y),E,V,$,Z);throw E=String(y),Error("Objects are not valid as a React child (found: "+(E==="[object Object]"?"object with keys {"+Object.keys(y).join(", ")+"}":E)+"). If you meant to render a collection of children, use an array instead.")}return pe}function j(y,E,V){if(y==null)return y;var $=[],Z=0;return T(y,$,"","",function(Ee){return E.call(V,Ee,Z++)}),$}function P(y){if(y._status===-1){var E=y._result;E=E(),E.then(function(V){(y._status===0||y._status===-1)&&(y._status=1,y._result=V)},function(V){(y._status===0||y._status===-1)&&(y._status=2,y._result=V)}),y._status===-1&&(y._status=0,y._result=E)}if(y._status===1)return y._result.default;throw y._result}var Ae=typeof reportError=="function"?reportError:function(y){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var E=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof y=="object"&&y!==null&&typeof y.message=="string"?String(y.message):String(y),error:y});if(!window.dispatchEvent(E))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",y);return}console.error(y)},Ne={map:j,forEach:function(y,E,V){j(y,function(){E.apply(this,arguments)},V)},count:function(y){var E=0;return j(y,function(){E++}),E},toArray:function(y){return j(y,function(E){return E})||[]},only:function(y){if(!_e(y))throw Error("React.Children.only expected to receive a single React element child.");return y}};return Oe.Activity=H,Oe.Children=Ne,Oe.Component=W,Oe.Fragment=h,Oe.Profiler=p,Oe.PureComponent=ne,Oe.StrictMode=u,Oe.Suspense=R,Oe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=L,Oe.__COMPILER_RUNTIME={__proto__:null,c:function(y){return L.H.useMemoCache(y)}},Oe.cache=function(y){return function(){return y.apply(null,arguments)}},Oe.cacheSignal=function(){return null},Oe.cloneElement=function(y,E,V){if(y==null)throw Error("The argument must be a React element, but you passed "+y+".");var $=Y({},y.props),Z=y.key;if(E!=null)for(Ee in E.key!==void 0&&(Z=""+E.key),E)!fe.call(E,Ee)||Ee==="key"||Ee==="__self"||Ee==="__source"||Ee==="ref"&&E.ref===void 0||($[Ee]=E[Ee]);var Ee=arguments.length-2;if(Ee===1)$.children=V;else if(1<Ee){for(var pe=Array(Ee),dt=0;dt<Ee;dt++)pe[dt]=arguments[dt+2];$.children=pe}return Se(y.type,Z,$)},Oe.createContext=function(y){return y={$$typeof:k,_currentValue:y,_currentValue2:y,_threadCount:0,Provider:null,Consumer:null},y.Provider=y,y.Consumer={$$typeof:m,_context:y},y},Oe.createElement=function(y,E,V){var $,Z={},Ee=null;if(E!=null)for($ in E.key!==void 0&&(Ee=""+E.key),E)fe.call(E,$)&&$!=="key"&&$!=="__self"&&$!=="__source"&&(Z[$]=E[$]);var pe=arguments.length-2;if(pe===1)Z.children=V;else if(1<pe){for(var dt=Array(pe),Re=0;Re<pe;Re++)dt[Re]=arguments[Re+2];Z.children=dt}if(y&&y.defaultProps)for($ in pe=y.defaultProps,pe)Z[$]===void 0&&(Z[$]=pe[$]);return Se(y,Ee,Z)},Oe.createRef=function(){return{current:null}},Oe.forwardRef=function(y){return{$$typeof:_,render:y}},Oe.isValidElement=_e,Oe.lazy=function(y){return{$$typeof:G,_payload:{_status:-1,_result:y},_init:P}},Oe.memo=function(y,E){return{$$typeof:S,type:y,compare:E===void 0?null:E}},Oe.startTransition=function(y){var E=L.T,V={};L.T=V;try{var $=y(),Z=L.S;Z!==null&&Z(V,$),typeof $=="object"&&$!==null&&typeof $.then=="function"&&$.then(J,Ae)}catch(Ee){Ae(Ee)}finally{E!==null&&V.types!==null&&(E.types=V.types),L.T=E}},Oe.unstable_useCacheRefresh=function(){return L.H.useCacheRefresh()},Oe.use=function(y){return L.H.use(y)},Oe.useActionState=function(y,E,V){return L.H.useActionState(y,E,V)},Oe.useCallback=function(y,E){return L.H.useCallback(y,E)},Oe.useContext=function(y){return L.H.useContext(y)},Oe.useDebugValue=function(){},Oe.useDeferredValue=function(y,E){return L.H.useDeferredValue(y,E)},Oe.useEffect=function(y,E){return L.H.useEffect(y,E)},Oe.useEffectEvent=function(y){return L.H.useEffectEvent(y)},Oe.useId=function(){return L.H.useId()},Oe.useImperativeHandle=function(y,E,V){return L.H.useImperativeHandle(y,E,V)},Oe.useInsertionEffect=function(y,E){return L.H.useInsertionEffect(y,E)},Oe.useLayoutEffect=function(y,E){return L.H.useLayoutEffect(y,E)},Oe.useMemo=function(y,E){return L.H.useMemo(y,E)},Oe.useOptimistic=function(y,E){return L.H.useOptimistic(y,E)},Oe.useReducer=function(y,E,V){return L.H.useReducer(y,E,V)},Oe.useRef=function(y){return L.H.useRef(y)},Oe.useState=function(y){return L.H.useState(y)},Oe.useSyncExternalStore=function(y,E,V){return L.H.useSyncExternalStore(y,E,V)},Oe.useTransition=function(){return L.H.useTransition()},Oe.version="19.2.4",Oe}var Q0;function Fs(){return Q0||(Q0=1,Ns.exports=Ym()),Ns.exports}var w=Fs();const dh=Bm(w),Z0=Hm({__proto__:null,default:dh},[w]);function Gm(o){if(o.sheet)return o.sheet;for(var s=0;s<document.styleSheets.length;s++)if(document.styleSheets[s].ownerNode===o)return document.styleSheets[s]}function Vm(o){var s=document.createElement("style");return s.setAttribute("data-emotion",o.key),o.nonce!==void 0&&s.setAttribute("nonce",o.nonce),s.appendChild(document.createTextNode("")),s.setAttribute("data-s",""),s}var Xm=(function(){function o(h){var u=this;this._insertTag=function(p){var m;u.tags.length===0?u.insertionPoint?m=u.insertionPoint.nextSibling:u.prepend?m=u.container.firstChild:m=u.before:m=u.tags[u.tags.length-1].nextSibling,u.container.insertBefore(p,m),u.tags.push(p)},this.isSpeedy=h.speedy===void 0?!0:h.speedy,this.tags=[],this.ctr=0,this.nonce=h.nonce,this.key=h.key,this.container=h.container,this.prepend=h.prepend,this.insertionPoint=h.insertionPoint,this.before=null}var s=o.prototype;return s.hydrate=function(u){u.forEach(this._insertTag)},s.insert=function(u){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(Vm(this));var p=this.tags[this.tags.length-1];if(this.isSpeedy){var m=Gm(p);try{m.insertRule(u,m.cssRules.length)}catch{}}else p.appendChild(document.createTextNode(u));this.ctr++},s.flush=function(){this.tags.forEach(function(u){var p;return(p=u.parentNode)==null?void 0:p.removeChild(u)}),this.tags=[],this.ctr=0},o})(),Ht="-ms-",yr="-moz-",Je="-webkit-",hh="comm",$s="rule",Ws="decl",Qm="@import",ph="@keyframes",Zm="@layer",Km=Math.abs,vr=String.fromCharCode,Jm=Object.assign;function Fm(o,s){return Rt(o,0)^45?(((s<<2^Rt(o,0))<<2^Rt(o,1))<<2^Rt(o,2))<<2^Rt(o,3):0}function mh(o){return o.trim()}function $m(o,s){return(o=s.exec(o))?o[0]:o}function Fe(o,s,h){return o.replace(s,h)}function Zs(o,s){return o.indexOf(s)}function Rt(o,s){return o.charCodeAt(s)|0}function Gi(o,s,h){return o.slice(s,h)}function Un(o){return o.length}function Is(o){return o.length}function dr(o,s){return s.push(o),o}function Wm(o,s){return o.map(s).join("")}var br=1,Xa=1,gh=0,Ft=0,Mt=0,Za="";function xr(o,s,h,u,p,m,k){return{value:o,root:s,parent:h,type:u,props:p,children:m,line:br,column:Xa,length:k,return:""}}function Bi(o,s){return Jm(xr("",null,null,"",null,null,0),o,{length:-o.length},s)}function Im(){return Mt}function Pm(){return Mt=Ft>0?Rt(Za,--Ft):0,Xa--,Mt===10&&(Xa=1,br--),Mt}function cn(){return Mt=Ft<gh?Rt(Za,Ft++):0,Xa++,Mt===10&&(Xa=1,br++),Mt}function Hn(){return Rt(Za,Ft)}function hr(){return Ft}function Qi(o,s){return Gi(Za,o,s)}function Vi(o){switch(o){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function yh(o){return br=Xa=1,gh=Un(Za=o),Ft=0,[]}function vh(o){return Za="",o}function pr(o){return mh(Qi(Ft-1,Ks(o===91?o+2:o===40?o+1:o)))}function e1(o){for(;(Mt=Hn())&&Mt<33;)cn();return Vi(o)>2||Vi(Mt)>3?"":" "}function t1(o,s){for(;--s&&cn()&&!(Mt<48||Mt>102||Mt>57&&Mt<65||Mt>70&&Mt<97););return Qi(o,hr()+(s<6&&Hn()==32&&cn()==32))}function Ks(o){for(;cn();)switch(Mt){case o:return Ft;case 34:case 39:o!==34&&o!==39&&Ks(Mt);break;case 40:o===41&&Ks(o);break;case 92:cn();break}return Ft}function n1(o,s){for(;cn()&&o+Mt!==57;)if(o+Mt===84&&Hn()===47)break;return"/*"+Qi(s,Ft-1)+"*"+vr(o===47?o:cn())}function l1(o){for(;!Vi(Hn());)cn();return Qi(o,Ft)}function a1(o){return vh(mr("",null,null,null,[""],o=yh(o),0,[0],o))}function mr(o,s,h,u,p,m,k,_,R){for(var S=0,G=0,H=k,Q=0,le=0,U=0,Y=1,be=1,W=1,he=0,ne="",oe=p,q=m,J=u,L=ne;be;)switch(U=he,he=cn()){case 40:if(U!=108&&Rt(L,H-1)==58){Zs(L+=Fe(pr(he),"&","&\f"),"&\f")!=-1&&(W=-1);break}case 34:case 39:case 91:L+=pr(he);break;case 9:case 10:case 13:case 32:L+=e1(U);break;case 92:L+=t1(hr()-1,7);continue;case 47:switch(Hn()){case 42:case 47:dr(i1(n1(cn(),hr()),s,h),R);break;default:L+="/"}break;case 123*Y:_[S++]=Un(L)*W;case 125*Y:case 59:case 0:switch(he){case 0:case 125:be=0;case 59+G:W==-1&&(L=Fe(L,/\f/g,"")),le>0&&Un(L)-H&&dr(le>32?J0(L+";",u,h,H-1):J0(Fe(L," ","")+";",u,h,H-2),R);break;case 59:L+=";";default:if(dr(J=K0(L,s,h,S,G,p,_,ne,oe=[],q=[],H),m),he===123)if(G===0)mr(L,s,J,J,oe,m,H,_,q);else switch(Q===99&&Rt(L,3)===110?100:Q){case 100:case 108:case 109:case 115:mr(o,J,J,u&&dr(K0(o,J,J,0,0,p,_,ne,p,oe=[],H),q),p,q,H,_,u?oe:q);break;default:mr(L,J,J,J,[""],q,0,_,q)}}S=G=le=0,Y=W=1,ne=L="",H=k;break;case 58:H=1+Un(L),le=U;default:if(Y<1){if(he==123)--Y;else if(he==125&&Y++==0&&Pm()==125)continue}switch(L+=vr(he),he*Y){case 38:W=G>0?1:(L+="\f",-1);break;case 44:_[S++]=(Un(L)-1)*W,W=1;break;case 64:Hn()===45&&(L+=pr(cn())),Q=Hn(),G=H=Un(ne=L+=l1(hr())),he++;break;case 45:U===45&&Un(L)==2&&(Y=0)}}return m}function K0(o,s,h,u,p,m,k,_,R,S,G){for(var H=p-1,Q=p===0?m:[""],le=Is(Q),U=0,Y=0,be=0;U<u;++U)for(var W=0,he=Gi(o,H+1,H=Km(Y=k[U])),ne=o;W<le;++W)(ne=mh(Y>0?Q[W]+" "+he:Fe(he,/&\f/g,Q[W])))&&(R[be++]=ne);return xr(o,s,h,p===0?$s:_,R,S,G)}function i1(o,s,h){return xr(o,s,h,hh,vr(Im()),Gi(o,2,-2),0)}function J0(o,s,h,u){return xr(o,s,h,Ws,Gi(o,0,u),Gi(o,u+1,-1),u)}function Va(o,s){for(var h="",u=Is(o),p=0;p<u;p++)h+=s(o[p],p,o,s)||"";return h}function o1(o,s,h,u){switch(o.type){case Zm:if(o.children.length)break;case Qm:case Ws:return o.return=o.return||o.value;case hh:return"";case ph:return o.return=o.value+"{"+Va(o.children,u)+"}";case $s:o.value=o.props.join(",")}return Un(h=Va(o.children,u))?o.return=o.value+"{"+h+"}":""}function r1(o){var s=Is(o);return function(h,u,p,m){for(var k="",_=0;_<s;_++)k+=o[_](h,u,p,m)||"";return k}}function c1(o){return function(s){s.root||(s=s.return)&&o(s)}}function s1(o){var s=Object.create(null);return function(h){return s[h]===void 0&&(s[h]=o(h)),s[h]}}var u1=function(s,h,u){for(var p=0,m=0;p=m,m=Hn(),p===38&&m===12&&(h[u]=1),!Vi(m);)cn();return Qi(s,Ft)},f1=function(s,h){var u=-1,p=44;do switch(Vi(p)){case 0:p===38&&Hn()===12&&(h[u]=1),s[u]+=u1(Ft-1,h,u);break;case 2:s[u]+=pr(p);break;case 4:if(p===44){s[++u]=Hn()===58?"&\f":"",h[u]=s[u].length;break}default:s[u]+=vr(p)}while(p=cn());return s},d1=function(s,h){return vh(f1(yh(s),h))},F0=new WeakMap,h1=function(s){if(!(s.type!=="rule"||!s.parent||s.length<1)){for(var h=s.value,u=s.parent,p=s.column===u.column&&s.line===u.line;u.type!=="rule";)if(u=u.parent,!u)return;if(!(s.props.length===1&&h.charCodeAt(0)!==58&&!F0.get(u))&&!p){F0.set(s,!0);for(var m=[],k=d1(h,m),_=u.props,R=0,S=0;R<k.length;R++)for(var G=0;G<_.length;G++,S++)s.props[S]=m[R]?k[R].replace(/&\f/g,_[G]):_[G]+" "+k[R]}}},p1=function(s){if(s.type==="decl"){var h=s.value;h.charCodeAt(0)===108&&h.charCodeAt(2)===98&&(s.return="",s.value="")}};function bh(o,s){switch(Fm(o,s)){case 5103:return Je+"print-"+o+o;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Je+o+o;case 5349:case 4246:case 4810:case 6968:case 2756:return Je+o+yr+o+Ht+o+o;case 6828:case 4268:return Je+o+Ht+o+o;case 6165:return Je+o+Ht+"flex-"+o+o;case 5187:return Je+o+Fe(o,/(\w+).+(:[^]+)/,Je+"box-$1$2"+Ht+"flex-$1$2")+o;case 5443:return Je+o+Ht+"flex-item-"+Fe(o,/flex-|-self/,"")+o;case 4675:return Je+o+Ht+"flex-line-pack"+Fe(o,/align-content|flex-|-self/,"")+o;case 5548:return Je+o+Ht+Fe(o,"shrink","negative")+o;case 5292:return Je+o+Ht+Fe(o,"basis","preferred-size")+o;case 6060:return Je+"box-"+Fe(o,"-grow","")+Je+o+Ht+Fe(o,"grow","positive")+o;case 4554:return Je+Fe(o,/([^-])(transform)/g,"$1"+Je+"$2")+o;case 6187:return Fe(Fe(Fe(o,/(zoom-|grab)/,Je+"$1"),/(image-set)/,Je+"$1"),o,"")+o;case 5495:case 3959:return Fe(o,/(image-set\([^]*)/,Je+"$1$`$1");case 4968:return Fe(Fe(o,/(.+:)(flex-)?(.*)/,Je+"box-pack:$3"+Ht+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Je+o+o;case 4095:case 3583:case 4068:case 2532:return Fe(o,/(.+)-inline(.+)/,Je+"$1$2")+o;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Un(o)-1-s>6)switch(Rt(o,s+1)){case 109:if(Rt(o,s+4)!==45)break;case 102:return Fe(o,/(.+:)(.+)-([^]+)/,"$1"+Je+"$2-$3$1"+yr+(Rt(o,s+3)==108?"$3":"$2-$3"))+o;case 115:return~Zs(o,"stretch")?bh(Fe(o,"stretch","fill-available"),s)+o:o}break;case 4949:if(Rt(o,s+1)!==115)break;case 6444:switch(Rt(o,Un(o)-3-(~Zs(o,"!important")&&10))){case 107:return Fe(o,":",":"+Je)+o;case 101:return Fe(o,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Je+(Rt(o,14)===45?"inline-":"")+"box$3$1"+Je+"$2$3$1"+Ht+"$2box$3")+o}break;case 5936:switch(Rt(o,s+11)){case 114:return Je+o+Ht+Fe(o,/[svh]\w+-[tblr]{2}/,"tb")+o;case 108:return Je+o+Ht+Fe(o,/[svh]\w+-[tblr]{2}/,"tb-rl")+o;case 45:return Je+o+Ht+Fe(o,/[svh]\w+-[tblr]{2}/,"lr")+o}return Je+o+Ht+o+o}return o}var m1=function(s,h,u,p){if(s.length>-1&&!s.return)switch(s.type){case Ws:s.return=bh(s.value,s.length);break;case ph:return Va([Bi(s,{value:Fe(s.value,"@","@"+Je)})],p);case $s:if(s.length)return Wm(s.props,function(m){switch($m(m,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Va([Bi(s,{props:[Fe(m,/:(read-\w+)/,":"+yr+"$1")]})],p);case"::placeholder":return Va([Bi(s,{props:[Fe(m,/:(plac\w+)/,":"+Je+"input-$1")]}),Bi(s,{props:[Fe(m,/:(plac\w+)/,":"+yr+"$1")]}),Bi(s,{props:[Fe(m,/:(plac\w+)/,Ht+"input-$1")]})],p)}return""})}},g1=[m1],y1=function(s){var h=s.key;if(h==="css"){var u=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(u,function(Y){var be=Y.getAttribute("data-emotion");be.indexOf(" ")!==-1&&(document.head.appendChild(Y),Y.setAttribute("data-s",""))})}var p=s.stylisPlugins||g1,m={},k,_=[];k=s.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+h+' "]'),function(Y){for(var be=Y.getAttribute("data-emotion").split(" "),W=1;W<be.length;W++)m[be[W]]=!0;_.push(Y)});var R,S=[h1,p1];{var G,H=[o1,c1(function(Y){G.insert(Y)})],Q=r1(S.concat(p,H)),le=function(be){return Va(a1(be),Q)};R=function(be,W,he,ne){G=he,le(be?be+"{"+W.styles+"}":W.styles),ne&&(U.inserted[W.name]=!0)}}var U={key:h,sheet:new Xm({key:h,container:k,nonce:s.nonce,speedy:s.speedy,prepend:s.prepend,insertionPoint:s.insertionPoint}),nonce:s.nonce,inserted:m,registered:{},insert:R};return U.sheet.hydrate(_),U},Hs={exports:{}},We={};var $0;function v1(){if($0)return We;$0=1;var o=typeof Symbol=="function"&&Symbol.for,s=o?Symbol.for("react.element"):60103,h=o?Symbol.for("react.portal"):60106,u=o?Symbol.for("react.fragment"):60107,p=o?Symbol.for("react.strict_mode"):60108,m=o?Symbol.for("react.profiler"):60114,k=o?Symbol.for("react.provider"):60109,_=o?Symbol.for("react.context"):60110,R=o?Symbol.for("react.async_mode"):60111,S=o?Symbol.for("react.concurrent_mode"):60111,G=o?Symbol.for("react.forward_ref"):60112,H=o?Symbol.for("react.suspense"):60113,Q=o?Symbol.for("react.suspense_list"):60120,le=o?Symbol.for("react.memo"):60115,U=o?Symbol.for("react.lazy"):60116,Y=o?Symbol.for("react.block"):60121,be=o?Symbol.for("react.fundamental"):60117,W=o?Symbol.for("react.responder"):60118,he=o?Symbol.for("react.scope"):60119;function ne(q){if(typeof q=="object"&&q!==null){var J=q.$$typeof;switch(J){case s:switch(q=q.type,q){case R:case S:case u:case m:case p:case H:return q;default:switch(q=q&&q.$$typeof,q){case _:case G:case U:case le:case k:return q;default:return J}}case h:return J}}}function oe(q){return ne(q)===S}return We.AsyncMode=R,We.ConcurrentMode=S,We.ContextConsumer=_,We.ContextProvider=k,We.Element=s,We.ForwardRef=G,We.Fragment=u,We.Lazy=U,We.Memo=le,We.Portal=h,We.Profiler=m,We.StrictMode=p,We.Suspense=H,We.isAsyncMode=function(q){return oe(q)||ne(q)===R},We.isConcurrentMode=oe,We.isContextConsumer=function(q){return ne(q)===_},We.isContextProvider=function(q){return ne(q)===k},We.isElement=function(q){return typeof q=="object"&&q!==null&&q.$$typeof===s},We.isForwardRef=function(q){return ne(q)===G},We.isFragment=function(q){return ne(q)===u},We.isLazy=function(q){return ne(q)===U},We.isMemo=function(q){return ne(q)===le},We.isPortal=function(q){return ne(q)===h},We.isProfiler=function(q){return ne(q)===m},We.isStrictMode=function(q){return ne(q)===p},We.isSuspense=function(q){return ne(q)===H},We.isValidElementType=function(q){return typeof q=="string"||typeof q=="function"||q===u||q===S||q===m||q===p||q===H||q===Q||typeof q=="object"&&q!==null&&(q.$$typeof===U||q.$$typeof===le||q.$$typeof===k||q.$$typeof===_||q.$$typeof===G||q.$$typeof===be||q.$$typeof===W||q.$$typeof===he||q.$$typeof===Y)},We.typeOf=ne,We}var W0;function b1(){return W0||(W0=1,Hs.exports=v1()),Hs.exports}var Bs,I0;function x1(){if(I0)return Bs;I0=1;var o=b1(),s={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},h={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},u={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},p={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},m={};m[o.ForwardRef]=u,m[o.Memo]=p;function k(U){return o.isMemo(U)?p:m[U.$$typeof]||s}var _=Object.defineProperty,R=Object.getOwnPropertyNames,S=Object.getOwnPropertySymbols,G=Object.getOwnPropertyDescriptor,H=Object.getPrototypeOf,Q=Object.prototype;function le(U,Y,be){if(typeof Y!="string"){if(Q){var W=H(Y);W&&W!==Q&&le(U,W,be)}var he=R(Y);S&&(he=he.concat(S(Y)));for(var ne=k(U),oe=k(Y),q=0;q<he.length;++q){var J=he[q];if(!h[J]&&!(be&&be[J])&&!(oe&&oe[J])&&!(ne&&ne[J])){var L=G(Y,J);try{_(U,J,L)}catch{}}}}return U}return Bs=le,Bs}x1();var S1=!0;function C1(o,s,h){var u="";return h.split(" ").forEach(function(p){o[p]!==void 0?s.push(o[p]+";"):p&&(u+=p+" ")}),u}var xh=function(s,h,u){var p=s.key+"-"+h.name;(u===!1||S1===!1)&&s.registered[p]===void 0&&(s.registered[p]=h.styles)},w1=function(s,h,u){xh(s,h,u);var p=s.key+"-"+h.name;if(s.inserted[h.name]===void 0){var m=h;do s.insert(h===m?"."+p:"",m,s.sheet,!0),m=m.next;while(m!==void 0)}};function z1(o){for(var s=0,h,u=0,p=o.length;p>=4;++u,p-=4)h=o.charCodeAt(u)&255|(o.charCodeAt(++u)&255)<<8|(o.charCodeAt(++u)&255)<<16|(o.charCodeAt(++u)&255)<<24,h=(h&65535)*1540483477+((h>>>16)*59797<<16),h^=h>>>24,s=(h&65535)*1540483477+((h>>>16)*59797<<16)^(s&65535)*1540483477+((s>>>16)*59797<<16);switch(p){case 3:s^=(o.charCodeAt(u+2)&255)<<16;case 2:s^=(o.charCodeAt(u+1)&255)<<8;case 1:s^=o.charCodeAt(u)&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 M1={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},T1=/[A-Z]|^ms/g,A1=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Sh=function(s){return s.charCodeAt(1)===45},P0=function(s){return s!=null&&typeof s!="boolean"},js=s1(function(o){return Sh(o)?o:o.replace(T1,"-$&").toLowerCase()}),eh=function(s,h){switch(s){case"animation":case"animationName":if(typeof h=="string")return h.replace(A1,function(u,p,m){return Nn={name:p,styles:m,next:Nn},p})}return M1[s]!==1&&!Sh(s)&&typeof h=="number"&&h!==0?h+"px":h};function Xi(o,s,h){if(h==null)return"";var u=h;if(u.__emotion_styles!==void 0)return u;switch(typeof h){case"boolean":return"";case"object":{var p=h;if(p.anim===1)return Nn={name:p.name,styles:p.styles,next:Nn},p.name;var m=h;if(m.styles!==void 0){var k=m.next;if(k!==void 0)for(;k!==void 0;)Nn={name:k.name,styles:k.styles,next:Nn},k=k.next;var _=m.styles+";";return _}return E1(o,s,h)}case"function":{if(o!==void 0){var R=Nn,S=h(o);return Nn=R,Xi(o,s,S)}break}}var G=h;return G}function E1(o,s,h){var u="";if(Array.isArray(h))for(var p=0;p<h.length;p++)u+=Xi(o,s,h[p])+";";else for(var m in h){var k=h[m];if(typeof k!="object"){var _=k;P0(_)&&(u+=js(m)+":"+eh(m,_)+";")}else if(Array.isArray(k)&&typeof k[0]=="string"&&s==null)for(var R=0;R<k.length;R++)P0(k[R])&&(u+=js(m)+":"+eh(m,k[R])+";");else{var S=Xi(o,s,k);switch(m){case"animation":case"animationName":{u+=js(m)+":"+S+";";break}default:u+=m+"{"+S+"}"}}}return u}var th=/label:\s*([^\s;{]+)\s*(;|$)/g,Nn;function Ch(o,s,h){if(o.length===1&&typeof o[0]=="object"&&o[0]!==null&&o[0].styles!==void 0)return o[0];var u=!0,p="";Nn=void 0;var m=o[0];if(m==null||m.raw===void 0)u=!1,p+=Xi(h,s,m);else{var k=m;p+=k[0]}for(var _=1;_<o.length;_++)if(p+=Xi(h,s,o[_]),u){var R=m;p+=R[_]}th.lastIndex=0;for(var S="",G;(G=th.exec(p))!==null;)S+="-"+G[1];var H=z1(p)+S;return{name:H,styles:p,next:Nn}}var D1=function(s){return s()},k1=Z0.useInsertionEffect?Z0.useInsertionEffect:!1,_1=k1||D1,wh=w.createContext(typeof HTMLElement<"u"?y1({key:"css"}):null);wh.Provider;var O1=function(s){return w.forwardRef(function(h,u){var p=w.useContext(wh);return s(h,p,u)})},R1=w.createContext({}),Zi={}.hasOwnProperty,Js="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Ps=function(s,h){var u={};for(var p in h)Zi.call(h,p)&&(u[p]=h[p]);return u[Js]=s,u},L1=function(s){var h=s.cache,u=s.serialized,p=s.isStringTag;return xh(h,u,p),_1(function(){return w1(h,u,p)}),null},U1=O1(function(o,s,h){var u=o.css;typeof u=="string"&&s.registered[u]!==void 0&&(u=s.registered[u]);var p=o[Js],m=[u],k="";typeof o.className=="string"?k=C1(s.registered,m,o.className):o.className!=null&&(k=o.className+" ");var _=Ch(m,void 0,w.useContext(R1));k+=s.key+"-"+_.name;var R={};for(var S in o)Zi.call(o,S)&&S!=="css"&&S!==Js&&(R[S]=o[S]);return R.className=k,h&&(R.ref=h),w.createElement(w.Fragment,null,w.createElement(L1,{cache:s,serialized:_,isStringTag:typeof p=="string"}),w.createElement(p,R))}),eu=U1,bt=Yi.Fragment,c=function(s,h,u){return Zi.call(h,"css")?Yi.jsx(eu,Ps(s,h),u):Yi.jsx(s,h,u)},x=function(s,h,u){return Zi.call(h,"css")?Yi.jsxs(eu,Ps(s,h),u):Yi.jsxs(s,h,u)},qs={exports:{}},ji={},Ys={exports:{}},Gs={};var nh;function N1(){return nh||(nh=1,(function(o){function s(T,j){var P=T.length;T.push(j);e:for(;0<P;){var Ae=P-1>>>1,Ne=T[Ae];if(0<p(Ne,j))T[Ae]=j,T[P]=Ne,P=Ae;else break e}}function h(T){return T.length===0?null:T[0]}function u(T){if(T.length===0)return null;var j=T[0],P=T.pop();if(P!==j){T[0]=P;e:for(var Ae=0,Ne=T.length,y=Ne>>>1;Ae<y;){var E=2*(Ae+1)-1,V=T[E],$=E+1,Z=T[$];if(0>p(V,P))$<Ne&&0>p(Z,V)?(T[Ae]=Z,T[$]=P,Ae=$):(T[Ae]=V,T[E]=P,Ae=E);else if($<Ne&&0>p(Z,P))T[Ae]=Z,T[$]=P,Ae=$;else break e}}return j}function p(T,j){var P=T.sortIndex-j.sortIndex;return P!==0?P:T.id-j.id}if(o.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var m=performance;o.unstable_now=function(){return m.now()}}else{var k=Date,_=k.now();o.unstable_now=function(){return k.now()-_}}var R=[],S=[],G=1,H=null,Q=3,le=!1,U=!1,Y=!1,be=!1,W=typeof setTimeout=="function"?setTimeout:null,he=typeof clearTimeout=="function"?clearTimeout:null,ne=typeof setImmediate<"u"?setImmediate:null;function oe(T){for(var j=h(S);j!==null;){if(j.callback===null)u(S);else if(j.startTime<=T)u(S),j.sortIndex=j.expirationTime,s(R,j);else break;j=h(S)}}function q(T){if(Y=!1,oe(T),!U)if(h(R)!==null)U=!0,J||(J=!0,Te());else{var j=h(S);j!==null&&Ye(q,j.startTime-T)}}var J=!1,L=-1,fe=5,Se=-1;function ke(){return be?!0:!(o.unstable_now()-Se<fe)}function _e(){if(be=!1,J){var T=o.unstable_now();Se=T;var j=!0;try{e:{U=!1,Y&&(Y=!1,he(L),L=-1),le=!0;var P=Q;try{t:{for(oe(T),H=h(R);H!==null&&!(H.expirationTime>T&&ke());){var Ae=H.callback;if(typeof Ae=="function"){H.callback=null,Q=H.priorityLevel;var Ne=Ae(H.expirationTime<=T);if(T=o.unstable_now(),typeof Ne=="function"){H.callback=Ne,oe(T),j=!0;break t}H===h(R)&&u(R),oe(T)}else u(R);H=h(R)}if(H!==null)j=!0;else{var y=h(S);y!==null&&Ye(q,y.startTime-T),j=!1}}break e}finally{H=null,Q=P,le=!1}j=void 0}}finally{j?Te():J=!1}}}var Te;if(typeof ne=="function")Te=function(){ne(_e)};else if(typeof MessageChannel<"u"){var at=new MessageChannel,$e=at.port2;at.port1.onmessage=_e,Te=function(){$e.postMessage(null)}}else Te=function(){W(_e,0)};function Ye(T,j){L=W(function(){T(o.unstable_now())},j)}o.unstable_IdlePriority=5,o.unstable_ImmediatePriority=1,o.unstable_LowPriority=4,o.unstable_NormalPriority=3,o.unstable_Profiling=null,o.unstable_UserBlockingPriority=2,o.unstable_cancelCallback=function(T){T.callback=null},o.unstable_forceFrameRate=function(T){0>T||125<T?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):fe=0<T?Math.floor(1e3/T):5},o.unstable_getCurrentPriorityLevel=function(){return Q},o.unstable_next=function(T){switch(Q){case 1:case 2:case 3:var j=3;break;default:j=Q}var P=Q;Q=j;try{return T()}finally{Q=P}},o.unstable_requestPaint=function(){be=!0},o.unstable_runWithPriority=function(T,j){switch(T){case 1:case 2:case 3:case 4:case 5:break;default:T=3}var P=Q;Q=T;try{return j()}finally{Q=P}},o.unstable_scheduleCallback=function(T,j,P){var Ae=o.unstable_now();switch(typeof P=="object"&&P!==null?(P=P.delay,P=typeof P=="number"&&0<P?Ae+P:Ae):P=Ae,T){case 1:var Ne=-1;break;case 2:Ne=250;break;case 5:Ne=1073741823;break;case 4:Ne=1e4;break;default:Ne=5e3}return Ne=P+Ne,T={id:G++,callback:j,priorityLevel:T,startTime:P,expirationTime:Ne,sortIndex:-1},P>Ae?(T.sortIndex=P,s(S,T),h(R)===null&&T===h(S)&&(Y?(he(L),L=-1):Y=!0,Ye(q,P-Ae))):(T.sortIndex=Ne,s(R,T),U||le||(U=!0,J||(J=!0,Te()))),T},o.unstable_shouldYield=ke,o.unstable_wrapCallback=function(T){var j=Q;return function(){var P=Q;Q=j;try{return T.apply(this,arguments)}finally{Q=P}}}})(Gs)),Gs}var lh;function H1(){return lh||(lh=1,Ys.exports=N1()),Ys.exports}var Vs={exports:{}},Nt={};var ah;function B1(){if(ah)return Nt;ah=1;var o=Fs();function s(R){var S="https://react.dev/errors/"+R;if(1<arguments.length){S+="?args[]="+encodeURIComponent(arguments[1]);for(var G=2;G<arguments.length;G++)S+="&args[]="+encodeURIComponent(arguments[G])}return"Minified React error #"+R+"; visit "+S+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function h(){}var u={d:{f:h,r:function(){throw Error(s(522))},D:h,C:h,L:h,m:h,X:h,S:h,M:h},p:0,findDOMNode:null},p=Symbol.for("react.portal");function m(R,S,G){var H=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:p,key:H==null?null:""+H,children:R,containerInfo:S,implementation:G}}var k=o.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function _(R,S){if(R==="font")return"";if(typeof S=="string")return S==="use-credentials"?S:""}return Nt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=u,Nt.createPortal=function(R,S){var G=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!S||S.nodeType!==1&&S.nodeType!==9&&S.nodeType!==11)throw Error(s(299));return m(R,S,null,G)},Nt.flushSync=function(R){var S=k.T,G=u.p;try{if(k.T=null,u.p=2,R)return R()}finally{k.T=S,u.p=G,u.d.f()}},Nt.preconnect=function(R,S){typeof R=="string"&&(S?(S=S.crossOrigin,S=typeof S=="string"?S==="use-credentials"?S:"":void 0):S=null,u.d.C(R,S))},Nt.prefetchDNS=function(R){typeof R=="string"&&u.d.D(R)},Nt.preinit=function(R,S){if(typeof R=="string"&&S&&typeof S.as=="string"){var G=S.as,H=_(G,S.crossOrigin),Q=typeof S.integrity=="string"?S.integrity:void 0,le=typeof S.fetchPriority=="string"?S.fetchPriority:void 0;G==="style"?u.d.S(R,typeof S.precedence=="string"?S.precedence:void 0,{crossOrigin:H,integrity:Q,fetchPriority:le}):G==="script"&&u.d.X(R,{crossOrigin:H,integrity:Q,fetchPriority:le,nonce:typeof S.nonce=="string"?S.nonce:void 0})}},Nt.preinitModule=function(R,S){if(typeof R=="string")if(typeof S=="object"&&S!==null){if(S.as==null||S.as==="script"){var G=_(S.as,S.crossOrigin);u.d.M(R,{crossOrigin:G,integrity:typeof S.integrity=="string"?S.integrity:void 0,nonce:typeof S.nonce=="string"?S.nonce:void 0})}}else S==null&&u.d.M(R)},Nt.preload=function(R,S){if(typeof R=="string"&&typeof S=="object"&&S!==null&&typeof S.as=="string"){var G=S.as,H=_(G,S.crossOrigin);u.d.L(R,G,{crossOrigin:H,integrity:typeof S.integrity=="string"?S.integrity:void 0,nonce:typeof S.nonce=="string"?S.nonce:void 0,type:typeof S.type=="string"?S.type:void 0,fetchPriority:typeof S.fetchPriority=="string"?S.fetchPriority:void 0,referrerPolicy:typeof S.referrerPolicy=="string"?S.referrerPolicy:void 0,imageSrcSet:typeof S.imageSrcSet=="string"?S.imageSrcSet:void 0,imageSizes:typeof S.imageSizes=="string"?S.imageSizes:void 0,media:typeof S.media=="string"?S.media:void 0})}},Nt.preloadModule=function(R,S){if(typeof R=="string")if(S){var G=_(S.as,S.crossOrigin);u.d.m(R,{as:typeof S.as=="string"&&S.as!=="script"?S.as:void 0,crossOrigin:G,integrity:typeof S.integrity=="string"?S.integrity:void 0})}else u.d.m(R)},Nt.requestFormReset=function(R){u.d.r(R)},Nt.unstable_batchedUpdates=function(R,S){return R(S)},Nt.useFormState=function(R,S,G){return k.H.useFormState(R,S,G)},Nt.useFormStatus=function(){return k.H.useHostTransitionStatus()},Nt.version="19.2.4",Nt}var ih;function j1(){if(ih)return Vs.exports;ih=1;function o(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(o)}catch(s){console.error(s)}}return o(),Vs.exports=B1(),Vs.exports}var oh;function q1(){if(oh)return ji;oh=1;var o=H1(),s=Fs(),h=j1();function u(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 p(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 k(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){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 R(e){if(m(e)!==e)throw Error(u(188))}function S(e){var t=e.alternate;if(!t){if(t=m(e),t===null)throw Error(u(188));return t!==e?null:e}for(var n=e,l=t;;){var a=n.return;if(a===null)break;var i=a.alternate;if(i===null){if(l=a.return,l!==null){n=l;continue}break}if(a.child===i.child){for(i=a.child;i;){if(i===n)return R(a),e;if(i===l)return R(a),t;i=i.sibling}throw Error(u(188))}if(n.return!==l.return)n=a,l=i;else{for(var r=!1,d=a.child;d;){if(d===n){r=!0,n=a,l=i;break}if(d===l){r=!0,l=a,n=i;break}d=d.sibling}if(!r){for(d=i.child;d;){if(d===n){r=!0,n=i,l=a;break}if(d===l){r=!0,l=i,n=a;break}d=d.sibling}if(!r)throw Error(u(189))}}if(n.alternate!==l)throw Error(u(190))}if(n.tag!==3)throw Error(u(188));return n.stateNode.current===n?e:t}function G(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=G(e),t!==null)return t;e=e.sibling}return null}var H=Object.assign,Q=Symbol.for("react.element"),le=Symbol.for("react.transitional.element"),U=Symbol.for("react.portal"),Y=Symbol.for("react.fragment"),be=Symbol.for("react.strict_mode"),W=Symbol.for("react.profiler"),he=Symbol.for("react.consumer"),ne=Symbol.for("react.context"),oe=Symbol.for("react.forward_ref"),q=Symbol.for("react.suspense"),J=Symbol.for("react.suspense_list"),L=Symbol.for("react.memo"),fe=Symbol.for("react.lazy"),Se=Symbol.for("react.activity"),ke=Symbol.for("react.memo_cache_sentinel"),_e=Symbol.iterator;function Te(e){return e===null||typeof e!="object"?null:(e=_e&&e[_e]||e["@@iterator"],typeof e=="function"?e:null)}var at=Symbol.for("react.client.reference");function $e(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===at?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Y:return"Fragment";case W:return"Profiler";case be:return"StrictMode";case q:return"Suspense";case J:return"SuspenseList";case Se:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case U:return"Portal";case ne:return e.displayName||"Context";case he:return(e._context.displayName||"Context")+".Consumer";case oe:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case L:return t=e.displayName||null,t!==null?t:$e(e.type)||"Memo";case fe:t=e._payload,e=e._init;try{return $e(e(t))}catch{}}return null}var Ye=Array.isArray,T=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,j=h.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P={pending:!1,data:null,method:null,action:null},Ae=[],Ne=-1;function y(e){return{current:e}}function E(e){0>Ne||(e.current=Ae[Ne],Ae[Ne]=null,Ne--)}function V(e,t){Ne++,Ae[Ne]=e.current,e.current=t}var $=y(null),Z=y(null),Ee=y(null),pe=y(null);function dt(e,t){switch(V(Ee,t),V(Z,e),V($,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?f0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=f0(t),e=d0(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}E($),V($,e)}function Re(){E($),E(Z),E(Ee)}function $t(e){e.memoizedState!==null&&V(pe,e);var t=$.current,n=d0(t,e.type);t!==n&&(V(Z,e),V($,n))}function xe(e){Z.current===e&&(E($),E(Z)),pe.current===e&&(E(pe),Ri._currentValue=P)}var jn,ol;function we(e){if(jn===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);jn=t&&t[1]||"",ol=-1<n.stack.indexOf(`
2
+ at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
3
+ `+jn+e+ol}var st=!1;function Lt(e,t){if(!e||st)return"";st=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var B=function(){throw Error()};if(Object.defineProperty(B.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(B,[])}catch(D){var A=D}Reflect.construct(e,[],B)}else{try{B.call()}catch(D){A=D}e.call(B.prototype)}}else{try{throw Error()}catch(D){A=D}(B=e())&&typeof B.catch=="function"&&B.catch(function(){})}}catch(D){if(D&&A&&typeof D.stack=="string")return[D.stack,A.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var a=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");a&&a.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=l.DetermineComponentFrameRoot(),r=i[0],d=i[1];if(r&&d){var g=r.split(`
4
+ `),M=d.split(`
5
+ `);for(a=l=0;l<g.length&&!g[l].includes("DetermineComponentFrameRoot");)l++;for(;a<M.length&&!M[a].includes("DetermineComponentFrameRoot");)a++;if(l===g.length||a===M.length)for(l=g.length-1,a=M.length-1;1<=l&&0<=a&&g[l]!==M[a];)a--;for(;1<=l&&0<=a;l--,a--)if(g[l]!==M[a]){if(l!==1||a!==1)do if(l--,a--,0>a||g[l]!==M[a]){var O=`
6
+ `+g[l].replace(" at new "," at ");return e.displayName&&O.includes("<anonymous>")&&(O=O.replace("<anonymous>",e.displayName)),O}while(1<=l&&0<=a);break}}}finally{st=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?we(n):""}function Wt(e,t){switch(e.tag){case 26:case 27:case 5:return we(e.type);case 16:return we("Lazy");case 13:return e.child!==t&&t!==null?we("Suspense Fallback"):we("Suspense");case 19:return we("SuspenseList");case 0:case 15:return Lt(e.type,!1);case 11:return Lt(e.type.render,!1);case 1:return Lt(e.type,!0);case 31:return we("Activity");default:return""}}function Tn(e){try{var t="",n=null;do t+=Wt(e,n),n=e,e=e.return;while(e);return t}catch(l){return`
7
+ Error generating stack: `+l.message+`
8
+ `+l.stack}}var rl=Object.prototype.hasOwnProperty,na=o.unstable_scheduleCallback,An=o.unstable_cancelCallback,Ul=o.unstable_shouldYield,sn=o.unstable_requestPaint,Ut=o.unstable_now,la=o.unstable_getCurrentPriorityLevel,aa=o.unstable_ImmediatePriority,ia=o.unstable_UserBlockingPriority,En=o.unstable_NormalPriority,Ka=o.unstable_LowPriority,Ji=o.unstable_IdlePriority,Fi=o.log,Cr=o.unstable_setDisableYieldValue,Nl=null,Bt=null;function Dn(e){if(typeof Fi=="function"&&Cr(e),Bt&&typeof Bt.setStrictMode=="function")try{Bt.setStrictMode(Nl,e)}catch{}}var jt=Math.clz32?Math.clz32:zr,wr=Math.log,$i=Math.LN2;function zr(e){return e>>>=0,e===0?32:31-(wr(e)/$i|0)|0}var qn=256,oa=262144,ra=4194304;function kn(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 ca(e,t,n){var l=e.pendingLanes;if(l===0)return 0;var a=0,i=e.suspendedLanes,r=e.pingedLanes;e=e.warmLanes;var d=l&134217727;return d!==0?(l=d&~i,l!==0?a=kn(l):(r&=d,r!==0?a=kn(r):n||(n=d&~e,n!==0&&(a=kn(n))))):(d=l&~i,d!==0?a=kn(d):r!==0?a=kn(r):n||(n=l&~e,n!==0&&(a=kn(n)))),a===0?0:t!==0&&t!==a&&(t&i)===0&&(i=a&-a,n=t&-t,i>=n||i===32&&(n&4194048)!==0)?t:a}function Hl(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Mr(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 Wi(){var e=ra;return ra<<=1,(ra&62914560)===0&&(ra=4194304),e}function Ja(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Bl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ii(e,t,n,l,a,i){var r=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 d=e.entanglements,g=e.expirationTimes,M=e.hiddenUpdates;for(n=r&~n;0<n;){var O=31-jt(n),B=1<<O;d[O]=0,g[O]=-1;var A=M[O];if(A!==null)for(M[O]=null,O=0;O<A.length;O++){var D=A[O];D!==null&&(D.lane&=-536870913)}n&=~B}l!==0&&cl(e,l,0),i!==0&&a===0&&e.tag!==0&&(e.suspendedLanes|=i&~(r&~t))}function cl(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-jt(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|n&261930}function Pi(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var l=31-jt(n),a=1<<l;a&t|e[l]&t&&(e[l]|=t),n&=~a}}function eo(e,t){var n=t&-t;return n=(n&42)!==0?1:un(n),(n&(e.suspendedLanes|t))!==0?0:n}function un(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 Fa(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Yn(){var e=j.p;return e!==0?e:(e=window.event,e===void 0?32:U0(e.type))}function Gn(e,t){var n=j.p;try{return j.p=e,t()}finally{j.p=n}}var qt=Math.random().toString(36).slice(2),xt="__reactFiber$"+qt,gt="__reactProps$"+qt,It="__reactContainer$"+qt,sa="__reactEvents$"+qt,Tr="__reactListeners$"+qt,Ar="__reactHandles$"+qt,I="__reactResources$"+qt,X="__reactMarker$"+qt;function ie(e){delete e[xt],delete e[gt],delete e[sa],delete e[Tr],delete e[Ar]}function de(e){var t=e[xt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[It]||n[xt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=b0(e);e!==null;){if(n=e[xt])return n;e=b0(e)}return t}e=n,n=e.parentNode}return null}function ze(e){if(e=e[xt]||e[It]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function se(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(u(33))}function Le(e){var t=e[I];return t||(t=e[I]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function ge(e){e[X]=!0}var te=new Set,He={};function ye(e,t){ut(e,t),ut(e+"Capture",t)}function ut(e,t){for(He[e]=t,e=0;e<t.length;e++)te.add(t[e])}var Pt=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]*$"),sl={},ft={};function Sn(e){return rl.call(ft,e)?!0:rl.call(sl,e)?!1:Pt.test(e)?ft[e]=!0:(sl[e]=!0,!1)}function ul(e,t,n){if(Sn(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function Gt(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 Cn(e,t,n,l){if(l===null)e.removeAttribute(n);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+l)}}function fn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function nu(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function kh(e,t,n){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var a=l.get,i=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(r){n=""+r,i.call(this,r)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return n},setValue:function(r){n=""+r},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Er(e){if(!e._valueTracker){var t=nu(e)?"checked":"value";e._valueTracker=kh(e,t,""+e[t])}}function lu(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),l="";return e&&(l=nu(e)?e.checked?"true":"false":e.value),e=l,e!==n?(t.setValue(e),!0):!1}function to(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 _h=/[\n"\\]/g;function dn(e){return e.replace(_h,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Dr(e,t,n,l,a,i,r,d){e.name="",r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"?e.type=r:e.removeAttribute("type"),t!=null?r==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+fn(t)):e.value!==""+fn(t)&&(e.value=""+fn(t)):r!=="submit"&&r!=="reset"||e.removeAttribute("value"),t!=null?kr(e,r,fn(t)):n!=null?kr(e,r,fn(n)):l!=null&&e.removeAttribute("value"),a==null&&i!=null&&(e.defaultChecked=!!i),a!=null&&(e.checked=a&&typeof a!="function"&&typeof a!="symbol"),d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"?e.name=""+fn(d):e.removeAttribute("name")}function au(e,t,n,l,a,i,r,d){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||n!=null){if(!(i!=="submit"&&i!=="reset"||t!=null)){Er(e);return}n=n!=null?""+fn(n):"",t=t!=null?""+fn(t):n,d||t===e.value||(e.value=t),e.defaultValue=t}l=l??a,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=d?e.checked:!!l,e.defaultChecked=!!l,r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"&&(e.name=r),Er(e)}function kr(e,t,n){t==="number"&&to(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function ua(e,t,n,l){if(e=e.options,t){t={};for(var a=0;a<n.length;a++)t["$"+n[a]]=!0;for(n=0;n<e.length;n++)a=t.hasOwnProperty("$"+e[n].value),e[n].selected!==a&&(e[n].selected=a),a&&l&&(e[n].defaultSelected=!0)}else{for(n=""+fn(n),t=null,a=0;a<e.length;a++){if(e[a].value===n){e[a].selected=!0,l&&(e[a].defaultSelected=!0);return}t!==null||e[a].disabled||(t=e[a])}t!==null&&(t.selected=!0)}}function iu(e,t,n){if(t!=null&&(t=""+fn(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+fn(n):""}function ou(e,t,n,l){if(t==null){if(l!=null){if(n!=null)throw Error(u(92));if(Ye(l)){if(1<l.length)throw Error(u(93));l=l[0]}n=l}n==null&&(n=""),t=n}n=fn(t),e.defaultValue=n,l=e.textContent,l===n&&l!==""&&l!==null&&(e.value=l),Er(e)}function fa(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Oh=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 ru(e,t,n){var l=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,n):typeof n!="number"||n===0||Oh.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function cu(e,t,n){if(t!=null&&typeof t!="object")throw Error(u(62));if(e=e.style,n!=null){for(var l in n)!n.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var a in t)l=t[a],t.hasOwnProperty(a)&&n[a]!==l&&ru(e,a,l)}else for(var i in t)t.hasOwnProperty(i)&&ru(e,i,t[i])}function _r(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 Rh=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"]]),Lh=/^[\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 no(e){return Lh.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Vn(){}var Or=null;function Rr(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var da=null,ha=null;function su(e){var t=ze(e);if(t&&(e=t.stateNode)){var n=e[gt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Dr(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="'+dn(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var l=n[t];if(l!==e&&l.form===e.form){var a=l[gt]||null;if(!a)throw Error(u(90));Dr(l,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)l=n[t],l.form===e.form&&lu(l)}break e;case"textarea":iu(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&ua(e,!!n.multiple,t,!1)}}}var Lr=!1;function uu(e,t,n){if(Lr)return e(t,n);Lr=!0;try{var l=e(t);return l}finally{if(Lr=!1,(da!==null||ha!==null)&&(Xo(),da&&(t=da,e=ha,ha=da=null,su(t),e)))for(t=0;t<e.length;t++)su(e[t])}}function $a(e,t){var n=e.stateNode;if(n===null)return null;var l=n[gt]||null;if(l===null)return null;n=l[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":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(u(231,t,typeof n));return n}var Xn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ur=!1;if(Xn)try{var Wa={};Object.defineProperty(Wa,"passive",{get:function(){Ur=!0}}),window.addEventListener("test",Wa,Wa),window.removeEventListener("test",Wa,Wa)}catch{Ur=!1}var fl=null,Nr=null,lo=null;function fu(){if(lo)return lo;var e,t=Nr,n=t.length,l,a="value"in fl?fl.value:fl.textContent,i=a.length;for(e=0;e<n&&t[e]===a[e];e++);var r=n-e;for(l=1;l<=r&&t[n-l]===a[i-l];l++);return lo=a.slice(e,1<l?1-l:void 0)}function ao(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 io(){return!0}function du(){return!1}function Vt(e){function t(n,l,a,i,r){this._reactName=n,this._targetInst=a,this.type=l,this.nativeEvent=i,this.target=r,this.currentTarget=null;for(var d in e)e.hasOwnProperty(d)&&(n=e[d],this[d]=n?n(i):i[d]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?io:du,this.isPropagationStopped=du,this}return H(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=io)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=io)},persist:function(){},isPersistent:io}),t}var jl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},oo=Vt(jl),Ia=H({},jl,{view:0,detail:0}),Uh=Vt(Ia),Hr,Br,Pa,ro=H({},Ia,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:qr,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!==Pa&&(Pa&&e.type==="mousemove"?(Hr=e.screenX-Pa.screenX,Br=e.screenY-Pa.screenY):Br=Hr=0,Pa=e),Hr)},movementY:function(e){return"movementY"in e?e.movementY:Br}}),hu=Vt(ro),Nh=H({},ro,{dataTransfer:0}),Hh=Vt(Nh),Bh=H({},Ia,{relatedTarget:0}),jr=Vt(Bh),jh=H({},jl,{animationName:0,elapsedTime:0,pseudoElement:0}),qh=Vt(jh),Yh=H({},jl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Gh=Vt(Yh),Vh=H({},jl,{data:0}),pu=Vt(Vh),Xh={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Qh={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"},Zh={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Kh(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Zh[e])?!!t[e]:!1}function qr(){return Kh}var Jh=H({},Ia,{key:function(e){if(e.key){var t=Xh[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ao(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Qh[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:qr,charCode:function(e){return e.type==="keypress"?ao(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ao(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Fh=Vt(Jh),$h=H({},ro,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),mu=Vt($h),Wh=H({},Ia,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:qr}),Ih=Vt(Wh),Ph=H({},jl,{propertyName:0,elapsedTime:0,pseudoElement:0}),ep=Vt(Ph),tp=H({},ro,{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}),np=Vt(tp),lp=H({},jl,{newState:0,oldState:0}),ap=Vt(lp),ip=[9,13,27,32],Yr=Xn&&"CompositionEvent"in window,ei=null;Xn&&"documentMode"in document&&(ei=document.documentMode);var op=Xn&&"TextEvent"in window&&!ei,gu=Xn&&(!Yr||ei&&8<ei&&11>=ei),yu=" ",vu=!1;function bu(e,t){switch(e){case"keyup":return ip.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function xu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var pa=!1;function rp(e,t){switch(e){case"compositionend":return xu(t);case"keypress":return t.which!==32?null:(vu=!0,yu);case"textInput":return e=t.data,e===yu&&vu?null:e;default:return null}}function cp(e,t){if(pa)return e==="compositionend"||!Yr&&bu(e,t)?(e=fu(),lo=Nr=fl=null,pa=!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 gu&&t.locale!=="ko"?null:t.data;default:return null}}var sp={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 Su(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!sp[e.type]:t==="textarea"}function Cu(e,t,n,l){da?ha?ha.push(l):ha=[l]:da=l,t=Wo(t,"onChange"),0<t.length&&(n=new oo("onChange","change",null,n,l),e.push({event:n,listeners:t}))}var ti=null,ni=null;function up(e){i0(e,0)}function co(e){var t=se(e);if(lu(t))return e}function wu(e,t){if(e==="change")return t}var zu=!1;if(Xn){var Gr;if(Xn){var Vr="oninput"in document;if(!Vr){var Mu=document.createElement("div");Mu.setAttribute("oninput","return;"),Vr=typeof Mu.oninput=="function"}Gr=Vr}else Gr=!1;zu=Gr&&(!document.documentMode||9<document.documentMode)}function Tu(){ti&&(ti.detachEvent("onpropertychange",Au),ni=ti=null)}function Au(e){if(e.propertyName==="value"&&co(ni)){var t=[];Cu(t,ni,e,Rr(e)),uu(up,t)}}function fp(e,t,n){e==="focusin"?(Tu(),ti=t,ni=n,ti.attachEvent("onpropertychange",Au)):e==="focusout"&&Tu()}function dp(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return co(ni)}function hp(e,t){if(e==="click")return co(t)}function pp(e,t){if(e==="input"||e==="change")return co(t)}function mp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var en=typeof Object.is=="function"?Object.is:mp;function li(e,t){if(en(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),l=Object.keys(t);if(n.length!==l.length)return!1;for(l=0;l<n.length;l++){var a=n[l];if(!rl.call(t,a)||!en(e[a],t[a]))return!1}return!0}function Eu(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Du(e,t){var n=Eu(e);e=0;for(var l;n;){if(n.nodeType===3){if(l=e+n.textContent.length,e<=t&&l>=t)return{node:n,offset:t-e};e=l}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Eu(n)}}function ku(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ku(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function _u(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=to(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=to(e.document)}return t}function Xr(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 gp=Xn&&"documentMode"in document&&11>=document.documentMode,ma=null,Qr=null,ai=null,Zr=!1;function Ou(e,t,n){var l=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Zr||ma==null||ma!==to(l)||(l=ma,"selectionStart"in l&&Xr(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),ai&&li(ai,l)||(ai=l,l=Wo(Qr,"onSelect"),0<l.length&&(t=new oo("onSelect","select",null,t,n),e.push({event:t,listeners:l}),t.target=ma)))}function ql(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var ga={animationend:ql("Animation","AnimationEnd"),animationiteration:ql("Animation","AnimationIteration"),animationstart:ql("Animation","AnimationStart"),transitionrun:ql("Transition","TransitionRun"),transitionstart:ql("Transition","TransitionStart"),transitioncancel:ql("Transition","TransitionCancel"),transitionend:ql("Transition","TransitionEnd")},Kr={},Ru={};Xn&&(Ru=document.createElement("div").style,"AnimationEvent"in window||(delete ga.animationend.animation,delete ga.animationiteration.animation,delete ga.animationstart.animation),"TransitionEvent"in window||delete ga.transitionend.transition);function Yl(e){if(Kr[e])return Kr[e];if(!ga[e])return e;var t=ga[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Ru)return Kr[e]=t[n];return e}var Lu=Yl("animationend"),Uu=Yl("animationiteration"),Nu=Yl("animationstart"),yp=Yl("transitionrun"),vp=Yl("transitionstart"),bp=Yl("transitioncancel"),Hu=Yl("transitionend"),Bu=new Map,Jr="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(" ");Jr.push("scrollEnd");function wn(e,t){Bu.set(e,t),ye(t,[e])}var so=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)},hn=[],ya=0,Fr=0;function uo(){for(var e=ya,t=Fr=ya=0;t<e;){var n=hn[t];hn[t++]=null;var l=hn[t];hn[t++]=null;var a=hn[t];hn[t++]=null;var i=hn[t];if(hn[t++]=null,l!==null&&a!==null){var r=l.pending;r===null?a.next=a:(a.next=r.next,r.next=a),l.pending=a}i!==0&&ju(n,a,i)}}function fo(e,t,n,l){hn[ya++]=e,hn[ya++]=t,hn[ya++]=n,hn[ya++]=l,Fr|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function $r(e,t,n,l){return fo(e,t,n,l),ho(e)}function Gl(e,t){return fo(e,null,null,t),ho(e)}function ju(e,t,n){e.lanes|=n;var l=e.alternate;l!==null&&(l.lanes|=n);for(var a=!1,i=e.return;i!==null;)i.childLanes|=n,l=i.alternate,l!==null&&(l.childLanes|=n),i.tag===22&&(e=i.stateNode,e===null||e._visibility&1||(a=!0)),e=i,i=i.return;return e.tag===3?(i=e.stateNode,a&&t!==null&&(a=31-jt(n),e=i.hiddenUpdates,l=e[a],l===null?e[a]=[t]:l.push(t),t.lane=n|536870912),i):null}function ho(e){if(50<Ti)throw Ti=0,is=null,Error(u(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var va={};function xp(e,t,n,l){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=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function tn(e,t,n,l){return new xp(e,t,n,l)}function Wr(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Qn(e,t){var n=e.alternate;return n===null?(n=tn(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 qu(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 po(e,t,n,l,a,i){var r=0;if(l=e,typeof e=="function")Wr(e)&&(r=1);else if(typeof e=="string")r=Mm(e,n,$.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Se:return e=tn(31,n,t,a),e.elementType=Se,e.lanes=i,e;case Y:return Vl(n.children,a,i,t);case be:r=8,a|=24;break;case W:return e=tn(12,n,t,a|2),e.elementType=W,e.lanes=i,e;case q:return e=tn(13,n,t,a),e.elementType=q,e.lanes=i,e;case J:return e=tn(19,n,t,a),e.elementType=J,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ne:r=10;break e;case he:r=9;break e;case oe:r=11;break e;case L:r=14;break e;case fe:r=16,l=null;break e}r=29,n=Error(u(130,e===null?"null":typeof e,"")),l=null}return t=tn(r,n,t,a),t.elementType=e,t.type=l,t.lanes=i,t}function Vl(e,t,n,l){return e=tn(7,e,l,t),e.lanes=n,e}function Ir(e,t,n){return e=tn(6,e,null,t),e.lanes=n,e}function Yu(e){var t=tn(18,null,null,0);return t.stateNode=e,t}function Pr(e,t,n){return t=tn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Gu=new WeakMap;function pn(e,t){if(typeof e=="object"&&e!==null){var n=Gu.get(e);return n!==void 0?n:(t={value:e,source:t,stack:Tn(t)},Gu.set(e,t),t)}return{value:e,source:t,stack:Tn(t)}}var ba=[],xa=0,mo=null,ii=0,mn=[],gn=0,dl=null,_n=1,On="";function Zn(e,t){ba[xa++]=ii,ba[xa++]=mo,mo=e,ii=t}function Vu(e,t,n){mn[gn++]=_n,mn[gn++]=On,mn[gn++]=dl,dl=e;var l=_n;e=On;var a=32-jt(l)-1;l&=~(1<<a),n+=1;var i=32-jt(t)+a;if(30<i){var r=a-a%5;i=(l&(1<<r)-1).toString(32),l>>=r,a-=r,_n=1<<32-jt(t)+a|n<<a|l,On=i+e}else _n=1<<i|n<<a|l,On=e}function ec(e){e.return!==null&&(Zn(e,1),Vu(e,1,0))}function tc(e){for(;e===mo;)mo=ba[--xa],ba[xa]=null,ii=ba[--xa],ba[xa]=null;for(;e===dl;)dl=mn[--gn],mn[gn]=null,On=mn[--gn],mn[gn]=null,_n=mn[--gn],mn[gn]=null}function Xu(e,t){mn[gn++]=_n,mn[gn++]=On,mn[gn++]=dl,_n=t.id,On=t.overflow,dl=e}var Dt=null,ot=null,Xe=!1,hl=null,yn=!1,nc=Error(u(519));function pl(e){var t=Error(u(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw oi(pn(t,e)),nc}function Qu(e){var t=e.stateNode,n=e.type,l=e.memoizedProps;switch(t[xt]=e,t[gt]=l,n){case"dialog":qe("cancel",t),qe("close",t);break;case"iframe":case"object":case"embed":qe("load",t);break;case"video":case"audio":for(n=0;n<Ei.length;n++)qe(Ei[n],t);break;case"source":qe("error",t);break;case"img":case"image":case"link":qe("error",t),qe("load",t);break;case"details":qe("toggle",t);break;case"input":qe("invalid",t),au(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":qe("invalid",t);break;case"textarea":qe("invalid",t),ou(t,l.value,l.defaultValue,l.children)}n=l.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||l.suppressHydrationWarning===!0||s0(t.textContent,n)?(l.popover!=null&&(qe("beforetoggle",t),qe("toggle",t)),l.onScroll!=null&&qe("scroll",t),l.onScrollEnd!=null&&qe("scrollend",t),l.onClick!=null&&(t.onclick=Vn),t=!0):t=!1,t||pl(e,!0)}function Zu(e){for(Dt=e.return;Dt;)switch(Dt.tag){case 5:case 31:case 13:yn=!1;return;case 27:case 3:yn=!0;return;default:Dt=Dt.return}}function Sa(e){if(e!==Dt)return!1;if(!Xe)return Zu(e),Xe=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||xs(e.type,e.memoizedProps)),n=!n),n&&ot&&pl(e),Zu(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));ot=v0(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));ot=v0(e)}else t===27?(t=ot,El(e.type)?(e=Ms,Ms=null,ot=e):ot=t):ot=Dt?bn(e.stateNode.nextSibling):null;return!0}function Xl(){ot=Dt=null,Xe=!1}function lc(){var e=hl;return e!==null&&(Kt===null?Kt=e:Kt.push.apply(Kt,e),hl=null),e}function oi(e){hl===null?hl=[e]:hl.push(e)}var ac=y(null),Ql=null,Kn=null;function ml(e,t,n){V(ac,t._currentValue),t._currentValue=n}function Jn(e){e._currentValue=ac.current,E(ac)}function ic(e,t,n){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===n)break;e=e.return}}function oc(e,t,n,l){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var i=a.dependencies;if(i!==null){var r=a.child;i=i.firstContext;e:for(;i!==null;){var d=i;i=a;for(var g=0;g<t.length;g++)if(d.context===t[g]){i.lanes|=n,d=i.alternate,d!==null&&(d.lanes|=n),ic(i.return,n,e),l||(r=null);break e}i=d.next}}else if(a.tag===18){if(r=a.return,r===null)throw Error(u(341));r.lanes|=n,i=r.alternate,i!==null&&(i.lanes|=n),ic(r,n,e),r=null}else r=a.child;if(r!==null)r.return=a;else for(r=a;r!==null;){if(r===e){r=null;break}if(a=r.sibling,a!==null){a.return=r.return,r=a;break}r=r.return}a=r}}function Ca(e,t,n,l){e=null;for(var a=t,i=!1;a!==null;){if(!i){if((a.flags&524288)!==0)i=!0;else if((a.flags&262144)!==0)break}if(a.tag===10){var r=a.alternate;if(r===null)throw Error(u(387));if(r=r.memoizedProps,r!==null){var d=a.type;en(a.pendingProps.value,r.value)||(e!==null?e.push(d):e=[d])}}else if(a===pe.current){if(r=a.alternate,r===null)throw Error(u(387));r.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e!==null?e.push(Ri):e=[Ri])}a=a.return}e!==null&&oc(t,e,n,l),t.flags|=262144}function go(e){for(e=e.firstContext;e!==null;){if(!en(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Zl(e){Ql=e,Kn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function kt(e){return Ku(Ql,e)}function yo(e,t){return Ql===null&&Zl(e),Ku(e,t)}function Ku(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Kn===null){if(e===null)throw Error(u(308));Kn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Kn=Kn.next=t;return n}var Sp=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},Cp=o.unstable_scheduleCallback,wp=o.unstable_NormalPriority,St={$$typeof:ne,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function rc(){return{controller:new Sp,data:new Map,refCount:0}}function ri(e){e.refCount--,e.refCount===0&&Cp(wp,function(){e.controller.abort()})}var ci=null,cc=0,wa=0,za=null;function zp(e,t){if(ci===null){var n=ci=[];cc=0,wa=fs(),za={status:"pending",value:void 0,then:function(l){n.push(l)}}}return cc++,t.then(Ju,Ju),t}function Ju(){if(--cc===0&&ci!==null){za!==null&&(za.status="fulfilled");var e=ci;ci=null,wa=0,za=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Mp(e,t){var n=[],l={status:"pending",value:null,reason:null,then:function(a){n.push(a)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var a=0;a<n.length;a++)(0,n[a])(t)},function(a){for(l.status="rejected",l.reason=a,a=0;a<n.length;a++)(0,n[a])(void 0)}),l}var Fu=T.S;T.S=function(e,t){Rd=Ut(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&zp(e,t),Fu!==null&&Fu(e,t)};var Kl=y(null);function sc(){var e=Kl.current;return e!==null?e:lt.pooledCache}function vo(e,t){t===null?V(Kl,Kl.current):V(Kl,t.pool)}function $u(){var e=sc();return e===null?null:{parent:St._currentValue,pool:e}}var Ma=Error(u(460)),uc=Error(u(474)),bo=Error(u(542)),xo={then:function(){}};function Wu(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Iu(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Vn,Vn),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,ef(e),e;default:if(typeof t.status=="string")t.then(Vn,Vn);else{if(e=lt,e!==null&&100<e.shellSuspendCounter)throw Error(u(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var a=t;a.status="fulfilled",a.value=l}},function(l){if(t.status==="pending"){var a=t;a.status="rejected",a.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,ef(e),e}throw Fl=t,Ma}}function Jl(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(Fl=n,Ma):n}}var Fl=null;function Pu(){if(Fl===null)throw Error(u(459));var e=Fl;return Fl=null,e}function ef(e){if(e===Ma||e===bo)throw Error(u(483))}var Ta=null,si=0;function So(e){var t=si;return si+=1,Ta===null&&(Ta=[]),Iu(Ta,e,t)}function ui(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Co(e,t){throw t.$$typeof===Q?Error(u(525)):(e=Object.prototype.toString.call(t),Error(u(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function tf(e){function t(C,v){if(e){var z=C.deletions;z===null?(C.deletions=[v],C.flags|=16):z.push(v)}}function n(C,v){if(!e)return null;for(;v!==null;)t(C,v),v=v.sibling;return null}function l(C){for(var v=new Map;C!==null;)C.key!==null?v.set(C.key,C):v.set(C.index,C),C=C.sibling;return v}function a(C,v){return C=Qn(C,v),C.index=0,C.sibling=null,C}function i(C,v,z){return C.index=z,e?(z=C.alternate,z!==null?(z=z.index,z<v?(C.flags|=67108866,v):z):(C.flags|=67108866,v)):(C.flags|=1048576,v)}function r(C){return e&&C.alternate===null&&(C.flags|=67108866),C}function d(C,v,z,N){return v===null||v.tag!==6?(v=Ir(z,C.mode,N),v.return=C,v):(v=a(v,z),v.return=C,v)}function g(C,v,z,N){var ve=z.type;return ve===Y?O(C,v,z.props.children,N,z.key):v!==null&&(v.elementType===ve||typeof ve=="object"&&ve!==null&&ve.$$typeof===fe&&Jl(ve)===v.type)?(v=a(v,z.props),ui(v,z),v.return=C,v):(v=po(z.type,z.key,z.props,null,C.mode,N),ui(v,z),v.return=C,v)}function M(C,v,z,N){return v===null||v.tag!==4||v.stateNode.containerInfo!==z.containerInfo||v.stateNode.implementation!==z.implementation?(v=Pr(z,C.mode,N),v.return=C,v):(v=a(v,z.children||[]),v.return=C,v)}function O(C,v,z,N,ve){return v===null||v.tag!==7?(v=Vl(z,C.mode,N,ve),v.return=C,v):(v=a(v,z),v.return=C,v)}function B(C,v,z){if(typeof v=="string"&&v!==""||typeof v=="number"||typeof v=="bigint")return v=Ir(""+v,C.mode,z),v.return=C,v;if(typeof v=="object"&&v!==null){switch(v.$$typeof){case le:return z=po(v.type,v.key,v.props,null,C.mode,z),ui(z,v),z.return=C,z;case U:return v=Pr(v,C.mode,z),v.return=C,v;case fe:return v=Jl(v),B(C,v,z)}if(Ye(v)||Te(v))return v=Vl(v,C.mode,z,null),v.return=C,v;if(typeof v.then=="function")return B(C,So(v),z);if(v.$$typeof===ne)return B(C,yo(C,v),z);Co(C,v)}return null}function A(C,v,z,N){var ve=v!==null?v.key:null;if(typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint")return ve!==null?null:d(C,v,""+z,N);if(typeof z=="object"&&z!==null){switch(z.$$typeof){case le:return z.key===ve?g(C,v,z,N):null;case U:return z.key===ve?M(C,v,z,N):null;case fe:return z=Jl(z),A(C,v,z,N)}if(Ye(z)||Te(z))return ve!==null?null:O(C,v,z,N,null);if(typeof z.then=="function")return A(C,v,So(z),N);if(z.$$typeof===ne)return A(C,v,yo(C,z),N);Co(C,z)}return null}function D(C,v,z,N,ve){if(typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint")return C=C.get(z)||null,d(v,C,""+N,ve);if(typeof N=="object"&&N!==null){switch(N.$$typeof){case le:return C=C.get(N.key===null?z:N.key)||null,g(v,C,N,ve);case U:return C=C.get(N.key===null?z:N.key)||null,M(v,C,N,ve);case fe:return N=Jl(N),D(C,v,z,N,ve)}if(Ye(N)||Te(N))return C=C.get(z)||null,O(v,C,N,ve,null);if(typeof N.then=="function")return D(C,v,z,So(N),ve);if(N.$$typeof===ne)return D(C,v,z,yo(v,N),ve);Co(v,N)}return null}function ae(C,v,z,N){for(var ve=null,Qe=null,ce=v,Be=v=0,Ve=null;ce!==null&&Be<z.length;Be++){ce.index>Be?(Ve=ce,ce=null):Ve=ce.sibling;var Ze=A(C,ce,z[Be],N);if(Ze===null){ce===null&&(ce=Ve);break}e&&ce&&Ze.alternate===null&&t(C,ce),v=i(Ze,v,Be),Qe===null?ve=Ze:Qe.sibling=Ze,Qe=Ze,ce=Ve}if(Be===z.length)return n(C,ce),Xe&&Zn(C,Be),ve;if(ce===null){for(;Be<z.length;Be++)ce=B(C,z[Be],N),ce!==null&&(v=i(ce,v,Be),Qe===null?ve=ce:Qe.sibling=ce,Qe=ce);return Xe&&Zn(C,Be),ve}for(ce=l(ce);Be<z.length;Be++)Ve=D(ce,C,Be,z[Be],N),Ve!==null&&(e&&Ve.alternate!==null&&ce.delete(Ve.key===null?Be:Ve.key),v=i(Ve,v,Be),Qe===null?ve=Ve:Qe.sibling=Ve,Qe=Ve);return e&&ce.forEach(function(Rl){return t(C,Rl)}),Xe&&Zn(C,Be),ve}function Ce(C,v,z,N){if(z==null)throw Error(u(151));for(var ve=null,Qe=null,ce=v,Be=v=0,Ve=null,Ze=z.next();ce!==null&&!Ze.done;Be++,Ze=z.next()){ce.index>Be?(Ve=ce,ce=null):Ve=ce.sibling;var Rl=A(C,ce,Ze.value,N);if(Rl===null){ce===null&&(ce=Ve);break}e&&ce&&Rl.alternate===null&&t(C,ce),v=i(Rl,v,Be),Qe===null?ve=Rl:Qe.sibling=Rl,Qe=Rl,ce=Ve}if(Ze.done)return n(C,ce),Xe&&Zn(C,Be),ve;if(ce===null){for(;!Ze.done;Be++,Ze=z.next())Ze=B(C,Ze.value,N),Ze!==null&&(v=i(Ze,v,Be),Qe===null?ve=Ze:Qe.sibling=Ze,Qe=Ze);return Xe&&Zn(C,Be),ve}for(ce=l(ce);!Ze.done;Be++,Ze=z.next())Ze=D(ce,C,Be,Ze.value,N),Ze!==null&&(e&&Ze.alternate!==null&&ce.delete(Ze.key===null?Be:Ze.key),v=i(Ze,v,Be),Qe===null?ve=Ze:Qe.sibling=Ze,Qe=Ze);return e&&ce.forEach(function(Nm){return t(C,Nm)}),Xe&&Zn(C,Be),ve}function nt(C,v,z,N){if(typeof z=="object"&&z!==null&&z.type===Y&&z.key===null&&(z=z.props.children),typeof z=="object"&&z!==null){switch(z.$$typeof){case le:e:{for(var ve=z.key;v!==null;){if(v.key===ve){if(ve=z.type,ve===Y){if(v.tag===7){n(C,v.sibling),N=a(v,z.props.children),N.return=C,C=N;break e}}else if(v.elementType===ve||typeof ve=="object"&&ve!==null&&ve.$$typeof===fe&&Jl(ve)===v.type){n(C,v.sibling),N=a(v,z.props),ui(N,z),N.return=C,C=N;break e}n(C,v);break}else t(C,v);v=v.sibling}z.type===Y?(N=Vl(z.props.children,C.mode,N,z.key),N.return=C,C=N):(N=po(z.type,z.key,z.props,null,C.mode,N),ui(N,z),N.return=C,C=N)}return r(C);case U:e:{for(ve=z.key;v!==null;){if(v.key===ve)if(v.tag===4&&v.stateNode.containerInfo===z.containerInfo&&v.stateNode.implementation===z.implementation){n(C,v.sibling),N=a(v,z.children||[]),N.return=C,C=N;break e}else{n(C,v);break}else t(C,v);v=v.sibling}N=Pr(z,C.mode,N),N.return=C,C=N}return r(C);case fe:return z=Jl(z),nt(C,v,z,N)}if(Ye(z))return ae(C,v,z,N);if(Te(z)){if(ve=Te(z),typeof ve!="function")throw Error(u(150));return z=ve.call(z),Ce(C,v,z,N)}if(typeof z.then=="function")return nt(C,v,So(z),N);if(z.$$typeof===ne)return nt(C,v,yo(C,z),N);Co(C,z)}return typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint"?(z=""+z,v!==null&&v.tag===6?(n(C,v.sibling),N=a(v,z),N.return=C,C=N):(n(C,v),N=Ir(z,C.mode,N),N.return=C,C=N),r(C)):n(C,v)}return function(C,v,z,N){try{si=0;var ve=nt(C,v,z,N);return Ta=null,ve}catch(ce){if(ce===Ma||ce===bo)throw ce;var Qe=tn(29,ce,null,C.mode);return Qe.lanes=N,Qe.return=C,Qe}}}var $l=tf(!0),nf=tf(!1),gl=!1;function fc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function dc(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 yl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function vl(e,t,n){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Ke&2)!==0){var a=l.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),l.pending=t,t=ho(e),ju(e,null,n),t}return fo(e,l,t,n),ho(e)}function fi(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,Pi(e,n)}}function hc(e,t){var n=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,n===l)){var a=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var r={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};i===null?a=i=r:i=i.next=r,n=n.next}while(n!==null);i===null?a=i=t:i=i.next=t}else a=i=t;n={baseState:l.baseState,firstBaseUpdate:a,lastBaseUpdate:i,shared:l.shared,callbacks:l.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var pc=!1;function di(){if(pc){var e=za;if(e!==null)throw e}}function hi(e,t,n,l){pc=!1;var a=e.updateQueue;gl=!1;var i=a.firstBaseUpdate,r=a.lastBaseUpdate,d=a.shared.pending;if(d!==null){a.shared.pending=null;var g=d,M=g.next;g.next=null,r===null?i=M:r.next=M,r=g;var O=e.alternate;O!==null&&(O=O.updateQueue,d=O.lastBaseUpdate,d!==r&&(d===null?O.firstBaseUpdate=M:d.next=M,O.lastBaseUpdate=g))}if(i!==null){var B=a.baseState;r=0,O=M=g=null,d=i;do{var A=d.lane&-536870913,D=A!==d.lane;if(D?(Ge&A)===A:(l&A)===A){A!==0&&A===wa&&(pc=!0),O!==null&&(O=O.next={lane:0,tag:d.tag,payload:d.payload,callback:null,next:null});e:{var ae=e,Ce=d;A=t;var nt=n;switch(Ce.tag){case 1:if(ae=Ce.payload,typeof ae=="function"){B=ae.call(nt,B,A);break e}B=ae;break e;case 3:ae.flags=ae.flags&-65537|128;case 0:if(ae=Ce.payload,A=typeof ae=="function"?ae.call(nt,B,A):ae,A==null)break e;B=H({},B,A);break e;case 2:gl=!0}}A=d.callback,A!==null&&(e.flags|=64,D&&(e.flags|=8192),D=a.callbacks,D===null?a.callbacks=[A]:D.push(A))}else D={lane:A,tag:d.tag,payload:d.payload,callback:d.callback,next:null},O===null?(M=O=D,g=B):O=O.next=D,r|=A;if(d=d.next,d===null){if(d=a.shared.pending,d===null)break;D=d,d=D.next,D.next=null,a.lastBaseUpdate=D,a.shared.pending=null}}while(!0);O===null&&(g=B),a.baseState=g,a.firstBaseUpdate=M,a.lastBaseUpdate=O,i===null&&(a.shared.lanes=0),wl|=r,e.lanes=r,e.memoizedState=B}}function lf(e,t){if(typeof e!="function")throw Error(u(191,e));e.call(t)}function af(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)lf(n[e],t)}var Aa=y(null),wo=y(0);function of(e,t){e=ll,V(wo,e),V(Aa,t),ll=e|t.baseLanes}function mc(){V(wo,ll),V(Aa,Aa.current)}function gc(){ll=wo.current,E(Aa),E(wo)}var nn=y(null),vn=null;function bl(e){var t=e.alternate;V(yt,yt.current&1),V(nn,e),vn===null&&(t===null||Aa.current!==null||t.memoizedState!==null)&&(vn=e)}function yc(e){V(yt,yt.current),V(nn,e),vn===null&&(vn=e)}function rf(e){e.tag===22?(V(yt,yt.current),V(nn,e),vn===null&&(vn=e)):xl()}function xl(){V(yt,yt.current),V(nn,nn.current)}function ln(e){E(nn),vn===e&&(vn=null),E(yt)}var yt=y(0);function zo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||ws(n)||zs(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 Fn=0,Ue=null,et=null,Ct=null,Mo=!1,Ea=!1,Wl=!1,To=0,pi=0,Da=null,Tp=0;function ht(){throw Error(u(321))}function vc(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!en(e[n],t[n]))return!1;return!0}function bc(e,t,n,l,a,i){return Fn=i,Ue=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,T.H=e===null||e.memoizedState===null?Xf:Lc,Wl=!1,i=n(l,a),Wl=!1,Ea&&(i=sf(t,n,l,a)),cf(e),i}function cf(e){T.H=yi;var t=et!==null&&et.next!==null;if(Fn=0,Ct=et=Ue=null,Mo=!1,pi=0,Da=null,t)throw Error(u(300));e===null||wt||(e=e.dependencies,e!==null&&go(e)&&(wt=!0))}function sf(e,t,n,l){Ue=e;var a=0;do{if(Ea&&(Da=null),pi=0,Ea=!1,25<=a)throw Error(u(301));if(a+=1,Ct=et=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}T.H=Qf,i=t(n,l)}while(Ea);return i}function Ap(){var e=T.H,t=e.useState()[0];return t=typeof t.then=="function"?mi(t):t,e=e.useState()[0],(et!==null?et.memoizedState:null)!==e&&(Ue.flags|=1024),t}function xc(){var e=To!==0;return To=0,e}function Sc(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Cc(e){if(Mo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Mo=!1}Fn=0,Ct=et=Ue=null,Ea=!1,pi=To=0,Da=null}function Yt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ct===null?Ue.memoizedState=Ct=e:Ct=Ct.next=e,Ct}function vt(){if(et===null){var e=Ue.alternate;e=e!==null?e.memoizedState:null}else e=et.next;var t=Ct===null?Ue.memoizedState:Ct.next;if(t!==null)Ct=t,et=e;else{if(e===null)throw Ue.alternate===null?Error(u(467)):Error(u(310));et=e,e={memoizedState:et.memoizedState,baseState:et.baseState,baseQueue:et.baseQueue,queue:et.queue,next:null},Ct===null?Ue.memoizedState=Ct=e:Ct=Ct.next=e}return Ct}function Ao(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function mi(e){var t=pi;return pi+=1,Da===null&&(Da=[]),e=Iu(Da,e,t),t=Ue,(Ct===null?t.memoizedState:Ct.next)===null&&(t=t.alternate,T.H=t===null||t.memoizedState===null?Xf:Lc),e}function Eo(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return mi(e);if(e.$$typeof===ne)return kt(e)}throw Error(u(438,String(e)))}function wc(e){var t=null,n=Ue.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var l=Ue.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(a){return a.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=Ao(),Ue.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),l=0;l<e;l++)n[l]=ke;return t.index++,n}function $n(e,t){return typeof t=="function"?t(e):t}function Do(e){var t=vt();return zc(t,et,e)}function zc(e,t,n){var l=e.queue;if(l===null)throw Error(u(311));l.lastRenderedReducer=n;var a=e.baseQueue,i=l.pending;if(i!==null){if(a!==null){var r=a.next;a.next=i.next,i.next=r}t.baseQueue=a=i,l.pending=null}if(i=e.baseState,a===null)e.memoizedState=i;else{t=a.next;var d=r=null,g=null,M=t,O=!1;do{var B=M.lane&-536870913;if(B!==M.lane?(Ge&B)===B:(Fn&B)===B){var A=M.revertLane;if(A===0)g!==null&&(g=g.next={lane:0,revertLane:0,gesture:null,action:M.action,hasEagerState:M.hasEagerState,eagerState:M.eagerState,next:null}),B===wa&&(O=!0);else if((Fn&A)===A){M=M.next,A===wa&&(O=!0);continue}else B={lane:0,revertLane:M.revertLane,gesture:null,action:M.action,hasEagerState:M.hasEagerState,eagerState:M.eagerState,next:null},g===null?(d=g=B,r=i):g=g.next=B,Ue.lanes|=A,wl|=A;B=M.action,Wl&&n(i,B),i=M.hasEagerState?M.eagerState:n(i,B)}else A={lane:B,revertLane:M.revertLane,gesture:M.gesture,action:M.action,hasEagerState:M.hasEagerState,eagerState:M.eagerState,next:null},g===null?(d=g=A,r=i):g=g.next=A,Ue.lanes|=B,wl|=B;M=M.next}while(M!==null&&M!==t);if(g===null?r=i:g.next=d,!en(i,e.memoizedState)&&(wt=!0,O&&(n=za,n!==null)))throw n;e.memoizedState=i,e.baseState=r,e.baseQueue=g,l.lastRenderedState=i}return a===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function Mc(e){var t=vt(),n=t.queue;if(n===null)throw Error(u(311));n.lastRenderedReducer=e;var l=n.dispatch,a=n.pending,i=t.memoizedState;if(a!==null){n.pending=null;var r=a=a.next;do i=e(i,r.action),r=r.next;while(r!==a);en(i,t.memoizedState)||(wt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,l]}function uf(e,t,n){var l=Ue,a=vt(),i=Xe;if(i){if(n===void 0)throw Error(u(407));n=n()}else n=t();var r=!en((et||a).memoizedState,n);if(r&&(a.memoizedState=n,wt=!0),a=a.queue,Ec(hf.bind(null,l,a,e),[e]),a.getSnapshot!==t||r||Ct!==null&&Ct.memoizedState.tag&1){if(l.flags|=2048,ka(9,{destroy:void 0},df.bind(null,l,a,n,t),null),lt===null)throw Error(u(349));i||(Fn&127)!==0||ff(l,t,n)}return n}function ff(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ue.updateQueue,t===null?(t=Ao(),Ue.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function df(e,t,n,l){t.value=n,t.getSnapshot=l,pf(t)&&mf(e)}function hf(e,t,n){return n(function(){pf(t)&&mf(e)})}function pf(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!en(e,n)}catch{return!0}}function mf(e){var t=Gl(e,2);t!==null&&Jt(t,e,2)}function Tc(e){var t=Yt();if(typeof e=="function"){var n=e;if(e=n(),Wl){Dn(!0);try{n()}finally{Dn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:$n,lastRenderedState:e},t}function gf(e,t,n,l){return e.baseState=n,zc(e,et,typeof l=="function"?l:$n)}function Ep(e,t,n,l,a){if(Oo(e))throw Error(u(485));if(e=t.action,e!==null){var i={payload:a,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(r){i.listeners.push(r)}};T.T!==null?n(!0):i.isTransition=!1,l(i),n=t.pending,n===null?(i.next=t.pending=i,yf(t,i)):(i.next=n.next,t.pending=n.next=i)}}function yf(e,t){var n=t.action,l=t.payload,a=e.state;if(t.isTransition){var i=T.T,r={};T.T=r;try{var d=n(a,l),g=T.S;g!==null&&g(r,d),vf(e,t,d)}catch(M){Ac(e,t,M)}finally{i!==null&&r.types!==null&&(i.types=r.types),T.T=i}}else try{i=n(a,l),vf(e,t,i)}catch(M){Ac(e,t,M)}}function vf(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(l){bf(e,t,l)},function(l){return Ac(e,t,l)}):bf(e,t,n)}function bf(e,t,n){t.status="fulfilled",t.value=n,xf(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,yf(e,n)))}function Ac(e,t,n){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=n,xf(t),t=t.next;while(t!==l)}e.action=null}function xf(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Sf(e,t){return t}function Cf(e,t){if(Xe){var n=lt.formState;if(n!==null){e:{var l=Ue;if(Xe){if(ot){t:{for(var a=ot,i=yn;a.nodeType!==8;){if(!i){a=null;break t}if(a=bn(a.nextSibling),a===null){a=null;break t}}i=a.data,a=i==="F!"||i==="F"?a:null}if(a){ot=bn(a.nextSibling),l=a.data==="F!";break e}}pl(l)}l=!1}l&&(t=n[0])}}return n=Yt(),n.memoizedState=n.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sf,lastRenderedState:t},n.queue=l,n=Yf.bind(null,Ue,l),l.dispatch=n,l=Tc(!1),i=Rc.bind(null,Ue,!1,l.queue),l=Yt(),a={state:t,dispatch:null,action:e,pending:null},l.queue=a,n=Ep.bind(null,Ue,a,i,n),a.dispatch=n,l.memoizedState=e,[t,n,!1]}function wf(e){var t=vt();return zf(t,et,e)}function zf(e,t,n){if(t=zc(e,t,Sf)[0],e=Do($n)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=mi(t)}catch(r){throw r===Ma?bo:r}else l=t;t=vt();var a=t.queue,i=a.dispatch;return n!==t.memoizedState&&(Ue.flags|=2048,ka(9,{destroy:void 0},Dp.bind(null,a,n),null)),[l,i,e]}function Dp(e,t){e.action=t}function Mf(e){var t=vt(),n=et;if(n!==null)return zf(t,n,e);vt(),t=t.memoizedState,n=vt();var l=n.queue.dispatch;return n.memoizedState=e,[t,l,!1]}function ka(e,t,n,l){return e={tag:e,create:n,deps:l,inst:t,next:null},t=Ue.updateQueue,t===null&&(t=Ao(),Ue.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(l=n.next,n.next=e,e.next=l,t.lastEffect=e),e}function Tf(){return vt().memoizedState}function ko(e,t,n,l){var a=Yt();Ue.flags|=e,a.memoizedState=ka(1|t,{destroy:void 0},n,l===void 0?null:l)}function _o(e,t,n,l){var a=vt();l=l===void 0?null:l;var i=a.memoizedState.inst;et!==null&&l!==null&&vc(l,et.memoizedState.deps)?a.memoizedState=ka(t,i,n,l):(Ue.flags|=e,a.memoizedState=ka(1|t,i,n,l))}function Af(e,t){ko(8390656,8,e,t)}function Ec(e,t){_o(2048,8,e,t)}function kp(e){Ue.flags|=4;var t=Ue.updateQueue;if(t===null)t=Ao(),Ue.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Ef(e){var t=vt().memoizedState;return kp({ref:t,nextImpl:e}),function(){if((Ke&2)!==0)throw Error(u(440));return t.impl.apply(void 0,arguments)}}function Df(e,t){return _o(4,2,e,t)}function kf(e,t){return _o(4,4,e,t)}function _f(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 Of(e,t,n){n=n!=null?n.concat([e]):null,_o(4,4,_f.bind(null,t,e),n)}function Dc(){}function Rf(e,t){var n=vt();t=t===void 0?null:t;var l=n.memoizedState;return t!==null&&vc(t,l[1])?l[0]:(n.memoizedState=[e,t],e)}function Lf(e,t){var n=vt();t=t===void 0?null:t;var l=n.memoizedState;if(t!==null&&vc(t,l[1]))return l[0];if(l=e(),Wl){Dn(!0);try{e()}finally{Dn(!1)}}return n.memoizedState=[l,t],l}function kc(e,t,n){return n===void 0||(Fn&1073741824)!==0&&(Ge&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=Ud(),Ue.lanes|=e,wl|=e,n)}function Uf(e,t,n,l){return en(n,t)?n:Aa.current!==null?(e=kc(e,n,l),en(e,t)||(wt=!0),e):(Fn&42)===0||(Fn&1073741824)!==0&&(Ge&261930)===0?(wt=!0,e.memoizedState=n):(e=Ud(),Ue.lanes|=e,wl|=e,t)}function Nf(e,t,n,l,a){var i=j.p;j.p=i!==0&&8>i?i:8;var r=T.T,d={};T.T=d,Rc(e,!1,t,n);try{var g=a(),M=T.S;if(M!==null&&M(d,g),g!==null&&typeof g=="object"&&typeof g.then=="function"){var O=Mp(g,l);gi(e,t,O,rn(e))}else gi(e,t,l,rn(e))}catch(B){gi(e,t,{then:function(){},status:"rejected",reason:B},rn())}finally{j.p=i,r!==null&&d.types!==null&&(r.types=d.types),T.T=r}}function _p(){}function _c(e,t,n,l){if(e.tag!==5)throw Error(u(476));var a=Hf(e).queue;Nf(e,a,t,P,n===null?_p:function(){return Bf(e),n(l)})}function Hf(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:P,baseState:P,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:$n,lastRenderedState:P},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:$n,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Bf(e){var t=Hf(e);t.next===null&&(t=e.alternate.memoizedState),gi(e,t.next.queue,{},rn())}function Oc(){return kt(Ri)}function jf(){return vt().memoizedState}function qf(){return vt().memoizedState}function Op(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=rn();e=yl(n);var l=vl(t,e,n);l!==null&&(Jt(l,t,n),fi(l,t,n)),t={cache:rc()},e.payload=t;return}t=t.return}}function Rp(e,t,n){var l=rn();n={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Oo(e)?Gf(t,n):(n=$r(e,t,n,l),n!==null&&(Jt(n,e,l),Vf(n,t,l)))}function Yf(e,t,n){var l=rn();gi(e,t,n,l)}function gi(e,t,n,l){var a={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Oo(e))Gf(t,a);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var r=t.lastRenderedState,d=i(r,n);if(a.hasEagerState=!0,a.eagerState=d,en(d,r))return fo(e,t,a,0),lt===null&&uo(),!1}catch{}if(n=$r(e,t,a,l),n!==null)return Jt(n,e,l),Vf(n,t,l),!0}return!1}function Rc(e,t,n,l){if(l={lane:2,revertLane:fs(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Oo(e)){if(t)throw Error(u(479))}else t=$r(e,n,l,2),t!==null&&Jt(t,e,2)}function Oo(e){var t=e.alternate;return e===Ue||t!==null&&t===Ue}function Gf(e,t){Ea=Mo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Vf(e,t,n){if((n&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,Pi(e,n)}}var yi={readContext:kt,use:Eo,useCallback:ht,useContext:ht,useEffect:ht,useImperativeHandle:ht,useLayoutEffect:ht,useInsertionEffect:ht,useMemo:ht,useReducer:ht,useRef:ht,useState:ht,useDebugValue:ht,useDeferredValue:ht,useTransition:ht,useSyncExternalStore:ht,useId:ht,useHostTransitionStatus:ht,useFormState:ht,useActionState:ht,useOptimistic:ht,useMemoCache:ht,useCacheRefresh:ht};yi.useEffectEvent=ht;var Xf={readContext:kt,use:Eo,useCallback:function(e,t){return Yt().memoizedState=[e,t===void 0?null:t],e},useContext:kt,useEffect:Af,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,ko(4194308,4,_f.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ko(4194308,4,e,t)},useInsertionEffect:function(e,t){ko(4,2,e,t)},useMemo:function(e,t){var n=Yt();t=t===void 0?null:t;var l=e();if(Wl){Dn(!0);try{e()}finally{Dn(!1)}}return n.memoizedState=[l,t],l},useReducer:function(e,t,n){var l=Yt();if(n!==void 0){var a=n(t);if(Wl){Dn(!0);try{n(t)}finally{Dn(!1)}}}else a=t;return l.memoizedState=l.baseState=a,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:a},l.queue=e,e=e.dispatch=Rp.bind(null,Ue,e),[l.memoizedState,e]},useRef:function(e){var t=Yt();return e={current:e},t.memoizedState=e},useState:function(e){e=Tc(e);var t=e.queue,n=Yf.bind(null,Ue,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Dc,useDeferredValue:function(e,t){var n=Yt();return kc(n,e,t)},useTransition:function(){var e=Tc(!1);return e=Nf.bind(null,Ue,e.queue,!0,!1),Yt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var l=Ue,a=Yt();if(Xe){if(n===void 0)throw Error(u(407));n=n()}else{if(n=t(),lt===null)throw Error(u(349));(Ge&127)!==0||ff(l,t,n)}a.memoizedState=n;var i={value:n,getSnapshot:t};return a.queue=i,Af(hf.bind(null,l,i,e),[e]),l.flags|=2048,ka(9,{destroy:void 0},df.bind(null,l,i,n,t),null),n},useId:function(){var e=Yt(),t=lt.identifierPrefix;if(Xe){var n=On,l=_n;n=(l&~(1<<32-jt(l)-1)).toString(32)+n,t="_"+t+"R_"+n,n=To++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=Tp++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Oc,useFormState:Cf,useActionState:Cf,useOptimistic:function(e){var t=Yt();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Rc.bind(null,Ue,!0,n),n.dispatch=t,[e,t]},useMemoCache:wc,useCacheRefresh:function(){return Yt().memoizedState=Op.bind(null,Ue)},useEffectEvent:function(e){var t=Yt(),n={impl:e};return t.memoizedState=n,function(){if((Ke&2)!==0)throw Error(u(440));return n.impl.apply(void 0,arguments)}}},Lc={readContext:kt,use:Eo,useCallback:Rf,useContext:kt,useEffect:Ec,useImperativeHandle:Of,useInsertionEffect:Df,useLayoutEffect:kf,useMemo:Lf,useReducer:Do,useRef:Tf,useState:function(){return Do($n)},useDebugValue:Dc,useDeferredValue:function(e,t){var n=vt();return Uf(n,et.memoizedState,e,t)},useTransition:function(){var e=Do($n)[0],t=vt().memoizedState;return[typeof e=="boolean"?e:mi(e),t]},useSyncExternalStore:uf,useId:jf,useHostTransitionStatus:Oc,useFormState:wf,useActionState:wf,useOptimistic:function(e,t){var n=vt();return gf(n,et,e,t)},useMemoCache:wc,useCacheRefresh:qf};Lc.useEffectEvent=Ef;var Qf={readContext:kt,use:Eo,useCallback:Rf,useContext:kt,useEffect:Ec,useImperativeHandle:Of,useInsertionEffect:Df,useLayoutEffect:kf,useMemo:Lf,useReducer:Mc,useRef:Tf,useState:function(){return Mc($n)},useDebugValue:Dc,useDeferredValue:function(e,t){var n=vt();return et===null?kc(n,e,t):Uf(n,et.memoizedState,e,t)},useTransition:function(){var e=Mc($n)[0],t=vt().memoizedState;return[typeof e=="boolean"?e:mi(e),t]},useSyncExternalStore:uf,useId:jf,useHostTransitionStatus:Oc,useFormState:Mf,useActionState:Mf,useOptimistic:function(e,t){var n=vt();return et!==null?gf(n,et,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:wc,useCacheRefresh:qf};Qf.useEffectEvent=Ef;function Uc(e,t,n,l){t=e.memoizedState,n=n(l,t),n=n==null?t:H({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Nc={enqueueSetState:function(e,t,n){e=e._reactInternals;var l=rn(),a=yl(l);a.payload=t,n!=null&&(a.callback=n),t=vl(e,a,l),t!==null&&(Jt(t,e,l),fi(t,e,l))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var l=rn(),a=yl(l);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=vl(e,a,l),t!==null&&(Jt(t,e,l),fi(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=rn(),l=yl(n);l.tag=2,t!=null&&(l.callback=t),t=vl(e,l,n),t!==null&&(Jt(t,e,n),fi(t,e,n))}};function Zf(e,t,n,l,a,i,r){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,i,r):t.prototype&&t.prototype.isPureReactComponent?!li(n,l)||!li(a,i):!0}function Kf(e,t,n,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,l),t.state!==e&&Nc.enqueueReplaceState(t,t.state,null)}function Il(e,t){var n=t;if("ref"in t){n={};for(var l in t)l!=="ref"&&(n[l]=t[l])}if(e=e.defaultProps){n===t&&(n=H({},n));for(var a in e)n[a]===void 0&&(n[a]=e[a])}return n}function Jf(e){so(e)}function Ff(e){console.error(e)}function $f(e){so(e)}function Ro(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function Wf(e,t,n){try{var l=e.onCaughtError;l(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(a){setTimeout(function(){throw a})}}function Hc(e,t,n){return n=yl(n),n.tag=3,n.payload={element:null},n.callback=function(){Ro(e,t)},n}function If(e){return e=yl(e),e.tag=3,e}function Pf(e,t,n,l){var a=n.type.getDerivedStateFromError;if(typeof a=="function"){var i=l.value;e.payload=function(){return a(i)},e.callback=function(){Wf(t,n,l)}}var r=n.stateNode;r!==null&&typeof r.componentDidCatch=="function"&&(e.callback=function(){Wf(t,n,l),typeof a!="function"&&(zl===null?zl=new Set([this]):zl.add(this));var d=l.stack;this.componentDidCatch(l.value,{componentStack:d!==null?d:""})})}function Lp(e,t,n,l,a){if(n.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=n.alternate,t!==null&&Ca(t,n,a,!0),n=nn.current,n!==null){switch(n.tag){case 31:case 13:return vn===null?Qo():n.alternate===null&&pt===0&&(pt=3),n.flags&=-257,n.flags|=65536,n.lanes=a,l===xo?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([l]):t.add(l),cs(e,l,a)),!1;case 22:return n.flags|=65536,l===xo?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([l]):n.add(l)),cs(e,l,a)),!1}throw Error(u(435,n.tag))}return cs(e,l,a),Qo(),!1}if(Xe)return t=nn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=a,l!==nc&&(e=Error(u(422),{cause:l}),oi(pn(e,n)))):(l!==nc&&(t=Error(u(423),{cause:l}),oi(pn(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,l=pn(l,n),a=Hc(e.stateNode,l,a),hc(e,a),pt!==4&&(pt=2)),!1;var i=Error(u(520),{cause:l});if(i=pn(i,n),Mi===null?Mi=[i]:Mi.push(i),pt!==4&&(pt=2),t===null)return!0;l=pn(l,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Hc(n.stateNode,l,e),hc(n,e),!1;case 1:if(t=n.type,i=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(zl===null||!zl.has(i))))return n.flags|=65536,a&=-a,n.lanes|=a,a=If(a),Pf(a,e,n,l),hc(n,a),!1}n=n.return}while(n!==null);return!1}var Bc=Error(u(461)),wt=!1;function _t(e,t,n,l){t.child=e===null?nf(t,null,n,l):$l(t,e.child,n,l)}function ed(e,t,n,l,a){n=n.render;var i=t.ref;if("ref"in l){var r={};for(var d in l)d!=="ref"&&(r[d]=l[d])}else r=l;return Zl(t),l=bc(e,t,n,r,i,a),d=xc(),e!==null&&!wt?(Sc(e,t,a),Wn(e,t,a)):(Xe&&d&&ec(t),t.flags|=1,_t(e,t,l,a),t.child)}function td(e,t,n,l,a){if(e===null){var i=n.type;return typeof i=="function"&&!Wr(i)&&i.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=i,nd(e,t,i,l,a)):(e=po(n.type,null,l,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!Zc(e,a)){var r=i.memoizedProps;if(n=n.compare,n=n!==null?n:li,n(r,l)&&e.ref===t.ref)return Wn(e,t,a)}return t.flags|=1,e=Qn(i,l),e.ref=t.ref,e.return=t,t.child=e}function nd(e,t,n,l,a){if(e!==null){var i=e.memoizedProps;if(li(i,l)&&e.ref===t.ref)if(wt=!1,t.pendingProps=l=i,Zc(e,a))(e.flags&131072)!==0&&(wt=!0);else return t.lanes=e.lanes,Wn(e,t,a)}return jc(e,t,n,l,a)}function ld(e,t,n,l){var a=l.children,i=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(i=i!==null?i.baseLanes|n:n,e!==null){for(l=t.child=e.child,a=0;l!==null;)a=a|l.lanes|l.childLanes,l=l.sibling;l=a&~i}else l=0,t.child=null;return ad(e,t,i,n,l)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&vo(t,i!==null?i.cachePool:null),i!==null?of(t,i):mc(),rf(t);else return l=t.lanes=536870912,ad(e,t,i!==null?i.baseLanes|n:n,n,l)}else i!==null?(vo(t,i.cachePool),of(t,i),xl(),t.memoizedState=null):(e!==null&&vo(t,null),mc(),xl());return _t(e,t,a,n),t.child}function vi(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function ad(e,t,n,l,a){var i=sc();return i=i===null?null:{parent:St._currentValue,pool:i},t.memoizedState={baseLanes:n,cachePool:i},e!==null&&vo(t,null),mc(),rf(t),e!==null&&Ca(e,t,l,!0),t.childLanes=a,null}function Lo(e,t){return t=No({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function id(e,t,n){return $l(t,e.child,null,n),e=Lo(t,t.pendingProps),e.flags|=2,ln(t),t.memoizedState=null,e}function Up(e,t,n){var l=t.pendingProps,a=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Xe){if(l.mode==="hidden")return e=Lo(t,l),t.lanes=536870912,vi(null,e);if(yc(t),(e=ot)?(e=y0(e,yn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:dl!==null?{id:_n,overflow:On}:null,retryLane:536870912,hydrationErrors:null},n=Yu(e),n.return=t,t.child=n,Dt=t,ot=null)):e=null,e===null)throw pl(t);return t.lanes=536870912,null}return Lo(t,l)}var i=e.memoizedState;if(i!==null){var r=i.dehydrated;if(yc(t),a)if(t.flags&256)t.flags&=-257,t=id(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(u(558));else if(wt||Ca(e,t,n,!1),a=(n&e.childLanes)!==0,wt||a){if(l=lt,l!==null&&(r=eo(l,n),r!==0&&r!==i.retryLane))throw i.retryLane=r,Gl(e,r),Jt(l,e,r),Bc;Qo(),t=id(e,t,n)}else e=i.treeContext,ot=bn(r.nextSibling),Dt=t,Xe=!0,hl=null,yn=!1,e!==null&&Xu(t,e),t=Lo(t,l),t.flags|=4096;return t}return e=Qn(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Uo(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(u(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function jc(e,t,n,l,a){return Zl(t),n=bc(e,t,n,l,void 0,a),l=xc(),e!==null&&!wt?(Sc(e,t,a),Wn(e,t,a)):(Xe&&l&&ec(t),t.flags|=1,_t(e,t,n,a),t.child)}function od(e,t,n,l,a,i){return Zl(t),t.updateQueue=null,n=sf(t,l,n,a),cf(e),l=xc(),e!==null&&!wt?(Sc(e,t,i),Wn(e,t,i)):(Xe&&l&&ec(t),t.flags|=1,_t(e,t,n,i),t.child)}function rd(e,t,n,l,a){if(Zl(t),t.stateNode===null){var i=va,r=n.contextType;typeof r=="object"&&r!==null&&(i=kt(r)),i=new n(l,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=Nc,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=l,i.state=t.memoizedState,i.refs={},fc(t),r=n.contextType,i.context=typeof r=="object"&&r!==null?kt(r):va,i.state=t.memoizedState,r=n.getDerivedStateFromProps,typeof r=="function"&&(Uc(t,n,r,l),i.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(r=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),r!==i.state&&Nc.enqueueReplaceState(i,i.state,null),hi(t,l,i,a),di(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){i=t.stateNode;var d=t.memoizedProps,g=Il(n,d);i.props=g;var M=i.context,O=n.contextType;r=va,typeof O=="object"&&O!==null&&(r=kt(O));var B=n.getDerivedStateFromProps;O=typeof B=="function"||typeof i.getSnapshotBeforeUpdate=="function",d=t.pendingProps!==d,O||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(d||M!==r)&&Kf(t,i,l,r),gl=!1;var A=t.memoizedState;i.state=A,hi(t,l,i,a),di(),M=t.memoizedState,d||A!==M||gl?(typeof B=="function"&&(Uc(t,n,B,l),M=t.memoizedState),(g=gl||Zf(t,n,g,l,A,M,r))?(O||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=M),i.props=l,i.state=M,i.context=r,l=g):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{i=t.stateNode,dc(e,t),r=t.memoizedProps,O=Il(n,r),i.props=O,B=t.pendingProps,A=i.context,M=n.contextType,g=va,typeof M=="object"&&M!==null&&(g=kt(M)),d=n.getDerivedStateFromProps,(M=typeof d=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(r!==B||A!==g)&&Kf(t,i,l,g),gl=!1,A=t.memoizedState,i.state=A,hi(t,l,i,a),di();var D=t.memoizedState;r!==B||A!==D||gl||e!==null&&e.dependencies!==null&&go(e.dependencies)?(typeof d=="function"&&(Uc(t,n,d,l),D=t.memoizedState),(O=gl||Zf(t,n,O,l,A,D,g)||e!==null&&e.dependencies!==null&&go(e.dependencies))?(M||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(l,D,g),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(l,D,g)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||r===e.memoizedProps&&A===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||r===e.memoizedProps&&A===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=D),i.props=l,i.state=D,i.context=g,l=O):(typeof i.componentDidUpdate!="function"||r===e.memoizedProps&&A===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||r===e.memoizedProps&&A===e.memoizedState||(t.flags|=1024),l=!1)}return i=l,Uo(e,t),l=(t.flags&128)!==0,i||l?(i=t.stateNode,n=l&&typeof n.getDerivedStateFromError!="function"?null:i.render(),t.flags|=1,e!==null&&l?(t.child=$l(t,e.child,null,a),t.child=$l(t,null,n,a)):_t(e,t,n,a),t.memoizedState=i.state,e=t.child):e=Wn(e,t,a),e}function cd(e,t,n,l){return Xl(),t.flags|=256,_t(e,t,n,l),t.child}var qc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Yc(e){return{baseLanes:e,cachePool:$u()}}function Gc(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=on),e}function sd(e,t,n){var l=t.pendingProps,a=!1,i=(t.flags&128)!==0,r;if((r=i)||(r=e!==null&&e.memoizedState===null?!1:(yt.current&2)!==0),r&&(a=!0,t.flags&=-129),r=(t.flags&32)!==0,t.flags&=-33,e===null){if(Xe){if(a?bl(t):xl(),(e=ot)?(e=y0(e,yn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:dl!==null?{id:_n,overflow:On}:null,retryLane:536870912,hydrationErrors:null},n=Yu(e),n.return=t,t.child=n,Dt=t,ot=null)):e=null,e===null)throw pl(t);return zs(e)?t.lanes=32:t.lanes=536870912,null}var d=l.children;return l=l.fallback,a?(xl(),a=t.mode,d=No({mode:"hidden",children:d},a),l=Vl(l,a,n,null),d.return=t,l.return=t,d.sibling=l,t.child=d,l=t.child,l.memoizedState=Yc(n),l.childLanes=Gc(e,r,n),t.memoizedState=qc,vi(null,l)):(bl(t),Vc(t,d))}var g=e.memoizedState;if(g!==null&&(d=g.dehydrated,d!==null)){if(i)t.flags&256?(bl(t),t.flags&=-257,t=Xc(e,t,n)):t.memoizedState!==null?(xl(),t.child=e.child,t.flags|=128,t=null):(xl(),d=l.fallback,a=t.mode,l=No({mode:"visible",children:l.children},a),d=Vl(d,a,n,null),d.flags|=2,l.return=t,d.return=t,l.sibling=d,t.child=l,$l(t,e.child,null,n),l=t.child,l.memoizedState=Yc(n),l.childLanes=Gc(e,r,n),t.memoizedState=qc,t=vi(null,l));else if(bl(t),zs(d)){if(r=d.nextSibling&&d.nextSibling.dataset,r)var M=r.dgst;r=M,l=Error(u(419)),l.stack="",l.digest=r,oi({value:l,source:null,stack:null}),t=Xc(e,t,n)}else if(wt||Ca(e,t,n,!1),r=(n&e.childLanes)!==0,wt||r){if(r=lt,r!==null&&(l=eo(r,n),l!==0&&l!==g.retryLane))throw g.retryLane=l,Gl(e,l),Jt(r,e,l),Bc;ws(d)||Qo(),t=Xc(e,t,n)}else ws(d)?(t.flags|=192,t.child=e.child,t=null):(e=g.treeContext,ot=bn(d.nextSibling),Dt=t,Xe=!0,hl=null,yn=!1,e!==null&&Xu(t,e),t=Vc(t,l.children),t.flags|=4096);return t}return a?(xl(),d=l.fallback,a=t.mode,g=e.child,M=g.sibling,l=Qn(g,{mode:"hidden",children:l.children}),l.subtreeFlags=g.subtreeFlags&65011712,M!==null?d=Qn(M,d):(d=Vl(d,a,n,null),d.flags|=2),d.return=t,l.return=t,l.sibling=d,t.child=l,vi(null,l),l=t.child,d=e.child.memoizedState,d===null?d=Yc(n):(a=d.cachePool,a!==null?(g=St._currentValue,a=a.parent!==g?{parent:g,pool:g}:a):a=$u(),d={baseLanes:d.baseLanes|n,cachePool:a}),l.memoizedState=d,l.childLanes=Gc(e,r,n),t.memoizedState=qc,vi(e.child,l)):(bl(t),n=e.child,e=n.sibling,n=Qn(n,{mode:"visible",children:l.children}),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n)}function Vc(e,t){return t=No({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function No(e,t){return e=tn(22,e,null,t),e.lanes=0,e}function Xc(e,t,n){return $l(t,e.child,null,n),e=Vc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function ud(e,t,n){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),ic(e.return,t,n)}function Qc(e,t,n,l,a,i){var r=e.memoizedState;r===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:n,tailMode:a,treeForkCount:i}:(r.isBackwards=t,r.rendering=null,r.renderingStartTime=0,r.last=l,r.tail=n,r.tailMode=a,r.treeForkCount=i)}function fd(e,t,n){var l=t.pendingProps,a=l.revealOrder,i=l.tail;l=l.children;var r=yt.current,d=(r&2)!==0;if(d?(r=r&1|2,t.flags|=128):r&=1,V(yt,r),_t(e,t,l,n),l=Xe?ii:0,!d&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&ud(e,n,t);else if(e.tag===19)ud(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(a){case"forwards":for(n=t.child,a=null;n!==null;)e=n.alternate,e!==null&&zo(e)===null&&(a=n),n=n.sibling;n=a,n===null?(a=t.child,t.child=null):(a=n.sibling,n.sibling=null),Qc(t,!1,a,n,i,l);break;case"backwards":case"unstable_legacy-backwards":for(n=null,a=t.child,t.child=null;a!==null;){if(e=a.alternate,e!==null&&zo(e)===null){t.child=a;break}e=a.sibling,a.sibling=n,n=a,a=e}Qc(t,!0,n,null,i,l);break;case"together":Qc(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function Wn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),wl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Ca(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(u(153));if(t.child!==null){for(e=t.child,n=Qn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Qn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Zc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&go(e)))}function Np(e,t,n){switch(t.tag){case 3:dt(t,t.stateNode.containerInfo),ml(t,St,e.memoizedState.cache),Xl();break;case 27:case 5:$t(t);break;case 4:dt(t,t.stateNode.containerInfo);break;case 10:ml(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,yc(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(bl(t),t.flags|=128,null):(n&t.child.childLanes)!==0?sd(e,t,n):(bl(t),e=Wn(e,t,n),e!==null?e.sibling:null);bl(t);break;case 19:var a=(e.flags&128)!==0;if(l=(n&t.childLanes)!==0,l||(Ca(e,t,n,!1),l=(n&t.childLanes)!==0),a){if(l)return fd(e,t,n);t.flags|=128}if(a=t.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),V(yt,yt.current),l)break;return null;case 22:return t.lanes=0,ld(e,t,n,t.pendingProps);case 24:ml(t,St,e.memoizedState.cache)}return Wn(e,t,n)}function dd(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)wt=!0;else{if(!Zc(e,n)&&(t.flags&128)===0)return wt=!1,Np(e,t,n);wt=(e.flags&131072)!==0}else wt=!1,Xe&&(t.flags&1048576)!==0&&Vu(t,ii,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=Jl(t.elementType),t.type=e,typeof e=="function")Wr(e)?(l=Il(e,l),t.tag=1,t=rd(null,t,e,l,n)):(t.tag=0,t=jc(null,t,e,l,n));else{if(e!=null){var a=e.$$typeof;if(a===oe){t.tag=11,t=ed(null,t,e,l,n);break e}else if(a===L){t.tag=14,t=td(null,t,e,l,n);break e}}throw t=$e(e)||e,Error(u(306,t,""))}}return t;case 0:return jc(e,t,t.type,t.pendingProps,n);case 1:return l=t.type,a=Il(l,t.pendingProps),rd(e,t,l,a,n);case 3:e:{if(dt(t,t.stateNode.containerInfo),e===null)throw Error(u(387));l=t.pendingProps;var i=t.memoizedState;a=i.element,dc(e,t),hi(t,l,null,n);var r=t.memoizedState;if(l=r.cache,ml(t,St,l),l!==i.cache&&oc(t,[St],n,!0),di(),l=r.element,i.isDehydrated)if(i={element:l,isDehydrated:!1,cache:r.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=cd(e,t,l,n);break e}else if(l!==a){a=pn(Error(u(424)),t),oi(a),t=cd(e,t,l,n);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,ot=bn(e.firstChild),Dt=t,Xe=!0,hl=null,yn=!0,n=nf(t,null,l,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Xl(),l===a){t=Wn(e,t,n);break e}_t(e,t,l,n)}t=t.child}return t;case 26:return Uo(e,t),e===null?(n=w0(t.type,null,t.pendingProps,null))?t.memoizedState=n:Xe||(n=t.type,e=t.pendingProps,l=Io(Ee.current).createElement(n),l[xt]=t,l[gt]=e,Ot(l,n,e),ge(l),t.stateNode=l):t.memoizedState=w0(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return $t(t),e===null&&Xe&&(l=t.stateNode=x0(t.type,t.pendingProps,Ee.current),Dt=t,yn=!0,a=ot,El(t.type)?(Ms=a,ot=bn(l.firstChild)):ot=a),_t(e,t,t.pendingProps.children,n),Uo(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Xe&&((a=l=ot)&&(l=dm(l,t.type,t.pendingProps,yn),l!==null?(t.stateNode=l,Dt=t,ot=bn(l.firstChild),yn=!1,a=!0):a=!1),a||pl(t)),$t(t),a=t.type,i=t.pendingProps,r=e!==null?e.memoizedProps:null,l=i.children,xs(a,i)?l=null:r!==null&&xs(a,r)&&(t.flags|=32),t.memoizedState!==null&&(a=bc(e,t,Ap,null,null,n),Ri._currentValue=a),Uo(e,t),_t(e,t,l,n),t.child;case 6:return e===null&&Xe&&((e=n=ot)&&(n=hm(n,t.pendingProps,yn),n!==null?(t.stateNode=n,Dt=t,ot=null,e=!0):e=!1),e||pl(t)),null;case 13:return sd(e,t,n);case 4:return dt(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=$l(t,null,l,n):_t(e,t,l,n),t.child;case 11:return ed(e,t,t.type,t.pendingProps,n);case 7:return _t(e,t,t.pendingProps,n),t.child;case 8:return _t(e,t,t.pendingProps.children,n),t.child;case 12:return _t(e,t,t.pendingProps.children,n),t.child;case 10:return l=t.pendingProps,ml(t,t.type,l.value),_t(e,t,l.children,n),t.child;case 9:return a=t.type._context,l=t.pendingProps.children,Zl(t),a=kt(a),l=l(a),t.flags|=1,_t(e,t,l,n),t.child;case 14:return td(e,t,t.type,t.pendingProps,n);case 15:return nd(e,t,t.type,t.pendingProps,n);case 19:return fd(e,t,n);case 31:return Up(e,t,n);case 22:return ld(e,t,n,t.pendingProps);case 24:return Zl(t),l=kt(St),e===null?(a=sc(),a===null&&(a=lt,i=rc(),a.pooledCache=i,i.refCount++,i!==null&&(a.pooledCacheLanes|=n),a=i),t.memoizedState={parent:l,cache:a},fc(t),ml(t,St,a)):((e.lanes&n)!==0&&(dc(e,t),hi(t,null,null,n),di()),a=e.memoizedState,i=t.memoizedState,a.parent!==l?(a={parent:l,cache:l},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),ml(t,St,l)):(l=i.cache,ml(t,St,l),l!==a.cache&&oc(t,[St],n,!0))),_t(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(u(156,t.tag))}function In(e){e.flags|=4}function Kc(e,t,n,l,a){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(a&335544128)===a)if(e.stateNode.complete)e.flags|=8192;else if(jd())e.flags|=8192;else throw Fl=xo,uc}else e.flags&=-16777217}function hd(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!E0(t))if(jd())e.flags|=8192;else throw Fl=xo,uc}function Ho(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Wi():536870912,e.lanes|=t,La|=t)}function bi(e,t){if(!Xe)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 l=null;n!==null;)n.alternate!==null&&(l=n),n=n.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function rt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,l=0;if(t)for(var a=e.child;a!==null;)n|=a.lanes|a.childLanes,l|=a.subtreeFlags&65011712,l|=a.flags&65011712,a.return=e,a=a.sibling;else for(a=e.child;a!==null;)n|=a.lanes|a.childLanes,l|=a.subtreeFlags,l|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=l,e.childLanes=n,t}function Hp(e,t,n){var l=t.pendingProps;switch(tc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return rt(t),null;case 1:return rt(t),null;case 3:return n=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Jn(St),Re(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Sa(t)?In(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,lc())),rt(t),null;case 26:var a=t.type,i=t.memoizedState;return e===null?(In(t),i!==null?(rt(t),hd(t,i)):(rt(t),Kc(t,a,null,l,n))):i?i!==e.memoizedState?(In(t),rt(t),hd(t,i)):(rt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&In(t),rt(t),Kc(t,a,e,l,n)),null;case 27:if(xe(t),n=Ee.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&In(t);else{if(!l){if(t.stateNode===null)throw Error(u(166));return rt(t),null}e=$.current,Sa(t)?Qu(t):(e=x0(a,l,n),t.stateNode=e,In(t))}return rt(t),null;case 5:if(xe(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&In(t);else{if(!l){if(t.stateNode===null)throw Error(u(166));return rt(t),null}if(i=$.current,Sa(t))Qu(t);else{var r=Io(Ee.current);switch(i){case 1:i=r.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:i=r.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":i=r.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":i=r.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":i=r.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof l.is=="string"?r.createElement("select",{is:l.is}):r.createElement("select"),l.multiple?i.multiple=!0:l.size&&(i.size=l.size);break;default:i=typeof l.is=="string"?r.createElement(a,{is:l.is}):r.createElement(a)}}i[xt]=t,i[gt]=l;e:for(r=t.child;r!==null;){if(r.tag===5||r.tag===6)i.appendChild(r.stateNode);else if(r.tag!==4&&r.tag!==27&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break e;for(;r.sibling===null;){if(r.return===null||r.return===t)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}t.stateNode=i;e:switch(Ot(i,a,l),a){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&In(t)}}return rt(t),Kc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&In(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(u(166));if(e=Ee.current,Sa(t)){if(e=t.stateNode,n=t.memoizedProps,l=null,a=Dt,a!==null)switch(a.tag){case 27:case 5:l=a.memoizedProps}e[xt]=t,e=!!(e.nodeValue===n||l!==null&&l.suppressHydrationWarning===!0||s0(e.nodeValue,n)),e||pl(t,!0)}else e=Io(e).createTextNode(l),e[xt]=t,t.stateNode=e}return rt(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(l=Sa(t),n!==null){if(e===null){if(!l)throw Error(u(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(557));e[xt]=t}else Xl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;rt(t),e=!1}else n=lc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(ln(t),t):(ln(t),null);if((t.flags&128)!==0)throw Error(u(558))}return rt(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Sa(t),l!==null&&l.dehydrated!==null){if(e===null){if(!a)throw Error(u(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(u(317));a[xt]=t}else Xl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;rt(t),a=!1}else a=lc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(ln(t),t):(ln(t),null)}return ln(t),(t.flags&128)!==0?(t.lanes=n,t):(n=l!==null,e=e!==null&&e.memoizedState!==null,n&&(l=t.child,a=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(a=l.alternate.memoizedState.cachePool.pool),i=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(i=l.memoizedState.cachePool.pool),i!==a&&(l.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Ho(t,t.updateQueue),rt(t),null);case 4:return Re(),e===null&&ms(t.stateNode.containerInfo),rt(t),null;case 10:return Jn(t.type),rt(t),null;case 19:if(E(yt),l=t.memoizedState,l===null)return rt(t),null;if(a=(t.flags&128)!==0,i=l.rendering,i===null)if(a)bi(l,!1);else{if(pt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=zo(e),i!==null){for(t.flags|=128,bi(l,!1),e=i.updateQueue,t.updateQueue=e,Ho(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)qu(n,e),n=n.sibling;return V(yt,yt.current&1|2),Xe&&Zn(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&Ut()>Go&&(t.flags|=128,a=!0,bi(l,!1),t.lanes=4194304)}else{if(!a)if(e=zo(i),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Ho(t,e),bi(l,!0),l.tail===null&&l.tailMode==="hidden"&&!i.alternate&&!Xe)return rt(t),null}else 2*Ut()-l.renderingStartTime>Go&&n!==536870912&&(t.flags|=128,a=!0,bi(l,!1),t.lanes=4194304);l.isBackwards?(i.sibling=t.child,t.child=i):(e=l.last,e!==null?e.sibling=i:t.child=i,l.last=i)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=Ut(),e.sibling=null,n=yt.current,V(yt,a?n&1|2:n&1),Xe&&Zn(t,l.treeForkCount),e):(rt(t),null);case 22:case 23:return ln(t),gc(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(n&536870912)!==0&&(t.flags&128)===0&&(rt(t),t.subtreeFlags&6&&(t.flags|=8192)):rt(t),n=t.updateQueue,n!==null&&Ho(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==n&&(t.flags|=2048),e!==null&&E(Kl),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Jn(St),rt(t),null;case 25:return null;case 30:return null}throw Error(u(156,t.tag))}function Bp(e,t){switch(tc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Jn(St),Re(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return xe(t),null;case 31:if(t.memoizedState!==null){if(ln(t),t.alternate===null)throw Error(u(340));Xl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(ln(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(u(340));Xl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return E(yt),null;case 4:return Re(),null;case 10:return Jn(t.type),null;case 22:case 23:return ln(t),gc(),e!==null&&E(Kl),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Jn(St),null;case 25:return null;default:return null}}function pd(e,t){switch(tc(t),t.tag){case 3:Jn(St),Re();break;case 26:case 27:case 5:xe(t);break;case 4:Re();break;case 31:t.memoizedState!==null&&ln(t);break;case 13:ln(t);break;case 19:E(yt);break;case 10:Jn(t.type);break;case 22:case 23:ln(t),gc(),e!==null&&E(Kl);break;case 24:Jn(St)}}function xi(e,t){try{var n=t.updateQueue,l=n!==null?n.lastEffect:null;if(l!==null){var a=l.next;n=a;do{if((n.tag&e)===e){l=void 0;var i=n.create,r=n.inst;l=i(),r.destroy=l}n=n.next}while(n!==a)}}catch(d){Pe(t,t.return,d)}}function Sl(e,t,n){try{var l=t.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var i=a.next;l=i;do{if((l.tag&e)===e){var r=l.inst,d=r.destroy;if(d!==void 0){r.destroy=void 0,a=t;var g=n,M=d;try{M()}catch(O){Pe(a,g,O)}}}l=l.next}while(l!==i)}}catch(O){Pe(t,t.return,O)}}function md(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{af(t,n)}catch(l){Pe(e,e.return,l)}}}function gd(e,t,n){n.props=Il(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(l){Pe(e,t,l)}}function Si(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof n=="function"?e.refCleanup=n(l):n.current=l}}catch(a){Pe(e,t,a)}}function Rn(e,t){var n=e.ref,l=e.refCleanup;if(n!==null)if(typeof l=="function")try{l()}catch(a){Pe(e,t,a)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(a){Pe(e,t,a)}else n.current=null}function yd(e){var t=e.type,n=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&l.focus();break e;case"img":n.src?l.src=n.src:n.srcSet&&(l.srcset=n.srcSet)}}catch(a){Pe(e,e.return,a)}}function Jc(e,t,n){try{var l=e.stateNode;om(l,e.type,n,t),l[gt]=t}catch(a){Pe(e,e.return,a)}}function vd(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&El(e.type)||e.tag===4}function Fc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||vd(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&&El(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 $c(e,t,n){var l=e.tag;if(l===5||l===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=Vn));else if(l!==4&&(l===27&&El(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for($c(e,t,n),e=e.sibling;e!==null;)$c(e,t,n),e=e.sibling}function Bo(e,t,n){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(l!==4&&(l===27&&El(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Bo(e,t,n),e=e.sibling;e!==null;)Bo(e,t,n),e=e.sibling}function bd(e){var t=e.stateNode,n=e.memoizedProps;try{for(var l=e.type,a=t.attributes;a.length;)t.removeAttributeNode(a[0]);Ot(t,l,n),t[xt]=e,t[gt]=n}catch(i){Pe(e,e.return,i)}}var Pn=!1,zt=!1,Wc=!1,xd=typeof WeakSet=="function"?WeakSet:Set,At=null;function jp(e,t){if(e=e.containerInfo,vs=ir,e=_u(e),Xr(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var l=n.getSelection&&n.getSelection();if(l&&l.rangeCount!==0){n=l.anchorNode;var a=l.anchorOffset,i=l.focusNode;l=l.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var r=0,d=-1,g=-1,M=0,O=0,B=e,A=null;t:for(;;){for(var D;B!==n||a!==0&&B.nodeType!==3||(d=r+a),B!==i||l!==0&&B.nodeType!==3||(g=r+l),B.nodeType===3&&(r+=B.nodeValue.length),(D=B.firstChild)!==null;)A=B,B=D;for(;;){if(B===e)break t;if(A===n&&++M===a&&(d=r),A===i&&++O===l&&(g=r),(D=B.nextSibling)!==null)break;B=A,A=B.parentNode}B=D}n=d===-1||g===-1?null:{start:d,end:g}}else n=null}n=n||{start:0,end:0}}else n=null;for(bs={focusedElem:e,selectionRange:n},ir=!1,At=t;At!==null;)if(t=At,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,At=e;else for(;At!==null;){switch(t=At,i=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&i!==null){e=void 0,n=t,a=i.memoizedProps,i=i.memoizedState,l=n.stateNode;try{var ae=Il(n.type,a);e=l.getSnapshotBeforeUpdate(ae,i),l.__reactInternalSnapshotBeforeUpdate=e}catch(Ce){Pe(n,n.return,Ce)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)Cs(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Cs(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(u(163))}if(e=t.sibling,e!==null){e.return=t.return,At=e;break}At=t.return}}function Sd(e,t,n){var l=n.flags;switch(n.tag){case 0:case 11:case 15:tl(e,n),l&4&&xi(5,n);break;case 1:if(tl(e,n),l&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(r){Pe(n,n.return,r)}else{var a=Il(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(a,t,e.__reactInternalSnapshotBeforeUpdate)}catch(r){Pe(n,n.return,r)}}l&64&&md(n),l&512&&Si(n,n.return);break;case 3:if(tl(e,n),l&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{af(e,t)}catch(r){Pe(n,n.return,r)}}break;case 27:t===null&&l&4&&bd(n);case 26:case 5:tl(e,n),t===null&&l&4&&yd(n),l&512&&Si(n,n.return);break;case 12:tl(e,n);break;case 31:tl(e,n),l&4&&zd(e,n);break;case 13:tl(e,n),l&4&&Md(e,n),l&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Jp.bind(null,n),pm(e,n))));break;case 22:if(l=n.memoizedState!==null||Pn,!l){t=t!==null&&t.memoizedState!==null||zt,a=Pn;var i=zt;Pn=l,(zt=t)&&!i?nl(e,n,(n.subtreeFlags&8772)!==0):tl(e,n),Pn=a,zt=i}break;case 30:break;default:tl(e,n)}}function Cd(e){var t=e.alternate;t!==null&&(e.alternate=null,Cd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ie(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 ct=null,Xt=!1;function el(e,t,n){for(n=n.child;n!==null;)wd(e,t,n),n=n.sibling}function wd(e,t,n){if(Bt&&typeof Bt.onCommitFiberUnmount=="function")try{Bt.onCommitFiberUnmount(Nl,n)}catch{}switch(n.tag){case 26:zt||Rn(n,t),el(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:zt||Rn(n,t);var l=ct,a=Xt;El(n.type)&&(ct=n.stateNode,Xt=!1),el(e,t,n),ki(n.stateNode),ct=l,Xt=a;break;case 5:zt||Rn(n,t);case 6:if(l=ct,a=Xt,ct=null,el(e,t,n),ct=l,Xt=a,ct!==null)if(Xt)try{(ct.nodeType===9?ct.body:ct.nodeName==="HTML"?ct.ownerDocument.body:ct).removeChild(n.stateNode)}catch(i){Pe(n,t,i)}else try{ct.removeChild(n.stateNode)}catch(i){Pe(n,t,i)}break;case 18:ct!==null&&(Xt?(e=ct,m0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Ga(e)):m0(ct,n.stateNode));break;case 4:l=ct,a=Xt,ct=n.stateNode.containerInfo,Xt=!0,el(e,t,n),ct=l,Xt=a;break;case 0:case 11:case 14:case 15:Sl(2,n,t),zt||Sl(4,n,t),el(e,t,n);break;case 1:zt||(Rn(n,t),l=n.stateNode,typeof l.componentWillUnmount=="function"&&gd(n,t,l)),el(e,t,n);break;case 21:el(e,t,n);break;case 22:zt=(l=zt)||n.memoizedState!==null,el(e,t,n),zt=l;break;default:el(e,t,n)}}function zd(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Ga(e)}catch(n){Pe(t,t.return,n)}}}function Md(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Ga(e)}catch(n){Pe(t,t.return,n)}}function qp(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new xd),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new xd),t;default:throw Error(u(435,e.tag))}}function jo(e,t){var n=qp(e);t.forEach(function(l){if(!n.has(l)){n.add(l);var a=Fp.bind(null,e,l);l.then(a,a)}})}function Qt(e,t){var n=t.deletions;if(n!==null)for(var l=0;l<n.length;l++){var a=n[l],i=e,r=t,d=r;e:for(;d!==null;){switch(d.tag){case 27:if(El(d.type)){ct=d.stateNode,Xt=!1;break e}break;case 5:ct=d.stateNode,Xt=!1;break e;case 3:case 4:ct=d.stateNode.containerInfo,Xt=!0;break e}d=d.return}if(ct===null)throw Error(u(160));wd(i,r,a),ct=null,Xt=!1,i=a.alternate,i!==null&&(i.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Td(t,e),t=t.sibling}var zn=null;function Td(e,t){var n=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Qt(t,e),Zt(e),l&4&&(Sl(3,e,e.return),xi(3,e),Sl(5,e,e.return));break;case 1:Qt(t,e),Zt(e),l&512&&(zt||n===null||Rn(n,n.return)),l&64&&Pn&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?l:n.concat(l))));break;case 26:var a=zn;if(Qt(t,e),Zt(e),l&512&&(zt||n===null||Rn(n,n.return)),l&4){var i=n!==null?n.memoizedState:null;if(l=e.memoizedState,n===null)if(l===null)if(e.stateNode===null){e:{l=e.type,n=e.memoizedProps,a=a.ownerDocument||a;t:switch(l){case"title":i=a.getElementsByTagName("title")[0],(!i||i[X]||i[xt]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=a.createElement(l),a.head.insertBefore(i,a.querySelector("head > title"))),Ot(i,l,n),i[xt]=e,ge(i),l=i;break e;case"link":var r=T0("link","href",a).get(l+(n.href||""));if(r){for(var d=0;d<r.length;d++)if(i=r[d],i.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&i.getAttribute("rel")===(n.rel==null?null:n.rel)&&i.getAttribute("title")===(n.title==null?null:n.title)&&i.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){r.splice(d,1);break t}}i=a.createElement(l),Ot(i,l,n),a.head.appendChild(i);break;case"meta":if(r=T0("meta","content",a).get(l+(n.content||""))){for(d=0;d<r.length;d++)if(i=r[d],i.getAttribute("content")===(n.content==null?null:""+n.content)&&i.getAttribute("name")===(n.name==null?null:n.name)&&i.getAttribute("property")===(n.property==null?null:n.property)&&i.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&i.getAttribute("charset")===(n.charSet==null?null:n.charSet)){r.splice(d,1);break t}}i=a.createElement(l),Ot(i,l,n),a.head.appendChild(i);break;default:throw Error(u(468,l))}i[xt]=e,ge(i),l=i}e.stateNode=l}else A0(a,e.type,e.stateNode);else e.stateNode=M0(a,l,e.memoizedProps);else i!==l?(i===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):i.count--,l===null?A0(a,e.type,e.stateNode):M0(a,l,e.memoizedProps)):l===null&&e.stateNode!==null&&Jc(e,e.memoizedProps,n.memoizedProps)}break;case 27:Qt(t,e),Zt(e),l&512&&(zt||n===null||Rn(n,n.return)),n!==null&&l&4&&Jc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(Qt(t,e),Zt(e),l&512&&(zt||n===null||Rn(n,n.return)),e.flags&32){a=e.stateNode;try{fa(a,"")}catch(ae){Pe(e,e.return,ae)}}l&4&&e.stateNode!=null&&(a=e.memoizedProps,Jc(e,a,n!==null?n.memoizedProps:a)),l&1024&&(Wc=!0);break;case 6:if(Qt(t,e),Zt(e),l&4){if(e.stateNode===null)throw Error(u(162));l=e.memoizedProps,n=e.stateNode;try{n.nodeValue=l}catch(ae){Pe(e,e.return,ae)}}break;case 3:if(tr=null,a=zn,zn=Po(t.containerInfo),Qt(t,e),zn=a,Zt(e),l&4&&n!==null&&n.memoizedState.isDehydrated)try{Ga(t.containerInfo)}catch(ae){Pe(e,e.return,ae)}Wc&&(Wc=!1,Ad(e));break;case 4:l=zn,zn=Po(e.stateNode.containerInfo),Qt(t,e),Zt(e),zn=l;break;case 12:Qt(t,e),Zt(e);break;case 31:Qt(t,e),Zt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,jo(e,l)));break;case 13:Qt(t,e),Zt(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Yo=Ut()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,jo(e,l)));break;case 22:a=e.memoizedState!==null;var g=n!==null&&n.memoizedState!==null,M=Pn,O=zt;if(Pn=M||a,zt=O||g,Qt(t,e),zt=O,Pn=M,Zt(e),l&8192)e:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||g||Pn||zt||Pl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){g=n=t;try{if(i=g.stateNode,a)r=i.style,typeof r.setProperty=="function"?r.setProperty("display","none","important"):r.display="none";else{d=g.stateNode;var B=g.memoizedProps.style,A=B!=null&&B.hasOwnProperty("display")?B.display:null;d.style.display=A==null||typeof A=="boolean"?"":(""+A).trim()}}catch(ae){Pe(g,g.return,ae)}}}else if(t.tag===6){if(n===null){g=t;try{g.stateNode.nodeValue=a?"":g.memoizedProps}catch(ae){Pe(g,g.return,ae)}}}else if(t.tag===18){if(n===null){g=t;try{var D=g.stateNode;a?g0(D,!0):g0(g.stateNode,!1)}catch(ae){Pe(g,g.return,ae)}}}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}l&4&&(l=e.updateQueue,l!==null&&(n=l.retryQueue,n!==null&&(l.retryQueue=null,jo(e,n))));break;case 19:Qt(t,e),Zt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,jo(e,l)));break;case 30:break;case 21:break;default:Qt(t,e),Zt(e)}}function Zt(e){var t=e.flags;if(t&2){try{for(var n,l=e.return;l!==null;){if(vd(l)){n=l;break}l=l.return}if(n==null)throw Error(u(160));switch(n.tag){case 27:var a=n.stateNode,i=Fc(e);Bo(e,i,a);break;case 5:var r=n.stateNode;n.flags&32&&(fa(r,""),n.flags&=-33);var d=Fc(e);Bo(e,d,r);break;case 3:case 4:var g=n.stateNode.containerInfo,M=Fc(e);$c(e,M,g);break;default:throw Error(u(161))}}catch(O){Pe(e,e.return,O)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Ad(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Ad(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function tl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Sd(e,t.alternate,t),t=t.sibling}function Pl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Sl(4,t,t.return),Pl(t);break;case 1:Rn(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&gd(t,t.return,n),Pl(t);break;case 27:ki(t.stateNode);case 26:case 5:Rn(t,t.return),Pl(t);break;case 22:t.memoizedState===null&&Pl(t);break;case 30:Pl(t);break;default:Pl(t)}e=e.sibling}}function nl(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,a=e,i=t,r=i.flags;switch(i.tag){case 0:case 11:case 15:nl(a,i,n),xi(4,i);break;case 1:if(nl(a,i,n),l=i,a=l.stateNode,typeof a.componentDidMount=="function")try{a.componentDidMount()}catch(M){Pe(l,l.return,M)}if(l=i,a=l.updateQueue,a!==null){var d=l.stateNode;try{var g=a.shared.hiddenCallbacks;if(g!==null)for(a.shared.hiddenCallbacks=null,a=0;a<g.length;a++)lf(g[a],d)}catch(M){Pe(l,l.return,M)}}n&&r&64&&md(i),Si(i,i.return);break;case 27:bd(i);case 26:case 5:nl(a,i,n),n&&l===null&&r&4&&yd(i),Si(i,i.return);break;case 12:nl(a,i,n);break;case 31:nl(a,i,n),n&&r&4&&zd(a,i);break;case 13:nl(a,i,n),n&&r&4&&Md(a,i);break;case 22:i.memoizedState===null&&nl(a,i,n),Si(i,i.return);break;case 30:break;default:nl(a,i,n)}t=t.sibling}}function Ic(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&&ri(n))}function Pc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ri(e))}function Mn(e,t,n,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Ed(e,t,n,l),t=t.sibling}function Ed(e,t,n,l){var a=t.flags;switch(t.tag){case 0:case 11:case 15:Mn(e,t,n,l),a&2048&&xi(9,t);break;case 1:Mn(e,t,n,l);break;case 3:Mn(e,t,n,l),a&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ri(e)));break;case 12:if(a&2048){Mn(e,t,n,l),e=t.stateNode;try{var i=t.memoizedProps,r=i.id,d=i.onPostCommit;typeof d=="function"&&d(r,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(g){Pe(t,t.return,g)}}else Mn(e,t,n,l);break;case 31:Mn(e,t,n,l);break;case 13:Mn(e,t,n,l);break;case 23:break;case 22:i=t.stateNode,r=t.alternate,t.memoizedState!==null?i._visibility&2?Mn(e,t,n,l):Ci(e,t):i._visibility&2?Mn(e,t,n,l):(i._visibility|=2,_a(e,t,n,l,(t.subtreeFlags&10256)!==0||!1)),a&2048&&Ic(r,t);break;case 24:Mn(e,t,n,l),a&2048&&Pc(t.alternate,t);break;default:Mn(e,t,n,l)}}function _a(e,t,n,l,a){for(a=a&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var i=e,r=t,d=n,g=l,M=r.flags;switch(r.tag){case 0:case 11:case 15:_a(i,r,d,g,a),xi(8,r);break;case 23:break;case 22:var O=r.stateNode;r.memoizedState!==null?O._visibility&2?_a(i,r,d,g,a):Ci(i,r):(O._visibility|=2,_a(i,r,d,g,a)),a&&M&2048&&Ic(r.alternate,r);break;case 24:_a(i,r,d,g,a),a&&M&2048&&Pc(r.alternate,r);break;default:_a(i,r,d,g,a)}t=t.sibling}}function Ci(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,l=t,a=l.flags;switch(l.tag){case 22:Ci(n,l),a&2048&&Ic(l.alternate,l);break;case 24:Ci(n,l),a&2048&&Pc(l.alternate,l);break;default:Ci(n,l)}t=t.sibling}}var wi=8192;function Oa(e,t,n){if(e.subtreeFlags&wi)for(e=e.child;e!==null;)Dd(e,t,n),e=e.sibling}function Dd(e,t,n){switch(e.tag){case 26:Oa(e,t,n),e.flags&wi&&e.memoizedState!==null&&Tm(n,zn,e.memoizedState,e.memoizedProps);break;case 5:Oa(e,t,n);break;case 3:case 4:var l=zn;zn=Po(e.stateNode.containerInfo),Oa(e,t,n),zn=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=wi,wi=16777216,Oa(e,t,n),wi=l):Oa(e,t,n));break;default:Oa(e,t,n)}}function kd(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 zi(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var l=t[n];At=l,Od(l,e)}kd(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)_d(e),e=e.sibling}function _d(e){switch(e.tag){case 0:case 11:case 15:zi(e),e.flags&2048&&Sl(9,e,e.return);break;case 3:zi(e);break;case 12:zi(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,qo(e)):zi(e);break;default:zi(e)}}function qo(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var l=t[n];At=l,Od(l,e)}kd(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Sl(8,t,t.return),qo(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,qo(t));break;default:qo(t)}e=e.sibling}}function Od(e,t){for(;At!==null;){var n=At;switch(n.tag){case 0:case 11:case 15:Sl(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var l=n.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:ri(n.memoizedState.cache)}if(l=n.child,l!==null)l.return=n,At=l;else e:for(n=e;At!==null;){l=At;var a=l.sibling,i=l.return;if(Cd(l),l===n){At=null;break e}if(a!==null){a.return=i,At=a;break e}At=i}}}var Yp={getCacheForType:function(e){var t=kt(St),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return kt(St).controller.signal}},Gp=typeof WeakMap=="function"?WeakMap:Map,Ke=0,lt=null,je=null,Ge=0,Ie=0,an=null,Cl=!1,Ra=!1,es=!1,ll=0,pt=0,wl=0,ea=0,ts=0,on=0,La=0,Mi=null,Kt=null,ns=!1,Yo=0,Rd=0,Go=1/0,Vo=null,zl=null,Tt=0,Ml=null,Ua=null,al=0,ls=0,as=null,Ld=null,Ti=0,is=null;function rn(){return(Ke&2)!==0&&Ge!==0?Ge&-Ge:T.T!==null?fs():Yn()}function Ud(){if(on===0)if((Ge&536870912)===0||Xe){var e=oa;oa<<=1,(oa&3932160)===0&&(oa=262144),on=e}else on=536870912;return e=nn.current,e!==null&&(e.flags|=32),on}function Jt(e,t,n){(e===lt&&(Ie===2||Ie===9)||e.cancelPendingCommit!==null)&&(Na(e,0),Tl(e,Ge,on,!1)),Bl(e,n),((Ke&2)===0||e!==lt)&&(e===lt&&((Ke&2)===0&&(ea|=n),pt===4&&Tl(e,Ge,on,!1)),Ln(e))}function Nd(e,t,n){if((Ke&6)!==0)throw Error(u(327));var l=!n&&(t&127)===0&&(t&e.expiredLanes)===0||Hl(e,t),a=l?Qp(e,t):rs(e,t,!0),i=l;do{if(a===0){Ra&&!l&&Tl(e,t,0,!1);break}else{if(n=e.current.alternate,i&&!Vp(n)){a=rs(e,t,!1),i=!1;continue}if(a===2){if(i=t,e.errorRecoveryDisabledLanes&i)var r=0;else r=e.pendingLanes&-536870913,r=r!==0?r:r&536870912?536870912:0;if(r!==0){t=r;e:{var d=e;a=Mi;var g=d.current.memoizedState.isDehydrated;if(g&&(Na(d,r).flags|=256),r=rs(d,r,!1),r!==2){if(es&&!g){d.errorRecoveryDisabledLanes|=i,ea|=i,a=4;break e}i=Kt,Kt=a,i!==null&&(Kt===null?Kt=i:Kt.push.apply(Kt,i))}a=r}if(i=!1,a!==2)continue}}if(a===1){Na(e,0),Tl(e,t,0,!0);break}e:{switch(l=e,i=a,i){case 0:case 1:throw Error(u(345));case 4:if((t&4194048)!==t)break;case 6:Tl(l,t,on,!Cl);break e;case 2:Kt=null;break;case 3:case 5:break;default:throw Error(u(329))}if((t&62914560)===t&&(a=Yo+300-Ut(),10<a)){if(Tl(l,t,on,!Cl),ca(l,0,!0)!==0)break e;al=t,l.timeoutHandle=h0(Hd.bind(null,l,n,Kt,Vo,ns,t,on,ea,La,Cl,i,"Throttled",-0,0),a);break e}Hd(l,n,Kt,Vo,ns,t,on,ea,La,Cl,i,null,-0,0)}}break}while(!0);Ln(e)}function Hd(e,t,n,l,a,i,r,d,g,M,O,B,A,D){if(e.timeoutHandle=-1,B=t.subtreeFlags,B&8192||(B&16785408)===16785408){B={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Vn},Dd(t,i,B);var ae=(i&62914560)===i?Yo-Ut():(i&4194048)===i?Rd-Ut():0;if(ae=Am(B,ae),ae!==null){al=i,e.cancelPendingCommit=ae(Qd.bind(null,e,t,i,n,l,a,r,d,g,O,B,null,A,D)),Tl(e,i,r,!M);return}}Qd(e,t,i,n,l,a,r,d,g)}function Vp(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 l=0;l<n.length;l++){var a=n[l],i=a.getSnapshot;a=a.value;try{if(!en(i(),a))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 Tl(e,t,n,l){t&=~ts,t&=~ea,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var a=t;0<a;){var i=31-jt(a),r=1<<i;l[i]=-1,a&=~r}n!==0&&cl(e,n,t)}function Xo(){return(Ke&6)===0?(Ai(0),!1):!0}function os(){if(je!==null){if(Ie===0)var e=je.return;else e=je,Kn=Ql=null,Cc(e),Ta=null,si=0,e=je;for(;e!==null;)pd(e.alternate,e),e=e.return;je=null}}function Na(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,sm(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),al=0,os(),lt=e,je=n=Qn(e.current,null),Ge=t,Ie=0,an=null,Cl=!1,Ra=Hl(e,t),es=!1,La=on=ts=ea=wl=pt=0,Kt=Mi=null,ns=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var a=31-jt(l),i=1<<a;t|=e[a],l&=~i}return ll=t,uo(),n}function Bd(e,t){Ue=null,T.H=yi,t===Ma||t===bo?(t=Pu(),Ie=3):t===uc?(t=Pu(),Ie=4):Ie=t===Bc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,an=t,je===null&&(pt=1,Ro(e,pn(t,e.current)))}function jd(){var e=nn.current;return e===null?!0:(Ge&4194048)===Ge?vn===null:(Ge&62914560)===Ge||(Ge&536870912)!==0?e===vn:!1}function qd(){var e=T.H;return T.H=yi,e===null?yi:e}function Yd(){var e=T.A;return T.A=Yp,e}function Qo(){pt=4,Cl||(Ge&4194048)!==Ge&&nn.current!==null||(Ra=!0),(wl&134217727)===0&&(ea&134217727)===0||lt===null||Tl(lt,Ge,on,!1)}function rs(e,t,n){var l=Ke;Ke|=2;var a=qd(),i=Yd();(lt!==e||Ge!==t)&&(Vo=null,Na(e,t)),t=!1;var r=pt;e:do try{if(Ie!==0&&je!==null){var d=je,g=an;switch(Ie){case 8:os(),r=6;break e;case 3:case 2:case 9:case 6:nn.current===null&&(t=!0);var M=Ie;if(Ie=0,an=null,Ha(e,d,g,M),n&&Ra){r=0;break e}break;default:M=Ie,Ie=0,an=null,Ha(e,d,g,M)}}Xp(),r=pt;break}catch(O){Bd(e,O)}while(!0);return t&&e.shellSuspendCounter++,Kn=Ql=null,Ke=l,T.H=a,T.A=i,je===null&&(lt=null,Ge=0,uo()),r}function Xp(){for(;je!==null;)Gd(je)}function Qp(e,t){var n=Ke;Ke|=2;var l=qd(),a=Yd();lt!==e||Ge!==t?(Vo=null,Go=Ut()+500,Na(e,t)):Ra=Hl(e,t);e:do try{if(Ie!==0&&je!==null){t=je;var i=an;t:switch(Ie){case 1:Ie=0,an=null,Ha(e,t,i,1);break;case 2:case 9:if(Wu(i)){Ie=0,an=null,Vd(t);break}t=function(){Ie!==2&&Ie!==9||lt!==e||(Ie=7),Ln(e)},i.then(t,t);break e;case 3:Ie=7;break e;case 4:Ie=5;break e;case 7:Wu(i)?(Ie=0,an=null,Vd(t)):(Ie=0,an=null,Ha(e,t,i,7));break;case 5:var r=null;switch(je.tag){case 26:r=je.memoizedState;case 5:case 27:var d=je;if(r?E0(r):d.stateNode.complete){Ie=0,an=null;var g=d.sibling;if(g!==null)je=g;else{var M=d.return;M!==null?(je=M,Zo(M)):je=null}break t}}Ie=0,an=null,Ha(e,t,i,5);break;case 6:Ie=0,an=null,Ha(e,t,i,6);break;case 8:os(),pt=6;break e;default:throw Error(u(462))}}Zp();break}catch(O){Bd(e,O)}while(!0);return Kn=Ql=null,T.H=l,T.A=a,Ke=n,je!==null?0:(lt=null,Ge=0,uo(),pt)}function Zp(){for(;je!==null&&!Ul();)Gd(je)}function Gd(e){var t=dd(e.alternate,e,ll);e.memoizedProps=e.pendingProps,t===null?Zo(e):je=t}function Vd(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=od(n,t,t.pendingProps,t.type,void 0,Ge);break;case 11:t=od(n,t,t.pendingProps,t.type.render,t.ref,Ge);break;case 5:Cc(t);default:pd(n,t),t=je=qu(t,ll),t=dd(n,t,ll)}e.memoizedProps=e.pendingProps,t===null?Zo(e):je=t}function Ha(e,t,n,l){Kn=Ql=null,Cc(t),Ta=null,si=0;var a=t.return;try{if(Lp(e,a,t,n,Ge)){pt=1,Ro(e,pn(n,e.current)),je=null;return}}catch(i){if(a!==null)throw je=a,i;pt=1,Ro(e,pn(n,e.current)),je=null;return}t.flags&32768?(Xe||l===1?e=!0:Ra||(Ge&536870912)!==0?e=!1:(Cl=e=!0,(l===2||l===9||l===3||l===6)&&(l=nn.current,l!==null&&l.tag===13&&(l.flags|=16384))),Xd(t,e)):Zo(t)}function Zo(e){var t=e;do{if((t.flags&32768)!==0){Xd(t,Cl);return}e=t.return;var n=Hp(t.alternate,t,ll);if(n!==null){je=n;return}if(t=t.sibling,t!==null){je=t;return}je=t=e}while(t!==null);pt===0&&(pt=5)}function Xd(e,t){do{var n=Bp(e.alternate,e);if(n!==null){n.flags&=32767,je=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){je=e;return}je=e=n}while(e!==null);pt=6,je=null}function Qd(e,t,n,l,a,i,r,d,g){e.cancelPendingCommit=null;do Ko();while(Tt!==0);if((Ke&6)!==0)throw Error(u(327));if(t!==null){if(t===e.current)throw Error(u(177));if(i=t.lanes|t.childLanes,i|=Fr,Ii(e,n,i,r,d,g),e===lt&&(je=lt=null,Ge=0),Ua=t,Ml=e,al=n,ls=i,as=a,Ld=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,$p(En,function(){return $d(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=T.T,T.T=null,a=j.p,j.p=2,r=Ke,Ke|=4;try{jp(e,t,n)}finally{Ke=r,j.p=a,T.T=l}}Tt=1,Zd(),Kd(),Jd()}}function Zd(){if(Tt===1){Tt=0;var e=Ml,t=Ua,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=T.T,T.T=null;var l=j.p;j.p=2;var a=Ke;Ke|=4;try{Td(t,e);var i=bs,r=_u(e.containerInfo),d=i.focusedElem,g=i.selectionRange;if(r!==d&&d&&d.ownerDocument&&ku(d.ownerDocument.documentElement,d)){if(g!==null&&Xr(d)){var M=g.start,O=g.end;if(O===void 0&&(O=M),"selectionStart"in d)d.selectionStart=M,d.selectionEnd=Math.min(O,d.value.length);else{var B=d.ownerDocument||document,A=B&&B.defaultView||window;if(A.getSelection){var D=A.getSelection(),ae=d.textContent.length,Ce=Math.min(g.start,ae),nt=g.end===void 0?Ce:Math.min(g.end,ae);!D.extend&&Ce>nt&&(r=nt,nt=Ce,Ce=r);var C=Du(d,Ce),v=Du(d,nt);if(C&&v&&(D.rangeCount!==1||D.anchorNode!==C.node||D.anchorOffset!==C.offset||D.focusNode!==v.node||D.focusOffset!==v.offset)){var z=B.createRange();z.setStart(C.node,C.offset),D.removeAllRanges(),Ce>nt?(D.addRange(z),D.extend(v.node,v.offset)):(z.setEnd(v.node,v.offset),D.addRange(z))}}}}for(B=[],D=d;D=D.parentNode;)D.nodeType===1&&B.push({element:D,left:D.scrollLeft,top:D.scrollTop});for(typeof d.focus=="function"&&d.focus(),d=0;d<B.length;d++){var N=B[d];N.element.scrollLeft=N.left,N.element.scrollTop=N.top}}ir=!!vs,bs=vs=null}finally{Ke=a,j.p=l,T.T=n}}e.current=t,Tt=2}}function Kd(){if(Tt===2){Tt=0;var e=Ml,t=Ua,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=T.T,T.T=null;var l=j.p;j.p=2;var a=Ke;Ke|=4;try{Sd(e,t.alternate,t)}finally{Ke=a,j.p=l,T.T=n}}Tt=3}}function Jd(){if(Tt===4||Tt===3){Tt=0,sn();var e=Ml,t=Ua,n=al,l=Ld;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Tt=5:(Tt=0,Ua=Ml=null,Fd(e,e.pendingLanes));var a=e.pendingLanes;if(a===0&&(zl=null),Fa(n),t=t.stateNode,Bt&&typeof Bt.onCommitFiberRoot=="function")try{Bt.onCommitFiberRoot(Nl,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=T.T,a=j.p,j.p=2,T.T=null;try{for(var i=e.onRecoverableError,r=0;r<l.length;r++){var d=l[r];i(d.value,{componentStack:d.stack})}}finally{T.T=t,j.p=a}}(al&3)!==0&&Ko(),Ln(e),a=e.pendingLanes,(n&261930)!==0&&(a&42)!==0?e===is?Ti++:(Ti=0,is=e):Ti=0,Ai(0)}}function Fd(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ri(t)))}function Ko(){return Zd(),Kd(),Jd(),$d()}function $d(){if(Tt!==5)return!1;var e=Ml,t=ls;ls=0;var n=Fa(al),l=T.T,a=j.p;try{j.p=32>n?32:n,T.T=null,n=as,as=null;var i=Ml,r=al;if(Tt=0,Ua=Ml=null,al=0,(Ke&6)!==0)throw Error(u(331));var d=Ke;if(Ke|=4,_d(i.current),Ed(i,i.current,r,n),Ke=d,Ai(0,!1),Bt&&typeof Bt.onPostCommitFiberRoot=="function")try{Bt.onPostCommitFiberRoot(Nl,i)}catch{}return!0}finally{j.p=a,T.T=l,Fd(e,t)}}function Wd(e,t,n){t=pn(n,t),t=Hc(e.stateNode,t,2),e=vl(e,t,2),e!==null&&(Bl(e,2),Ln(e))}function Pe(e,t,n){if(e.tag===3)Wd(e,e,n);else for(;t!==null;){if(t.tag===3){Wd(t,e,n);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(zl===null||!zl.has(l))){e=pn(n,e),n=If(2),l=vl(t,n,2),l!==null&&(Pf(n,l,t,e),Bl(l,2),Ln(l));break}}t=t.return}}function cs(e,t,n){var l=e.pingCache;if(l===null){l=e.pingCache=new Gp;var a=new Set;l.set(t,a)}else a=l.get(t),a===void 0&&(a=new Set,l.set(t,a));a.has(n)||(es=!0,a.add(n),e=Kp.bind(null,e,t,n),t.then(e,e))}function Kp(e,t,n){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,lt===e&&(Ge&n)===n&&(pt===4||pt===3&&(Ge&62914560)===Ge&&300>Ut()-Yo?(Ke&2)===0&&Na(e,0):ts|=n,La===Ge&&(La=0)),Ln(e)}function Id(e,t){t===0&&(t=Wi()),e=Gl(e,t),e!==null&&(Bl(e,t),Ln(e))}function Jp(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Id(e,n)}function Fp(e,t){var n=0;switch(e.tag){case 31:case 13:var l=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(u(314))}l!==null&&l.delete(t),Id(e,n)}function $p(e,t){return na(e,t)}var Jo=null,Ba=null,ss=!1,Fo=!1,us=!1,Al=0;function Ln(e){e!==Ba&&e.next===null&&(Ba===null?Jo=Ba=e:Ba=Ba.next=e),Fo=!0,ss||(ss=!0,Ip())}function Ai(e,t){if(!us&&Fo){us=!0;do for(var n=!1,l=Jo;l!==null;){if(e!==0){var a=l.pendingLanes;if(a===0)var i=0;else{var r=l.suspendedLanes,d=l.pingedLanes;i=(1<<31-jt(42|e)+1)-1,i&=a&~(r&~d),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(n=!0,n0(l,i))}else i=Ge,i=ca(l,l===lt?i:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(i&3)===0||Hl(l,i)||(n=!0,n0(l,i));l=l.next}while(n);us=!1}}function Wp(){Pd()}function Pd(){Fo=ss=!1;var e=0;Al!==0&&cm()&&(e=Al);for(var t=Ut(),n=null,l=Jo;l!==null;){var a=l.next,i=e0(l,t);i===0?(l.next=null,n===null?Jo=a:n.next=a,a===null&&(Ba=n)):(n=l,(e!==0||(i&3)!==0)&&(Fo=!0)),l=a}Tt!==0&&Tt!==5||Ai(e),Al!==0&&(Al=0)}function e0(e,t){for(var n=e.suspendedLanes,l=e.pingedLanes,a=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var r=31-jt(i),d=1<<r,g=a[r];g===-1?((d&n)===0||(d&l)!==0)&&(a[r]=Mr(d,t)):g<=t&&(e.expiredLanes|=d),i&=~d}if(t=lt,n=Ge,n=ca(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,n===0||e===t&&(Ie===2||Ie===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&An(l),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||Hl(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(l!==null&&An(l),Fa(n)){case 2:case 8:n=ia;break;case 32:n=En;break;case 268435456:n=Ji;break;default:n=En}return l=t0.bind(null,e),n=na(n,l),e.callbackPriority=t,e.callbackNode=n,t}return l!==null&&l!==null&&An(l),e.callbackPriority=2,e.callbackNode=null,2}function t0(e,t){if(Tt!==0&&Tt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Ko()&&e.callbackNode!==n)return null;var l=Ge;return l=ca(e,e===lt?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(Nd(e,l,t),e0(e,Ut()),e.callbackNode!=null&&e.callbackNode===n?t0.bind(null,e):null)}function n0(e,t){if(Ko())return null;Nd(e,t,!0)}function Ip(){um(function(){(Ke&6)!==0?na(aa,Wp):Pd()})}function fs(){if(Al===0){var e=wa;e===0&&(e=qn,qn<<=1,(qn&261888)===0&&(qn=256)),Al=e}return Al}function l0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:no(""+e)}function a0(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 Pp(e,t,n,l,a){if(t==="submit"&&n&&n.stateNode===a){var i=l0((a[gt]||null).action),r=l.submitter;r&&(t=(t=r[gt]||null)?l0(t.formAction):r.getAttribute("formAction"),t!==null&&(i=t,r=null));var d=new oo("action","action",null,l,a);e.push({event:d,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Al!==0){var g=r?a0(a,r):new FormData(a);_c(n,{pending:!0,data:g,method:a.method,action:i},null,g)}}else typeof i=="function"&&(d.preventDefault(),g=r?a0(a,r):new FormData(a),_c(n,{pending:!0,data:g,method:a.method,action:i},i,g))},currentTarget:a}]})}}for(var ds=0;ds<Jr.length;ds++){var hs=Jr[ds],em=hs.toLowerCase(),tm=hs[0].toUpperCase()+hs.slice(1);wn(em,"on"+tm)}wn(Lu,"onAnimationEnd"),wn(Uu,"onAnimationIteration"),wn(Nu,"onAnimationStart"),wn("dblclick","onDoubleClick"),wn("focusin","onFocus"),wn("focusout","onBlur"),wn(yp,"onTransitionRun"),wn(vp,"onTransitionStart"),wn(bp,"onTransitionCancel"),wn(Hu,"onTransitionEnd"),ut("onMouseEnter",["mouseout","mouseover"]),ut("onMouseLeave",["mouseout","mouseover"]),ut("onPointerEnter",["pointerout","pointerover"]),ut("onPointerLeave",["pointerout","pointerover"]),ye("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ye("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ye("onBeforeInput",["compositionend","keypress","textInput","paste"]),ye("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ye("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ye("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ei="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(" "),nm=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ei));function i0(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var l=e[n],a=l.event;l=l.listeners;e:{var i=void 0;if(t)for(var r=l.length-1;0<=r;r--){var d=l[r],g=d.instance,M=d.currentTarget;if(d=d.listener,g!==i&&a.isPropagationStopped())break e;i=d,a.currentTarget=M;try{i(a)}catch(O){so(O)}a.currentTarget=null,i=g}else for(r=0;r<l.length;r++){if(d=l[r],g=d.instance,M=d.currentTarget,d=d.listener,g!==i&&a.isPropagationStopped())break e;i=d,a.currentTarget=M;try{i(a)}catch(O){so(O)}a.currentTarget=null,i=g}}}}function qe(e,t){var n=t[sa];n===void 0&&(n=t[sa]=new Set);var l=e+"__bubble";n.has(l)||(o0(t,e,2,!1),n.add(l))}function ps(e,t,n){var l=0;t&&(l|=4),o0(n,e,l,t)}var $o="_reactListening"+Math.random().toString(36).slice(2);function ms(e){if(!e[$o]){e[$o]=!0,te.forEach(function(n){n!=="selectionchange"&&(nm.has(n)||ps(n,!1,e),ps(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[$o]||(t[$o]=!0,ps("selectionchange",!1,t))}}function o0(e,t,n,l){switch(U0(t)){case 2:var a=km;break;case 8:a=_m;break;default:a=ks}n=a.bind(null,t,n,e),a=void 0,!Ur||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(a=!0),l?a!==void 0?e.addEventListener(t,n,{capture:!0,passive:a}):e.addEventListener(t,n,!0):a!==void 0?e.addEventListener(t,n,{passive:a}):e.addEventListener(t,n,!1)}function gs(e,t,n,l,a){var i=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var r=l.tag;if(r===3||r===4){var d=l.stateNode.containerInfo;if(d===a)break;if(r===4)for(r=l.return;r!==null;){var g=r.tag;if((g===3||g===4)&&r.stateNode.containerInfo===a)return;r=r.return}for(;d!==null;){if(r=de(d),r===null)return;if(g=r.tag,g===5||g===6||g===26||g===27){l=i=r;continue e}d=d.parentNode}}l=l.return}uu(function(){var M=i,O=Rr(n),B=[];e:{var A=Bu.get(e);if(A!==void 0){var D=oo,ae=e;switch(e){case"keypress":if(ao(n)===0)break e;case"keydown":case"keyup":D=Fh;break;case"focusin":ae="focus",D=jr;break;case"focusout":ae="blur",D=jr;break;case"beforeblur":case"afterblur":D=jr;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":D=hu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":D=Hh;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":D=Ih;break;case Lu:case Uu:case Nu:D=qh;break;case Hu:D=ep;break;case"scroll":case"scrollend":D=Uh;break;case"wheel":D=np;break;case"copy":case"cut":case"paste":D=Gh;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":D=mu;break;case"toggle":case"beforetoggle":D=ap}var Ce=(t&4)!==0,nt=!Ce&&(e==="scroll"||e==="scrollend"),C=Ce?A!==null?A+"Capture":null:A;Ce=[];for(var v=M,z;v!==null;){var N=v;if(z=N.stateNode,N=N.tag,N!==5&&N!==26&&N!==27||z===null||C===null||(N=$a(v,C),N!=null&&Ce.push(Di(v,N,z))),nt)break;v=v.return}0<Ce.length&&(A=new D(A,ae,null,n,O),B.push({event:A,listeners:Ce}))}}if((t&7)===0){e:{if(A=e==="mouseover"||e==="pointerover",D=e==="mouseout"||e==="pointerout",A&&n!==Or&&(ae=n.relatedTarget||n.fromElement)&&(de(ae)||ae[It]))break e;if((D||A)&&(A=O.window===O?O:(A=O.ownerDocument)?A.defaultView||A.parentWindow:window,D?(ae=n.relatedTarget||n.toElement,D=M,ae=ae?de(ae):null,ae!==null&&(nt=m(ae),Ce=ae.tag,ae!==nt||Ce!==5&&Ce!==27&&Ce!==6)&&(ae=null)):(D=null,ae=M),D!==ae)){if(Ce=hu,N="onMouseLeave",C="onMouseEnter",v="mouse",(e==="pointerout"||e==="pointerover")&&(Ce=mu,N="onPointerLeave",C="onPointerEnter",v="pointer"),nt=D==null?A:se(D),z=ae==null?A:se(ae),A=new Ce(N,v+"leave",D,n,O),A.target=nt,A.relatedTarget=z,N=null,de(O)===M&&(Ce=new Ce(C,v+"enter",ae,n,O),Ce.target=z,Ce.relatedTarget=nt,N=Ce),nt=N,D&&ae)t:{for(Ce=lm,C=D,v=ae,z=0,N=C;N;N=Ce(N))z++;N=0;for(var ve=v;ve;ve=Ce(ve))N++;for(;0<z-N;)C=Ce(C),z--;for(;0<N-z;)v=Ce(v),N--;for(;z--;){if(C===v||v!==null&&C===v.alternate){Ce=C;break t}C=Ce(C),v=Ce(v)}Ce=null}else Ce=null;D!==null&&r0(B,A,D,Ce,!1),ae!==null&&nt!==null&&r0(B,nt,ae,Ce,!0)}}e:{if(A=M?se(M):window,D=A.nodeName&&A.nodeName.toLowerCase(),D==="select"||D==="input"&&A.type==="file")var Qe=wu;else if(Su(A))if(zu)Qe=pp;else{Qe=dp;var ce=fp}else D=A.nodeName,!D||D.toLowerCase()!=="input"||A.type!=="checkbox"&&A.type!=="radio"?M&&_r(M.elementType)&&(Qe=wu):Qe=hp;if(Qe&&(Qe=Qe(e,M))){Cu(B,Qe,n,O);break e}ce&&ce(e,A,M),e==="focusout"&&M&&A.type==="number"&&M.memoizedProps.value!=null&&kr(A,"number",A.value)}switch(ce=M?se(M):window,e){case"focusin":(Su(ce)||ce.contentEditable==="true")&&(ma=ce,Qr=M,ai=null);break;case"focusout":ai=Qr=ma=null;break;case"mousedown":Zr=!0;break;case"contextmenu":case"mouseup":case"dragend":Zr=!1,Ou(B,n,O);break;case"selectionchange":if(gp)break;case"keydown":case"keyup":Ou(B,n,O)}var Be;if(Yr)e:{switch(e){case"compositionstart":var Ve="onCompositionStart";break e;case"compositionend":Ve="onCompositionEnd";break e;case"compositionupdate":Ve="onCompositionUpdate";break e}Ve=void 0}else pa?bu(e,n)&&(Ve="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(Ve="onCompositionStart");Ve&&(gu&&n.locale!=="ko"&&(pa||Ve!=="onCompositionStart"?Ve==="onCompositionEnd"&&pa&&(Be=fu()):(fl=O,Nr="value"in fl?fl.value:fl.textContent,pa=!0)),ce=Wo(M,Ve),0<ce.length&&(Ve=new pu(Ve,e,null,n,O),B.push({event:Ve,listeners:ce}),Be?Ve.data=Be:(Be=xu(n),Be!==null&&(Ve.data=Be)))),(Be=op?rp(e,n):cp(e,n))&&(Ve=Wo(M,"onBeforeInput"),0<Ve.length&&(ce=new pu("onBeforeInput","beforeinput",null,n,O),B.push({event:ce,listeners:Ve}),ce.data=Be)),Pp(B,e,M,n,O)}i0(B,t)})}function Di(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Wo(e,t){for(var n=t+"Capture",l=[];e!==null;){var a=e,i=a.stateNode;if(a=a.tag,a!==5&&a!==26&&a!==27||i===null||(a=$a(e,n),a!=null&&l.unshift(Di(e,a,i)),a=$a(e,t),a!=null&&l.push(Di(e,a,i))),e.tag===3)return l;e=e.return}return[]}function lm(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function r0(e,t,n,l,a){for(var i=t._reactName,r=[];n!==null&&n!==l;){var d=n,g=d.alternate,M=d.stateNode;if(d=d.tag,g!==null&&g===l)break;d!==5&&d!==26&&d!==27||M===null||(g=M,a?(M=$a(n,i),M!=null&&r.unshift(Di(n,M,g))):a||(M=$a(n,i),M!=null&&r.push(Di(n,M,g)))),n=n.return}r.length!==0&&e.push({event:t,listeners:r})}var am=/\r\n?/g,im=/\u0000|\uFFFD/g;function c0(e){return(typeof e=="string"?e:""+e).replace(am,`
9
+ `).replace(im,"")}function s0(e,t){return t=c0(t),c0(e)===t}function tt(e,t,n,l,a,i){switch(n){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||fa(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&fa(e,""+l);break;case"className":Gt(e,"class",l);break;case"tabIndex":Gt(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Gt(e,n,l);break;case"style":cu(e,l,i);break;case"data":if(t!=="object"){Gt(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(n);break}l=no(""+l),e.setAttribute(n,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof i=="function"&&(n==="formAction"?(t!=="input"&&tt(e,t,"name",a.name,a,null),tt(e,t,"formEncType",a.formEncType,a,null),tt(e,t,"formMethod",a.formMethod,a,null),tt(e,t,"formTarget",a.formTarget,a,null)):(tt(e,t,"encType",a.encType,a,null),tt(e,t,"method",a.method,a,null),tt(e,t,"target",a.target,a,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(n);break}l=no(""+l),e.setAttribute(n,l);break;case"onClick":l!=null&&(e.onclick=Vn);break;case"onScroll":l!=null&&qe("scroll",e);break;case"onScrollEnd":l!=null&&qe("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(u(61));if(n=l.__html,n!=null){if(a.children!=null)throw Error(u(60));e.innerHTML=n}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}n=no(""+l),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":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,""+l):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":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":l===!0?e.setAttribute(n,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,l):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(n,l):e.removeAttribute(n);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(n):e.setAttribute(n,l);break;case"popover":qe("beforetoggle",e),qe("toggle",e),ul(e,"popover",l);break;case"xlinkActuate":Cn(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Cn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Cn(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Cn(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Cn(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Cn(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Cn(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Cn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Cn(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":ul(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=Rh.get(n)||n,ul(e,n,l))}}function ys(e,t,n,l,a,i){switch(n){case"style":cu(e,l,i);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(u(61));if(n=l.__html,n!=null){if(a.children!=null)throw Error(u(60));e.innerHTML=n}}break;case"children":typeof l=="string"?fa(e,l):(typeof l=="number"||typeof l=="bigint")&&fa(e,""+l);break;case"onScroll":l!=null&&qe("scroll",e);break;case"onScrollEnd":l!=null&&qe("scrollend",e);break;case"onClick":l!=null&&(e.onclick=Vn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!He.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(a=n.endsWith("Capture"),t=n.slice(2,a?n.length-7:void 0),i=e[gt]||null,i=i!=null?i[n]:null,typeof i=="function"&&e.removeEventListener(t,i,a),typeof l=="function")){typeof i!="function"&&i!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,l,a);break e}n in e?e[n]=l:l===!0?e.setAttribute(n,""):ul(e,n,l)}}}function Ot(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":qe("error",e),qe("load",e);var l=!1,a=!1,i;for(i in n)if(n.hasOwnProperty(i)){var r=n[i];if(r!=null)switch(i){case"src":l=!0;break;case"srcSet":a=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:tt(e,t,i,r,n,null)}}a&&tt(e,t,"srcSet",n.srcSet,n,null),l&&tt(e,t,"src",n.src,n,null);return;case"input":qe("invalid",e);var d=i=r=a=null,g=null,M=null;for(l in n)if(n.hasOwnProperty(l)){var O=n[l];if(O!=null)switch(l){case"name":a=O;break;case"type":r=O;break;case"checked":g=O;break;case"defaultChecked":M=O;break;case"value":i=O;break;case"defaultValue":d=O;break;case"children":case"dangerouslySetInnerHTML":if(O!=null)throw Error(u(137,t));break;default:tt(e,t,l,O,n,null)}}au(e,i,d,g,M,r,a,!1);return;case"select":qe("invalid",e),l=r=i=null;for(a in n)if(n.hasOwnProperty(a)&&(d=n[a],d!=null))switch(a){case"value":i=d;break;case"defaultValue":r=d;break;case"multiple":l=d;default:tt(e,t,a,d,n,null)}t=i,n=r,e.multiple=!!l,t!=null?ua(e,!!l,t,!1):n!=null&&ua(e,!!l,n,!0);return;case"textarea":qe("invalid",e),i=a=l=null;for(r in n)if(n.hasOwnProperty(r)&&(d=n[r],d!=null))switch(r){case"value":l=d;break;case"defaultValue":a=d;break;case"children":i=d;break;case"dangerouslySetInnerHTML":if(d!=null)throw Error(u(91));break;default:tt(e,t,r,d,n,null)}ou(e,l,a,i);return;case"option":for(g in n)n.hasOwnProperty(g)&&(l=n[g],l!=null)&&(g==="selected"?e.selected=l&&typeof l!="function"&&typeof l!="symbol":tt(e,t,g,l,n,null));return;case"dialog":qe("beforetoggle",e),qe("toggle",e),qe("cancel",e),qe("close",e);break;case"iframe":case"object":qe("load",e);break;case"video":case"audio":for(l=0;l<Ei.length;l++)qe(Ei[l],e);break;case"image":qe("error",e),qe("load",e);break;case"details":qe("toggle",e);break;case"embed":case"source":case"link":qe("error",e),qe("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(M in n)if(n.hasOwnProperty(M)&&(l=n[M],l!=null))switch(M){case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:tt(e,t,M,l,n,null)}return;default:if(_r(t)){for(O in n)n.hasOwnProperty(O)&&(l=n[O],l!==void 0&&ys(e,t,O,l,n,void 0));return}}for(d in n)n.hasOwnProperty(d)&&(l=n[d],l!=null&&tt(e,t,d,l,n,null))}function om(e,t,n,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var a=null,i=null,r=null,d=null,g=null,M=null,O=null;for(D in n){var B=n[D];if(n.hasOwnProperty(D)&&B!=null)switch(D){case"checked":break;case"value":break;case"defaultValue":g=B;default:l.hasOwnProperty(D)||tt(e,t,D,null,l,B)}}for(var A in l){var D=l[A];if(B=n[A],l.hasOwnProperty(A)&&(D!=null||B!=null))switch(A){case"type":i=D;break;case"name":a=D;break;case"checked":M=D;break;case"defaultChecked":O=D;break;case"value":r=D;break;case"defaultValue":d=D;break;case"children":case"dangerouslySetInnerHTML":if(D!=null)throw Error(u(137,t));break;default:D!==B&&tt(e,t,A,D,l,B)}}Dr(e,r,d,g,M,O,i,a);return;case"select":D=r=d=A=null;for(i in n)if(g=n[i],n.hasOwnProperty(i)&&g!=null)switch(i){case"value":break;case"multiple":D=g;default:l.hasOwnProperty(i)||tt(e,t,i,null,l,g)}for(a in l)if(i=l[a],g=n[a],l.hasOwnProperty(a)&&(i!=null||g!=null))switch(a){case"value":A=i;break;case"defaultValue":d=i;break;case"multiple":r=i;default:i!==g&&tt(e,t,a,i,l,g)}t=d,n=r,l=D,A!=null?ua(e,!!n,A,!1):!!l!=!!n&&(t!=null?ua(e,!!n,t,!0):ua(e,!!n,n?[]:"",!1));return;case"textarea":D=A=null;for(d in n)if(a=n[d],n.hasOwnProperty(d)&&a!=null&&!l.hasOwnProperty(d))switch(d){case"value":break;case"children":break;default:tt(e,t,d,null,l,a)}for(r in l)if(a=l[r],i=n[r],l.hasOwnProperty(r)&&(a!=null||i!=null))switch(r){case"value":A=a;break;case"defaultValue":D=a;break;case"children":break;case"dangerouslySetInnerHTML":if(a!=null)throw Error(u(91));break;default:a!==i&&tt(e,t,r,a,l,i)}iu(e,A,D);return;case"option":for(var ae in n)A=n[ae],n.hasOwnProperty(ae)&&A!=null&&!l.hasOwnProperty(ae)&&(ae==="selected"?e.selected=!1:tt(e,t,ae,null,l,A));for(g in l)A=l[g],D=n[g],l.hasOwnProperty(g)&&A!==D&&(A!=null||D!=null)&&(g==="selected"?e.selected=A&&typeof A!="function"&&typeof A!="symbol":tt(e,t,g,A,l,D));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 Ce in n)A=n[Ce],n.hasOwnProperty(Ce)&&A!=null&&!l.hasOwnProperty(Ce)&&tt(e,t,Ce,null,l,A);for(M in l)if(A=l[M],D=n[M],l.hasOwnProperty(M)&&A!==D&&(A!=null||D!=null))switch(M){case"children":case"dangerouslySetInnerHTML":if(A!=null)throw Error(u(137,t));break;default:tt(e,t,M,A,l,D)}return;default:if(_r(t)){for(var nt in n)A=n[nt],n.hasOwnProperty(nt)&&A!==void 0&&!l.hasOwnProperty(nt)&&ys(e,t,nt,void 0,l,A);for(O in l)A=l[O],D=n[O],!l.hasOwnProperty(O)||A===D||A===void 0&&D===void 0||ys(e,t,O,A,l,D);return}}for(var C in n)A=n[C],n.hasOwnProperty(C)&&A!=null&&!l.hasOwnProperty(C)&&tt(e,t,C,null,l,A);for(B in l)A=l[B],D=n[B],!l.hasOwnProperty(B)||A===D||A==null&&D==null||tt(e,t,B,A,l,D)}function u0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function rm(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),l=0;l<n.length;l++){var a=n[l],i=a.transferSize,r=a.initiatorType,d=a.duration;if(i&&d&&u0(r)){for(r=0,d=a.responseEnd,l+=1;l<n.length;l++){var g=n[l],M=g.startTime;if(M>d)break;var O=g.transferSize,B=g.initiatorType;O&&u0(B)&&(g=g.responseEnd,r+=O*(g<d?1:(d-M)/(g-M)))}if(--l,t+=8*(i+r)/(a.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 vs=null,bs=null;function Io(e){return e.nodeType===9?e:e.ownerDocument}function f0(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 d0(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 xs(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 Ss=null;function cm(){var e=window.event;return e&&e.type==="popstate"?e===Ss?!1:(Ss=e,!0):(Ss=null,!1)}var h0=typeof setTimeout=="function"?setTimeout:void 0,sm=typeof clearTimeout=="function"?clearTimeout:void 0,p0=typeof Promise=="function"?Promise:void 0,um=typeof queueMicrotask=="function"?queueMicrotask:typeof p0<"u"?function(e){return p0.resolve(null).then(e).catch(fm)}:h0;function fm(e){setTimeout(function(){throw e})}function El(e){return e==="head"}function m0(e,t){var n=t,l=0;do{var a=n.nextSibling;if(e.removeChild(n),a&&a.nodeType===8)if(n=a.data,n==="/$"||n==="/&"){if(l===0){e.removeChild(a),Ga(t);return}l--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")l++;else if(n==="html")ki(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,ki(n);for(var i=n.firstChild;i;){var r=i.nextSibling,d=i.nodeName;i[X]||d==="SCRIPT"||d==="STYLE"||d==="LINK"&&i.rel.toLowerCase()==="stylesheet"||n.removeChild(i),i=r}}else n==="body"&&ki(e.ownerDocument.body);n=a}while(n);Ga(t)}function g0(e,t){var n=e;e=0;do{var l=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||""),l&&l.nodeType===8)if(n=l.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=l}while(n)}function Cs(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":Cs(n),ie(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function dm(e,t,n,l){for(;e.nodeType===1;){var a=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[X])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(i=e.getAttribute("rel"),i==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(i!==a.rel||e.getAttribute("href")!==(a.href==null||a.href===""?null:a.href)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin)||e.getAttribute("title")!==(a.title==null?null:a.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(i=e.getAttribute("src"),(i!==(a.src==null?null:a.src)||e.getAttribute("type")!==(a.type==null?null:a.type)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var i=a.name==null?null:""+a.name;if(a.type==="hidden"&&e.getAttribute("name")===i)return e}else return e;if(e=bn(e.nextSibling),e===null)break}return null}function hm(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=bn(e.nextSibling),e===null))return null;return e}function y0(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=bn(e.nextSibling),e===null))return null;return e}function ws(e){return e.data==="$?"||e.data==="$~"}function zs(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function pm(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var l=function(){t(),n.removeEventListener("DOMContentLoaded",l)};n.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function bn(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 Ms=null;function v0(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return bn(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function b0(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 x0(e,t,n){switch(t=Io(n),e){case"html":if(e=t.documentElement,!e)throw Error(u(452));return e;case"head":if(e=t.head,!e)throw Error(u(453));return e;case"body":if(e=t.body,!e)throw Error(u(454));return e;default:throw Error(u(451))}}function ki(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ie(e)}var xn=new Map,S0=new Set;function Po(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var il=j.d;j.d={f:mm,r:gm,D:ym,C:vm,L:bm,m:xm,X:Cm,S:Sm,M:wm};function mm(){var e=il.f(),t=Xo();return e||t}function gm(e){var t=ze(e);t!==null&&t.tag===5&&t.type==="form"?Bf(t):il.r(e)}var ja=typeof document>"u"?null:document;function C0(e,t,n){var l=ja;if(l&&typeof t=="string"&&t){var a=dn(t);a='link[rel="'+e+'"][href="'+a+'"]',typeof n=="string"&&(a+='[crossorigin="'+n+'"]'),S0.has(a)||(S0.add(a),e={rel:e,crossOrigin:n,href:t},l.querySelector(a)===null&&(t=l.createElement("link"),Ot(t,"link",e),ge(t),l.head.appendChild(t)))}}function ym(e){il.D(e),C0("dns-prefetch",e,null)}function vm(e,t){il.C(e,t),C0("preconnect",e,t)}function bm(e,t,n){il.L(e,t,n);var l=ja;if(l&&e&&t){var a='link[rel="preload"][as="'+dn(t)+'"]';t==="image"&&n&&n.imageSrcSet?(a+='[imagesrcset="'+dn(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(a+='[imagesizes="'+dn(n.imageSizes)+'"]')):a+='[href="'+dn(e)+'"]';var i=a;switch(t){case"style":i=qa(e);break;case"script":i=Ya(e)}xn.has(i)||(e=H({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),xn.set(i,e),l.querySelector(a)!==null||t==="style"&&l.querySelector(_i(i))||t==="script"&&l.querySelector(Oi(i))||(t=l.createElement("link"),Ot(t,"link",e),ge(t),l.head.appendChild(t)))}}function xm(e,t){il.m(e,t);var n=ja;if(n&&e){var l=t&&typeof t.as=="string"?t.as:"script",a='link[rel="modulepreload"][as="'+dn(l)+'"][href="'+dn(e)+'"]',i=a;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=Ya(e)}if(!xn.has(i)&&(e=H({rel:"modulepreload",href:e},t),xn.set(i,e),n.querySelector(a)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Oi(i)))return}l=n.createElement("link"),Ot(l,"link",e),ge(l),n.head.appendChild(l)}}}function Sm(e,t,n){il.S(e,t,n);var l=ja;if(l&&e){var a=Le(l).hoistableStyles,i=qa(e);t=t||"default";var r=a.get(i);if(!r){var d={loading:0,preload:null};if(r=l.querySelector(_i(i)))d.loading=5;else{e=H({rel:"stylesheet",href:e,"data-precedence":t},n),(n=xn.get(i))&&Ts(e,n);var g=r=l.createElement("link");ge(g),Ot(g,"link",e),g._p=new Promise(function(M,O){g.onload=M,g.onerror=O}),g.addEventListener("load",function(){d.loading|=1}),g.addEventListener("error",function(){d.loading|=2}),d.loading|=4,er(r,t,l)}r={type:"stylesheet",instance:r,count:1,state:d},a.set(i,r)}}}function Cm(e,t){il.X(e,t);var n=ja;if(n&&e){var l=Le(n).hoistableScripts,a=Ya(e),i=l.get(a);i||(i=n.querySelector(Oi(a)),i||(e=H({src:e,async:!0},t),(t=xn.get(a))&&As(e,t),i=n.createElement("script"),ge(i),Ot(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},l.set(a,i))}}function wm(e,t){il.M(e,t);var n=ja;if(n&&e){var l=Le(n).hoistableScripts,a=Ya(e),i=l.get(a);i||(i=n.querySelector(Oi(a)),i||(e=H({src:e,async:!0,type:"module"},t),(t=xn.get(a))&&As(e,t),i=n.createElement("script"),ge(i),Ot(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},l.set(a,i))}}function w0(e,t,n,l){var a=(a=Ee.current)?Po(a):null;if(!a)throw Error(u(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=qa(n.href),n=Le(a).hoistableStyles,l=n.get(t),l||(l={type:"style",instance:null,count:0,state:null},n.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=qa(n.href);var i=Le(a).hoistableStyles,r=i.get(e);if(r||(a=a.ownerDocument||a,r={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,r),(i=a.querySelector(_i(e)))&&!i._p&&(r.instance=i,r.state.loading=5),xn.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},xn.set(e,n),i||zm(a,e,n,r.state))),t&&l===null)throw Error(u(528,""));return r}if(t&&l!==null)throw Error(u(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ya(n),n=Le(a).hoistableScripts,l=n.get(t),l||(l={type:"script",instance:null,count:0,state:null},n.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(u(444,e))}}function qa(e){return'href="'+dn(e)+'"'}function _i(e){return'link[rel="stylesheet"]['+e+"]"}function z0(e){return H({},e,{"data-precedence":e.precedence,precedence:null})}function zm(e,t,n,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),Ot(t,"link",n),ge(t),e.head.appendChild(t))}function Ya(e){return'[src="'+dn(e)+'"]'}function Oi(e){return"script[async]"+e}function M0(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+dn(n.href)+'"]');if(l)return t.instance=l,ge(l),l;var a=H({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),ge(l),Ot(l,"style",a),er(l,n.precedence,e),t.instance=l;case"stylesheet":a=qa(n.href);var i=e.querySelector(_i(a));if(i)return t.state.loading|=4,t.instance=i,ge(i),i;l=z0(n),(a=xn.get(a))&&Ts(l,a),i=(e.ownerDocument||e).createElement("link"),ge(i);var r=i;return r._p=new Promise(function(d,g){r.onload=d,r.onerror=g}),Ot(i,"link",l),t.state.loading|=4,er(i,n.precedence,e),t.instance=i;case"script":return i=Ya(n.src),(a=e.querySelector(Oi(i)))?(t.instance=a,ge(a),a):(l=n,(a=xn.get(i))&&(l=H({},n),As(l,a)),e=e.ownerDocument||e,a=e.createElement("script"),ge(a),Ot(a,"link",l),e.head.appendChild(a),t.instance=a);case"void":return null;default:throw Error(u(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,er(l,n.precedence,e));return t.instance}function er(e,t,n){for(var l=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=l.length?l[l.length-1]:null,i=a,r=0;r<l.length;r++){var d=l[r];if(d.dataset.precedence===t)i=d;else if(i!==a)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Ts(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function As(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var tr=null;function T0(e,t,n){if(tr===null){var l=new Map,a=tr=new Map;a.set(n,l)}else a=tr,l=a.get(n),l||(l=new Map,a.set(n,l));if(l.has(e))return l;for(l.set(e,null),n=n.getElementsByTagName(e),a=0;a<n.length;a++){var i=n[a];if(!(i[X]||i[xt]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var r=i.getAttribute(t)||"";r=e+r;var d=l.get(r);d?d.push(i):l.set(r,[i])}}return l}function A0(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function Mm(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 E0(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Tm(e,t,n,l){if(n.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var a=qa(l.href),i=t.querySelector(_i(a));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=nr.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=i,ge(i);return}i=t.ownerDocument||t,l=z0(l),(a=xn.get(a))&&Ts(l,a),i=i.createElement("link"),ge(i);var r=i;r._p=new Promise(function(d,g){r.onload=d,r.onerror=g}),Ot(i,"link",l),n.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=nr.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Es=0;function Am(e,t){return e.stylesheets&&e.count===0&&ar(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var l=setTimeout(function(){if(e.stylesheets&&ar(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&Es===0&&(Es=62500*rm());var a=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ar(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>Es?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(a)}}:null}function nr(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ar(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var lr=null;function ar(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,lr=new Map,t.forEach(Em,e),lr=null,nr.call(e))}function Em(e,t){if(!(t.state.loading&4)){var n=lr.get(e);if(n)var l=n.get(null);else{n=new Map,lr.set(e,n);for(var a=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<a.length;i++){var r=a[i];(r.nodeName==="LINK"||r.getAttribute("media")!=="not all")&&(n.set(r.dataset.precedence,r),l=r)}l&&n.set(null,l)}a=t.instance,r=a.getAttribute("data-precedence"),i=n.get(r)||l,i===l&&n.set(null,a),n.set(r,a),this.count++,l=nr.bind(this),a.addEventListener("load",l),a.addEventListener("error",l),i?i.parentNode.insertBefore(a,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(a,e.firstChild)),t.state.loading|=4}}var Ri={$$typeof:ne,Provider:null,Consumer:null,_currentValue:P,_currentValue2:P,_threadCount:0};function Dm(e,t,n,l,a,i,r,d,g){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=Ja(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ja(0),this.hiddenUpdates=Ja(null),this.identifierPrefix=l,this.onUncaughtError=a,this.onCaughtError=i,this.onRecoverableError=r,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=g,this.incompleteTransitions=new Map}function D0(e,t,n,l,a,i,r,d,g,M,O,B){return e=new Dm(e,t,n,r,g,M,O,B,d),t=1,i===!0&&(t|=24),i=tn(3,null,null,t),e.current=i,i.stateNode=e,t=rc(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:l,isDehydrated:n,cache:t},fc(i),e}function k0(e){return e?(e=va,e):va}function _0(e,t,n,l,a,i){a=k0(a),l.context===null?l.context=a:l.pendingContext=a,l=yl(t),l.payload={element:n},i=i===void 0?null:i,i!==null&&(l.callback=i),n=vl(e,l,t),n!==null&&(Jt(n,e,t),fi(n,e,t))}function O0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Ds(e,t){O0(e,t),(e=e.alternate)&&O0(e,t)}function R0(e){if(e.tag===13||e.tag===31){var t=Gl(e,67108864);t!==null&&Jt(t,e,67108864),Ds(e,67108864)}}function L0(e){if(e.tag===13||e.tag===31){var t=rn();t=un(t);var n=Gl(e,t);n!==null&&Jt(n,e,t),Ds(e,t)}}var ir=!0;function km(e,t,n,l){var a=T.T;T.T=null;var i=j.p;try{j.p=2,ks(e,t,n,l)}finally{j.p=i,T.T=a}}function _m(e,t,n,l){var a=T.T;T.T=null;var i=j.p;try{j.p=8,ks(e,t,n,l)}finally{j.p=i,T.T=a}}function ks(e,t,n,l){if(ir){var a=_s(l);if(a===null)gs(e,t,l,or,n),N0(e,l);else if(Rm(a,e,t,n,l))l.stopPropagation();else if(N0(e,l),t&4&&-1<Om.indexOf(e)){for(;a!==null;){var i=ze(a);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var r=kn(i.pendingLanes);if(r!==0){var d=i;for(d.pendingLanes|=2,d.entangledLanes|=2;r;){var g=1<<31-jt(r);d.entanglements[1]|=g,r&=~g}Ln(i),(Ke&6)===0&&(Go=Ut()+500,Ai(0))}}break;case 31:case 13:d=Gl(i,2),d!==null&&Jt(d,i,2),Xo(),Ds(i,2)}if(i=_s(l),i===null&&gs(e,t,l,or,n),i===a)break;a=i}a!==null&&l.stopPropagation()}else gs(e,t,l,null,n)}}function _s(e){return e=Rr(e),Os(e)}var or=null;function Os(e){if(or=null,e=de(e),e!==null){var t=m(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=k(t),e!==null)return e;e=null}else if(n===31){if(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 or=e,null}function U0(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(la()){case aa:return 2;case ia:return 8;case En:case Ka:return 32;case Ji:return 268435456;default:return 32}default:return 32}}var Rs=!1,Dl=null,kl=null,_l=null,Li=new Map,Ui=new Map,Ol=[],Om="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 N0(e,t){switch(e){case"focusin":case"focusout":Dl=null;break;case"dragenter":case"dragleave":kl=null;break;case"mouseover":case"mouseout":_l=null;break;case"pointerover":case"pointerout":Li.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ui.delete(t.pointerId)}}function Ni(e,t,n,l,a,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:l,nativeEvent:i,targetContainers:[a]},t!==null&&(t=ze(t),t!==null&&R0(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function Rm(e,t,n,l,a){switch(t){case"focusin":return Dl=Ni(Dl,e,t,n,l,a),!0;case"dragenter":return kl=Ni(kl,e,t,n,l,a),!0;case"mouseover":return _l=Ni(_l,e,t,n,l,a),!0;case"pointerover":var i=a.pointerId;return Li.set(i,Ni(Li.get(i)||null,e,t,n,l,a)),!0;case"gotpointercapture":return i=a.pointerId,Ui.set(i,Ni(Ui.get(i)||null,e,t,n,l,a)),!0}return!1}function H0(e){var t=de(e.target);if(t!==null){var n=m(t);if(n!==null){if(t=n.tag,t===13){if(t=k(n),t!==null){e.blockedOn=t,Gn(e.priority,function(){L0(n)});return}}else if(t===31){if(t=_(n),t!==null){e.blockedOn=t,Gn(e.priority,function(){L0(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 rr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=_s(e.nativeEvent);if(n===null){n=e.nativeEvent;var l=new n.constructor(n.type,n);Or=l,n.target.dispatchEvent(l),Or=null}else return t=ze(n),t!==null&&R0(t),e.blockedOn=n,!1;t.shift()}return!0}function B0(e,t,n){rr(e)&&n.delete(t)}function Lm(){Rs=!1,Dl!==null&&rr(Dl)&&(Dl=null),kl!==null&&rr(kl)&&(kl=null),_l!==null&&rr(_l)&&(_l=null),Li.forEach(B0),Ui.forEach(B0)}function cr(e,t){e.blockedOn===t&&(e.blockedOn=null,Rs||(Rs=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,Lm)))}var sr=null;function j0(e){sr!==e&&(sr=e,o.unstable_scheduleCallback(o.unstable_NormalPriority,function(){sr===e&&(sr=null);for(var t=0;t<e.length;t+=3){var n=e[t],l=e[t+1],a=e[t+2];if(typeof l!="function"){if(Os(l||n)===null)continue;break}var i=ze(n);i!==null&&(e.splice(t,3),t-=3,_c(i,{pending:!0,data:a,method:n.method,action:l},l,a))}}))}function Ga(e){function t(g){return cr(g,e)}Dl!==null&&cr(Dl,e),kl!==null&&cr(kl,e),_l!==null&&cr(_l,e),Li.forEach(t),Ui.forEach(t);for(var n=0;n<Ol.length;n++){var l=Ol[n];l.blockedOn===e&&(l.blockedOn=null)}for(;0<Ol.length&&(n=Ol[0],n.blockedOn===null);)H0(n),n.blockedOn===null&&Ol.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(l=0;l<n.length;l+=3){var a=n[l],i=n[l+1],r=a[gt]||null;if(typeof i=="function")r||j0(n);else if(r){var d=null;if(i&&i.hasAttribute("formAction")){if(a=i,r=i[gt]||null)d=r.formAction;else if(Os(a)!==null)continue}else d=r.action;typeof d=="function"?n[l+1]=d:(n.splice(l,3),l-=3),j0(n)}}}function q0(){function e(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(r){return a=r})},focusReset:"manual",scroll:"manual"})}function t(){a!==null&&(a(),a=null),l||setTimeout(n,20)}function n(){if(!l&&!navigation.transition){var i=navigation.currentEntry;i&&i.url!=null&&navigation.navigate(i.url,{state:i.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,a=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),a!==null&&(a(),a=null)}}}function Ls(e){this._internalRoot=e}ur.prototype.render=Ls.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(u(409));var n=t.current,l=rn();_0(n,l,e,t,null,null)},ur.prototype.unmount=Ls.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;_0(e.current,2,null,e,null,null),Xo(),t[It]=null}};function ur(e){this._internalRoot=e}ur.prototype.unstable_scheduleHydration=function(e){if(e){var t=Yn();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ol.length&&t!==0&&t<Ol[n].priority;n++);Ol.splice(n,0,e),n===0&&H0(e)}};var Y0=s.version;if(Y0!=="19.2.4")throw Error(u(527,Y0,"19.2.4"));j.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(u(188)):(e=Object.keys(e).join(","),Error(u(268,e)));return e=S(t),e=e!==null?G(e):null,e=e===null?null:e.stateNode,e};var Um={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:T,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var fr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!fr.isDisabled&&fr.supportsFiber)try{Nl=fr.inject(Um),Bt=fr}catch{}}return ji.createRoot=function(e,t){if(!p(e))throw Error(u(299));var n=!1,l="",a=Jf,i=Ff,r=$f;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(a=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(r=t.onRecoverableError)),t=D0(e,1,!1,null,null,n,l,null,a,i,r,q0),e[It]=t.current,ms(e),new Ls(t)},ji.hydrateRoot=function(e,t,n){if(!p(e))throw Error(u(299));var l=!1,a="",i=Jf,r=Ff,d=$f,g=null;return n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onUncaughtError!==void 0&&(i=n.onUncaughtError),n.onCaughtError!==void 0&&(r=n.onCaughtError),n.onRecoverableError!==void 0&&(d=n.onRecoverableError),n.formState!==void 0&&(g=n.formState)),t=D0(e,1,!0,t,n??null,l,a,g,i,r,d,q0),t.context=k0(null),n=t.current,l=rn(),l=un(l),a=yl(l),a.callback=null,vl(n,a,l),n=l,t.current.lanes=n,Bl(t,n),Ln(t),e[It]=t.current,ms(e),new ur(t)},ji.version="19.2.4",ji}var rh;function Y1(){if(rh)return qs.exports;rh=1;function o(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(o)}catch(s){console.error(s)}}return o(),qs.exports=q1(),qs.exports}var G1=Y1(),ch=function(s,h){var u=arguments;if(h==null||!Zi.call(h,"css"))return w.createElement.apply(void 0,u);var p=u.length,m=new Array(p);m[0]=eu,m[1]=Ps(s,h);for(var k=2;k<p;k++)m[k]=u[k];return w.createElement.apply(null,m)};(function(o){var s;s||(s=o.JSX||(o.JSX={}))})(ch||(ch={}));function b(){for(var o=arguments.length,s=new Array(o),h=0;h<o;h++)s[h]=arguments[h];return Ch(s)}function Bn(){var o=b.apply(void 0,arguments),s="animation-"+o.name;return{name:s,styles:"@keyframes "+s+"{"+o.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}const V1={showProgress:!1,progressTitle:"",progressState:{current:0,total:0,percent:0,status:"processing"},showDeleteConfirm:!1,showMoveModal:!1,showSyncConfirm:!1,showProcessConfirm:!1,actionPaths:[],syncImageCount:0,syncHasRemote:!1,syncHasLocal:!1,processMode:"generate"},X1={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:()=>{},scanRequested:!1,triggerScan:()=>{},clearScanRequest:()=>{},searchQuery:"",setSearchQuery:()=>{},error:null,showError:()=>{},clearError:()=>{},fileItems:[],setFileItems:()=>{},actionState:V1,requestDelete:()=>{},requestMove:()=>{},requestSync:()=>{},requestDownload:()=>{},requestProcess:()=>{},setProcessMode:()=>{},confirmDelete:async()=>{},confirmMove:async()=>{},confirmSync:async()=>{},confirmProcess:async()=>{},cancelAction:()=>{},closeProgress:()=>{},stopProcessing:()=>{},abortController:null,deleteOrphans:async()=>{}},zh=w.createContext(X1);function Qa(){return w.useContext(zh)}const Sr="-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Ubuntu, sans-serif",f={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",danger:"#df1b41",dangerHover:"#c41535",dangerLight:"#fff5f7",imagesFolder:"#8b5cf6"},F={xs:"13px",sm:"14px",base:"16px",lg:"19px",xl:"22px"},Ki=b("font-family:",Sr,";font-size:",F.base,";line-height:1.5;color:",f.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;}",""),Q1=Bn`
10
+ from { opacity: 0; }
11
+ to { opacity: 1; }
12
+ `,Z1=Bn`
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
+ `,K1=Bn`
22
+ from { transform: rotate(0deg); }
23
+ to { transform: rotate(360deg); }
24
+ `,Me={overlay:b("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:",Q1," 0.15s ease-out;font-family:",Sr,";",""),modal:b(Ki," background-color:",f.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:",Z1," 0.2s ease-out;overflow:hidden;",""),header:{name:"nsgk6m",styles:"padding:24px 24px 0"},title:b("font-size:",F.lg,";font-weight:600;color:",f.text,";margin:0;letter-spacing:-0.02em;",""),body:{name:"5e7rpo",styles:"padding:12px 24px 24px"},message:b("font-size:",F.base,";color:",f.textSecondary,";margin:0;line-height:1.6;",""),footer:b("display:flex;justify-content:flex-end;gap:12px;padding:16px 24px;border-top:1px solid ",f.border,";background-color:",f.background,";",""),btn:b("padding:10px 18px;font-size:",F.base,";font-weight:500;border-radius:6px;cursor:pointer;transition:all 0.15s ease;letter-spacing:-0.01em;",""),btnCancel:b("background-color:",f.surface,";border:1px solid ",f.border,";color:",f.text,";&:hover{background-color:",f.surfaceHover,";border-color:",f.borderHover,";}",""),btnConfirm:b("background-color:",f.primary,";border:1px solid ",f.primary,";color:white;&:hover{background-color:",f.primaryHover,";border-color:",f.primaryHover,";}",""),btnDanger:b("background-color:",f.danger,";border:1px solid ",f.danger,";color:white;&:hover{background-color:",f.dangerHover,";border-color:",f.dangerHover,";}","")};function qi({title:o,message:s,confirmLabel:h="Confirm",cancelLabel:u="Cancel",variant:p="default",onConfirm:m,onCancel:k}){return c("div",{css:Me.overlay,onClick:k,children:x("div",{css:Me.modal,onClick:_=>_.stopPropagation(),children:[c("div",{css:Me.header,children:c("h3",{css:Me.title,children:o})}),c("div",{css:Me.body,children:c("p",{css:Me.message,children:s})}),x("div",{css:Me.footer,children:[c("button",{css:[Me.btn,Me.btnCancel,"",""],onClick:k,children:u}),c("button",{css:[Me.btn,p==="danger"?Me.btnDanger:Me.btnConfirm,"",""],onClick:m,children:h})]})]})})}const J1={input:b("width:100%;padding:10px 12px;font-size:",F.base,";border:1px solid ",f.border,";border-radius:6px;background:",f.surface,";color:",f.text,";margin-top:12px;transition:all 0.15s ease;&:focus{outline:none;border-color:",f.primary,";box-shadow:0 0 0 2px ",f.primaryLight,";}&::placeholder{color:",f.textMuted,";}","")};function gr({title:o,message:s,inputLabel:h,defaultValue:u="",placeholder:p,confirmLabel:m="Confirm",cancelLabel:k="Cancel",isLoading:_=!1,loadingLabel:R="Processing...",onConfirm:S,onCancel:G}){const[H,Q]=dh.useState(u),le=U=>{U.preventDefault(),H.trim()&&!_&&S(H.trim())};return c("div",{css:Me.overlay,onClick:_?void 0:G,children:c("div",{css:Me.modal,onClick:U=>U.stopPropagation(),children:x("form",{onSubmit:le,children:[c("div",{css:Me.header,children:c("h3",{css:Me.title,children:o})}),x("div",{css:Me.body,children:[s&&c("p",{css:Me.message,children:s}),h&&c("label",{css:Me.message,children:h}),c("input",{css:J1.input,type:"text",value:H,onChange:U=>Q(U.target.value),placeholder:p,autoFocus:!0,disabled:_})]}),x("div",{css:Me.footer,children:[c("button",{type:"button",css:[Me.btn,Me.btnCancel,"",""],onClick:G,disabled:_,children:k}),c("button",{type:"submit",css:[Me.btn,Me.btnConfirm,"",""],disabled:!H.trim()||_,children:_?x(bt,{children:[c("span",{css:b("display:inline-block;width:14px;height:14px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:",K1," 0.75s linear infinite;margin-right:6px;","")}),R]}):m})]})]})})})}function Mh({title:o,message:s,buttonLabel:h="OK",onClose:u}){return c("div",{css:Me.overlay,onClick:u,children:x("div",{css:Me.modal,onClick:p=>p.stopPropagation(),children:[c("div",{css:Me.header,children:c("h3",{css:Me.title,children:o})}),c("div",{css:Me.body,children:c("p",{css:Me.message,children:s})}),c("div",{css:Me.footer,children:c("button",{css:[Me.btn,Me.btnConfirm,"",""],onClick:u,children:h})})]})})}const Ll={progressContainer:{name:"yz1nei",styles:"margin-top:16px"},progressBar:b("width:100%;height:8px;background-color:",f.background,";border-radius:4px;overflow:hidden;margin-bottom:12px;",""),progressFill:b("height:100%;background:linear-gradient(90deg, ",f.primary,", ",f.primaryHover,");border-radius:4px;transition:width 0.3s ease;",""),progressText:b("font-size:",F.sm,";color:",f.textSecondary,";margin:0;display:flex;justify-content:space-between;align-items:center;",""),currentFile:b("font-size:",F.xs,";color:",f.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:b("font-size:",F.xs,";color:#991b1b;margin:0 0 4px;&:last-child{margin-bottom:0;}","")};function tu({title:o,progress:s,onClose:h,onDeleteOrphans:u,onStop:p}){const m=s.status==="complete",k=s.status==="error",_=s.status==="stopped",R=s.status==="stopping",S=m||k||_,G=!S||R;return c("div",{css:Me.overlay,children:x("div",{css:Me.modal,onClick:H=>H.stopPropagation(),children:[c("div",{css:Me.header,children:c("h3",{css:Me.title,children:o})}),c("div",{css:Me.body,children:k?c("p",{css:Me.message,children:s.message||"An error occurred"}):_?x("p",{css:Me.message,children:["Processing stopped. Processed ",s.processed??s.current," image",(s.processed??s.current)!==1?"s":""," before stopping."]}):m?x(bt,{children:[x("p",{css:Me.message,children:[s.message?s.message:s.isMove?x(bt,{children:["Moved ",s.processed," file",s.processed!==1?"s":"",".",s.errors!==void 0&&s.errors>0?x(bt,{children:[" ",s.errors," error",s.errors!==1?"s":""," occurred."]}):null]}):s.isScan?x(bt,{children:[s.alreadyProcessed!==void 0&&s.alreadyProcessed>0?x(bt,{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?x(bt,{children:[" Removed ",s.orphanedEntries," orphaned entr",s.orphanedEntries!==1?"ies":"y","."]}):null,s.pendingUpdates!==void 0&&s.pendingUpdates>0?x(bt,{children:[" ",s.pendingUpdates," file",s.pendingUpdates!==1?"s have":" has"," local updates pending."]}):null]}):x(bt,{children:["Processed ",s.processed," new image",s.processed!==1?"s":"",".",s.alreadyProcessed!==void 0&&s.alreadyProcessed>0?x(bt,{children:[" ",s.alreadyProcessed," already processed."]}):null]}),s.orphansRemoved!==void 0&&s.orphansRemoved>0?x(bt,{children:[" Removed ",s.orphansRemoved," orphaned thumbnail",s.orphansRemoved!==1?"s":"","."]}):null]}),s.errorMessages&&s.errorMessages.length>0&&x("div",{css:Ll.errorList,children:[s.errorMessages.slice(0,10).map((H,Q)=>c("p",{css:Ll.errorItem,children:H},Q)),s.errorMessages.length>10&&x("p",{css:Ll.errorItem,children:["...and ",s.errorMessages.length-10," more"]})]})]}):x(bt,{children:[c("p",{css:Me.message,children:s.status==="cleanup"?s.message||"Cleaning up...":s.message||"Processing..."}),x("div",{css:Ll.progressContainer,children:[c("div",{css:Ll.progressBar,children:c("div",{css:Ll.progressFill,style:{width:`${s.percent}%`}})}),x("div",{css:Ll.progressText,children:[x("span",{children:[s.current," of ",s.total]}),x("span",{children:[s.percent,"%"]})]}),s.currentFile&&c("p",{css:Ll.currentFile,title:s.currentFile,children:s.currentFile})]})]})}),x("div",{css:Me.footer,children:[G&&p&&c("button",{css:[Me.btn,Me.btnDanger,"",""],onClick:p,disabled:s.status==="stopping",children:s.status==="stopping"?"Stopping...":"Stop"}),S&&s.orphanedFiles&&s.orphanedFiles.length>0&&u&&x("button",{css:[Me.btn,Me.btnDanger,"",""],onClick:u,children:["Delete ",s.orphanedFiles.length," Orphan",s.orphanedFiles.length!==1?"s":""]}),S&&c("button",{css:[Me.btn,Me.btnConfirm,"",""],onClick:h,children:"Done"})]})]})})}const F1=Bn`
25
+ from { opacity: 0; }
26
+ to { opacity: 1; }
27
+ `,$1=Bn`
28
+ from {
29
+ opacity: 0;
30
+ transform: translateY(-8px) scale(0.98);
31
+ }
32
+ to {
33
+ opacity: 1;
34
+ transform: translateY(0) scale(1);
35
+ }
36
+ `,mt={overlay:b("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:",F1," 0.15s ease-out;font-family:",Sr,";",""),modal:b(Ki," background-color:",f.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:",$1," 0.2s ease-out;overflow:hidden;",""),header:{name:"nsgk6m",styles:"padding:24px 24px 0"},title:b("font-size:",F.lg,";font-weight:600;color:",f.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:b("font-size:",F.base,";color:",f.textSecondary,";margin:0 0 16px;line-height:1.6;",""),folderList:{name:"1axgfg3",styles:"display:flex;flex-direction:column;gap:0"},folderItem:b("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:",f.surfaceHover,";}",""),treeIndent:{name:"197dxto",styles:"display:flex;align-items:center;height:100%"},treeLine:b("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 ",f.textSecondary,";}&::after{content:'';position:absolute;left:8px;top:50%;width:8px;height:0;border-top:1px dashed ",f.textSecondary,";}",""),folderItemSelected:b("background-color:",f.primaryLight,";border-color:",f.primary,";&:hover{background-color:",f.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:b("font-size:",F.base,";color:",f.text,";flex:1;",""),footer:b("display:flex;justify-content:flex-end;gap:12px;padding:16px 24px;border-top:1px solid ",f.border,";background-color:",f.background,";",""),btn:b("padding:10px 18px;font-size:",F.base,";font-weight:500;border-radius:6px;cursor:pointer;transition:all 0.15s ease;letter-spacing:-0.01em;",""),btnCancel:b("background-color:",f.surface,";border:1px solid ",f.border,";color:",f.text,";&:hover{background-color:",f.surfaceHover,";border-color:",f.borderHover,";}",""),btnConfirm:b("background-color:",f.primary,";border:1px solid ",f.primary,";color:white;&:hover:not(:disabled){background-color:",f.primaryHover,";border-color:",f.primaryHover,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),loading:b("display:flex;align-items:center;justify-content:center;padding:40px;color:",f.textSecondary,";",""),spinner:b("width:24px;height:24px;border-radius:50%;border:3px solid ",f.border,";border-top-color:",f.primary,";animation:spin 0.8s linear infinite;@keyframes spin{to{transform:rotate(360deg);}}","")};function Th({selectedItems:o,currentPath:s,onMove:h,onCancel:u}){const[p,m]=w.useState([]),[k,_]=w.useState(!0),[R,S]=w.useState(null);w.useEffect(()=>{async function U(){try{const Y=await fetch("/api/studio/list-folders");if(Y.ok){const be=await Y.json();console.log("Loaded folders:",be),m(be.folders||[])}else console.error("Failed to load folders:",Y.status,await Y.text())}catch(Y){console.error("Failed to load folders:",Y)}finally{_(!1)}}U()},[]);const G=Array.from(o),H=p.filter(U=>!G.some(Y=>U.path===Y||U.path.startsWith(Y+"/"))),Q=U=>U===s,le=()=>{R&&h(R)};return c("div",{css:mt.overlay,onClick:u,children:x("div",{css:mt.modal,onClick:U=>U.stopPropagation(),children:[c("div",{css:mt.header,children:c("h3",{css:mt.title,children:"Move Items"})}),x("div",{css:mt.body,children:[x("p",{css:mt.message,children:["Select a destination folder for ",o.size," item",o.size!==1?"s":"",":"]}),k?c("div",{css:mt.loading,children:c("div",{css:mt.spinner})}):H.length===0?c("div",{css:mt.loading,children:"No available folders to move to."}):c("div",{css:mt.folderList,children:H.map(U=>{const Y=Q(U.path);return x("div",{css:[mt.folderItem,R===U.path&&mt.folderItemSelected,Y&&mt.folderItemDisabled,"",""],style:{paddingLeft:12},onClick:()=>!Y&&S(U.path),children:[U.depth>0&&c("div",{css:mt.treeIndent,children:Array.from({length:U.depth}).map((be,W)=>c("div",{css:mt.treeLine},W))}),c("svg",{css:mt.folderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:c("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"})}),x("span",{css:mt.folderName,children:[U.name,Y&&" (current)"]})]},U.path)})})]}),x("div",{css:mt.footer,children:[c("button",{css:[mt.btn,mt.btnCancel,"",""],onClick:u,children:"Cancel"}),c("button",{css:[mt.btn,mt.btnConfirm,"",""],onClick:le,disabled:!R,children:"Move Here"})]})]})})}const W1=`CLOUDFLARE_R2_ACCOUNT_ID=your_account_id
37
+ CLOUDFLARE_R2_ACCESS_KEY_ID=your_access_key
38
+ CLOUDFLARE_R2_SECRET_ACCESS_KEY=your_secret_key
39
+ CLOUDFLARE_R2_BUCKET_NAME=your_bucket_name
40
+ CLOUDFLARE_R2_PUBLIC_URL=https://pub-xxx.r2.dev
41
+ NEXT_PUBLIC_CLOUDFLARE_R2_PUBLIC_URL=https://pub-xxx.r2.dev`,re={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:b("background:",f.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:b("display:flex;align-items:center;gap:12px;padding:20px 24px;border-bottom:1px solid ",f.border,";",""),icon:b("width:32px;height:32px;color:",f.primary,";flex-shrink:0;",""),title:b("font-size:",F.xl,";font-weight:600;color:",f.text,";margin:0;",""),closeBtn:b("margin-left:auto;background:none;border:none;padding:4px;cursor:pointer;color:",f.textMuted,";border-radius:4px;&:hover{color:",f.text,";background:",f.surfaceHover,";}",""),closeIcon:{name:"1aynuae",styles:"width:20px;height:20px"},content:{name:"vxuddk",styles:"padding:24px"},intro:b("font-size:",F.base,";color:",f.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:b("width:28px;height:28px;border-radius:50%;background:",f.primaryLight,";color:",f.primary,";font-size:",F.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:b("font-size:",F.base,";font-weight:500;color:",f.text,";margin:0 0 4px 0;",""),stepDesc:b("font-size:",F.sm,";color:",f.textSecondary,";margin:0;line-height:1.5;",""),link:b("color:",f.primary,";text-decoration:none;font-weight:500;&:hover{text-decoration:underline;}",""),envVarsWrapper:{name:"1ksolcl",styles:"position:relative;margin-top:20px"},envVars:b("background:",f.background,";border:1px solid ",f.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:",f.text,";overflow-x:auto;",""),envVar:{name:"4zleql",styles:"display:block"},envKey:b("color:",f.primary,";",""),envValue:b("color:",f.textSecondary,";",""),copyBtn:b("position:absolute;top:8px;right:8px;width:32px;height:32px;display:flex;align-items:center;justify-content:center;background:",f.surface,";border:1px solid ",f.border,";border-radius:6px;cursor:pointer;color:",f.textMuted,";transition:all 0.15s ease;&:hover{background:",f.surfaceHover,";color:",f.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:b("padding:16px 24px;border-top:1px solid ",f.border,";display:flex;justify-content:flex-end;gap:12px;",""),docsBtn:b("padding:10px 16px;border-radius:6px;font-size:",F.base,";font-weight:500;border:1px solid ",f.border,";background:",f.surface,";color:",f.text,";cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;gap:6px;transition:all 0.15s ease;&:hover{background:",f.surfaceHover,";border-color:#d0d5dd;}",""),doneBtn:b("padding:10px 20px;border-radius:6px;font-size:",F.base,";font-weight:500;border:none;background:",f.primary,";color:white;cursor:pointer;transition:background 0.15s ease;&:hover{background:",f.primaryHover,";}",""),externalIcon:{name:"1djxupe",styles:"width:14px;height:14px"}};function Ah({isOpen:o,onClose:s}){const[h,u]=w.useState(!1),p=async()=>{try{await navigator.clipboard.writeText(W1),u(!0),setTimeout(()=>u(!1),2e3)}catch(m){console.error("Failed to copy:",m)}};return o?c("div",{css:re.overlay,onClick:s,children:x("div",{css:re.modal,onClick:m=>m.stopPropagation(),children:[x("div",{css:re.header,children:[c("svg",{css:re.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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"})}),c("h2",{css:re.title,children:"Set Up CDN Storage"}),c("button",{css:re.closeBtn,onClick:s,children:c("svg",{css:re.closeIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),x("div",{css:re.content,children:[c("p",{css:re.intro,children:"Sync your images to Cloudflare R2 for faster global delivery. R2 offers generous free tier with no egress fees."}),x("ol",{css:re.steps,children:[x("li",{css:re.step,children:[c("span",{css:re.stepNumber,children:"1"}),x("div",{css:re.stepContent,children:[c("h4",{css:re.stepTitle,children:"Create a Cloudflare account"}),x("p",{css:re.stepDesc,children:["Sign up at"," ",c("a",{css:re.link,href:"https://dash.cloudflare.com/sign-up",target:"_blank",rel:"noopener noreferrer",children:"dash.cloudflare.com"})," ","if you don't have one already."]})]})]}),x("li",{css:re.step,children:[c("span",{css:re.stepNumber,children:"2"}),x("div",{css:re.stepContent,children:[c("h4",{css:re.stepTitle,children:"Create an R2 bucket"}),x("p",{css:re.stepDesc,children:["Go to R2 in your Cloudflare dashboard and create a new bucket. Choose a name like ",c("code",{children:"my-images"}),"."]})]})]}),x("li",{css:re.step,children:[c("span",{css:re.stepNumber,children:"3"}),x("div",{css:re.stepContent,children:[c("h4",{css:re.stepTitle,children:"Enable public access"}),x("p",{css:re.stepDesc,children:['In bucket settings, enable "Public Access" and copy the public URL (e.g., ',c("code",{children:"https://pub-xxx.r2.dev"}),")."]})]})]}),x("li",{css:re.step,children:[c("span",{css:re.stepNumber,children:"4"}),x("div",{css:re.stepContent,children:[c("h4",{css:re.stepTitle,children:"Create API token"}),c("p",{css:re.stepDesc,children:'Go to R2 → Manage R2 API Tokens → Create API Token. Select "Object Read & Write" permissions for your bucket.'})]})]}),x("li",{css:re.step,children:[c("span",{css:re.stepNumber,children:"5"}),x("div",{css:re.stepContent,children:[c("h4",{css:re.stepTitle,children:"Add environment variables"}),x("p",{css:re.stepDesc,children:["Add these to your ",c("code",{children:".env.local"})," file:"]})]})]})]}),x("div",{css:re.envVarsWrapper,children:[x("div",{css:re.envVars,children:[x("span",{css:re.envVar,children:[c("span",{css:re.envKey,children:"CLOUDFLARE_R2_ACCOUNT_ID"}),"=",c("span",{css:re.envValue,children:"your_account_id"})]}),x("span",{css:re.envVar,children:[c("span",{css:re.envKey,children:"CLOUDFLARE_R2_ACCESS_KEY_ID"}),"=",c("span",{css:re.envValue,children:"your_access_key"})]}),x("span",{css:re.envVar,children:[c("span",{css:re.envKey,children:"CLOUDFLARE_R2_SECRET_ACCESS_KEY"}),"=",c("span",{css:re.envValue,children:"your_secret_key"})]}),x("span",{css:re.envVar,children:[c("span",{css:re.envKey,children:"CLOUDFLARE_R2_BUCKET_NAME"}),"=",c("span",{css:re.envValue,children:"your_bucket_name"})]}),x("span",{css:re.envVar,children:[c("span",{css:re.envKey,children:"CLOUDFLARE_R2_PUBLIC_URL"}),"=",c("span",{css:re.envValue,children:"https://pub-xxx.r2.dev"})]}),x("span",{css:re.envVar,children:[c("span",{css:re.envKey,children:"NEXT_PUBLIC_CLOUDFLARE_R2_PUBLIC_URL"}),"=",c("span",{css:re.envValue,children:"https://pub-xxx.r2.dev"})]})]}),x("button",{css:re.copyBtn,onClick:p,title:"Copy to clipboard",children:[h&&c("span",{css:re.copiedTooltip,children:"Copied!"}),c("svg",{css:re.copyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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"})})]})]})]}),x("div",{css:re.footer,children:[x("a",{css:re.docsBtn,href:"https://developers.cloudflare.com/r2/get-started/",target:"_blank",rel:"noopener noreferrer",children:["R2 Documentation",c("svg",{css:re.externalIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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"})})]}),c("button",{css:re.doneBtn,onClick:s,children:"Got it"})]})]})}):null}const I1=Bn`
42
+ from { opacity: 0; }
43
+ to { opacity: 1; }
44
+ `,P1=Bn`
45
+ from {
46
+ opacity: 0;
47
+ transform: translateY(-8px) scale(0.98);
48
+ }
49
+ to {
50
+ opacity: 1;
51
+ transform: translateY(0) scale(1);
52
+ }
53
+ `,it={overlay:b("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:",I1," 0.15s ease-out;font-family:",Sr,";",""),modal:b(Ki," background-color:",f.surface,";border-radius:12px;box-shadow:0 30px 60px -12px rgba(50, 50, 93, 0.25),0 18px 36px -18px rgba(0, 0, 0, 0.3);max-width:520px;width:90%;animation:",P1," 0.2s ease-out;overflow:hidden;",""),header:{name:"nsgk6m",styles:"padding:24px 24px 0"},title:b("font-size:",F.lg,";font-weight:600;color:",f.text,";margin:0;letter-spacing:-0.02em;",""),tabs:b("display:flex;gap:0;margin-top:16px;border-bottom:1px solid ",f.border,";",""),tab:b("padding:12px 20px;font-size:",F.base,";font-weight:500;color:",f.textSecondary,";background:none;border:none;cursor:pointer;position:relative;transition:color 0.15s;&:hover{color:",f.text,";}",""),tabActive:b("color:",f.primary,";&::after{content:'';position:absolute;bottom:-1px;left:0;right:0;height:2px;background-color:",f.primary,";}",""),body:{name:"1po9b7e",styles:"padding:24px;min-height:200px"},dropzone:b("border:2px dashed ",f.border,";border-radius:8px;padding:40px 24px;text-align:center;cursor:pointer;transition:all 0.15s;&:hover{border-color:",f.primary,";background-color:",f.primaryLight,";}",""),dropzoneActive:b("border-color:",f.primary,";background-color:",f.primaryLight,";",""),dropzoneIcon:b("width:48px;height:48px;margin:0 auto 16px;color:",f.textMuted,";",""),dropzoneText:b("font-size:",F.base,";color:",f.text,";margin:0 0 4px;",""),dropzoneHint:b("font-size:",F.sm,";color:",f.textSecondary,";margin:0;",""),textarea:b("width:100%;min-height:150px;padding:12px;font-size:",F.sm,";font-family:ui-monospace,SFMono-Regular,'SF Mono',Menlo,Consolas,monospace;border:1px solid ",f.border,";border-radius:8px;resize:vertical;&:focus{outline:none;border-color:",f.primary,";box-shadow:0 0 0 3px ",f.primaryLight,";}&::placeholder{color:",f.textMuted,";}",""),textareaLabel:b("font-size:",F.sm,";color:",f.textSecondary,";margin:0 0 8px;",""),footer:b("display:flex;justify-content:flex-end;gap:12px;padding:16px 24px;border-top:1px solid ",f.border,";background-color:",f.background,";",""),btn:b("padding:10px 18px;font-size:",F.base,";font-weight:500;border-radius:6px;cursor:pointer;transition:all 0.15s ease;letter-spacing:-0.01em;",""),btnCancel:b("background-color:",f.surface,";border:1px solid ",f.border,";color:",f.text,";&:hover{background-color:",f.surfaceHover,";border-color:",f.borderHover,";}",""),btnConfirm:b("background-color:",f.primary,";border:1px solid ",f.primary,";color:white;&:hover:not(:disabled){background-color:",f.primaryHover,";border-color:",f.primaryHover,";}&:disabled{opacity:0.6;cursor:not-allowed;}",""),fileInput:{name:"eivff4",styles:"display:none"},selectedFiles:b("margin-top:16px;padding:12px;background-color:",f.background,";border-radius:6px;font-size:",F.sm,";color:",f.text,";","")};function eg({currentPath:o,onClose:s,onUploadComplete:h}){const[u,p]=w.useState("upload"),[m,k]=w.useState([]),[_,R]=w.useState(""),[S,G]=w.useState(!1),[H,Q]=w.useState(!1),[le,U]=w.useState(!1),Y=w.useRef(null),be=w.useCallback(oe=>{oe&&k(Array.from(oe))},[]),W=w.useCallback(oe=>{oe.preventDefault(),G(!1),be(oe.dataTransfer.files)},[be]),he=w.useCallback(async()=>{if(m.length!==0){Q(!0);try{for(const oe of m){const q=new FormData;q.append("file",oe),q.append("path",o),await fetch("/api/studio/upload",{method:"POST",body:q})}h(),s()}catch(oe){console.error("Upload failed:",oe)}finally{Q(!1)}}},[m,o,h,s]),ne=w.useCallback(async()=>{const oe=_.split(`
54
+ `).map(q=>q.trim()).filter(q=>q.length>0);if(oe.length!==0){U(!0);try{const J=(await fetch("/api/studio/import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({urls:oe})})).body?.getReader();if(!J)throw new Error("No reader");const L=new TextDecoder;for(;;){const{done:fe,value:Se}=await J.read();if(fe)break;const _e=L.decode(Se).split(`
55
+
56
+ `).filter(Te=>Te.startsWith("data: "));for(const Te of _e)JSON.parse(Te.replace("data: ","")).type==="complete"&&(h(),s())}}catch(q){console.error("Import failed:",q)}finally{U(!1)}}},[_,h,s]);return c("div",{css:it.overlay,onClick:s,children:x("div",{css:it.modal,onClick:oe=>oe.stopPropagation(),children:[x("div",{css:it.header,children:[c("h3",{css:it.title,children:"Add New"}),x("div",{css:it.tabs,children:[c("button",{css:[it.tab,u==="upload"&&it.tabActive,"",""],onClick:()=>p("upload"),children:"Upload Files"}),c("button",{css:[it.tab,u==="import"&&it.tabActive,"",""],onClick:()=>p("import"),children:"Import URLs"})]})]}),c("div",{css:it.body,children:u==="upload"?x(bt,{children:[x("div",{css:[it.dropzone,S&&it.dropzoneActive,"",""],onClick:()=>Y.current?.click(),onDragOver:oe=>{oe.preventDefault(),G(!0)},onDragLeave:()=>G(!1),onDrop:W,children:[c("svg",{css:it.dropzoneIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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"})}),c("p",{css:it.dropzoneText,children:"Drop files here or click to browse"}),c("p",{css:it.dropzoneHint,children:"Supports images and other media files"})]}),c("input",{ref:Y,type:"file",multiple:!0,css:it.fileInput,onChange:oe=>be(oe.target.files)}),m.length>0&&x("div",{css:it.selectedFiles,children:[m.length," file",m.length!==1?"s":""," selected"]})]}):x(bt,{children:[c("p",{css:it.textareaLabel,children:"Paste image URLs (one per line)"}),c("textarea",{css:it.textarea,value:_,onChange:oe=>R(oe.target.value),placeholder:`https://cdn.example.com/photos/image1.jpg
57
+ https://cdn.example.com/photos/image2.jpg`})]})}),x("div",{css:it.footer,children:[c("button",{css:[it.btn,it.btnCancel,"",""],onClick:s,children:"Cancel"}),u==="upload"?c("button",{css:[it.btn,it.btnConfirm,"",""],onClick:he,disabled:m.length===0||H,children:H?"Uploading...":"Upload"}):c("button",{css:[it.btn,it.btnConfirm,"",""],onClick:ne,disabled:!_.trim()||le,children:le?"Importing...":"Import"})]})]})})}const Xs="36px",tg=Bn`
58
+ to { transform: rotate(360deg); }
59
+ `,me={toolbar:b("display:flex;flex-wrap:nowrap;align-items:center;justify-content:space-between;gap:8px;padding:12px 16px;background-color:",f.surface,";border-bottom:1px solid ",f.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:b("display:inline-flex;align-items:center;justify-content:center;gap:6px;height:",Xs,";padding:0 14px;border-radius:6px;font-size:",F.base,";font-weight:500;background:",f.surface,";border:1px solid ",f.border,";cursor:pointer;transition:all 0.15s ease;color:",f.text,";letter-spacing:-0.01em;&:hover:not(:disabled){background-color:",f.surfaceHover,";border-color:",f.borderHover,";}&:disabled{cursor:not-allowed;opacity:0.5;}",""),btnPrimary:b("background:",f.primary,";border-color:",f.primary,";color:white;&:hover:not(:disabled){background:",f.primaryHover,";border-color:",f.primaryHover,";}",""),btnDanger:b("color:",f.danger,";&:hover:not(:disabled){background-color:",f.dangerLight,";border-color:",f.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:b("position:absolute;top:100%;left:0;z-index:1000;min-width:160px;margin-top:4px;background:white;border:1px solid ",f.border,";border-radius:6px;box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);overflow:hidden;",""),cloudDropdownItem:b("display:flex;align-items:center;gap:8px;width:100%;padding:10px 14px;border:none;background:none;font-size:",F.sm,";color:",f.text,";cursor:pointer;text-align:left;white-space:nowrap;&:hover{background-color:",f.hover,";}svg{width:16px;height:16px;flex-shrink:0;color:#f59e0b;}",""),cloudDropdownItemDefault:b("svg{color:",f.text,";}",""),cloudDropdownItemDanger:b("color:",f.danger,";svg{color:",f.danger,";}",""),cloudDropdownDivider:b("height:1px;background-color:",f.border,";margin:4px 0;",""),icon:{name:"157xhr7",styles:"width:16px;height:16px"},iconSpin:b("animation:",tg," 1s linear infinite;",""),selectionCount:b("font-size:",F.base,";color:",f.textSecondary,";display:flex;align-items:center;gap:8px;margin-right:8px;",""),clearBtn:b("color:",f.primary,";background:none;border:none;cursor:pointer;font-size:",F.base,";font-weight:500;padding:0;&:hover{text-decoration:underline;}",""),divider:b("width:1px;height:24px;background:",f.border,";margin:0 4px;",""),viewToggle:b("display:flex;align-items:center;height:",Xs,";background-color:",f.surface,";border:1px solid ",f.border,";border-radius:6px;overflow:hidden;",""),searchWrapper:{name:"9iujih",styles:"position:relative;display:flex;align-items:center"},searchInput:b("height:",Xs,";padding:0 32px 0 12px;border:1px solid ",f.border,";border-radius:6px;font-size:",F.base,";background:",f.surface,";color:",f.text,";width:180px;transition:all 0.15s ease;&:focus{outline:none;border-color:",f.primary,";box-shadow:0 0 0 2px ",f.primaryLight,";}&::placeholder{color:",f.textMuted,";}",""),searchClearBtn:b("position:absolute;right:5px;top:5px;bottom:5px;background:",f.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:",f.primaryHover,";}",""),viewBtn:b("height:100%;padding:0 10px;background:transparent;border:none;cursor:pointer;color:",f.textSecondary,";transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{color:",f.text,";background-color:",f.surfaceHover,";}",""),viewBtnActive:b("background-color:",f.primaryLight,";color:",f.primary,";&:hover{background-color:",f.primaryLight,";color:",f.primary,";}","")};function ng(){const{selectedItems:o,viewMode:s,setViewMode:h,clearSelection:u,currentPath:p,triggerRefresh:m,focusedItem:k,scanRequested:_,clearScanRequest:R,fileItems:S,requestProcess:G,setProcessMode:H,actionState:Q,cancelAction:le}=Qa(),U=w.useRef(null),Y=w.useRef(null),[be,W]=w.useState(!1),[he,ne]=w.useState(!1),[oe,q]=w.useState(!1),[J,L]=w.useState(!1),[fe,Se]=w.useState(!1),[ke,_e]=w.useState(0),[Te,at]=w.useState(!1),[$e,Ye]=w.useState(!1),[T,j]=w.useState(!1),[P,Ae]=w.useState(0),[Ne,y]=w.useState(!1),[E,V]=w.useState("Processing Images"),[$,Z]=w.useState({current:0,total:0,percent:0,status:"processing"}),[Ee,pe]=w.useState(null),[dt,Re]=w.useState(!1),[$t,xe]=w.useState(!1),[jn,ol]=w.useState(!1),[we,st]=w.useState(!1),[Lt,Wt]=w.useState(!1),[Tn,rl]=w.useState(!1),[na,An]=w.useState(!1),[Ul,sn]=w.useState(!1),[Ut,la]=w.useState(!1),aa=w.useRef(null),ia=w.useRef(null),En=p==="public/images"||p.startsWith("public/images/");w.useCallback(()=>{U.current?.click()},[]);const Ka=w.useCallback(async()=>{q(!0),V("Scanning Files"),y(!0),Z({current:0,total:0,percent:0,status:"processing",message:"Scanning for files..."});try{const X=(await fetch("/api/studio/scan",{method:"POST"})).body?.getReader();if(!X)throw new Error("No reader");const ie=new TextDecoder;let de="";for(;;){const{done:ze,value:se}=await X.read();if(ze)break;de+=ie.decode(se,{stream:!0});const Le=de.split(`
60
+
61
+ `);de=Le.pop()||"";for(const ge of Le){if(!ge.startsWith("data: "))continue;const te=JSON.parse(ge.slice(6));if(te.type==="start")Z({current:0,total:te.total,percent:0,status:"processing",message:`Scanning ${te.total} files...`});else if(te.type==="progress")Z({current:te.current,total:te.total,percent:te.percent,status:"processing",currentFile:te.currentFile});else if(te.type==="cleanup")Z(He=>({...He,message:te.message}));else if(te.type==="complete"){let He=te.renamed>0?`${te.renamed} file(s) renamed due to conflicts. `:"";te.orphanedFiles&&te.orphanedFiles.length>0&&(He+=`Found ${te.orphanedFiles.length} orphaned thumbnail(s) in images folder.`),Z({current:te.total||0,total:te.total||0,percent:100,status:"complete",processed:te.added,alreadyProcessed:te.existingCount,errors:te.errors,orphanedFiles:te.orphanedFiles,pendingUpdates:te.pendingUpdates,orphanedEntries:te.orphanedEntries,message:He||void 0,isScan:!0}),m()}else te.type==="error"&&Z({current:0,total:0,percent:0,status:"error",message:te.message||"Scan failed"})}}}catch(I){console.error("Scan error:",I),Z({current:0,total:0,percent:0,status:"error",message:"Scan failed"})}finally{q(!1)}},[m]);w.useEffect(()=>{const I=X=>{aa.current&&!aa.current.contains(X.target)&&sn(!1),ia.current&&!ia.current.contains(X.target)&&la(!1)};return document.addEventListener("mousedown",I),()=>document.removeEventListener("mousedown",I)},[]),w.useEffect(()=>{_&&!oe&&(R(),Ka())},[_,oe,R,Ka]);const Ji=w.useCallback(async I=>{const X=I.target.files;if(!X||X.length===0)return;const ie=Array.from(X);ie.length>1?(Z({current:0,total:ie.length,percent:0,status:"processing",message:"Uploading files..."}),y(!0)):ne(!0);let de=0,ze=0;try{for(let se=0;se<ie.length;se++){const Le=ie[se],ge=new FormData;ge.append("file",Le),ge.append("path",p);try{const te=await fetch("/api/studio/upload",{method:"POST",body:ge});if(te.ok)de++;else{const He=await te.json();ze++,ie.length===1&&(te.status>=500?(console.error("Upload error:",He),pe({title:"Upload Failed",message:`Failed to upload ${Le.name}: ${He.error||"Unknown error"}`})):pe({title:"Cannot Upload Here",message:He.error||"Upload not allowed in this location."}))}}catch{ze++}ie.length>1&&Z({current:se+1,total:ie.length,percent:Math.round((se+1)/ie.length*100),status:"processing",currentFile:Le.name})}ie.length>1&&Z({current:ie.length,total:ie.length,percent:100,status:"complete",processed:de,errors:ze}),m()}catch(se){console.error("Upload error:",se),ie.length>1?Z({current:0,total:0,percent:0,status:"error",message:"Upload failed."}):pe({title:"Upload Failed",message:"Upload failed. Check console for details."})}finally{ne(!1),U.current&&(U.current.value="")}},[p,m]),Fi=w.useCallback(async I=>{if(o.size>0){const ie=Array.from(o),de=ie.filter(se=>(se.split("/").pop()||"").includes(".")&&!se.endsWith("/")),ze=ie.filter(se=>!(se.split("/").pop()||"").includes(".")||se.endsWith("/"));if(ze.length>0)try{const Le=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(ze.join(","))}`)).json();if(Le.images)for(const ge of Le.images){const te=`public/${ge}`;de.includes(te)||de.push(te)}}catch(se){console.error("Failed to get folder files:",se)}if(de.length===0){pe({title:"No Files Found",message:"No files found in the selected items."});return}H(I),G(de)}else try{const de=await(await fetch("/api/studio/count-images")).json();if(!de.images||de.images.length===0){pe({title:"No Images Found",message:"No images found in the public folder to process."});return}const ze=de.images.map(se=>`public/${se}`);H(I),G(ze)}catch(ie){console.error("Failed to get images:",ie),pe({title:"Error",message:"Failed to get images."})}},[o,G,H]),Cr=w.useCallback(()=>{Y.current&&(Z(I=>({...I,status:"stopping"})),Y.current.abort())},[]),Nl=w.useCallback(async()=>{const I=$.orphanedFiles;if(!(!I||I.length===0))try{const X=await fetch("/api/studio/delete-orphans",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:I})}),ie=await X.json();X.ok?(Z(de=>({...de,orphanedFiles:void 0,orphansRemoved:ie.deleted,message:`Deleted ${ie.deleted} orphaned thumbnail${ie.deleted!==1?"s":""}.`})),m()):pe({title:"Delete Failed",message:ie.error||"Failed to delete orphaned files."})}catch(X){console.error("Delete orphans error:",X),pe({title:"Delete Failed",message:"Failed to delete orphaned files. Check console for details."})}},[$.orphanedFiles,m]),Bt=w.useCallback(()=>{o.size!==0&&L(!0)},[o]),Dn=w.useCallback(async()=>{L(!1);try{const I=await fetch("/api/studio/delete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:Array.from(o)})});if(I.ok)u(),m();else{const X=await I.json();pe({title:"Delete Failed",message:X.error||"Unknown error"})}}catch(I){console.error("Delete error:",I),pe({title:"Delete Failed",message:"Delete failed. Check console for details."})}},[o,u,m]),jt=w.useCallback(async()=>{if(o.size===0)return;const I=Array.from(o),X=I.filter(ge=>(ge.split("/").pop()||"").includes(".")&&!ge.endsWith("/")),ie=I.filter(ge=>!(ge.split("/").pop()||"").includes(".")||ge.endsWith("/")),de=ie.length>0;if(de)try{const te=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(ie.join(","))}`)).json();if(te.images)for(const He of te.images){const ye=`public/${He}`;X.includes(ye)||X.push(ye)}}catch(ge){console.error("Failed to get folder files:",ge)}if(X.length===0){pe({title:"No Files Found",message:"No files found in the selected items."});return}let ze=!1,se=!1,Le=0;for(const ge of X){const te=S.find(He=>He.path===ge);te?te.isRemote?ze=!0:te.cdnPushed?Le++:se=!0:de&&(se=!0)}if(!de&&Le===X.length){pe({title:"Already Pushed",message:`All ${X.length} file${X.length!==1?"s are":" is"} already on the CDN.`});return}_e(X.length),at(ze),Ye(se),Se(!0)},[o,S]),wr=w.useCallback(async()=>{Se(!1);const I=Array.from(o),X=I.filter(He=>(He.split("/").pop()||"").includes(".")&&!He.endsWith("/")),ie=I.filter(He=>!(He.split("/").pop()||"").includes(".")||He.endsWith("/"));if(ie.length>0)try{const ye=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(ie.join(","))}`)).json();if(ye.images)for(const ut of ye.images){const Pt=`public/${ut}`;X.includes(Pt)||X.push(Pt)}}catch(He){console.error("Failed to get folder files:",He)}const de=X.map(He=>"/"+He.replace(/^public\//,"")),ze=new AbortController;Y.current=ze,V("Pushing to CDN"),Z({current:0,total:de.length,percent:0,status:"processing",message:"Pushing to CDN..."}),y(!0);let se=0,Le=0,ge=0;const te=[];try{for(let ye=0;ye<de.length;ye++){if(ze.signal.aborted){Z(Sn=>({...Sn,status:"stopped",message:`Stopped. ${se} file${se!==1?"s":""} pushed.`})),u(),m(),Y.current=null;return}const ut=de[ye];let Pt=!1,sl=!1,ft;for(let Sn=0;Sn<3&&!Pt&&!ze.signal.aborted;Sn++)try{const ul=await fetch("/api/studio/sync",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({imageKeys:[ut]}),signal:ze.signal}),Gt=await ul.json();if(ul.ok)if(Gt.pushed?.length>0)se++,Pt=!0;else if(Gt.alreadyPushed?.length>0)sl=!0,Pt=!0;else if(Gt.errors?.length>0)for(const Cn of Gt.errors)ft=Cn;else Pt=!0;else{if(Gt.error?.includes("R2 not configured")||Gt.error?.includes("CLOUDFLARE_R2")){y(!1),rl(!0);return}ft=Gt.error||`Failed: ${ut}`}}catch{ft=`Network error: ${ut}`,Sn<2&&await new Promise(Gt=>setTimeout(Gt,500*(Sn+1)))}sl?Le++:!Pt&&ft&&(ge++,te.push(ft)),Z({current:ye+1,total:de.length,percent:Math.round((ye+1)/de.length*100),status:"processing",currentFile:ut.replace(/^\//,"")})}if(ze.signal.aborted){u(),m(),Y.current=null;return}let He;se===0&&ge===0?He=`${Le} file${Le!==1?"s":""} already on CDN. 0 new files pushed.`:Le>0&&ge===0&&(He=`${se} file${se!==1?"s":""} pushed. ${Le} already on CDN.`),Z({current:de.length,total:de.length,percent:100,status:"complete",processed:se,errors:ge,errorMessages:te.length>0?te:void 0,message:He}),u(),m()}catch(He){if(ze.signal.aborted){Y.current=null;return}console.error("Push error:",He),Z({current:0,total:0,percent:0,status:"error",message:"Failed to push to CDN."})}finally{Y.current=null}},[o,u,m]),[$i,zr]=w.useState([]),[qn,oa]=w.useState(0),ra=w.useCallback(async()=>{if(o.size===0)return;const I=Array.from(o),X=I.filter(se=>(se.split("/").pop()||"").includes(".")&&!se.endsWith("/")),ie=I.filter(se=>!(se.split("/").pop()||"").includes(".")||se.endsWith("/")),de=ie.length>0;if(de)try{const Le=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(ie.join(","))}`)).json();if(Le.images)for(const ge of Le.images){const te=`public/${ge}`;X.includes(te)||X.push(te)}}catch(se){console.error("Failed to get folder files:",se)}if(X.length===0){pe({title:"No Files Found",message:"No files found in the selected items."});return}let ze;if(de)ze=X;else if(ze=X.filter(se=>{const Le=S.find(ge=>ge.path===se);return Le&&Le.cdnPushed&&!Le.isRemote}),ze.length===0){pe({title:"No CDN Files",message:`None of the ${X.length} selected file${X.length!==1?"s are":" is"} on the CDN.`});return}zr(ze),oa(X.length),Ae(ze.length),j(!0)},[o,S]),kn=w.useRef(null),ca=w.useCallback(async()=>{j(!1),Q.showDownloadConfirm&&le();const I=new AbortController;Y.current=I;const X=`download-${Date.now()}-${Math.random().toString(36).slice(2)}`;kn.current=X;const de=(Q.showDownloadConfirm?Q.actionPaths:$i).map(ze=>"/"+ze.replace(/^public\//,""));V("Downloading from CDN"),y(!0),Z({current:0,total:de.length,percent:0,status:"processing"});try{const ze=await fetch("/api/studio/download-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({imageKeys:de,operationId:X}),signal:I.signal});if(!ze.ok||!ze.body)throw new Error("Download request failed");const se=ze.body.getReader(),Le=new TextDecoder;let ge="",te=0;const He=async()=>{try{await fetch("/api/studio/cancel-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({operationId:X})})}catch{}se.cancel(),Z(ye=>({...ye,status:"stopped",message:`Stopped. ${te} file${te!==1?"s":""} downloaded.`})),u(),m(),Y.current=null,kn.current=null};I.signal.addEventListener("abort",He);try{for(;;){const{done:ye,value:ut}=await se.read();if(ye)break;ge+=Le.decode(ut,{stream:!0});const Pt=ge.split(`
62
+ `);ge=Pt.pop()||"";for(const sl of Pt)if(sl.startsWith("data: "))try{const ft=JSON.parse(sl.slice(6));if(ft.type==="progress")ft.downloaded!==void 0&&(te=ft.downloaded),Z({current:ft.current,total:ft.total,percent:Math.round(ft.current/ft.total*100),status:"processing",message:ft.message});else if(ft.type==="complete"){te=ft.downloaded||ft.total||de.length;let Sn=ft.message;qn>te&&(Sn=`${te} file${te!==1?"s":""} downloaded out of ${qn} selected.`),Z({current:te,total:te,percent:100,status:"complete",message:Sn})}else ft.type==="error"&&Z({current:0,total:0,percent:0,status:"error",message:ft.message})}catch{}}I.signal.aborted||(u(),m())}catch(ye){if(!I.signal.aborted)throw ye}finally{I.signal.removeEventListener("abort",He)}}catch(ze){if(I.signal.aborted)return;console.error("Download error:",ze),Z({current:0,total:0,percent:0,status:"error",message:"Failed to download from CDN."})}finally{Y.current=null}},[$i,qn,u,m,Q.showDownloadConfirm,Q.actionPaths,le]),Hl=w.useCallback(async()=>{if(o.size===0)return;const X=Array.from(o).filter(ie=>{const de=S.find(ze=>ze.path===ie);return de&&de.hasUpdate});if(X.length===0){pe({title:"No Updates",message:"No files with pending updates in selection."});return}V("Pushing Updates"),y(!0),Z({current:0,total:X.length,percent:0,status:"processing"});try{const de=(await fetch("/api/studio/push-updates-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:X})})).body?.getReader();if(!de)throw new Error("No response body");const ze=new TextDecoder;let se="";for(;;){const{done:Le,value:ge}=await de.read();if(Le)break;se+=ze.decode(ge,{stream:!0});const te=se.split(`
63
+ `);se=te.pop()||"";for(const He of te)if(He.startsWith("data: "))try{const ye=JSON.parse(He.slice(6));ye.type==="progress"?Z({current:ye.current,total:ye.total,percent:ye.percent,status:"processing",currentFile:ye.currentFile}):ye.type==="cleanup"?Z(ut=>({...ut,message:ye.message})):ye.type==="complete"?Z({current:ye.total||X.length,total:ye.total||X.length,percent:100,status:"complete",message:ye.message}):ye.type==="error"&&Z({current:0,total:0,percent:0,status:"error",message:ye.message})}catch{}}u(),m()}catch(ie){console.error("Push updates error:",ie),Z({current:0,total:0,percent:0,status:"error",message:"Failed to push updates."})}},[o,S,u,m]),Mr=w.useCallback(async()=>{if(o.size===0)return;const X=Array.from(o).filter(ie=>{const de=S.find(ze=>ze.path===ie);return de&&de.hasUpdate});if(X.length!==0)try{const ie=await fetch("/api/studio/cancel-updates",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:X})});if(ie.ok)u(),m();else{const de=await ie.json();pe({title:"Cancel Failed",message:de.error||"Unknown error"})}}catch(ie){console.error("Cancel updates error:",ie),pe({title:"Cancel Failed",message:"Failed to cancel updates. Check console for details."})}},[o,S,u,m]),Wi=w.useCallback(async I=>{Re(!1);try{const X=await fetch("/api/studio/create-folder",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({parentPath:p,name:I})});if(X.ok)m();else{const ie=await X.json();pe({title:"Create Folder Failed",message:ie.error||"Unknown error"})}}catch(X){console.error("Create folder error:",X),pe({title:"Create Folder Failed",message:"Failed to create folder. Check console for details."})}},[p,m]),Ja=w.useCallback(()=>{o.size!==0&&Wt(!0)},[o]),Bl=w.useCallback(async I=>{const X=Array.from(o);V("Moving Files"),y(!0),Z({current:0,total:X.length,percent:0,status:"processing"});try{const ie=await fetch("/api/studio/move",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:X,destination:I})});if(!ie.body)throw new Error("No response body");const de=ie.body.getReader(),ze=new TextDecoder;let se="";for(;;){const{done:Le,value:ge}=await de.read();if(Le)break;se+=ze.decode(ge,{stream:!0});const te=se.split(`
64
+
65
+ `);se=te.pop()||"";for(const He of te)if(He.startsWith("data: "))try{const ye=JSON.parse(He.slice(6));ye.type==="start"?Z(ut=>({...ut,total:ye.total})):ye.type==="progress"?Z({current:ye.current,total:ye.total,percent:ye.percent,currentFile:ye.currentFile,status:"processing"}):ye.type==="complete"?(Z(ut=>({...ut,status:"complete",processed:ye.moved,errors:ye.errors,errorMessages:ye.errorMessages,isMove:!0})),u(),m()):ye.type==="error"&&Z(ut=>({...ut,status:"error",errorMessage:ye.message}))}catch{}}}catch(ie){console.error("Move error:",ie),Z(de=>({...de,status:"error",errorMessage:"Failed to move items. Check console for details."}))}},[o,u,m]),{searchQuery:Ii,setSearchQuery:cl}=Qa(),Pi=w.useCallback(I=>{cl(I.target.value)},[cl]),eo=w.useCallback(I=>{I.key==="Escape"&&(I.stopPropagation(),cl(""),I.target.blur())},[cl]),un=o.size>0;un&&Array.from(o).some(I=>{const X=S.find(ie=>ie.path===I);return X&&X.cdnPushed&&!X.isRemote}),un&&Array.from(o).every(I=>{const X=S.find(ie=>ie.path===I);return X&&X.type==="file"&&X.cdnPushed&&!X.isRemote});const Fa=un&&Array.from(o).some(I=>{const X=S.find(ie=>ie.path===I);return X&&X.hasUpdate}),Yn=Array.from(o),Gn=Yn.length===1&&!Yn[0].includes("."),qt=Gn?Yn[0]:null,xt=qt&&qt.split("/").pop()||"",gt=Yn.length===1&&Yn[0].includes("."),It=gt?Yn[0]:null,sa=It&&It.split("/").pop()||"",Tr=w.useCallback(async I=>{if(qt){xe(!1);try{(await fetch("/api/studio/rename",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({oldPath:qt,newName:I})})).ok&&(u(),m())}catch(X){console.error("Failed to rename folder:",X)}}},[qt,u,m]),Ar=w.useCallback(async I=>{if(It){st(!0);try{(await fetch("/api/studio/rename",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({oldPath:It,newName:I})})).ok&&(u(),m())}catch(X){console.error("Failed to rename file:",X)}finally{st(!1),ol(!1)}}},[It,u,m]);return k?null:x(bt,{children:[J&&c(qi,{title:"Delete Items",message:`Are you sure you want to delete ${o.size} item(s)? This action cannot be undone.`,confirmLabel:"Delete",variant:"danger",onConfirm:Dn,onCancel:()=>L(!1)}),fe&&c(qi,{title:"Push to CDN",message:`Push ${ke} image${ke!==1?"s":""} to Cloudflare R2?${Te?" Remote images will be downloaded first.":""}${$e?" After pushing, local files will be deleted.":""}`,confirmLabel:"Push",onConfirm:wr,onCancel:()=>Se(!1)}),(T||Q.showDownloadConfirm)&&c(qi,{title:"Download from CDN",message:(()=>{const I=Q.showDownloadConfirm?Q.downloadImageCount:P,X=Q.showDownloadConfirm?Q.downloadTotalSelected:qn;return X>I?`Download ${I} of ${X} selected file${X!==1?"s":""} from Cloudflare R2? (${X-I} not on CDN)`:`Download ${I} image${I!==1?"s":""} from Cloudflare R2 to local storage? Images will be removed from the CDN.`})(),confirmLabel:"Download",onConfirm:ca,onCancel:()=>{j(!1),Q.showDownloadConfirm&&le()}}),Ne&&c(tu,{title:E,progress:$,onStop:Cr,onDeleteOrphans:Nl,onClose:()=>{y(!1),Z({current:0,total:0,percent:0,status:"processing"}),m()}}),dt&&c(gr,{title:"New Folder",message:"Enter a name for the new folder:",placeholder:"Folder name",confirmLabel:"Create",onConfirm:Wi,onCancel:()=>Re(!1)}),Lt&&c(Th,{selectedItems:o,currentPath:p,onMove:I=>{Wt(!1),Bl(I)},onCancel:()=>Wt(!1)}),$t&&qt&&c(gr,{title:"Rename Folder",message:"Enter a new name for the folder:",placeholder:xt,defaultValue:xt,confirmLabel:"Rename",onConfirm:Tr,onCancel:()=>xe(!1)}),jn&&It&&c(gr,{title:"Rename File",message:"Enter a new name for the file:",placeholder:sa,defaultValue:sa,confirmLabel:"Rename",isLoading:we,loadingLabel:"Renaming...",onConfirm:Ar,onCancel:()=>!we&&ol(!1)}),Ee&&c(Mh,{title:Ee.title,message:Ee.message,onClose:()=>{pe(null),m()}}),c(Ah,{isOpen:Tn,onClose:()=>rl(!1)}),be&&c(eg,{currentPath:p,onClose:()=>W(!1),onUploadComplete:()=>{W(!1),m()}}),x("div",{css:me.toolbar,children:[c("input",{ref:U,type:"file",multiple:!0,accept:"image/*,video/*,audio/*,.pdf",onChange:Ji,style:{display:"none"}}),x("div",{css:me.left,children:[x("button",{css:[me.btn,me.btnPrimary,"",""],onClick:()=>W(!0),disabled:he||En,children:[c(lg,{}),"Add New"]}),x("button",{css:me.btn,onClick:()=>{gt?ol(!0):Gn?xe(!0):Re(!0)},disabled:En&&!Gn&&!gt,title:En&&!Gn&&!gt?"Cannot create folders in protected images folder":void 0,children:[gt||Gn?c(rg,{}):c(og,{}),gt?"Rename File":Gn?"Rename Folder":"New Folder"]}),c("div",{css:me.divider}),x("div",{css:me.cloudDropdownWrapper,ref:ia,children:[x("button",{css:me.btn,onClick:()=>la(!Ut),disabled:Q.showProgress||En,title:En?"Cannot process images folder":void 0,children:[c(pg,{}),"Thumbnails",c("svg",{css:me.dropdownArrow,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),Ut&&x("div",{css:me.cloudDropdown,children:[x("button",{css:[me.cloudDropdownItem,me.cloudDropdownItemDefault,"",""],onClick:()=>{la(!1),Fi("generate")},children:[c(mg,{}),"Generate Thumbnails"]}),x("button",{css:[me.cloudDropdownItem,me.cloudDropdownItemDanger,"",""],onClick:()=>{la(!1),Fi("remove")},children:[c(gg,{}),"Remove Thumbnails"]})]})]}),x("button",{css:[me.btn,me.btnDanger,"",""],onClick:Bt,disabled:!un,children:[c(ig,{}),"Delete"]}),x("button",{css:me.btn,onClick:Ja,disabled:!un,children:[c(cg,{}),"Move"]}),x("div",{css:me.cloudDropdownWrapper,ref:aa,children:[x("button",{css:[me.btn,me.btnCloud,"",""],onClick:()=>sn(!Ul),disabled:!un,children:[c(sh,{}),"Cloud",c("svg",{css:me.dropdownArrow,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),Ul&&un&&x("div",{css:me.cloudDropdown,children:[Fa&&x(bt,{children:[x("button",{css:me.cloudDropdownItem,onClick:()=>{sn(!1),Hl()},children:[c(sg,{}),"Push Update"]}),x("button",{css:[me.cloudDropdownItem,me.cloudDropdownItemDanger,"",""],onClick:()=>{sn(!1),Mr()},children:[c(ug,{}),"Cancel Update"]}),c("div",{css:me.cloudDropdownDivider})]}),x("button",{css:me.cloudDropdownItem,onClick:()=>{sn(!1),jt()},children:[c(sh,{}),"Push CDN"]}),x("button",{css:me.cloudDropdownItem,onClick:()=>{sn(!1),ra()},children:[c(fg,{}),"Download"]})]})]}),x("div",{css:me.searchWrapper,children:[c("input",{css:me.searchInput,type:"text",placeholder:"Search images...",value:Ii,onChange:Pi,onKeyDown:eo}),Ii&&c("button",{css:me.searchClearBtn,onClick:()=>cl(""),title:"Clear search",children:c("svg",{width:"14",height:"14",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})]}),x("div",{css:me.right,children:[un&&x("span",{css:me.selectionCount,children:[o.size," selected",c("button",{css:me.clearBtn,onClick:u,children:"Clear"})]}),x("button",{css:me.btn,onClick:Ka,disabled:oe,children:[c(ag,{spinning:oe}),"Scan"]}),x("div",{css:me.viewToggle,children:[c("button",{css:[me.viewBtn,s==="grid"&&me.viewBtnActive,"",""],onClick:()=>h("grid"),"aria-label":"Grid view",children:c(dg,{})}),c("button",{css:[me.viewBtn,s==="list"&&me.viewBtnActive,"",""],onClick:()=>h("list"),"aria-label":"List view",children:c(hg,{})})]})]})]})]})}function lg(){return c("svg",{css:me.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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 ag({spinning:o}){return c("svg",{css:[me.icon,o&&me.iconSpin,"",""],fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}function ig(){return c("svg",{css:me.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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 og(){return c("svg",{css:me.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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 rg(){return c("svg",{css:me.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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 cg(){return c("svg",{css:me.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4"})})}function sh(){return c("svg",{css:me.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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 sg(){return c("svg",{css:me.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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 ug(){return c("svg",{css:me.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}function fg(){return c("svg",{css:me.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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 dg(){return c("svg",{css:me.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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 hg(){return c("svg",{css:me.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 10h16M4 14h16M4 18h16"})})}function pg(){return c("svg",{css:me.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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 mg(){return c("svg",{css:me.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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 gg(){return c("svg",{css:me.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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 yg{async get(s){const h=await fetch(s,{cache:"no-store",headers:{"Cache-Control":"no-cache"}});if(!h.ok){const u=await h.json().catch(()=>({}));throw new Error(u.error||`Request failed: ${h.status}`)}return h.json()}async post(s,h){const u=await fetch(s,{method:"POST",headers:h?{"Content-Type":"application/json"}:void 0,body:h?JSON.stringify(h):void 0});if(!u.ok){const p=await u.json().catch(()=>({}));throw new Error(p.error||`Request failed: ${u.status}`)}return u.json()}async list(s="public"){return this.get(`/api/studio/list?path=${encodeURIComponent(s)}`)}async search(s){return this.get(`/api/studio/search?q=${encodeURIComponent(s)}`)}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,h="public"){const u=new FormData;u.append("file",s),u.append("path",h);const p=await fetch("/api/studio/upload",{method:"POST",body:u});if(!p.ok){const m=await p.json().catch(()=>({}));throw new Error(m.error||`Upload failed: ${p.status}`)}return p.json()}async delete(s){return this.post("/api/studio/delete",{paths:s})}async createFolder(s,h){return this.post("/api/studio/create-folder",{parentPath:s,name:h})}async rename(s,h){return this.post("/api/studio/rename",{oldPath:s,newName:h})}async move(s,h){return this.post("/api/studio/move",{paths:s,destination:h})}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")}}const Qs=new yg;function Eh(){const{currentPath:o,setCurrentPath:s,navigateUp:h,selectedItems:u,toggleSelection:p,selectRange:m,lastSelectedPath:k,selectAll:_,clearSelection:R,refreshKey:S,setFocusedItem:G,triggerRefresh:H,triggerScan:Q,searchQuery:le,showError:U,setFileItems:Y}=Qa(),[be,W]=w.useState([]),[he,ne]=w.useState(!0),[oe,q]=w.useState(!1),J=w.useRef(!0),L=w.useRef(o);w.useEffect(()=>{async function j(){const P=L.current!==o;(J.current||P)&&ne(!0),L.current=o;try{const Ae=le&&le.length>=2?await Qs.search(le):await Qs.list(o),Ne=Ae.items||[];W(Ne),Y(Ne),q(Ae.isEmpty===!0)}catch(Ae){const Ne=Ae instanceof Error?Ae.message:"Failed to load items";U("Load Error",Ne),W([]),Y([]),q(!1)}ne(!1),J.current=!1}j()},[o,S,le,U,Y]);const fe=o==="public",Se=le&&le.length>=2,ke=[...be].sort((j,P)=>j.type==="folder"&&P.type!=="folder"?-1:j.type!=="folder"&&P.type==="folder"?1:j.name.localeCompare(P.name)),_e=ke.length>0&&ke.every(j=>u.has(j.path)),Te=ke.some(j=>u.has(j.path)),at=w.useCallback((j,P)=>{P.shiftKey&&k?m(k,j.path,ke):p(j.path)},[k,m,ke,p]),$e=w.useCallback(j=>{j.type==="folder"?s(j.path):G(j)},[s,G]),Ye=w.useCallback(async j=>{try{const P="/"+j.path.replace(/^public\//,"");await Qs.reprocess([P]),H()}catch(P){const Ae=P instanceof Error?P.message:"Failed to generate thumbnail";U("Processing Error",Ae)}},[H,U]),T=w.useCallback(()=>{_e?R():_(ke)},[_e,R,_,ke]);return{items:be,loading:he,sortedItems:ke,metaEmpty:oe,isAtRoot:fe,isSearching:Se,allItemsSelected:_e,someItemsSelected:Te,currentPath:o,selectedItems:u,navigateUp:h,handleItemClick:at,handleOpen:$e,handleGenerateThumbnail:Ye,handleSelectAll:T,triggerScan:Q}}const vg=Bn`
66
+ to { transform: rotate(360deg); }
67
+ `,ee={loading:{name:"1d2ui9i",styles:"display:flex;align-items:center;justify-content:center;flex:1;min-height:300px"},spinner:b("width:32px;height:32px;border-radius:50%;border:3px solid ",f.border,";border-top-color:",f.primary,";animation:",vg," 0.8s linear infinite;",""),empty:b("display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1;min-height:300px;color:",f.textSecondary,";",""),emptyIcon:{name:"1o3cbsn",styles:"width:48px;height:48px;margin-bottom:16px;opacity:0.5"},emptyText:b("font-size:",F.base,";margin:0 0 4px 0;&:last-child{color:",f.textMuted,";font-size:",F.sm,";}",""),scanButton:b("margin-top:16px;padding:10px 24px;font-size:",F.base,";font-weight:500;background:",f.primary,";color:white;border:none;border-radius:8px;cursor:pointer;transition:background 0.15s ease;&:hover:not(:disabled){background:",f.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:b("position:relative;border-radius:8px;border:1px solid ",f.border,";overflow:hidden;cursor:pointer;transition:all 0.15s ease;background-color:",f.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:b("border-color:",f.primary,";box-shadow:0 0 0 1px ",f.primary,";&:hover{border-color:",f.primary,";box-shadow:0 0 0 1px ",f.primary,";}",""),parentItem:b("cursor:pointer;&:hover{border-color:",f.primary,";}",""),checkboxWrapper:{name:"v3lnpt",styles:"position:absolute;top:0;left:0;z-index:10;padding:8px;cursor:pointer"},checkbox:b("width:18px;height:18px;accent-color:",f.primary,";cursor:pointer;",""),content:b("position:relative;aspect-ratio:1;display:flex;align-items:center;justify-content:center;padding:16px;background:",f.background,";",""),folderIcon:{name:"k1w47f",styles:"width:56px;height:56px;color:#f9935e"},imagesFolderIcon:b("width:56px;height:56px;color:",f.imagesFolder,";",""),imagesFolderWrapper:{name:"bjn8wh",styles:"position:relative"},lockIcon:b("position:absolute;bottom:4px;right:4px;width:16px;height:16px;color:",f.imagesFolder,";background:white;border-radius:50%;padding:2px;",""),parentIcon:b("width:56px;height:56px;color:",f.textMuted,";",""),fileIcon:b("width:40px;height:40px;color:",f.textMuted,";",""),image:{name:"rm1wug",styles:"max-width:100%;max-height:100%;object-fit:contain;border-radius:4px"},label:b("padding:10px 12px;background-color:",f.surface,";border-top:1px solid ",f.borderLight,";",""),labelRow:{name:"1gkgtms",styles:"display:flex;flex-direction:column;gap:2px"},labelText:{name:"fxp7t8",styles:"flex:1;min-width:0"},copyBtn:b("position:absolute;top:4px;right:4px;z-index:10;height:28px;width:28px;color:",f.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:",f.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:b("display:flex;align-items:center;gap:3px;font-size:",F.xs,";",""),folderStatLocal:b("color:",f.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:b("width:14px;height:14px;color:",f.textSecondary,";",""),folderStatIconRemote:{name:"efr29r",styles:"width:14px;height:14px;color:#ef4444"},folderStatIconUpdate:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},updateLabel:b("color:#f59e0b;font-size:",F.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:b("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:",f.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:b("position:absolute;bottom:8px;right:8px;z-index:10;height:28px;font-size:",F.sm,";font-weight:500;color:",f.primary,";background:",f.surface,";border:1px solid ",f.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:",f.primaryLight,";border-color:",f.primary,";}",""),name:b("font-size:",F.sm,";font-weight:500;color:",f.text,";white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0;letter-spacing:-0.01em;direction:rtl;text-align:left;",""),size:b("font-size:",F.xs,";color:",f.textMuted,";margin:2px 0 0 0;",""),selectAllRow:b("display:flex;align-items:center;margin-bottom:16px;padding:12px 16px;background:",f.surface,";border-radius:8px;border:1px solid ",f.border,";",""),selectAllLabel:b("display:flex;align-items:center;gap:10px;font-size:",F.base,";font-weight:500;color:",f.textSecondary,";cursor:pointer;&:hover{color:",f.text,";}",""),selectAllCheckbox:b("width:16px;height:16px;accent-color:",f.primary,";","")};function bg(){const{loading:o,sortedItems:s,metaEmpty:h,isAtRoot:u,isSearching:p,allItemsSelected:m,someItemsSelected:k,selectedItems:_,navigateUp:R,handleItemClick:S,handleOpen:G,handleGenerateThumbnail:H,handleSelectAll:Q,triggerScan:le}=Eh();return o?c("div",{css:ee.loading,children:c("div",{css:ee.spinner})}):h&&u?x("div",{css:ee.empty,children:[c("svg",{css:ee.emptyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),c("p",{css:ee.emptyText,children:"No files tracked yet"}),c("p",{css:ee.emptyText,children:"Click Scan to discover files in your public folder"}),c("button",{css:ee.scanButton,onClick:le,children:"Scan for Files"})]}):s.length===0&&u?x("div",{css:ee.empty,children:[c("svg",{css:ee.emptyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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"})}),c("p",{css:ee.emptyText,children:"No files in this folder"}),c("p",{css:ee.emptyText,children:"Upload images or click Scan in the toolbar"})]}):x("div",{children:[s.length>0&&c("div",{css:ee.selectAllRow,children:x("label",{css:ee.selectAllLabel,children:[c("input",{type:"checkbox",css:ee.selectAllCheckbox,checked:m,ref:U=>{U&&(U.indeterminate=k&&!m)},onChange:Q}),"Select all (",s.length,")"]})}),x("div",{css:ee.grid,children:[!u&&!p&&x("div",{css:[ee.item,ee.parentItem,"",""],onClick:R,children:[c("div",{css:ee.content,children:c("svg",{css:ee.parentIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M3 10h10a8 8 0 018 8v2M3 10l6 6m-6-6l6-6"})})}),x("div",{css:ee.label,children:[c("p",{css:ee.name,children:".."}),c("p",{css:ee.size,children:"Parent folder"})]})]}),s.map(U=>c(Sg,{item:U,isSelected:_.has(U.path),onClick:Y=>S(U,Y),onOpen:()=>G(U),onGenerateThumbnail:()=>H(U)},U.path))]})]})}function xg(o){return o.includes("/images/sm/")?"SM":o.includes("/images/md/")?"MD":o.includes("/images/lg/")?"LG":o.includes("/images/full/")?"FULL":null}function Sg({item:o,isSelected:s,onClick:h,onOpen:u,onGenerateThumbnail:p}){const[m,k]=w.useState(!1),_=o.type==="folder",R=!_&&o.thumbnail!==void 0,S=o.isProtected||_&&o.name==="images"&&o.path==="public/images",G=xg(o.path),H=!_&&(o.hasSm||o.hasMd||o.hasLg||o.hasFull||G),Q=U=>{U.stopPropagation();const Y="/"+o.path.replace(/^public\//,"");navigator.clipboard.writeText(Y),k(!0),setTimeout(()=>k(!1),1500)},le=U=>{if(S){U.stopPropagation(),u();return}h(U)};return x("div",{css:[ee.item,s&&!S&&ee.itemSelected,"",""],onClick:le,children:[!S&&c("div",{css:ee.checkboxWrapper,onClick:U=>U.stopPropagation(),children:c("input",{type:"checkbox",css:ee.checkbox,checked:s,onChange:()=>h({})})}),x("div",{css:ee.content,children:[x("button",{css:ee.copyBtn,onClick:Q,title:"Copy file path",children:[m&&c("span",{css:ee.tooltip,children:"Copied!"}),c("svg",{css:ee.copyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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"})})]}),c("button",{css:ee.openBtn,onClick:U=>{U.stopPropagation(),u()},children:"Open"}),_?S?x("div",{css:ee.imagesFolderWrapper,children:[c("svg",{css:ee.imagesFolderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:c("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"})}),c("svg",{css:ee.lockIcon,fill:"currentColor",viewBox:"0 0 20 20",children:c("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"})})]}):c("svg",{css:ee.folderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:c("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&&o.thumbnail?c("img",{css:ee.image,src:o.thumbnail,alt:o.name,loading:"lazy"}):c("svg",{css:ee.fileIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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"})})]}),c("div",{css:ee.label,children:c("div",{css:ee.labelRow,children:x("div",{css:ee.labelText,children:[c("p",{css:ee.name,title:o.name,children:o.name}),_?x("div",{css:ee.folderStats,children:[o.localCount!==void 0&&o.localCount>0&&x("span",{css:[ee.folderStat,ee.folderStatLocal,"",""],title:`${o.localCount} local`,children:[c("svg",{css:ee.folderStatIconLocal,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),o.localCount]}),o.cloudCount!==void 0&&o.cloudCount>0&&x("span",{css:[ee.folderStat,ee.folderStatCloud,"",""],title:`${o.cloudCount} in cloud`,children:[c("svg",{css:ee.folderStatIconCloud,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})}),o.cloudCount]}),o.remoteCount!==void 0&&o.remoteCount>0&&x("span",{css:[ee.folderStat,ee.folderStatRemote,"",""],title:`${o.remoteCount} remote`,children:[c("svg",{css:ee.folderStatIconRemote,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"})}),o.remoteCount]}),o.updateCount!==void 0&&o.updateCount>0&&x("span",{css:[ee.folderStat,ee.folderStatUpdate,"",""],title:`${o.updateCount} pending update${o.updateCount!==1?"s":""}`,children:[c("svg",{css:ee.folderStatIconUpdate,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),o.updateCount]}),!o.localCount&&!o.cloudCount&&!o.remoteCount&&!o.updateCount&&o.fileCount!==void 0&&x("span",{css:ee.size,children:[o.fileCount," files"]})]}):x("div",{css:ee.statusRow,children:[c("div",{css:ee.statusLeft,children:o.hasUpdate?x(bt,{children:[c("svg",{css:ee.updateCloudIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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"})}),c("svg",{css:ee.updateSyncIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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"})}),c("span",{css:ee.updateLabel,children:"update"})]}):o.cdnPushed?c("svg",{css:o.isRemote?ee.storedIconRemote:ee.storedIconCloud,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.isRemote?c("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"}):c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})}):o.size!==void 0?c("span",{css:ee.size,children:Cg(o.size)}):null}),H&&c("span",{css:ee.thumbChips,children:G?c("span",{css:ee.thumbChip,children:G}):x(bt,{children:[o.hasSm&&c("span",{css:ee.thumbChip,children:"SM"}),o.hasMd&&c("span",{css:ee.thumbChip,children:"MD"}),o.hasLg&&c("span",{css:ee.thumbChip,children:"LG"}),o.hasFull&&c("span",{css:ee.thumbChip,children:"FULL"})]})})]})]})})})]})}function Cg(o){return o<1024?`${o} B`:o<1024*1024?`${(o/1024).toFixed(1)} KB`:`${(o/(1024*1024)).toFixed(1)} MB`}const wg=Bn`
68
+ to { transform: rotate(360deg); }
69
+ `,K={loading:{name:"1d2ui9i",styles:"display:flex;align-items:center;justify-content:center;flex:1;min-height:300px"},spinner:b("width:32px;height:32px;border-radius:50%;border:3px solid ",f.border,";border-top-color:",f.primary,";animation:",wg," 0.8s linear infinite;",""),empty:b("display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1;min-height:300px;color:",f.textSecondary,";",""),emptyHint:b("font-size:",F.sm,";color:",f.textMuted,";margin-top:4px;",""),scanButton:b("margin-top:16px;padding:10px 24px;font-size:",F.base,";font-weight:500;background:",f.primary,";color:white;border:none;border-radius:8px;cursor:pointer;transition:background 0.15s ease;&:hover:not(:disabled){background:",f.primaryHover,";}&:disabled{opacity:0.6;cursor:not-allowed;}",""),tableWrapper:b("background:",f.surface,";border-radius:8px;border:1px solid ",f.border,";overflow-x:auto;",""),table:{name:"nufjao",styles:"width:100%;min-width:600px;border-collapse:collapse;white-space:nowrap"},th:b("text-align:left;font-size:11px;color:",f.textMuted,";text-transform:uppercase;letter-spacing:0.05em;padding:12px 16px;font-weight:600;background:",f.background,";border-bottom:1px solid ",f.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:b("",""),row:b("cursor:pointer;transition:background-color 0.15s ease;user-select:none;&:hover{background-color:",f.surfaceHover,";}&:not(:last-child) td{border-bottom:1px solid ",f.borderLight,";}",""),rowSelected:b("background-color:",f.primaryLight,";&:hover{background-color:",f.primaryLight,";}",""),parentRow:b("cursor:pointer;border-bottom:1px solid ",f.border,";&:hover{background-color:",f.surfaceHover,";}",""),td:{name:"i563hg",styles:"padding:12px 16px"},checkboxCell:{name:"sahq4q",styles:"padding:12px 16px;cursor:pointer;vertical-align:middle"},checkbox:b("width:18px;height:18px;accent-color:",f.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:b("position:relative;flex-shrink:0;height:32px;width:32px;font-size:",F.xs,";color:",f.textSecondary,";background:",f.surface,";border:1px solid ",f.border,";padding:0;cursor:pointer;border-radius:4px;transition:all 0.15s ease;display:inline-flex;align-items:center;justify-content:center;&:hover{background:",f.surfaceHover,";border-color:",f.borderHover,";color:",f.text,";}",""),copyIcon:{name:"157xhr7",styles:"width:16px;height:16px"},folderStats:{name:"1yydxi7",styles:"display:flex;align-items:center;gap:8px"},folderStat:b("display:flex;align-items:center;gap:3px;font-size:",F.xs,";",""),folderStatLocal:b("color:",f.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:b("width:14px;height:14px;color:",f.textSecondary,";",""),folderStatIconRemote:{name:"efr29r",styles:"width:14px;height:14px;color:#ef4444"},folderStatIconUpdate:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},updateLabel:b("display:flex;align-items:center;gap:4px;color:#f59e0b;font-size:",F.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:"xfecxx",styles:"width:48px;height:36px;display:flex;align-items:center;justify-content:center;flex-shrink:0"},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:b("width:24px;height:24px;color:",f.imagesFolder,";",""),lockIcon:b("width:10px;height:10px;color:",f.imagesFolder,";margin-left:-6px;margin-top:8px;",""),parentIcon:b("width:20px;height:20px;color:",f.textMuted,";flex-shrink:0;",""),fileIcon:b("width:20px;height:20px;color:",f.textMuted,";flex-shrink:0;",""),thumbnail:b("max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;border-radius:4px;border:1px solid ",f.borderLight,";",""),name:b("font-size:",F.base,";font-weight:500;color:",f.text,";letter-spacing:-0.01em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:300px;",""),meta:b("font-size:",F.sm,";color:",f.textSecondary,";",""),cdnBadge:b("display:inline-flex;align-items:center;gap:4px;font-size:",F.xs,";font-weight:500;color:",f.success,";",""),cdnBadgeRemote:b("display:inline-flex;align-items:center;font-size:",F.xs,";font-weight:500;color:#ef4444;",""),cdnIcon:{name:"1suksrg",styles:"width:12px;height:12px"},cdnEmpty:b("font-size:",F.sm,";color:",f.textMuted,";",""),openBtn:b("height:32px;font-size:",F.sm,";font-weight:500;color:",f.primary,";background:",f.surface,";border:1px solid ",f.border,";padding:0 14px;cursor:pointer;border-radius:4px;transition:all 0.15s ease;display:inline-flex;align-items:center;&:hover{background-color:",f.primaryLight,";border-color:",f.primary,";}","")};function zg(){const{loading:o,sortedItems:s,metaEmpty:h,isAtRoot:u,isSearching:p,allItemsSelected:m,someItemsSelected:k,selectedItems:_,navigateUp:R,handleItemClick:S,handleOpen:G,handleGenerateThumbnail:H,handleSelectAll:Q,triggerScan:le}=Eh();return o?c("div",{css:K.loading,children:c("div",{css:K.spinner})}):h&&u?x("div",{css:K.empty,children:[c("p",{children:"No files tracked yet"}),c("p",{css:K.emptyHint,children:"Click Scan to discover files in your public folder"}),c("button",{css:K.scanButton,onClick:le,children:"Scan for Files"})]}):s.length===0&&u?x("div",{css:K.empty,children:[c("p",{children:"No files in this folder"}),c("p",{css:K.emptyHint,children:"Upload images or click Scan in the toolbar"})]}):c("div",{css:K.tableWrapper,children:x("table",{css:K.table,children:[c("thead",{children:x("tr",{children:[c("th",{css:[K.th,K.thCheckbox,"",""],children:s.length>0&&c("input",{type:"checkbox",css:K.checkbox,checked:m,ref:U=>{U&&(U.indeterminate=k&&!m)},onChange:Q})}),c("th",{css:K.th,children:"Name"}),c("th",{css:[K.th,K.thSize,"",""],children:"Size"}),c("th",{css:[K.th,K.thDimensions,"",""],children:"Dimensions"}),c("th",{css:[K.th,K.thCdn,"",""],children:"CDN"})]})}),x("tbody",{css:K.tbody,children:[!u&&!p&&x("tr",{css:K.parentRow,onClick:R,children:[c("td",{css:K.td}),c("td",{css:K.td,children:x("div",{css:K.nameCell,children:[c("svg",{css:K.parentIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M3 10h10a8 8 0 018 8v2M3 10l6 6m-6-6l6-6"})}),c("span",{css:K.name,children:".."})]})}),c("td",{css:[K.td,K.meta,"",""],children:"--"}),c("td",{css:[K.td,K.meta,"",""],children:"Parent folder"}),c("td",{css:K.td,children:"--"})]}),s.map(U=>c(Mg,{item:U,isSelected:_.has(U.path),onClick:Y=>S(U,Y),onOpen:()=>G(U),onGenerateThumbnail:()=>H(U)},U.path))]})]})})}function Mg({item:o,isSelected:s,onClick:h,onOpen:u,onGenerateThumbnail:p}){const[m,k]=w.useState(!1),_=o.type==="folder",R=!_&&o.thumbnail!==void 0,S=o.isProtected||_&&o.name==="images"&&o.path==="public/images",G=Q=>{Q.stopPropagation();const le="/"+o.path.replace(/^public\//,"");navigator.clipboard.writeText(le),k(!0),setTimeout(()=>k(!1),1500)},H=Q=>{if(S){Q.stopPropagation(),u();return}h(Q)};return x("tr",{css:[K.row,s&&!S&&K.rowSelected,"",""],onClick:H,children:[c("td",{css:[K.td,K.checkboxCell,"",""],onClick:Q=>Q.stopPropagation(),children:!S&&c("input",{type:"checkbox",css:K.checkbox,checked:s,onChange:()=>h({})})}),c("td",{css:K.td,children:x("div",{css:K.nameCell,children:[_?S?x("div",{css:K.imagesFolderWrapper,children:[c("svg",{css:K.imagesFolderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:c("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"})}),c("svg",{css:K.lockIcon,fill:"currentColor",viewBox:"0 0 20 20",children:c("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"})})]}):c("div",{css:K.folderIconWrapper,children:c("svg",{css:K.folderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:c("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&&o.thumbnail?c("div",{css:K.thumbnailWrapper,children:c("img",{css:K.thumbnail,src:o.thumbnail,alt:o.name,loading:"lazy"})}):c("div",{css:K.thumbnailWrapper,children:c("svg",{css:K.fileIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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"})})}),c("span",{css:K.name,title:o.name,children:Tg(o.name)}),x("div",{css:K.actionsCell,children:[x("button",{css:K.copyBtn,onClick:G,title:"Copy file path",children:[m&&c("span",{css:K.tooltip,children:"Copied!"}),c("svg",{css:K.copyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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"})})]}),c("button",{css:K.openBtn,onClick:Q=>{Q.stopPropagation(),u()},children:"Open"})]})]})}),c("td",{css:[K.td,K.meta,"",""],children:_?x("div",{css:K.folderStats,children:[o.localCount!==void 0&&o.localCount>0&&x("span",{css:[K.folderStat,K.folderStatLocal,"",""],title:`${o.localCount} local`,children:[c("svg",{css:K.folderStatIconLocal,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),o.localCount]}),o.cloudCount!==void 0&&o.cloudCount>0&&x("span",{css:[K.folderStat,K.folderStatCloud,"",""],title:`${o.cloudCount} in cloud`,children:[c("svg",{css:K.folderStatIconCloud,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})}),o.cloudCount]}),o.remoteCount!==void 0&&o.remoteCount>0&&x("span",{css:[K.folderStat,K.folderStatRemote,"",""],title:`${o.remoteCount} remote`,children:[c("svg",{css:K.folderStatIconRemote,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"})}),o.remoteCount]}),o.updateCount!==void 0&&o.updateCount>0&&x("span",{css:[K.folderStat,K.folderStatUpdate,"",""],title:`${o.updateCount} pending update${o.updateCount!==1?"s":""}`,children:[c("svg",{css:K.folderStatIconUpdate,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),o.updateCount]}),!o.localCount&&!o.cloudCount&&!o.remoteCount&&!o.updateCount&&o.fileCount!==void 0&&x("span",{children:[o.fileCount," files"]}),!o.localCount&&!o.cloudCount&&!o.remoteCount&&!o.updateCount&&o.fileCount===void 0&&"--"]}):o.hasUpdate?x("span",{css:K.updateLabel,children:[c("svg",{css:K.updateCloudIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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"})}),c("svg",{css:K.updateSyncIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),"update"]}):o.cdnPushed?c("span",{css:K.storedLabel,children:c("svg",{css:o.isRemote?K.storedIconRemote:K.storedIconCloud,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.isRemote?c("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"}):c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})})}):o.size!==void 0?uh(o.size):"--"}),c("td",{css:[K.td,K.meta,"",""],children:_?o.totalSize!==void 0?uh(o.totalSize):"--":o.dimensions?`${o.dimensions.width}x${o.dimensions.height}`:"--"}),c("td",{css:K.td,children:o.cdnPushed?o.isRemote?c("span",{css:K.cdnBadgeRemote,children:"Remote"}):x("span",{css:K.cdnBadge,children:[c("svg",{css:K.cdnIcon,fill:"currentColor",viewBox:"0 0 20 20",children:c("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"]}):c("span",{css:K.cdnEmpty,children:"--"})})]})}function uh(o){return o<1024?`${o} B`:o<1024*1024?`${(o/1024).toFixed(1)} KB`:`${(o/(1024*1024)).toFixed(1)} MB`}function Tg(o,s=32){if(o.length<=s)return o;const h=o.lastIndexOf("."),u=h>0?o.substring(h):"",p=h>0?o.substring(0,h):o,m=s-u.length-3;if(m<6)return o.substring(0,s-3)+"...";const k=Math.ceil(m/2),_=Math.floor(m/2);return p.substring(0,k)+"..."+p.substring(p.length-_)+u}const Ag=[".jpg",".jpeg",".png",".gif",".webp",".svg",".ico",".bmp",".tiff",".tif"],Eg=[".mp4",".webm",".mov",".avi",".mkv",".m4v"];function Dg(o){const s=o.toLowerCase().substring(o.lastIndexOf("."));return Ag.includes(s)}function kg(o){const s=o.toLowerCase().substring(o.lastIndexOf("."));return Eg.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:b("display:flex;flex:1;margin:24px;background:",f.surface,";border:1px solid ",f.border,";border-radius:12px;overflow:hidden;box-shadow:0 20px 40px rgba(0, 0, 0, 0.2);",""),main:b("position:relative;flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:24px;background:",f.background,";overflow:auto;",""),headerButtons:{name:"8wfhwn",styles:"position:absolute;top:16px;right:16px;display:flex;gap:8px;z-index:10"},copyBtn:b("position:relative;padding:8px;background:",f.surface,";border:1px solid ",f.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:",f.surfaceHover,";border-color:",f.borderHover,";}",""),copyIcon:b("width:20px;height:20px;color:",f.textSecondary,";",""),statusIcon:b("display:flex;align-items:center;justify-content:center;padding:8px;background:",f.surface,";border:1px solid ",f.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:b("padding:8px;background:",f.surface,";border:1px solid ",f.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:",f.surfaceHover,";border-color:",f.borderHover,";}",""),mainCloseIcon:b("width:20px;height:20px;color:",f.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:b("display:flex;flex-direction:column;align-items:center;justify-content:center;padding:48px;background:",f.surface,";border-radius:12px;border:1px solid ",f.border,";",""),fileIcon:b("width:80px;height:80px;color:",f.textMuted,";margin-bottom:16px;",""),fileName:b("font-size:",F.lg,";font-weight:600;color:",f.text,";margin:0;",""),sidebar:b("width:280px;background:",f.surface,";border-left:1px solid ",f.border,";display:flex;flex-direction:column;overflow:hidden;",""),sidebarHeader:b("padding:16px 20px;border-bottom:1px solid ",f.border,";",""),sidebarTitle:b("font-size:",F.base,";font-weight:600;color:",f.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:b("display:flex;justify-content:space-between;font-size:",F.sm,";",""),infoLabel:b("color:",f.textSecondary,";",""),infoValue:b("color:",f.text,";font-weight:500;text-align:right;max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;",""),infoValueWrap:b("color:",f.text,";font-weight:500;text-align:right;max-width:160px;word-break:break-all;white-space:normal;",""),infoLink:b("color:",f.primary,";font-weight:500;text-align:right;max-width:160px;word-break:break-all;white-space:normal;text-decoration:none;&:hover{text-decoration:underline;}",""),actions:{name:"3w0yoi",styles:"display:flex;flex-direction:column;gap:8px"},actionBtn:b("display:flex;align-items:center;gap:10px;width:100%;padding:12px 14px;font-size:",F.base,";font-weight:500;background:",f.surface,";border:1px solid ",f.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;color:",f.text,";text-align:left;&:hover:not(:disabled){background-color:",f.surfaceHover,";border-color:",f.borderHover,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),actionBtnDanger:b("color:",f.danger,";&:hover:not(:disabled){background-color:",f.dangerLight,";border-color:",f.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 _g(){const{focusedItem:o,setFocusedItem:s,triggerRefresh:h,fileItems:u,requestDelete:p,requestMove:m,requestSync:k,requestDownload:_,requestProcess:R,actionState:S}=Qa(),[G,H]=w.useState(!1),[Q,le]=w.useState(!1),[U,Y]=w.useState(!1),[be,W]=w.useState(null),[he,ne]=w.useState(!1),[oe,q]=w.useState(!1),[J,L]=w.useState({current:0,total:3,percent:0,status:"processing",message:"Generating favicons..."}),fe=S.showProgress,Se=o?o.name.toLowerCase()==="favicon.png"||o.name.toLowerCase()==="favicon.jpg":!1;if(!o)return null;const ke=Dg(o.name),_e=kg(o.name),Te="/"+o.path.replace(/^public\//,""),at=o.cdnPushed&&o.cdnBaseUrl?`${o.cdnBaseUrl}${Te}`:Te,$e=typeof window<"u"?window.location.origin:"",Ye=o.cdnPushed&&o.cdnBaseUrl?`${o.cdnBaseUrl}${Te}`:`${$e}${Te}`,T=()=>{s(null)},j=()=>{navigator.clipboard.writeText(Ye),ne(!0),setTimeout(()=>ne(!1),1500)},P=async y=>{if(y&&y!==o.name){le(!0);try{const E=await fetch("/api/studio/rename",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({oldPath:o.path,newName:y})});if(E.ok){const $=(await E.json()).newPath;s({...o,path:$,name:$.split("/").pop()||y}),h()}else{const V=await E.json();W({title:"Rename Failed",message:V.error||"Failed to rename file"})}}catch(E){console.error("Rename error:",E),W({title:"Rename Failed",message:"An error occurred while renaming the file"})}finally{le(!1),H(!1)}}},Ae=async()=>{if(o){q(!0),L({current:0,total:3,percent:0,status:"processing",message:"Generating favicons..."});try{const y=await fetch("/api/studio/generate-favicon",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({imagePath:"/"+o.path.replace(/^public\//,"")})});if(!y.ok){const $=await y.json();L({current:0,total:3,percent:0,status:"error",message:$.error||"Failed to generate favicons"});return}const E=y.body?.getReader(),V=new TextDecoder;if(E){let $="";for(;;){const{done:Z,value:Ee}=await E.read();if(Z)break;$+=V.decode(Ee,{stream:!0});const pe=$.split(`
70
+ `);$=pe.pop()||"";for(const dt of pe)if(dt.startsWith("data: "))try{const Re=JSON.parse(dt.slice(6));Re.type==="start"?L($t=>({...$t,total:Re.total})):Re.type==="progress"?L({current:Re.current,total:Re.total,percent:Re.percent,status:"processing",message:Re.message}):Re.type==="complete"?L({current:Re.processed,total:Re.processed,percent:100,status:Re.errors>0?"error":"complete",message:Re.message}):Re.type==="error"&&L($t=>({...$t,status:"error",message:Re.message}))}catch{}}}}catch(y){console.error("Favicon generation error:",y),L({current:0,total:3,percent:0,status:"error",message:"An error occurred while generating favicons"})}}},Ne=()=>ke?c("img",{css:ue.image,src:at,alt:o.name}):_e?c("video",{css:ue.video,src:at,controls:!0}):x("div",{css:ue.filePlaceholder,children:[c("svg",{css:ue.fileIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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"})}),c("p",{css:ue.fileName,children:o.name})]});return x(bt,{children:[be&&c(Mh,{title:be.title,message:be.message,onClose:()=>W(null)}),c(Ah,{isOpen:U,onClose:()=>Y(!1)}),G&&c(gr,{title:"Rename File",message:"Enter a new name for the file:",defaultValue:o.name,placeholder:"Enter new filename",confirmLabel:"Rename",isLoading:Q,loadingLabel:"Renaming...",onConfirm:P,onCancel:()=>!Q&&H(!1)}),oe&&c(tu,{title:"Generating Favicons",progress:J,onClose:()=>q(!1)}),c("div",{css:ue.overlay,onClick:T,children:x("div",{css:ue.container,onClick:y=>y.stopPropagation(),children:[x("div",{css:ue.main,children:[x("div",{css:ue.headerButtons,children:[o.cdnPushed&&!o.isRemote&&c("span",{css:ue.statusIcon,title:"Pushed to CDN",children:c("svg",{css:ue.cloudIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})})}),o.isRemote&&c("span",{css:ue.statusIcon,title:"Remote image",children:c("svg",{css:ue.globeIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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"})})}),x("button",{css:ue.copyBtn,onClick:j,title:"Copy file path",children:[he&&c("span",{css:ue.tooltip,children:"Copied!"}),c("svg",{css:ue.copyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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"})})]}),c("button",{css:ue.mainCloseBtn,onClick:T,"aria-label":"Close",children:c("svg",{css:ue.mainCloseIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),c("div",{css:ue.mediaWrapper,children:Ne()})]}),x("div",{css:ue.sidebar,children:[c("div",{css:ue.sidebarHeader,children:c("h3",{css:ue.sidebarTitle,children:"Details"})}),x("div",{css:ue.sidebarContent,children:[x("div",{css:ue.info,children:[x("div",{css:ue.infoRow,children:[c("span",{css:ue.infoLabel,children:"Name"}),c("span",{css:ue.infoValueWrap,children:o.name})]}),x("div",{css:ue.infoRow,children:[c("span",{css:ue.infoLabel,children:"Path"}),c("span",{css:ue.infoValueWrap,children:o.path.replace(/^public\//,"")})]}),o.size!==void 0&&x("div",{css:ue.infoRow,children:[c("span",{css:ue.infoLabel,children:"Size"}),c("span",{css:ue.infoValue,children:Og(o.size)})]}),o.dimensions&&x("div",{css:ue.infoRow,children:[c("span",{css:ue.infoLabel,children:"Dimensions"}),x("span",{css:ue.infoValue,children:[o.dimensions.width," × ",o.dimensions.height]})]}),x("div",{css:ue.infoRow,children:[c("span",{css:ue.infoLabel,children:"CDN Status"}),c("span",{css:ue.infoValue,children:o.cdnPushed?o.isRemote?"Remote":"Pushed":"Local"})]}),x("div",{css:ue.infoRow,children:[c("span",{css:ue.infoLabel,children:"URL"}),c("a",{href:Ye,target:"_blank",rel:"noopener noreferrer",css:ue.infoLink,title:Ye,children:Ye})]})]}),x("div",{css:ue.actions,children:[x("button",{css:ue.actionBtn,onClick:()=>H(!0),disabled:o.isProtected,children:[c("svg",{css:ue.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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"]}),x("button",{css:ue.actionBtn,onClick:()=>m([o.path]),disabled:fe||o.isProtected,children:[c("svg",{css:ue.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4"})}),"Move"]}),x("button",{css:[ue.actionBtn,ue.actionBtnCloud,"",""],onClick:()=>k([o.path],u),disabled:fe||o.isProtected||o.cdnPushed&&!o.isRemote,title:o.cdnPushed&&!o.isRemote?"Already in R2":void 0,children:[c("svg",{css:ue.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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"]}),x("button",{css:[ue.actionBtn,ue.actionBtnCloud,"",""],onClick:()=>_([o.path],u),disabled:fe||!o.cdnPushed||o.isRemote,title:o.cdnPushed?o.isRemote?"Remote image":"Download from CDN to local":"Not on CDN",children:[c("svg",{css:ue.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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"]}),x("button",{css:ue.actionBtn,onClick:()=>R([o.path]),disabled:fe||o.isProtected,children:[c("svg",{css:ue.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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"})}),"Process Image"]}),Se&&x("button",{css:ue.actionBtn,onClick:Ae,disabled:oe||o.isProtected,children:[c("svg",{css:ue.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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"]}),x("button",{css:[ue.actionBtn,ue.actionBtnDanger,"",""],onClick:()=>p([o.path]),disabled:fe||o.isProtected,children:[c("svg",{css:ue.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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"]})]})]})]})]})})]})}function Og(o){return o<1024?`${o} B`:o<1024*1024?`${(o/1024).toFixed(1)} KB`:`${(o/(1024*1024)).toFixed(1)} MB`}const Rg="36px",De={btn:b("height:",Rg,";padding:0 12px;background:",f.surface,";border:1px solid ",f.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{background-color:",f.surfaceHover,";border-color:",f.borderHover,";}",""),icon:b("width:16px;height:16px;color:",f.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:b(Ki," position:relative;background-color:",f.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:b("font-size:",F.xl,";font-weight:600;color:",f.text,";margin:0;letter-spacing:-0.02em;",""),closeBtn:b("padding:6px;background:",f.surface,";border:1px solid ",f.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{background-color:",f.surfaceHover,";border-color:",f.borderHover,";}",""),sections:{name:"klisov",styles:"display:flex;flex-direction:column;gap:24px"},sectionTitle:b("font-size:",F.base,";font-weight:600;color:",f.text,";margin:0 0 12px 0;",""),description:b("font-size:",F.sm,";color:",f.textSecondary,";margin:0 0 12px 0;",""),codeWrapper:{name:"bjn8wh",styles:"position:relative"},code:b("background-color:",f.background,";border-radius:8px;padding:12px;padding-right:40px;font-family:'SF Mono',Monaco,Consolas,monospace;font-size:",F.xs,";color:",f.textSecondary,";border:1px solid ",f.border,";overflow-x:auto;white-space:nowrap;",""),copyBtn:b("position:absolute;top:8px;right:8px;padding:4px;background:",f.surface,";border:1px solid ",f.border,";border-radius:4px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{background-color:",f.surfaceHover,";border-color:",f.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:b("width:14px;height:14px;color:",f.textSecondary,";",""),codeLine:{name:"1bbvuqp",styles:"margin:0 0 4px 0;&:last-child{margin:0;}"},input:b("width:100%;padding:10px 14px;border:1px solid ",f.border,";border-radius:6px;font-size:",F.base,";color:",f.text,";background:",f.surface,";transition:all 0.15s ease;&:focus{outline:none;border-color:",f.primary,";box-shadow:0 0 0 3px ",f.primaryLight,";}&::placeholder{color:",f.textMuted,";}",""),grid:{name:"xtlr5l",styles:"display:grid;grid-template-columns:repeat(3, 1fr);gap:12px"},label:b("font-size:",F.xs,";font-weight:500;color:",f.textSecondary,";display:block;margin-bottom:6px;",""),footer:b("margin-top:24px;padding-top:20px;border-top:1px solid ",f.border,";display:flex;justify-content:flex-end;gap:12px;",""),cancelBtn:b("padding:10px 18px;font-size:",F.base,";font-weight:500;color:",f.text,";background:",f.surface,";border:1px solid ",f.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;&:hover{background-color:",f.surfaceHover,";border-color:",f.borderHover,";}",""),saveBtn:b("padding:10px 18px;font-size:",F.base,";font-weight:500;color:white;background-color:",f.primary,";border:1px solid ",f.primary,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;&:hover{background-color:",f.primaryHover,";border-color:",f.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:b("flex:1;padding:8px 12px;border:1px solid ",f.border,";border-radius:6px;font-size:",F.sm,";color:",f.text,";background:",f.surface,";transition:all 0.15s ease;&:focus{outline:none;border-color:",f.primary,";box-shadow:0 0 0 3px ",f.primaryLight,";}",""),cdnIndex:b("font-size:",F.xs,";color:",f.textMuted,";width:24px;text-align:center;flex-shrink:0;",""),cdnDeleteBtn:b("padding:6px;background:none;border:none;cursor:pointer;color:",f.textMuted,";transition:color 0.15s;flex-shrink:0;&:hover{color:",f.danger,";}",""),cdnAddBtn:b("padding:8px 12px;font-size:",F.sm,";font-weight:500;color:",f.primary,";background:",f.primaryLight,";border:1px dashed ",f.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:",f.surface,";}",""),warning:b("font-size:",F.xs,";color:",f.danger,";margin-top:8px;padding:8px 12px;background:",f.dangerLight,";border-radius:6px;","")};function Lg(){const[o,s]=w.useState(!1);return x(bt,{children:[c("button",{css:De.btn,onClick:()=>s(!0),"aria-label":"Settings",children:x("svg",{css:De.icon,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[c("circle",{cx:"12",cy:"12",r:"3"}),c("path",{d:"M19.4 15a1.65 1.65 0 00.33 1.82l.06.06a2 2 0 010 2.83 2 2 0 01-2.83 0l-.06-.06a1.65 1.65 0 00-1.82-.33 1.65 1.65 0 00-1 1.51V21a2 2 0 01-2 2 2 2 0 01-2-2v-.09A1.65 1.65 0 009 19.4a1.65 1.65 0 00-1.82.33l-.06.06a2 2 0 01-2.83 0 2 2 0 010-2.83l.06-.06a1.65 1.65 0 00.33-1.82 1.65 1.65 0 00-1.51-1H3a2 2 0 01-2-2 2 2 0 012-2h.09A1.65 1.65 0 004.6 9a1.65 1.65 0 00-.33-1.82l-.06-.06a2 2 0 010-2.83 2 2 0 012.83 0l.06.06a1.65 1.65 0 001.82.33H9a1.65 1.65 0 001-1.51V3a2 2 0 012-2 2 2 0 012 2v.09a1.65 1.65 0 001 1.51 1.65 1.65 0 001.82-.33l.06-.06a2 2 0 012.83 0 2 2 0 010 2.83l-.06.06a1.65 1.65 0 00-.33 1.82V9a1.65 1.65 0 001.51 1H21a2 2 0 012 2 2 2 0 01-2 2h-.09a1.65 1.65 0 00-1.51 1z"})]})}),o&&c(Ng,{onClose:()=>s(!1)})]})}const Ug=`# Dev site link (opens from Studio header)
71
+ STUDIO_DEV_SITE_URL=http://localhost:3000
72
+
73
+ # Cloudflare R2 Storage
74
+ CLOUDFLARE_R2_ACCOUNT_ID=your_account_id
75
+ CLOUDFLARE_R2_ACCESS_KEY_ID=your_access_key_id
76
+ CLOUDFLARE_R2_SECRET_ACCESS_KEY=your_secret_access_key
77
+ CLOUDFLARE_R2_BUCKET_NAME=your_bucket_name
78
+ CLOUDFLARE_R2_PUBLIC_URL=https://your-cdn.example.com`;function Ng({onClose:o}){const{triggerRefresh:s}=Qa(),[h,u]=w.useState(!1),[p,m]=w.useState([]),[k,_]=w.useState(!0),[R,S]=w.useState(!1),[G,H]=w.useState(!1);w.useEffect(()=>{async function W(){try{const ne=await(await fetch("/api/studio/cdns")).json();m(ne.cdns||[])}catch(he){console.error("Failed to load CDN URLs:",he)}finally{_(!1)}}W()},[]);const Q=()=>{navigator.clipboard.writeText(Ug),u(!0),setTimeout(()=>u(!1),2e3)},le=w.useCallback((W,he)=>{m(ne=>{const oe=[...ne];return oe[W]=he,oe}),H(!0)},[]),U=w.useCallback(()=>{m(W=>[...W,""]),H(!0)},[]),Y=w.useCallback(W=>{m(he=>he.filter((ne,oe)=>oe!==W)),H(!0)},[]),be=w.useCallback(async()=>{S(!0);try{(await fetch("/api/studio/cdns",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cdns:p})})).ok&&(H(!1),s(),o())}catch(W){console.error("Failed to save CDN URLs:",W)}finally{S(!1)}},[p,s,o]);return c("div",{css:De.overlay,onClick:o,children:x("div",{css:De.panel,onClick:W=>W.stopPropagation(),children:[x("div",{css:De.header,children:[c("h2",{css:De.title,children:"Settings"}),c("button",{css:De.closeBtn,onClick:o,children:c("svg",{css:De.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),x("div",{css:De.sections,children:[x("section",{children:[c("h3",{css:De.sectionTitle,children:"CDN URLs"}),c("p",{css:De.description,children:"Manage CDN base URLs used by your images:"}),k?c("p",{css:De.description,children:"Loading..."}):x(bt,{children:[c("div",{css:De.cdnList,children:p.map((W,he)=>x("div",{css:De.cdnRow,children:[c("span",{css:De.cdnIndex,children:he}),c("input",{css:De.cdnInput,type:"text",value:W,onChange:ne=>le(he,ne.target.value),placeholder:"https://cdn.example.com"}),c("button",{css:De.cdnDeleteBtn,onClick:()=>Y(he),title:"Delete CDN URL",children:c("svg",{width:"16",height:"16",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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"})})})]},he))}),x("button",{css:De.cdnAddBtn,onClick:U,children:[c("svg",{width:"14",height:"14",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})}),"Add CDN URL"]}),p.length>0&&c("p",{css:De.warning,children:"Warning: Changing CDN URLs may break image references. The index numbers correspond to image `c` values."})]})]}),x("section",{children:[c("h3",{css:De.sectionTitle,children:"Environment Variables"}),x("p",{css:De.description,children:["Configure in ",c("code",{children:".env.studio"})," file:"]}),x("div",{css:De.codeWrapper,children:[x("button",{css:De.copyBtn,onClick:Q,title:"Copy to clipboard",children:[h&&c("span",{css:De.tooltip,children:"Copied!"}),c("svg",{css:De.copyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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"})})]}),x("div",{css:De.code,children:[c("p",{css:De.codeLine,children:"STUDIO_DEV_SITE_URL=http://localhost:3000"}),c("p",{css:De.codeLine,children:" "}),c("p",{css:De.codeLine,children:"# Cloudflare R2 Storage"}),c("p",{css:De.codeLine,children:"CLOUDFLARE_R2_ACCOUNT_ID=your_account_id"}),c("p",{css:De.codeLine,children:"CLOUDFLARE_R2_ACCESS_KEY_ID=your_access_key_id"}),c("p",{css:De.codeLine,children:"CLOUDFLARE_R2_SECRET_ACCESS_KEY=your_secret_access_key"}),c("p",{css:De.codeLine,children:"CLOUDFLARE_R2_BUCKET_NAME=your_bucket_name"}),c("p",{css:De.codeLine,children:"CLOUDFLARE_R2_PUBLIC_URL=https://your-cdn.example.com"})]})]})]}),x("section",{children:[c("h3",{css:De.sectionTitle,children:"Thumbnail Sizes"}),x("div",{css:De.grid,children:[x("div",{children:[c("label",{css:De.label,children:"Small"}),c("input",{css:De.input,type:"number",defaultValue:300})]}),x("div",{children:[c("label",{css:De.label,children:"Medium"}),c("input",{css:De.input,type:"number",defaultValue:700})]}),x("div",{children:[c("label",{css:De.label,children:"Large"}),c("input",{css:De.input,type:"number",defaultValue:1400})]})]})]})]}),x("div",{css:De.footer,children:[c("button",{css:De.cancelBtn,onClick:o,children:"Cancel"}),c("button",{css:De.saveBtn,onClick:be,disabled:R||!G,children:R?"Saving...":"Save Changes"})]})]})})}const ta={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:b("background:",f.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:b("width:24px;height:24px;color:",f.danger,";flex-shrink:0;",""),title:b("font-size:",F.lg,";font-weight:600;color:",f.text,";margin:0;",""),message:b("font-size:",F.base,";color:",f.textSecondary,";margin:0 0 20px 0;line-height:1.5;",""),button:b("width:100%;padding:10px 16px;border-radius:6px;font-size:",F.base,";font-weight:500;border:none;background:",f.primary,";color:white;cursor:pointer;transition:background 0.15s ease;&:hover{background:",f.primaryHover,";}","")};function Hg(){const{error:o,clearError:s}=Qa();return o?c("div",{css:ta.overlay,onClick:s,children:x("div",{css:ta.modal,onClick:h=>h.stopPropagation(),children:[x("div",{css:ta.header,children:[c("svg",{css:ta.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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"})}),c("h3",{css:ta.title,children:o.title})]}),c("p",{css:ta.message,children:o.message}),c("button",{css:ta.button,onClick:s,children:"OK"})]})}):null}const fh={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 Bg({triggerRefresh:o,clearSelection:s,setFocusedItem:h,showError:u}){const[p,m]=w.useState(fh),k=w.useRef(null),_=w.useCallback(J=>{m(L=>({...L,progressState:typeof J=="function"?J(L.progressState):{...L.progressState,...J}}))},[]),R=w.useCallback(J=>{m(L=>({...L,actionPaths:J,showDeleteConfirm:!0}))},[]),S=w.useCallback(J=>{m(L=>({...L,actionPaths:J,showMoveModal:!0}))},[]),G=w.useCallback((J,L)=>{const fe=J.map(_e=>"/"+_e.replace(/^public\//,""));let Se=!1,ke=!1;for(const _e of J){const Te=L.find(at=>at.path===_e);Te&&(Te.isRemote?Se=!0:Te.cdnPushed||(ke=!0))}m(_e=>({..._e,actionPaths:J,syncImageCount:fe.length,syncHasRemote:Se,syncHasLocal:ke,showSyncConfirm:!0}))},[]),H=w.useCallback((J,L)=>{const fe=[];for(const Se of J){const ke=L.find(_e=>_e.path===Se);ke&&ke.cdnPushed&&!ke.isRemote&&fe.push(Se)}m(Se=>({...Se,actionPaths:fe,downloadImageCount:fe.length,downloadTotalSelected:J.length,showDownloadConfirm:!0}))},[]),Q=w.useCallback(J=>{m(L=>({...L,actionPaths:J,showProcessConfirm:!0,processMode:"generate"}))},[]),le=w.useCallback(J=>{m(L=>({...L,processMode:J}))},[]),U=w.useCallback(()=>{m(J=>({...J,showDeleteConfirm:!1,showMoveModal:!1,showSyncConfirm:!1,showProcessConfirm:!1,showDownloadConfirm:!1}))},[]),Y=w.useCallback(()=>{m(fh)},[]),be=w.useCallback(()=>{k.current&&k.current.abort()},[]),W=w.useCallback(async()=>{const J=p.actionPaths;m(L=>({...L,showDeleteConfirm:!1}));try{const L=await fetch("/api/studio/delete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:J})});if(L.ok)s(),h(null),o();else{const fe=await L.json();u("Delete Failed",fe.error||"Unknown error")}}catch(L){console.error("Delete error:",L),u("Delete Failed","Delete failed. Check console for details.")}},[p.actionPaths,s,h,o,u]),he=w.useCallback(async J=>{const L=p.actionPaths;m(fe=>({...fe,showMoveModal:!1,showProgress:!0,progressTitle:"Moving Files",progressState:{current:0,total:L.length,percent:0,status:"processing",message:"Moving files..."}}));try{const fe=await fetch("/api/studio/move",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:L,destination:J})});if(!fe.ok){const _e=await fe.json();_({status:"error",message:_e.error||"Move failed"});return}const Se=fe.body?.getReader(),ke=new TextDecoder;if(Se){let _e="";for(;;){const{done:Te,value:at}=await Se.read();if(Te)break;_e+=ke.decode(at,{stream:!0});const $e=_e.split(`
79
+ `);_e=$e.pop()||"";for(const Ye of $e)if(Ye.startsWith("data: "))try{const T=JSON.parse(Ye.slice(6));T.type==="start"?_(j=>({...j,total:T.total})):T.type==="progress"?_({current:T.current,total:T.total,percent:Math.round(T.current/T.total*100),status:"processing",message:T.message}):T.type==="complete"?(_(j=>({...j,status:"complete",message:`Moved ${T.moved} file${T.moved!==1?"s":""}${T.errors>0?`, ${T.errors} error${T.errors!==1?"s":""}`:""}`})),T.errors>0&&T.errorMessages?.length>0&&u("Move Failed",T.errorMessages.join(`
80
+ `)),s(),h(null),o()):T.type==="error"&&_(j=>({...j,status:"error",message:T.message||"Unknown error"}))}catch{}}}}catch(fe){console.error("Move error:",fe),_(Se=>({...Se,status:"error",message:"Failed to move files. Check console for details."}))}},[p.actionPaths,s,h,o,u,_]),ne=w.useCallback(async()=>{const L=p.actionPaths.map(ke=>"/"+ke.replace(/^public\//,""));m(ke=>({...ke,showSyncConfirm:!1,showProgress:!0,progressTitle:"Pushing to CDN",progressState:{current:0,total:L.length,percent:0,status:"processing",message:"Pushing to CDN..."}}));let fe=0;const Se=[];for(let ke=0;ke<L.length;ke++){const _e=L[ke];try{const Te=await fetch("/api/studio/sync",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({imageKeys:[_e]})});if(Te.ok)fe++;else{const at=await Te.json();Se.push(`${_e}: ${at.error||"Unknown error"}`)}}catch(Te){Se.push(`${_e}: ${Te instanceof Error?Te.message:"Unknown error"}`)}_({current:ke+1,total:L.length,percent:Math.round((ke+1)/L.length*100),status:"processing",message:`Pushed ${_e}`})}_({current:L.length,total:L.length,percent:100,status:Se.length>0?"error":"complete",message:`Pushed ${fe} file${fe!==1?"s":""}${Se.length>0?`, ${Se.length} error${Se.length!==1?"s":""}`:""}`}),Se.length>0&&u("Push Errors",Se.join(`
81
+ `)),s(),o()},[p.actionPaths,s,o,u,_]),oe=w.useCallback(async()=>{const J=p.actionPaths,L=p.processMode,fe=J.map($e=>{const Ye=$e.replace(/^public\//,"");return Ye.startsWith("/")?Ye:`/${Ye}`}),Se=L==="remove",ke=Se?"/api/studio/unprocess-stream":"/api/studio/reprocess-stream",_e=Se?"Removing Thumbnails":"Generating Thumbnails",Te=Se?"Removing thumbnails...":"Generating thumbnails...";m($e=>({...$e,showProcessConfirm:!1,showProgress:!0,progressTitle:_e,progressState:{current:0,total:fe.length,percent:0,status:"processing",message:Te}})),k.current=new AbortController;const at=k.current.signal;try{const $e=await fetch(ke,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({imageKeys:fe}),signal:at});if(!$e.ok){const j=await $e.json();_({current:0,total:fe.length,percent:0,status:"error",message:j.error||(Se?"Failed to remove thumbnails":"Processing failed")});return}const Ye=$e.body?.getReader(),T=new TextDecoder;if(Ye){let j="";for(;;){const{done:P,value:Ae}=await Ye.read();if(P)break;j+=T.decode(Ae,{stream:!0});const Ne=j.split(`
82
+ `);j=Ne.pop()||"";for(const y of Ne)if(y.startsWith("data: "))try{const E=JSON.parse(y.slice(6));E.type==="start"?_(V=>({...V,total:E.total})):E.type==="progress"?_({current:E.current,total:E.total,percent:E.percent,status:"processing",message:E.message}):E.type==="cleanup"?_(V=>({...V,status:"cleanup",message:E.message})):E.type==="complete"?(_({current:E.processed,total:E.processed,percent:100,status:E.errors>0?"error":"complete",message:E.message}),o()):E.type==="error"&&_(V=>({...V,status:"error",message:E.message}))}catch{}}}}catch($e){at.aborted?_(Ye=>({...Ye,status:"stopped",message:Se?"Removal stopped by user":"Processing stopped by user"})):(console.error("Processing error:",$e),_({current:0,total:fe.length,percent:0,status:"error",message:Se?"Failed to remove thumbnails. Check console for details.":"Processing failed. Check console for details."}))}finally{k.current=null}},[p.actionPaths,p.processMode,o,_]),q=w.useCallback(async()=>{const J=p.progressState.orphanedFiles;if(!(!J||J.length===0))try{const L=await fetch("/api/studio/delete-orphans",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({files:J})});if(L.ok)_(fe=>({...fe,orphanedFiles:void 0,message:fe.message?.replace(/Found \d+ orphaned thumbnail\(s\).*/,"Orphaned thumbnails deleted.")})),o();else{const fe=await L.json();u("Delete Failed",fe.error||"Failed to delete orphaned files")}}catch(L){console.error("Delete orphans error:",L),u("Delete Failed","Failed to delete orphaned files. Check console for details.")}},[p.progressState.orphanedFiles,o,u,_]);return{actionState:p,setActionState:m,abortController:k.current,requestDelete:R,requestMove:S,requestSync:G,requestDownload:H,requestProcess:Q,setProcessMode:le,cancelAction:U,closeProgress:Y,stopProcessing:be,confirmDelete:W,confirmMove:he,confirmSync:ne,confirmProcess:oe,deleteOrphans:q}}const jg="36px",Et={container:b(Ki," display:flex;flex-direction:column;height:100%;background:",f.background,";",""),header:b("display:flex;align-items:center;justify-content:space-between;padding:12px 24px;background:",f.surface,";border-bottom:1px solid ",f.border,";position:relative;",""),title:b("font-size:",F.lg,";font-weight:600;color:",f.text,";margin:0;letter-spacing:-0.02em;flex-shrink:0;",""),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:b("display:flex;align-items:center;gap:6px;font-size:",F.base,";color:",f.textSecondary,";overflow:hidden;",""),breadcrumbSeparator:b("color:",f.border,";flex-shrink:0;",""),breadcrumbItem:b("color:",f.textSecondary,";text-decoration:none;cursor:pointer;transition:color 0.15s ease;white-space:nowrap;&:hover{color:",f.primary,";}",""),breadcrumbCurrent:b("color:",f.text,";font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;",""),headerIconBtn:b("display:flex;align-items:center;justify-content:center;width:32px;height:32px;color:",f.textMuted,";background:transparent;border:none;border-radius:6px;cursor:pointer;transition:all 0.15s ease;&:hover{color:",f.text,";background:",f.surface,";}",""),headerActions:{name:"1yydxi7",styles:"display:flex;align-items:center;gap:8px"},headerBtn:b("height:",jg,";padding:0 12px;background:",f.surface,";border:1px solid ",f.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{background-color:",f.surfaceHover,";border-color:",f.borderHover,";}",""),headerIcon:b("width:16px;height:16px;color:",f.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:b("position:absolute;top:0;left:0;right:0;bottom:0;background:rgba(99, 91, 255, 0.1);border:3px dashed ",f.primary,";border-radius:8px;display:flex;align-items:center;justify-content:center;z-index:50;pointer-events:none;",""),dropMessage:b("display:flex;flex-direction:column;align-items:center;gap:12px;color:",f.primary,";font-size:",F.lg,";font-weight:600;",""),dropIcon:{name:"18jhpep",styles:"width:48px;height:48px"}};function qg({onClose:o,isVisible:s=!0,standaloneMode:h=!1,workspacePath:u,siteUrl:p}){const m=o||(()=>{}),[k,_]=w.useState("public"),[R,S]=w.useState(new Set),[G,H]=w.useState(null),[Q,le]=w.useState("grid"),[U,Y]=w.useState(null),[be,W]=w.useState(null),[he,ne]=w.useState(!1),[oe,q]=w.useState(0),[J,L]=w.useState(!1),[fe,Se]=w.useState(""),[ke,_e]=w.useState(null),[Te,at]=w.useState([]),[$e,Ye]=w.useState(!1),T=w.useCallback(()=>{q(we=>we+1)},[]);w.useEffect(()=>{if(U&&Te.length>0){const we=Te.find(st=>st.path===U.path);we&&JSON.stringify(we)!==JSON.stringify(U)&&Y(we)}},[Te,U]);const j=w.useCallback(()=>{L(!0)},[]),P=w.useCallback(()=>{L(!1)},[]),Ae=w.useCallback((we,st)=>{_e({title:we,message:st})},[]),Ne=w.useCallback(()=>{_e(null)},[]),y=w.useCallback(we=>{we.preventDefault(),we.stopPropagation(),Ye(!0)},[]),E=w.useCallback(we=>{we.preventDefault(),we.stopPropagation(),Ye(!1)},[]),V=w.useCallback(async we=>{we.preventDefault(),we.stopPropagation(),Ye(!1);const st=Array.from(we.dataTransfer.files);if(st.length!==0&&!(k==="public/images"||k.startsWith("public/images/"))){for(const Lt of st){const Wt=new FormData;Wt.append("file",Lt),Wt.append("path",k);try{await fetch("/api/studio/upload",{method:"POST",body:Wt})}catch(Tn){console.error("Upload error:",Tn)}}T()}},[k,T]),$=w.useCallback(()=>{if(k==="public")return;const we=k.split("/");we.pop(),_(we.join("/")||"public"),S(new Set)},[k]),Z=w.useCallback(we=>{_(we),S(new Set),Y(null)},[]),Ee=w.useCallback(we=>{S(st=>{const Lt=new Set(st);return Lt.has(we)?Lt.delete(we):Lt.add(we),Lt}),H(we)},[]),pe=w.useCallback((we,st,Lt)=>{const Wt=Lt.findIndex(An=>An.path===we),Tn=Lt.findIndex(An=>An.path===st);if(Wt===-1||Tn===-1)return;const rl=Math.min(Wt,Tn),na=Math.max(Wt,Tn);S(An=>{const Ul=new Set(An);for(let sn=rl;sn<=na;sn++)Ul.add(Lt[sn].path);return Ul}),H(st)},[]),dt=w.useCallback(we=>{S(new Set(we.map(st=>st.path)))},[]),Re=w.useCallback(()=>{S(new Set)},[]),$t=w.useCallback(we=>{Y(we)},[]),xe=Bg({triggerRefresh:T,clearSelection:Re,setFocusedItem:$t,showError:Ae}),jn=w.useCallback(we=>{if(we.key==="Escape"){const st=we.target;if(st.tagName==="INPUT"||st.tagName==="TEXTAREA")return;U?Y(null):h||m()}},[m,U,h]);w.useEffect(()=>(s&&(document.addEventListener("keydown",jn),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",jn),document.body.style.overflow=""}),[jn,s]);const ol={isOpen:!0,openStudio:()=>{},closeStudio:m,toggleStudio:m,currentPath:k,setCurrentPath:Z,navigateUp:$,selectedItems:R,toggleSelection:Ee,selectRange:pe,selectAll:dt,clearSelection:Re,lastSelectedPath:G,viewMode:Q,setViewMode:le,focusedItem:U,setFocusedItem:Y,meta:be,setMeta:W,isLoading:he,setIsLoading:ne,refreshKey:oe,triggerRefresh:T,scanRequested:J,triggerScan:j,clearScanRequest:P,searchQuery:fe,setSearchQuery:Se,error:ke,showError:Ae,clearError:Ne,fileItems:Te,setFileItems:at,actionState:xe.actionState,requestDelete:xe.requestDelete,requestMove:xe.requestMove,requestSync:xe.requestSync,requestDownload:xe.requestDownload,requestProcess:xe.requestProcess,setProcessMode:xe.setProcessMode,confirmDelete:xe.confirmDelete,confirmMove:xe.confirmMove,confirmSync:xe.confirmSync,confirmProcess:xe.confirmProcess,cancelAction:xe.cancelAction,closeProgress:xe.closeProgress,stopProcessing:xe.stopProcessing,abortController:xe.abortController,deleteOrphans:xe.deleteOrphans};return c(zh.Provider,{value:ol,children:x("div",{css:Et.container,children:[x("div",{css:Et.header,children:[c("div",{css:Et.headerLeft,children:c("h1",{css:Et.title,children:"Studio"})}),c("div",{css:Et.headerCenter,children:c(Xg,{currentPath:k,onNavigate:Z,projectName:u?u.split("/").pop():void 0})}),x("div",{css:Et.headerActions,children:[p&&c("a",{href:p,target:"_blank",rel:"noopener noreferrer",css:Et.headerIconBtn,title:`Open ${p}`,children:c(Qg,{})}),c(Lg,{}),!h&&c("button",{css:Et.headerBtn,onClick:m,"aria-label":"Close Studio",children:c(Zg,{})})]})]}),c(ng,{}),x("div",{css:Et.content,onDragOver:y,onDragLeave:E,onDrop:V,children:[$e&&c("div",{css:Et.dropOverlay,children:x("div",{css:Et.dropMessage,children:[c("svg",{css:Et.dropIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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"})}),c("span",{children:"Drop files to upload"})]})}),c("div",{css:Et.fileBrowser,children:Q==="grid"?c(bg,{}):c(zg,{})})]}),U&&c(_g,{}),c(Hg,{}),xe.actionState.showDeleteConfirm&&c(qi,{title:"Delete Files",message:`Are you sure you want to delete ${xe.actionState.actionPaths.length} item${xe.actionState.actionPaths.length!==1?"s":""}? This action cannot be undone.`,confirmLabel:"Delete",variant:"danger",onConfirm:xe.confirmDelete,onCancel:xe.cancelAction}),xe.actionState.showSyncConfirm&&c(qi,{title:"Push to CDN",message:`Push ${xe.actionState.syncImageCount} image${xe.actionState.syncImageCount!==1?"s":""} to Cloudflare R2?${xe.actionState.syncHasRemote?" Remote images will be downloaded first.":""}${xe.actionState.syncHasLocal?" After pushing, local files will be deleted.":""}`,confirmLabel:"Push",onConfirm:xe.confirmSync,onCancel:xe.cancelAction}),xe.actionState.showProcessConfirm&&c(Vg,{imageCount:xe.actionState.actionPaths.length,mode:xe.actionState.processMode,onConfirm:xe.confirmProcess,onCancel:xe.cancelAction}),xe.actionState.showMoveModal&&c(Th,{selectedItems:new Set(xe.actionState.actionPaths),currentPath:k,onMove:we=>xe.confirmMove(we),onCancel:xe.cancelAction}),xe.actionState.showProgress&&c(tu,{title:xe.actionState.progressTitle,progress:xe.actionState.progressState,onStop:xe.stopProcessing,onDeleteOrphans:xe.deleteOrphans,onClose:xe.closeProgress})]})})}var Yg={name:"1cm5yut",styles:"display:flex;gap:12px;justify-content:flex-end"},Gg={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 Vg({imageCount:o,mode:s,onConfirm:h,onCancel:u}){const p={overlay:Gg,container:b("background:",f.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:b("font-size:",F.lg,";font-weight:600;color:",f.text,";margin:0 0 16px;",""),message:b("font-size:",F.base,";color:",f.textSecondary,";margin:0 0 20px;line-height:1.5;",""),actions:Yg,cancelBtn:b("padding:10px 20px;border:1px solid ",f.border,";border-radius:8px;background:",f.background,";color:",f.text,";font-size:",F.base,";font-weight:500;cursor:pointer;transition:all 0.15s ease;&:hover{background:",f.surfaceHover,";border-color:",f.borderHover,";}",""),confirmBtn:b("padding:10px 20px;border:none;border-radius:8px;background:",f.primary,";color:white;font-size:",F.base,";font-weight:500;cursor:pointer;transition:all 0.15s ease;&:hover{background:",f.primaryHover,";}",""),confirmBtnDanger:b("background:",f.danger,";&:hover{background:#dc2626;}","")},m=s==="remove",k=m?"Remove Thumbnails":"Generate Thumbnails",_=m?`Remove generated thumbnails for ${o} image${o!==1?"s":""}? Original images will be kept.`:`Generate thumbnails for ${o} image${o!==1?"s":""}?`,R=m?"Remove":"Generate";return c("div",{css:p.overlay,onClick:u,children:x("div",{css:p.container,onClick:S=>S.stopPropagation(),children:[c("h2",{css:p.title,children:k}),c("p",{css:p.message,children:_}),x("div",{css:p.actions,children:[c("button",{css:p.cancelBtn,onClick:u,children:"Cancel"}),c("button",{css:[p.confirmBtn,m&&p.confirmBtnDanger,"",""],onClick:h,children:R})]})]})})}function Xg({currentPath:o,onNavigate:s,projectName:h}){const u=o.split("/").filter(Boolean),p=u.map((m,k)=>({name:k===0&&m==="public"&&h?h:m,path:u.slice(0,k+1).join("/")}));return c("div",{css:Et.breadcrumbs,children:p.map((m,k)=>x("span",{style:{display:"flex",alignItems:"center",gap:6},children:[k>0&&c("span",{css:Et.breadcrumbSeparator,children:"/"}),k===p.length-1?c("span",{css:Et.breadcrumbCurrent,children:m.name}):c("span",{css:Et.breadcrumbItem,onClick:()=>s(m.path),children:m.name})]},m.path))})}function Qg(){return x("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[c("circle",{cx:"12",cy:"12",r:"10"}),c("line",{x1:"2",y1:"12",x2:"22",y2:"12"}),c("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 Zg(){return x("svg",{css:Et.headerIcon,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[c("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),c("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}const Dh=document.getElementById("root");if(!Dh)throw new Error("Root element not found");const Kg=window.__STUDIO_WORKSPACE__||"Unknown",Jg=window.__STUDIO_SITE_URL__||"";G1.createRoot(Dh).render(c(w.StrictMode,{children:c("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,background:"#0a0a0a"},children:c(qg,{isVisible:!0,standaloneMode:!0,workspacePath:Kg,siteUrl:Jg})})}));