@gallop.software/studio 2.3.87 → 2.3.89
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,89 @@
|
|
|
1
|
+
function qm(o,s){for(var h=0;h<s.length;h++){const d=s[h];if(typeof d!="string"&&!Array.isArray(d)){for(const p in d)if(p!=="default"&&!(p in o)){const y=Object.getOwnPropertyDescriptor(d,p);y&&Object.defineProperty(o,p,y.get?y:{enumerable:!0,get:()=>d[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"]'))d(p);new MutationObserver(p=>{for(const y of p)if(y.type==="childList")for(const A of y.addedNodes)A.tagName==="LINK"&&A.rel==="modulepreload"&&d(A)}).observe(document,{childList:!0,subtree:!0});function h(p){const y={};return p.integrity&&(y.integrity=p.integrity),p.referrerPolicy&&(y.referrerPolicy=p.referrerPolicy),p.crossOrigin==="use-credentials"?y.credentials="include":p.crossOrigin==="anonymous"?y.credentials="omit":y.credentials="same-origin",y}function d(p){if(p.ep)return;p.ep=!0;const y=h(p);fetch(p.href,y)}})();function Ym(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}var Bs={exports:{}},ji={};var G0;function Gm(){if(G0)return ji;G0=1;var o=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function h(d,p,y){var A=null;if(y!==void 0&&(A=""+y),p.key!==void 0&&(A=""+p.key),"key"in p){y={};for(var U in p)U!=="key"&&(y[U]=p[U])}else y=p;return p=y.ref,{$$typeof:o,type:d,key:A,ref:p!==void 0?p:null,props:y}}return ji.Fragment=s,ji.jsx=h,ji.jsxs=h,ji}var V0;function Vm(){return V0||(V0=1,Bs.exports=Gm()),Bs.exports}var Xi=Vm(),Ns={exports:{}},Oe={};var X0;function Xm(){if(X0)return Oe;X0=1;var o=Symbol.for("react.transitional.element"),s=Symbol.for("react.portal"),h=Symbol.for("react.fragment"),d=Symbol.for("react.strict_mode"),p=Symbol.for("react.profiler"),y=Symbol.for("react.consumer"),A=Symbol.for("react.context"),U=Symbol.for("react.forward_ref"),D=Symbol.for("react.suspense"),b=Symbol.for("react.memo"),G=Symbol.for("react.lazy"),R=Symbol.for("react.activity"),V=Symbol.iterator;function ce(v){return v===null||typeof v!="object"?null:(v=V&&v[V]||v["@@iterator"],typeof v=="function"?v:null)}var q={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},X=Object.assign,pe={};function F(v,L,J){this.props=v,this.context=L,this.refs=pe,this.updater=J||q}F.prototype.isReactComponent={},F.prototype.setState=function(v,L){if(typeof v!="object"&&typeof v!="function"&&v!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,v,L,"setState")},F.prototype.forceUpdate=function(v){this.updater.enqueueForceUpdate(this,v,"forceUpdate")};function re(){}re.prototype=F.prototype;function W(v,L,J){this.props=v,this.context=L,this.refs=pe,this.updater=J||q}var xe=W.prototype=new re;xe.constructor=W,X(xe,F.prototype),xe.isPureReactComponent=!0;var _=Array.isArray;function me(){}var Z={H:null,A:null,T:null,S:null},Q=Object.prototype.hasOwnProperty;function N(v,L,J){var I=J.ref;return{$$typeof:o,type:v,key:L,ref:I!==void 0?I:null,props:J}}function ne(v,L){return N(v.type,L,v.props)}function ye(v){return typeof v=="object"&&v!==null&&v.$$typeof===o}function te(v){var L={"=":"=0",":":"=2"};return"$"+v.replace(/[=:]/g,function(J){return L[J]})}var ee=/\/+/g;function ze(v,L){return typeof v=="object"&&v!==null&&v.key!=null?te(""+v.key):L.toString(36)}function Le(v){switch(v.status){case"fulfilled":return v.value;case"rejected":throw v.reason;default:switch(typeof v.status=="string"?v.then(me,me):(v.status="pending",v.then(function(L){v.status==="pending"&&(v.status="fulfilled",v.value=L)},function(L){v.status==="pending"&&(v.status="rejected",v.reason=L)})),v.status){case"fulfilled":return v.value;case"rejected":throw v.reason}}throw v}function E(v,L,J,I,ve){var ke=typeof v;(ke==="undefined"||ke==="boolean")&&(v=null);var _e=!1;if(v===null)_e=!0;else switch(ke){case"bigint":case"string":case"number":_e=!0;break;case"object":switch(v.$$typeof){case o:case s:_e=!0;break;case G:return _e=v._init,E(_e(v._payload),L,J,I,ve)}}if(_e)return ve=ve(v),_e=I===""?"."+ze(v,0):I,_(ve)?(J="",_e!=null&&(J=_e.replace(ee,"$&/")+"/"),E(ve,L,J,"",function(Ot){return Ot})):ve!=null&&(ye(ve)&&(ve=ne(ve,J+(ve.key==null||v&&v.key===ve.key?"":(""+ve.key).replace(ee,"$&/")+"/")+_e)),L.push(ve)),1;_e=0;var nt=I===""?".":I+":";if(_(v))for(var Ae=0;Ae<v.length;Ae++)I=v[Ae],ke=nt+ze(I,Ae),_e+=E(I,L,J,ke,ve);else if(Ae=ce(v),typeof Ae=="function")for(v=Ae.call(v),Ae=0;!(I=v.next()).done;)I=I.value,ke=nt+ze(I,Ae++),_e+=E(I,L,J,ke,ve);else if(ke==="object"){if(typeof v.then=="function")return E(Le(v),L,J,I,ve);throw L=String(v),Error("Objects are not valid as a React child (found: "+(L==="[object Object]"?"object with keys {"+Object.keys(v).join(", ")+"}":L)+"). If you meant to render a collection of children, use an array instead.")}return _e}function B(v,L,J){if(v==null)return v;var I=[],ve=0;return E(v,I,"","",function(ke){return L.call(J,ke,ve++)}),I}function oe(v){if(v._status===-1){var L=v._result;L=L(),L.then(function(J){(v._status===0||v._status===-1)&&(v._status=1,v._result=J)},function(J){(v._status===0||v._status===-1)&&(v._status=2,v._result=J)}),v._status===-1&&(v._status=0,v._result=L)}if(v._status===1)return v._result.default;throw v._result}var Be=typeof reportError=="function"?reportError:function(v){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var L=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof v=="object"&&v!==null&&typeof v.message=="string"?String(v.message):String(v),error:v});if(!window.dispatchEvent(L))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",v);return}console.error(v)},Ce={map:B,forEach:function(v,L,J){B(v,function(){L.apply(this,arguments)},J)},count:function(v){var L=0;return B(v,function(){L++}),L},toArray:function(v){return B(v,function(L){return L})||[]},only:function(v){if(!ye(v))throw Error("React.Children.only expected to receive a single React element child.");return v}};return Oe.Activity=R,Oe.Children=Ce,Oe.Component=F,Oe.Fragment=h,Oe.Profiler=p,Oe.PureComponent=W,Oe.StrictMode=d,Oe.Suspense=D,Oe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Z,Oe.__COMPILER_RUNTIME={__proto__:null,c:function(v){return Z.H.useMemoCache(v)}},Oe.cache=function(v){return function(){return v.apply(null,arguments)}},Oe.cacheSignal=function(){return null},Oe.cloneElement=function(v,L,J){if(v==null)throw Error("The argument must be a React element, but you passed "+v+".");var I=X({},v.props),ve=v.key;if(L!=null)for(ke in L.key!==void 0&&(ve=""+L.key),L)!Q.call(L,ke)||ke==="key"||ke==="__self"||ke==="__source"||ke==="ref"&&L.ref===void 0||(I[ke]=L[ke]);var ke=arguments.length-2;if(ke===1)I.children=J;else if(1<ke){for(var _e=Array(ke),nt=0;nt<ke;nt++)_e[nt]=arguments[nt+2];I.children=_e}return N(v.type,ve,I)},Oe.createContext=function(v){return v={$$typeof:A,_currentValue:v,_currentValue2:v,_threadCount:0,Provider:null,Consumer:null},v.Provider=v,v.Consumer={$$typeof:y,_context:v},v},Oe.createElement=function(v,L,J){var I,ve={},ke=null;if(L!=null)for(I in L.key!==void 0&&(ke=""+L.key),L)Q.call(L,I)&&I!=="key"&&I!=="__self"&&I!=="__source"&&(ve[I]=L[I]);var _e=arguments.length-2;if(_e===1)ve.children=J;else if(1<_e){for(var nt=Array(_e),Ae=0;Ae<_e;Ae++)nt[Ae]=arguments[Ae+2];ve.children=nt}if(v&&v.defaultProps)for(I in _e=v.defaultProps,_e)ve[I]===void 0&&(ve[I]=_e[I]);return N(v,ke,ve)},Oe.createRef=function(){return{current:null}},Oe.forwardRef=function(v){return{$$typeof:U,render:v}},Oe.isValidElement=ye,Oe.lazy=function(v){return{$$typeof:G,_payload:{_status:-1,_result:v},_init:oe}},Oe.memo=function(v,L){return{$$typeof:b,type:v,compare:L===void 0?null:L}},Oe.startTransition=function(v){var L=Z.T,J={};Z.T=J;try{var I=v(),ve=Z.S;ve!==null&&ve(J,I),typeof I=="object"&&I!==null&&typeof I.then=="function"&&I.then(me,Be)}catch(ke){Be(ke)}finally{L!==null&&J.types!==null&&(L.types=J.types),Z.T=L}},Oe.unstable_useCacheRefresh=function(){return Z.H.useCacheRefresh()},Oe.use=function(v){return Z.H.use(v)},Oe.useActionState=function(v,L,J){return Z.H.useActionState(v,L,J)},Oe.useCallback=function(v,L){return Z.H.useCallback(v,L)},Oe.useContext=function(v){return Z.H.useContext(v)},Oe.useDebugValue=function(){},Oe.useDeferredValue=function(v,L){return Z.H.useDeferredValue(v,L)},Oe.useEffect=function(v,L){return Z.H.useEffect(v,L)},Oe.useEffectEvent=function(v){return Z.H.useEffectEvent(v)},Oe.useId=function(){return Z.H.useId()},Oe.useImperativeHandle=function(v,L,J){return Z.H.useImperativeHandle(v,L,J)},Oe.useInsertionEffect=function(v,L){return Z.H.useInsertionEffect(v,L)},Oe.useLayoutEffect=function(v,L){return Z.H.useLayoutEffect(v,L)},Oe.useMemo=function(v,L){return Z.H.useMemo(v,L)},Oe.useOptimistic=function(v,L){return Z.H.useOptimistic(v,L)},Oe.useReducer=function(v,L,J){return Z.H.useReducer(v,L,J)},Oe.useRef=function(v){return Z.H.useRef(v)},Oe.useState=function(v){return Z.H.useState(v)},Oe.useSyncExternalStore=function(v,L,J){return Z.H.useSyncExternalStore(v,L,J)},Oe.useTransition=function(){return Z.H.useTransition()},Oe.version="19.2.4",Oe}var Q0;function $s(){return Q0||(Q0=1,Ns.exports=Xm()),Ns.exports}var C=$s();const fh=Ym(C),Z0=qm({__proto__:null,default:fh},[C]);function Qm(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 Zm(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 Km=(function(){function o(h){var d=this;this._insertTag=function(p){var y;d.tags.length===0?d.insertionPoint?y=d.insertionPoint.nextSibling:d.prepend?y=d.container.firstChild:y=d.before:y=d.tags[d.tags.length-1].nextSibling,d.container.insertBefore(p,y),d.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(d){d.forEach(this._insertTag)},s.insert=function(d){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(Zm(this));var p=this.tags[this.tags.length-1];if(this.isSpeedy){var y=Qm(p);try{y.insertRule(d,y.cssRules.length)}catch{}}else p.appendChild(document.createTextNode(d));this.ctr++},s.flush=function(){this.tags.forEach(function(d){var p;return(p=d.parentNode)==null?void 0:p.removeChild(d)}),this.tags=[],this.ctr=0},o})(),Bt="-ms-",br="-moz-",Je="-webkit-",hh="comm",Ws="rule",Is="decl",Jm="@import",ph="@keyframes",Fm="@layer",$m=Math.abs,xr=String.fromCharCode,Wm=Object.assign;function Im(o,s){return _t(o,0)^45?(((s<<2^_t(o,0))<<2^_t(o,1))<<2^_t(o,2))<<2^_t(o,3):0}function mh(o){return o.trim()}function Pm(o,s){return(o=s.exec(o))?o[0]:o}function Fe(o,s,h){return o.replace(s,h)}function Ks(o,s){return o.indexOf(s)}function _t(o,s){return o.charCodeAt(s)|0}function Qi(o,s,h){return o.slice(s,h)}function Dn(o){return o.length}function Ps(o){return o.length}function pr(o,s){return s.push(o),o}function e1(o,s){return o.map(s).join("")}var Sr=1,qa=1,gh=0,Ft=0,wt=0,Ga="";function Cr(o,s,h,d,p,y,A){return{value:o,root:s,parent:h,type:d,props:p,children:y,line:Sr,column:qa,length:A,return:""}}function qi(o,s){return Wm(Cr("",null,null,"",null,null,0),o,{length:-o.length},s)}function t1(){return wt}function n1(){return wt=Ft>0?_t(Ga,--Ft):0,qa--,wt===10&&(qa=1,Sr--),wt}function on(){return wt=Ft<gh?_t(Ga,Ft++):0,qa++,wt===10&&(qa=1,Sr++),wt}function _n(){return _t(Ga,Ft)}function mr(){return Ft}function Ji(o,s){return Qi(Ga,o,s)}function Zi(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 Sr=qa=1,gh=Dn(Ga=o),Ft=0,[]}function vh(o){return Ga="",o}function gr(o){return mh(Ji(Ft-1,Js(o===91?o+2:o===40?o+1:o)))}function l1(o){for(;(wt=_n())&&wt<33;)on();return Zi(o)>2||Zi(wt)>3?"":" "}function a1(o,s){for(;--s&&on()&&!(wt<48||wt>102||wt>57&&wt<65||wt>70&&wt<97););return Ji(o,mr()+(s<6&&_n()==32&&on()==32))}function Js(o){for(;on();)switch(wt){case o:return Ft;case 34:case 39:o!==34&&o!==39&&Js(wt);break;case 40:o===41&&Js(o);break;case 92:on();break}return Ft}function i1(o,s){for(;on()&&o+wt!==57;)if(o+wt===84&&_n()===47)break;return"/*"+Ji(s,Ft-1)+"*"+xr(o===47?o:on())}function o1(o){for(;!Zi(_n());)on();return Ji(o,Ft)}function r1(o){return vh(yr("",null,null,null,[""],o=yh(o),0,[0],o))}function yr(o,s,h,d,p,y,A,U,D){for(var b=0,G=0,R=A,V=0,ce=0,q=0,X=1,pe=1,F=1,re=0,W="",xe=p,_=y,me=d,Z=W;pe;)switch(q=re,re=on()){case 40:if(q!=108&&_t(Z,R-1)==58){Ks(Z+=Fe(gr(re),"&","&\f"),"&\f")!=-1&&(F=-1);break}case 34:case 39:case 91:Z+=gr(re);break;case 9:case 10:case 13:case 32:Z+=l1(q);break;case 92:Z+=a1(mr()-1,7);continue;case 47:switch(_n()){case 42:case 47:pr(c1(i1(on(),mr()),s,h),D);break;default:Z+="/"}break;case 123*X:U[b++]=Dn(Z)*F;case 125*X:case 59:case 0:switch(re){case 0:case 125:pe=0;case 59+G:F==-1&&(Z=Fe(Z,/\f/g,"")),ce>0&&Dn(Z)-R&&pr(ce>32?J0(Z+";",d,h,R-1):J0(Fe(Z," ","")+";",d,h,R-2),D);break;case 59:Z+=";";default:if(pr(me=K0(Z,s,h,b,G,p,U,W,xe=[],_=[],R),y),re===123)if(G===0)yr(Z,s,me,me,xe,y,R,U,_);else switch(V===99&&_t(Z,3)===110?100:V){case 100:case 108:case 109:case 115:yr(o,me,me,d&&pr(K0(o,me,me,0,0,p,U,W,p,xe=[],R),_),p,_,R,U,d?xe:_);break;default:yr(Z,me,me,me,[""],_,0,U,_)}}b=G=ce=0,X=F=1,W=Z="",R=A;break;case 58:R=1+Dn(Z),ce=q;default:if(X<1){if(re==123)--X;else if(re==125&&X++==0&&n1()==125)continue}switch(Z+=xr(re),re*X){case 38:F=G>0?1:(Z+="\f",-1);break;case 44:U[b++]=(Dn(Z)-1)*F,F=1;break;case 64:_n()===45&&(Z+=gr(on())),V=_n(),G=R=Dn(W=Z+=o1(mr())),re++;break;case 45:q===45&&Dn(Z)==2&&(X=0)}}return y}function K0(o,s,h,d,p,y,A,U,D,b,G){for(var R=p-1,V=p===0?y:[""],ce=Ps(V),q=0,X=0,pe=0;q<d;++q)for(var F=0,re=Qi(o,R+1,R=$m(X=A[q])),W=o;F<ce;++F)(W=mh(X>0?V[F]+" "+re:Fe(re,/&\f/g,V[F])))&&(D[pe++]=W);return Cr(o,s,h,p===0?Ws:U,D,b,G)}function c1(o,s,h){return Cr(o,s,h,hh,xr(t1()),Qi(o,2,-2),0)}function J0(o,s,h,d){return Cr(o,s,h,Is,Qi(o,0,d),Qi(o,d+1,-1),d)}function ja(o,s){for(var h="",d=Ps(o),p=0;p<d;p++)h+=s(o[p],p,o,s)||"";return h}function s1(o,s,h,d){switch(o.type){case Fm:if(o.children.length)break;case Jm:case Is:return o.return=o.return||o.value;case hh:return"";case ph:return o.return=o.value+"{"+ja(o.children,d)+"}";case Ws:o.value=o.props.join(",")}return Dn(h=ja(o.children,d))?o.return=o.value+"{"+h+"}":""}function u1(o){var s=Ps(o);return function(h,d,p,y){for(var A="",U=0;U<s;U++)A+=o[U](h,d,p,y)||"";return A}}function d1(o){return function(s){s.root||(s=s.return)&&o(s)}}function f1(o){var s=Object.create(null);return function(h){return s[h]===void 0&&(s[h]=o(h)),s[h]}}var h1=function(s,h,d){for(var p=0,y=0;p=y,y=_n(),p===38&&y===12&&(h[d]=1),!Zi(y);)on();return Ji(s,Ft)},p1=function(s,h){var d=-1,p=44;do switch(Zi(p)){case 0:p===38&&_n()===12&&(h[d]=1),s[d]+=h1(Ft-1,h,d);break;case 2:s[d]+=gr(p);break;case 4:if(p===44){s[++d]=_n()===58?"&\f":"",h[d]=s[d].length;break}default:s[d]+=xr(p)}while(p=on());return s},m1=function(s,h){return vh(p1(yh(s),h))},F0=new WeakMap,g1=function(s){if(!(s.type!=="rule"||!s.parent||s.length<1)){for(var h=s.value,d=s.parent,p=s.column===d.column&&s.line===d.line;d.type!=="rule";)if(d=d.parent,!d)return;if(!(s.props.length===1&&h.charCodeAt(0)!==58&&!F0.get(d))&&!p){F0.set(s,!0);for(var y=[],A=m1(h,y),U=d.props,D=0,b=0;D<A.length;D++)for(var G=0;G<U.length;G++,b++)s.props[b]=y[D]?A[D].replace(/&\f/g,U[G]):U[G]+" "+A[D]}}},y1=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(Im(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+br+o+Bt+o+o;case 6828:case 4268:return Je+o+Bt+o+o;case 6165:return Je+o+Bt+"flex-"+o+o;case 5187:return Je+o+Fe(o,/(\w+).+(:[^]+)/,Je+"box-$1$2"+Bt+"flex-$1$2")+o;case 5443:return Je+o+Bt+"flex-item-"+Fe(o,/flex-|-self/,"")+o;case 4675:return Je+o+Bt+"flex-line-pack"+Fe(o,/align-content|flex-|-self/,"")+o;case 5548:return Je+o+Bt+Fe(o,"shrink","negative")+o;case 5292:return Je+o+Bt+Fe(o,"basis","preferred-size")+o;case 6060:return Je+"box-"+Fe(o,"-grow","")+Je+o+Bt+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"+Bt+"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(Dn(o)-1-s>6)switch(_t(o,s+1)){case 109:if(_t(o,s+4)!==45)break;case 102:return Fe(o,/(.+:)(.+)-([^]+)/,"$1"+Je+"$2-$3$1"+br+(_t(o,s+3)==108?"$3":"$2-$3"))+o;case 115:return~Ks(o,"stretch")?bh(Fe(o,"stretch","fill-available"),s)+o:o}break;case 4949:if(_t(o,s+1)!==115)break;case 6444:switch(_t(o,Dn(o)-3-(~Ks(o,"!important")&&10))){case 107:return Fe(o,":",":"+Je)+o;case 101:return Fe(o,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Je+(_t(o,14)===45?"inline-":"")+"box$3$1"+Je+"$2$3$1"+Bt+"$2box$3")+o}break;case 5936:switch(_t(o,s+11)){case 114:return Je+o+Bt+Fe(o,/[svh]\w+-[tblr]{2}/,"tb")+o;case 108:return Je+o+Bt+Fe(o,/[svh]\w+-[tblr]{2}/,"tb-rl")+o;case 45:return Je+o+Bt+Fe(o,/[svh]\w+-[tblr]{2}/,"lr")+o}return Je+o+Bt+o+o}return o}var v1=function(s,h,d,p){if(s.length>-1&&!s.return)switch(s.type){case Is:s.return=bh(s.value,s.length);break;case ph:return ja([qi(s,{value:Fe(s.value,"@","@"+Je)})],p);case Ws:if(s.length)return e1(s.props,function(y){switch(Pm(y,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return ja([qi(s,{props:[Fe(y,/:(read-\w+)/,":"+br+"$1")]})],p);case"::placeholder":return ja([qi(s,{props:[Fe(y,/:(plac\w+)/,":"+Je+"input-$1")]}),qi(s,{props:[Fe(y,/:(plac\w+)/,":"+br+"$1")]}),qi(s,{props:[Fe(y,/:(plac\w+)/,Bt+"input-$1")]})],p)}return""})}},b1=[v1],x1=function(s){var h=s.key;if(h==="css"){var d=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(d,function(X){var pe=X.getAttribute("data-emotion");pe.indexOf(" ")!==-1&&(document.head.appendChild(X),X.setAttribute("data-s",""))})}var p=s.stylisPlugins||b1,y={},A,U=[];A=s.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+h+' "]'),function(X){for(var pe=X.getAttribute("data-emotion").split(" "),F=1;F<pe.length;F++)y[pe[F]]=!0;U.push(X)});var D,b=[g1,y1];{var G,R=[s1,d1(function(X){G.insert(X)})],V=u1(b.concat(p,R)),ce=function(pe){return ja(r1(pe),V)};D=function(pe,F,re,W){G=re,ce(pe?pe+"{"+F.styles+"}":F.styles),W&&(q.inserted[F.name]=!0)}}var q={key:h,sheet:new Km({key:h,container:A,nonce:s.nonce,speedy:s.speedy,prepend:s.prepend,insertionPoint:s.insertionPoint}),nonce:s.nonce,inserted:y,registered:{},insert:D};return q.sheet.hydrate(U),q},js={exports:{}},$e={};var $0;function S1(){if($0)return $e;$0=1;var o=typeof Symbol=="function"&&Symbol.for,s=o?Symbol.for("react.element"):60103,h=o?Symbol.for("react.portal"):60106,d=o?Symbol.for("react.fragment"):60107,p=o?Symbol.for("react.strict_mode"):60108,y=o?Symbol.for("react.profiler"):60114,A=o?Symbol.for("react.provider"):60109,U=o?Symbol.for("react.context"):60110,D=o?Symbol.for("react.async_mode"):60111,b=o?Symbol.for("react.concurrent_mode"):60111,G=o?Symbol.for("react.forward_ref"):60112,R=o?Symbol.for("react.suspense"):60113,V=o?Symbol.for("react.suspense_list"):60120,ce=o?Symbol.for("react.memo"):60115,q=o?Symbol.for("react.lazy"):60116,X=o?Symbol.for("react.block"):60121,pe=o?Symbol.for("react.fundamental"):60117,F=o?Symbol.for("react.responder"):60118,re=o?Symbol.for("react.scope"):60119;function W(_){if(typeof _=="object"&&_!==null){var me=_.$$typeof;switch(me){case s:switch(_=_.type,_){case D:case b:case d:case y:case p:case R:return _;default:switch(_=_&&_.$$typeof,_){case U:case G:case q:case ce:case A:return _;default:return me}}case h:return me}}}function xe(_){return W(_)===b}return $e.AsyncMode=D,$e.ConcurrentMode=b,$e.ContextConsumer=U,$e.ContextProvider=A,$e.Element=s,$e.ForwardRef=G,$e.Fragment=d,$e.Lazy=q,$e.Memo=ce,$e.Portal=h,$e.Profiler=y,$e.StrictMode=p,$e.Suspense=R,$e.isAsyncMode=function(_){return xe(_)||W(_)===D},$e.isConcurrentMode=xe,$e.isContextConsumer=function(_){return W(_)===U},$e.isContextProvider=function(_){return W(_)===A},$e.isElement=function(_){return typeof _=="object"&&_!==null&&_.$$typeof===s},$e.isForwardRef=function(_){return W(_)===G},$e.isFragment=function(_){return W(_)===d},$e.isLazy=function(_){return W(_)===q},$e.isMemo=function(_){return W(_)===ce},$e.isPortal=function(_){return W(_)===h},$e.isProfiler=function(_){return W(_)===y},$e.isStrictMode=function(_){return W(_)===p},$e.isSuspense=function(_){return W(_)===R},$e.isValidElementType=function(_){return typeof _=="string"||typeof _=="function"||_===d||_===b||_===y||_===p||_===R||_===V||typeof _=="object"&&_!==null&&(_.$$typeof===q||_.$$typeof===ce||_.$$typeof===A||_.$$typeof===U||_.$$typeof===G||_.$$typeof===pe||_.$$typeof===F||_.$$typeof===re||_.$$typeof===X)},$e.typeOf=W,$e}var W0;function C1(){return W0||(W0=1,js.exports=S1()),js.exports}var qs,I0;function w1(){if(I0)return qs;I0=1;var o=C1(),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},d={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},p={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},y={};y[o.ForwardRef]=d,y[o.Memo]=p;function A(q){return o.isMemo(q)?p:y[q.$$typeof]||s}var U=Object.defineProperty,D=Object.getOwnPropertyNames,b=Object.getOwnPropertySymbols,G=Object.getOwnPropertyDescriptor,R=Object.getPrototypeOf,V=Object.prototype;function ce(q,X,pe){if(typeof X!="string"){if(V){var F=R(X);F&&F!==V&&ce(q,F,pe)}var re=D(X);b&&(re=re.concat(b(X)));for(var W=A(q),xe=A(X),_=0;_<re.length;++_){var me=re[_];if(!h[me]&&!(pe&&pe[me])&&!(xe&&xe[me])&&!(W&&W[me])){var Z=G(X,me);try{U(q,me,Z)}catch{}}}}return q}return qs=ce,qs}w1();var z1=!0;function M1(o,s,h){var d="";return h.split(" ").forEach(function(p){o[p]!==void 0?s.push(o[p]+";"):p&&(d+=p+" ")}),d}var xh=function(s,h,d){var p=s.key+"-"+h.name;(d===!1||z1===!1)&&s.registered[p]===void 0&&(s.registered[p]=h.styles)},T1=function(s,h,d){xh(s,h,d);var p=s.key+"-"+h.name;if(s.inserted[h.name]===void 0){var y=h;do s.insert(h===y?"."+p:"",y,s.sheet,!0),y=y.next;while(y!==void 0)}};function A1(o){for(var s=0,h,d=0,p=o.length;p>=4;++d,p-=4)h=o.charCodeAt(d)&255|(o.charCodeAt(++d)&255)<<8|(o.charCodeAt(++d)&255)<<16|(o.charCodeAt(++d)&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(d+2)&255)<<16;case 2:s^=(o.charCodeAt(d+1)&255)<<8;case 1:s^=o.charCodeAt(d)&255,s=(s&65535)*1540483477+((s>>>16)*59797<<16)}return s^=s>>>13,s=(s&65535)*1540483477+((s>>>16)*59797<<16),((s^s>>>15)>>>0).toString(36)}var E1={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},k1=/[A-Z]|^ms/g,D1=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Sh=function(s){return s.charCodeAt(1)===45},P0=function(s){return s!=null&&typeof s!="boolean"},Ys=f1(function(o){return Sh(o)?o:o.replace(k1,"-$&").toLowerCase()}),eh=function(s,h){switch(s){case"animation":case"animationName":if(typeof h=="string")return h.replace(D1,function(d,p,y){return Rn={name:p,styles:y,next:Rn},p})}return E1[s]!==1&&!Sh(s)&&typeof h=="number"&&h!==0?h+"px":h};function Ki(o,s,h){if(h==null)return"";var d=h;if(d.__emotion_styles!==void 0)return d;switch(typeof h){case"boolean":return"";case"object":{var p=h;if(p.anim===1)return Rn={name:p.name,styles:p.styles,next:Rn},p.name;var y=h;if(y.styles!==void 0){var A=y.next;if(A!==void 0)for(;A!==void 0;)Rn={name:A.name,styles:A.styles,next:Rn},A=A.next;var U=y.styles+";";return U}return R1(o,s,h)}case"function":{if(o!==void 0){var D=Rn,b=h(o);return Rn=D,Ki(o,s,b)}break}}var G=h;return G}function R1(o,s,h){var d="";if(Array.isArray(h))for(var p=0;p<h.length;p++)d+=Ki(o,s,h[p])+";";else for(var y in h){var A=h[y];if(typeof A!="object"){var U=A;P0(U)&&(d+=Ys(y)+":"+eh(y,U)+";")}else if(Array.isArray(A)&&typeof A[0]=="string"&&s==null)for(var D=0;D<A.length;D++)P0(A[D])&&(d+=Ys(y)+":"+eh(y,A[D])+";");else{var b=Ki(o,s,A);switch(y){case"animation":case"animationName":{d+=Ys(y)+":"+b+";";break}default:d+=y+"{"+b+"}"}}}return d}var th=/label:\s*([^\s;{]+)\s*(;|$)/g,Rn;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 d=!0,p="";Rn=void 0;var y=o[0];if(y==null||y.raw===void 0)d=!1,p+=Ki(h,s,y);else{var A=y;p+=A[0]}for(var U=1;U<o.length;U++)if(p+=Ki(h,s,o[U]),d){var D=y;p+=D[U]}th.lastIndex=0;for(var b="",G;(G=th.exec(p))!==null;)b+="-"+G[1];var R=A1(p)+b;return{name:R,styles:p,next:Rn}}var _1=function(s){return s()},O1=Z0.useInsertionEffect?Z0.useInsertionEffect:!1,L1=O1||_1,wh=C.createContext(typeof HTMLElement<"u"?x1({key:"css"}):null);wh.Provider;var U1=function(s){return C.forwardRef(function(h,d){var p=C.useContext(wh);return s(h,p,d)})},H1=C.createContext({}),Fi={}.hasOwnProperty,Fs="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",eu=function(s,h){var d={};for(var p in h)Fi.call(h,p)&&(d[p]=h[p]);return d[Fs]=s,d},B1=function(s){var h=s.cache,d=s.serialized,p=s.isStringTag;return xh(h,d,p),L1(function(){return T1(h,d,p)}),null},N1=U1(function(o,s,h){var d=o.css;typeof d=="string"&&s.registered[d]!==void 0&&(d=s.registered[d]);var p=o[Fs],y=[d],A="";typeof o.className=="string"?A=M1(s.registered,y,o.className):o.className!=null&&(A=o.className+" ");var U=Ch(y,void 0,C.useContext(H1));A+=s.key+"-"+U.name;var D={};for(var b in o)Fi.call(o,b)&&b!=="css"&&b!==Fs&&(D[b]=o[b]);return D.className=A,h&&(D.ref=h),C.createElement(C.Fragment,null,C.createElement(B1,{cache:s,serialized:U,isStringTag:typeof p=="string"}),C.createElement(p,D))}),tu=N1,rt=Xi.Fragment,c=function(s,h,d){return Fi.call(h,"css")?Xi.jsx(tu,eu(s,h),d):Xi.jsx(s,h,d)},x=function(s,h,d){return Fi.call(h,"css")?Xi.jsxs(tu,eu(s,h),d):Xi.jsxs(s,h,d)},Gs={exports:{}},Yi={},Vs={exports:{}},Xs={};var nh;function j1(){return nh||(nh=1,(function(o){function s(E,B){var oe=E.length;E.push(B);e:for(;0<oe;){var Be=oe-1>>>1,Ce=E[Be];if(0<p(Ce,B))E[Be]=B,E[oe]=Ce,oe=Be;else break e}}function h(E){return E.length===0?null:E[0]}function d(E){if(E.length===0)return null;var B=E[0],oe=E.pop();if(oe!==B){E[0]=oe;e:for(var Be=0,Ce=E.length,v=Ce>>>1;Be<v;){var L=2*(Be+1)-1,J=E[L],I=L+1,ve=E[I];if(0>p(J,oe))I<Ce&&0>p(ve,J)?(E[Be]=ve,E[I]=oe,Be=I):(E[Be]=J,E[L]=oe,Be=L);else if(I<Ce&&0>p(ve,oe))E[Be]=ve,E[I]=oe,Be=I;else break e}}return B}function p(E,B){var oe=E.sortIndex-B.sortIndex;return oe!==0?oe:E.id-B.id}if(o.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var y=performance;o.unstable_now=function(){return y.now()}}else{var A=Date,U=A.now();o.unstable_now=function(){return A.now()-U}}var D=[],b=[],G=1,R=null,V=3,ce=!1,q=!1,X=!1,pe=!1,F=typeof setTimeout=="function"?setTimeout:null,re=typeof clearTimeout=="function"?clearTimeout:null,W=typeof setImmediate<"u"?setImmediate:null;function xe(E){for(var B=h(b);B!==null;){if(B.callback===null)d(b);else if(B.startTime<=E)d(b),B.sortIndex=B.expirationTime,s(D,B);else break;B=h(b)}}function _(E){if(X=!1,xe(E),!q)if(h(D)!==null)q=!0,me||(me=!0,te());else{var B=h(b);B!==null&&Le(_,B.startTime-E)}}var me=!1,Z=-1,Q=5,N=-1;function ne(){return pe?!0:!(o.unstable_now()-N<Q)}function ye(){if(pe=!1,me){var E=o.unstable_now();N=E;var B=!0;try{e:{q=!1,X&&(X=!1,re(Z),Z=-1),ce=!0;var oe=V;try{t:{for(xe(E),R=h(D);R!==null&&!(R.expirationTime>E&&ne());){var Be=R.callback;if(typeof Be=="function"){R.callback=null,V=R.priorityLevel;var Ce=Be(R.expirationTime<=E);if(E=o.unstable_now(),typeof Ce=="function"){R.callback=Ce,xe(E),B=!0;break t}R===h(D)&&d(D),xe(E)}else d(D);R=h(D)}if(R!==null)B=!0;else{var v=h(b);v!==null&&Le(_,v.startTime-E),B=!1}}break e}finally{R=null,V=oe,ce=!1}B=void 0}}finally{B?te():me=!1}}}var te;if(typeof W=="function")te=function(){W(ye)};else if(typeof MessageChannel<"u"){var ee=new MessageChannel,ze=ee.port2;ee.port1.onmessage=ye,te=function(){ze.postMessage(null)}}else te=function(){F(ye,0)};function Le(E,B){Z=F(function(){E(o.unstable_now())},B)}o.unstable_IdlePriority=5,o.unstable_ImmediatePriority=1,o.unstable_LowPriority=4,o.unstable_NormalPriority=3,o.unstable_Profiling=null,o.unstable_UserBlockingPriority=2,o.unstable_cancelCallback=function(E){E.callback=null},o.unstable_forceFrameRate=function(E){0>E||125<E?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Q=0<E?Math.floor(1e3/E):5},o.unstable_getCurrentPriorityLevel=function(){return V},o.unstable_next=function(E){switch(V){case 1:case 2:case 3:var B=3;break;default:B=V}var oe=V;V=B;try{return E()}finally{V=oe}},o.unstable_requestPaint=function(){pe=!0},o.unstable_runWithPriority=function(E,B){switch(E){case 1:case 2:case 3:case 4:case 5:break;default:E=3}var oe=V;V=E;try{return B()}finally{V=oe}},o.unstable_scheduleCallback=function(E,B,oe){var Be=o.unstable_now();switch(typeof oe=="object"&&oe!==null?(oe=oe.delay,oe=typeof oe=="number"&&0<oe?Be+oe:Be):oe=Be,E){case 1:var Ce=-1;break;case 2:Ce=250;break;case 5:Ce=1073741823;break;case 4:Ce=1e4;break;default:Ce=5e3}return Ce=oe+Ce,E={id:G++,callback:B,priorityLevel:E,startTime:oe,expirationTime:Ce,sortIndex:-1},oe>Be?(E.sortIndex=oe,s(b,E),h(D)===null&&E===h(b)&&(X?(re(Z),Z=-1):X=!0,Le(_,oe-Be))):(E.sortIndex=Ce,s(D,E),q||ce||(q=!0,me||(me=!0,te()))),E},o.unstable_shouldYield=ne,o.unstable_wrapCallback=function(E){var B=V;return function(){var oe=V;V=B;try{return E.apply(this,arguments)}finally{V=oe}}}})(Xs)),Xs}var lh;function q1(){return lh||(lh=1,Vs.exports=j1()),Vs.exports}var Qs={exports:{}},Ht={};var ah;function Y1(){if(ah)return Ht;ah=1;var o=$s();function s(D){var b="https://react.dev/errors/"+D;if(1<arguments.length){b+="?args[]="+encodeURIComponent(arguments[1]);for(var G=2;G<arguments.length;G++)b+="&args[]="+encodeURIComponent(arguments[G])}return"Minified React error #"+D+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function h(){}var d={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 y(D,b,G){var R=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:p,key:R==null?null:""+R,children:D,containerInfo:b,implementation:G}}var A=o.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function U(D,b){if(D==="font")return"";if(typeof b=="string")return b==="use-credentials"?b:""}return Ht.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=d,Ht.createPortal=function(D,b){var G=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!b||b.nodeType!==1&&b.nodeType!==9&&b.nodeType!==11)throw Error(s(299));return y(D,b,null,G)},Ht.flushSync=function(D){var b=A.T,G=d.p;try{if(A.T=null,d.p=2,D)return D()}finally{A.T=b,d.p=G,d.d.f()}},Ht.preconnect=function(D,b){typeof D=="string"&&(b?(b=b.crossOrigin,b=typeof b=="string"?b==="use-credentials"?b:"":void 0):b=null,d.d.C(D,b))},Ht.prefetchDNS=function(D){typeof D=="string"&&d.d.D(D)},Ht.preinit=function(D,b){if(typeof D=="string"&&b&&typeof b.as=="string"){var G=b.as,R=U(G,b.crossOrigin),V=typeof b.integrity=="string"?b.integrity:void 0,ce=typeof b.fetchPriority=="string"?b.fetchPriority:void 0;G==="style"?d.d.S(D,typeof b.precedence=="string"?b.precedence:void 0,{crossOrigin:R,integrity:V,fetchPriority:ce}):G==="script"&&d.d.X(D,{crossOrigin:R,integrity:V,fetchPriority:ce,nonce:typeof b.nonce=="string"?b.nonce:void 0})}},Ht.preinitModule=function(D,b){if(typeof D=="string")if(typeof b=="object"&&b!==null){if(b.as==null||b.as==="script"){var G=U(b.as,b.crossOrigin);d.d.M(D,{crossOrigin:G,integrity:typeof b.integrity=="string"?b.integrity:void 0,nonce:typeof b.nonce=="string"?b.nonce:void 0})}}else b==null&&d.d.M(D)},Ht.preload=function(D,b){if(typeof D=="string"&&typeof b=="object"&&b!==null&&typeof b.as=="string"){var G=b.as,R=U(G,b.crossOrigin);d.d.L(D,G,{crossOrigin:R,integrity:typeof b.integrity=="string"?b.integrity:void 0,nonce:typeof b.nonce=="string"?b.nonce:void 0,type:typeof b.type=="string"?b.type:void 0,fetchPriority:typeof b.fetchPriority=="string"?b.fetchPriority:void 0,referrerPolicy:typeof b.referrerPolicy=="string"?b.referrerPolicy:void 0,imageSrcSet:typeof b.imageSrcSet=="string"?b.imageSrcSet:void 0,imageSizes:typeof b.imageSizes=="string"?b.imageSizes:void 0,media:typeof b.media=="string"?b.media:void 0})}},Ht.preloadModule=function(D,b){if(typeof D=="string")if(b){var G=U(b.as,b.crossOrigin);d.d.m(D,{as:typeof b.as=="string"&&b.as!=="script"?b.as:void 0,crossOrigin:G,integrity:typeof b.integrity=="string"?b.integrity:void 0})}else d.d.m(D)},Ht.requestFormReset=function(D){d.d.r(D)},Ht.unstable_batchedUpdates=function(D,b){return D(b)},Ht.useFormState=function(D,b,G){return A.H.useFormState(D,b,G)},Ht.useFormStatus=function(){return A.H.useHostTransitionStatus()},Ht.version="19.2.4",Ht}var ih;function G1(){if(ih)return Qs.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(),Qs.exports=Y1(),Qs.exports}var oh;function V1(){if(oh)return Yi;oh=1;var o=q1(),s=$s(),h=G1();function d(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function p(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function y(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 A(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 U(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 D(e){if(y(e)!==e)throw Error(d(188))}function b(e){var t=e.alternate;if(!t){if(t=y(e),t===null)throw Error(d(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 D(a),e;if(i===l)return D(a),t;i=i.sibling}throw Error(d(188))}if(n.return!==l.return)n=a,l=i;else{for(var r=!1,f=a.child;f;){if(f===n){r=!0,n=a,l=i;break}if(f===l){r=!0,l=a,n=i;break}f=f.sibling}if(!r){for(f=i.child;f;){if(f===n){r=!0,n=i,l=a;break}if(f===l){r=!0,l=i,n=a;break}f=f.sibling}if(!r)throw Error(d(189))}}if(n.alternate!==l)throw Error(d(190))}if(n.tag!==3)throw Error(d(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 R=Object.assign,V=Symbol.for("react.element"),ce=Symbol.for("react.transitional.element"),q=Symbol.for("react.portal"),X=Symbol.for("react.fragment"),pe=Symbol.for("react.strict_mode"),F=Symbol.for("react.profiler"),re=Symbol.for("react.consumer"),W=Symbol.for("react.context"),xe=Symbol.for("react.forward_ref"),_=Symbol.for("react.suspense"),me=Symbol.for("react.suspense_list"),Z=Symbol.for("react.memo"),Q=Symbol.for("react.lazy"),N=Symbol.for("react.activity"),ne=Symbol.for("react.memo_cache_sentinel"),ye=Symbol.iterator;function te(e){return e===null||typeof e!="object"?null:(e=ye&&e[ye]||e["@@iterator"],typeof e=="function"?e:null)}var ee=Symbol.for("react.client.reference");function ze(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ee?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case X:return"Fragment";case F:return"Profiler";case pe:return"StrictMode";case _:return"Suspense";case me:return"SuspenseList";case N:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case q:return"Portal";case W:return e.displayName||"Context";case re:return(e._context.displayName||"Context")+".Consumer";case xe:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Z:return t=e.displayName||null,t!==null?t:ze(e.type)||"Memo";case Q:t=e._payload,e=e._init;try{return ze(e(t))}catch{}}return null}var Le=Array.isArray,E=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,B=h.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,oe={pending:!1,data:null,method:null,action:null},Be=[],Ce=-1;function v(e){return{current:e}}function L(e){0>Ce||(e.current=Be[Ce],Be[Ce]=null,Ce--)}function J(e,t){Ce++,Be[Ce]=e.current,e.current=t}var I=v(null),ve=v(null),ke=v(null),_e=v(null);function nt(e,t){switch(J(ke,t),J(ve,e),J(I,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?d0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=d0(t),e=f0(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}L(I),J(I,e)}function Ae(){L(I),L(ve),L(ke)}function Ot(e){e.memoizedState!==null&&J(_e,e);var t=I.current,n=f0(t,e.type);t!==n&&(J(ve,e),J(I,n))}function le(e){ve.current===e&&(L(I),L(ve)),_e.current===e&&(L(_e),Ui._currentValue=oe)}var lt,Nt;function se(e){if(lt===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);lt=t&&t[1]||"",Nt=-1<n.stack.indexOf(`
|
|
2
|
+
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
+
`+lt+e+Nt}var it=!1;function Lt(e,t){if(!e||it)return"";it=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var j=function(){throw Error()};if(Object.defineProperty(j.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(j,[])}catch(k){var T=k}Reflect.construct(e,[],j)}else{try{j.call()}catch(k){T=k}e.call(j.prototype)}}else{try{throw Error()}catch(k){T=k}(j=e())&&typeof j.catch=="function"&&j.catch(function(){})}}catch(k){if(k&&T&&typeof k.stack=="string")return[k.stack,T.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],f=i[1];if(r&&f){var m=r.split(`
|
|
4
|
+
`),M=f.split(`
|
|
5
|
+
`);for(a=l=0;l<m.length&&!m[l].includes("DetermineComponentFrameRoot");)l++;for(;a<M.length&&!M[a].includes("DetermineComponentFrameRoot");)a++;if(l===m.length||a===M.length)for(l=m.length-1,a=M.length-1;1<=l&&0<=a&&m[l]!==M[a];)a--;for(;1<=l&&0<=a;l--,a--)if(m[l]!==M[a]){if(l!==1||a!==1)do if(l--,a--,0>a||m[l]!==M[a]){var O=`
|
|
6
|
+
`+m[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{it=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?se(n):""}function $t(e,t){switch(e.tag){case 26:case 27:case 5:return se(e.type);case 16:return se("Lazy");case 13:return e.child!==t&&t!==null?se("Suspense Fallback"):se("Suspense");case 19:return se("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 se("Activity");default:return""}}function zn(e){try{var t="",n=null;do t+=$t(e,n),n=e,e=e.return;while(e);return t}catch(l){return`
|
|
7
|
+
Error generating stack: `+l.message+`
|
|
8
|
+
`+l.stack}}var On=Object.prototype.hasOwnProperty,Dl=o.unstable_scheduleCallback,cn=o.unstable_cancelCallback,Va=o.unstable_shouldYield,ta=o.unstable_requestPaint,Ut=o.unstable_now,nl=o.unstable_getCurrentPriorityLevel,Xa=o.unstable_ImmediatePriority,Rl=o.unstable_UserBlockingPriority,ll=o.unstable_NormalPriority,Qa=o.unstable_LowPriority,vt=o.unstable_IdlePriority,_l=o.log,zr=o.unstable_setDisableYieldValue,Ln=null,jt=null;function bn(e){if(typeof _l=="function"&&zr(e),jt&&typeof jt.setStrictMode=="function")try{jt.setStrictMode(Ln,e)}catch{}}var qt=Math.clz32?Math.clz32:Ar,Mr=Math.log,Tr=Math.LN2;function Ar(e){return e>>>=0,e===0?32:31-(Mr(e)/Tr|0)|0}var na=256,la=262144,Ol=4194304;function Un(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 aa(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 f=l&134217727;return f!==0?(l=f&~i,l!==0?a=Un(l):(r&=f,r!==0?a=Un(r):n||(n=f&~e,n!==0&&(a=Un(n))))):(f=l&~i,f!==0?a=Un(f):r!==0?a=Un(r):n||(n=l&~e,n!==0&&(a=Un(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 Ll(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Er(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=Ol;return Ol<<=1,(Ol&62914560)===0&&(Ol=4194304),e}function Za(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ul(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function kr(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 f=e.entanglements,m=e.expirationTimes,M=e.hiddenUpdates;for(n=r&~n;0<n;){var O=31-qt(n),j=1<<O;f[O]=0,m[O]=-1;var T=M[O];if(T!==null)for(M[O]=null,O=0;O<T.length;O++){var k=T[O];k!==null&&(k.lane&=-536870913)}n&=~j}l!==0&&Ii(e,l,0),i!==0&&a===0&&e.tag!==0&&(e.suspendedLanes|=i&~(r&~t))}function Ii(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-qt(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-qt(n),a=1<<l;a&t|e[l]&t&&(e[l]|=t),n&=~a}}function Ka(e,t){var n=t&-t;return n=(n&42)!==0?1:Hn(n),(n&(e.suspendedLanes|t))!==0?0:n}function Hn(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 Ja(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function eo(){var e=B.p;return e!==0?e:(e=window.event,e===void 0?32:U0(e.type))}function xn(e,t){var n=B.p;try{return B.p=e,t()}finally{B.p=n}}var Mn=Math.random().toString(36).slice(2),ut="__reactFiber$"+Mn,mt="__reactProps$"+Mn,Wt="__reactContainer$"+Mn,ia="__reactEvents$"+Mn,al="__reactListeners$"+Mn,il="__reactHandles$"+Mn,Fa="__reactResources$"+Mn,Hl="__reactMarker$"+Mn;function $a(e){delete e[ut],delete e[mt],delete e[ia],delete e[al],delete e[il]}function Bn(e){var t=e[ut];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Wt]||n[ut]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=b0(e);e!==null;){if(n=e[ut])return n;e=b0(e)}return t}e=n,n=e.parentNode}return null}function ie(e){if(e=e[ut]||e[Wt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function $(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(d(33))}function de(e){var t=e[Fa];return t||(t=e[Fa]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function fe(e){e[Hl]=!0}var Me=new Set,Ee={};function Ve(e,t){Xe(e,t),Xe(e+"Capture",t)}function Xe(e,t){for(Ee[e]=t,e=0;e<t.length;e++)Me.add(t[e])}var De=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]*$"),Yt={},Wa={};function _h(e){return On.call(Wa,e)?!0:On.call(Yt,e)?!1:De.test(e)?Wa[e]=!0:(Yt[e]=!0,!1)}function to(e,t,n){if(_h(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 no(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 Nn(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 sn(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 Oh(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 Dr(e){if(!e._valueTracker){var t=nu(e)?"checked":"value";e._valueTracker=Oh(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 lo(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 Lh=/[\n"\\]/g;function un(e){return e.replace(Lh,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Rr(e,t,n,l,a,i,r,f){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=""+sn(t)):e.value!==""+sn(t)&&(e.value=""+sn(t)):r!=="submit"&&r!=="reset"||e.removeAttribute("value"),t!=null?_r(e,r,sn(t)):n!=null?_r(e,r,sn(n)):l!=null&&e.removeAttribute("value"),a==null&&i!=null&&(e.defaultChecked=!!i),a!=null&&(e.checked=a&&typeof a!="function"&&typeof a!="symbol"),f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"?e.name=""+sn(f):e.removeAttribute("name")}function au(e,t,n,l,a,i,r,f){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)){Dr(e);return}n=n!=null?""+sn(n):"",t=t!=null?""+sn(t):n,f||t===e.value||(e.value=t),e.defaultValue=t}l=l??a,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=f?e.checked:!!l,e.defaultChecked=!!l,r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"&&(e.name=r),Dr(e)}function _r(e,t,n){t==="number"&&lo(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function oa(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=""+sn(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=""+sn(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+sn(n):""}function ou(e,t,n,l){if(t==null){if(l!=null){if(n!=null)throw Error(d(92));if(Le(l)){if(1<l.length)throw Error(d(93));l=l[0]}n=l}n==null&&(n=""),t=n}n=sn(t),e.defaultValue=n,l=e.textContent,l===n&&l!==""&&l!==null&&(e.value=l),Dr(e)}function ra(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Uh=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||Uh.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(d(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 Or(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 Hh=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"]]),Bh=/^[\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 ao(e){return Bh.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function jn(){}var Lr=null;function Ur(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ca=null,sa=null;function su(e){var t=ie(e);if(t&&(e=t.stateNode)){var n=e[mt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Rr(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="'+un(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var l=n[t];if(l!==e&&l.form===e.form){var a=l[mt]||null;if(!a)throw Error(d(90));Rr(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&&oa(e,!!n.multiple,t,!1)}}}var Hr=!1;function uu(e,t,n){if(Hr)return e(t,n);Hr=!0;try{var l=e(t);return l}finally{if(Hr=!1,(ca!==null||sa!==null)&&(Zo(),ca&&(t=ca,e=sa,sa=ca=null,su(t),e)))for(t=0;t<e.length;t++)su(e[t])}}function Ia(e,t){var n=e.stateNode;if(n===null)return null;var l=n[mt]||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(d(231,t,typeof n));return n}var qn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Br=!1;if(qn)try{var Pa={};Object.defineProperty(Pa,"passive",{get:function(){Br=!0}}),window.addEventListener("test",Pa,Pa),window.removeEventListener("test",Pa,Pa)}catch{Br=!1}var ol=null,Nr=null,io=null;function du(){if(io)return io;var e,t=Nr,n=t.length,l,a="value"in ol?ol.value:ol.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 io=a.slice(e,1<l?1-l:void 0)}function oo(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 ro(){return!0}function fu(){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 f in e)e.hasOwnProperty(f)&&(n=e[f],this[f]=n?n(i):i[f]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?ro:fu,this.isPropagationStopped=fu,this}return R(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=ro)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=ro)},persist:function(){},isPersistent:ro}),t}var Bl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},co=Vt(Bl),ei=R({},Bl,{view:0,detail:0}),Nh=Vt(ei),jr,qr,ti,so=R({},ei,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Gr,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!==ti&&(ti&&e.type==="mousemove"?(jr=e.screenX-ti.screenX,qr=e.screenY-ti.screenY):qr=jr=0,ti=e),jr)},movementY:function(e){return"movementY"in e?e.movementY:qr}}),hu=Vt(so),jh=R({},so,{dataTransfer:0}),qh=Vt(jh),Yh=R({},ei,{relatedTarget:0}),Yr=Vt(Yh),Gh=R({},Bl,{animationName:0,elapsedTime:0,pseudoElement:0}),Vh=Vt(Gh),Xh=R({},Bl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Qh=Vt(Xh),Zh=R({},Bl,{data:0}),pu=Vt(Zh),Kh={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Jh={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"},Fh={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function $h(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Fh[e])?!!t[e]:!1}function Gr(){return $h}var Wh=R({},ei,{key:function(e){if(e.key){var t=Kh[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=oo(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Jh[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Gr,charCode:function(e){return e.type==="keypress"?oo(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?oo(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Ih=Vt(Wh),Ph=R({},so,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),mu=Vt(Ph),ep=R({},ei,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Gr}),tp=Vt(ep),np=R({},Bl,{propertyName:0,elapsedTime:0,pseudoElement:0}),lp=Vt(np),ap=R({},so,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),ip=Vt(ap),op=R({},Bl,{newState:0,oldState:0}),rp=Vt(op),cp=[9,13,27,32],Vr=qn&&"CompositionEvent"in window,ni=null;qn&&"documentMode"in document&&(ni=document.documentMode);var sp=qn&&"TextEvent"in window&&!ni,gu=qn&&(!Vr||ni&&8<ni&&11>=ni),yu=" ",vu=!1;function bu(e,t){switch(e){case"keyup":return cp.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 ua=!1;function up(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 dp(e,t){if(ua)return e==="compositionend"||!Vr&&bu(e,t)?(e=du(),io=Nr=ol=null,ua=!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 fp={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"?!!fp[e.type]:t==="textarea"}function Cu(e,t,n,l){ca?sa?sa.push(l):sa=[l]:ca=l,t=Po(t,"onChange"),0<t.length&&(n=new co("onChange","change",null,n,l),e.push({event:n,listeners:t}))}var li=null,ai=null;function hp(e){i0(e,0)}function uo(e){var t=$(e);if(lu(t))return e}function wu(e,t){if(e==="change")return t}var zu=!1;if(qn){var Xr;if(qn){var Qr="oninput"in document;if(!Qr){var Mu=document.createElement("div");Mu.setAttribute("oninput","return;"),Qr=typeof Mu.oninput=="function"}Xr=Qr}else Xr=!1;zu=Xr&&(!document.documentMode||9<document.documentMode)}function Tu(){li&&(li.detachEvent("onpropertychange",Au),ai=li=null)}function Au(e){if(e.propertyName==="value"&&uo(ai)){var t=[];Cu(t,ai,e,Ur(e)),uu(hp,t)}}function pp(e,t,n){e==="focusin"?(Tu(),li=t,ai=n,li.attachEvent("onpropertychange",Au)):e==="focusout"&&Tu()}function mp(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return uo(ai)}function gp(e,t){if(e==="click")return uo(t)}function yp(e,t){if(e==="input"||e==="change")return uo(t)}function vp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var It=typeof Object.is=="function"?Object.is:vp;function ii(e,t){if(It(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(!On.call(t,a)||!It(e[a],t[a]))return!1}return!0}function Eu(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ku(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 Du(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Du(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ru(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=lo(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=lo(e.document)}return t}function Zr(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 bp=qn&&"documentMode"in document&&11>=document.documentMode,da=null,Kr=null,oi=null,Jr=!1;function _u(e,t,n){var l=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Jr||da==null||da!==lo(l)||(l=da,"selectionStart"in l&&Zr(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}),oi&&ii(oi,l)||(oi=l,l=Po(Kr,"onSelect"),0<l.length&&(t=new co("onSelect","select",null,t,n),e.push({event:t,listeners:l}),t.target=da)))}function Nl(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var fa={animationend:Nl("Animation","AnimationEnd"),animationiteration:Nl("Animation","AnimationIteration"),animationstart:Nl("Animation","AnimationStart"),transitionrun:Nl("Transition","TransitionRun"),transitionstart:Nl("Transition","TransitionStart"),transitioncancel:Nl("Transition","TransitionCancel"),transitionend:Nl("Transition","TransitionEnd")},Fr={},Ou={};qn&&(Ou=document.createElement("div").style,"AnimationEvent"in window||(delete fa.animationend.animation,delete fa.animationiteration.animation,delete fa.animationstart.animation),"TransitionEvent"in window||delete fa.transitionend.transition);function jl(e){if(Fr[e])return Fr[e];if(!fa[e])return e;var t=fa[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Ou)return Fr[e]=t[n];return e}var Lu=jl("animationend"),Uu=jl("animationiteration"),Hu=jl("animationstart"),xp=jl("transitionrun"),Sp=jl("transitionstart"),Cp=jl("transitioncancel"),Bu=jl("transitionend"),Nu=new Map,$r="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(" ");$r.push("scrollEnd");function Sn(e,t){Nu.set(e,t),Ve(t,[e])}var fo=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},dn=[],ha=0,Wr=0;function ho(){for(var e=ha,t=Wr=ha=0;t<e;){var n=dn[t];dn[t++]=null;var l=dn[t];dn[t++]=null;var a=dn[t];dn[t++]=null;var i=dn[t];if(dn[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 po(e,t,n,l){dn[ha++]=e,dn[ha++]=t,dn[ha++]=n,dn[ha++]=l,Wr|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function Ir(e,t,n,l){return po(e,t,n,l),mo(e)}function ql(e,t){return po(e,null,null,t),mo(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-qt(n),e=i.hiddenUpdates,l=e[a],l===null?e[a]=[t]:l.push(t),t.lane=n|536870912),i):null}function mo(e){if(50<Ei)throw Ei=0,rs=null,Error(d(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var pa={};function wp(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 Pt(e,t,n,l){return new wp(e,t,n,l)}function Pr(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Yn(e,t){var n=e.alternate;return n===null?(n=Pt(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 go(e,t,n,l,a,i){var r=0;if(l=e,typeof e=="function")Pr(e)&&(r=1);else if(typeof e=="string")r=Em(e,n,I.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case N:return e=Pt(31,n,t,a),e.elementType=N,e.lanes=i,e;case X:return Yl(n.children,a,i,t);case pe:r=8,a|=24;break;case F:return e=Pt(12,n,t,a|2),e.elementType=F,e.lanes=i,e;case _:return e=Pt(13,n,t,a),e.elementType=_,e.lanes=i,e;case me:return e=Pt(19,n,t,a),e.elementType=me,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case W:r=10;break e;case re:r=9;break e;case xe:r=11;break e;case Z:r=14;break e;case Q:r=16,l=null;break e}r=29,n=Error(d(130,e===null?"null":typeof e,"")),l=null}return t=Pt(r,n,t,a),t.elementType=e,t.type=l,t.lanes=i,t}function Yl(e,t,n,l){return e=Pt(7,e,l,t),e.lanes=n,e}function ec(e,t,n){return e=Pt(6,e,null,t),e.lanes=n,e}function Yu(e){var t=Pt(18,null,null,0);return t.stateNode=e,t}function tc(e,t,n){return t=Pt(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 fn(e,t){if(typeof e=="object"&&e!==null){var n=Gu.get(e);return n!==void 0?n:(t={value:e,source:t,stack:zn(t)},Gu.set(e,t),t)}return{value:e,source:t,stack:zn(t)}}var ma=[],ga=0,yo=null,ri=0,hn=[],pn=0,rl=null,Tn=1,An="";function Gn(e,t){ma[ga++]=ri,ma[ga++]=yo,yo=e,ri=t}function Vu(e,t,n){hn[pn++]=Tn,hn[pn++]=An,hn[pn++]=rl,rl=e;var l=Tn;e=An;var a=32-qt(l)-1;l&=~(1<<a),n+=1;var i=32-qt(t)+a;if(30<i){var r=a-a%5;i=(l&(1<<r)-1).toString(32),l>>=r,a-=r,Tn=1<<32-qt(t)+a|n<<a|l,An=i+e}else Tn=1<<i|n<<a|l,An=e}function nc(e){e.return!==null&&(Gn(e,1),Vu(e,1,0))}function lc(e){for(;e===yo;)yo=ma[--ga],ma[ga]=null,ri=ma[--ga],ma[ga]=null;for(;e===rl;)rl=hn[--pn],hn[pn]=null,An=hn[--pn],hn[pn]=null,Tn=hn[--pn],hn[pn]=null}function Xu(e,t){hn[pn++]=Tn,hn[pn++]=An,hn[pn++]=rl,Tn=t.id,An=t.overflow,rl=e}var At=null,ct=null,Ge=!1,cl=null,mn=!1,ac=Error(d(519));function sl(e){var t=Error(d(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ci(fn(t,e)),ac}function Qu(e){var t=e.stateNode,n=e.type,l=e.memoizedProps;switch(t[ut]=e,t[mt]=l,n){case"dialog":je("cancel",t),je("close",t);break;case"iframe":case"object":case"embed":je("load",t);break;case"video":case"audio":for(n=0;n<Di.length;n++)je(Di[n],t);break;case"source":je("error",t);break;case"img":case"image":case"link":je("error",t),je("load",t);break;case"details":je("toggle",t);break;case"input":je("invalid",t),au(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":je("invalid",t);break;case"textarea":je("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&&(je("beforetoggle",t),je("toggle",t)),l.onScroll!=null&&je("scroll",t),l.onScrollEnd!=null&&je("scrollend",t),l.onClick!=null&&(t.onclick=jn),t=!0):t=!1,t||sl(e,!0)}function Zu(e){for(At=e.return;At;)switch(At.tag){case 5:case 31:case 13:mn=!1;return;case 27:case 3:mn=!0;return;default:At=At.return}}function ya(e){if(e!==At)return!1;if(!Ge)return Zu(e),Ge=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||Cs(e.type,e.memoizedProps)),n=!n),n&&ct&&sl(e),Zu(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(d(317));ct=v0(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(d(317));ct=v0(e)}else t===27?(t=ct,wl(e.type)?(e=As,As=null,ct=e):ct=t):ct=At?yn(e.stateNode.nextSibling):null;return!0}function Gl(){ct=At=null,Ge=!1}function ic(){var e=cl;return e!==null&&(Kt===null?Kt=e:Kt.push.apply(Kt,e),cl=null),e}function ci(e){cl===null?cl=[e]:cl.push(e)}var oc=v(null),Vl=null,Vn=null;function ul(e,t,n){J(oc,t._currentValue),t._currentValue=n}function Xn(e){e._currentValue=oc.current,L(oc)}function rc(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 cc(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 f=i;i=a;for(var m=0;m<t.length;m++)if(f.context===t[m]){i.lanes|=n,f=i.alternate,f!==null&&(f.lanes|=n),rc(i.return,n,e),l||(r=null);break e}i=f.next}}else if(a.tag===18){if(r=a.return,r===null)throw Error(d(341));r.lanes|=n,i=r.alternate,i!==null&&(i.lanes|=n),rc(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 va(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(d(387));if(r=r.memoizedProps,r!==null){var f=a.type;It(a.pendingProps.value,r.value)||(e!==null?e.push(f):e=[f])}}else if(a===_e.current){if(r=a.alternate,r===null)throw Error(d(387));r.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e!==null?e.push(Ui):e=[Ui])}a=a.return}e!==null&&cc(t,e,n,l),t.flags|=262144}function vo(e){for(e=e.firstContext;e!==null;){if(!It(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Xl(e){Vl=e,Vn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Et(e){return Ku(Vl,e)}function bo(e,t){return Vl===null&&Xl(e),Ku(e,t)}function Ku(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Vn===null){if(e===null)throw Error(d(308));Vn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Vn=Vn.next=t;return n}var zp=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()})}},Mp=o.unstable_scheduleCallback,Tp=o.unstable_NormalPriority,bt={$$typeof:W,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function sc(){return{controller:new zp,data:new Map,refCount:0}}function si(e){e.refCount--,e.refCount===0&&Mp(Tp,function(){e.controller.abort()})}var ui=null,uc=0,ba=0,xa=null;function Ap(e,t){if(ui===null){var n=ui=[];uc=0,ba=hs(),xa={status:"pending",value:void 0,then:function(l){n.push(l)}}}return uc++,t.then(Ju,Ju),t}function Ju(){if(--uc===0&&ui!==null){xa!==null&&(xa.status="fulfilled");var e=ui;ui=null,ba=0,xa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Ep(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=E.S;E.S=function(e,t){Of=Ut(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Ap(e,t),Fu!==null&&Fu(e,t)};var Ql=v(null);function dc(){var e=Ql.current;return e!==null?e:at.pooledCache}function xo(e,t){t===null?J(Ql,Ql.current):J(Ql,t.pool)}function $u(){var e=dc();return e===null?null:{parent:bt._currentValue,pool:e}}var Sa=Error(d(460)),fc=Error(d(474)),So=Error(d(542)),Co={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(jn,jn),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,ed(e),e;default:if(typeof t.status=="string")t.then(jn,jn);else{if(e=at,e!==null&&100<e.shellSuspendCounter)throw Error(d(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,ed(e),e}throw Kl=t,Sa}}function Zl(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(Kl=n,Sa):n}}var Kl=null;function Pu(){if(Kl===null)throw Error(d(459));var e=Kl;return Kl=null,e}function ed(e){if(e===Sa||e===So)throw Error(d(483))}var Ca=null,di=0;function wo(e){var t=di;return di+=1,Ca===null&&(Ca=[]),Iu(Ca,e,t)}function fi(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function zo(e,t){throw t.$$typeof===V?Error(d(525)):(e=Object.prototype.toString.call(t),Error(d(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function td(e){function t(w,S){if(e){var z=w.deletions;z===null?(w.deletions=[S],w.flags|=16):z.push(S)}}function n(w,S){if(!e)return null;for(;S!==null;)t(w,S),S=S.sibling;return null}function l(w){for(var S=new Map;w!==null;)w.key!==null?S.set(w.key,w):S.set(w.index,w),w=w.sibling;return S}function a(w,S){return w=Yn(w,S),w.index=0,w.sibling=null,w}function i(w,S,z){return w.index=z,e?(z=w.alternate,z!==null?(z=z.index,z<S?(w.flags|=67108866,S):z):(w.flags|=67108866,S)):(w.flags|=1048576,S)}function r(w){return e&&w.alternate===null&&(w.flags|=67108866),w}function f(w,S,z,H){return S===null||S.tag!==6?(S=ec(z,w.mode,H),S.return=w,S):(S=a(S,z),S.return=w,S)}function m(w,S,z,H){var Se=z.type;return Se===X?O(w,S,z.props.children,H,z.key):S!==null&&(S.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===Q&&Zl(Se)===S.type)?(S=a(S,z.props),fi(S,z),S.return=w,S):(S=go(z.type,z.key,z.props,null,w.mode,H),fi(S,z),S.return=w,S)}function M(w,S,z,H){return S===null||S.tag!==4||S.stateNode.containerInfo!==z.containerInfo||S.stateNode.implementation!==z.implementation?(S=tc(z,w.mode,H),S.return=w,S):(S=a(S,z.children||[]),S.return=w,S)}function O(w,S,z,H,Se){return S===null||S.tag!==7?(S=Yl(z,w.mode,H,Se),S.return=w,S):(S=a(S,z),S.return=w,S)}function j(w,S,z){if(typeof S=="string"&&S!==""||typeof S=="number"||typeof S=="bigint")return S=ec(""+S,w.mode,z),S.return=w,S;if(typeof S=="object"&&S!==null){switch(S.$$typeof){case ce:return z=go(S.type,S.key,S.props,null,w.mode,z),fi(z,S),z.return=w,z;case q:return S=tc(S,w.mode,z),S.return=w,S;case Q:return S=Zl(S),j(w,S,z)}if(Le(S)||te(S))return S=Yl(S,w.mode,z,null),S.return=w,S;if(typeof S.then=="function")return j(w,wo(S),z);if(S.$$typeof===W)return j(w,bo(w,S),z);zo(w,S)}return null}function T(w,S,z,H){var Se=S!==null?S.key:null;if(typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint")return Se!==null?null:f(w,S,""+z,H);if(typeof z=="object"&&z!==null){switch(z.$$typeof){case ce:return z.key===Se?m(w,S,z,H):null;case q:return z.key===Se?M(w,S,z,H):null;case Q:return z=Zl(z),T(w,S,z,H)}if(Le(z)||te(z))return Se!==null?null:O(w,S,z,H,null);if(typeof z.then=="function")return T(w,S,wo(z),H);if(z.$$typeof===W)return T(w,S,bo(w,z),H);zo(w,z)}return null}function k(w,S,z,H,Se){if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return w=w.get(z)||null,f(S,w,""+H,Se);if(typeof H=="object"&&H!==null){switch(H.$$typeof){case ce:return w=w.get(H.key===null?z:H.key)||null,m(S,w,H,Se);case q:return w=w.get(H.key===null?z:H.key)||null,M(S,w,H,Se);case Q:return H=Zl(H),k(w,S,z,H,Se)}if(Le(H)||te(H))return w=w.get(z)||null,O(S,w,H,Se,null);if(typeof H.then=="function")return k(w,S,z,wo(H),Se);if(H.$$typeof===W)return k(w,S,z,bo(S,H),Se);zo(S,H)}return null}function ue(w,S,z,H){for(var Se=null,Qe=null,ge=S,He=S=0,Ye=null;ge!==null&&He<z.length;He++){ge.index>He?(Ye=ge,ge=null):Ye=ge.sibling;var Ze=T(w,ge,z[He],H);if(Ze===null){ge===null&&(ge=Ye);break}e&&ge&&Ze.alternate===null&&t(w,ge),S=i(Ze,S,He),Qe===null?Se=Ze:Qe.sibling=Ze,Qe=Ze,ge=Ye}if(He===z.length)return n(w,ge),Ge&&Gn(w,He),Se;if(ge===null){for(;He<z.length;He++)ge=j(w,z[He],H),ge!==null&&(S=i(ge,S,He),Qe===null?Se=ge:Qe.sibling=ge,Qe=ge);return Ge&&Gn(w,He),Se}for(ge=l(ge);He<z.length;He++)Ye=k(ge,w,He,z[He],H),Ye!==null&&(e&&Ye.alternate!==null&&ge.delete(Ye.key===null?He:Ye.key),S=i(Ye,S,He),Qe===null?Se=Ye:Qe.sibling=Ye,Qe=Ye);return e&&ge.forEach(function(El){return t(w,El)}),Ge&&Gn(w,He),Se}function we(w,S,z,H){if(z==null)throw Error(d(151));for(var Se=null,Qe=null,ge=S,He=S=0,Ye=null,Ze=z.next();ge!==null&&!Ze.done;He++,Ze=z.next()){ge.index>He?(Ye=ge,ge=null):Ye=ge.sibling;var El=T(w,ge,Ze.value,H);if(El===null){ge===null&&(ge=Ye);break}e&&ge&&El.alternate===null&&t(w,ge),S=i(El,S,He),Qe===null?Se=El:Qe.sibling=El,Qe=El,ge=Ye}if(Ze.done)return n(w,ge),Ge&&Gn(w,He),Se;if(ge===null){for(;!Ze.done;He++,Ze=z.next())Ze=j(w,Ze.value,H),Ze!==null&&(S=i(Ze,S,He),Qe===null?Se=Ze:Qe.sibling=Ze,Qe=Ze);return Ge&&Gn(w,He),Se}for(ge=l(ge);!Ze.done;He++,Ze=z.next())Ze=k(ge,w,He,Ze.value,H),Ze!==null&&(e&&Ze.alternate!==null&&ge.delete(Ze.key===null?He:Ze.key),S=i(Ze,S,He),Qe===null?Se=Ze:Qe.sibling=Ze,Qe=Ze);return e&&ge.forEach(function(jm){return t(w,jm)}),Ge&&Gn(w,He),Se}function tt(w,S,z,H){if(typeof z=="object"&&z!==null&&z.type===X&&z.key===null&&(z=z.props.children),typeof z=="object"&&z!==null){switch(z.$$typeof){case ce:e:{for(var Se=z.key;S!==null;){if(S.key===Se){if(Se=z.type,Se===X){if(S.tag===7){n(w,S.sibling),H=a(S,z.props.children),H.return=w,w=H;break e}}else if(S.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===Q&&Zl(Se)===S.type){n(w,S.sibling),H=a(S,z.props),fi(H,z),H.return=w,w=H;break e}n(w,S);break}else t(w,S);S=S.sibling}z.type===X?(H=Yl(z.props.children,w.mode,H,z.key),H.return=w,w=H):(H=go(z.type,z.key,z.props,null,w.mode,H),fi(H,z),H.return=w,w=H)}return r(w);case q:e:{for(Se=z.key;S!==null;){if(S.key===Se)if(S.tag===4&&S.stateNode.containerInfo===z.containerInfo&&S.stateNode.implementation===z.implementation){n(w,S.sibling),H=a(S,z.children||[]),H.return=w,w=H;break e}else{n(w,S);break}else t(w,S);S=S.sibling}H=tc(z,w.mode,H),H.return=w,w=H}return r(w);case Q:return z=Zl(z),tt(w,S,z,H)}if(Le(z))return ue(w,S,z,H);if(te(z)){if(Se=te(z),typeof Se!="function")throw Error(d(150));return z=Se.call(z),we(w,S,z,H)}if(typeof z.then=="function")return tt(w,S,wo(z),H);if(z.$$typeof===W)return tt(w,S,bo(w,z),H);zo(w,z)}return typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint"?(z=""+z,S!==null&&S.tag===6?(n(w,S.sibling),H=a(S,z),H.return=w,w=H):(n(w,S),H=ec(z,w.mode,H),H.return=w,w=H),r(w)):n(w,S)}return function(w,S,z,H){try{di=0;var Se=tt(w,S,z,H);return Ca=null,Se}catch(ge){if(ge===Sa||ge===So)throw ge;var Qe=Pt(29,ge,null,w.mode);return Qe.lanes=H,Qe.return=w,Qe}}}var Jl=td(!0),nd=td(!1),dl=!1;function hc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function pc(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 fl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function hl(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=mo(e),ju(e,null,n),t}return po(e,l,t,n),mo(e)}function hi(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 mc(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 gc=!1;function pi(){if(gc){var e=xa;if(e!==null)throw e}}function mi(e,t,n,l){gc=!1;var a=e.updateQueue;dl=!1;var i=a.firstBaseUpdate,r=a.lastBaseUpdate,f=a.shared.pending;if(f!==null){a.shared.pending=null;var m=f,M=m.next;m.next=null,r===null?i=M:r.next=M,r=m;var O=e.alternate;O!==null&&(O=O.updateQueue,f=O.lastBaseUpdate,f!==r&&(f===null?O.firstBaseUpdate=M:f.next=M,O.lastBaseUpdate=m))}if(i!==null){var j=a.baseState;r=0,O=M=m=null,f=i;do{var T=f.lane&-536870913,k=T!==f.lane;if(k?(qe&T)===T:(l&T)===T){T!==0&&T===ba&&(gc=!0),O!==null&&(O=O.next={lane:0,tag:f.tag,payload:f.payload,callback:null,next:null});e:{var ue=e,we=f;T=t;var tt=n;switch(we.tag){case 1:if(ue=we.payload,typeof ue=="function"){j=ue.call(tt,j,T);break e}j=ue;break e;case 3:ue.flags=ue.flags&-65537|128;case 0:if(ue=we.payload,T=typeof ue=="function"?ue.call(tt,j,T):ue,T==null)break e;j=R({},j,T);break e;case 2:dl=!0}}T=f.callback,T!==null&&(e.flags|=64,k&&(e.flags|=8192),k=a.callbacks,k===null?a.callbacks=[T]:k.push(T))}else k={lane:T,tag:f.tag,payload:f.payload,callback:f.callback,next:null},O===null?(M=O=k,m=j):O=O.next=k,r|=T;if(f=f.next,f===null){if(f=a.shared.pending,f===null)break;k=f,f=k.next,k.next=null,a.lastBaseUpdate=k,a.shared.pending=null}}while(!0);O===null&&(m=j),a.baseState=m,a.firstBaseUpdate=M,a.lastBaseUpdate=O,i===null&&(a.shared.lanes=0),vl|=r,e.lanes=r,e.memoizedState=j}}function ld(e,t){if(typeof e!="function")throw Error(d(191,e));e.call(t)}function ad(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)ld(n[e],t)}var wa=v(null),Mo=v(0);function id(e,t){e=Pn,J(Mo,e),J(wa,t),Pn=e|t.baseLanes}function yc(){J(Mo,Pn),J(wa,wa.current)}function vc(){Pn=Mo.current,L(wa),L(Mo)}var en=v(null),gn=null;function pl(e){var t=e.alternate;J(gt,gt.current&1),J(en,e),gn===null&&(t===null||wa.current!==null||t.memoizedState!==null)&&(gn=e)}function bc(e){J(gt,gt.current),J(en,e),gn===null&&(gn=e)}function od(e){e.tag===22?(J(gt,gt.current),J(en,e),gn===null&&(gn=e)):ml()}function ml(){J(gt,gt.current),J(en,en.current)}function tn(e){L(en),gn===e&&(gn=null),L(gt)}var gt=v(0);function To(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||Ms(n)||Ts(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 Qn=0,Ue=null,Pe=null,xt=null,Ao=!1,za=!1,Fl=!1,Eo=0,gi=0,Ma=null,kp=0;function ft(){throw Error(d(321))}function xc(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!It(e[n],t[n]))return!1;return!0}function Sc(e,t,n,l,a,i){return Qn=i,Ue=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,E.H=e===null||e.memoizedState===null?Vd:Hc,Fl=!1,i=n(l,a),Fl=!1,za&&(i=cd(t,n,l,a)),rd(e),i}function rd(e){E.H=bi;var t=Pe!==null&&Pe.next!==null;if(Qn=0,xt=Pe=Ue=null,Ao=!1,gi=0,Ma=null,t)throw Error(d(300));e===null||St||(e=e.dependencies,e!==null&&vo(e)&&(St=!0))}function cd(e,t,n,l){Ue=e;var a=0;do{if(za&&(Ma=null),gi=0,za=!1,25<=a)throw Error(d(301));if(a+=1,xt=Pe=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}E.H=Xd,i=t(n,l)}while(za);return i}function Dp(){var e=E.H,t=e.useState()[0];return t=typeof t.then=="function"?yi(t):t,e=e.useState()[0],(Pe!==null?Pe.memoizedState:null)!==e&&(Ue.flags|=1024),t}function Cc(){var e=Eo!==0;return Eo=0,e}function wc(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function zc(e){if(Ao){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Ao=!1}Qn=0,xt=Pe=Ue=null,za=!1,gi=Eo=0,Ma=null}function Gt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return xt===null?Ue.memoizedState=xt=e:xt=xt.next=e,xt}function yt(){if(Pe===null){var e=Ue.alternate;e=e!==null?e.memoizedState:null}else e=Pe.next;var t=xt===null?Ue.memoizedState:xt.next;if(t!==null)xt=t,Pe=e;else{if(e===null)throw Ue.alternate===null?Error(d(467)):Error(d(310));Pe=e,e={memoizedState:Pe.memoizedState,baseState:Pe.baseState,baseQueue:Pe.baseQueue,queue:Pe.queue,next:null},xt===null?Ue.memoizedState=xt=e:xt=xt.next=e}return xt}function ko(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function yi(e){var t=gi;return gi+=1,Ma===null&&(Ma=[]),e=Iu(Ma,e,t),t=Ue,(xt===null?t.memoizedState:xt.next)===null&&(t=t.alternate,E.H=t===null||t.memoizedState===null?Vd:Hc),e}function Do(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return yi(e);if(e.$$typeof===W)return Et(e)}throw Error(d(438,String(e)))}function Mc(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=ko(),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]=ne;return t.index++,n}function Zn(e,t){return typeof t=="function"?t(e):t}function Ro(e){var t=yt();return Tc(t,Pe,e)}function Tc(e,t,n){var l=e.queue;if(l===null)throw Error(d(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 f=r=null,m=null,M=t,O=!1;do{var j=M.lane&-536870913;if(j!==M.lane?(qe&j)===j:(Qn&j)===j){var T=M.revertLane;if(T===0)m!==null&&(m=m.next={lane:0,revertLane:0,gesture:null,action:M.action,hasEagerState:M.hasEagerState,eagerState:M.eagerState,next:null}),j===ba&&(O=!0);else if((Qn&T)===T){M=M.next,T===ba&&(O=!0);continue}else j={lane:0,revertLane:M.revertLane,gesture:null,action:M.action,hasEagerState:M.hasEagerState,eagerState:M.eagerState,next:null},m===null?(f=m=j,r=i):m=m.next=j,Ue.lanes|=T,vl|=T;j=M.action,Fl&&n(i,j),i=M.hasEagerState?M.eagerState:n(i,j)}else T={lane:j,revertLane:M.revertLane,gesture:M.gesture,action:M.action,hasEagerState:M.hasEagerState,eagerState:M.eagerState,next:null},m===null?(f=m=T,r=i):m=m.next=T,Ue.lanes|=j,vl|=j;M=M.next}while(M!==null&&M!==t);if(m===null?r=i:m.next=f,!It(i,e.memoizedState)&&(St=!0,O&&(n=xa,n!==null)))throw n;e.memoizedState=i,e.baseState=r,e.baseQueue=m,l.lastRenderedState=i}return a===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function Ac(e){var t=yt(),n=t.queue;if(n===null)throw Error(d(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);It(i,t.memoizedState)||(St=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,l]}function sd(e,t,n){var l=Ue,a=yt(),i=Ge;if(i){if(n===void 0)throw Error(d(407));n=n()}else n=t();var r=!It((Pe||a).memoizedState,n);if(r&&(a.memoizedState=n,St=!0),a=a.queue,Dc(fd.bind(null,l,a,e),[e]),a.getSnapshot!==t||r||xt!==null&&xt.memoizedState.tag&1){if(l.flags|=2048,Ta(9,{destroy:void 0},dd.bind(null,l,a,n,t),null),at===null)throw Error(d(349));i||(Qn&127)!==0||ud(l,t,n)}return n}function ud(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ue.updateQueue,t===null?(t=ko(),Ue.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function dd(e,t,n,l){t.value=n,t.getSnapshot=l,hd(t)&&pd(e)}function fd(e,t,n){return n(function(){hd(t)&&pd(e)})}function hd(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!It(e,n)}catch{return!0}}function pd(e){var t=ql(e,2);t!==null&&Jt(t,e,2)}function Ec(e){var t=Gt();if(typeof e=="function"){var n=e;if(e=n(),Fl){bn(!0);try{n()}finally{bn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zn,lastRenderedState:e},t}function md(e,t,n,l){return e.baseState=n,Tc(e,Pe,typeof l=="function"?l:Zn)}function Rp(e,t,n,l,a){if(Lo(e))throw Error(d(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)}};E.T!==null?n(!0):i.isTransition=!1,l(i),n=t.pending,n===null?(i.next=t.pending=i,gd(t,i)):(i.next=n.next,t.pending=n.next=i)}}function gd(e,t){var n=t.action,l=t.payload,a=e.state;if(t.isTransition){var i=E.T,r={};E.T=r;try{var f=n(a,l),m=E.S;m!==null&&m(r,f),yd(e,t,f)}catch(M){kc(e,t,M)}finally{i!==null&&r.types!==null&&(i.types=r.types),E.T=i}}else try{i=n(a,l),yd(e,t,i)}catch(M){kc(e,t,M)}}function yd(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(l){vd(e,t,l)},function(l){return kc(e,t,l)}):vd(e,t,n)}function vd(e,t,n){t.status="fulfilled",t.value=n,bd(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,gd(e,n)))}function kc(e,t,n){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=n,bd(t),t=t.next;while(t!==l)}e.action=null}function bd(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function xd(e,t){return t}function Sd(e,t){if(Ge){var n=at.formState;if(n!==null){e:{var l=Ue;if(Ge){if(ct){t:{for(var a=ct,i=mn;a.nodeType!==8;){if(!i){a=null;break t}if(a=yn(a.nextSibling),a===null){a=null;break t}}i=a.data,a=i==="F!"||i==="F"?a:null}if(a){ct=yn(a.nextSibling),l=a.data==="F!";break e}}sl(l)}l=!1}l&&(t=n[0])}}return n=Gt(),n.memoizedState=n.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:xd,lastRenderedState:t},n.queue=l,n=qd.bind(null,Ue,l),l.dispatch=n,l=Ec(!1),i=Uc.bind(null,Ue,!1,l.queue),l=Gt(),a={state:t,dispatch:null,action:e,pending:null},l.queue=a,n=Rp.bind(null,Ue,a,i,n),a.dispatch=n,l.memoizedState=e,[t,n,!1]}function Cd(e){var t=yt();return wd(t,Pe,e)}function wd(e,t,n){if(t=Tc(e,t,xd)[0],e=Ro(Zn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=yi(t)}catch(r){throw r===Sa?So:r}else l=t;t=yt();var a=t.queue,i=a.dispatch;return n!==t.memoizedState&&(Ue.flags|=2048,Ta(9,{destroy:void 0},_p.bind(null,a,n),null)),[l,i,e]}function _p(e,t){e.action=t}function zd(e){var t=yt(),n=Pe;if(n!==null)return wd(t,n,e);yt(),t=t.memoizedState,n=yt();var l=n.queue.dispatch;return n.memoizedState=e,[t,l,!1]}function Ta(e,t,n,l){return e={tag:e,create:n,deps:l,inst:t,next:null},t=Ue.updateQueue,t===null&&(t=ko(),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 Md(){return yt().memoizedState}function _o(e,t,n,l){var a=Gt();Ue.flags|=e,a.memoizedState=Ta(1|t,{destroy:void 0},n,l===void 0?null:l)}function Oo(e,t,n,l){var a=yt();l=l===void 0?null:l;var i=a.memoizedState.inst;Pe!==null&&l!==null&&xc(l,Pe.memoizedState.deps)?a.memoizedState=Ta(t,i,n,l):(Ue.flags|=e,a.memoizedState=Ta(1|t,i,n,l))}function Td(e,t){_o(8390656,8,e,t)}function Dc(e,t){Oo(2048,8,e,t)}function Op(e){Ue.flags|=4;var t=Ue.updateQueue;if(t===null)t=ko(),Ue.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Ad(e){var t=yt().memoizedState;return Op({ref:t,nextImpl:e}),function(){if((Ke&2)!==0)throw Error(d(440));return t.impl.apply(void 0,arguments)}}function Ed(e,t){return Oo(4,2,e,t)}function kd(e,t){return Oo(4,4,e,t)}function Dd(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 Rd(e,t,n){n=n!=null?n.concat([e]):null,Oo(4,4,Dd.bind(null,t,e),n)}function Rc(){}function _d(e,t){var n=yt();t=t===void 0?null:t;var l=n.memoizedState;return t!==null&&xc(t,l[1])?l[0]:(n.memoizedState=[e,t],e)}function Od(e,t){var n=yt();t=t===void 0?null:t;var l=n.memoizedState;if(t!==null&&xc(t,l[1]))return l[0];if(l=e(),Fl){bn(!0);try{e()}finally{bn(!1)}}return n.memoizedState=[l,t],l}function _c(e,t,n){return n===void 0||(Qn&1073741824)!==0&&(qe&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=Uf(),Ue.lanes|=e,vl|=e,n)}function Ld(e,t,n,l){return It(n,t)?n:wa.current!==null?(e=_c(e,n,l),It(e,t)||(St=!0),e):(Qn&42)===0||(Qn&1073741824)!==0&&(qe&261930)===0?(St=!0,e.memoizedState=n):(e=Uf(),Ue.lanes|=e,vl|=e,t)}function Ud(e,t,n,l,a){var i=B.p;B.p=i!==0&&8>i?i:8;var r=E.T,f={};E.T=f,Uc(e,!1,t,n);try{var m=a(),M=E.S;if(M!==null&&M(f,m),m!==null&&typeof m=="object"&&typeof m.then=="function"){var O=Ep(m,l);vi(e,t,O,an(e))}else vi(e,t,l,an(e))}catch(j){vi(e,t,{then:function(){},status:"rejected",reason:j},an())}finally{B.p=i,r!==null&&f.types!==null&&(r.types=f.types),E.T=r}}function Lp(){}function Oc(e,t,n,l){if(e.tag!==5)throw Error(d(476));var a=Hd(e).queue;Ud(e,a,t,oe,n===null?Lp:function(){return Bd(e),n(l)})}function Hd(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:oe,baseState:oe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zn,lastRenderedState:oe},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zn,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Bd(e){var t=Hd(e);t.next===null&&(t=e.alternate.memoizedState),vi(e,t.next.queue,{},an())}function Lc(){return Et(Ui)}function Nd(){return yt().memoizedState}function jd(){return yt().memoizedState}function Up(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=an();e=fl(n);var l=hl(t,e,n);l!==null&&(Jt(l,t,n),hi(l,t,n)),t={cache:sc()},e.payload=t;return}t=t.return}}function Hp(e,t,n){var l=an();n={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Lo(e)?Yd(t,n):(n=Ir(e,t,n,l),n!==null&&(Jt(n,e,l),Gd(n,t,l)))}function qd(e,t,n){var l=an();vi(e,t,n,l)}function vi(e,t,n,l){var a={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Lo(e))Yd(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,f=i(r,n);if(a.hasEagerState=!0,a.eagerState=f,It(f,r))return po(e,t,a,0),at===null&&ho(),!1}catch{}if(n=Ir(e,t,a,l),n!==null)return Jt(n,e,l),Gd(n,t,l),!0}return!1}function Uc(e,t,n,l){if(l={lane:2,revertLane:hs(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Lo(e)){if(t)throw Error(d(479))}else t=Ir(e,n,l,2),t!==null&&Jt(t,e,2)}function Lo(e){var t=e.alternate;return e===Ue||t!==null&&t===Ue}function Yd(e,t){za=Ao=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Gd(e,t,n){if((n&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,Pi(e,n)}}var bi={readContext:Et,use:Do,useCallback:ft,useContext:ft,useEffect:ft,useImperativeHandle:ft,useLayoutEffect:ft,useInsertionEffect:ft,useMemo:ft,useReducer:ft,useRef:ft,useState:ft,useDebugValue:ft,useDeferredValue:ft,useTransition:ft,useSyncExternalStore:ft,useId:ft,useHostTransitionStatus:ft,useFormState:ft,useActionState:ft,useOptimistic:ft,useMemoCache:ft,useCacheRefresh:ft};bi.useEffectEvent=ft;var Vd={readContext:Et,use:Do,useCallback:function(e,t){return Gt().memoizedState=[e,t===void 0?null:t],e},useContext:Et,useEffect:Td,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,_o(4194308,4,Dd.bind(null,t,e),n)},useLayoutEffect:function(e,t){return _o(4194308,4,e,t)},useInsertionEffect:function(e,t){_o(4,2,e,t)},useMemo:function(e,t){var n=Gt();t=t===void 0?null:t;var l=e();if(Fl){bn(!0);try{e()}finally{bn(!1)}}return n.memoizedState=[l,t],l},useReducer:function(e,t,n){var l=Gt();if(n!==void 0){var a=n(t);if(Fl){bn(!0);try{n(t)}finally{bn(!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=Hp.bind(null,Ue,e),[l.memoizedState,e]},useRef:function(e){var t=Gt();return e={current:e},t.memoizedState=e},useState:function(e){e=Ec(e);var t=e.queue,n=qd.bind(null,Ue,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Rc,useDeferredValue:function(e,t){var n=Gt();return _c(n,e,t)},useTransition:function(){var e=Ec(!1);return e=Ud.bind(null,Ue,e.queue,!0,!1),Gt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var l=Ue,a=Gt();if(Ge){if(n===void 0)throw Error(d(407));n=n()}else{if(n=t(),at===null)throw Error(d(349));(qe&127)!==0||ud(l,t,n)}a.memoizedState=n;var i={value:n,getSnapshot:t};return a.queue=i,Td(fd.bind(null,l,i,e),[e]),l.flags|=2048,Ta(9,{destroy:void 0},dd.bind(null,l,i,n,t),null),n},useId:function(){var e=Gt(),t=at.identifierPrefix;if(Ge){var n=An,l=Tn;n=(l&~(1<<32-qt(l)-1)).toString(32)+n,t="_"+t+"R_"+n,n=Eo++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=kp++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Lc,useFormState:Sd,useActionState:Sd,useOptimistic:function(e){var t=Gt();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Uc.bind(null,Ue,!0,n),n.dispatch=t,[e,t]},useMemoCache:Mc,useCacheRefresh:function(){return Gt().memoizedState=Up.bind(null,Ue)},useEffectEvent:function(e){var t=Gt(),n={impl:e};return t.memoizedState=n,function(){if((Ke&2)!==0)throw Error(d(440));return n.impl.apply(void 0,arguments)}}},Hc={readContext:Et,use:Do,useCallback:_d,useContext:Et,useEffect:Dc,useImperativeHandle:Rd,useInsertionEffect:Ed,useLayoutEffect:kd,useMemo:Od,useReducer:Ro,useRef:Md,useState:function(){return Ro(Zn)},useDebugValue:Rc,useDeferredValue:function(e,t){var n=yt();return Ld(n,Pe.memoizedState,e,t)},useTransition:function(){var e=Ro(Zn)[0],t=yt().memoizedState;return[typeof e=="boolean"?e:yi(e),t]},useSyncExternalStore:sd,useId:Nd,useHostTransitionStatus:Lc,useFormState:Cd,useActionState:Cd,useOptimistic:function(e,t){var n=yt();return md(n,Pe,e,t)},useMemoCache:Mc,useCacheRefresh:jd};Hc.useEffectEvent=Ad;var Xd={readContext:Et,use:Do,useCallback:_d,useContext:Et,useEffect:Dc,useImperativeHandle:Rd,useInsertionEffect:Ed,useLayoutEffect:kd,useMemo:Od,useReducer:Ac,useRef:Md,useState:function(){return Ac(Zn)},useDebugValue:Rc,useDeferredValue:function(e,t){var n=yt();return Pe===null?_c(n,e,t):Ld(n,Pe.memoizedState,e,t)},useTransition:function(){var e=Ac(Zn)[0],t=yt().memoizedState;return[typeof e=="boolean"?e:yi(e),t]},useSyncExternalStore:sd,useId:Nd,useHostTransitionStatus:Lc,useFormState:zd,useActionState:zd,useOptimistic:function(e,t){var n=yt();return Pe!==null?md(n,Pe,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:Mc,useCacheRefresh:jd};Xd.useEffectEvent=Ad;function Bc(e,t,n,l){t=e.memoizedState,n=n(l,t),n=n==null?t:R({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Nc={enqueueSetState:function(e,t,n){e=e._reactInternals;var l=an(),a=fl(l);a.payload=t,n!=null&&(a.callback=n),t=hl(e,a,l),t!==null&&(Jt(t,e,l),hi(t,e,l))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var l=an(),a=fl(l);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=hl(e,a,l),t!==null&&(Jt(t,e,l),hi(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=an(),l=fl(n);l.tag=2,t!=null&&(l.callback=t),t=hl(e,l,n),t!==null&&(Jt(t,e,n),hi(t,e,n))}};function Qd(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?!ii(n,l)||!ii(a,i):!0}function Zd(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 $l(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=R({},n));for(var a in e)n[a]===void 0&&(n[a]=e[a])}return n}function Kd(e){fo(e)}function Jd(e){console.error(e)}function Fd(e){fo(e)}function Uo(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function $d(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 jc(e,t,n){return n=fl(n),n.tag=3,n.payload={element:null},n.callback=function(){Uo(e,t)},n}function Wd(e){return e=fl(e),e.tag=3,e}function Id(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(){$d(t,n,l)}}var r=n.stateNode;r!==null&&typeof r.componentDidCatch=="function"&&(e.callback=function(){$d(t,n,l),typeof a!="function"&&(bl===null?bl=new Set([this]):bl.add(this));var f=l.stack;this.componentDidCatch(l.value,{componentStack:f!==null?f:""})})}function Bp(e,t,n,l,a){if(n.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=n.alternate,t!==null&&va(t,n,a,!0),n=en.current,n!==null){switch(n.tag){case 31:case 13:return gn===null?Ko():n.alternate===null&&ht===0&&(ht=3),n.flags&=-257,n.flags|=65536,n.lanes=a,l===Co?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([l]):t.add(l),us(e,l,a)),!1;case 22:return n.flags|=65536,l===Co?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)),us(e,l,a)),!1}throw Error(d(435,n.tag))}return us(e,l,a),Ko(),!1}if(Ge)return t=en.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=a,l!==ac&&(e=Error(d(422),{cause:l}),ci(fn(e,n)))):(l!==ac&&(t=Error(d(423),{cause:l}),ci(fn(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,l=fn(l,n),a=jc(e.stateNode,l,a),mc(e,a),ht!==4&&(ht=2)),!1;var i=Error(d(520),{cause:l});if(i=fn(i,n),Ai===null?Ai=[i]:Ai.push(i),ht!==4&&(ht=2),t===null)return!0;l=fn(l,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=jc(n.stateNode,l,e),mc(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"&&(bl===null||!bl.has(i))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Wd(a),Id(a,e,n,l),mc(n,a),!1}n=n.return}while(n!==null);return!1}var qc=Error(d(461)),St=!1;function kt(e,t,n,l){t.child=e===null?nd(t,null,n,l):Jl(t,e.child,n,l)}function Pd(e,t,n,l,a){n=n.render;var i=t.ref;if("ref"in l){var r={};for(var f in l)f!=="ref"&&(r[f]=l[f])}else r=l;return Xl(t),l=Sc(e,t,n,r,i,a),f=Cc(),e!==null&&!St?(wc(e,t,a),Kn(e,t,a)):(Ge&&f&&nc(t),t.flags|=1,kt(e,t,l,a),t.child)}function ef(e,t,n,l,a){if(e===null){var i=n.type;return typeof i=="function"&&!Pr(i)&&i.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=i,tf(e,t,i,l,a)):(e=go(n.type,null,l,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!Jc(e,a)){var r=i.memoizedProps;if(n=n.compare,n=n!==null?n:ii,n(r,l)&&e.ref===t.ref)return Kn(e,t,a)}return t.flags|=1,e=Yn(i,l),e.ref=t.ref,e.return=t,t.child=e}function tf(e,t,n,l,a){if(e!==null){var i=e.memoizedProps;if(ii(i,l)&&e.ref===t.ref)if(St=!1,t.pendingProps=l=i,Jc(e,a))(e.flags&131072)!==0&&(St=!0);else return t.lanes=e.lanes,Kn(e,t,a)}return Yc(e,t,n,l,a)}function nf(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 lf(e,t,i,n,l)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&xo(t,i!==null?i.cachePool:null),i!==null?id(t,i):yc(),od(t);else return l=t.lanes=536870912,lf(e,t,i!==null?i.baseLanes|n:n,n,l)}else i!==null?(xo(t,i.cachePool),id(t,i),ml(),t.memoizedState=null):(e!==null&&xo(t,null),yc(),ml());return kt(e,t,a,n),t.child}function xi(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function lf(e,t,n,l,a){var i=dc();return i=i===null?null:{parent:bt._currentValue,pool:i},t.memoizedState={baseLanes:n,cachePool:i},e!==null&&xo(t,null),yc(),od(t),e!==null&&va(e,t,l,!0),t.childLanes=a,null}function Ho(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 af(e,t,n){return Jl(t,e.child,null,n),e=Ho(t,t.pendingProps),e.flags|=2,tn(t),t.memoizedState=null,e}function Np(e,t,n){var l=t.pendingProps,a=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ge){if(l.mode==="hidden")return e=Ho(t,l),t.lanes=536870912,xi(null,e);if(bc(t),(e=ct)?(e=y0(e,mn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:rl!==null?{id:Tn,overflow:An}:null,retryLane:536870912,hydrationErrors:null},n=Yu(e),n.return=t,t.child=n,At=t,ct=null)):e=null,e===null)throw sl(t);return t.lanes=536870912,null}return Ho(t,l)}var i=e.memoizedState;if(i!==null){var r=i.dehydrated;if(bc(t),a)if(t.flags&256)t.flags&=-257,t=af(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(d(558));else if(St||va(e,t,n,!1),a=(n&e.childLanes)!==0,St||a){if(l=at,l!==null&&(r=Ka(l,n),r!==0&&r!==i.retryLane))throw i.retryLane=r,ql(e,r),Jt(l,e,r),qc;Ko(),t=af(e,t,n)}else e=i.treeContext,ct=yn(r.nextSibling),At=t,Ge=!0,cl=null,mn=!1,e!==null&&Xu(t,e),t=Ho(t,l),t.flags|=4096;return t}return e=Yn(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Bo(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(d(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Yc(e,t,n,l,a){return Xl(t),n=Sc(e,t,n,l,void 0,a),l=Cc(),e!==null&&!St?(wc(e,t,a),Kn(e,t,a)):(Ge&&l&&nc(t),t.flags|=1,kt(e,t,n,a),t.child)}function of(e,t,n,l,a,i){return Xl(t),t.updateQueue=null,n=cd(t,l,n,a),rd(e),l=Cc(),e!==null&&!St?(wc(e,t,i),Kn(e,t,i)):(Ge&&l&&nc(t),t.flags|=1,kt(e,t,n,i),t.child)}function rf(e,t,n,l,a){if(Xl(t),t.stateNode===null){var i=pa,r=n.contextType;typeof r=="object"&&r!==null&&(i=Et(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={},hc(t),r=n.contextType,i.context=typeof r=="object"&&r!==null?Et(r):pa,i.state=t.memoizedState,r=n.getDerivedStateFromProps,typeof r=="function"&&(Bc(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),mi(t,l,i,a),pi(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){i=t.stateNode;var f=t.memoizedProps,m=$l(n,f);i.props=m;var M=i.context,O=n.contextType;r=pa,typeof O=="object"&&O!==null&&(r=Et(O));var j=n.getDerivedStateFromProps;O=typeof j=="function"||typeof i.getSnapshotBeforeUpdate=="function",f=t.pendingProps!==f,O||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(f||M!==r)&&Zd(t,i,l,r),dl=!1;var T=t.memoizedState;i.state=T,mi(t,l,i,a),pi(),M=t.memoizedState,f||T!==M||dl?(typeof j=="function"&&(Bc(t,n,j,l),M=t.memoizedState),(m=dl||Qd(t,n,m,l,T,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=m):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{i=t.stateNode,pc(e,t),r=t.memoizedProps,O=$l(n,r),i.props=O,j=t.pendingProps,T=i.context,M=n.contextType,m=pa,typeof M=="object"&&M!==null&&(m=Et(M)),f=n.getDerivedStateFromProps,(M=typeof f=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(r!==j||T!==m)&&Zd(t,i,l,m),dl=!1,T=t.memoizedState,i.state=T,mi(t,l,i,a),pi();var k=t.memoizedState;r!==j||T!==k||dl||e!==null&&e.dependencies!==null&&vo(e.dependencies)?(typeof f=="function"&&(Bc(t,n,f,l),k=t.memoizedState),(O=dl||Qd(t,n,O,l,T,k,m)||e!==null&&e.dependencies!==null&&vo(e.dependencies))?(M||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(l,k,m),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(l,k,m)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||r===e.memoizedProps&&T===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||r===e.memoizedProps&&T===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=k),i.props=l,i.state=k,i.context=m,l=O):(typeof i.componentDidUpdate!="function"||r===e.memoizedProps&&T===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||r===e.memoizedProps&&T===e.memoizedState||(t.flags|=1024),l=!1)}return i=l,Bo(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=Jl(t,e.child,null,a),t.child=Jl(t,null,n,a)):kt(e,t,n,a),t.memoizedState=i.state,e=t.child):e=Kn(e,t,a),e}function cf(e,t,n,l){return Gl(),t.flags|=256,kt(e,t,n,l),t.child}var Gc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Vc(e){return{baseLanes:e,cachePool:$u()}}function Xc(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=ln),e}function sf(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:(gt.current&2)!==0),r&&(a=!0,t.flags&=-129),r=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ge){if(a?pl(t):ml(),(e=ct)?(e=y0(e,mn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:rl!==null?{id:Tn,overflow:An}:null,retryLane:536870912,hydrationErrors:null},n=Yu(e),n.return=t,t.child=n,At=t,ct=null)):e=null,e===null)throw sl(t);return Ts(e)?t.lanes=32:t.lanes=536870912,null}var f=l.children;return l=l.fallback,a?(ml(),a=t.mode,f=No({mode:"hidden",children:f},a),l=Yl(l,a,n,null),f.return=t,l.return=t,f.sibling=l,t.child=f,l=t.child,l.memoizedState=Vc(n),l.childLanes=Xc(e,r,n),t.memoizedState=Gc,xi(null,l)):(pl(t),Qc(t,f))}var m=e.memoizedState;if(m!==null&&(f=m.dehydrated,f!==null)){if(i)t.flags&256?(pl(t),t.flags&=-257,t=Zc(e,t,n)):t.memoizedState!==null?(ml(),t.child=e.child,t.flags|=128,t=null):(ml(),f=l.fallback,a=t.mode,l=No({mode:"visible",children:l.children},a),f=Yl(f,a,n,null),f.flags|=2,l.return=t,f.return=t,l.sibling=f,t.child=l,Jl(t,e.child,null,n),l=t.child,l.memoizedState=Vc(n),l.childLanes=Xc(e,r,n),t.memoizedState=Gc,t=xi(null,l));else if(pl(t),Ts(f)){if(r=f.nextSibling&&f.nextSibling.dataset,r)var M=r.dgst;r=M,l=Error(d(419)),l.stack="",l.digest=r,ci({value:l,source:null,stack:null}),t=Zc(e,t,n)}else if(St||va(e,t,n,!1),r=(n&e.childLanes)!==0,St||r){if(r=at,r!==null&&(l=Ka(r,n),l!==0&&l!==m.retryLane))throw m.retryLane=l,ql(e,l),Jt(r,e,l),qc;Ms(f)||Ko(),t=Zc(e,t,n)}else Ms(f)?(t.flags|=192,t.child=e.child,t=null):(e=m.treeContext,ct=yn(f.nextSibling),At=t,Ge=!0,cl=null,mn=!1,e!==null&&Xu(t,e),t=Qc(t,l.children),t.flags|=4096);return t}return a?(ml(),f=l.fallback,a=t.mode,m=e.child,M=m.sibling,l=Yn(m,{mode:"hidden",children:l.children}),l.subtreeFlags=m.subtreeFlags&65011712,M!==null?f=Yn(M,f):(f=Yl(f,a,n,null),f.flags|=2),f.return=t,l.return=t,l.sibling=f,t.child=l,xi(null,l),l=t.child,f=e.child.memoizedState,f===null?f=Vc(n):(a=f.cachePool,a!==null?(m=bt._currentValue,a=a.parent!==m?{parent:m,pool:m}:a):a=$u(),f={baseLanes:f.baseLanes|n,cachePool:a}),l.memoizedState=f,l.childLanes=Xc(e,r,n),t.memoizedState=Gc,xi(e.child,l)):(pl(t),n=e.child,e=n.sibling,n=Yn(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 Qc(e,t){return t=No({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function No(e,t){return e=Pt(22,e,null,t),e.lanes=0,e}function Zc(e,t,n){return Jl(t,e.child,null,n),e=Qc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function uf(e,t,n){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),rc(e.return,t,n)}function Kc(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 df(e,t,n){var l=t.pendingProps,a=l.revealOrder,i=l.tail;l=l.children;var r=gt.current,f=(r&2)!==0;if(f?(r=r&1|2,t.flags|=128):r&=1,J(gt,r),kt(e,t,l,n),l=Ge?ri:0,!f&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&uf(e,n,t);else if(e.tag===19)uf(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&&To(e)===null&&(a=n),n=n.sibling;n=a,n===null?(a=t.child,t.child=null):(a=n.sibling,n.sibling=null),Kc(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&&To(e)===null){t.child=a;break}e=a.sibling,a.sibling=n,n=a,a=e}Kc(t,!0,n,null,i,l);break;case"together":Kc(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function Kn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),vl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(va(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(d(153));if(t.child!==null){for(e=t.child,n=Yn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Yn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Jc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&vo(e)))}function jp(e,t,n){switch(t.tag){case 3:nt(t,t.stateNode.containerInfo),ul(t,bt,e.memoizedState.cache),Gl();break;case 27:case 5:Ot(t);break;case 4:nt(t,t.stateNode.containerInfo);break;case 10:ul(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,bc(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(pl(t),t.flags|=128,null):(n&t.child.childLanes)!==0?sf(e,t,n):(pl(t),e=Kn(e,t,n),e!==null?e.sibling:null);pl(t);break;case 19:var a=(e.flags&128)!==0;if(l=(n&t.childLanes)!==0,l||(va(e,t,n,!1),l=(n&t.childLanes)!==0),a){if(l)return df(e,t,n);t.flags|=128}if(a=t.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),J(gt,gt.current),l)break;return null;case 22:return t.lanes=0,nf(e,t,n,t.pendingProps);case 24:ul(t,bt,e.memoizedState.cache)}return Kn(e,t,n)}function ff(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)St=!0;else{if(!Jc(e,n)&&(t.flags&128)===0)return St=!1,jp(e,t,n);St=(e.flags&131072)!==0}else St=!1,Ge&&(t.flags&1048576)!==0&&Vu(t,ri,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=Zl(t.elementType),t.type=e,typeof e=="function")Pr(e)?(l=$l(e,l),t.tag=1,t=rf(null,t,e,l,n)):(t.tag=0,t=Yc(null,t,e,l,n));else{if(e!=null){var a=e.$$typeof;if(a===xe){t.tag=11,t=Pd(null,t,e,l,n);break e}else if(a===Z){t.tag=14,t=ef(null,t,e,l,n);break e}}throw t=ze(e)||e,Error(d(306,t,""))}}return t;case 0:return Yc(e,t,t.type,t.pendingProps,n);case 1:return l=t.type,a=$l(l,t.pendingProps),rf(e,t,l,a,n);case 3:e:{if(nt(t,t.stateNode.containerInfo),e===null)throw Error(d(387));l=t.pendingProps;var i=t.memoizedState;a=i.element,pc(e,t),mi(t,l,null,n);var r=t.memoizedState;if(l=r.cache,ul(t,bt,l),l!==i.cache&&cc(t,[bt],n,!0),pi(),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=cf(e,t,l,n);break e}else if(l!==a){a=fn(Error(d(424)),t),ci(a),t=cf(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,ct=yn(e.firstChild),At=t,Ge=!0,cl=null,mn=!0,n=nd(t,null,l,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Gl(),l===a){t=Kn(e,t,n);break e}kt(e,t,l,n)}t=t.child}return t;case 26:return Bo(e,t),e===null?(n=w0(t.type,null,t.pendingProps,null))?t.memoizedState=n:Ge||(n=t.type,e=t.pendingProps,l=er(ke.current).createElement(n),l[ut]=t,l[mt]=e,Dt(l,n,e),fe(l),t.stateNode=l):t.memoizedState=w0(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ot(t),e===null&&Ge&&(l=t.stateNode=x0(t.type,t.pendingProps,ke.current),At=t,mn=!0,a=ct,wl(t.type)?(As=a,ct=yn(l.firstChild)):ct=a),kt(e,t,t.pendingProps.children,n),Bo(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ge&&((a=l=ct)&&(l=mm(l,t.type,t.pendingProps,mn),l!==null?(t.stateNode=l,At=t,ct=yn(l.firstChild),mn=!1,a=!0):a=!1),a||sl(t)),Ot(t),a=t.type,i=t.pendingProps,r=e!==null?e.memoizedProps:null,l=i.children,Cs(a,i)?l=null:r!==null&&Cs(a,r)&&(t.flags|=32),t.memoizedState!==null&&(a=Sc(e,t,Dp,null,null,n),Ui._currentValue=a),Bo(e,t),kt(e,t,l,n),t.child;case 6:return e===null&&Ge&&((e=n=ct)&&(n=gm(n,t.pendingProps,mn),n!==null?(t.stateNode=n,At=t,ct=null,e=!0):e=!1),e||sl(t)),null;case 13:return sf(e,t,n);case 4:return nt(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=Jl(t,null,l,n):kt(e,t,l,n),t.child;case 11:return Pd(e,t,t.type,t.pendingProps,n);case 7:return kt(e,t,t.pendingProps,n),t.child;case 8:return kt(e,t,t.pendingProps.children,n),t.child;case 12:return kt(e,t,t.pendingProps.children,n),t.child;case 10:return l=t.pendingProps,ul(t,t.type,l.value),kt(e,t,l.children,n),t.child;case 9:return a=t.type._context,l=t.pendingProps.children,Xl(t),a=Et(a),l=l(a),t.flags|=1,kt(e,t,l,n),t.child;case 14:return ef(e,t,t.type,t.pendingProps,n);case 15:return tf(e,t,t.type,t.pendingProps,n);case 19:return df(e,t,n);case 31:return Np(e,t,n);case 22:return nf(e,t,n,t.pendingProps);case 24:return Xl(t),l=Et(bt),e===null?(a=dc(),a===null&&(a=at,i=sc(),a.pooledCache=i,i.refCount++,i!==null&&(a.pooledCacheLanes|=n),a=i),t.memoizedState={parent:l,cache:a},hc(t),ul(t,bt,a)):((e.lanes&n)!==0&&(pc(e,t),mi(t,null,null,n),pi()),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),ul(t,bt,l)):(l=i.cache,ul(t,bt,l),l!==a.cache&&cc(t,[bt],n,!0))),kt(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(d(156,t.tag))}function Jn(e){e.flags|=4}function Fc(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(jf())e.flags|=8192;else throw Kl=Co,fc}else e.flags&=-16777217}function hf(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!E0(t))if(jf())e.flags|=8192;else throw Kl=Co,fc}function jo(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Wi():536870912,e.lanes|=t,Da|=t)}function Si(e,t){if(!Ge)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 st(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 qp(e,t,n){var l=t.pendingProps;switch(lc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return st(t),null;case 1:return st(t),null;case 3:return n=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Xn(bt),Ae(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(ya(t)?Jn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,ic())),st(t),null;case 26:var a=t.type,i=t.memoizedState;return e===null?(Jn(t),i!==null?(st(t),hf(t,i)):(st(t),Fc(t,a,null,l,n))):i?i!==e.memoizedState?(Jn(t),st(t),hf(t,i)):(st(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&Jn(t),st(t),Fc(t,a,e,l,n)),null;case 27:if(le(t),n=ke.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Jn(t);else{if(!l){if(t.stateNode===null)throw Error(d(166));return st(t),null}e=I.current,ya(t)?Qu(t):(e=x0(a,l,n),t.stateNode=e,Jn(t))}return st(t),null;case 5:if(le(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Jn(t);else{if(!l){if(t.stateNode===null)throw Error(d(166));return st(t),null}if(i=I.current,ya(t))Qu(t);else{var r=er(ke.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[ut]=t,i[mt]=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(Dt(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&&Jn(t)}}return st(t),Fc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&Jn(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(d(166));if(e=ke.current,ya(t)){if(e=t.stateNode,n=t.memoizedProps,l=null,a=At,a!==null)switch(a.tag){case 27:case 5:l=a.memoizedProps}e[ut]=t,e=!!(e.nodeValue===n||l!==null&&l.suppressHydrationWarning===!0||s0(e.nodeValue,n)),e||sl(t,!0)}else e=er(e).createTextNode(l),e[ut]=t,t.stateNode=e}return st(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(l=ya(t),n!==null){if(e===null){if(!l)throw Error(d(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(d(557));e[ut]=t}else Gl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;st(t),e=!1}else n=ic(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(tn(t),t):(tn(t),null);if((t.flags&128)!==0)throw Error(d(558))}return st(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=ya(t),l!==null&&l.dehydrated!==null){if(e===null){if(!a)throw Error(d(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(d(317));a[ut]=t}else Gl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;st(t),a=!1}else a=ic(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(tn(t),t):(tn(t),null)}return tn(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),jo(t,t.updateQueue),st(t),null);case 4:return Ae(),e===null&&ys(t.stateNode.containerInfo),st(t),null;case 10:return Xn(t.type),st(t),null;case 19:if(L(gt),l=t.memoizedState,l===null)return st(t),null;if(a=(t.flags&128)!==0,i=l.rendering,i===null)if(a)Si(l,!1);else{if(ht!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=To(e),i!==null){for(t.flags|=128,Si(l,!1),e=i.updateQueue,t.updateQueue=e,jo(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)qu(n,e),n=n.sibling;return J(gt,gt.current&1|2),Ge&&Gn(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&Ut()>Xo&&(t.flags|=128,a=!0,Si(l,!1),t.lanes=4194304)}else{if(!a)if(e=To(i),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,jo(t,e),Si(l,!0),l.tail===null&&l.tailMode==="hidden"&&!i.alternate&&!Ge)return st(t),null}else 2*Ut()-l.renderingStartTime>Xo&&n!==536870912&&(t.flags|=128,a=!0,Si(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=gt.current,J(gt,a?n&1|2:n&1),Ge&&Gn(t,l.treeForkCount),e):(st(t),null);case 22:case 23:return tn(t),vc(),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&&(st(t),t.subtreeFlags&6&&(t.flags|=8192)):st(t),n=t.updateQueue,n!==null&&jo(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&&L(Ql),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Xn(bt),st(t),null;case 25:return null;case 30:return null}throw Error(d(156,t.tag))}function Yp(e,t){switch(lc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Xn(bt),Ae(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return le(t),null;case 31:if(t.memoizedState!==null){if(tn(t),t.alternate===null)throw Error(d(340));Gl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(tn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(d(340));Gl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return L(gt),null;case 4:return Ae(),null;case 10:return Xn(t.type),null;case 22:case 23:return tn(t),vc(),e!==null&&L(Ql),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Xn(bt),null;case 25:return null;default:return null}}function pf(e,t){switch(lc(t),t.tag){case 3:Xn(bt),Ae();break;case 26:case 27:case 5:le(t);break;case 4:Ae();break;case 31:t.memoizedState!==null&&tn(t);break;case 13:tn(t);break;case 19:L(gt);break;case 10:Xn(t.type);break;case 22:case 23:tn(t),vc(),e!==null&&L(Ql);break;case 24:Xn(bt)}}function Ci(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(f){Ie(t,t.return,f)}}function gl(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,f=r.destroy;if(f!==void 0){r.destroy=void 0,a=t;var m=n,M=f;try{M()}catch(O){Ie(a,m,O)}}}l=l.next}while(l!==i)}}catch(O){Ie(t,t.return,O)}}function mf(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{ad(t,n)}catch(l){Ie(e,e.return,l)}}}function gf(e,t,n){n.props=$l(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(l){Ie(e,t,l)}}function wi(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){Ie(e,t,a)}}function En(e,t){var n=e.ref,l=e.refCleanup;if(n!==null)if(typeof l=="function")try{l()}catch(a){Ie(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){Ie(e,t,a)}else n.current=null}function yf(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){Ie(e,e.return,a)}}function $c(e,t,n){try{var l=e.stateNode;sm(l,e.type,n,t),l[mt]=t}catch(a){Ie(e,e.return,a)}}function vf(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&wl(e.type)||e.tag===4}function Wc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||vf(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&&wl(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 Ic(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=jn));else if(l!==4&&(l===27&&wl(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Ic(e,t,n),e=e.sibling;e!==null;)Ic(e,t,n),e=e.sibling}function qo(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&&wl(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(qo(e,t,n),e=e.sibling;e!==null;)qo(e,t,n),e=e.sibling}function bf(e){var t=e.stateNode,n=e.memoizedProps;try{for(var l=e.type,a=t.attributes;a.length;)t.removeAttributeNode(a[0]);Dt(t,l,n),t[ut]=e,t[mt]=n}catch(i){Ie(e,e.return,i)}}var Fn=!1,Ct=!1,Pc=!1,xf=typeof WeakSet=="function"?WeakSet:Set,Mt=null;function Gp(e,t){if(e=e.containerInfo,xs=rr,e=Ru(e),Zr(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,f=-1,m=-1,M=0,O=0,j=e,T=null;t:for(;;){for(var k;j!==n||a!==0&&j.nodeType!==3||(f=r+a),j!==i||l!==0&&j.nodeType!==3||(m=r+l),j.nodeType===3&&(r+=j.nodeValue.length),(k=j.firstChild)!==null;)T=j,j=k;for(;;){if(j===e)break t;if(T===n&&++M===a&&(f=r),T===i&&++O===l&&(m=r),(k=j.nextSibling)!==null)break;j=T,T=j.parentNode}j=k}n=f===-1||m===-1?null:{start:f,end:m}}else n=null}n=n||{start:0,end:0}}else n=null;for(Ss={focusedElem:e,selectionRange:n},rr=!1,Mt=t;Mt!==null;)if(t=Mt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Mt=e;else for(;Mt!==null;){switch(t=Mt,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 ue=$l(n.type,a);e=l.getSnapshotBeforeUpdate(ue,i),l.__reactInternalSnapshotBeforeUpdate=e}catch(we){Ie(n,n.return,we)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)zs(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":zs(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(d(163))}if(e=t.sibling,e!==null){e.return=t.return,Mt=e;break}Mt=t.return}}function Sf(e,t,n){var l=n.flags;switch(n.tag){case 0:case 11:case 15:Wn(e,n),l&4&&Ci(5,n);break;case 1:if(Wn(e,n),l&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(r){Ie(n,n.return,r)}else{var a=$l(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(a,t,e.__reactInternalSnapshotBeforeUpdate)}catch(r){Ie(n,n.return,r)}}l&64&&mf(n),l&512&&wi(n,n.return);break;case 3:if(Wn(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{ad(e,t)}catch(r){Ie(n,n.return,r)}}break;case 27:t===null&&l&4&&bf(n);case 26:case 5:Wn(e,n),t===null&&l&4&&yf(n),l&512&&wi(n,n.return);break;case 12:Wn(e,n);break;case 31:Wn(e,n),l&4&&zf(e,n);break;case 13:Wn(e,n),l&4&&Mf(e,n),l&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Wp.bind(null,n),ym(e,n))));break;case 22:if(l=n.memoizedState!==null||Fn,!l){t=t!==null&&t.memoizedState!==null||Ct,a=Fn;var i=Ct;Fn=l,(Ct=t)&&!i?In(e,n,(n.subtreeFlags&8772)!==0):Wn(e,n),Fn=a,Ct=i}break;case 30:break;default:Wn(e,n)}}function Cf(e){var t=e.alternate;t!==null&&(e.alternate=null,Cf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&$a(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var dt=null,Xt=!1;function $n(e,t,n){for(n=n.child;n!==null;)wf(e,t,n),n=n.sibling}function wf(e,t,n){if(jt&&typeof jt.onCommitFiberUnmount=="function")try{jt.onCommitFiberUnmount(Ln,n)}catch{}switch(n.tag){case 26:Ct||En(n,t),$n(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Ct||En(n,t);var l=dt,a=Xt;wl(n.type)&&(dt=n.stateNode,Xt=!1),$n(e,t,n),_i(n.stateNode),dt=l,Xt=a;break;case 5:Ct||En(n,t);case 6:if(l=dt,a=Xt,dt=null,$n(e,t,n),dt=l,Xt=a,dt!==null)if(Xt)try{(dt.nodeType===9?dt.body:dt.nodeName==="HTML"?dt.ownerDocument.body:dt).removeChild(n.stateNode)}catch(i){Ie(n,t,i)}else try{dt.removeChild(n.stateNode)}catch(i){Ie(n,t,i)}break;case 18:dt!==null&&(Xt?(e=dt,m0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Na(e)):m0(dt,n.stateNode));break;case 4:l=dt,a=Xt,dt=n.stateNode.containerInfo,Xt=!0,$n(e,t,n),dt=l,Xt=a;break;case 0:case 11:case 14:case 15:gl(2,n,t),Ct||gl(4,n,t),$n(e,t,n);break;case 1:Ct||(En(n,t),l=n.stateNode,typeof l.componentWillUnmount=="function"&&gf(n,t,l)),$n(e,t,n);break;case 21:$n(e,t,n);break;case 22:Ct=(l=Ct)||n.memoizedState!==null,$n(e,t,n),Ct=l;break;default:$n(e,t,n)}}function zf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Na(e)}catch(n){Ie(t,t.return,n)}}}function Mf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Na(e)}catch(n){Ie(t,t.return,n)}}function Vp(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new xf),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new xf),t;default:throw Error(d(435,e.tag))}}function Yo(e,t){var n=Vp(e);t.forEach(function(l){if(!n.has(l)){n.add(l);var a=Ip.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,f=r;e:for(;f!==null;){switch(f.tag){case 27:if(wl(f.type)){dt=f.stateNode,Xt=!1;break e}break;case 5:dt=f.stateNode,Xt=!1;break e;case 3:case 4:dt=f.stateNode.containerInfo,Xt=!0;break e}f=f.return}if(dt===null)throw Error(d(160));wf(i,r,a),dt=null,Xt=!1,i=a.alternate,i!==null&&(i.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Tf(t,e),t=t.sibling}var Cn=null;function Tf(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&&(gl(3,e,e.return),Ci(3,e),gl(5,e,e.return));break;case 1:Qt(t,e),Zt(e),l&512&&(Ct||n===null||En(n,n.return)),l&64&&Fn&&(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=Cn;if(Qt(t,e),Zt(e),l&512&&(Ct||n===null||En(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[Hl]||i[ut]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=a.createElement(l),a.head.insertBefore(i,a.querySelector("head > title"))),Dt(i,l,n),i[ut]=e,fe(i),l=i;break e;case"link":var r=T0("link","href",a).get(l+(n.href||""));if(r){for(var f=0;f<r.length;f++)if(i=r[f],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(f,1);break t}}i=a.createElement(l),Dt(i,l,n),a.head.appendChild(i);break;case"meta":if(r=T0("meta","content",a).get(l+(n.content||""))){for(f=0;f<r.length;f++)if(i=r[f],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(f,1);break t}}i=a.createElement(l),Dt(i,l,n),a.head.appendChild(i);break;default:throw Error(d(468,l))}i[ut]=e,fe(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&&$c(e,e.memoizedProps,n.memoizedProps)}break;case 27:Qt(t,e),Zt(e),l&512&&(Ct||n===null||En(n,n.return)),n!==null&&l&4&&$c(e,e.memoizedProps,n.memoizedProps);break;case 5:if(Qt(t,e),Zt(e),l&512&&(Ct||n===null||En(n,n.return)),e.flags&32){a=e.stateNode;try{ra(a,"")}catch(ue){Ie(e,e.return,ue)}}l&4&&e.stateNode!=null&&(a=e.memoizedProps,$c(e,a,n!==null?n.memoizedProps:a)),l&1024&&(Pc=!0);break;case 6:if(Qt(t,e),Zt(e),l&4){if(e.stateNode===null)throw Error(d(162));l=e.memoizedProps,n=e.stateNode;try{n.nodeValue=l}catch(ue){Ie(e,e.return,ue)}}break;case 3:if(lr=null,a=Cn,Cn=tr(t.containerInfo),Qt(t,e),Cn=a,Zt(e),l&4&&n!==null&&n.memoizedState.isDehydrated)try{Na(t.containerInfo)}catch(ue){Ie(e,e.return,ue)}Pc&&(Pc=!1,Af(e));break;case 4:l=Cn,Cn=tr(e.stateNode.containerInfo),Qt(t,e),Zt(e),Cn=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,Yo(e,l)));break;case 13:Qt(t,e),Zt(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Vo=Ut()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Yo(e,l)));break;case 22:a=e.memoizedState!==null;var m=n!==null&&n.memoizedState!==null,M=Fn,O=Ct;if(Fn=M||a,Ct=O||m,Qt(t,e),Ct=O,Fn=M,Zt(e),l&8192)e:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||m||Fn||Ct||Wl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){m=n=t;try{if(i=m.stateNode,a)r=i.style,typeof r.setProperty=="function"?r.setProperty("display","none","important"):r.display="none";else{f=m.stateNode;var j=m.memoizedProps.style,T=j!=null&&j.hasOwnProperty("display")?j.display:null;f.style.display=T==null||typeof T=="boolean"?"":(""+T).trim()}}catch(ue){Ie(m,m.return,ue)}}}else if(t.tag===6){if(n===null){m=t;try{m.stateNode.nodeValue=a?"":m.memoizedProps}catch(ue){Ie(m,m.return,ue)}}}else if(t.tag===18){if(n===null){m=t;try{var k=m.stateNode;a?g0(k,!0):g0(m.stateNode,!1)}catch(ue){Ie(m,m.return,ue)}}}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,Yo(e,n))));break;case 19:Qt(t,e),Zt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Yo(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(vf(l)){n=l;break}l=l.return}if(n==null)throw Error(d(160));switch(n.tag){case 27:var a=n.stateNode,i=Wc(e);qo(e,i,a);break;case 5:var r=n.stateNode;n.flags&32&&(ra(r,""),n.flags&=-33);var f=Wc(e);qo(e,f,r);break;case 3:case 4:var m=n.stateNode.containerInfo,M=Wc(e);Ic(e,M,m);break;default:throw Error(d(161))}}catch(O){Ie(e,e.return,O)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Af(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Af(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Wn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Sf(e,t.alternate,t),t=t.sibling}function Wl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:gl(4,t,t.return),Wl(t);break;case 1:En(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&gf(t,t.return,n),Wl(t);break;case 27:_i(t.stateNode);case 26:case 5:En(t,t.return),Wl(t);break;case 22:t.memoizedState===null&&Wl(t);break;case 30:Wl(t);break;default:Wl(t)}e=e.sibling}}function In(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:In(a,i,n),Ci(4,i);break;case 1:if(In(a,i,n),l=i,a=l.stateNode,typeof a.componentDidMount=="function")try{a.componentDidMount()}catch(M){Ie(l,l.return,M)}if(l=i,a=l.updateQueue,a!==null){var f=l.stateNode;try{var m=a.shared.hiddenCallbacks;if(m!==null)for(a.shared.hiddenCallbacks=null,a=0;a<m.length;a++)ld(m[a],f)}catch(M){Ie(l,l.return,M)}}n&&r&64&&mf(i),wi(i,i.return);break;case 27:bf(i);case 26:case 5:In(a,i,n),n&&l===null&&r&4&&yf(i),wi(i,i.return);break;case 12:In(a,i,n);break;case 31:In(a,i,n),n&&r&4&&zf(a,i);break;case 13:In(a,i,n),n&&r&4&&Mf(a,i);break;case 22:i.memoizedState===null&&In(a,i,n),wi(i,i.return);break;case 30:break;default:In(a,i,n)}t=t.sibling}}function es(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&&si(n))}function ts(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&si(e))}function wn(e,t,n,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Ef(e,t,n,l),t=t.sibling}function Ef(e,t,n,l){var a=t.flags;switch(t.tag){case 0:case 11:case 15:wn(e,t,n,l),a&2048&&Ci(9,t);break;case 1:wn(e,t,n,l);break;case 3:wn(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&&si(e)));break;case 12:if(a&2048){wn(e,t,n,l),e=t.stateNode;try{var i=t.memoizedProps,r=i.id,f=i.onPostCommit;typeof f=="function"&&f(r,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(m){Ie(t,t.return,m)}}else wn(e,t,n,l);break;case 31:wn(e,t,n,l);break;case 13:wn(e,t,n,l);break;case 23:break;case 22:i=t.stateNode,r=t.alternate,t.memoizedState!==null?i._visibility&2?wn(e,t,n,l):zi(e,t):i._visibility&2?wn(e,t,n,l):(i._visibility|=2,Aa(e,t,n,l,(t.subtreeFlags&10256)!==0||!1)),a&2048&&es(r,t);break;case 24:wn(e,t,n,l),a&2048&&ts(t.alternate,t);break;default:wn(e,t,n,l)}}function Aa(e,t,n,l,a){for(a=a&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var i=e,r=t,f=n,m=l,M=r.flags;switch(r.tag){case 0:case 11:case 15:Aa(i,r,f,m,a),Ci(8,r);break;case 23:break;case 22:var O=r.stateNode;r.memoizedState!==null?O._visibility&2?Aa(i,r,f,m,a):zi(i,r):(O._visibility|=2,Aa(i,r,f,m,a)),a&&M&2048&&es(r.alternate,r);break;case 24:Aa(i,r,f,m,a),a&&M&2048&&ts(r.alternate,r);break;default:Aa(i,r,f,m,a)}t=t.sibling}}function zi(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:zi(n,l),a&2048&&es(l.alternate,l);break;case 24:zi(n,l),a&2048&&ts(l.alternate,l);break;default:zi(n,l)}t=t.sibling}}var Mi=8192;function Ea(e,t,n){if(e.subtreeFlags&Mi)for(e=e.child;e!==null;)kf(e,t,n),e=e.sibling}function kf(e,t,n){switch(e.tag){case 26:Ea(e,t,n),e.flags&Mi&&e.memoizedState!==null&&km(n,Cn,e.memoizedState,e.memoizedProps);break;case 5:Ea(e,t,n);break;case 3:case 4:var l=Cn;Cn=tr(e.stateNode.containerInfo),Ea(e,t,n),Cn=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=Mi,Mi=16777216,Ea(e,t,n),Mi=l):Ea(e,t,n));break;default:Ea(e,t,n)}}function Df(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 Ti(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];Mt=l,_f(l,e)}Df(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Rf(e),e=e.sibling}function Rf(e){switch(e.tag){case 0:case 11:case 15:Ti(e),e.flags&2048&&gl(9,e,e.return);break;case 3:Ti(e);break;case 12:Ti(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Go(e)):Ti(e);break;default:Ti(e)}}function Go(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];Mt=l,_f(l,e)}Df(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:gl(8,t,t.return),Go(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Go(t));break;default:Go(t)}e=e.sibling}}function _f(e,t){for(;Mt!==null;){var n=Mt;switch(n.tag){case 0:case 11:case 15:gl(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:si(n.memoizedState.cache)}if(l=n.child,l!==null)l.return=n,Mt=l;else e:for(n=e;Mt!==null;){l=Mt;var a=l.sibling,i=l.return;if(Cf(l),l===n){Mt=null;break e}if(a!==null){a.return=i,Mt=a;break e}Mt=i}}}var Xp={getCacheForType:function(e){var t=Et(bt),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Et(bt).controller.signal}},Qp=typeof WeakMap=="function"?WeakMap:Map,Ke=0,at=null,Ne=null,qe=0,We=0,nn=null,yl=!1,ka=!1,ns=!1,Pn=0,ht=0,vl=0,Il=0,ls=0,ln=0,Da=0,Ai=null,Kt=null,as=!1,Vo=0,Of=0,Xo=1/0,Qo=null,bl=null,zt=0,xl=null,Ra=null,el=0,is=0,os=null,Lf=null,Ei=0,rs=null;function an(){return(Ke&2)!==0&&qe!==0?qe&-qe:E.T!==null?hs():eo()}function Uf(){if(ln===0)if((qe&536870912)===0||Ge){var e=la;la<<=1,(la&3932160)===0&&(la=262144),ln=e}else ln=536870912;return e=en.current,e!==null&&(e.flags|=32),ln}function Jt(e,t,n){(e===at&&(We===2||We===9)||e.cancelPendingCommit!==null)&&(_a(e,0),Sl(e,qe,ln,!1)),Ul(e,n),((Ke&2)===0||e!==at)&&(e===at&&((Ke&2)===0&&(Il|=n),ht===4&&Sl(e,qe,ln,!1)),kn(e))}function Hf(e,t,n){if((Ke&6)!==0)throw Error(d(327));var l=!n&&(t&127)===0&&(t&e.expiredLanes)===0||Ll(e,t),a=l?Jp(e,t):ss(e,t,!0),i=l;do{if(a===0){ka&&!l&&Sl(e,t,0,!1);break}else{if(n=e.current.alternate,i&&!Zp(n)){a=ss(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 f=e;a=Ai;var m=f.current.memoizedState.isDehydrated;if(m&&(_a(f,r).flags|=256),r=ss(f,r,!1),r!==2){if(ns&&!m){f.errorRecoveryDisabledLanes|=i,Il|=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){_a(e,0),Sl(e,t,0,!0);break}e:{switch(l=e,i=a,i){case 0:case 1:throw Error(d(345));case 4:if((t&4194048)!==t)break;case 6:Sl(l,t,ln,!yl);break e;case 2:Kt=null;break;case 3:case 5:break;default:throw Error(d(329))}if((t&62914560)===t&&(a=Vo+300-Ut(),10<a)){if(Sl(l,t,ln,!yl),aa(l,0,!0)!==0)break e;el=t,l.timeoutHandle=h0(Bf.bind(null,l,n,Kt,Qo,as,t,ln,Il,Da,yl,i,"Throttled",-0,0),a);break e}Bf(l,n,Kt,Qo,as,t,ln,Il,Da,yl,i,null,-0,0)}}break}while(!0);kn(e)}function Bf(e,t,n,l,a,i,r,f,m,M,O,j,T,k){if(e.timeoutHandle=-1,j=t.subtreeFlags,j&8192||(j&16785408)===16785408){j={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:jn},kf(t,i,j);var ue=(i&62914560)===i?Vo-Ut():(i&4194048)===i?Of-Ut():0;if(ue=Dm(j,ue),ue!==null){el=i,e.cancelPendingCommit=ue(Qf.bind(null,e,t,i,n,l,a,r,f,m,O,j,null,T,k)),Sl(e,i,r,!M);return}}Qf(e,t,i,n,l,a,r,f,m)}function Zp(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(!It(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 Sl(e,t,n,l){t&=~ls,t&=~Il,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var a=t;0<a;){var i=31-qt(a),r=1<<i;l[i]=-1,a&=~r}n!==0&&Ii(e,n,t)}function Zo(){return(Ke&6)===0?(ki(0),!1):!0}function cs(){if(Ne!==null){if(We===0)var e=Ne.return;else e=Ne,Vn=Vl=null,zc(e),Ca=null,di=0,e=Ne;for(;e!==null;)pf(e.alternate,e),e=e.return;Ne=null}}function _a(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,fm(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),el=0,cs(),at=e,Ne=n=Yn(e.current,null),qe=t,We=0,nn=null,yl=!1,ka=Ll(e,t),ns=!1,Da=ln=ls=Il=vl=ht=0,Kt=Ai=null,as=!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-qt(l),i=1<<a;t|=e[a],l&=~i}return Pn=t,ho(),n}function Nf(e,t){Ue=null,E.H=bi,t===Sa||t===So?(t=Pu(),We=3):t===fc?(t=Pu(),We=4):We=t===qc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,nn=t,Ne===null&&(ht=1,Uo(e,fn(t,e.current)))}function jf(){var e=en.current;return e===null?!0:(qe&4194048)===qe?gn===null:(qe&62914560)===qe||(qe&536870912)!==0?e===gn:!1}function qf(){var e=E.H;return E.H=bi,e===null?bi:e}function Yf(){var e=E.A;return E.A=Xp,e}function Ko(){ht=4,yl||(qe&4194048)!==qe&&en.current!==null||(ka=!0),(vl&134217727)===0&&(Il&134217727)===0||at===null||Sl(at,qe,ln,!1)}function ss(e,t,n){var l=Ke;Ke|=2;var a=qf(),i=Yf();(at!==e||qe!==t)&&(Qo=null,_a(e,t)),t=!1;var r=ht;e:do try{if(We!==0&&Ne!==null){var f=Ne,m=nn;switch(We){case 8:cs(),r=6;break e;case 3:case 2:case 9:case 6:en.current===null&&(t=!0);var M=We;if(We=0,nn=null,Oa(e,f,m,M),n&&ka){r=0;break e}break;default:M=We,We=0,nn=null,Oa(e,f,m,M)}}Kp(),r=ht;break}catch(O){Nf(e,O)}while(!0);return t&&e.shellSuspendCounter++,Vn=Vl=null,Ke=l,E.H=a,E.A=i,Ne===null&&(at=null,qe=0,ho()),r}function Kp(){for(;Ne!==null;)Gf(Ne)}function Jp(e,t){var n=Ke;Ke|=2;var l=qf(),a=Yf();at!==e||qe!==t?(Qo=null,Xo=Ut()+500,_a(e,t)):ka=Ll(e,t);e:do try{if(We!==0&&Ne!==null){t=Ne;var i=nn;t:switch(We){case 1:We=0,nn=null,Oa(e,t,i,1);break;case 2:case 9:if(Wu(i)){We=0,nn=null,Vf(t);break}t=function(){We!==2&&We!==9||at!==e||(We=7),kn(e)},i.then(t,t);break e;case 3:We=7;break e;case 4:We=5;break e;case 7:Wu(i)?(We=0,nn=null,Vf(t)):(We=0,nn=null,Oa(e,t,i,7));break;case 5:var r=null;switch(Ne.tag){case 26:r=Ne.memoizedState;case 5:case 27:var f=Ne;if(r?E0(r):f.stateNode.complete){We=0,nn=null;var m=f.sibling;if(m!==null)Ne=m;else{var M=f.return;M!==null?(Ne=M,Jo(M)):Ne=null}break t}}We=0,nn=null,Oa(e,t,i,5);break;case 6:We=0,nn=null,Oa(e,t,i,6);break;case 8:cs(),ht=6;break e;default:throw Error(d(462))}}Fp();break}catch(O){Nf(e,O)}while(!0);return Vn=Vl=null,E.H=l,E.A=a,Ke=n,Ne!==null?0:(at=null,qe=0,ho(),ht)}function Fp(){for(;Ne!==null&&!Va();)Gf(Ne)}function Gf(e){var t=ff(e.alternate,e,Pn);e.memoizedProps=e.pendingProps,t===null?Jo(e):Ne=t}function Vf(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=of(n,t,t.pendingProps,t.type,void 0,qe);break;case 11:t=of(n,t,t.pendingProps,t.type.render,t.ref,qe);break;case 5:zc(t);default:pf(n,t),t=Ne=qu(t,Pn),t=ff(n,t,Pn)}e.memoizedProps=e.pendingProps,t===null?Jo(e):Ne=t}function Oa(e,t,n,l){Vn=Vl=null,zc(t),Ca=null,di=0;var a=t.return;try{if(Bp(e,a,t,n,qe)){ht=1,Uo(e,fn(n,e.current)),Ne=null;return}}catch(i){if(a!==null)throw Ne=a,i;ht=1,Uo(e,fn(n,e.current)),Ne=null;return}t.flags&32768?(Ge||l===1?e=!0:ka||(qe&536870912)!==0?e=!1:(yl=e=!0,(l===2||l===9||l===3||l===6)&&(l=en.current,l!==null&&l.tag===13&&(l.flags|=16384))),Xf(t,e)):Jo(t)}function Jo(e){var t=e;do{if((t.flags&32768)!==0){Xf(t,yl);return}e=t.return;var n=qp(t.alternate,t,Pn);if(n!==null){Ne=n;return}if(t=t.sibling,t!==null){Ne=t;return}Ne=t=e}while(t!==null);ht===0&&(ht=5)}function Xf(e,t){do{var n=Yp(e.alternate,e);if(n!==null){n.flags&=32767,Ne=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Ne=e;return}Ne=e=n}while(e!==null);ht=6,Ne=null}function Qf(e,t,n,l,a,i,r,f,m){e.cancelPendingCommit=null;do Fo();while(zt!==0);if((Ke&6)!==0)throw Error(d(327));if(t!==null){if(t===e.current)throw Error(d(177));if(i=t.lanes|t.childLanes,i|=Wr,kr(e,n,i,r,f,m),e===at&&(Ne=at=null,qe=0),Ra=t,xl=e,el=n,is=i,os=a,Lf=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Pp(ll,function(){return $f(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=E.T,E.T=null,a=B.p,B.p=2,r=Ke,Ke|=4;try{Gp(e,t,n)}finally{Ke=r,B.p=a,E.T=l}}zt=1,Zf(),Kf(),Jf()}}function Zf(){if(zt===1){zt=0;var e=xl,t=Ra,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=E.T,E.T=null;var l=B.p;B.p=2;var a=Ke;Ke|=4;try{Tf(t,e);var i=Ss,r=Ru(e.containerInfo),f=i.focusedElem,m=i.selectionRange;if(r!==f&&f&&f.ownerDocument&&Du(f.ownerDocument.documentElement,f)){if(m!==null&&Zr(f)){var M=m.start,O=m.end;if(O===void 0&&(O=M),"selectionStart"in f)f.selectionStart=M,f.selectionEnd=Math.min(O,f.value.length);else{var j=f.ownerDocument||document,T=j&&j.defaultView||window;if(T.getSelection){var k=T.getSelection(),ue=f.textContent.length,we=Math.min(m.start,ue),tt=m.end===void 0?we:Math.min(m.end,ue);!k.extend&&we>tt&&(r=tt,tt=we,we=r);var w=ku(f,we),S=ku(f,tt);if(w&&S&&(k.rangeCount!==1||k.anchorNode!==w.node||k.anchorOffset!==w.offset||k.focusNode!==S.node||k.focusOffset!==S.offset)){var z=j.createRange();z.setStart(w.node,w.offset),k.removeAllRanges(),we>tt?(k.addRange(z),k.extend(S.node,S.offset)):(z.setEnd(S.node,S.offset),k.addRange(z))}}}}for(j=[],k=f;k=k.parentNode;)k.nodeType===1&&j.push({element:k,left:k.scrollLeft,top:k.scrollTop});for(typeof f.focus=="function"&&f.focus(),f=0;f<j.length;f++){var H=j[f];H.element.scrollLeft=H.left,H.element.scrollTop=H.top}}rr=!!xs,Ss=xs=null}finally{Ke=a,B.p=l,E.T=n}}e.current=t,zt=2}}function Kf(){if(zt===2){zt=0;var e=xl,t=Ra,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=E.T,E.T=null;var l=B.p;B.p=2;var a=Ke;Ke|=4;try{Sf(e,t.alternate,t)}finally{Ke=a,B.p=l,E.T=n}}zt=3}}function Jf(){if(zt===4||zt===3){zt=0,ta();var e=xl,t=Ra,n=el,l=Lf;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?zt=5:(zt=0,Ra=xl=null,Ff(e,e.pendingLanes));var a=e.pendingLanes;if(a===0&&(bl=null),Ja(n),t=t.stateNode,jt&&typeof jt.onCommitFiberRoot=="function")try{jt.onCommitFiberRoot(Ln,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=E.T,a=B.p,B.p=2,E.T=null;try{for(var i=e.onRecoverableError,r=0;r<l.length;r++){var f=l[r];i(f.value,{componentStack:f.stack})}}finally{E.T=t,B.p=a}}(el&3)!==0&&Fo(),kn(e),a=e.pendingLanes,(n&261930)!==0&&(a&42)!==0?e===rs?Ei++:(Ei=0,rs=e):Ei=0,ki(0)}}function Ff(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,si(t)))}function Fo(){return Zf(),Kf(),Jf(),$f()}function $f(){if(zt!==5)return!1;var e=xl,t=is;is=0;var n=Ja(el),l=E.T,a=B.p;try{B.p=32>n?32:n,E.T=null,n=os,os=null;var i=xl,r=el;if(zt=0,Ra=xl=null,el=0,(Ke&6)!==0)throw Error(d(331));var f=Ke;if(Ke|=4,Rf(i.current),Ef(i,i.current,r,n),Ke=f,ki(0,!1),jt&&typeof jt.onPostCommitFiberRoot=="function")try{jt.onPostCommitFiberRoot(Ln,i)}catch{}return!0}finally{B.p=a,E.T=l,Ff(e,t)}}function Wf(e,t,n){t=fn(n,t),t=jc(e.stateNode,t,2),e=hl(e,t,2),e!==null&&(Ul(e,2),kn(e))}function Ie(e,t,n){if(e.tag===3)Wf(e,e,n);else for(;t!==null;){if(t.tag===3){Wf(t,e,n);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(bl===null||!bl.has(l))){e=fn(n,e),n=Wd(2),l=hl(t,n,2),l!==null&&(Id(n,l,t,e),Ul(l,2),kn(l));break}}t=t.return}}function us(e,t,n){var l=e.pingCache;if(l===null){l=e.pingCache=new Qp;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)||(ns=!0,a.add(n),e=$p.bind(null,e,t,n),t.then(e,e))}function $p(e,t,n){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,at===e&&(qe&n)===n&&(ht===4||ht===3&&(qe&62914560)===qe&&300>Ut()-Vo?(Ke&2)===0&&_a(e,0):ls|=n,Da===qe&&(Da=0)),kn(e)}function If(e,t){t===0&&(t=Wi()),e=ql(e,t),e!==null&&(Ul(e,t),kn(e))}function Wp(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),If(e,n)}function Ip(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(d(314))}l!==null&&l.delete(t),If(e,n)}function Pp(e,t){return Dl(e,t)}var $o=null,La=null,ds=!1,Wo=!1,fs=!1,Cl=0;function kn(e){e!==La&&e.next===null&&(La===null?$o=La=e:La=La.next=e),Wo=!0,ds||(ds=!0,tm())}function ki(e,t){if(!fs&&Wo){fs=!0;do for(var n=!1,l=$o;l!==null;){if(e!==0){var a=l.pendingLanes;if(a===0)var i=0;else{var r=l.suspendedLanes,f=l.pingedLanes;i=(1<<31-qt(42|e)+1)-1,i&=a&~(r&~f),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(n=!0,n0(l,i))}else i=qe,i=aa(l,l===at?i:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(i&3)===0||Ll(l,i)||(n=!0,n0(l,i));l=l.next}while(n);fs=!1}}function em(){Pf()}function Pf(){Wo=ds=!1;var e=0;Cl!==0&&dm()&&(e=Cl);for(var t=Ut(),n=null,l=$o;l!==null;){var a=l.next,i=e0(l,t);i===0?(l.next=null,n===null?$o=a:n.next=a,a===null&&(La=n)):(n=l,(e!==0||(i&3)!==0)&&(Wo=!0)),l=a}zt!==0&&zt!==5||ki(e),Cl!==0&&(Cl=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-qt(i),f=1<<r,m=a[r];m===-1?((f&n)===0||(f&l)!==0)&&(a[r]=Er(f,t)):m<=t&&(e.expiredLanes|=f),i&=~f}if(t=at,n=qe,n=aa(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,n===0||e===t&&(We===2||We===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&cn(l),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||Ll(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(l!==null&&cn(l),Ja(n)){case 2:case 8:n=Rl;break;case 32:n=ll;break;case 268435456:n=vt;break;default:n=ll}return l=t0.bind(null,e),n=Dl(n,l),e.callbackPriority=t,e.callbackNode=n,t}return l!==null&&l!==null&&cn(l),e.callbackPriority=2,e.callbackNode=null,2}function t0(e,t){if(zt!==0&&zt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Fo()&&e.callbackNode!==n)return null;var l=qe;return l=aa(e,e===at?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(Hf(e,l,t),e0(e,Ut()),e.callbackNode!=null&&e.callbackNode===n?t0.bind(null,e):null)}function n0(e,t){if(Fo())return null;Hf(e,t,!0)}function tm(){hm(function(){(Ke&6)!==0?Dl(Xa,em):Pf()})}function hs(){if(Cl===0){var e=ba;e===0&&(e=na,na<<=1,(na&261888)===0&&(na=256)),Cl=e}return Cl}function l0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ao(""+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 nm(e,t,n,l,a){if(t==="submit"&&n&&n.stateNode===a){var i=l0((a[mt]||null).action),r=l.submitter;r&&(t=(t=r[mt]||null)?l0(t.formAction):r.getAttribute("formAction"),t!==null&&(i=t,r=null));var f=new co("action","action",null,l,a);e.push({event:f,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Cl!==0){var m=r?a0(a,r):new FormData(a);Oc(n,{pending:!0,data:m,method:a.method,action:i},null,m)}}else typeof i=="function"&&(f.preventDefault(),m=r?a0(a,r):new FormData(a),Oc(n,{pending:!0,data:m,method:a.method,action:i},i,m))},currentTarget:a}]})}}for(var ps=0;ps<$r.length;ps++){var ms=$r[ps],lm=ms.toLowerCase(),am=ms[0].toUpperCase()+ms.slice(1);Sn(lm,"on"+am)}Sn(Lu,"onAnimationEnd"),Sn(Uu,"onAnimationIteration"),Sn(Hu,"onAnimationStart"),Sn("dblclick","onDoubleClick"),Sn("focusin","onFocus"),Sn("focusout","onBlur"),Sn(xp,"onTransitionRun"),Sn(Sp,"onTransitionStart"),Sn(Cp,"onTransitionCancel"),Sn(Bu,"onTransitionEnd"),Xe("onMouseEnter",["mouseout","mouseover"]),Xe("onMouseLeave",["mouseout","mouseover"]),Xe("onPointerEnter",["pointerout","pointerover"]),Xe("onPointerLeave",["pointerout","pointerover"]),Ve("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ve("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ve("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ve("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ve("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ve("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Di="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(" "),im=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Di));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 f=l[r],m=f.instance,M=f.currentTarget;if(f=f.listener,m!==i&&a.isPropagationStopped())break e;i=f,a.currentTarget=M;try{i(a)}catch(O){fo(O)}a.currentTarget=null,i=m}else for(r=0;r<l.length;r++){if(f=l[r],m=f.instance,M=f.currentTarget,f=f.listener,m!==i&&a.isPropagationStopped())break e;i=f,a.currentTarget=M;try{i(a)}catch(O){fo(O)}a.currentTarget=null,i=m}}}}function je(e,t){var n=t[ia];n===void 0&&(n=t[ia]=new Set);var l=e+"__bubble";n.has(l)||(o0(t,e,2,!1),n.add(l))}function gs(e,t,n){var l=0;t&&(l|=4),o0(n,e,l,t)}var Io="_reactListening"+Math.random().toString(36).slice(2);function ys(e){if(!e[Io]){e[Io]=!0,Me.forEach(function(n){n!=="selectionchange"&&(im.has(n)||gs(n,!1,e),gs(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Io]||(t[Io]=!0,gs("selectionchange",!1,t))}}function o0(e,t,n,l){switch(U0(t)){case 2:var a=Om;break;case 8:a=Lm;break;default:a=_s}n=a.bind(null,t,n,e),a=void 0,!Br||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 vs(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 f=l.stateNode.containerInfo;if(f===a)break;if(r===4)for(r=l.return;r!==null;){var m=r.tag;if((m===3||m===4)&&r.stateNode.containerInfo===a)return;r=r.return}for(;f!==null;){if(r=Bn(f),r===null)return;if(m=r.tag,m===5||m===6||m===26||m===27){l=i=r;continue e}f=f.parentNode}}l=l.return}uu(function(){var M=i,O=Ur(n),j=[];e:{var T=Nu.get(e);if(T!==void 0){var k=co,ue=e;switch(e){case"keypress":if(oo(n)===0)break e;case"keydown":case"keyup":k=Ih;break;case"focusin":ue="focus",k=Yr;break;case"focusout":ue="blur",k=Yr;break;case"beforeblur":case"afterblur":k=Yr;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":k=hu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":k=qh;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":k=tp;break;case Lu:case Uu:case Hu:k=Vh;break;case Bu:k=lp;break;case"scroll":case"scrollend":k=Nh;break;case"wheel":k=ip;break;case"copy":case"cut":case"paste":k=Qh;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":k=mu;break;case"toggle":case"beforetoggle":k=rp}var we=(t&4)!==0,tt=!we&&(e==="scroll"||e==="scrollend"),w=we?T!==null?T+"Capture":null:T;we=[];for(var S=M,z;S!==null;){var H=S;if(z=H.stateNode,H=H.tag,H!==5&&H!==26&&H!==27||z===null||w===null||(H=Ia(S,w),H!=null&&we.push(Ri(S,H,z))),tt)break;S=S.return}0<we.length&&(T=new k(T,ue,null,n,O),j.push({event:T,listeners:we}))}}if((t&7)===0){e:{if(T=e==="mouseover"||e==="pointerover",k=e==="mouseout"||e==="pointerout",T&&n!==Lr&&(ue=n.relatedTarget||n.fromElement)&&(Bn(ue)||ue[Wt]))break e;if((k||T)&&(T=O.window===O?O:(T=O.ownerDocument)?T.defaultView||T.parentWindow:window,k?(ue=n.relatedTarget||n.toElement,k=M,ue=ue?Bn(ue):null,ue!==null&&(tt=y(ue),we=ue.tag,ue!==tt||we!==5&&we!==27&&we!==6)&&(ue=null)):(k=null,ue=M),k!==ue)){if(we=hu,H="onMouseLeave",w="onMouseEnter",S="mouse",(e==="pointerout"||e==="pointerover")&&(we=mu,H="onPointerLeave",w="onPointerEnter",S="pointer"),tt=k==null?T:$(k),z=ue==null?T:$(ue),T=new we(H,S+"leave",k,n,O),T.target=tt,T.relatedTarget=z,H=null,Bn(O)===M&&(we=new we(w,S+"enter",ue,n,O),we.target=z,we.relatedTarget=tt,H=we),tt=H,k&&ue)t:{for(we=om,w=k,S=ue,z=0,H=w;H;H=we(H))z++;H=0;for(var Se=S;Se;Se=we(Se))H++;for(;0<z-H;)w=we(w),z--;for(;0<H-z;)S=we(S),H--;for(;z--;){if(w===S||S!==null&&w===S.alternate){we=w;break t}w=we(w),S=we(S)}we=null}else we=null;k!==null&&r0(j,T,k,we,!1),ue!==null&&tt!==null&&r0(j,tt,ue,we,!0)}}e:{if(T=M?$(M):window,k=T.nodeName&&T.nodeName.toLowerCase(),k==="select"||k==="input"&&T.type==="file")var Qe=wu;else if(Su(T))if(zu)Qe=yp;else{Qe=mp;var ge=pp}else k=T.nodeName,!k||k.toLowerCase()!=="input"||T.type!=="checkbox"&&T.type!=="radio"?M&&Or(M.elementType)&&(Qe=wu):Qe=gp;if(Qe&&(Qe=Qe(e,M))){Cu(j,Qe,n,O);break e}ge&&ge(e,T,M),e==="focusout"&&M&&T.type==="number"&&M.memoizedProps.value!=null&&_r(T,"number",T.value)}switch(ge=M?$(M):window,e){case"focusin":(Su(ge)||ge.contentEditable==="true")&&(da=ge,Kr=M,oi=null);break;case"focusout":oi=Kr=da=null;break;case"mousedown":Jr=!0;break;case"contextmenu":case"mouseup":case"dragend":Jr=!1,_u(j,n,O);break;case"selectionchange":if(bp)break;case"keydown":case"keyup":_u(j,n,O)}var He;if(Vr)e:{switch(e){case"compositionstart":var Ye="onCompositionStart";break e;case"compositionend":Ye="onCompositionEnd";break e;case"compositionupdate":Ye="onCompositionUpdate";break e}Ye=void 0}else ua?bu(e,n)&&(Ye="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(Ye="onCompositionStart");Ye&&(gu&&n.locale!=="ko"&&(ua||Ye!=="onCompositionStart"?Ye==="onCompositionEnd"&&ua&&(He=du()):(ol=O,Nr="value"in ol?ol.value:ol.textContent,ua=!0)),ge=Po(M,Ye),0<ge.length&&(Ye=new pu(Ye,e,null,n,O),j.push({event:Ye,listeners:ge}),He?Ye.data=He:(He=xu(n),He!==null&&(Ye.data=He)))),(He=sp?up(e,n):dp(e,n))&&(Ye=Po(M,"onBeforeInput"),0<Ye.length&&(ge=new pu("onBeforeInput","beforeinput",null,n,O),j.push({event:ge,listeners:Ye}),ge.data=He)),nm(j,e,M,n,O)}i0(j,t)})}function Ri(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Po(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=Ia(e,n),a!=null&&l.unshift(Ri(e,a,i)),a=Ia(e,t),a!=null&&l.push(Ri(e,a,i))),e.tag===3)return l;e=e.return}return[]}function om(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 f=n,m=f.alternate,M=f.stateNode;if(f=f.tag,m!==null&&m===l)break;f!==5&&f!==26&&f!==27||M===null||(m=M,a?(M=Ia(n,i),M!=null&&r.unshift(Ri(n,M,m))):a||(M=Ia(n,i),M!=null&&r.push(Ri(n,M,m)))),n=n.return}r.length!==0&&e.push({event:t,listeners:r})}var rm=/\r\n?/g,cm=/\u0000|\uFFFD/g;function c0(e){return(typeof e=="string"?e:""+e).replace(rm,`
|
|
9
|
+
`).replace(cm,"")}function s0(e,t){return t=c0(t),c0(e)===t}function et(e,t,n,l,a,i){switch(n){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||ra(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&ra(e,""+l);break;case"className":no(e,"class",l);break;case"tabIndex":no(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":no(e,n,l);break;case"style":cu(e,l,i);break;case"data":if(t!=="object"){no(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=ao(""+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"&&et(e,t,"name",a.name,a,null),et(e,t,"formEncType",a.formEncType,a,null),et(e,t,"formMethod",a.formMethod,a,null),et(e,t,"formTarget",a.formTarget,a,null)):(et(e,t,"encType",a.encType,a,null),et(e,t,"method",a.method,a,null),et(e,t,"target",a.target,a,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(n);break}l=ao(""+l),e.setAttribute(n,l);break;case"onClick":l!=null&&(e.onclick=jn);break;case"onScroll":l!=null&&je("scroll",e);break;case"onScrollEnd":l!=null&&je("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(d(61));if(n=l.__html,n!=null){if(a.children!=null)throw Error(d(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=ao(""+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":je("beforetoggle",e),je("toggle",e),to(e,"popover",l);break;case"xlinkActuate":Nn(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Nn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Nn(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Nn(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Nn(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Nn(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Nn(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Nn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Nn(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":to(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=Hh.get(n)||n,to(e,n,l))}}function bs(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(d(61));if(n=l.__html,n!=null){if(a.children!=null)throw Error(d(60));e.innerHTML=n}}break;case"children":typeof l=="string"?ra(e,l):(typeof l=="number"||typeof l=="bigint")&&ra(e,""+l);break;case"onScroll":l!=null&&je("scroll",e);break;case"onScrollEnd":l!=null&&je("scrollend",e);break;case"onClick":l!=null&&(e.onclick=jn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ee.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[mt]||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,""):to(e,n,l)}}}function Dt(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":je("error",e),je("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(d(137,t));default:et(e,t,i,r,n,null)}}a&&et(e,t,"srcSet",n.srcSet,n,null),l&&et(e,t,"src",n.src,n,null);return;case"input":je("invalid",e);var f=i=r=a=null,m=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":m=O;break;case"defaultChecked":M=O;break;case"value":i=O;break;case"defaultValue":f=O;break;case"children":case"dangerouslySetInnerHTML":if(O!=null)throw Error(d(137,t));break;default:et(e,t,l,O,n,null)}}au(e,i,f,m,M,r,a,!1);return;case"select":je("invalid",e),l=r=i=null;for(a in n)if(n.hasOwnProperty(a)&&(f=n[a],f!=null))switch(a){case"value":i=f;break;case"defaultValue":r=f;break;case"multiple":l=f;default:et(e,t,a,f,n,null)}t=i,n=r,e.multiple=!!l,t!=null?oa(e,!!l,t,!1):n!=null&&oa(e,!!l,n,!0);return;case"textarea":je("invalid",e),i=a=l=null;for(r in n)if(n.hasOwnProperty(r)&&(f=n[r],f!=null))switch(r){case"value":l=f;break;case"defaultValue":a=f;break;case"children":i=f;break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(d(91));break;default:et(e,t,r,f,n,null)}ou(e,l,a,i);return;case"option":for(m in n)n.hasOwnProperty(m)&&(l=n[m],l!=null)&&(m==="selected"?e.selected=l&&typeof l!="function"&&typeof l!="symbol":et(e,t,m,l,n,null));return;case"dialog":je("beforetoggle",e),je("toggle",e),je("cancel",e),je("close",e);break;case"iframe":case"object":je("load",e);break;case"video":case"audio":for(l=0;l<Di.length;l++)je(Di[l],e);break;case"image":je("error",e),je("load",e);break;case"details":je("toggle",e);break;case"embed":case"source":case"link":je("error",e),je("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(d(137,t));default:et(e,t,M,l,n,null)}return;default:if(Or(t)){for(O in n)n.hasOwnProperty(O)&&(l=n[O],l!==void 0&&bs(e,t,O,l,n,void 0));return}}for(f in n)n.hasOwnProperty(f)&&(l=n[f],l!=null&&et(e,t,f,l,n,null))}function sm(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,f=null,m=null,M=null,O=null;for(k in n){var j=n[k];if(n.hasOwnProperty(k)&&j!=null)switch(k){case"checked":break;case"value":break;case"defaultValue":m=j;default:l.hasOwnProperty(k)||et(e,t,k,null,l,j)}}for(var T in l){var k=l[T];if(j=n[T],l.hasOwnProperty(T)&&(k!=null||j!=null))switch(T){case"type":i=k;break;case"name":a=k;break;case"checked":M=k;break;case"defaultChecked":O=k;break;case"value":r=k;break;case"defaultValue":f=k;break;case"children":case"dangerouslySetInnerHTML":if(k!=null)throw Error(d(137,t));break;default:k!==j&&et(e,t,T,k,l,j)}}Rr(e,r,f,m,M,O,i,a);return;case"select":k=r=f=T=null;for(i in n)if(m=n[i],n.hasOwnProperty(i)&&m!=null)switch(i){case"value":break;case"multiple":k=m;default:l.hasOwnProperty(i)||et(e,t,i,null,l,m)}for(a in l)if(i=l[a],m=n[a],l.hasOwnProperty(a)&&(i!=null||m!=null))switch(a){case"value":T=i;break;case"defaultValue":f=i;break;case"multiple":r=i;default:i!==m&&et(e,t,a,i,l,m)}t=f,n=r,l=k,T!=null?oa(e,!!n,T,!1):!!l!=!!n&&(t!=null?oa(e,!!n,t,!0):oa(e,!!n,n?[]:"",!1));return;case"textarea":k=T=null;for(f in n)if(a=n[f],n.hasOwnProperty(f)&&a!=null&&!l.hasOwnProperty(f))switch(f){case"value":break;case"children":break;default:et(e,t,f,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":T=a;break;case"defaultValue":k=a;break;case"children":break;case"dangerouslySetInnerHTML":if(a!=null)throw Error(d(91));break;default:a!==i&&et(e,t,r,a,l,i)}iu(e,T,k);return;case"option":for(var ue in n)T=n[ue],n.hasOwnProperty(ue)&&T!=null&&!l.hasOwnProperty(ue)&&(ue==="selected"?e.selected=!1:et(e,t,ue,null,l,T));for(m in l)T=l[m],k=n[m],l.hasOwnProperty(m)&&T!==k&&(T!=null||k!=null)&&(m==="selected"?e.selected=T&&typeof T!="function"&&typeof T!="symbol":et(e,t,m,T,l,k));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 we in n)T=n[we],n.hasOwnProperty(we)&&T!=null&&!l.hasOwnProperty(we)&&et(e,t,we,null,l,T);for(M in l)if(T=l[M],k=n[M],l.hasOwnProperty(M)&&T!==k&&(T!=null||k!=null))switch(M){case"children":case"dangerouslySetInnerHTML":if(T!=null)throw Error(d(137,t));break;default:et(e,t,M,T,l,k)}return;default:if(Or(t)){for(var tt in n)T=n[tt],n.hasOwnProperty(tt)&&T!==void 0&&!l.hasOwnProperty(tt)&&bs(e,t,tt,void 0,l,T);for(O in l)T=l[O],k=n[O],!l.hasOwnProperty(O)||T===k||T===void 0&&k===void 0||bs(e,t,O,T,l,k);return}}for(var w in n)T=n[w],n.hasOwnProperty(w)&&T!=null&&!l.hasOwnProperty(w)&&et(e,t,w,null,l,T);for(j in l)T=l[j],k=n[j],!l.hasOwnProperty(j)||T===k||T==null&&k==null||et(e,t,j,T,l,k)}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 um(){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,f=a.duration;if(i&&f&&u0(r)){for(r=0,f=a.responseEnd,l+=1;l<n.length;l++){var m=n[l],M=m.startTime;if(M>f)break;var O=m.transferSize,j=m.initiatorType;O&&u0(j)&&(m=m.responseEnd,r+=O*(m<f?1:(f-M)/(m-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 xs=null,Ss=null;function er(e){return e.nodeType===9?e:e.ownerDocument}function d0(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 f0(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 Cs(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 ws=null;function dm(){var e=window.event;return e&&e.type==="popstate"?e===ws?!1:(ws=e,!0):(ws=null,!1)}var h0=typeof setTimeout=="function"?setTimeout:void 0,fm=typeof clearTimeout=="function"?clearTimeout:void 0,p0=typeof Promise=="function"?Promise:void 0,hm=typeof queueMicrotask=="function"?queueMicrotask:typeof p0<"u"?function(e){return p0.resolve(null).then(e).catch(pm)}:h0;function pm(e){setTimeout(function(){throw e})}function wl(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),Na(t);return}l--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")l++;else if(n==="html")_i(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,_i(n);for(var i=n.firstChild;i;){var r=i.nextSibling,f=i.nodeName;i[Hl]||f==="SCRIPT"||f==="STYLE"||f==="LINK"&&i.rel.toLowerCase()==="stylesheet"||n.removeChild(i),i=r}}else n==="body"&&_i(e.ownerDocument.body);n=a}while(n);Na(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 zs(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":zs(n),$a(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function mm(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[Hl])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=yn(e.nextSibling),e===null)break}return null}function gm(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=yn(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=yn(e.nextSibling),e===null))return null;return e}function Ms(e){return e.data==="$?"||e.data==="$~"}function Ts(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function ym(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 yn(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 As=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 yn(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=er(n),e){case"html":if(e=t.documentElement,!e)throw Error(d(452));return e;case"head":if(e=t.head,!e)throw Error(d(453));return e;case"body":if(e=t.body,!e)throw Error(d(454));return e;default:throw Error(d(451))}}function _i(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);$a(e)}var vn=new Map,S0=new Set;function tr(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var tl=B.d;B.d={f:vm,r:bm,D:xm,C:Sm,L:Cm,m:wm,X:Mm,S:zm,M:Tm};function vm(){var e=tl.f(),t=Zo();return e||t}function bm(e){var t=ie(e);t!==null&&t.tag===5&&t.type==="form"?Bd(t):tl.r(e)}var Ua=typeof document>"u"?null:document;function C0(e,t,n){var l=Ua;if(l&&typeof t=="string"&&t){var a=un(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"),Dt(t,"link",e),fe(t),l.head.appendChild(t)))}}function xm(e){tl.D(e),C0("dns-prefetch",e,null)}function Sm(e,t){tl.C(e,t),C0("preconnect",e,t)}function Cm(e,t,n){tl.L(e,t,n);var l=Ua;if(l&&e&&t){var a='link[rel="preload"][as="'+un(t)+'"]';t==="image"&&n&&n.imageSrcSet?(a+='[imagesrcset="'+un(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(a+='[imagesizes="'+un(n.imageSizes)+'"]')):a+='[href="'+un(e)+'"]';var i=a;switch(t){case"style":i=Ha(e);break;case"script":i=Ba(e)}vn.has(i)||(e=R({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),vn.set(i,e),l.querySelector(a)!==null||t==="style"&&l.querySelector(Oi(i))||t==="script"&&l.querySelector(Li(i))||(t=l.createElement("link"),Dt(t,"link",e),fe(t),l.head.appendChild(t)))}}function wm(e,t){tl.m(e,t);var n=Ua;if(n&&e){var l=t&&typeof t.as=="string"?t.as:"script",a='link[rel="modulepreload"][as="'+un(l)+'"][href="'+un(e)+'"]',i=a;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=Ba(e)}if(!vn.has(i)&&(e=R({rel:"modulepreload",href:e},t),vn.set(i,e),n.querySelector(a)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Li(i)))return}l=n.createElement("link"),Dt(l,"link",e),fe(l),n.head.appendChild(l)}}}function zm(e,t,n){tl.S(e,t,n);var l=Ua;if(l&&e){var a=de(l).hoistableStyles,i=Ha(e);t=t||"default";var r=a.get(i);if(!r){var f={loading:0,preload:null};if(r=l.querySelector(Oi(i)))f.loading=5;else{e=R({rel:"stylesheet",href:e,"data-precedence":t},n),(n=vn.get(i))&&Es(e,n);var m=r=l.createElement("link");fe(m),Dt(m,"link",e),m._p=new Promise(function(M,O){m.onload=M,m.onerror=O}),m.addEventListener("load",function(){f.loading|=1}),m.addEventListener("error",function(){f.loading|=2}),f.loading|=4,nr(r,t,l)}r={type:"stylesheet",instance:r,count:1,state:f},a.set(i,r)}}}function Mm(e,t){tl.X(e,t);var n=Ua;if(n&&e){var l=de(n).hoistableScripts,a=Ba(e),i=l.get(a);i||(i=n.querySelector(Li(a)),i||(e=R({src:e,async:!0},t),(t=vn.get(a))&&ks(e,t),i=n.createElement("script"),fe(i),Dt(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},l.set(a,i))}}function Tm(e,t){tl.M(e,t);var n=Ua;if(n&&e){var l=de(n).hoistableScripts,a=Ba(e),i=l.get(a);i||(i=n.querySelector(Li(a)),i||(e=R({src:e,async:!0,type:"module"},t),(t=vn.get(a))&&ks(e,t),i=n.createElement("script"),fe(i),Dt(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=ke.current)?tr(a):null;if(!a)throw Error(d(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Ha(n.href),n=de(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=Ha(n.href);var i=de(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(Oi(e)))&&!i._p&&(r.instance=i,r.state.loading=5),vn.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},vn.set(e,n),i||Am(a,e,n,r.state))),t&&l===null)throw Error(d(528,""));return r}if(t&&l!==null)throw Error(d(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ba(n),n=de(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(d(444,e))}}function Ha(e){return'href="'+un(e)+'"'}function Oi(e){return'link[rel="stylesheet"]['+e+"]"}function z0(e){return R({},e,{"data-precedence":e.precedence,precedence:null})}function Am(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}),Dt(t,"link",n),fe(t),e.head.appendChild(t))}function Ba(e){return'[src="'+un(e)+'"]'}function Li(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~="'+un(n.href)+'"]');if(l)return t.instance=l,fe(l),l;var a=R({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),fe(l),Dt(l,"style",a),nr(l,n.precedence,e),t.instance=l;case"stylesheet":a=Ha(n.href);var i=e.querySelector(Oi(a));if(i)return t.state.loading|=4,t.instance=i,fe(i),i;l=z0(n),(a=vn.get(a))&&Es(l,a),i=(e.ownerDocument||e).createElement("link"),fe(i);var r=i;return r._p=new Promise(function(f,m){r.onload=f,r.onerror=m}),Dt(i,"link",l),t.state.loading|=4,nr(i,n.precedence,e),t.instance=i;case"script":return i=Ba(n.src),(a=e.querySelector(Li(i)))?(t.instance=a,fe(a),a):(l=n,(a=vn.get(i))&&(l=R({},n),ks(l,a)),e=e.ownerDocument||e,a=e.createElement("script"),fe(a),Dt(a,"link",l),e.head.appendChild(a),t.instance=a);case"void":return null;default:throw Error(d(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,nr(l,n.precedence,e));return t.instance}function nr(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 f=l[r];if(f.dataset.precedence===t)i=f;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 Es(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function ks(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var lr=null;function T0(e,t,n){if(lr===null){var l=new Map,a=lr=new Map;a.set(n,l)}else a=lr,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[Hl]||i[ut]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var r=i.getAttribute(t)||"";r=e+r;var f=l.get(r);f?f.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 Em(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 km(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=Ha(l.href),i=t.querySelector(Oi(a));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=ar.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=i,fe(i);return}i=t.ownerDocument||t,l=z0(l),(a=vn.get(a))&&Es(l,a),i=i.createElement("link"),fe(i);var r=i;r._p=new Promise(function(f,m){r.onload=f,r.onerror=m}),Dt(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=ar.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Ds=0;function Dm(e,t){return e.stylesheets&&e.count===0&&or(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var l=setTimeout(function(){if(e.stylesheets&&or(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&Ds===0&&(Ds=62500*um());var a=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&or(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>Ds?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(a)}}:null}function ar(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)or(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ir=null;function or(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ir=new Map,t.forEach(Rm,e),ir=null,ar.call(e))}function Rm(e,t){if(!(t.state.loading&4)){var n=ir.get(e);if(n)var l=n.get(null);else{n=new Map,ir.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=ar.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 Ui={$$typeof:W,Provider:null,Consumer:null,_currentValue:oe,_currentValue2:oe,_threadCount:0};function _m(e,t,n,l,a,i,r,f,m){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=Za(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Za(0),this.hiddenUpdates=Za(null),this.identifierPrefix=l,this.onUncaughtError=a,this.onCaughtError=i,this.onRecoverableError=r,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=m,this.incompleteTransitions=new Map}function k0(e,t,n,l,a,i,r,f,m,M,O,j){return e=new _m(e,t,n,r,m,M,O,j,f),t=1,i===!0&&(t|=24),i=Pt(3,null,null,t),e.current=i,i.stateNode=e,t=sc(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:l,isDehydrated:n,cache:t},hc(i),e}function D0(e){return e?(e=pa,e):pa}function R0(e,t,n,l,a,i){a=D0(a),l.context===null?l.context=a:l.pendingContext=a,l=fl(t),l.payload={element:n},i=i===void 0?null:i,i!==null&&(l.callback=i),n=hl(e,l,t),n!==null&&(Jt(n,e,t),hi(n,e,t))}function _0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Rs(e,t){_0(e,t),(e=e.alternate)&&_0(e,t)}function O0(e){if(e.tag===13||e.tag===31){var t=ql(e,67108864);t!==null&&Jt(t,e,67108864),Rs(e,67108864)}}function L0(e){if(e.tag===13||e.tag===31){var t=an();t=Hn(t);var n=ql(e,t);n!==null&&Jt(n,e,t),Rs(e,t)}}var rr=!0;function Om(e,t,n,l){var a=E.T;E.T=null;var i=B.p;try{B.p=2,_s(e,t,n,l)}finally{B.p=i,E.T=a}}function Lm(e,t,n,l){var a=E.T;E.T=null;var i=B.p;try{B.p=8,_s(e,t,n,l)}finally{B.p=i,E.T=a}}function _s(e,t,n,l){if(rr){var a=Os(l);if(a===null)vs(e,t,l,cr,n),H0(e,l);else if(Hm(a,e,t,n,l))l.stopPropagation();else if(H0(e,l),t&4&&-1<Um.indexOf(e)){for(;a!==null;){var i=ie(a);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var r=Un(i.pendingLanes);if(r!==0){var f=i;for(f.pendingLanes|=2,f.entangledLanes|=2;r;){var m=1<<31-qt(r);f.entanglements[1]|=m,r&=~m}kn(i),(Ke&6)===0&&(Xo=Ut()+500,ki(0))}}break;case 31:case 13:f=ql(i,2),f!==null&&Jt(f,i,2),Zo(),Rs(i,2)}if(i=Os(l),i===null&&vs(e,t,l,cr,n),i===a)break;a=i}a!==null&&l.stopPropagation()}else vs(e,t,l,null,n)}}function Os(e){return e=Ur(e),Ls(e)}var cr=null;function Ls(e){if(cr=null,e=Bn(e),e!==null){var t=y(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=A(t),e!==null)return e;e=null}else if(n===31){if(e=U(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 cr=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(nl()){case Xa:return 2;case Rl:return 8;case ll:case Qa:return 32;case vt:return 268435456;default:return 32}default:return 32}}var Us=!1,zl=null,Ml=null,Tl=null,Hi=new Map,Bi=new Map,Al=[],Um="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 H0(e,t){switch(e){case"focusin":case"focusout":zl=null;break;case"dragenter":case"dragleave":Ml=null;break;case"mouseover":case"mouseout":Tl=null;break;case"pointerover":case"pointerout":Hi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Bi.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=ie(t),t!==null&&O0(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function Hm(e,t,n,l,a){switch(t){case"focusin":return zl=Ni(zl,e,t,n,l,a),!0;case"dragenter":return Ml=Ni(Ml,e,t,n,l,a),!0;case"mouseover":return Tl=Ni(Tl,e,t,n,l,a),!0;case"pointerover":var i=a.pointerId;return Hi.set(i,Ni(Hi.get(i)||null,e,t,n,l,a)),!0;case"gotpointercapture":return i=a.pointerId,Bi.set(i,Ni(Bi.get(i)||null,e,t,n,l,a)),!0}return!1}function B0(e){var t=Bn(e.target);if(t!==null){var n=y(t);if(n!==null){if(t=n.tag,t===13){if(t=A(n),t!==null){e.blockedOn=t,xn(e.priority,function(){L0(n)});return}}else if(t===31){if(t=U(n),t!==null){e.blockedOn=t,xn(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 sr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Os(e.nativeEvent);if(n===null){n=e.nativeEvent;var l=new n.constructor(n.type,n);Lr=l,n.target.dispatchEvent(l),Lr=null}else return t=ie(n),t!==null&&O0(t),e.blockedOn=n,!1;t.shift()}return!0}function N0(e,t,n){sr(e)&&n.delete(t)}function Bm(){Us=!1,zl!==null&&sr(zl)&&(zl=null),Ml!==null&&sr(Ml)&&(Ml=null),Tl!==null&&sr(Tl)&&(Tl=null),Hi.forEach(N0),Bi.forEach(N0)}function ur(e,t){e.blockedOn===t&&(e.blockedOn=null,Us||(Us=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,Bm)))}var dr=null;function j0(e){dr!==e&&(dr=e,o.unstable_scheduleCallback(o.unstable_NormalPriority,function(){dr===e&&(dr=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(Ls(l||n)===null)continue;break}var i=ie(n);i!==null&&(e.splice(t,3),t-=3,Oc(i,{pending:!0,data:a,method:n.method,action:l},l,a))}}))}function Na(e){function t(m){return ur(m,e)}zl!==null&&ur(zl,e),Ml!==null&&ur(Ml,e),Tl!==null&&ur(Tl,e),Hi.forEach(t),Bi.forEach(t);for(var n=0;n<Al.length;n++){var l=Al[n];l.blockedOn===e&&(l.blockedOn=null)}for(;0<Al.length&&(n=Al[0],n.blockedOn===null);)B0(n),n.blockedOn===null&&Al.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[mt]||null;if(typeof i=="function")r||j0(n);else if(r){var f=null;if(i&&i.hasAttribute("formAction")){if(a=i,r=i[mt]||null)f=r.formAction;else if(Ls(a)!==null)continue}else f=r.action;typeof f=="function"?n[l+1]=f:(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 Hs(e){this._internalRoot=e}fr.prototype.render=Hs.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(d(409));var n=t.current,l=an();R0(n,l,e,t,null,null)},fr.prototype.unmount=Hs.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;R0(e.current,2,null,e,null,null),Zo(),t[Wt]=null}};function fr(e){this._internalRoot=e}fr.prototype.unstable_scheduleHydration=function(e){if(e){var t=eo();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Al.length&&t!==0&&t<Al[n].priority;n++);Al.splice(n,0,e),n===0&&B0(e)}};var Y0=s.version;if(Y0!=="19.2.4")throw Error(d(527,Y0,"19.2.4"));B.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(d(188)):(e=Object.keys(e).join(","),Error(d(268,e)));return e=b(t),e=e!==null?G(e):null,e=e===null?null:e.stateNode,e};var Nm={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:E,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var hr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!hr.isDisabled&&hr.supportsFiber)try{Ln=hr.inject(Nm),jt=hr}catch{}}return Yi.createRoot=function(e,t){if(!p(e))throw Error(d(299));var n=!1,l="",a=Kd,i=Jd,r=Fd;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=k0(e,1,!1,null,null,n,l,null,a,i,r,q0),e[Wt]=t.current,ys(e),new Hs(t)},Yi.hydrateRoot=function(e,t,n){if(!p(e))throw Error(d(299));var l=!1,a="",i=Kd,r=Jd,f=Fd,m=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&&(f=n.onRecoverableError),n.formState!==void 0&&(m=n.formState)),t=k0(e,1,!0,t,n??null,l,a,m,i,r,f,q0),t.context=D0(null),n=t.current,l=an(),l=Hn(l),a=fl(l),a.callback=null,hl(n,a,l),n=l,t.current.lanes=n,Ul(t,n),kn(t),e[Wt]=t.current,ys(e),new fr(t)},Yi.version="19.2.4",Yi}var rh;function X1(){if(rh)return Gs.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(),Gs.exports=V1(),Gs.exports}var Q1=X1(),ch=function(s,h){var d=arguments;if(h==null||!Fi.call(h,"css"))return C.createElement.apply(void 0,d);var p=d.length,y=new Array(p);y[0]=tu,y[1]=eu(s,h);for(var A=2;A<p;A++)y[A]=d[A];return C.createElement.apply(null,y)};(function(o){var s;s||(s=o.JSX||(o.JSX={}))})(ch||(ch={}));function g(){for(var o=arguments.length,s=new Array(o),h=0;h<o;h++)s[h]=arguments[h];return Ch(s)}function rn(){var o=g.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 Z1={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},K1={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:Z1,requestDelete:()=>{},requestMove:()=>{},requestSync:()=>{},requestDownload:()=>{},requestProcess:()=>{},setProcessMode:()=>{},confirmDelete:async()=>{},confirmMove:async()=>{},confirmSync:async()=>{},confirmProcess:async()=>{},cancelAction:()=>{},closeProgress:()=>{},stopProcessing:()=>{},deleteOrphans:async()=>{}},zh=C.createContext(K1);function Ya(){return C.useContext(zh)}const wr="-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Ubuntu, sans-serif",u={primary:"#635bff",primaryHover:"#5851e5",primaryLight:"#f0f0ff",background:"#f6f9fc",surface:"#ffffff",surfaceHover:"#f6f9fc",border:"#d8dee4",borderLight:"#e3e8ee",borderHover:"#c1c9d2",text:"#1a1f36",textSecondary:"#697386",textMuted:"#8792a2",success:"#0d7d4d",successLight:"#e6f7ef",danger:"#df1b41",dangerHover:"#c41535",dangerLight:"#fff5f7",imagesFolder:"#8b5cf6",hover:"#e8ecf0"},K={xs:"13px",sm:"14px",base:"16px",lg:"19px",xl:"22px"},$i=g("font-family:",wr,";font-size:",K.base,";line-height:1.5;color:",u.text,";-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;box-sizing:border-box;*,*::before,*::after{box-sizing:border-box;}button,input,select,textarea{font-family:inherit;font-size:inherit;}",""),J1=rn`
|
|
10
|
+
from { opacity: 0; }
|
|
11
|
+
to { opacity: 1; }
|
|
12
|
+
`,F1=rn`
|
|
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
|
+
`,$1=rn`
|
|
22
|
+
from { transform: rotate(0deg); }
|
|
23
|
+
to { transform: rotate(360deg); }
|
|
24
|
+
`,Te={overlay:g("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:",J1," 0.15s ease-out;font-family:",wr,";",""),modal:g($i," background-color:",u.surface,";border-radius:12px;box-shadow:0 30px 60px -12px rgba(50, 50, 93, 0.25),0 18px 36px -18px rgba(0, 0, 0, 0.3);max-width:420px;width:90%;animation:",F1," 0.2s ease-out;overflow:hidden;",""),header:{name:"nsgk6m",styles:"padding:24px 24px 0"},title:g("font-size:",K.lg,";font-weight:600;color:",u.text,";margin:0;letter-spacing:-0.02em;",""),body:{name:"5e7rpo",styles:"padding:12px 24px 24px"},message:g("font-size:",K.base,";color:",u.textSecondary,";margin:0;line-height:1.6;",""),footer:g("display:flex;justify-content:flex-end;gap:12px;padding:16px 24px;border-top:1px solid ",u.border,";background-color:",u.background,";",""),btn:g("padding:10px 18px;font-size:",K.base,";font-weight:500;border-radius:6px;cursor:pointer;transition:all 0.15s ease;letter-spacing:-0.01em;",""),btnCancel:g("background-color:",u.surface,";border:1px solid ",u.border,";color:",u.text,";&:hover{background-color:",u.surfaceHover,";border-color:",u.borderHover,";}",""),btnConfirm:g("background-color:",u.primary,";border:1px solid ",u.primary,";color:white;&:hover{background-color:",u.primaryHover,";border-color:",u.primaryHover,";}",""),btnDanger:g("background-color:",u.danger,";border:1px solid ",u.danger,";color:white;&:hover{background-color:",u.dangerHover,";border-color:",u.dangerHover,";}","")};function Vi({title:o,message:s,confirmLabel:h="Confirm",cancelLabel:d="Cancel",variant:p="default",onConfirm:y,onCancel:A}){return c("div",{css:Te.overlay,onClick:A,children:x("div",{css:Te.modal,onClick:U=>U.stopPropagation(),children:[c("div",{css:Te.header,children:c("h3",{css:Te.title,children:o})}),c("div",{css:Te.body,children:c("p",{css:Te.message,children:s})}),x("div",{css:Te.footer,children:[c("button",{css:[Te.btn,Te.btnCancel,"",""],onClick:A,children:d}),c("button",{css:[Te.btn,p==="danger"?Te.btnDanger:Te.btnConfirm,"",""],onClick:y,children:h})]})]})})}const W1={input:g("width:100%;padding:10px 12px;font-size:",K.base,";border:1px solid ",u.border,";border-radius:6px;background:",u.surface,";color:",u.text,";margin-top:12px;transition:all 0.15s ease;&:focus{outline:none;border-color:",u.primary,";box-shadow:0 0 0 2px ",u.primaryLight,";}&::placeholder{color:",u.textMuted,";}","")};function vr({title:o,message:s,inputLabel:h,defaultValue:d="",placeholder:p,confirmLabel:y="Confirm",cancelLabel:A="Cancel",isLoading:U=!1,loadingLabel:D="Processing...",onConfirm:b,onCancel:G}){const[R,V]=fh.useState(d),ce=q=>{q.preventDefault(),R.trim()&&!U&&b(R.trim())};return c("div",{css:Te.overlay,onClick:U?void 0:G,children:c("div",{css:Te.modal,onClick:q=>q.stopPropagation(),children:x("form",{onSubmit:ce,children:[c("div",{css:Te.header,children:c("h3",{css:Te.title,children:o})}),x("div",{css:Te.body,children:[s&&c("p",{css:Te.message,children:s}),h&&c("label",{css:Te.message,children:h}),c("input",{css:W1.input,type:"text",value:R,onChange:q=>V(q.target.value),placeholder:p,autoFocus:!0,disabled:U})]}),x("div",{css:Te.footer,children:[c("button",{type:"button",css:[Te.btn,Te.btnCancel,"",""],onClick:G,disabled:U,children:A}),c("button",{type:"submit",css:[Te.btn,Te.btnConfirm,"",""],disabled:!R.trim()||U,children:U?x(rt,{children:[c("span",{css:g("display:inline-block;width:14px;height:14px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:",$1," 0.75s linear infinite;margin-right:6px;","")}),D]}):y})]})]})})})}function Mh({title:o,message:s,buttonLabel:h="OK",onClose:d}){return c("div",{css:Te.overlay,onClick:d,children:x("div",{css:Te.modal,onClick:p=>p.stopPropagation(),children:[c("div",{css:Te.header,children:c("h3",{css:Te.title,children:o})}),c("div",{css:Te.body,children:c("p",{css:Te.message,children:s})}),c("div",{css:Te.footer,children:c("button",{css:[Te.btn,Te.btnConfirm,"",""],onClick:d,children:h})})]})})}const kl={progressContainer:{name:"yz1nei",styles:"margin-top:16px"},progressBar:g("width:100%;height:8px;background-color:",u.background,";border-radius:4px;overflow:hidden;margin-bottom:12px;",""),progressFill:g("height:100%;background:linear-gradient(90deg, ",u.primary,", ",u.primaryHover,");border-radius:4px;transition:width 0.3s ease;",""),progressText:g("font-size:",K.sm,";color:",u.textSecondary,";margin:0;display:flex;justify-content:space-between;align-items:center;",""),currentFile:g("font-size:",K.xs,";color:",u.textMuted,";margin:8px 0 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;",""),errorList:{name:"1lw22n1",styles:"margin-top:12px;padding:12px;background:#fef2f2;border:1px solid #fecaca;border-radius:6px;max-height:200px;overflow-y:auto"},errorItem:g("font-size:",K.xs,";color:#991b1b;margin:0 0 4px;&:last-child{margin-bottom:0;}","")};function ea({title:o,progress:s,onClose:h,onDeleteOrphans:d,onStop:p}){const y=s.status==="complete",A=s.status==="error",U=s.status==="stopped",D=s.status==="stopping",b=y||A||U,G=!b||D;return c("div",{css:Te.overlay,children:x("div",{css:Te.modal,onClick:R=>R.stopPropagation(),children:[c("div",{css:Te.header,children:c("h3",{css:Te.title,children:o})}),c("div",{css:Te.body,children:A?c("p",{css:Te.message,children:s.message||"An error occurred"}):U?x("p",{css:Te.message,children:["Processing stopped. Processed ",s.processed??s.current," image",(s.processed??s.current)!==1?"s":""," before stopping."]}):y?x(rt,{children:[x("p",{css:Te.message,children:[s.message?s.message:s.isMove?x(rt,{children:["Moved ",s.processed," file",s.processed!==1?"s":"",".",s.errors!==void 0&&s.errors>0?x(rt,{children:[" ",s.errors," error",s.errors!==1?"s":""," occurred."]}):null]}):s.isScan?x(rt,{children:[s.alreadyProcessed!==void 0&&s.alreadyProcessed>0?x(rt,{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(rt,{children:[" Removed ",s.orphanedEntries," orphaned entr",s.orphanedEntries!==1?"ies":"y","."]}):null,s.pendingUpdates!==void 0&&s.pendingUpdates>0?x(rt,{children:[" ",s.pendingUpdates," file",s.pendingUpdates!==1?"s have":" has"," local updates pending."]}):null]}):x(rt,{children:["Processed ",s.processed," new image",s.processed!==1?"s":"",".",s.alreadyProcessed!==void 0&&s.alreadyProcessed>0?x(rt,{children:[" ",s.alreadyProcessed," already processed."]}):null]}),s.orphansRemoved!==void 0&&s.orphansRemoved>0?x(rt,{children:[" Removed ",s.orphansRemoved," orphaned thumbnail",s.orphansRemoved!==1?"s":"","."]}):null]}),s.errorMessages&&s.errorMessages.length>0&&x("div",{css:kl.errorList,children:[s.errorMessages.slice(0,10).map((R,V)=>c("p",{css:kl.errorItem,children:R},V)),s.errorMessages.length>10&&x("p",{css:kl.errorItem,children:["...and ",s.errorMessages.length-10," more"]})]})]}):x(rt,{children:[c("p",{css:Te.message,children:s.status==="cleanup"?s.message||"Cleaning up...":s.message||"Processing..."}),x("div",{css:kl.progressContainer,children:[c("div",{css:kl.progressBar,children:c("div",{css:kl.progressFill,style:{width:`${s.percent}%`}})}),x("div",{css:kl.progressText,children:[x("span",{children:[s.current," of ",s.total]}),x("span",{children:[s.percent,"%"]})]}),s.currentFile&&c("p",{css:kl.currentFile,title:s.currentFile,children:s.currentFile})]})]})}),x("div",{css:Te.footer,children:[G&&p&&c("button",{css:[Te.btn,Te.btnDanger,"",""],onClick:p,disabled:s.status==="stopping",children:s.status==="stopping"?"Stopping...":"Stop"}),b&&s.orphanedFiles&&s.orphanedFiles.length>0&&d&&x("button",{css:[Te.btn,Te.btnDanger,"",""],onClick:d,children:["Delete ",s.orphanedFiles.length," Orphan",s.orphanedFiles.length!==1?"s":""]}),b&&c("button",{css:[Te.btn,Te.btnConfirm,"",""],onClick:h,children:"Done"})]})]})})}function Th(o){const{setShowProgress:s,setProgressTitle:h,setProgressState:d,triggerRefresh:p}=o,y=C.useRef(null),A=C.useRef(!1),U=C.useRef(!1),D=C.useRef(null),b=C.useCallback(()=>{y.current&&y.current.abort()},[]);return{execute:C.useCallback(async R=>{const{endpoint:V,body:ce,title:q,onComplete:X,onError:pe}=R;if(A.current){console.warn("Streaming operation already in progress");return}A.current=!0,U.current=!1;const re=`${V.split("/").pop()?.replace("-stream","")||"op"}-${Date.now()}-${Math.random().toString(36).slice(2)}`;D.current=re;const W=new AbortController;y.current=W;const xe=async()=>{U.current=!0,d(_=>({..._,status:"stopping"}));try{await fetch("/api/studio/cancel-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({operationId:re})})}catch{}};W.signal.addEventListener("abort",xe),h(q),s(!0),d({current:0,total:0,percent:0,status:"processing",message:`Starting ${q.toLowerCase()}...`});try{const _=await fetch(V,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...ce,operationId:re})});if(!_.ok){const N=await _.json().catch(()=>({}));throw new Error(N.error||`Request failed: ${_.status}`)}if(!_.body)throw new Error("No response body");const me=_.body.getReader(),Z=new TextDecoder;let Q="";try{for(;;){const{done:N,value:ne}=await me.read();if(N)break;Q+=Z.decode(ne,{stream:!0});const ye=Q.split(`
|
|
25
|
+
|
|
26
|
+
`);Q=ye.pop()||"";for(const te of ye)if(te.startsWith("data: "))try{const ee=JSON.parse(te.slice(6));if(ee.type==="start")d(ze=>({...ze,total:ee.total||ze.total}));else if(ee.type==="progress")d({current:ee.current||0,total:ee.total||0,percent:ee.percent||Math.round((ee.current||0)/(ee.total||1)*100),status:"processing",currentFile:ee.currentFile,message:ee.message});else if(ee.type==="cleanup")d(ze=>({...ze,status:"cleanup",message:ee.message}));else if(ee.type==="complete"){const ze=ee.cancelled===!0,Le=ee.processed??ee.moved??ee.renamed??ee.pushed??ee.downloaded??ee.added??ee.imported??ee.deleted??ee.current??0;d({current:Le,total:Le,percent:100,status:ze?"stopped":ee.errors&&ee.errors>0?"error":"complete",message:ee.message,processed:Le,errors:ee.errors,orphanedFiles:ee.orphanedFiles}),p(),X?.(ee)}else ee.type==="error"&&(d(ze=>({...ze,status:"error",message:ee.message})),pe?.(ee.message||"Unknown error"))}catch{}}}catch(N){if(!U.current)throw N}finally{W.signal.removeEventListener("abort",xe)}}catch(_){if(!U.current){const me=_ instanceof Error?_.message:"Operation failed";console.error(`${q} error:`,_),d({current:0,total:0,percent:0,status:"error",message:me}),pe?.(me)}}finally{A.current=!1,y.current=null,D.current=null}},[s,h,d,p]),stop:b,get isRunning(){return A.current}}}const I1=rn`
|
|
27
|
+
from { opacity: 0; }
|
|
28
|
+
to { opacity: 1; }
|
|
29
|
+
`,P1=rn`
|
|
30
|
+
from {
|
|
31
|
+
opacity: 0;
|
|
32
|
+
transform: translateY(-8px) scale(0.98);
|
|
33
|
+
}
|
|
34
|
+
to {
|
|
35
|
+
opacity: 1;
|
|
36
|
+
transform: translateY(0) scale(1);
|
|
37
|
+
}
|
|
38
|
+
`,pt={overlay:g("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:",wr,";",""),modal:g($i," background-color:",u.surface,";border-radius:12px;box-shadow:0 30px 60px -12px rgba(50, 50, 93, 0.25),0 18px 36px -18px rgba(0, 0, 0, 0.3);max-width:480px;width:90%;max-height:80vh;display:flex;flex-direction:column;animation:",P1," 0.2s ease-out;overflow:hidden;",""),header:{name:"nsgk6m",styles:"padding:24px 24px 0"},title:g("font-size:",K.lg,";font-weight:600;color:",u.text,";margin:0;letter-spacing:-0.02em;",""),body:{name:"zizupt",styles:"padding:12px 24px 24px;flex:1;overflow-y:auto;min-height:200px;max-height:400px"},message:g("font-size:",K.base,";color:",u.textSecondary,";margin:0 0 16px;line-height:1.6;",""),folderList:{name:"1axgfg3",styles:"display:flex;flex-direction:column;gap:0"},folderItem:g("display:flex;align-items:center;gap:8px;padding:8px 12px;border-radius:6px;cursor:pointer;transition:all 0.15s ease;border:1px solid transparent;position:relative;&:hover{background-color:",u.surfaceHover,";}",""),treeIndent:{name:"197dxto",styles:"display:flex;align-items:center;height:100%"},treeLine:g("width:16px;height:100%;position:relative;flex-shrink:0;&::before{content:'';position:absolute;left:8px;top:0;bottom:50%;width:0;border-left:1px dashed ",u.textSecondary,";}&::after{content:'';position:absolute;left:8px;top:50%;width:8px;height:0;border-top:1px dashed ",u.textSecondary,";}",""),folderItemSelected:g("background-color:",u.primaryLight,";border-color:",u.primary,";&:hover{background-color:",u.primaryLight,";}",""),folderItemDisabled:{name:"181lhkw",styles:"opacity:0.5;cursor:not-allowed;&:hover{background-color:transparent;}"},folderIcon:{name:"17bs1oo",styles:"width:20px;height:20px;color:#f9935e;flex-shrink:0"},folderName:g("font-size:",K.base,";color:",u.text,";flex:1;",""),footer:g("display:flex;justify-content:flex-end;gap:12px;padding:16px 24px;border-top:1px solid ",u.border,";background-color:",u.background,";",""),btn:g("padding:10px 18px;font-size:",K.base,";font-weight:500;border-radius:6px;cursor:pointer;transition:all 0.15s ease;letter-spacing:-0.01em;",""),btnCancel:g("background-color:",u.surface,";border:1px solid ",u.border,";color:",u.text,";&:hover{background-color:",u.surfaceHover,";border-color:",u.borderHover,";}",""),btnConfirm:g("background-color:",u.primary,";border:1px solid ",u.primary,";color:white;&:hover:not(:disabled){background-color:",u.primaryHover,";border-color:",u.primaryHover,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),loading:g("display:flex;align-items:center;justify-content:center;padding:40px;color:",u.textSecondary,";",""),spinner:g("width:24px;height:24px;border-radius:50%;border:3px solid ",u.border,";border-top-color:",u.primary,";animation:spin 0.8s linear infinite;@keyframes spin{to{transform:rotate(360deg);}}","")};function Ah({selectedItems:o,currentPath:s,onMove:h,onCancel:d}){const[p,y]=C.useState([]),[A,U]=C.useState(!0),[D,b]=C.useState(null);C.useEffect(()=>{async function q(){try{const X=await fetch("/api/studio/list-folders");if(X.ok){const pe=await X.json();console.log("Loaded folders:",pe),y(pe.folders||[])}else console.error("Failed to load folders:",X.status,await X.text())}catch(X){console.error("Failed to load folders:",X)}finally{U(!1)}}q()},[]);const G=Array.from(o),R=p.filter(q=>!G.some(X=>q.path===X||q.path.startsWith(X+"/"))),V=q=>q===s,ce=()=>{D&&h(D)};return c("div",{css:pt.overlay,onClick:d,children:x("div",{css:pt.modal,onClick:q=>q.stopPropagation(),children:[c("div",{css:pt.header,children:c("h3",{css:pt.title,children:"Move Items"})}),x("div",{css:pt.body,children:[x("p",{css:pt.message,children:["Select a destination folder for ",o.size," item",o.size!==1?"s":"",":"]}),A?c("div",{css:pt.loading,children:c("div",{css:pt.spinner})}):R.length===0?c("div",{css:pt.loading,children:"No available folders to move to."}):c("div",{css:pt.folderList,children:R.map(q=>{const X=V(q.path);return x("div",{css:[pt.folderItem,D===q.path&&pt.folderItemSelected,X&&pt.folderItemDisabled,"",""],style:{paddingLeft:12},onClick:()=>!X&&b(q.path),children:[q.depth>0&&c("div",{css:pt.treeIndent,children:Array.from({length:q.depth}).map((pe,F)=>c("div",{css:pt.treeLine},F))}),c("svg",{css:pt.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:pt.folderName,children:[q.name,X&&" (current)"]})]},q.path)})})]}),x("div",{css:pt.footer,children:[c("button",{css:[pt.btn,pt.btnCancel,"",""],onClick:d,children:"Cancel"}),c("button",{css:[pt.btn,pt.btnConfirm,"",""],onClick:ce,disabled:!D,children:"Move Here"})]})]})})}const eg=`CLOUDFLARE_R2_ACCOUNT_ID=your_account_id
|
|
39
|
+
CLOUDFLARE_R2_ACCESS_KEY_ID=your_access_key
|
|
40
|
+
CLOUDFLARE_R2_SECRET_ACCESS_KEY=your_secret_key
|
|
41
|
+
CLOUDFLARE_R2_BUCKET_NAME=your_bucket_name
|
|
42
|
+
CLOUDFLARE_R2_PUBLIC_URL=https://pub-xxx.r2.dev
|
|
43
|
+
NEXT_PUBLIC_CLOUDFLARE_R2_PUBLIC_URL=https://pub-xxx.r2.dev`,he={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:g("background:",u.surface,";border-radius:12px;max-width:560px;width:100%;max-height:90vh;overflow-y:auto;box-shadow:0 20px 40px rgba(0, 0, 0, 0.3);",""),header:g("display:flex;align-items:center;gap:12px;padding:20px 24px;border-bottom:1px solid ",u.border,";",""),icon:g("width:32px;height:32px;color:",u.primary,";flex-shrink:0;",""),title:g("font-size:",K.xl,";font-weight:600;color:",u.text,";margin:0;",""),closeBtn:g("margin-left:auto;background:none;border:none;padding:4px;cursor:pointer;color:",u.textMuted,";border-radius:4px;&:hover{color:",u.text,";background:",u.surfaceHover,";}",""),closeIcon:{name:"1aynuae",styles:"width:20px;height:20px"},content:{name:"vxuddk",styles:"padding:24px"},intro:g("font-size:",K.base,";color:",u.textSecondary,";margin:0 0 20px 0;line-height:1.6;",""),steps:{name:"1fs2p21",styles:"list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:16px"},step:{name:"1wesxqa",styles:"display:flex;gap:12px"},stepNumber:g("width:28px;height:28px;border-radius:50%;background:",u.primaryLight,";color:",u.primary,";font-size:",K.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:g("font-size:",K.base,";font-weight:500;color:",u.text,";margin:0 0 4px 0;",""),stepDesc:g("font-size:",K.sm,";color:",u.textSecondary,";margin:0;line-height:1.5;",""),link:g("color:",u.primary,";text-decoration:none;font-weight:500;&:hover{text-decoration:underline;}",""),envVarsWrapper:{name:"1ksolcl",styles:"position:relative;margin-top:20px"},envVars:g("background:",u.background,";border:1px solid ",u.border,";border-radius:8px;padding:16px;padding-right:48px;font-family:'SF Mono',Monaco,'Cascadia Code',monospace;font-size:13px;line-height:1.8;color:",u.text,";overflow-x:auto;",""),envVar:{name:"4zleql",styles:"display:block"},envKey:g("color:",u.primary,";",""),envValue:g("color:",u.textSecondary,";",""),copyBtn:g("position:absolute;top:8px;right:8px;width:32px;height:32px;display:flex;align-items:center;justify-content:center;background:",u.surface,";border:1px solid ",u.border,";border-radius:6px;cursor:pointer;color:",u.textMuted,";transition:all 0.15s ease;&:hover{background:",u.surfaceHover,";color:",u.text,";border-color:#d0d5dd;}",""),copyIcon:{name:"157xhr7",styles:"width:16px;height:16px"},copiedTooltip:{name:"9a5yd1",styles:"position:absolute;top:50%;right:100%;transform:translateY(-50%);background:#1a1f36;color:white;padding:4px 8px;border-radius:4px;font-size:12px;white-space:nowrap;margin-right:6px;pointer-events:none;&::before{content:'';position:absolute;right:-4px;top:50%;transform:translateY(-50%);border-left:4px solid #1a1f36;border-top:4px solid transparent;border-bottom:4px solid transparent;}"},footer:g("padding:16px 24px;border-top:1px solid ",u.border,";display:flex;justify-content:flex-end;gap:12px;",""),docsBtn:g("padding:10px 16px;border-radius:6px;font-size:",K.base,";font-weight:500;border:1px solid ",u.border,";background:",u.surface,";color:",u.text,";cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;gap:6px;transition:all 0.15s ease;&:hover{background:",u.surfaceHover,";border-color:#d0d5dd;}",""),doneBtn:g("padding:10px 20px;border-radius:6px;font-size:",K.base,";font-weight:500;border:none;background:",u.primary,";color:white;cursor:pointer;transition:background 0.15s ease;&:hover{background:",u.primaryHover,";}",""),externalIcon:{name:"1djxupe",styles:"width:14px;height:14px"}};function Eh({isOpen:o,onClose:s}){const[h,d]=C.useState(!1),p=async()=>{try{await navigator.clipboard.writeText(eg),d(!0),setTimeout(()=>d(!1),2e3)}catch(y){console.error("Failed to copy:",y)}};return o?c("div",{css:he.overlay,onClick:s,children:x("div",{css:he.modal,onClick:y=>y.stopPropagation(),children:[x("div",{css:he.header,children:[c("svg",{css:he.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:he.title,children:"Set Up CDN Storage"}),c("button",{css:he.closeBtn,onClick:s,children:c("svg",{css:he.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:he.content,children:[c("p",{css:he.intro,children:"Sync your images to Cloudflare R2 for faster global delivery. R2 offers generous free tier with no egress fees."}),x("ol",{css:he.steps,children:[x("li",{css:he.step,children:[c("span",{css:he.stepNumber,children:"1"}),x("div",{css:he.stepContent,children:[c("h4",{css:he.stepTitle,children:"Create a Cloudflare account"}),x("p",{css:he.stepDesc,children:["Sign up at"," ",c("a",{css:he.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:he.step,children:[c("span",{css:he.stepNumber,children:"2"}),x("div",{css:he.stepContent,children:[c("h4",{css:he.stepTitle,children:"Create an R2 bucket"}),x("p",{css:he.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:he.step,children:[c("span",{css:he.stepNumber,children:"3"}),x("div",{css:he.stepContent,children:[c("h4",{css:he.stepTitle,children:"Enable public access"}),x("p",{css:he.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:he.step,children:[c("span",{css:he.stepNumber,children:"4"}),x("div",{css:he.stepContent,children:[c("h4",{css:he.stepTitle,children:"Create API token"}),c("p",{css:he.stepDesc,children:'Go to R2 → Manage R2 API Tokens → Create API Token. Select "Object Read & Write" permissions for your bucket.'})]})]}),x("li",{css:he.step,children:[c("span",{css:he.stepNumber,children:"5"}),x("div",{css:he.stepContent,children:[c("h4",{css:he.stepTitle,children:"Add environment variables"}),x("p",{css:he.stepDesc,children:["Add these to your ",c("code",{children:".env.local"})," file:"]})]})]})]}),x("div",{css:he.envVarsWrapper,children:[x("div",{css:he.envVars,children:[x("span",{css:he.envVar,children:[c("span",{css:he.envKey,children:"CLOUDFLARE_R2_ACCOUNT_ID"}),"=",c("span",{css:he.envValue,children:"your_account_id"})]}),x("span",{css:he.envVar,children:[c("span",{css:he.envKey,children:"CLOUDFLARE_R2_ACCESS_KEY_ID"}),"=",c("span",{css:he.envValue,children:"your_access_key"})]}),x("span",{css:he.envVar,children:[c("span",{css:he.envKey,children:"CLOUDFLARE_R2_SECRET_ACCESS_KEY"}),"=",c("span",{css:he.envValue,children:"your_secret_key"})]}),x("span",{css:he.envVar,children:[c("span",{css:he.envKey,children:"CLOUDFLARE_R2_BUCKET_NAME"}),"=",c("span",{css:he.envValue,children:"your_bucket_name"})]}),x("span",{css:he.envVar,children:[c("span",{css:he.envKey,children:"CLOUDFLARE_R2_PUBLIC_URL"}),"=",c("span",{css:he.envValue,children:"https://pub-xxx.r2.dev"})]}),x("span",{css:he.envVar,children:[c("span",{css:he.envKey,children:"NEXT_PUBLIC_CLOUDFLARE_R2_PUBLIC_URL"}),"=",c("span",{css:he.envValue,children:"https://pub-xxx.r2.dev"})]})]}),x("button",{css:he.copyBtn,onClick:p,title:"Copy to clipboard",children:[h&&c("span",{css:he.copiedTooltip,children:"Copied!"}),c("svg",{css:he.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:he.footer,children:[x("a",{css:he.docsBtn,href:"https://developers.cloudflare.com/r2/get-started/",target:"_blank",rel:"noopener noreferrer",children:["R2 Documentation",c("svg",{css:he.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:he.doneBtn,onClick:s,children:"Got it"})]})]})}):null}const tg=rn`
|
|
44
|
+
from { opacity: 0; }
|
|
45
|
+
to { opacity: 1; }
|
|
46
|
+
`,ng=rn`
|
|
47
|
+
from {
|
|
48
|
+
opacity: 0;
|
|
49
|
+
transform: translateY(-8px) scale(0.98);
|
|
50
|
+
}
|
|
51
|
+
to {
|
|
52
|
+
opacity: 1;
|
|
53
|
+
transform: translateY(0) scale(1);
|
|
54
|
+
}
|
|
55
|
+
`,ot={overlay:g("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:",tg," 0.15s ease-out;font-family:",wr,";",""),modal:g($i," background-color:",u.surface,";border-radius:12px;box-shadow:0 30px 60px -12px rgba(50, 50, 93, 0.25),0 18px 36px -18px rgba(0, 0, 0, 0.3);max-width:520px;width:90%;animation:",ng," 0.2s ease-out;overflow:hidden;",""),header:{name:"nsgk6m",styles:"padding:24px 24px 0"},title:g("font-size:",K.lg,";font-weight:600;color:",u.text,";margin:0;letter-spacing:-0.02em;",""),tabs:g("display:flex;gap:0;margin-top:16px;border-bottom:1px solid ",u.border,";",""),tab:g("padding:12px 20px;font-size:",K.base,";font-weight:500;color:",u.textSecondary,";background:none;border:none;cursor:pointer;position:relative;transition:color 0.15s;&:hover{color:",u.text,";}",""),tabActive:g("color:",u.primary,";&::after{content:'';position:absolute;bottom:-1px;left:0;right:0;height:2px;background-color:",u.primary,";}",""),body:{name:"1po9b7e",styles:"padding:24px;min-height:200px"},dropzone:g("border:2px dashed ",u.border,";border-radius:8px;padding:40px 24px;text-align:center;cursor:pointer;transition:all 0.15s;&:hover{border-color:",u.primary,";background-color:",u.primaryLight,";}",""),dropzoneActive:g("border-color:",u.primary,";background-color:",u.primaryLight,";",""),dropzoneIcon:g("width:48px;height:48px;margin:0 auto 16px;color:",u.textMuted,";",""),dropzoneText:g("font-size:",K.base,";color:",u.text,";margin:0 0 4px;",""),dropzoneHint:g("font-size:",K.sm,";color:",u.textSecondary,";margin:0;",""),textarea:g("width:100%;min-height:150px;padding:12px;font-size:",K.sm,";font-family:ui-monospace,SFMono-Regular,'SF Mono',Menlo,Consolas,monospace;border:1px solid ",u.border,";border-radius:8px;resize:vertical;&:focus{outline:none;border-color:",u.primary,";box-shadow:0 0 0 3px ",u.primaryLight,";}&::placeholder{color:",u.textMuted,";}",""),textareaLabel:g("font-size:",K.sm,";color:",u.textSecondary,";margin:0 0 8px;",""),footer:g("display:flex;justify-content:flex-end;gap:12px;padding:16px 24px;border-top:1px solid ",u.border,";background-color:",u.background,";",""),btn:g("padding:10px 18px;font-size:",K.base,";font-weight:500;border-radius:6px;cursor:pointer;transition:all 0.15s ease;letter-spacing:-0.01em;",""),btnCancel:g("background-color:",u.surface,";border:1px solid ",u.border,";color:",u.text,";&:hover{background-color:",u.surfaceHover,";border-color:",u.borderHover,";}",""),btnConfirm:g("background-color:",u.primary,";border:1px solid ",u.primary,";color:white;&:hover:not(:disabled){background-color:",u.primaryHover,";border-color:",u.primaryHover,";}&:disabled{opacity:0.6;cursor:not-allowed;}",""),fileInput:{name:"eivff4",styles:"display:none"},selectedFiles:g("margin-top:16px;padding:12px;background-color:",u.background,";border-radius:6px;font-size:",K.sm,";color:",u.text,";","")};function lg({currentPath:o,onClose:s,onUploadComplete:h,streamingOperation:d,setShowProgress:p,setProgressTitle:y,setProgressState:A}){const[U,D]=C.useState("upload"),[b,G]=C.useState([]),[R,V]=C.useState(""),[ce,q]=C.useState(!1),[X,pe]=C.useState(!1),[F,re]=C.useState(!1),W=C.useRef(null),xe=C.useCallback(N=>{N&&G(Array.from(N))},[]),_=C.useCallback(N=>{N.preventDefault(),q(!1),xe(N.dataTransfer.files)},[xe]),me=C.useRef(!1),Z=C.useCallback(async()=>{if(b.length!==0){if(p&&y&&A){s(),me.current=!1,y("Uploading Files"),p(!0),A({current:0,total:b.length,percent:0,status:"processing",message:"Uploading..."});let N=0;const ne=[];for(let ye=0;ye<b.length;ye++){if(me.current){A(ze=>({...ze,status:"stopped",message:`Stopped. Uploaded ${N} file${N!==1?"s":""}.`})),h();return}const te=b[ye],ee=new FormData;ee.append("file",te),ee.append("path",o);try{(await fetch("/api/studio/upload",{method:"POST",body:ee})).ok?N++:ne.push(te.name)}catch{ne.push(te.name)}A({current:ye+1,total:b.length,percent:Math.round((ye+1)/b.length*100),status:"processing",currentFile:te.name})}A({current:b.length,total:b.length,percent:100,status:"complete",message:`Uploaded ${N} file${N!==1?"s":""}.${ne.length>0?` ${ne.length} failed.`:""}`}),h();return}pe(!0);try{for(const N of b){const ne=new FormData;ne.append("file",N),ne.append("path",o),await fetch("/api/studio/upload",{method:"POST",body:ne})}h(),s()}catch(N){console.error("Upload failed:",N)}finally{pe(!1)}}},[b,o,h,s,p,y,A]),Q=C.useCallback(async()=>{const N=R.split(`
|
|
56
|
+
`).map(ne=>ne.trim()).filter(ne=>ne.length>0);if(N.length!==0){if(d){s(),await d.execute({endpoint:"/api/studio/import",body:{urls:N},title:"Importing URLs",onComplete:()=>{h()}});return}re(!0);try{const ye=(await fetch("/api/studio/import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({urls:N})})).body?.getReader();if(!ye)throw new Error("No reader");const te=new TextDecoder;for(;;){const{done:ee,value:ze}=await ye.read();if(ee)break;const E=te.decode(ze).split(`
|
|
57
|
+
|
|
58
|
+
`).filter(B=>B.startsWith("data: "));for(const B of E)JSON.parse(B.replace("data: ","")).type==="complete"&&(h(),s())}}catch(ne){console.error("Import failed:",ne)}finally{re(!1)}}},[R,h,s,d]);return c("div",{css:ot.overlay,onClick:s,children:x("div",{css:ot.modal,onClick:N=>N.stopPropagation(),children:[x("div",{css:ot.header,children:[c("h3",{css:ot.title,children:"Add New"}),x("div",{css:ot.tabs,children:[c("button",{css:[ot.tab,U==="upload"&&ot.tabActive,"",""],onClick:()=>D("upload"),children:"Upload Files"}),c("button",{css:[ot.tab,U==="import"&&ot.tabActive,"",""],onClick:()=>D("import"),children:"Import URLs"})]})]}),c("div",{css:ot.body,children:U==="upload"?x(rt,{children:[x("div",{css:[ot.dropzone,ce&&ot.dropzoneActive,"",""],onClick:()=>W.current?.click(),onDragOver:N=>{N.preventDefault(),q(!0)},onDragLeave:()=>q(!1),onDrop:_,children:[c("svg",{css:ot.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:ot.dropzoneText,children:"Drop files here or click to browse"}),c("p",{css:ot.dropzoneHint,children:"Supports images and other media files"})]}),c("input",{ref:W,type:"file",multiple:!0,css:ot.fileInput,onChange:N=>xe(N.target.files)}),b.length>0&&x("div",{css:ot.selectedFiles,children:[b.length," file",b.length!==1?"s":""," selected"]})]}):x(rt,{children:[c("p",{css:ot.textareaLabel,children:"Paste image URLs (one per line)"}),c("textarea",{css:ot.textarea,value:R,onChange:N=>V(N.target.value),placeholder:`https://cdn.example.com/photos/image1.jpg
|
|
59
|
+
https://cdn.example.com/photos/image2.jpg`})]})}),x("div",{css:ot.footer,children:[c("button",{css:[ot.btn,ot.btnCancel,"",""],onClick:s,children:"Cancel"}),U==="upload"?c("button",{css:[ot.btn,ot.btnConfirm,"",""],onClick:Z,disabled:b.length===0||X,children:X?"Uploading...":"Upload"}):c("button",{css:[ot.btn,ot.btnConfirm,"",""],onClick:Q,disabled:!R.trim()||F,children:F?"Importing...":"Import"})]})]})})}const ag="36px",Re={btn:g("height:",ag,";padding:0 12px;background:",u.surface,";border:1px solid ",u.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{background-color:",u.surfaceHover,";border-color:",u.borderHover,";}",""),icon:g("width:16px;height:16px;color:",u.textSecondary,";",""),overlay:{name:"1cy1r91",styles:"position:fixed;top:0;right:0;bottom:0;left:0;z-index:10000;display:flex;align-items:flex-start;justify-content:center;background-color:rgba(26, 31, 54, 0.4);backdrop-filter:blur(4px);overflow-y:auto;scroll-behavior:smooth;padding:48px 24px"},panel:g($i," position:relative;background-color:",u.surface,";border-radius:12px;box-shadow:0 30px 60px -12px rgba(50, 50, 93, 0.25),0 18px 36px -18px rgba(0, 0, 0, 0.3);width:100%;max-width:512px;padding:24px;margin:auto 0;",""),header:{name:"1o4fids",styles:"display:flex;align-items:center;justify-content:space-between;margin-bottom:24px"},title:g("font-size:",K.xl,";font-weight:600;color:",u.text,";margin:0;letter-spacing:-0.02em;",""),closeBtn:g("padding:6px;background:",u.surface,";border:1px solid ",u.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{background-color:",u.surfaceHover,";border-color:",u.borderHover,";}",""),sections:{name:"klisov",styles:"display:flex;flex-direction:column;gap:24px"},sectionTitle:g("font-size:",K.base,";font-weight:600;color:",u.text,";margin:0 0 12px 0;",""),description:g("font-size:",K.sm,";color:",u.textSecondary,";margin:0 0 12px 0;",""),codeWrapper:{name:"bjn8wh",styles:"position:relative"},code:g("background-color:",u.background,";border-radius:8px;padding:12px;padding-right:40px;font-family:'SF Mono',Monaco,Consolas,monospace;font-size:",K.xs,";color:",u.textSecondary,";border:1px solid ",u.border,";overflow-x:auto;white-space:nowrap;",""),copyBtn:g("position:absolute;top:8px;right:8px;padding:4px;background:",u.surface,";border:1px solid ",u.border,";border-radius:4px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{background-color:",u.surfaceHover,";border-color:",u.borderHover,";}",""),tooltip:{name:"6eskey",styles:"position:absolute;bottom:100%;left:50%;transform:translateX(-50%);background:#1a1f36;color:white;padding:4px 8px;border-radius:4px;font-size:12px;white-space:nowrap;margin-bottom:6px;pointer-events:none;z-index:100;&::after{content:'';position:absolute;top:100%;left:50%;transform:translateX(-50%);border:4px solid transparent;border-top-color:#1a1f36;}"},copyIcon:g("width:14px;height:14px;color:",u.textSecondary,";",""),codeLine:{name:"1bbvuqp",styles:"margin:0 0 4px 0;&:last-child{margin:0;}"},input:g("width:100%;padding:10px 14px;border:1px solid ",u.border,";border-radius:6px;font-size:",K.base,";color:",u.text,";background:",u.surface,";transition:all 0.15s ease;&:focus{outline:none;border-color:",u.primary,";box-shadow:0 0 0 3px ",u.primaryLight,";}&::placeholder{color:",u.textMuted,";}",""),grid:{name:"xtlr5l",styles:"display:grid;grid-template-columns:repeat(3, 1fr);gap:12px"},label:g("font-size:",K.xs,";font-weight:500;color:",u.textSecondary,";display:block;margin-bottom:6px;",""),footer:g("margin-top:24px;padding-top:20px;border-top:1px solid ",u.border,";display:flex;justify-content:flex-end;gap:12px;",""),cancelBtn:g("padding:10px 18px;font-size:",K.base,";font-weight:500;color:",u.text,";background:",u.surface,";border:1px solid ",u.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;&:hover{background-color:",u.surfaceHover,";border-color:",u.borderHover,";}",""),saveBtn:g("padding:10px 18px;font-size:",K.base,";font-weight:500;color:white;background-color:",u.primary,";border:1px solid ",u.primary,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;&:hover{background-color:",u.primaryHover,";border-color:",u.primaryHover,";}&:disabled{opacity:0.6;cursor:not-allowed;}",""),cdnList:{name:"3w0yoi",styles:"display:flex;flex-direction:column;gap:8px"},cdnRow:{name:"197tvr9",styles:"display:flex;gap:8px;align-items:center"},cdnInput:g("flex:1;padding:8px 12px;border:1px solid ",u.border,";border-radius:6px;font-size:",K.sm,";color:",u.text,";background:",u.surface,";transition:all 0.15s ease;&:focus{outline:none;border-color:",u.primary,";box-shadow:0 0 0 3px ",u.primaryLight,";}",""),cdnIndex:g("font-size:",K.xs,";color:",u.textMuted,";width:24px;text-align:center;flex-shrink:0;",""),cdnDeleteBtn:g("padding:6px;background:none;border:none;cursor:pointer;color:",u.textMuted,";transition:color 0.15s;flex-shrink:0;&:hover{color:",u.danger,";}",""),cdnAddBtn:g("padding:8px 12px;font-size:",K.sm,";font-weight:500;color:",u.primary,";background:",u.primaryLight,";border:1px dashed ",u.primary,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;gap:6px;margin-top:8px;&:hover{background:",u.surface,";}",""),warning:g("font-size:",K.xs,";color:",u.danger,";margin-top:8px;padding:8px 12px;background:",u.dangerLight,";border-radius:6px;","")};function ig(){const[o,s]=C.useState(!1);return x(rt,{children:[c("button",{css:Re.btn,onClick:()=>s(!0),"aria-label":"Settings",children:x("svg",{css:Re.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(rg,{onClose:()=>s(!1)})]})}const og=`# Dev site link (opens from Studio header)
|
|
60
|
+
STUDIO_DEV_SITE_URL=http://localhost:3000
|
|
61
|
+
|
|
62
|
+
# Cloudflare R2 Storage
|
|
63
|
+
CLOUDFLARE_R2_ACCOUNT_ID=your_account_id
|
|
64
|
+
CLOUDFLARE_R2_ACCESS_KEY_ID=your_access_key_id
|
|
65
|
+
CLOUDFLARE_R2_SECRET_ACCESS_KEY=your_secret_access_key
|
|
66
|
+
CLOUDFLARE_R2_BUCKET_NAME=your_bucket_name
|
|
67
|
+
CLOUDFLARE_R2_PUBLIC_URL=https://your-cdn.example.com`;function rg({onClose:o}){const{triggerRefresh:s}=Ya(),[h,d]=C.useState(!1),[p,y]=C.useState([]),[A,U]=C.useState(!0),[D,b]=C.useState(!1),[G,R]=C.useState(!1);C.useEffect(()=>{async function F(){try{const W=await(await fetch("/api/studio/cdns")).json();y(W.cdns||[])}catch(re){console.error("Failed to load CDN URLs:",re)}finally{U(!1)}}F()},[]);const V=()=>{navigator.clipboard.writeText(og),d(!0),setTimeout(()=>d(!1),2e3)},ce=C.useCallback((F,re)=>{y(W=>{const xe=[...W];return xe[F]=re,xe}),R(!0)},[]),q=C.useCallback(()=>{y(F=>[...F,""]),R(!0)},[]),X=C.useCallback(F=>{y(re=>re.filter((W,xe)=>xe!==F)),R(!0)},[]),pe=C.useCallback(async()=>{b(!0);try{(await fetch("/api/studio/cdns",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cdns:p})})).ok&&(R(!1),s(),o())}catch(F){console.error("Failed to save CDN URLs:",F)}finally{b(!1)}},[p,s,o]);return c("div",{css:Re.overlay,onClick:o,children:x("div",{css:Re.panel,onClick:F=>F.stopPropagation(),children:[x("div",{css:Re.header,children:[c("h2",{css:Re.title,children:"Settings"}),c("button",{css:Re.closeBtn,onClick:o,children:c("svg",{css:Re.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:Re.sections,children:[x("section",{children:[c("h3",{css:Re.sectionTitle,children:"CDN URLs"}),c("p",{css:Re.description,children:"Manage CDN base URLs used by your images:"}),A?c("p",{css:Re.description,children:"Loading..."}):x(rt,{children:[c("div",{css:Re.cdnList,children:p.map((F,re)=>x("div",{css:Re.cdnRow,children:[c("span",{css:Re.cdnIndex,children:re}),c("input",{css:Re.cdnInput,type:"text",value:F,onChange:W=>ce(re,W.target.value),placeholder:"https://cdn.example.com"}),c("button",{css:Re.cdnDeleteBtn,onClick:()=>X(re),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"})})})]},re))}),x("button",{css:Re.cdnAddBtn,onClick:q,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:Re.warning,children:"Warning: Changing CDN URLs may break image references. The index numbers correspond to image `c` values."})]})]}),x("section",{children:[c("h3",{css:Re.sectionTitle,children:"Environment Variables"}),x("p",{css:Re.description,children:["Configure in ",c("code",{children:".env.local"})," file (local development only, not needed in production):"]}),x("div",{css:Re.codeWrapper,children:[x("button",{css:Re.copyBtn,onClick:V,title:"Copy to clipboard",children:[h&&c("span",{css:Re.tooltip,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:"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:Re.code,children:[c("p",{css:Re.codeLine,children:"NEXT_PUBLIC_PRODUCTION_URL=http://localhost:3000"}),c("p",{css:Re.codeLine,children:" "}),c("p",{css:Re.codeLine,children:"# Cloudflare R2 Storage"}),c("p",{css:Re.codeLine,children:"CLOUDFLARE_R2_ACCOUNT_ID=your_account_id"}),c("p",{css:Re.codeLine,children:"CLOUDFLARE_R2_ACCESS_KEY_ID=your_access_key_id"}),c("p",{css:Re.codeLine,children:"CLOUDFLARE_R2_SECRET_ACCESS_KEY=your_secret_access_key"}),c("p",{css:Re.codeLine,children:"CLOUDFLARE_R2_BUCKET_NAME=your_bucket_name"}),c("p",{css:Re.codeLine,children:"CLOUDFLARE_R2_PUBLIC_URL=https://your-cdn.example.com"})]})]})]}),x("section",{children:[c("h3",{css:Re.sectionTitle,children:"Thumbnail Sizes"}),x("div",{css:Re.grid,children:[x("div",{children:[c("label",{css:Re.label,children:"Small"}),c("input",{css:Re.input,type:"number",defaultValue:300})]}),x("div",{children:[c("label",{css:Re.label,children:"Medium"}),c("input",{css:Re.input,type:"number",defaultValue:700})]}),x("div",{children:[c("label",{css:Re.label,children:"Large"}),c("input",{css:Re.input,type:"number",defaultValue:1400})]})]})]})]}),x("div",{css:Re.footer,children:[c("button",{css:Re.cancelBtn,onClick:o,children:"Cancel"}),c("button",{css:Re.saveBtn,onClick:pe,disabled:D||!G,children:D?"Saving...":"Save Changes"})]})]})})}const Zs="36px",cg=rn`
|
|
68
|
+
to { transform: rotate(360deg); }
|
|
69
|
+
`,be={toolbar:g("display:flex;flex-wrap:nowrap;align-items:center;justify-content:space-between;gap:8px;padding:12px 16px;background-color:",u.surface,";border-bottom:1px solid ",u.border,";overflow:visible;min-width:0;@media (min-width: 768px){padding:12px 24px;}",""),left:{name:"17nohj2",styles:"display:flex;flex-wrap:nowrap;flex-shrink:0;align-items:center;gap:8px"},right:{name:"17nohj2",styles:"display:flex;flex-wrap:nowrap;flex-shrink:0;align-items:center;gap:8px"},btn:g("display:inline-flex;align-items:center;justify-content:center;gap:6px;height:",Zs,";padding:0 14px;border-radius:6px;font-size:",K.base,";font-weight:500;background:",u.surface,";border:1px solid ",u.border,";cursor:pointer;transition:all 0.15s ease;color:",u.text,";letter-spacing:-0.01em;&:hover:not(:disabled){background-color:",u.surfaceHover,";border-color:",u.borderHover,";}&:disabled{cursor:not-allowed;opacity:0.5;}",""),btnPrimary:g("background:",u.primary,";border-color:",u.primary,";color:white;&:hover:not(:disabled){background:",u.primaryHover,";border-color:",u.primaryHover,";}",""),btnDanger:g("color:",u.danger,";&:hover:not(:disabled){background-color:",u.dangerLight,";border-color:",u.danger,";}",""),btnCloud:{name:"1lzbs29",styles:"color:#f59e0b;&:hover:not(:disabled){background-color:rgba(245, 158, 11, 0.1);border-color:#f59e0b;}"},cloudDropdownWrapper:{name:"bjn8wh",styles:"position:relative"},dropdownArrow:{name:"1j1hlpy",styles:"width:12px;height:12px;margin-left:4px"},cloudDropdown:g("position:absolute;top:100%;left:0;z-index:1000;min-width:160px;margin-top:4px;background:white;border:1px solid ",u.border,";border-radius:6px;box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);overflow:hidden;",""),cloudDropdownItem:g("display:flex;align-items:center;gap:8px;width:100%;padding:10px 14px;border:none;background:none;font-size:",K.sm,";color:",u.text,";cursor:pointer;text-align:left;white-space:nowrap;&:hover{background-color:",u.hover,";}svg{width:16px;height:16px;flex-shrink:0;color:#f59e0b;}",""),cloudDropdownItemDefault:g("svg{color:",u.text,";}",""),cloudDropdownItemDanger:g("color:",u.danger,";svg{color:",u.danger,";}",""),cloudDropdownDivider:g("height:1px;background-color:",u.border,";margin:4px 0;",""),icon:{name:"157xhr7",styles:"width:16px;height:16px"},iconSpin:g("animation:",cg," 1s linear infinite;",""),selectionCount:g("font-size:",K.base,";color:",u.textSecondary,";display:flex;align-items:center;gap:8px;margin-right:8px;",""),clearBtn:g("color:",u.primary,";background:none;border:none;cursor:pointer;font-size:",K.base,";font-weight:500;padding:0;&:hover{text-decoration:underline;}",""),divider:g("width:1px;height:24px;background:",u.border,";margin:0 4px;",""),viewToggle:g("display:flex;align-items:center;height:",Zs,";background-color:",u.surface,";border:1px solid ",u.border,";border-radius:6px;overflow:hidden;",""),searchWrapper:{name:"9iujih",styles:"position:relative;display:flex;align-items:center"},searchInput:g("height:",Zs,";padding:0 32px 0 12px;border:1px solid ",u.border,";border-radius:6px;font-size:",K.base,";background:",u.surface,";color:",u.text,";width:180px;transition:all 0.15s ease;&:focus{outline:none;border-color:",u.primary,";box-shadow:0 0 0 2px ",u.primaryLight,";}&::placeholder{color:",u.textMuted,";}",""),searchClearBtn:g("position:absolute;right:5px;top:5px;bottom:5px;background:",u.primary,";border:none;padding:0 6px;cursor:pointer;color:white;display:flex;align-items:center;justify-content:center;border-radius:4px;transition:all 0.15s ease;&:hover{background:",u.primaryHover,";}",""),viewBtn:g("height:100%;padding:0 10px;background:transparent;border:none;cursor:pointer;color:",u.textSecondary,";transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{color:",u.text,";background-color:",u.surfaceHover,";}",""),viewBtnActive:g("background-color:",u.primaryLight,";color:",u.primary,";&:hover{background-color:",u.primaryLight,";color:",u.primary,";}","")};function sg(){const{selectedItems:o,viewMode:s,setViewMode:h,clearSelection:d,currentPath:p,triggerRefresh:y,focusedItem:A,scanRequested:U,clearScanRequest:D,fileItems:b,requestProcess:G,setProcessMode:R,actionState:V,cancelAction:ce}=Ya(),q=C.useRef(null),X=C.useRef(null),[pe,F]=C.useState(!1),[re,W]=C.useState(!1),[xe,_]=C.useState(!1),[me,Z]=C.useState(!1),[Q,N]=C.useState(!1),[ne,ye]=C.useState(0),[te,ee]=C.useState(!1),[ze,Le]=C.useState(0),[E,B]=C.useState(!1),[oe,Be]=C.useState(!1),[Ce,v]=C.useState(!1),[L,J]=C.useState(0),[I,ve]=C.useState(!1),[ke,_e]=C.useState("Processing Images"),[nt,Ae]=C.useState({current:0,total:0,percent:0,status:"processing"}),[Ot,le]=C.useState(null),[lt,Nt]=C.useState(!1),[se,it]=C.useState(!1),[Lt,$t]=C.useState(!1),[zn,On]=C.useState(!1),[Dl,cn]=C.useState(!1),[Va,ta]=C.useState(!1),[Ut,nl]=C.useState(!1),[Xa,Rl]=C.useState(!1),ll=C.useRef(null),Qa=C.useRef(null),vt=Th({setShowProgress:ve,setProgressTitle:_e,setProgressState:Ae,triggerRefresh:y}),_l=p==="public/images"||p.startsWith("public/images/");C.useCallback(()=>{q.current?.click()},[]);const zr=C.useCallback(()=>{Z(!0),y(),setTimeout(()=>Z(!1),600)},[y]),Ln=C.useCallback(async()=>{_(!0),_e("Scanning Files"),ve(!0),Ae({current:0,total:0,percent:0,status:"processing",message:"Scanning for files..."});try{const $=(await fetch("/api/studio/scan",{method:"POST"})).body?.getReader();if(!$)throw new Error("No reader");const de=new TextDecoder;let fe="";for(;;){const{done:Me,value:Ee}=await $.read();if(Me)break;fe+=de.decode(Ee,{stream:!0});const Ve=fe.split(`
|
|
70
|
+
|
|
71
|
+
`);fe=Ve.pop()||"";for(const Xe of Ve){if(!Xe.startsWith("data: "))continue;const De=JSON.parse(Xe.slice(6));if(De.type==="start")Ae({current:0,total:De.total,percent:0,status:"processing",message:`Scanning ${De.total} files...`});else if(De.type==="progress")Ae({current:De.current,total:De.total,percent:De.percent,status:"processing",currentFile:De.currentFile});else if(De.type==="cleanup")Ae(Yt=>({...Yt,message:De.message}));else if(De.type==="complete"){let Yt=De.renamed>0?`${De.renamed} file(s) renamed due to conflicts. `:"";De.orphanedFiles&&De.orphanedFiles.length>0&&(Yt+=`Found ${De.orphanedFiles.length} orphaned thumbnail(s) in images folder.`),Ae({current:De.total||0,total:De.total||0,percent:100,status:"complete",processed:De.added,alreadyProcessed:De.existingCount,errors:De.errors,orphanedFiles:De.orphanedFiles,pendingUpdates:De.pendingUpdates,orphanedEntries:De.orphanedEntries,message:Yt||void 0,isScan:!0}),y()}else De.type==="error"&&Ae({current:0,total:0,percent:0,status:"error",message:De.message||"Scan failed"})}}}catch(ie){console.error("Scan error:",ie),Ae({current:0,total:0,percent:0,status:"error",message:"Scan failed"})}finally{_(!1)}},[y]);C.useEffect(()=>{const ie=$=>{ll.current&&!ll.current.contains($.target)&&nl(!1),Qa.current&&!Qa.current.contains($.target)&&Rl(!1)};return document.addEventListener("mousedown",ie),()=>document.removeEventListener("mousedown",ie)},[]),C.useEffect(()=>{U&&!xe&&(D(),Ln())},[U,xe,D,Ln]);const jt=C.useCallback(async ie=>{const $=ie.target.files;if(!$||$.length===0)return;const de=Array.from($);de.length>1?(Ae({current:0,total:de.length,percent:0,status:"processing",message:"Uploading files..."}),ve(!0)):W(!0);let fe=0,Me=0;try{for(let Ee=0;Ee<de.length;Ee++){const Ve=de[Ee],Xe=new FormData;Xe.append("file",Ve),Xe.append("path",p);try{const De=await fetch("/api/studio/upload",{method:"POST",body:Xe});if(De.ok)fe++;else{const Yt=await De.json();Me++,de.length===1&&(De.status>=500?(console.error("Upload error:",Yt),le({title:"Upload Failed",message:`Failed to upload ${Ve.name}: ${Yt.error||"Unknown error"}`})):le({title:"Cannot Upload Here",message:Yt.error||"Upload not allowed in this location."}))}}catch{Me++}de.length>1&&Ae({current:Ee+1,total:de.length,percent:Math.round((Ee+1)/de.length*100),status:"processing",currentFile:Ve.name})}de.length>1&&Ae({current:de.length,total:de.length,percent:100,status:"complete",processed:fe,errors:Me}),y()}catch(Ee){console.error("Upload error:",Ee),de.length>1?Ae({current:0,total:0,percent:0,status:"error",message:"Upload failed."}):le({title:"Upload Failed",message:"Upload failed. Check console for details."})}finally{W(!1),q.current&&(q.current.value="")}},[p,y]),bn=C.useCallback(async ie=>{if(o.size>0){const de=Array.from(o),fe=de.filter(Ee=>(Ee.split("/").pop()||"").includes(".")&&!Ee.endsWith("/")),Me=de.filter(Ee=>!(Ee.split("/").pop()||"").includes(".")||Ee.endsWith("/"));if(Me.length>0)try{const Ve=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(Me.join(","))}`)).json();if(Ve.images)for(const Xe of Ve.images){const De=`public/${Xe}`;fe.includes(De)||fe.push(De)}}catch(Ee){console.error("Failed to get folder files:",Ee)}if(fe.length===0){le({title:"No Files Found",message:"No files found in the selected items."});return}R(ie),G(fe)}else try{const fe=await(await fetch("/api/studio/count-images")).json();if(!fe.images||fe.images.length===0){le({title:"No Images Found",message:"No images found in the public folder to process."});return}const Me=fe.images.map(Ee=>`public/${Ee}`);R(ie),G(Me)}catch(de){console.error("Failed to get images:",de),le({title:"Error",message:"Failed to get images."})}},[o,G,R]),qt=C.useCallback(()=>{vt.stop(),X.current&&(Ae(ie=>({...ie,status:"stopping"})),X.current.abort())},[vt]),Mr=C.useCallback(async()=>{const ie=nt.orphanedFiles;if(!(!ie||ie.length===0))try{const $=await fetch("/api/studio/delete-orphans",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:ie})}),de=await $.json();$.ok?(Ae(fe=>({...fe,orphanedFiles:void 0,orphansRemoved:de.deleted,message:`Deleted ${de.deleted} orphaned thumbnail${de.deleted!==1?"s":""}.`})),y()):le({title:"Delete Failed",message:de.error||"Failed to delete orphaned files."})}catch($){console.error("Delete orphans error:",$),le({title:"Delete Failed",message:"Failed to delete orphaned files. Check console for details."})}},[nt.orphanedFiles,y]),Tr=C.useCallback(async()=>{if(o.size===0)return;const ie=Array.from(o),$=ie.filter(Me=>(Me.split("/").pop()||"").includes(".")&&!Me.endsWith("/")),de=ie.filter(Me=>!(Me.split("/").pop()||"").includes(".")||Me.endsWith("/"));let fe=$.length;if(de.length>0)try{const Ee=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(de.join(","))}`)).json();Ee.images&&(fe+=Ee.images.length)}catch(Me){console.error("Failed to get folder files:",Me)}ye(fe),N(!0)},[o]),Ar=C.useCallback(async()=>{N(!1);const ie=Array.from(o);ie.length!==0&&await vt.execute({endpoint:"/api/studio/delete-stream",body:{paths:ie},title:"Deleting Files",onComplete:()=>{d()}})},[o,d,vt]),na=C.useCallback(async()=>{if(o.size===0)return;const ie=Array.from(o),$=ie.filter(Xe=>(Xe.split("/").pop()||"").includes(".")&&!Xe.endsWith("/")),de=ie.filter(Xe=>!(Xe.split("/").pop()||"").includes(".")||Xe.endsWith("/")),fe=de.length>0;if(fe)try{const De=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(de.join(","))}`)).json();if(De.images)for(const Yt of De.images){const Wa=`public/${Yt}`;$.includes(Wa)||$.push(Wa)}}catch(Xe){console.error("Failed to get folder files:",Xe)}if($.length===0){le({title:"No Files Found",message:"No files found in the selected items."});return}let Me=!1,Ee=!1,Ve=0;for(const Xe of $){const De=b.find(Yt=>Yt.path===Xe);De?De.isRemote?Me=!0:De.cdnPushed?Ve++:Ee=!0:fe&&(Ee=!0)}if(!fe&&Ve===$.length){le({title:"Already Pushed",message:`All ${$.length} file${$.length!==1?"s are":" is"} already on the CDN.`});return}Le($.length),B(Me),Be(Ee),ee(!0)},[o,b]),la=C.useCallback(async()=>{ee(!1);const ie=Array.from(o),$=ie.filter(Me=>(Me.split("/").pop()||"").includes(".")&&!Me.endsWith("/")),de=ie.filter(Me=>!(Me.split("/").pop()||"").includes(".")||Me.endsWith("/"));if(de.length>0)try{const Ee=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(de.join(","))}`)).json();if(Ee.images)for(const Ve of Ee.images){const Xe=`public/${Ve}`;$.includes(Xe)||$.push(Xe)}}catch(Me){console.error("Failed to get folder files:",Me)}const fe=$.map(Me=>"/"+Me.replace(/^public\//,""));fe.length!==0&&await vt.execute({endpoint:"/api/studio/sync-stream",body:{imageKeys:fe},title:"Pushing to CDN",onComplete:()=>{d()},onError:Me=>{(Me.includes("R2 not configured")||Me.includes("CLOUDFLARE_R2"))&&(ve(!1),cn(!0))}})},[o,d,vt]),[Ol,Un]=C.useState([]),[aa,Ll]=C.useState(0),Er=C.useCallback(async()=>{if(o.size===0)return;const ie=Array.from(o),$=ie.filter(Ee=>(Ee.split("/").pop()||"").includes(".")&&!Ee.endsWith("/")),de=ie.filter(Ee=>!(Ee.split("/").pop()||"").includes(".")||Ee.endsWith("/")),fe=de.length>0;if(fe)try{const Ve=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(de.join(","))}`)).json();if(Ve.images)for(const Xe of Ve.images){const De=`public/${Xe}`;$.includes(De)||$.push(De)}}catch(Ee){console.error("Failed to get folder files:",Ee)}if($.length===0){le({title:"No Files Found",message:"No files found in the selected items."});return}let Me;if(fe)Me=$;else if(Me=$.filter(Ee=>{const Ve=b.find(Xe=>Xe.path===Ee);return Ve&&Ve.cdnPushed&&!Ve.isRemote}),Me.length===0){le({title:"No CDN Files",message:`None of the ${$.length} selected file${$.length!==1?"s are":" is"} on the CDN.`});return}Un(Me),Ll($.length),J(Me.length),v(!0)},[o,b]),Wi=C.useCallback(async()=>{v(!1),V.showDownloadConfirm&&ce();const $=(V.showDownloadConfirm?V.actionPaths:Ol).map(de=>"/"+de.replace(/^public\//,""));await vt.execute({endpoint:"/api/studio/download-stream",body:{imageKeys:$},title:"Downloading from CDN",onComplete:()=>d()})},[Ol,d,V.showDownloadConfirm,V.actionPaths,ce,vt]),Za=C.useCallback(async()=>{if(o.size===0)return;const $=Array.from(o).filter(de=>{const fe=b.find(Me=>Me.path===de);return fe&&(fe.hasUpdate||fe.type==="folder"&&fe.updateCount&&fe.updateCount>0)});if($.length===0){le({title:"No Updates",message:"No files with pending updates in selection."});return}await vt.execute({endpoint:"/api/studio/push-updates-stream",body:{paths:$},title:"Pushing Updates",onComplete:()=>d()})},[o,b,d,vt]),Ul=C.useCallback(async()=>{if(o.size===0)return;const $=Array.from(o).filter(de=>{const fe=b.find(Me=>Me.path===de);return fe&&(fe.hasUpdate||fe.type==="folder"&&fe.updateCount&&fe.updateCount>0)});if($.length!==0)try{const de=await fetch("/api/studio/cancel-updates",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:$})});if(de.ok)d(),y();else{const fe=await de.json();le({title:"Cancel Failed",message:fe.error||"Unknown error"})}}catch(de){console.error("Cancel updates error:",de),le({title:"Cancel Failed",message:"Failed to cancel updates. Check console for details."})}},[o,b,d,y]),kr=C.useCallback(async ie=>{Nt(!1);try{const $=await fetch("/api/studio/create-folder",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({parentPath:p,name:ie})});if($.ok)y();else{const de=await $.json();le({title:"Create Folder Failed",message:de.error||"Unknown error"})}}catch($){console.error("Create folder error:",$),le({title:"Create Folder Failed",message:"Failed to create folder. Check console for details."})}},[p,y]),Ii=C.useCallback(()=>{o.size!==0&&On(!0)},[o]),Pi=C.useCallback(async ie=>{const $=Array.from(o);await vt.execute({endpoint:"/api/studio/move",body:{paths:$,destination:ie},title:"Moving Files",onComplete:()=>d()})},[o,d,vt]),{searchQuery:Ka,setSearchQuery:Hn}=Ya(),Ja=C.useCallback(ie=>{Hn(ie.target.value)},[Hn]),eo=C.useCallback(ie=>{ie.key==="Escape"&&(ie.stopPropagation(),Hn(""),ie.target.blur())},[Hn]),xn=o.size>0;xn&&Array.from(o).some(ie=>{const $=b.find(de=>de.path===ie);return $&&$.cdnPushed&&!$.isRemote}),xn&&Array.from(o).every(ie=>{const $=b.find(de=>de.path===ie);return $&&$.type==="file"&&$.cdnPushed&&!$.isRemote});const Mn=xn&&Array.from(o).some(ie=>{const $=b.find(de=>de.path===ie);return $&&($.hasUpdate||$.type==="folder"&&$.updateCount&&$.updateCount>0)}),ut=Array.from(o),mt=ut.length===1&&!ut[0].includes("."),Wt=mt?ut[0]:null,ia=Wt&&Wt.split("/").pop()||"",al=ut.length===1&&ut[0].includes("."),il=al?ut[0]:null,Fa=il&&il.split("/").pop()||"",Hl=C.useCallback(async ie=>{Wt&&(it(!1),await vt.execute({endpoint:"/api/studio/rename-stream",body:{oldPath:Wt,newName:ie},title:"Renaming Folder",onComplete:()=>d()}))},[Wt,d,vt]),$a=C.useCallback(async ie=>{il&&($t(!1),await vt.execute({endpoint:"/api/studio/rename-stream",body:{oldPath:il,newName:ie},title:"Renaming File",onComplete:()=>d()}))},[il,d,vt]),Bn=x(rt,{children:[(Ce||V.showDownloadConfirm)&&c(Vi,{title:"Download from CDN",message:(()=>{const ie=V.showDownloadConfirm?V.downloadImageCount:L,$=V.showDownloadConfirm?V.downloadTotalSelected:aa;return $>ie?`Download ${ie} of ${$} selected file${$!==1?"s":""} from Cloudflare R2? (${$-ie} not on CDN)`:`Download ${ie} image${ie!==1?"s":""} from Cloudflare R2 to local storage? Images will be removed from the CDN.`})(),confirmLabel:"Download",onConfirm:Wi,onCancel:()=>{v(!1),V.showDownloadConfirm&&ce()}}),I&&c(ea,{title:ke,progress:nt,onStop:qt,onDeleteOrphans:Mr,onClose:()=>{ve(!1),Ae({current:0,total:0,percent:0,status:"processing"}),y()}})]});return A?Bn:x(rt,{children:[Bn,Q&&c(Vi,{title:"Delete Items",message:`Are you sure you want to delete ${ne} file${ne!==1?"s":""}? This action cannot be undone.`,confirmLabel:"Delete",variant:"danger",onConfirm:Ar,onCancel:()=>N(!1)}),te&&c(Vi,{title:"Push to CDN",message:`Push ${ze} image${ze!==1?"s":""} to Cloudflare R2?${E?" Remote images will be downloaded first.":""}${oe?" After pushing, local files will be deleted.":""}`,confirmLabel:"Push",onConfirm:la,onCancel:()=>ee(!1)}),lt&&c(vr,{title:"New Folder",message:"Enter a name for the new folder:",placeholder:"Folder name",confirmLabel:"Create",onConfirm:kr,onCancel:()=>Nt(!1)}),zn&&c(Ah,{selectedItems:o,currentPath:p,onMove:ie=>{On(!1),Pi(ie)},onCancel:()=>On(!1)}),se&&Wt&&c(vr,{title:"Rename Folder",message:"Enter a new name for the folder:",placeholder:ia,defaultValue:ia,confirmLabel:"Rename",onConfirm:Hl,onCancel:()=>it(!1)}),Lt&&il&&c(vr,{title:"Rename File",message:"Enter a new name for the file:",placeholder:Fa,defaultValue:Fa,confirmLabel:"Rename",onConfirm:$a,onCancel:()=>$t(!1)}),Ot&&c(Mh,{title:Ot.title,message:Ot.message,onClose:()=>{le(null),y()}}),c(Eh,{isOpen:Dl,onClose:()=>cn(!1)}),pe&&c(lg,{currentPath:p,onClose:()=>F(!1),onUploadComplete:()=>{F(!1),y()},streamingOperation:vt,setShowProgress:ve,setProgressTitle:_e,setProgressState:Ae}),x("div",{css:be.toolbar,children:[c("input",{ref:q,type:"file",multiple:!0,accept:"image/*,video/*,audio/*,.pdf",onChange:jt,style:{display:"none"}}),x("div",{css:be.left,children:[x("button",{css:[be.btn,be.btnPrimary,"",""],onClick:()=>F(!0),disabled:re||_l,children:[c(ug,{}),"Add New"]}),x("button",{css:be.btn,onClick:()=>{al?$t(!0):mt?it(!0):Nt(!0)},disabled:_l&&!mt&&!al,title:_l&&!mt&&!al?"Cannot create folders in protected images folder":void 0,children:[al||mt?c(mg,{}):c(pg,{}),al?"Rename File":mt?"Rename Folder":"New Folder"]}),c("div",{css:be.divider}),x("div",{css:be.cloudDropdownWrapper,ref:Qa,children:[x("button",{css:be.btn,onClick:()=>Rl(!Xa),disabled:V.showProgress||_l,title:_l?"Cannot process images folder":void 0,children:[c(Cg,{}),"Thumbnails",c("svg",{css:be.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"})})]}),Xa&&x("div",{css:be.cloudDropdown,children:[x("button",{css:[be.cloudDropdownItem,be.cloudDropdownItemDefault,"",""],onClick:()=>{Rl(!1),bn("generate")},children:[c(wg,{}),"Generate Thumbnails"]}),x("button",{css:[be.cloudDropdownItem,be.cloudDropdownItemDanger,"",""],onClick:()=>{Rl(!1),bn("remove")},children:[c(zg,{}),"Remove Thumbnails"]})]})]}),x("button",{css:[be.btn,be.btnDanger,"",""],onClick:Tr,disabled:!xn,children:[c(hg,{}),"Delete"]}),x("button",{css:be.btn,onClick:Ii,disabled:!xn,children:[c(gg,{}),"Move"]}),x("div",{css:be.cloudDropdownWrapper,ref:ll,children:[x("button",{css:[be.btn,be.btnCloud,"",""],onClick:()=>nl(!Ut),disabled:!xn,children:[c(sh,{}),"Cloud",c("svg",{css:be.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&&xn&&x("div",{css:be.cloudDropdown,children:[Mn&&x(rt,{children:[x("button",{css:be.cloudDropdownItem,onClick:()=>{nl(!1),Za()},children:[c(yg,{}),"Push Update"]}),x("button",{css:[be.cloudDropdownItem,be.cloudDropdownItemDanger,"",""],onClick:()=>{nl(!1),Ul()},children:[c(vg,{}),"Cancel Update"]}),c("div",{css:be.cloudDropdownDivider})]}),x("button",{css:be.cloudDropdownItem,onClick:()=>{nl(!1),na()},children:[c(sh,{}),"Push CDN"]}),x("button",{css:be.cloudDropdownItem,onClick:()=>{nl(!1),Er()},children:[c(bg,{}),"Download"]})]})]}),x("div",{css:be.searchWrapper,children:[c("input",{css:be.searchInput,type:"text",placeholder:"Search images...",value:Ka,onChange:Ja,onKeyDown:eo}),Ka&&c("button",{css:be.searchClearBtn,onClick:()=>Hn(""),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:be.right,children:[xn&&x("span",{css:be.selectionCount,children:[o.size," selected",c("button",{css:be.clearBtn,onClick:d,children:"Clear"})]}),x("button",{css:be.btn,onClick:Ln,disabled:xe,children:[c(dg,{spinning:xe}),"Scan"]}),c("button",{css:be.btn,onClick:zr,title:"Refresh view",disabled:me,children:c(fg,{spinning:me})}),x("div",{css:be.viewToggle,children:[c("button",{css:[be.viewBtn,s==="grid"&&be.viewBtnActive,"",""],onClick:()=>h("grid"),"aria-label":"Grid view",children:c(xg,{})}),c("button",{css:[be.viewBtn,s==="list"&&be.viewBtnActive,"",""],onClick:()=>h("list"),"aria-label":"List view",children:c(Sg,{})})]}),c(ig,{})]})]})]})}function ug(){return c("svg",{css:be.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 dg({spinning:o}){return c("svg",{css:[be.icon,o&&be.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 fg({spinning:o}){return c("svg",{css:[be.icon,o&&be.iconSpin,"",""],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 hg(){return c("svg",{css:be.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 pg(){return c("svg",{css:be.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 mg(){return c("svg",{css:be.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 gg(){return c("svg",{css:be.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:be.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 yg(){return c("svg",{css:be.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 vg(){return c("svg",{css:be.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 bg(){return c("svg",{css:be.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 xg(){return c("svg",{css:be.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 Sg(){return c("svg",{css:be.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 Cg(){return c("svg",{css:be.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 wg(){return c("svg",{css:be.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 zg(){return c("svg",{css:be.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 Mg{async get(s){const h=await fetch(s,{cache:"no-store",headers:{"Cache-Control":"no-cache"}});if(!h.ok){const d=await h.json().catch(()=>({}));throw new Error(d.error||`Request failed: ${h.status}`)}return h.json()}async post(s,h){const d=await fetch(s,{method:"POST",headers:h?{"Content-Type":"application/json"}:void 0,body:h?JSON.stringify(h):void 0});if(!d.ok){const p=await d.json().catch(()=>({}));throw new Error(p.error||`Request failed: ${d.status}`)}return d.json()}async list(s="public"){return this.get(`/api/studio/list?path=${encodeURIComponent(s)}`)}async search(s,h="public"){return this.get(`/api/studio/search?q=${encodeURIComponent(s)}&path=${encodeURIComponent(h)}`)}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 d=new FormData;d.append("file",s),d.append("path",h);const p=await fetch("/api/studio/upload",{method:"POST",body:d});if(!p.ok){const y=await p.json().catch(()=>({}));throw new Error(y.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")}async checkFeaturedImage(){return this.get("/api/studio/check-featured-image")}async getFeaturedImageOptions(){return this.get("/api/studio/featured-image-options")}}const Gi=new Mg;function kh(){const{currentPath:o,setCurrentPath:s,navigateUp:h,selectedItems:d,toggleSelection:p,selectRange:y,lastSelectedPath:A,selectAll:U,clearSelection:D,refreshKey:b,setFocusedItem:G,triggerRefresh:R,triggerScan:V,searchQuery:ce,showError:q,setFileItems:X}=Ya(),[pe,F]=C.useState([]),[re,W]=C.useState(!0),[xe,_]=C.useState(!1),[me,Z]=C.useState(null),Q=C.useRef(!0),N=C.useRef(o);C.useEffect(()=>{async function Ce(){const v=N.current!==o;(Q.current||v)&&W(!0),N.current=o;try{const L=ce&&ce.length>=2?await Gi.search(ce,o):await Gi.list(o),J=L.items||[];F(J),X(J),_(L.isEmpty===!0)}catch(L){const J=L instanceof Error?L.message:"Failed to load items";q("Load Error",J),F([]),X([]),_(!1)}W(!1),Q.current=!1}Ce()},[o,b,ce,q,X]),C.useEffect(()=>{async function Ce(){if(o!=="public"){Z(null);return}try{const v=await Gi.checkFeaturedImage();Z(v)}catch{Z(null)}}Ce()},[o,b]);const ne=o==="public",ye=ce&&ce.length>=2,te=[...pe].sort((Ce,v)=>Ce.type==="folder"&&v.type!=="folder"?-1:Ce.type!=="folder"&&v.type==="folder"?1:Ce.name.localeCompare(v.name)),ee=te.length>0&&te.every(Ce=>d.has(Ce.path)),ze=te.some(Ce=>d.has(Ce.path)),Le=C.useCallback((Ce,v)=>{v.shiftKey&&A?y(A,Ce.path,te):p(Ce.path)},[A,y,te,p]),E=C.useCallback(Ce=>{Ce.type==="folder"?s(Ce.path):G(Ce)},[s,G]),B=C.useCallback(async Ce=>{try{const v="/"+Ce.path.replace(/^public\//,"");await Gi.reprocess([v]),R()}catch(v){const L=v instanceof Error?v.message:"Failed to generate thumbnail";q("Processing Error",L)}},[R,q]),oe=C.useCallback(()=>{ee?D():U(te)},[ee,D,U,te]),Be=me&&!me.exists?me:null;return{items:pe,loading:re,sortedItems:te,metaEmpty:xe,missingFeaturedImage:Be,isAtRoot:ne,isSearching:ye,allItemsSelected:ee,someItemsSelected:ze,currentPath:o,selectedItems:d,navigateUp:h,handleItemClick:Le,handleOpen:E,handleGenerateThumbnail:B,handleSelectAll:oe,triggerScan:V,triggerRefresh:R}}const Tg=rn`
|
|
72
|
+
from { opacity: 0; }
|
|
73
|
+
to { opacity: 1; }
|
|
74
|
+
`,Ag=rn`
|
|
75
|
+
from { transform: translateY(-20px); opacity: 0; }
|
|
76
|
+
to { transform: translateY(0); opacity: 1; }
|
|
77
|
+
`,Eg=rn`
|
|
78
|
+
to { transform: rotate(360deg); }
|
|
79
|
+
`,Rt={overlay:g("position:fixed;inset:0;z-index:1000;display:flex;align-items:center;justify-content:center;background:rgba(0, 0, 0, 0.5);animation:",Tg," 0.15s ease;",""),modal:g("background:",u.surface,";border-radius:12px;box-shadow:0 20px 40px rgba(0, 0, 0, 0.2);width:100%;max-width:440px;animation:",Ag," 0.2s ease;overflow:hidden;",""),header:g("padding:20px 24px;border-bottom:1px solid ",u.border,";",""),title:g("font-size:",K.lg,";font-weight:600;color:",u.text,";margin:0;",""),subtitle:g("font-size:",K.sm,";color:",u.textSecondary,";margin:4px 0 0 0;",""),body:{name:"1a7zdz",styles:"padding:24px;display:flex;flex-direction:column;gap:12px"},loading:{name:"uphaut",styles:"display:flex;align-items:center;justify-content:center;padding:40px"},spinner:g("width:24px;height:24px;border-radius:50%;border:2px solid ",u.border,";border-top-color:",u.primary,";animation:",Eg," 0.8s linear infinite;",""),urlButton:g("display:flex;flex-direction:column;align-items:flex-start;gap:4px;padding:16px 20px;background:",u.background,";border:1px solid ",u.border,";border-radius:8px;cursor:pointer;transition:all 0.15s ease;text-align:left;&:hover:not(:disabled){background:",u.surfaceHover,";border-color:",u.primary,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),urlLabel:g("font-size:",K.xs,";font-weight:600;color:",u.textSecondary,";text-transform:uppercase;letter-spacing:0.05em;",""),urlValue:g("font-size:",K.base,";font-weight:500;color:",u.text,";word-break:break-all;",""),noOptions:g("padding:20px;text-align:center;color:",u.textSecondary,";font-size:",K.sm,";",""),footer:g("padding:16px 24px;border-top:1px solid ",u.border,";display:flex;justify-content:flex-end;",""),cancelBtn:g("padding:10px 20px;font-size:",K.base,";font-weight:500;background:",u.surface,";border:1px solid ",u.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;color:",u.text,";&:hover{background:",u.surfaceHover,";border-color:",u.borderHover,";}","")};function Dh({isOpen:o,onClose:s,onSelect:h}){const[d,p]=C.useState(!0),[y,A]=C.useState(null),[U,D]=C.useState(null);if(C.useEffect(()=>{if(!o)return;async function G(){p(!0);try{const R=await Gi.getFeaturedImageOptions();A(R.devUrl),D(R.productionUrl)}catch(R){console.error("Failed to load featured image options:",R)}p(!1)}G()},[o]),!o)return null;const b=y||U;return c("div",{css:Rt.overlay,onClick:s,children:x("div",{css:Rt.modal,onClick:G=>G.stopPropagation(),children:[x("div",{css:Rt.header,children:[c("h2",{css:Rt.title,children:"Generate Featured Image"}),c("p",{css:Rt.subtitle,children:"Choose which URL to screenshot"})]}),c("div",{css:Rt.body,children:d?c("div",{css:Rt.loading,children:c("div",{css:Rt.spinner})}):b?x(rt,{children:[y&&x("button",{css:Rt.urlButton,onClick:()=>h(y),children:[c("span",{css:Rt.urlLabel,children:"Development"}),c("span",{css:Rt.urlValue,children:y})]}),U&&x("button",{css:Rt.urlButton,onClick:()=>h(U),children:[c("span",{css:Rt.urlLabel,children:"Production"}),c("span",{css:Rt.urlValue,children:U})]})]}):x("div",{css:Rt.noOptions,children:["No URLs configured. Set ",c("code",{children:"NEXT_PUBLIC_PRODUCTION_URL"})," in .env.local and/or .env.production."]})}),c("div",{css:Rt.footer,children:c("button",{css:Rt.cancelBtn,onClick:s,children:"Cancel"})})]})})}const kg=rn`
|
|
80
|
+
to { transform: rotate(360deg); }
|
|
81
|
+
`,P={loading:{name:"1d2ui9i",styles:"display:flex;align-items:center;justify-content:center;flex:1;min-height:300px"},spinner:g("width:32px;height:32px;border-radius:50%;border:3px solid ",u.border,";border-top-color:",u.primary,";animation:",kg," 0.8s linear infinite;",""),empty:g("display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1;min-height:300px;color:",u.textSecondary,";",""),emptyIcon:{name:"1o3cbsn",styles:"width:48px;height:48px;margin-bottom:16px;opacity:0.5"},emptyText:g("font-size:",K.base,";margin:0 0 4px 0;&:last-child{color:",u.textMuted,";font-size:",K.sm,";}",""),scanButton:g("margin-top:16px;padding:10px 24px;font-size:",K.base,";font-weight:500;background:",u.primary,";color:white;border:none;border-radius:8px;cursor:pointer;transition:background 0.15s ease;&:hover:not(:disabled){background:",u.primaryHover,";}&:disabled{opacity:0.6;cursor:not-allowed;}",""),grid:{name:"el23hk",styles:"display:grid;grid-template-columns:1fr;gap:12px;@media (min-width: 480px){grid-template-columns:repeat(2, 1fr);}@media (min-width: 768px){grid-template-columns:repeat(3, 1fr);}@media (min-width: 1024px){grid-template-columns:repeat(4, 1fr);}@media (min-width: 1280px){grid-template-columns:repeat(5, 1fr);}"},item:g("position:relative;border-radius:8px;border:1px solid ",u.border,";overflow:hidden;cursor:pointer;transition:all 0.15s ease;background-color:",u.surface,";user-select:none;box-shadow:0 1px 2px rgba(0, 0, 0, 0.04);&:hover{border-color:#d0d5dd;box-shadow:0 2px 4px rgba(0, 0, 0, 0.06);}",""),itemSelected:g("border-color:",u.primary,";box-shadow:0 0 0 1px ",u.primary,";&:hover{border-color:",u.primary,";box-shadow:0 0 0 1px ",u.primary,";}",""),parentItem:g("cursor:pointer;&:hover{border-color:",u.primary,";}",""),checkboxWrapper:{name:"v3lnpt",styles:"position:absolute;top:0;left:0;z-index:10;padding:8px;cursor:pointer"},checkbox:g("width:18px;height:18px;accent-color:",u.primary,";cursor:pointer;",""),content:g("position:relative;aspect-ratio:1;display:flex;align-items:center;justify-content:center;padding:16px;background:",u.background,";",""),contentCloud:g("",""),contentRemote:g("",""),folderIcon:{name:"k1w47f",styles:"width:56px;height:56px;color:#f9935e"},imagesFolderIcon:g("width:56px;height:56px;color:",u.imagesFolder,";",""),imagesFolderWrapper:{name:"bjn8wh",styles:"position:relative"},lockIcon:g("position:absolute;bottom:4px;right:4px;width:16px;height:16px;color:",u.imagesFolder,";background:white;border-radius:50%;padding:2px;",""),parentIcon:g("width:56px;height:56px;color:",u.textMuted,";",""),fileIcon:g("width:40px;height:40px;color:",u.textMuted,";",""),image:{name:"rm1wug",styles:"max-width:100%;max-height:100%;object-fit:contain;border-radius:4px"},label:g("padding:10px 12px;background-color:",u.surface,";border-top:1px solid ",u.borderLight,";",""),labelRow:{name:"1gkgtms",styles:"display:flex;flex-direction:column;gap:2px"},labelText:{name:"fxp7t8",styles:"flex:1;min-width:0"},copyBtn:g("position:absolute;top:4px;right:4px;z-index:10;height:28px;width:28px;color:",u.textMuted,";background:transparent;border:none;padding:0;cursor:pointer;border-radius:4px;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{color:",u.text,";}",""),copyIcon:{name:"1eg0rk6",styles:"width:18px;height:18px"},folderStats:{name:"905wvx",styles:"display:flex;align-items:center;gap:8px;margin:2px 0 0 0"},folderStat:g("display:flex;align-items:center;gap:3px;font-size:",K.xs,";",""),folderStatLocal:g("color:",u.textMuted,";",""),folderStatCloud:{name:"1t8qh25",styles:"color:#f59e0b"},folderStatRemote:{name:"1lukubv",styles:"color:#ef4444"},folderStatUpdate:{name:"1t8qh25",styles:"color:#f59e0b"},folderStatIconCloud:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},folderStatIconLocal:g("width:14px;height:14px;color:",u.textSecondary,";",""),folderStatIconRemote:{name:"efr29r",styles:"width:14px;height:14px;color:#ef4444"},folderStatIconUpdate:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},updateLabel:g("color:#f59e0b;font-size:",K.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:g("display:inline-flex;align-items:center;justify-content:center;padding:1px 4px;font-size:9px;font-weight:600;border-radius:3px;background:rgba(0, 0, 0, 0.08);color:",u.textMuted,";text-transform:uppercase;letter-spacing:0.02em;",""),storedIconCloud:{name:"1e09qmx",styles:"width:16px;height:16px;color:#f59e0b"},storedIconRemote:{name:"1mrh6ju",styles:"width:16px;height:16px;color:#ef4444"},tooltip:{name:"qoyfdh",styles:"position:absolute;top:50%;right:100%;transform:translateY(-50%);background:#1a1f36;color:white;padding:4px 8px;border-radius:4px;font-size:12px;white-space:nowrap;margin-right:6px;pointer-events:none;z-index:100;&::before{content:'';position:absolute;left:100%;top:50%;transform:translateY(-50%);border:4px solid transparent;border-left-color:#1a1f36;}"},openBtn:g("position:absolute;bottom:8px;right:8px;z-index:10;height:28px;font-size:",K.sm,";font-weight:500;color:",u.primary,";background:",u.surface,";border:1px solid ",u.border,";padding:0 8px;cursor:pointer;border-radius:4px;transition:all 0.15s ease;display:flex;align-items:center;box-shadow:0 1px 2px rgba(0, 0, 0, 0.08);&:hover{background-color:",u.primaryLight,";border-color:",u.primary,";}",""),featuredPlaceholder:g("position:relative;border-radius:8px;border:2px dashed ",u.success,";overflow:hidden;cursor:pointer;transition:all 0.15s ease;background-color:",u.background,";&:hover{border-color:",u.success,";background-color:",u.successLight,";}",""),featuredContent:{name:"y8o17o",styles:"position:relative;aspect-ratio:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:16px;gap:8px"},featuredIcon:g("width:40px;height:40px;color:",u.success,";",""),featuredText:g("font-size:",K.sm,";color:",u.success,";text-align:center;font-weight:500;",""),featuredLabel:g("padding:10px 12px;background-color:",u.surface,";border-top:1px solid ",u.borderLight,";",""),name:g("font-size:",K.sm,";font-weight:500;color:",u.text,";white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0;letter-spacing:-0.01em;direction:rtl;text-align:left;",""),size:g("font-size:",K.xs,";color:",u.textMuted,";margin:2px 0 0 0;",""),selectAllRow:g("display:flex;align-items:center;margin-bottom:16px;padding:12px 16px;background:",u.surface,";border-radius:8px;border:1px solid ",u.border,";",""),selectAllLabel:g("display:flex;align-items:center;gap:10px;font-size:",K.base,";font-weight:500;color:",u.textSecondary,";cursor:pointer;&:hover{color:",u.text,";}",""),selectAllCheckbox:g("width:16px;height:16px;accent-color:",u.primary,";","")};function Dg(){const{loading:o,sortedItems:s,metaEmpty:h,missingFeaturedImage:d,isAtRoot:p,isSearching:y,allItemsSelected:A,someItemsSelected:U,selectedItems:D,navigateUp:b,handleItemClick:G,handleOpen:R,handleGenerateThumbnail:V,handleSelectAll:ce,triggerScan:q,triggerRefresh:X}=kh(),[pe,F]=C.useState(!1),[re,W]=C.useState(!1),[xe,_]=C.useState({current:0,total:3,percent:0,status:"processing",message:"Generating featured image..."}),me=()=>{F(!0)},Z=async Q=>{F(!1),W(!0),_({current:0,total:4,percent:0,status:"processing",message:"Starting..."});try{const N=await fetch("/api/studio/generate-featured-image",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:Q})});if(!N.ok){const te=await N.json();_({current:0,total:4,percent:0,status:"error",message:te.error||"Failed to generate featured image"});return}const ne=N.body?.getReader(),ye=new TextDecoder;if(ne){let te="";for(;;){const{done:ee,value:ze}=await ne.read();if(ee)break;te+=ye.decode(ze,{stream:!0});const Le=te.split(`
|
|
82
|
+
`);te=Le.pop()||"";for(const E of Le)if(E.startsWith("data: "))try{const B=JSON.parse(E.slice(6));B.type==="start"?_(oe=>({...oe,total:B.total,message:`Screenshotting ${B.url}...`})):B.type==="progress"?_({current:B.current,total:B.total,percent:B.percent,status:"processing",message:B.message}):B.type==="complete"?(_({current:B.processed,total:B.processed,percent:100,status:B.errors>0?"error":"complete",message:B.message}),X()):B.type==="error"&&_(oe=>({...oe,status:"error",message:B.message}))}catch{}}}}catch(N){console.error("Featured image generation error:",N),_({current:0,total:3,percent:0,status:"error",message:"An error occurred while generating the featured image"})}};return o?x(rt,{children:[re&&c(ea,{title:"Generating Featured Image",progress:xe,onClose:()=>W(!1)}),c("div",{css:P.loading,children:c("div",{css:P.spinner})})]}):h&&p?x("div",{css:P.empty,children:[c("svg",{css:P.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:P.emptyText,children:"No files tracked yet"}),c("p",{css:P.emptyText,children:"Click Scan to discover files in your public folder"}),c("button",{css:P.scanButton,onClick:q,children:"Scan for Files"})]}):s.length===0&&p?x("div",{css:P.empty,children:[c("svg",{css:P.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:P.emptyText,children:"No files in this folder"}),c("p",{css:P.emptyText,children:"Upload images or click Scan in the toolbar"})]}):x(rt,{children:[c(Dh,{isOpen:pe,onClose:()=>F(!1),onSelect:Z}),re&&c(ea,{title:"Generating Featured Image",progress:xe,onClose:()=>W(!1)}),x("div",{children:[s.length>0&&c("div",{css:P.selectAllRow,children:x("label",{css:P.selectAllLabel,children:[c("input",{type:"checkbox",css:P.selectAllCheckbox,checked:A,ref:Q=>{Q&&(Q.indeterminate=U&&!A)},onChange:ce}),"Select all (",s.length,")"]})}),x("div",{css:P.grid,children:[!p&&!y&&x("div",{css:[P.item,P.parentItem,"",""],onClick:b,children:[c("div",{css:P.content,children:c("svg",{css:P.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:P.label,children:[c("p",{css:P.name,children:".."}),c("p",{css:P.size,children:"Parent folder"})]})]}),s.map(Q=>c(_g,{item:Q,isSelected:D.has(Q.path),onClick:N=>G(Q,N),onOpen:()=>R(Q),onGenerateThumbnail:()=>V(Q)},Q.path)),p&&d&&!y&&x("div",{css:P.featuredPlaceholder,onClick:me,title:`Generate ${d.filename}`,children:[x("div",{css:P.featuredContent,children:[c("svg",{css:P.featuredIcon,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("span",{css:P.featuredText,children:"Generate Featured Image"})]}),x("div",{css:P.featuredLabel,children:[c("p",{css:P.name,children:d.filename}),c("p",{css:P.size,children:"Click to screenshot homepage"})]})]})]})]})]})}function Rg(o){return o.includes("/images/sm/")?"SM":o.includes("/images/md/")?"MD":o.includes("/images/lg/")?"LG":o.includes("/images/full/")?"FULL":null}function _g({item:o,isSelected:s,onClick:h,onOpen:d,onGenerateThumbnail:p}){const[y,A]=C.useState(!1),U=o.type==="folder",D=!U&&o.thumbnail!==void 0,b=o.isProtected||U&&o.name==="images"&&o.path==="public/images",G=Rg(o.path),R=!U&&(o.hasSm||o.hasMd||o.hasLg||o.hasFull||G),V=q=>{q.stopPropagation();const X="/"+o.path.replace(/^public\//,"");navigator.clipboard.writeText(X),A(!0),setTimeout(()=>A(!1),1500)},ce=q=>{if(b){q.stopPropagation(),d();return}h(q)};return x("div",{css:[P.item,s&&!b&&P.itemSelected,"",""],onClick:ce,children:[!b&&c("div",{css:P.checkboxWrapper,onClick:q=>q.stopPropagation(),children:c("input",{type:"checkbox",css:P.checkbox,checked:s,onChange:()=>h({})})}),x("div",{css:[P.content,o.isCloud&&P.contentCloud,o.isRemote&&P.contentRemote,"",""],children:[x("button",{css:P.copyBtn,onClick:V,title:"Copy file path",children:[y&&c("span",{css:P.tooltip,children:"Copied!"}),c("svg",{css:P.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:P.openBtn,onClick:q=>{q.stopPropagation(),d()},children:"Open"}),U?b?x("div",{css:P.imagesFolderWrapper,children:[c("svg",{css:P.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:P.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:P.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"})}):D&&o.thumbnail?c("img",{css:P.image,src:o.thumbnail,alt:o.name,loading:"lazy"}):c("svg",{css:P.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:P.label,children:c("div",{css:P.labelRow,children:x("div",{css:P.labelText,children:[c("p",{css:P.name,title:o.name,children:o.name}),U?x("div",{css:P.folderStats,children:[o.localCount!==void 0&&o.localCount>0&&x("span",{css:[P.folderStat,P.folderStatLocal,"",""],title:`${o.localCount} local`,children:[c("svg",{css:P.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:[P.folderStat,P.folderStatCloud,"",""],title:`${o.cloudCount} in cloud`,children:[c("svg",{css:P.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:[P.folderStat,P.folderStatRemote,"",""],title:`${o.remoteCount} remote`,children:[c("svg",{css:P.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:[P.folderStat,P.folderStatUpdate,"",""],title:`${o.updateCount} pending update${o.updateCount!==1?"s":""}`,children:[c("svg",{css:P.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:P.size,children:[o.fileCount," files"]})]}):x("div",{css:P.statusRow,children:[c("div",{css:P.statusLeft,children:o.hasUpdate?x(rt,{children:[c("svg",{css:P.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:P.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:P.updateLabel,children:"update"})]}):o.cdnPushed?c("svg",{css:o.isRemote?P.storedIconRemote:P.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:P.size,children:Og(o.size)}):null}),R&&c("span",{css:P.thumbChips,children:G?c("span",{css:P.thumbChip,children:G}):x(rt,{children:[o.hasSm&&c("span",{css:P.thumbChip,children:"SM"}),o.hasMd&&c("span",{css:P.thumbChip,children:"MD"}),o.hasLg&&c("span",{css:P.thumbChip,children:"LG"}),o.hasFull&&c("span",{css:P.thumbChip,children:"FULL"})]})})]})]})})})]})}function Og(o){return o<1024?`${o} B`:o<1024*1024?`${(o/1024).toFixed(1)} KB`:`${(o/(1024*1024)).toFixed(1)} MB`}const Lg=rn`
|
|
83
|
+
to { transform: rotate(360deg); }
|
|
84
|
+
`,Y={loading:{name:"1d2ui9i",styles:"display:flex;align-items:center;justify-content:center;flex:1;min-height:300px"},spinner:g("width:32px;height:32px;border-radius:50%;border:3px solid ",u.border,";border-top-color:",u.primary,";animation:",Lg," 0.8s linear infinite;",""),empty:g("display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1;min-height:300px;color:",u.textSecondary,";",""),emptyHint:g("font-size:",K.sm,";color:",u.textMuted,";margin-top:4px;",""),scanButton:g("margin-top:16px;padding:10px 24px;font-size:",K.base,";font-weight:500;background:",u.primary,";color:white;border:none;border-radius:8px;cursor:pointer;transition:background 0.15s ease;&:hover:not(:disabled){background:",u.primaryHover,";}&:disabled{opacity:0.6;cursor:not-allowed;}",""),tableWrapper:g("background:",u.surface,";border-radius:8px;border:1px solid ",u.border,";overflow-x:auto;",""),table:{name:"nufjao",styles:"width:100%;min-width:600px;border-collapse:collapse;white-space:nowrap"},th:g("text-align:left;font-size:11px;color:",u.textMuted,";text-transform:uppercase;letter-spacing:0.05em;padding:12px 16px;font-weight:600;background:",u.background,";border-bottom:1px solid ",u.border,";",""),thCheckbox:{name:"5iz1wr",styles:"width:48px"},thSize:{name:"yct5co",styles:"width:96px"},thDimensions:{name:"gu2s0e",styles:"width:128px"},thCdn:{name:"yct5co",styles:"width:96px"},tbody:g("",""),row:g("cursor:pointer;transition:background-color 0.15s ease;user-select:none;&:hover{background-color:",u.surfaceHover,";}&:not(:last-child) td{border-bottom:1px solid ",u.borderLight,";}",""),rowSelected:g("background-color:",u.primaryLight,";&:hover{background-color:",u.primaryLight,";}",""),parentRow:g("cursor:pointer;border-bottom:1px solid ",u.border,";&:hover{background-color:",u.surfaceHover,";}",""),td:{name:"i563hg",styles:"padding:12px 16px"},checkboxCell:{name:"sahq4q",styles:"padding:12px 16px;cursor:pointer;vertical-align:middle"},checkbox:g("width:18px;height:18px;accent-color:",u.primary,";cursor:pointer;display:block;",""),actionsCell:{name:"1w56d5c",styles:"display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-left:auto;flex-shrink:0"},copyBtn:g("position:relative;flex-shrink:0;height:32px;width:32px;font-size:",K.xs,";color:",u.textSecondary,";background:",u.surface,";border:1px solid ",u.border,";padding:0;cursor:pointer;border-radius:4px;transition:all 0.15s ease;display:inline-flex;align-items:center;justify-content:center;&:hover{background:",u.surfaceHover,";border-color:",u.borderHover,";color:",u.text,";}",""),copyIcon:{name:"157xhr7",styles:"width:16px;height:16px"},folderStats:{name:"1yydxi7",styles:"display:flex;align-items:center;gap:8px"},folderStat:g("display:flex;align-items:center;gap:3px;font-size:",K.xs,";",""),folderStatLocal:g("color:",u.textMuted,";",""),folderStatCloud:{name:"1t8qh25",styles:"color:#f59e0b"},folderStatRemote:{name:"1lukubv",styles:"color:#ef4444"},folderStatUpdate:{name:"1t8qh25",styles:"color:#f59e0b"},folderStatIconCloud:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},folderStatIconLocal:g("width:14px;height:14px;color:",u.textSecondary,";",""),folderStatIconRemote:{name:"efr29r",styles:"width:14px;height:14px;color:#ef4444"},folderStatIconUpdate:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},updateLabel:g("display:flex;align-items:center;gap:4px;color:#f59e0b;font-size:",K.xs,";",""),updateCloudIcon:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},updateSyncIcon:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},storedLabel:{name:"s5xdrg",styles:"display:flex;align-items:center"},storedIconCloud:{name:"1e09qmx",styles:"width:16px;height:16px;color:#f59e0b"},storedIconRemote:{name:"1mrh6ju",styles:"width:16px;height:16px;color:#ef4444"},tooltip:{name:"1bu1odp",styles:"position:absolute;top:50%;right:100%;transform:translateY(-50%);background:#1a1f36;color:white;padding:4px 8px;border-radius:4px;font-size:12px;white-space:nowrap;margin-right:6px;pointer-events:none;z-index:100;&::after{content:'';position:absolute;left:100%;top:50%;transform:translateY(-50%);border:4px solid transparent;border-left-color:#1a1f36;}"},nameCell:{name:"9s3nhy",styles:"display:flex;align-items:center;gap:12px;flex:1"},thumbnailWrapper:{name:"f01c4l",styles:"width:48px;height:36px;display:flex;align-items:center;justify-content:center;flex-shrink:0;border-radius:4px"},thumbnailCloud:g("",""),thumbnailRemote:g("",""),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:g("width:24px;height:24px;color:",u.imagesFolder,";",""),lockIcon:g("width:10px;height:10px;color:",u.imagesFolder,";margin-left:-6px;margin-top:8px;",""),parentIcon:g("width:20px;height:20px;color:",u.textMuted,";flex-shrink:0;",""),fileIcon:g("width:20px;height:20px;color:",u.textMuted,";flex-shrink:0;",""),thumbnail:g("max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;border-radius:4px;border:1px solid ",u.borderLight,";",""),name:g("font-size:",K.base,";font-weight:500;color:",u.text,";letter-spacing:-0.01em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:300px;",""),meta:g("font-size:",K.sm,";color:",u.textSecondary,";",""),cdnBadge:g("display:inline-flex;align-items:center;gap:4px;font-size:",K.xs,";font-weight:500;color:",u.success,";",""),cdnBadgeRemote:g("display:inline-flex;align-items:center;font-size:",K.xs,";font-weight:500;color:#ef4444;",""),cdnIcon:{name:"1suksrg",styles:"width:12px;height:12px"},cdnEmpty:g("font-size:",K.sm,";color:",u.textMuted,";",""),featuredRow:g("cursor:pointer;transition:background-color 0.15s ease;border:2px dashed ",u.success,";&:hover{background-color:",u.successLight,";}td{border-bottom:none!important;}",""),featuredIcon:g("width:24px;height:24px;color:",u.success,";",""),featuredText:g("color:",u.success,";font-weight:500;",""),openBtn:g("height:32px;font-size:",K.sm,";font-weight:500;color:",u.primary,";background:",u.surface,";border:1px solid ",u.border,";padding:0 14px;cursor:pointer;border-radius:4px;transition:all 0.15s ease;display:inline-flex;align-items:center;&:hover{background-color:",u.primaryLight,";border-color:",u.primary,";}","")};function Ug(){const{loading:o,sortedItems:s,metaEmpty:h,missingFeaturedImage:d,isAtRoot:p,isSearching:y,allItemsSelected:A,someItemsSelected:U,selectedItems:D,navigateUp:b,handleItemClick:G,handleOpen:R,handleGenerateThumbnail:V,handleSelectAll:ce,triggerScan:q,triggerRefresh:X}=kh(),[pe,F]=C.useState(!1),[re,W]=C.useState(!1),[xe,_]=C.useState({current:0,total:3,percent:0,status:"processing",message:"Generating featured image..."}),me=()=>{F(!0)},Z=async Q=>{F(!1),W(!0),_({current:0,total:4,percent:0,status:"processing",message:"Starting..."});try{const N=await fetch("/api/studio/generate-featured-image",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:Q})});if(!N.ok){const te=await N.json();_({current:0,total:4,percent:0,status:"error",message:te.error||"Failed to generate featured image"});return}const ne=N.body?.getReader(),ye=new TextDecoder;if(ne){let te="";for(;;){const{done:ee,value:ze}=await ne.read();if(ee)break;te+=ye.decode(ze,{stream:!0});const Le=te.split(`
|
|
85
|
+
`);te=Le.pop()||"";for(const E of Le)if(E.startsWith("data: "))try{const B=JSON.parse(E.slice(6));B.type==="start"?_(oe=>({...oe,total:B.total,message:`Screenshotting ${B.url}...`})):B.type==="progress"?_({current:B.current,total:B.total,percent:B.percent,status:"processing",message:B.message}):B.type==="complete"?(_({current:B.processed,total:B.processed,percent:100,status:B.errors>0?"error":"complete",message:B.message}),X()):B.type==="error"&&_(oe=>({...oe,status:"error",message:B.message}))}catch{}}}}catch(N){console.error("Featured image generation error:",N),_({current:0,total:3,percent:0,status:"error",message:"An error occurred while generating the featured image"})}};return o?c("div",{css:Y.loading,children:c("div",{css:Y.spinner})}):h&&p?x("div",{css:Y.empty,children:[c("p",{children:"No files tracked yet"}),c("p",{css:Y.emptyHint,children:"Click Scan to discover files in your public folder"}),c("button",{css:Y.scanButton,onClick:q,children:"Scan for Files"})]}):s.length===0&&p?x("div",{css:Y.empty,children:[c("p",{children:"No files in this folder"}),c("p",{css:Y.emptyHint,children:"Upload images or click Scan in the toolbar"})]}):x(rt,{children:[c(Dh,{isOpen:pe,onClose:()=>F(!1),onSelect:Z}),re&&c(ea,{title:"Generating Featured Image",progress:xe,onClose:()=>W(!1)}),c("div",{css:Y.tableWrapper,children:x("table",{css:Y.table,children:[c("thead",{children:x("tr",{children:[c("th",{css:[Y.th,Y.thCheckbox,"",""],children:s.length>0&&c("input",{type:"checkbox",css:Y.checkbox,checked:A,ref:Q=>{Q&&(Q.indeterminate=U&&!A)},onChange:ce})}),c("th",{css:Y.th,children:"Name"}),c("th",{css:[Y.th,Y.thSize,"",""],children:"Size"}),c("th",{css:[Y.th,Y.thDimensions,"",""],children:"Dimensions"}),c("th",{css:[Y.th,Y.thCdn,"",""],children:"CDN"})]})}),x("tbody",{css:Y.tbody,children:[!p&&!y&&x("tr",{css:Y.parentRow,onClick:b,children:[c("td",{css:Y.td}),c("td",{css:Y.td,children:x("div",{css:Y.nameCell,children:[c("svg",{css:Y.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:Y.name,children:".."})]})}),c("td",{css:[Y.td,Y.meta,"",""],children:"--"}),c("td",{css:[Y.td,Y.meta,"",""],children:"Parent folder"}),c("td",{css:Y.td,children:"--"})]}),s.map(Q=>c(Hg,{item:Q,isSelected:D.has(Q.path),onClick:N=>G(Q,N),onOpen:()=>R(Q),onGenerateThumbnail:()=>V(Q)},Q.path)),p&&d&&!y&&x("tr",{css:Y.featuredRow,onClick:me,title:`Generate ${d.filename}`,children:[c("td",{css:Y.td}),c("td",{css:Y.td,children:x("div",{css:Y.nameCell,children:[c("div",{css:Y.folderIconWrapper,children:c("svg",{css:Y.featuredIcon,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("span",{css:[Y.name,Y.featuredText,"",""],children:d.filename})]})}),c("td",{css:[Y.td,Y.meta,Y.featuredText,"",""],children:"--"}),c("td",{css:[Y.td,Y.meta,Y.featuredText,"",""],children:"Click to generate"}),c("td",{css:[Y.td,Y.featuredText,"",""],children:"--"})]})]})]})})]})}function Hg({item:o,isSelected:s,onClick:h,onOpen:d,onGenerateThumbnail:p}){const[y,A]=C.useState(!1),U=o.type==="folder",D=!U&&o.thumbnail!==void 0,b=o.isProtected||U&&o.name==="images"&&o.path==="public/images",G=V=>{V.stopPropagation();const ce="/"+o.path.replace(/^public\//,"");navigator.clipboard.writeText(ce),A(!0),setTimeout(()=>A(!1),1500)},R=V=>{if(b){V.stopPropagation(),d();return}h(V)};return x("tr",{css:[Y.row,s&&!b&&Y.rowSelected,"",""],onClick:R,children:[c("td",{css:[Y.td,Y.checkboxCell,"",""],onClick:V=>V.stopPropagation(),children:!b&&c("input",{type:"checkbox",css:Y.checkbox,checked:s,onChange:()=>h({})})}),c("td",{css:Y.td,children:x("div",{css:Y.nameCell,children:[U?b?x("div",{css:Y.imagesFolderWrapper,children:[c("svg",{css:Y.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:Y.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:Y.folderIconWrapper,children:c("svg",{css:Y.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"})})}):D&&o.thumbnail?c("div",{css:[Y.thumbnailWrapper,o.isCloud&&Y.thumbnailCloud,o.isRemote&&Y.thumbnailRemote,"",""],children:c("img",{css:Y.thumbnail,src:o.thumbnail,alt:o.name,loading:"lazy"})}):c("div",{css:[Y.thumbnailWrapper,o.isCloud&&Y.thumbnailCloud,o.isRemote&&Y.thumbnailRemote,"",""],children:c("svg",{css:Y.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:Y.name,title:o.name,children:Bg(o.name)}),x("div",{css:Y.actionsCell,children:[x("button",{css:Y.copyBtn,onClick:G,title:"Copy file path",children:[y&&c("span",{css:Y.tooltip,children:"Copied!"}),c("svg",{css:Y.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:Y.openBtn,onClick:V=>{V.stopPropagation(),d()},children:"Open"})]})]})}),c("td",{css:[Y.td,Y.meta,"",""],children:U?x("div",{css:Y.folderStats,children:[o.localCount!==void 0&&o.localCount>0&&x("span",{css:[Y.folderStat,Y.folderStatLocal,"",""],title:`${o.localCount} local`,children:[c("svg",{css:Y.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:[Y.folderStat,Y.folderStatCloud,"",""],title:`${o.cloudCount} in cloud`,children:[c("svg",{css:Y.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:[Y.folderStat,Y.folderStatRemote,"",""],title:`${o.remoteCount} remote`,children:[c("svg",{css:Y.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:[Y.folderStat,Y.folderStatUpdate,"",""],title:`${o.updateCount} pending update${o.updateCount!==1?"s":""}`,children:[c("svg",{css:Y.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:Y.updateLabel,children:[c("svg",{css:Y.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:Y.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:Y.storedLabel,children:c("svg",{css:o.isRemote?Y.storedIconRemote:Y.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:[Y.td,Y.meta,"",""],children:U?o.totalSize!==void 0?uh(o.totalSize):"--":o.dimensions?`${o.dimensions.width}x${o.dimensions.height}`:"--"}),c("td",{css:Y.td,children:o.cdnPushed?o.isRemote?c("span",{css:Y.cdnBadgeRemote,children:"Remote"}):x("span",{css:Y.cdnBadge,children:[c("svg",{css:Y.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:Y.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 Bg(o,s=32){if(o.length<=s)return o;const h=o.lastIndexOf("."),d=h>0?o.substring(h):"",p=h>0?o.substring(0,h):o,y=s-d.length-3;if(y<6)return o.substring(0,s-3)+"...";const A=Math.ceil(y/2),U=Math.floor(y/2);return p.substring(0,A)+"..."+p.substring(p.length-U)+d}const Ng=[".jpg",".jpeg",".png",".gif",".webp",".svg",".ico",".bmp",".tiff",".tif"],jg=[".mp4",".webm",".mov",".avi",".mkv",".m4v"];function qg(o){const s=o.toLowerCase().substring(o.lastIndexOf("."));return Ng.includes(s)}function Yg(o){const s=o.toLowerCase().substring(o.lastIndexOf("."));return jg.includes(s)}const ae={overlay:{name:"1crgpqk",styles:"position:absolute;top:0;left:0;right:0;bottom:0;z-index:100;display:flex;background:transparent"},container:g("display:flex;flex:1;margin:24px;background:",u.surface,";border:1px solid ",u.border,";border-radius:12px;overflow:hidden;box-shadow:0 20px 40px rgba(0, 0, 0, 0.2);",""),main:g("position:relative;flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:24px;background:",u.background,";overflow:auto;",""),headerButtons:{name:"8wfhwn",styles:"position:absolute;top:16px;right:16px;display:flex;gap:8px;z-index:10"},copyBtn:g("position:relative;padding:8px;background:",u.surface,";border:1px solid ",u.border,";border-radius:8px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 4px rgba(0, 0, 0, 0.08);&:hover{background-color:",u.surfaceHover,";border-color:",u.borderHover,";}",""),copyIcon:g("width:20px;height:20px;color:",u.textSecondary,";",""),statusIcon:g("display:flex;align-items:center;justify-content:center;padding:8px;background:",u.surface,";border:1px solid ",u.border,";border-radius:8px;box-shadow:0 2px 4px rgba(0, 0, 0, 0.08);",""),cloudIcon:{name:"1byef48",styles:"width:22px;height:22px;color:#f59e0b;transform:translateY(1px)"},globeIcon:{name:"jso3j5",styles:"width:20px;height:20px;color:#ef4444"},tooltip:{name:"1w9prgf",styles:"position:absolute;right:100%;top:50%;transform:translateY(-50%);background:#1a1f36;color:white;padding:4px 8px;border-radius:4px;font-size:12px;white-space:nowrap;margin-right:8px;pointer-events:none;z-index:100;&::after{content:'';position:absolute;left:100%;top:50%;transform:translateY(-50%);border:4px solid transparent;border-left-color:#1a1f36;}"},mainCloseBtn:g("padding:8px;background:",u.surface,";border:1px solid ",u.border,";border-radius:8px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 4px rgba(0, 0, 0, 0.08);&:hover{background-color:",u.surfaceHover,";border-color:",u.borderHover,";}",""),mainCloseIcon:g("width:20px;height:20px;color:",u.textSecondary,";",""),mediaWrapper:{name:"zr0bjt",styles:"max-width:100%;max-height:100%;display:flex;align-items:center;justify-content:center"},image:{name:"4gte4n",styles:"max-width:100%;max-height:calc(100vh - 200px);object-fit:contain;border-radius:8px;box-shadow:0 4px 12px rgba(0, 0, 0, 0.1)"},video:{name:"1talud7",styles:"max-width:100%;max-height:calc(100vh - 200px);border-radius:8px;box-shadow:0 4px 12px rgba(0, 0, 0, 0.1)"},filePlaceholder:g("display:flex;flex-direction:column;align-items:center;justify-content:center;padding:48px;background:",u.surface,";border-radius:12px;border:1px solid ",u.border,";",""),fileIcon:g("width:80px;height:80px;color:",u.textMuted,";margin-bottom:16px;",""),fileName:g("font-size:",K.lg,";font-weight:600;color:",u.text,";margin:0;",""),sidebar:g("width:280px;background:",u.surface,";border-left:1px solid ",u.border,";display:flex;flex-direction:column;overflow:hidden;",""),sidebarHeader:g("padding:16px 20px;border-bottom:1px solid ",u.border,";",""),sidebarTitle:g("font-size:",K.base,";font-weight:600;color:",u.text,";margin:0;",""),sidebarContent:{name:"esl95u",styles:"flex:1;padding:20px;overflow:auto"},info:{name:"bh1r16",styles:"display:flex;flex-direction:column;gap:12px;margin-bottom:24px"},infoRow:g("display:flex;justify-content:space-between;font-size:",K.sm,";",""),infoLabel:g("color:",u.textSecondary,";",""),infoValue:g("color:",u.text,";font-weight:500;text-align:right;max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;",""),infoValueWrap:g("color:",u.text,";font-weight:500;text-align:right;max-width:160px;word-break:break-all;white-space:normal;",""),infoLink:g("color:",u.primary,";font-weight:500;text-align:right;max-width:160px;word-break:break-all;white-space:normal;text-decoration:none;&:hover{text-decoration:underline;}",""),thumbChips:{name:"1w7hks3",styles:"display:flex;gap:4px;flex-wrap:wrap;justify-content:flex-end"},thumbChip:g("font-size:10px;font-weight:600;padding:2px 6px;border-radius:4px;background:",u.primary,";color:white;",""),actions:{name:"3w0yoi",styles:"display:flex;flex-direction:column;gap:8px"},actionBtn:g("display:flex;align-items:center;gap:10px;width:100%;padding:12px 14px;font-size:",K.base,";font-weight:500;background:",u.surface,";border:1px solid ",u.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;color:",u.text,";text-align:left;&:hover:not(:disabled){background-color:",u.surfaceHover,";border-color:",u.borderHover,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),actionBtnDanger:g("color:",u.danger,";&:hover:not(:disabled){background-color:",u.dangerLight,";border-color:",u.danger,";}",""),actionBtnCloud:{name:"1lzbs29",styles:"color:#f59e0b;&:hover:not(:disabled){background-color:rgba(245, 158, 11, 0.1);border-color:#f59e0b;}"},actionIcon:{name:"a4lfw4",styles:"width:16px;height:16px;flex-shrink:0"}};function Gg(){const{focusedItem:o,setFocusedItem:s,triggerRefresh:h,fileItems:d,requestDelete:p,requestMove:y,requestSync:A,requestDownload:U,requestProcess:D,setProcessMode:b,actionState:G}=Ya(),[R,V]=C.useState(!1),[ce,q]=C.useState(!1),[X,pe]=C.useState({current:0,total:1,percent:0,status:"processing",message:"Renaming..."}),[F,re]=C.useState(!1),[W,xe]=C.useState(null),[_,me]=C.useState(!1),[Z,Q]=C.useState(!1),[N,ne]=C.useState({current:0,total:3,percent:0,status:"processing",message:"Generating favicons..."}),ye=G.showProgress,te=o?o.name.toLowerCase()==="favicon.png"||o.name.toLowerCase()==="favicon.jpg":!1;if(!o)return null;const ee=qg(o.name),ze=Yg(o.name),Le="/"+o.path.replace(/^public\//,""),E=o.cdnPushed&&o.cdnBaseUrl?`${o.cdnBaseUrl}${Le}`:Le,B=typeof window<"u"?window.location.origin:"",oe=o.cdnPushed&&o.cdnBaseUrl?`${o.cdnBaseUrl}${Le}`:`${B}${Le}`,Be=()=>{s(null)},Ce=()=>{navigator.clipboard.writeText(oe),me(!0),setTimeout(()=>me(!1),1500)},v=async I=>{if(I&&I!==o.name){V(!1),q(!0),pe({current:0,total:1,percent:0,status:"processing",message:"Renaming file..."});try{const ve=await fetch("/api/studio/rename-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({oldPath:o.path,newName:I})});if(!ve.body)throw new Error("No response body");const ke=ve.body.getReader(),_e=new TextDecoder;let nt="",Ae="";for(;;){const{done:Ot,value:le}=await ke.read();if(Ot)break;nt+=_e.decode(le,{stream:!0});const lt=nt.split(`
|
|
86
|
+
`);nt=lt.pop()||"";for(const Nt of lt){if(!Nt.startsWith("data: "))continue;const se=JSON.parse(Nt.slice(6));se.type==="start"?pe({current:0,total:se.total,percent:0,status:"processing",message:se.message}):se.type==="progress"?pe({current:se.current,total:se.total,percent:Math.round(se.current/se.total*100),status:"processing",message:se.message}):se.type==="complete"?(Ae=se.newPath,pe({current:se.renamed,total:se.renamed,percent:100,status:"complete",message:"Renamed successfully"})):se.type==="error"&&(pe(it=>({...it,status:"error",message:se.message})),xe({title:"Rename Failed",message:se.message}))}}Ae&&(s({...o,path:Ae,name:Ae.split("/").pop()||I}),h())}catch(ve){console.error("Rename error:",ve),pe(ke=>({...ke,status:"error",message:"Failed to rename"})),xe({title:"Rename Failed",message:"An error occurred while renaming the file"})}}},L=async()=>{if(o){Q(!0),ne({current:0,total:3,percent:0,status:"processing",message:"Generating favicons..."});try{const I=await fetch("/api/studio/generate-favicon",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({imagePath:"/"+o.path.replace(/^public\//,"")})});if(!I.ok){const _e=await I.json();ne({current:0,total:3,percent:0,status:"error",message:_e.error||"Failed to generate favicons"});return}const ve=I.body?.getReader(),ke=new TextDecoder;if(ve){let _e="";for(;;){const{done:nt,value:Ae}=await ve.read();if(nt)break;_e+=ke.decode(Ae,{stream:!0});const Ot=_e.split(`
|
|
87
|
+
`);_e=Ot.pop()||"";for(const le of Ot)if(le.startsWith("data: "))try{const lt=JSON.parse(le.slice(6));lt.type==="start"?ne(Nt=>({...Nt,total:lt.total})):lt.type==="progress"?ne({current:lt.current,total:lt.total,percent:lt.percent,status:"processing",message:lt.message}):lt.type==="complete"?ne({current:lt.processed,total:lt.processed,percent:100,status:lt.errors>0?"error":"complete",message:lt.message}):lt.type==="error"&&ne(Nt=>({...Nt,status:"error",message:lt.message}))}catch{}}}}catch(I){console.error("Favicon generation error:",I),ne({current:0,total:3,percent:0,status:"error",message:"An error occurred while generating favicons"})}}},J=()=>ee?c("img",{css:ae.image,src:E,alt:o.name}):ze?c("video",{css:ae.video,src:E,controls:!0}):x("div",{css:ae.filePlaceholder,children:[c("svg",{css:ae.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:ae.fileName,children:o.name})]});return x(rt,{children:[W&&c(Mh,{title:W.title,message:W.message,onClose:()=>xe(null)}),c(Eh,{isOpen:F,onClose:()=>re(!1)}),R&&c(vr,{title:"Rename File",message:"Enter a new name for the file:",defaultValue:o.name,placeholder:"Enter new filename",confirmLabel:"Rename",onConfirm:v,onCancel:()=>V(!1)}),ce&&c(ea,{title:"Renaming",progress:X,onClose:()=>{q(!1),h()}}),Z&&c(ea,{title:"Generating Favicons",progress:N,onClose:()=>Q(!1)}),c("div",{css:ae.overlay,onClick:Be,children:x("div",{css:ae.container,onClick:I=>I.stopPropagation(),children:[x("div",{css:ae.main,children:[x("div",{css:ae.headerButtons,children:[o.cdnPushed&&!o.isRemote&&c("span",{css:ae.statusIcon,title:"Pushed to CDN",children:c("svg",{css:ae.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:ae.statusIcon,title:"Remote image",children:c("svg",{css:ae.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:ae.copyBtn,onClick:Ce,title:"Copy file path",children:[_&&c("span",{css:ae.tooltip,children:"Copied!"}),c("svg",{css:ae.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:ae.mainCloseBtn,onClick:Be,"aria-label":"Close",children:c("svg",{css:ae.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:ae.mediaWrapper,children:J()})]}),x("div",{css:ae.sidebar,children:[c("div",{css:ae.sidebarHeader,children:c("h3",{css:ae.sidebarTitle,children:"Details"})}),x("div",{css:ae.sidebarContent,children:[x("div",{css:ae.info,children:[x("div",{css:ae.infoRow,children:[c("span",{css:ae.infoLabel,children:"Name"}),c("span",{css:ae.infoValueWrap,children:o.name})]}),x("div",{css:ae.infoRow,children:[c("span",{css:ae.infoLabel,children:"Path"}),c("span",{css:ae.infoValueWrap,children:o.path.replace(/^public\//,"")})]}),o.size!==void 0&&x("div",{css:ae.infoRow,children:[c("span",{css:ae.infoLabel,children:"Size"}),c("span",{css:ae.infoValue,children:Vg(o.size)})]}),o.dimensions&&x("div",{css:ae.infoRow,children:[c("span",{css:ae.infoLabel,children:"Dimensions"}),x("span",{css:ae.infoValue,children:[o.dimensions.width," × ",o.dimensions.height]})]}),(o.hasSm||o.hasMd||o.hasLg||o.hasFull)&&x("div",{css:ae.infoRow,children:[c("span",{css:ae.infoLabel,children:"Thumbnails"}),c("span",{css:ae.infoValue,children:x("span",{css:ae.thumbChips,children:[o.hasSm&&c("span",{css:ae.thumbChip,children:"SM"}),o.hasMd&&c("span",{css:ae.thumbChip,children:"MD"}),o.hasLg&&c("span",{css:ae.thumbChip,children:"LG"}),o.hasFull&&c("span",{css:ae.thumbChip,children:"FULL"})]})})]}),x("div",{css:ae.infoRow,children:[c("span",{css:ae.infoLabel,children:"CDN Status"}),c("span",{css:ae.infoValue,children:o.cdnPushed?o.isRemote?"Remote":"Pushed":"Local"})]}),x("div",{css:ae.infoRow,children:[c("span",{css:ae.infoLabel,children:"URL"}),c("a",{href:oe,target:"_blank",rel:"noopener noreferrer",css:ae.infoLink,title:oe,children:oe})]})]}),x("div",{css:ae.actions,children:[x("button",{css:ae.actionBtn,onClick:()=>V(!0),disabled:o.isProtected,children:[c("svg",{css:ae.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:ae.actionBtn,onClick:()=>y([o.path]),disabled:ye||o.isProtected,children:[c("svg",{css:ae.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:[ae.actionBtn,ae.actionBtnCloud,"",""],onClick:()=>A([o.path],d),disabled:ye||o.isProtected||o.cdnPushed&&!o.isRemote,title:o.cdnPushed&&!o.isRemote?"Already in R2":void 0,children:[c("svg",{css:ae.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:[ae.actionBtn,ae.actionBtnCloud,"",""],onClick:()=>U([o.path],d),disabled:ye||!o.cdnPushed||o.isRemote,title:o.cdnPushed?o.isRemote?"Remote image":"Download from CDN to local":"Not on CDN",children:[c("svg",{css:ae.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:ae.actionBtn,onClick:()=>{b("generate"),D([o.path])},disabled:ye||o.isProtected,children:[c("svg",{css:ae.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"})}),"Generate Thumbnails"]}),(o.hasSm||o.hasMd||o.hasLg||o.hasFull)&&x("button",{css:ae.actionBtn,onClick:()=>{b("remove"),D([o.path])},disabled:ye||o.isProtected,children:[c("svg",{css:ae.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"})}),"Remove Thumbnails"]}),te&&x("button",{css:ae.actionBtn,onClick:L,disabled:Z||o.isProtected,children:[c("svg",{css:ae.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:[ae.actionBtn,ae.actionBtnDanger,"",""],onClick:()=>p([o.path]),disabled:ye||o.isProtected,children:[c("svg",{css:ae.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 Vg(o){return o<1024?`${o} B`:o<1024*1024?`${(o/1024).toFixed(1)} KB`:`${(o/(1024*1024)).toFixed(1)} MB`}const Pl={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:g("background:",u.surface,";border-radius:12px;padding:24px;max-width:400px;width:90%;box-shadow:0 20px 40px rgba(0, 0, 0, 0.2);",""),header:{name:"c6eghz",styles:"display:flex;align-items:center;gap:12px;margin-bottom:12px"},icon:g("width:24px;height:24px;color:",u.danger,";flex-shrink:0;",""),title:g("font-size:",K.lg,";font-weight:600;color:",u.text,";margin:0;",""),message:g("font-size:",K.base,";color:",u.textSecondary,";margin:0 0 20px 0;line-height:1.5;",""),button:g("width:100%;padding:10px 16px;border-radius:6px;font-size:",K.base,";font-weight:500;border:none;background:",u.primary,";color:white;cursor:pointer;transition:background 0.15s ease;&:hover{background:",u.primaryHover,";}","")};function Xg(){const{error:o,clearError:s}=Ya();return o?c("div",{css:Pl.overlay,onClick:s,children:x("div",{css:Pl.modal,onClick:h=>h.stopPropagation(),children:[x("div",{css:Pl.header,children:[c("svg",{css:Pl.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:Pl.title,children:o.title})]}),c("p",{css:Pl.message,children:o.message}),c("button",{css:Pl.button,onClick:s,children:"OK"})]})}):null}const dh={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 Qg({triggerRefresh:o,clearSelection:s,setFocusedItem:h,showError:d}){const[p,y]=C.useState(dh),A=C.useCallback(Q=>{y(N=>({...N,progressState:typeof Q=="function"?Q(N.progressState):{...N.progressState,...Q}}))},[]),U=C.useCallback(Q=>{y(N=>({...N,showProgress:Q}))},[]),D=C.useCallback(Q=>{y(N=>({...N,progressTitle:Q}))},[]),b=Th({setShowProgress:U,setProgressTitle:D,setProgressState:A,triggerRefresh:o}),G=C.useCallback(Q=>{y(N=>({...N,actionPaths:Q,showDeleteConfirm:!0}))},[]),R=C.useCallback(Q=>{y(N=>({...N,actionPaths:Q,showMoveModal:!0}))},[]),V=C.useCallback((Q,N)=>{const ne=Q.map(ee=>"/"+ee.replace(/^public\//,""));let ye=!1,te=!1;for(const ee of Q){const ze=N.find(Le=>Le.path===ee);ze&&(ze.isRemote?ye=!0:ze.cdnPushed||(te=!0))}y(ee=>({...ee,actionPaths:Q,syncImageCount:ne.length,syncHasRemote:ye,syncHasLocal:te,showSyncConfirm:!0}))},[]),ce=C.useCallback((Q,N)=>{const ne=[];for(const ye of Q){const te=N.find(ee=>ee.path===ye);te&&te.cdnPushed&&!te.isRemote&&ne.push(ye)}y(ye=>({...ye,actionPaths:ne,downloadImageCount:ne.length,downloadTotalSelected:Q.length,showDownloadConfirm:!0}))},[]),q=C.useCallback(Q=>{y(N=>({...N,actionPaths:Q,showProcessConfirm:!0}))},[]),X=C.useCallback(Q=>{y(N=>({...N,processMode:Q}))},[]),pe=C.useCallback(()=>{y(Q=>({...Q,showDeleteConfirm:!1,showMoveModal:!1,showSyncConfirm:!1,showProcessConfirm:!1,showDownloadConfirm:!1}))},[]),F=C.useCallback(()=>{y(dh)},[]),re=C.useCallback(()=>{b.stop()},[b]),W=C.useCallback(async()=>{const Q=p.actionPaths;y(N=>({...N,showDeleteConfirm:!1}));try{const N=await fetch("/api/studio/delete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:Q})});if(N.ok)s(),h(null),o();else{const ne=await N.json();d("Delete Failed",ne.error||"Unknown error")}}catch(N){console.error("Delete error:",N),d("Delete Failed","Delete failed. Check console for details.")}},[p.actionPaths,s,h,o,d]),xe=C.useCallback(async Q=>{const N=p.actionPaths;y(ne=>({...ne,showMoveModal:!1})),await b.execute({endpoint:"/api/studio/move",body:{paths:N,destination:Q},title:"Moving Files",onComplete:ne=>{ne.errors&&ne.errors>0&&ne.errorMessages?.length&&d("Move Failed",ne.errorMessages.join(`
|
|
88
|
+
`)),s(),h(null)}})},[p.actionPaths,s,h,d,b]),_=C.useCallback(async()=>{const N=p.actionPaths.map(te=>"/"+te.replace(/^public\//,""));y(te=>({...te,showSyncConfirm:!1,showProgress:!0,progressTitle:"Pushing to CDN",progressState:{current:0,total:N.length,percent:0,status:"processing",message:"Pushing to CDN..."}}));let ne=0;const ye=[];for(let te=0;te<N.length;te++){const ee=N[te];try{const ze=await fetch("/api/studio/sync",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({imageKeys:[ee]})});if(ze.ok)ne++;else{const Le=await ze.json();ye.push(`${ee}: ${Le.error||"Unknown error"}`)}}catch(ze){ye.push(`${ee}: ${ze instanceof Error?ze.message:"Unknown error"}`)}A({current:te+1,total:N.length,percent:Math.round((te+1)/N.length*100),status:"processing",message:`Pushed ${ee}`})}A({current:N.length,total:N.length,percent:100,status:ye.length>0?"error":"complete",message:`Pushed ${ne} file${ne!==1?"s":""}${ye.length>0?`, ${ye.length} error${ye.length!==1?"s":""}`:""}`}),ye.length>0&&d("Push Errors",ye.join(`
|
|
89
|
+
`)),s(),o()},[p.actionPaths,s,o,d,A]),me=C.useCallback(async()=>{const Q=p.actionPaths,N=p.processMode,ne=Q.map(ze=>{const Le=ze.replace(/^public\//,"");return Le.startsWith("/")?Le:`/${Le}`}),ye=N==="remove",te=ye?"/api/studio/unprocess-stream":"/api/studio/reprocess-stream",ee=ye?"Removing Thumbnails":"Generating Thumbnails";y(ze=>({...ze,showProcessConfirm:!1})),await b.execute({endpoint:te,body:{imageKeys:ne},title:ee})},[p.actionPaths,p.processMode,b]),Z=C.useCallback(async()=>{const Q=p.progressState.orphanedFiles;if(!(!Q||Q.length===0))try{const N=await fetch("/api/studio/delete-orphans",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({files:Q})});if(N.ok)A(ne=>({...ne,orphanedFiles:void 0,message:ne.message?.replace(/Found \d+ orphaned thumbnail\(s\).*/,"Orphaned thumbnails deleted.")})),o();else{const ne=await N.json();d("Delete Failed",ne.error||"Failed to delete orphaned files")}}catch(N){console.error("Delete orphans error:",N),d("Delete Failed","Failed to delete orphaned files. Check console for details.")}},[p.progressState.orphanedFiles,o,d,A]);return{actionState:p,setActionState:y,requestDelete:G,requestMove:R,requestSync:V,requestDownload:ce,requestProcess:q,setProcessMode:X,cancelAction:pe,closeProgress:F,stopProcessing:re,confirmDelete:W,confirmMove:xe,confirmSync:_,confirmProcess:me,deleteOrphans:Z}}const Zg="36px",Tt={container:g($i," display:flex;flex-direction:column;height:100%;background:",u.background,";",""),header:g("display:flex;align-items:center;justify-content:space-between;padding:12px 24px;background:",u.surface,";border-bottom:1px solid ",u.border,";position:relative;",""),title:g("font-size:",K.lg,";font-weight:600;color:",u.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:g("display:flex;align-items:center;gap:6px;font-size:",K.base,";color:",u.textSecondary,";overflow:hidden;",""),breadcrumbSeparator:g("color:",u.border,";flex-shrink:0;",""),breadcrumbItem:g("color:",u.textSecondary,";text-decoration:none;cursor:pointer;transition:color 0.15s ease;white-space:nowrap;&:hover{color:",u.primary,";}",""),breadcrumbCurrent:g("color:",u.text,";font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;",""),headerIconBtn:g("display:flex;align-items:center;justify-content:center;width:32px;height:32px;color:",u.textMuted,";background:transparent;border:none;border-radius:6px;cursor:pointer;transition:all 0.15s ease;&:hover{color:",u.text,";background:",u.surface,";}",""),headerActions:{name:"1yydxi7",styles:"display:flex;align-items:center;gap:8px"},headerBtn:g("height:",Zg,";padding:0 12px;background:",u.surface,";border:1px solid ",u.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{background-color:",u.surfaceHover,";border-color:",u.borderHover,";}",""),headerIcon:g("width:16px;height:16px;color:",u.textSecondary,";",""),content:{name:"1rtaly3",styles:"flex:1;display:flex;overflow:hidden"},fileBrowser:{name:"upomw9",styles:"flex:1;min-width:0;overflow:auto;padding:20px 24px;display:flex;flex-direction:column"},dropOverlay:g("position:absolute;top:0;left:0;right:0;bottom:0;background:rgba(99, 91, 255, 0.1);border:3px dashed ",u.primary,";border-radius:8px;display:flex;align-items:center;justify-content:center;z-index:50;pointer-events:none;",""),dropMessage:g("display:flex;flex-direction:column;align-items:center;gap:12px;color:",u.primary,";font-size:",K.lg,";font-weight:600;",""),dropIcon:{name:"18jhpep",styles:"width:48px;height:48px"}};function Kg({onClose:o,isVisible:s=!0,standaloneMode:h=!1,workspacePath:d,siteUrl:p}){const y=o||(()=>{}),[A,U]=C.useState("public"),[D,b]=C.useState(new Set),[G,R]=C.useState(null),[V,ce]=C.useState("grid"),[q,X]=C.useState(null),[pe,F]=C.useState(null),[re,W]=C.useState(!1),[xe,_]=C.useState(0),[me,Z]=C.useState(!1),[Q,N]=C.useState(""),[ne,ye]=C.useState(null),[te,ee]=C.useState([]),[ze,Le]=C.useState(!1),E=C.useCallback(()=>{_(se=>se+1)},[]);C.useEffect(()=>{if(q&&te.length>0){const se=te.find(it=>it.path===q.path);se&&JSON.stringify(se)!==JSON.stringify(q)&&X(se)}},[te,q]);const B=C.useCallback(()=>{Z(!0)},[]),oe=C.useCallback(()=>{Z(!1)},[]),Be=C.useCallback((se,it)=>{ye({title:se,message:it})},[]),Ce=C.useCallback(()=>{ye(null)},[]),v=C.useCallback(se=>{se.preventDefault(),se.stopPropagation(),Le(!0)},[]),L=C.useCallback(se=>{se.preventDefault(),se.stopPropagation(),Le(!1)},[]),J=C.useCallback(async se=>{se.preventDefault(),se.stopPropagation(),Le(!1);const it=Array.from(se.dataTransfer.files);if(it.length!==0&&!(A==="public/images"||A.startsWith("public/images/"))){for(const Lt of it){const $t=new FormData;$t.append("file",Lt),$t.append("path",A);try{await fetch("/api/studio/upload",{method:"POST",body:$t})}catch(zn){console.error("Upload error:",zn)}}E()}},[A,E]),I=C.useCallback(()=>{if(A==="public")return;const se=A.split("/");se.pop(),U(se.join("/")||"public"),b(new Set)},[A]),ve=C.useCallback(se=>{U(se),b(new Set),X(null)},[]),ke=C.useCallback(se=>{b(it=>{const Lt=new Set(it);return Lt.has(se)?Lt.delete(se):Lt.add(se),Lt}),R(se)},[]),_e=C.useCallback((se,it,Lt)=>{const $t=Lt.findIndex(cn=>cn.path===se),zn=Lt.findIndex(cn=>cn.path===it);if($t===-1||zn===-1)return;const On=Math.min($t,zn),Dl=Math.max($t,zn);b(cn=>{const Va=new Set(cn);for(let ta=On;ta<=Dl;ta++)Va.add(Lt[ta].path);return Va}),R(it)},[]),nt=C.useCallback(se=>{b(new Set(se.map(it=>it.path)))},[]),Ae=C.useCallback(()=>{b(new Set)},[]),Ot=C.useCallback(se=>{X(se)},[]),le=Qg({triggerRefresh:E,clearSelection:Ae,setFocusedItem:Ot,showError:Be}),lt=C.useCallback(se=>{if(se.key==="Escape"){const it=se.target;if(it.tagName==="INPUT"||it.tagName==="TEXTAREA")return;q?X(null):h||y()}},[y,q,h]);C.useEffect(()=>(s&&(document.addEventListener("keydown",lt),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",lt),document.body.style.overflow=""}),[lt,s]);const Nt={isOpen:!0,openStudio:()=>{},closeStudio:y,toggleStudio:y,currentPath:A,setCurrentPath:ve,navigateUp:I,selectedItems:D,toggleSelection:ke,selectRange:_e,selectAll:nt,clearSelection:Ae,lastSelectedPath:G,viewMode:V,setViewMode:ce,focusedItem:q,setFocusedItem:X,meta:pe,setMeta:F,isLoading:re,setIsLoading:W,refreshKey:xe,triggerRefresh:E,scanRequested:me,triggerScan:B,clearScanRequest:oe,searchQuery:Q,setSearchQuery:N,error:ne,showError:Be,clearError:Ce,fileItems:te,setFileItems:ee,actionState:le.actionState,requestDelete:le.requestDelete,requestMove:le.requestMove,requestSync:le.requestSync,requestDownload:le.requestDownload,requestProcess:le.requestProcess,setProcessMode:le.setProcessMode,confirmDelete:le.confirmDelete,confirmMove:le.confirmMove,confirmSync:le.confirmSync,confirmProcess:le.confirmProcess,cancelAction:le.cancelAction,closeProgress:le.closeProgress,stopProcessing:le.stopProcessing,deleteOrphans:le.deleteOrphans};return c(zh.Provider,{value:Nt,children:x("div",{css:Tt.container,children:[x("div",{css:Tt.header,children:[c("div",{css:Tt.headerLeft,children:c("h1",{css:Tt.title,children:"gallop.studio"})}),c("div",{css:Tt.headerCenter,children:c(Wg,{currentPath:A,onNavigate:ve,projectName:d?d.split("/").pop():void 0})}),x("div",{css:Tt.headerActions,children:[p&&c("a",{href:p,target:"_blank",rel:"noopener noreferrer",css:Tt.headerIconBtn,title:`Open ${p}`,children:c(Ig,{})}),!h&&c("button",{css:Tt.headerBtn,onClick:y,"aria-label":"Close Studio",children:c(Pg,{})})]})]}),c(sg,{}),x("div",{css:Tt.content,onDragOver:v,onDragLeave:L,onDrop:J,children:[ze&&c("div",{css:Tt.dropOverlay,children:x("div",{css:Tt.dropMessage,children:[c("svg",{css:Tt.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:Tt.fileBrowser,children:V==="grid"?c(Dg,{}):c(Ug,{})})]}),q&&c(Gg,{}),c(Xg,{}),le.actionState.showDeleteConfirm&&c(Vi,{title:"Delete Files",message:`Are you sure you want to delete ${le.actionState.actionPaths.length} item${le.actionState.actionPaths.length!==1?"s":""}? This action cannot be undone.`,confirmLabel:"Delete",variant:"danger",onConfirm:le.confirmDelete,onCancel:le.cancelAction}),le.actionState.showSyncConfirm&&c(Vi,{title:"Push to CDN",message:`Push ${le.actionState.syncImageCount} image${le.actionState.syncImageCount!==1?"s":""} to Cloudflare R2?${le.actionState.syncHasRemote?" Remote images will be downloaded first.":""}${le.actionState.syncHasLocal?" After pushing, local files will be deleted.":""}`,confirmLabel:"Push",onConfirm:le.confirmSync,onCancel:le.cancelAction}),le.actionState.showProcessConfirm&&c($g,{imageCount:le.actionState.actionPaths.length,mode:le.actionState.processMode,onConfirm:le.confirmProcess,onCancel:le.cancelAction}),le.actionState.showMoveModal&&c(Ah,{selectedItems:new Set(le.actionState.actionPaths),currentPath:A,onMove:se=>le.confirmMove(se),onCancel:le.cancelAction}),le.actionState.showProgress&&c(ea,{title:le.actionState.progressTitle,progress:le.actionState.progressState,onStop:le.stopProcessing,onDeleteOrphans:le.deleteOrphans,onClose:le.closeProgress})]})})}var Jg={name:"1cm5yut",styles:"display:flex;gap:12px;justify-content:flex-end"},Fg={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 $g({imageCount:o,mode:s,onConfirm:h,onCancel:d}){const p={overlay:Fg,container:g("background:",u.surface,";border-radius:12px;padding:24px;max-width:420px;width:90%;box-shadow:0 20px 25px -5px rgba(0, 0, 0, 0.1),0 10px 10px -5px rgba(0, 0, 0, 0.04);",""),title:g("font-size:",K.lg,";font-weight:600;color:",u.text,";margin:0 0 16px;",""),message:g("font-size:",K.base,";color:",u.textSecondary,";margin:0 0 20px;line-height:1.5;",""),actions:Jg,cancelBtn:g("padding:10px 20px;border:1px solid ",u.border,";border-radius:8px;background:",u.background,";color:",u.text,";font-size:",K.base,";font-weight:500;cursor:pointer;transition:all 0.15s ease;&:hover{background:",u.surfaceHover,";border-color:",u.borderHover,";}",""),confirmBtn:g("padding:10px 20px;border:none;border-radius:8px;background:",u.primary,";color:white;font-size:",K.base,";font-weight:500;cursor:pointer;transition:all 0.15s ease;&:hover{background:",u.primaryHover,";}",""),confirmBtnDanger:g("background:",u.danger,";&:hover{background:#dc2626;}","")},y=s==="remove",A=y?"Remove Thumbnails":"Generate Thumbnails",U=y?`Remove generated thumbnails for ${o} image${o!==1?"s":""}? Original images will be kept.`:`Generate thumbnails for ${o} image${o!==1?"s":""}?`,D=y?"Remove":"Generate";return c("div",{css:p.overlay,onClick:d,children:x("div",{css:p.container,onClick:b=>b.stopPropagation(),children:[c("h2",{css:p.title,children:A}),c("p",{css:p.message,children:U}),x("div",{css:p.actions,children:[c("button",{css:p.cancelBtn,onClick:d,children:"Cancel"}),c("button",{css:[p.confirmBtn,y&&p.confirmBtnDanger,"",""],onClick:h,children:D})]})]})})}function Wg({currentPath:o,onNavigate:s,projectName:h}){const d=o.split("/").filter(Boolean),p=d.map((y,A)=>({name:A===0&&y==="public"&&h?h:y,path:d.slice(0,A+1).join("/")}));return c("div",{css:Tt.breadcrumbs,children:p.map((y,A)=>x("span",{style:{display:"flex",alignItems:"center",gap:6},children:[A>0&&c("span",{css:Tt.breadcrumbSeparator,children:"/"}),A===p.length-1?c("span",{css:Tt.breadcrumbCurrent,children:y.name}):c("span",{css:Tt.breadcrumbItem,onClick:()=>s(y.path),children:y.name})]},y.path))})}function Ig(){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 Pg(){return x("svg",{css:Tt.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 Rh=document.getElementById("root");if(!Rh)throw new Error("Root element not found");const e2=window.__STUDIO_WORKSPACE__||"Unknown",t2=window.__STUDIO_SITE_URL__||"";Q1.createRoot(Rh).render(c(C.StrictMode,{children:c("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,background:"#0a0a0a"},children:c(Kg,{isVisible:!0,standaloneMode:!0,workspacePath:e2,siteUrl:t2})})}));
|