rails_studio 0.1.0
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.
- checksums.yaml +7 -0
- data/CHANGELOG.md +21 -0
- data/MIT-LICENSE +20 -0
- data/README.md +137 -0
- data/Rakefile +6 -0
- data/app/assets/stylesheets/rails_studio/application.css +15 -0
- data/app/controllers/rails_studio/api/console_controller.rb +17 -0
- data/app/controllers/rails_studio/api/overview_controller.rb +11 -0
- data/app/controllers/rails_studio/api/query_controller.rb +18 -0
- data/app/controllers/rails_studio/api/records_controller.rb +96 -0
- data/app/controllers/rails_studio/api/tables_controller.rb +12 -0
- data/app/controllers/rails_studio/application_controller.rb +39 -0
- data/app/controllers/rails_studio/dashboard_controller.rb +59 -0
- data/app/helpers/rails_studio/application_helper.rb +4 -0
- data/app/jobs/rails_studio/application_job.rb +4 -0
- data/app/mailers/rails_studio/application_mailer.rb +6 -0
- data/app/models/rails_studio/application_record.rb +5 -0
- data/app/models/rails_studio/console.rb +150 -0
- data/app/models/rails_studio/database.rb +76 -0
- data/app/models/rails_studio/query.rb +114 -0
- data/app/models/rails_studio/read_only_error.rb +5 -0
- data/app/models/rails_studio/table.rb +495 -0
- data/app/views/layouts/rails_studio/application.html.erb +17 -0
- data/app/views/rails_studio/dashboard/index.html.erb +51 -0
- data/config/routes.rb +23 -0
- data/lib/rails_studio/configuration.rb +32 -0
- data/lib/rails_studio/engine.rb +5 -0
- data/lib/rails_studio/version.rb +3 -0
- data/lib/rails_studio.rb +52 -0
- data/lib/tasks/rails_studio_tasks.rake +4 -0
- data/public/assets/index.css +1 -0
- data/public/assets/index.js +367 -0
- metadata +91 -0
|
@@ -0,0 +1,367 @@
|
|
|
1
|
+
function Pm(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}var eo={exports:{}},Vi={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var Im;function Jb(){if(Im)return Vi;Im=1;var o=Symbol.for("react.transitional.element"),h=Symbol.for("react.fragment");function U(r,R,I){var ee=null;if(I!==void 0&&(ee=""+I),R.key!==void 0&&(ee=""+R.key),"key"in R){I={};for(var B in R)B!=="key"&&(I[B]=R[B])}else I=R;return R=I.ref,{$$typeof:o,type:r,key:ee,ref:R!==void 0?R:null,props:I}}return Vi.Fragment=h,Vi.jsx=U,Vi.jsxs=U,Vi}var Um;function $b(){return Um||(Um=1,eo.exports=Jb()),eo.exports}var s=$b(),to={exports:{}},Ce={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react.production.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var Hm;function Wb(){if(Hm)return Ce;Hm=1;var o=Symbol.for("react.transitional.element"),h=Symbol.for("react.portal"),U=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),I=Symbol.for("react.consumer"),ee=Symbol.for("react.context"),B=Symbol.for("react.forward_ref"),P=Symbol.for("react.suspense"),le=Symbol.for("react.memo"),q=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),$=Symbol.for("react.view_transition"),ne=Symbol.iterator;function j(f){return f===null||typeof f!="object"?null:(f=ne&&f[ne]||f["@@iterator"],typeof f=="function"?f:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v=Object.assign,Y={};function w(f,L,oe){this.props=f,this.context=L,this.refs=Y,this.updater=oe||C}w.prototype.isReactComponent={},w.prototype.setState=function(f,L){if(typeof f!="object"&&typeof f!="function"&&f!=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,f,L,"setState")},w.prototype.forceUpdate=function(f){this.updater.enqueueForceUpdate(this,f,"forceUpdate")};function te(){}te.prototype=w.prototype;function xe(f,L,oe){this.props=f,this.context=L,this.refs=Y,this.updater=oe||C}var Te=xe.prototype=new te;Te.constructor=xe,v(Te,w.prototype),Te.isPureReactComponent=!0;var Ee=Array.isArray;function ce(){}var fe={H:null,A:null,T:null,S:null},pe=Object.prototype.hasOwnProperty;function Ne(f,L,oe){var E=oe.ref;return{$$typeof:o,type:f,key:L,ref:E!==void 0?E:null,props:oe}}function Ie(f,L){return Ne(f.type,L,f.props)}function Oe(f){return typeof f=="object"&&f!==null&&f.$$typeof===o}function W(f){var L={"=":"=0",":":"=2"};return"$"+f.replace(/[=:]/g,function(oe){return L[oe]})}var X=/\/+/g;function re(f,L){return typeof f=="object"&&f!==null&&f.key!=null?W(""+f.key):L.toString(36)}function F(f){switch(f.status){case"fulfilled":return f.value;case"rejected":throw f.reason;default:switch(typeof f.status=="string"?f.then(ce,ce):(f.status="pending",f.then(function(L){f.status==="pending"&&(f.status="fulfilled",f.value=L)},function(L){f.status==="pending"&&(f.status="rejected",f.reason=L)})),f.status){case"fulfilled":return f.value;case"rejected":throw f.reason}}throw f}function T(f,L,oe,E,G){var Q=typeof f;(Q==="undefined"||Q==="boolean")&&(f=null);var ie=!1;if(f===null)ie=!0;else switch(Q){case"bigint":case"string":case"number":ie=!0;break;case"object":switch(f.$$typeof){case o:case h:ie=!0;break;case q:return ie=f._init,T(ie(f._payload),L,oe,E,G)}}if(ie)return G=G(f),ie=E===""?"."+re(f,0):E,Ee(G)?(oe="",ie!=null&&(oe=ie.replace(X,"$&/")+"/"),T(G,L,oe,"",function(we){return we})):G!=null&&(Oe(G)&&(G=Ie(G,oe+(G.key==null||f&&f.key===G.key?"":(""+G.key).replace(X,"$&/")+"/")+ie)),L.push(G)),1;ie=0;var K=E===""?".":E+":";if(Ee(f))for(var ue=0;ue<f.length;ue++)E=f[ue],Q=K+re(E,ue),ie+=T(E,L,oe,Q,G);else if(ue=j(f),typeof ue=="function")for(f=ue.call(f),ue=0;!(E=f.next()).done;)E=E.value,Q=K+re(E,ue++),ie+=T(E,L,oe,Q,G);else if(Q==="object"){if(typeof f.then=="function")return T(F(f),L,oe,E,G);throw L=String(f),Error("Objects are not valid as a React child (found: "+(L==="[object Object]"?"object with keys {"+Object.keys(f).join(", ")+"}":L)+"). If you meant to render a collection of children, use an array instead.")}return ie}function D(f,L,oe){if(f==null)return f;var E=[],G=0;return T(f,E,"","",function(Q){return L.call(oe,Q,G++)}),E}function ae(f){if(f._status===-1){var L=f._result,oe=L();oe.then(function(E){(f._status===0||f._status===-1)&&(f._status=1,f._result=E,oe.status===void 0&&(oe.status="fulfilled",oe.value=E))},function(E){(f._status===0||f._status===-1)&&(f._status=2,f._result=E,oe.status===void 0&&(oe.status="rejected",oe.reason=E))}),f._status===-1&&(f._status=0,f._result=oe)}if(f._status===1)return f._result.default;throw f._result}var me=typeof reportError=="function"?reportError:function(f){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var L=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof f=="object"&&f!==null&&typeof f.message=="string"?String(f.message):String(f),error:f});if(!window.dispatchEvent(L))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",f);return}console.error(f)};function be(f){var L=fe.T,oe={};oe.types=L!==null?L.types:null,fe.T=oe;try{var E=f(),G=fe.S;G!==null&&G(oe,E),typeof E=="object"&&E!==null&&typeof E.then=="function"&&E.then(ce,me)}catch(Q){me(Q)}finally{L!==null&&oe.types!==null&&(L.types=oe.types),fe.T=L}}function je(f){var L=fe.T;if(L!==null){var oe=L.types;oe===null?L.types=[f]:oe.indexOf(f)===-1&&oe.push(f)}else be(je.bind(null,f))}var Me={map:D,forEach:function(f,L,oe){D(f,function(){L.apply(this,arguments)},oe)},count:function(f){var L=0;return D(f,function(){L++}),L},toArray:function(f){return D(f,function(L){return L})||[]},only:function(f){if(!Oe(f))throw Error("React.Children.only expected to receive a single React element child.");return f}};return Ce.Activity=y,Ce.Children=Me,Ce.Component=w,Ce.Fragment=U,Ce.Profiler=R,Ce.PureComponent=xe,Ce.StrictMode=r,Ce.Suspense=P,Ce.ViewTransition=$,Ce.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=fe,Ce.__COMPILER_RUNTIME={__proto__:null,c:function(f){return fe.H.useMemoCache(f)}},Ce.addTransitionType=je,Ce.cache=function(f){return function(){return f.apply(null,arguments)}},Ce.cacheSignal=function(){return null},Ce.cloneElement=function(f,L,oe){if(f==null)throw Error("The argument must be a React element, but you passed "+f+".");var E=v({},f.props),G=f.key;if(L!=null)for(Q in L.key!==void 0&&(G=""+L.key),L)!pe.call(L,Q)||Q==="key"||Q==="__self"||Q==="__source"||Q==="ref"&&L.ref===void 0||(E[Q]=L[Q]);var Q=arguments.length-2;if(Q===1)E.children=oe;else if(1<Q){for(var ie=Array(Q),K=0;K<Q;K++)ie[K]=arguments[K+2];E.children=ie}return Ne(f.type,G,E)},Ce.createContext=function(f){return f={$$typeof:ee,_currentValue:f,_currentValue2:f,_threadCount:0,Provider:null,Consumer:null},f.Provider=f,f.Consumer={$$typeof:I,_context:f},f},Ce.createElement=function(f,L,oe){var E,G={},Q=null;if(L!=null)for(E in L.key!==void 0&&(Q=""+L.key),L)pe.call(L,E)&&E!=="key"&&E!=="__self"&&E!=="__source"&&(G[E]=L[E]);var ie=arguments.length-2;if(ie===1)G.children=oe;else if(1<ie){for(var K=Array(ie),ue=0;ue<ie;ue++)K[ue]=arguments[ue+2];G.children=K}if(f&&f.defaultProps)for(E in ie=f.defaultProps,ie)G[E]===void 0&&(G[E]=ie[E]);return Ne(f,Q,G)},Ce.createRef=function(){return{current:null}},Ce.forwardRef=function(f){return{$$typeof:B,render:f}},Ce.isValidElement=Oe,Ce.lazy=function(f){return{$$typeof:q,_payload:{_status:-1,_result:f},_init:ae}},Ce.memo=function(f,L){return{$$typeof:le,type:f,compare:L===void 0?null:L}},Ce.startTransition=be,Ce.unstable_useCacheRefresh=function(){return fe.H.useCacheRefresh()},Ce.use=function(f){return fe.H.use(f)},Ce.useActionState=function(f,L,oe){return fe.H.useActionState(f,L,oe)},Ce.useCallback=function(f,L){return fe.H.useCallback(f,L)},Ce.useContext=function(f){return fe.H.useContext(f)},Ce.useDebugValue=function(){},Ce.useDeferredValue=function(f,L){return fe.H.useDeferredValue(f,L)},Ce.useEffect=function(f,L){return fe.H.useEffect(f,L)},Ce.useEffectEvent=function(f){return fe.H.useEffectEvent(f)},Ce.useId=function(){return fe.H.useId()},Ce.useImperativeHandle=function(f,L,oe){return fe.H.useImperativeHandle(f,L,oe)},Ce.useInsertionEffect=function(f,L){return fe.H.useInsertionEffect(f,L)},Ce.useLayoutEffect=function(f,L){return fe.H.useLayoutEffect(f,L)},Ce.useMemo=function(f,L){return fe.H.useMemo(f,L)},Ce.useOptimistic=function(f,L){return fe.H.useOptimistic(f,L)},Ce.useReducer=function(f,L,oe){return fe.H.useReducer(f,L,oe)},Ce.useRef=function(f){return fe.H.useRef(f)},Ce.useState=function(f){return fe.H.useState(f)},Ce.useSyncExternalStore=function(f,L,oe){return fe.H.useSyncExternalStore(f,L,oe)},Ce.useTransition=function(){return fe.H.useTransition()},Ce.version="19.3.0",Ce}var Bm;function ro(){return Bm||(Bm=1,to.exports=Wb()),to.exports}var p=ro();const uo=Pm(p);var lo={exports:{}},Xi={},ao={exports:{}},no={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/var Ym;function Fb(){return Ym||(Ym=1,(function(o){function h(F,T){var D=F.length;F.push(T);e:for(;0<D;){var ae=D-1>>>1,me=F[ae];if(0<R(me,T))F[ae]=T,F[D]=me,D=ae;else break e}}function U(F){return F.length===0?null:F[0]}function r(F){if(F.length===0)return null;var T=F[0],D=F.pop();if(D!==T){F[0]=D;e:for(var ae=0,me=F.length,be=me>>>1;ae<be;){var je=2*(ae+1)-1,Me=F[je],f=je+1,L=F[f];if(0>R(Me,D))f<me&&0>R(L,Me)?(F[ae]=L,F[f]=D,ae=f):(F[ae]=Me,F[je]=D,ae=je);else if(f<me&&0>R(L,D))F[ae]=L,F[f]=D,ae=f;else break e}}return T}function R(F,T){var D=F.sortIndex-T.sortIndex;return D!==0?D:F.id-T.id}if(o.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var I=performance;o.unstable_now=function(){return I.now()}}else{var ee=Date,B=ee.now();o.unstable_now=function(){return ee.now()-B}}var P=[],le=[],q=1,y=null,$=3,ne=!1,j=!1,C=!1,v=!1,Y=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,te=typeof setImmediate<"u"?setImmediate:null;function xe(F){for(var T=U(le);T!==null;){if(T.callback===null)r(le);else if(T.startTime<=F)r(le),T.sortIndex=T.expirationTime,h(P,T);else break;T=U(le)}}function Te(F){if(C=!1,xe(F),!j)if(U(P)!==null)j=!0,Ee||(Ee=!0,Oe());else{var T=U(le);T!==null&&re(Te,T.startTime-F)}}var Ee=!1,ce=-1,fe=5,pe=-1;function Ne(){return v?!0:!(o.unstable_now()-pe<fe)}function Ie(){if(v=!1,Ee){var F=o.unstable_now();pe=F;var T=!0;try{e:{j=!1,C&&(C=!1,w(ce),ce=-1),ne=!0;var D=$;try{t:{for(xe(F),y=U(P);y!==null&&!(y.expirationTime>F&&Ne());){var ae=y.callback;if(typeof ae=="function"){y.callback=null,$=y.priorityLevel;var me=ae(y.expirationTime<=F);if(F=o.unstable_now(),typeof me=="function"){y.callback=me,xe(F),T=!0;break t}y===U(P)&&r(P),xe(F)}else r(P);y=U(P)}if(y!==null)T=!0;else{var be=U(le);be!==null&&re(Te,be.startTime-F),T=!1}}break e}finally{y=null,$=D,ne=!1}T=void 0}}finally{T?Oe():Ee=!1}}}var Oe;if(typeof te=="function")Oe=function(){te(Ie)};else if(typeof MessageChannel<"u"){var W=new MessageChannel,X=W.port2;W.port1.onmessage=Ie,Oe=function(){X.postMessage(null)}}else Oe=function(){Y(Ie,0)};function re(F,T){ce=Y(function(){F(o.unstable_now())},T)}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(F){F.callback=null},o.unstable_forceFrameRate=function(F){0>F||125<F?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):fe=0<F?Math.floor(1e3/F):5},o.unstable_getCurrentPriorityLevel=function(){return $},o.unstable_next=function(F){switch($){case 1:case 2:case 3:var T=3;break;default:T=$}var D=$;$=T;try{return F()}finally{$=D}},o.unstable_requestPaint=function(){v=!0},o.unstable_runWithPriority=function(F,T){switch(F){case 1:case 2:case 3:case 4:case 5:break;default:F=3}var D=$;$=F;try{return T()}finally{$=D}},o.unstable_scheduleCallback=function(F,T,D){var ae=o.unstable_now();switch(typeof D=="object"&&D!==null?(D=D.delay,D=typeof D=="number"&&0<D?ae+D:ae):D=ae,F){case 1:var me=-1;break;case 2:me=250;break;case 5:me=1073741823;break;case 4:me=1e4;break;default:me=5e3}return me=D+me,F={id:q++,callback:T,priorityLevel:F,startTime:D,expirationTime:me,sortIndex:-1},D>ae?(F.sortIndex=D,h(le,F),U(P)===null&&F===U(le)&&(C?(w(ce),ce=-1):C=!0,re(Te,D-ae))):(F.sortIndex=me,h(P,F),j||ne||(j=!0,Ee||(Ee=!0,Oe()))),F},o.unstable_shouldYield=Ne,o.unstable_wrapCallback=function(F){var T=$;return function(){var D=$;$=T;try{return F.apply(this,arguments)}finally{$=D}}}})(no)),no}var Gm;function Pb(){return Gm||(Gm=1,ao.exports=Fb()),ao.exports}var io={exports:{}},Lt={};/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var Zm;function e1(){if(Zm)return Lt;Zm=1;var o=ro();function h(q){var y="https://react.dev/errors/"+q;if(1<arguments.length){y+="?args[]="+encodeURIComponent(arguments[1]);for(var $=2;$<arguments.length;$++)y+="&args[]="+encodeURIComponent(arguments[$])}return"Minified React error #"+q+"; visit "+y+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function U(){}var r={d:{f:U,r:function(){throw Error(h(522))},D:U,C:U,L:U,m:U,X:U,S:U,M:U},p:0,findDOMNode:null},R=Symbol.for("react.portal"),I=Symbol.for("react.recoverable"),ee=Symbol.for("react.optimistic_key");function B(q,y,$){var ne=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:R,key:ne==null?null:ne===ee?ee:""+ne,children:q,containerInfo:y,implementation:$}}var P=o.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function le(q,y){if(q==="font")return"";if(typeof y=="string")return y==="use-credentials"?y:""}return Lt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Lt.browser=function(q){return{$$typeof:I,_reason:q}},Lt.createPortal=function(q,y){var $=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!y||y.nodeType!==1&&y.nodeType!==9&&y.nodeType!==11)throw Error(h(299));return B(q,y,null,$)},Lt.flushSync=function(q){var y=P.T,$=r.p;try{if(P.T=null,r.p=2,q)return q()}finally{P.T=y,r.p=$,r.d.f()}},Lt.preconnect=function(q,y){typeof q=="string"&&(y?(y=y.crossOrigin,y=typeof y=="string"?y==="use-credentials"?y:"":void 0):y=null,r.d.C(q,y))},Lt.prefetchDNS=function(q){typeof q=="string"&&r.d.D(q)},Lt.preinit=function(q,y){if(typeof q=="string"&&y&&typeof y.as=="string"){var $=y.as,ne=le($,y.crossOrigin),j=typeof y.integrity=="string"?y.integrity:void 0,C=typeof y.fetchPriority=="string"?y.fetchPriority:void 0;$==="style"?r.d.S(q,typeof y.precedence=="string"?y.precedence:void 0,{crossOrigin:ne,integrity:j,fetchPriority:C}):$==="script"&&r.d.X(q,{crossOrigin:ne,integrity:j,fetchPriority:C,nonce:typeof y.nonce=="string"?y.nonce:void 0})}},Lt.preinitModule=function(q,y){if(typeof q=="string")if(typeof y=="object"&&y!==null){if(y.as==null||y.as==="script"){var $=le(y.as,y.crossOrigin);r.d.M(q,{crossOrigin:$,integrity:typeof y.integrity=="string"?y.integrity:void 0,nonce:typeof y.nonce=="string"?y.nonce:void 0,fetchPriority:typeof y.fetchPriority=="string"?y.fetchPriority:void 0})}}else y==null&&r.d.M(q)},Lt.preload=function(q,y){if(typeof q=="string"&&typeof y=="object"&&y!==null&&typeof y.as=="string"){var $=y.as,ne=le($,y.crossOrigin);r.d.L(q,$,{crossOrigin:ne,integrity:typeof y.integrity=="string"?y.integrity:void 0,nonce:typeof y.nonce=="string"?y.nonce:void 0,type:typeof y.type=="string"?y.type:void 0,fetchPriority:typeof y.fetchPriority=="string"?y.fetchPriority:void 0,referrerPolicy:typeof y.referrerPolicy=="string"?y.referrerPolicy:void 0,imageSrcSet:typeof y.imageSrcSet=="string"?y.imageSrcSet:void 0,imageSizes:typeof y.imageSizes=="string"?y.imageSizes:void 0,media:typeof y.media=="string"?y.media:void 0})}},Lt.preloadModule=function(q,y){if(typeof q=="string")if(y){var $=le(y.as,y.crossOrigin);r.d.m(q,{as:typeof y.as=="string"&&y.as!=="script"?y.as:void 0,crossOrigin:$,integrity:typeof y.integrity=="string"?y.integrity:void 0,nonce:typeof y.nonce=="string"?y.nonce:void 0,fetchPriority:typeof y.fetchPriority=="string"?y.fetchPriority:void 0})}else r.d.m(q)},Lt.requestFormReset=function(q){r.d.r(q)},Lt.unstable_batchedUpdates=function(q,y){return q(y)},Lt.useFormState=function(q,y,$){return P.H.useFormState(q,y,$)},Lt.useFormStatus=function(){return P.H.useHostTransitionStatus()},Lt.version="19.3.0",Lt}var qm;function eh(){if(qm)return io.exports;qm=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(h){console.error(h)}}return o(),io.exports=e1(),io.exports}/**
|
|
34
|
+
* @license React
|
|
35
|
+
* react-dom-client.production.js
|
|
36
|
+
*
|
|
37
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the MIT license found in the
|
|
40
|
+
* LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/var Qm;function t1(){if(Qm)return Xi;Qm=1;var o=Pb(),h=ro(),U=eh();function r(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)t+="&args[]="+encodeURIComponent(arguments[l])}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 R(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function I(e){for(var t=e,l=t;l&&!l.alternate;)t=l,(t.flags&4098)!==0&&(e=t.return),l=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function ee(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 B(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 P(e){if(I(e)!==e)throw Error(r(188))}function le(e){var t=e.alternate;if(!t){if(t=I(e),t===null)throw Error(r(188));return t!==e?null:e}for(var l=e,a=t;;){var n=l.return;if(n===null)break;var i=n.alternate;if(i===null){if(a=n.return,a!==null){l=a;continue}break}if(n.child===i.child){for(i=n.child;i;){if(i===l)return P(n),e;if(i===a)return P(n),t;i=i.sibling}throw Error(r(188))}if(l.return!==a.return)l=n,a=i;else{for(var u=!1,c=n.child;c;){if(c===l){u=!0,l=n,a=i;break}if(c===a){u=!0,a=n,l=i;break}c=c.sibling}if(!u){for(c=i.child;c;){if(c===l){u=!0,l=i,a=n;break}if(c===a){u=!0,a=i,l=n;break}c=c.sibling}if(!u)throw Error(r(189))}}if(l.alternate!==a)throw Error(r(190))}if(l.tag!==3)throw Error(r(188));return l.stateNode.current===l?e:t}function q(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=q(e),t!==null)return t;e=e.sibling}return null}function y(e,t,l,a,n,i){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&l(e,a,n,i)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&y(e.child,t,l,a,n,i))return!0;e=e.sibling}return!1}function $(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function ne(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),!(e.tag===3||e.tag===5||e.tag===27));)e=e.return;return t}function j(e){var t=[null,null],l=$(e);return l===null||C(t,e,l.child,{foundSelf:!1}),t}function C(e,t,l,a){for(;l!==null;){if(l===t)a.foundSelf=!0;else if(l.tag===5||l.tag===27||l.tag===6){if(a.foundSelf)return e[1]=l,!0;e[0]=l}else if((l.tag!==22||l.memoizedState===null)&&C(e,t,l.child,a))return!0;l=l.sibling}return!1}function v(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(r(559))}}var Y=null,w=null;function te(e,t,l){return e===l?!0:e===t?(Y=e,!0):!1}function xe(e,t,l){return e===l?(w=e,!1):e===t?(w!==null&&(Y=e),!0):!1}function Te(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function Ee(e,t,l){for(var a=0,n=e;n;n=l(n))a++;n=0;for(var i=t;i;i=l(i))n++;for(;0<a-n;)e=l(e),a--;for(;0<n-a;)t=l(t),n--;for(;a--;){if(e===t||t!==null&&e===t.alternate)return e;e=l(e),t=l(t)}return null}var ce=Object.assign,fe=Symbol.for("react.element"),pe=Symbol.for("react.transitional.element"),Ne=Symbol.for("react.portal"),Ie=Symbol.for("react.fragment"),Oe=Symbol.for("react.strict_mode"),W=Symbol.for("react.profiler"),X=Symbol.for("react.consumer"),re=Symbol.for("react.context"),F=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),D=Symbol.for("react.suspense_list"),ae=Symbol.for("react.memo"),me=Symbol.for("react.lazy"),be=Symbol.for("react.activity"),je=Symbol.for("react.legacy_hidden"),Me=Symbol.for("react.memo_cache_sentinel"),f=Symbol.for("react.view_transition"),L=Symbol.for("react.recoverable"),oe=Symbol.iterator;function E(e){return e===null||typeof e!="object"?null:(e=oe&&e[oe]||e["@@iterator"],typeof e=="function"?e:null)}var G=Symbol.for("react.client.reference");function Q(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===G?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Ie:return"Fragment";case W:return"Profiler";case Oe:return"StrictMode";case T:return"Suspense";case D:return"SuspenseList";case be:return"Activity";case f:return"ViewTransition"}if(typeof e=="object")switch(e.$$typeof){case Ne:return"Portal";case re:return e.displayName||"Context";case X:return(e._context.displayName||"Context")+".Consumer";case F:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ae:return t=e.displayName||null,t!==null?t:Q(e.type)||"Memo";case me:t=e._payload,e=e._init;try{return Q(e(t))}catch{}}return null}var ie=Array.isArray,K=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ue=U.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,we={pending:!1,data:null,method:null,action:null},Ze=[],Je=-1;function Ue(e){return{current:e}}function De(e){0>Je||(e.current=Ze[Je],Ze[Je]=null,Je--)}function qe(e,t){Je++,Ze[Je]=e.current,e.current=t}var zt=Ue(null),ht=Ue(null),St=Ue(null),dt=Ue(null);function Et(e,t){switch(qe(St,t),qe(ht,e),qe(zt,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vf(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vf(t),e=Xf(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}De(zt),qe(zt,e)}function qt(){De(zt),De(ht),De(St)}function Il(e){var t=e.memoizedState;t!==null&&(Jn._currentValue=t.memoizedState,qe(dt,e)),t=zt.current;var l=Xf(t,e.type);t!==l&&(qe(ht,e),qe(zt,l))}function Ut(e){ht.current===e&&(De(zt),De(ht)),dt.current===e&&(De(dt),Jn._currentValue=we)}var ul,Z;function J(e){if(ul===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);ul=t&&t[1]||"",Z=-1<l.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+ul+e+Z}var O=!1;function N(e,t){if(!e||O)return"";O=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var _=function(){throw Error()};if(Object.defineProperty(_.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(_,[])}catch(se){var x=se}Reflect.construct(e,[],_)}else{try{_.call()}catch(se){x=se}_=!1;try{var S=Object.getOwnPropertyDescriptor(e.prototype,"props");Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),_=!0,new e}finally{_&&(S!==void 0?Object.defineProperty(e.prototype,"props",S):delete e.prototype.props)}}}else{try{throw Error()}catch(se){x=se}(_=e())&&typeof _.catch=="function"&&_.catch(function(){})}}catch(se){if(se&&x&&typeof se.stack=="string")return[se.stack,x.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var n=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");n&&n.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=a.DetermineComponentFrameRoot(),u=i[0],c=i[1];if(u&&c){var d=u.split(`
|
|
44
|
+
`),b=c.split(`
|
|
45
|
+
`);for(n=a=0;a<d.length&&!d[a].includes("DetermineComponentFrameRoot");)a++;for(;n<b.length&&!b[n].includes("DetermineComponentFrameRoot");)n++;if(a===d.length||n===b.length)for(a=d.length-1,n=b.length-1;1<=a&&0<=n&&d[a]!==b[n];)n--;for(;1<=a&&0<=n;a--,n--)if(d[a]!==b[n]){if(a!==1||n!==1)do if(a--,n--,0>n||d[a]!==b[n]){var k=`
|
|
46
|
+
`+d[a].replace(" at new "," at ");return e.displayName&&k.includes("<anonymous>")&&(k=k.replace("<anonymous>",e.displayName)),k}while(1<=a&&0<=n);break}}}finally{O=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?J(l):""}function ze(e,t){switch(e.tag){case 26:case 27:case 5:return J(e.type);case 16:return J("Lazy");case 13:return e.child!==t&&t!==null?J("Suspense Fallback"):J("Suspense");case 19:return J("SuspenseList");case 0:case 15:return N(e.type,!1);case 11:return N(e.type.render,!1);case 1:return N(e.type,!0);case 31:return J("Activity");case 30:return J("ViewTransition");default:return""}}function H(e){try{var t="",l=null;do t+=ze(e,l),l=e,e=e.return;while(e);return t}catch(a){return`
|
|
47
|
+
Error generating stack: `+a.message+`
|
|
48
|
+
`+a.stack}}var Xe=Object.prototype.hasOwnProperty,rt=o.unstable_scheduleCallback,ut=o.unstable_cancelCallback,nt=o.unstable_shouldYield,Ul=o.unstable_requestPaint,Mt=o.unstable_now,la=o.unstable_getCurrentPriorityLevel,de=o.unstable_ImmediatePriority,cn=o.unstable_UserBlockingPriority,Da=o.unstable_NormalPriority,Eu=o.unstable_LowPriority,$i=o.unstable_IdlePriority,Wi=o.log,M=o.unstable_setDisableYieldValue,V=null,ye=null;function Re(e){if(typeof Wi=="function"&&M(e),ye&&typeof ye.setStrictMode=="function")try{ye.setStrictMode(V,e)}catch{}}var lt=Math.clz32?Math.clz32:Ft,wt=Math.log,Qt=Math.LN2;function Ft(e){return e>>>=0,e===0?32:31-(wt(e)/Qt|0)|0}var Ht=256,jl=262144,Aa=4194304;function Hl(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&-e;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 ti(e,t,l){var a=e.pendingLanes;if(a===0)return 0;var n=0,i=e.suspendedLanes,u=e.pingedLanes;e=e.warmLanes;var c=a&134217727;return c!==0?(a=c&~i,a!==0?n=Hl(a):(u&=c,u!==0?n=Hl(u):l||(l=c&~e,l!==0&&(n=Hl(l))))):(c=a&~i,c!==0?n=Hl(c):u!==0?n=Hl(u):l||(l=a&~e,l!==0&&(n=Hl(l)))),n===0?0:t!==0&&t!==n&&(t&i)===0&&(i=n&-n,l=t&-t,i>=l||i===32&&(l&4194048)!==0)?t:n}function aa(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function et(e,t){(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var a=31-lt(l),n=1<<a;t|=e[a],l&=~n}return t}function cl(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 na(){var e=Aa;return Aa<<=1,(Aa&62914560)===0&&(Aa=4194304),e}function _a(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function Oa(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ox(e,t,l,a,n,i){var u=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var c=e.entanglements,d=e.expirationTimes,b=e.hiddenUpdates;for(l=u&~l;0<l;){var k=31-lt(l),_=1<<k;c[k]=0,d[k]=-1;var x=b[k];if(x!==null)for(b[k]=null,k=0;k<x.length;k++){var S=x[k];S!==null&&(S.lane&=-536870913)}l&=~_}a!==0&&vo(e,a,0),i!==0&&n===0&&e.tag!==0&&(e.suspendedLanes|=i&~(u&~t))}function vo(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-lt(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|l&261930}function po(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var a=31-lt(l),n=1<<a;n&t|e[a]&t&&(e[a]|=t),l&=~n}}function zo(e,t){var l=t&-t;return l=(l&42)!==0?1:Mu(l),(l&(e.suspendedLanes|t))!==0?0:l}function Mu(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 wu(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function So(){var e=ue.p;return e!==0?e:(e=window.event,e===void 0?32:Cm(e.type))}function No(e,t){var l=ue.p;try{return ue.p=e,t()}finally{ue.p=l}}var Bl=Math.random().toString(36).slice(2),Ct="__reactFiber$"+Bl,Vt="__reactProps$"+Bl,rn="__reactContainer$"+Bl,jo="__reactEvents$"+Bl,dx="__reactListeners$"+Bl,fx="__reactHandles$"+Bl,ko="__reactResources$"+Bl,li="__reactMarker$"+Bl,Fi="__reactLoad$"+Bl;function Pi(e){delete e[Ct],delete e[Vt],delete e[dx],delete e[fx]}function Ra(e){var t;if(t=e[Ct])return t;for(var l=e.parentNode;l;){if(t=l[rn]||l[Ct]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=om(e);e!==null;){if(l=e[Ct])return l;e=om(e)}return t}e=l,l=e.parentNode}return null}function on(e){if(e=e[Ct]||e[rn]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ai(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function dn(e){var t=e[ko];return t||(t=e[ko]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Nt(e){e[li]=!0}function To(e){e[Fi]=void 0}var Eo=new Set,Mo={};function La(e,t){fn(e,t),fn(e+"Capture",t)}function fn(e,t){for(Mo[e]=t,e=0;e<t.length;e++)Eo.add(t[e])}var mx=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]*$"),wo={},Co={};function hx(e){return Xe.call(Co,e)?!0:Xe.call(wo,e)?!1:mx.test(e)?Co[e]=!0:(wo[e]=!0,!1)}var Ve=!1;function Do(){var e=Ve;return Ve=!1,e}function es(e,t,l){if(hx(t))if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,l)}}function ts(e,t,l){if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,l)}}function Yl(e,t,l,a){if(a===null)e.removeAttribute(l);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(t,l,a)}}function Pt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ao(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function xx(e,t,l){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var n=a.get,i=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return n.call(this)},set:function(u){l=""+u,i.call(this,u)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return l},setValue:function(u){l=""+u},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Cu(e){if(!e._valueTracker){var t=Ao(e)?"checked":"value";e._valueTracker=xx(e,t,""+e[t])}}function _o(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),a="";return e&&(a=Ao(e)?e.checked?"true":"false":e.value),e=a,e!==l?(t.setValue(e),!0):!1}var gx=/[\n"\\]/g;function rl(e){return e.replace(gx,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Du(e,t,l,a,n,i,u,c){e.name="",u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"?e.type=u:e.removeAttribute("type"),t!=null?u==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Pt(t)):e.value!==""+Pt(t)&&(e.value=""+Pt(t)):u!=="submit"&&u!=="reset"||e.removeAttribute("value"),t!=null?u==="number"&&e.value==t?Au(e,Pt(e.value)):Au(e,Pt(t)):l!=null?Au(e,Pt(l)):a!=null&&e.removeAttribute("value"),n==null&&i!=null&&(e.defaultChecked=!!i),n!=null&&(e.checked=n&&typeof n!="function"&&typeof n!="symbol"),c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"?e.name=""+Pt(c):e.removeAttribute("name")}function Oo(e,t,l,a,n,i,u,c){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||l!=null){if(!(i!=="submit"&&i!=="reset"||t!=null)){Cu(e);return}l=l!=null?""+Pt(l):"",t=t!=null?""+Pt(t):l,c||t===e.value||(e.value=t),e.defaultValue=t}a=a??n,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=c?e.checked:!!a,e.defaultChecked=!!a,u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.name=u),Cu(e)}function Au(e,t){e.defaultValue!==""+t&&(e.defaultValue=""+t)}function mn(e,t,l,a){if(e=e.options,t){t={};for(var n=0;n<l.length;n++)t["$"+l[n]]=!0;for(l=0;l<e.length;l++)n=t.hasOwnProperty("$"+e[l].value),e[l].selected!==n&&(e[l].selected=n),n&&a&&(e[l].defaultSelected=!0)}else{for(l=""+Pt(l),t=null,n=0;n<e.length;n++){if(e[n].value===l){e[n].selected=!0,a&&(e[n].defaultSelected=!0);return}t!==null||e[n].disabled||(t=e[n])}t!==null&&(t.selected=!0)}}function Ro(e,t,l){if(t!=null&&(t=""+Pt(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+Pt(l):""}function Lo(e,t,l,a){if(t==null){if(a!=null){if(l!=null)throw Error(r(92));if(ie(a)){if(1<a.length)throw Error(r(93));a=a[0]}l=a}l==null&&(l=""),t=l}l=Pt(t),e.defaultValue=l,a=e.textContent,a===l&&a!==""&&a!==null&&(e.value=a),Cu(e)}function hn(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var bx=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 Io(e,t,l){var a=t.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,l):typeof l!="number"||l===0||bx.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function Uo(e,t,l){if(t!=null&&typeof t!="object")throw Error(r(62));if(e=e.style,l!=null){for(var a in l)!l.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="",Ve=!0);for(var n in t)a=t[n],t.hasOwnProperty(n)&&l[n]!==a&&(Io(e,n,a),Ve=!0)}else for(var i in t)t.hasOwnProperty(i)&&Io(e,i,t[i])}function _u(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 yx=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"],["maskType","mask-type"],["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"]]),vx=/^[\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 ls(e){return vx.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function kl(){}var Ou=null;function Ru(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var xn=null,gn=null;function Ho(e){var t=on(e);if(t&&(e=t.stateNode)){var l=e[Vt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Du(e,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),t=l.name,l.type==="radio"&&t!=null){for(l=e;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+rl(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var a=l[t];if(a!==e&&a.form===e.form){var n=a[Vt]||null;if(!n)throw Error(r(90));Du(a,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name)}}for(t=0;t<l.length;t++)a=l[t],a.form===e.form&&_o(a)}break e;case"textarea":Ro(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&mn(e,!!l.multiple,t,!1)}}}var Lu=!1;function Bo(e,t,l){if(Lu)return e(t,l);Lu=!0;try{var a=e(t);return a}finally{if(Lu=!1,(xn!==null||gn!==null)&&(lu(),xn&&(t=xn,e=gn,gn=xn=null,Ho(t),e)))for(t=0;t<e.length;t++)Ho(e[t])}}function ni(e,t){var l=e.stateNode;if(l===null)return null;var a=l[Vt]||null;if(a===null)return null;l=a[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(l&&typeof l!="function")throw Error(r(231,t,typeof l));return l}var Gl=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Iu=!1;if(Gl)try{var ii={};Object.defineProperty(ii,"passive",{get:function(){Iu=!0}}),window.addEventListener("test",ii,ii),window.removeEventListener("test",ii,ii)}catch{Iu=!1}var ia=null,Uu=null,as=null;function Yo(){if(as)return as;var e,t=Uu,l=t.length,a,n="value"in ia?ia.value:ia.textContent,i=n.length;for(e=0;e<l&&t[e]===n[e];e++);var u=l-e;for(a=1;a<=u&&t[l-a]===n[i-a];a++);return as=n.slice(e,1<a?1-a:void 0)}function ns(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 is(){return!0}function Go(){return!1}function Bt(e){function t(l,a,n,i,u){this._reactName=l,this._targetInst=n,this.type=a,this.nativeEvent=i,this.target=u,this.currentTarget=null;for(var c in e)e.hasOwnProperty(c)&&(l=e[c],this[c]=l?l(i):i[c]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?is:Go,this.isPropagationStopped=Go,this}return ce(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=is)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=is)},persist:function(){},isPersistent:is}),t}var sa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ss=Bt(sa),si=ce({},sa,{view:0,detail:0}),px=Bt(si),Hu,Bu,ui,us=ce({},si,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Gu,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!==ui&&(ui&&e.type==="mousemove"?(Hu=e.screenX-ui.screenX,Bu=e.screenY-ui.screenY):Bu=Hu=0,ui=e),Hu)},movementY:function(e){return"movementY"in e?e.movementY:Bu}}),Zo=Bt(us),zx=ce({},us,{dataTransfer:0}),Sx=Bt(zx),Nx=ce({},si,{relatedTarget:0}),Yu=Bt(Nx),jx=ce({},sa,{animationName:0,elapsedTime:0,pseudoElement:0}),kx=Bt(jx),Tx=ce({},sa,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Ex=Bt(Tx),Mx=ce({},sa,{data:0}),qo=Bt(Mx),wx={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Cx={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"},Dx={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ax(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Dx[e])?!!t[e]:!1}function Gu(){return Ax}var _x=ce({},si,{key:function(e){if(e.key){var t=wx[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ns(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Cx[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Gu,charCode:function(e){return e.type==="keypress"?ns(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ns(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Ox=Bt(_x),Rx=ce({},us,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Qo=Bt(Rx),Lx=ce({},sa,{submitter:0}),Ix=Bt(Lx),Ux=ce({},si,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Gu}),Hx=Bt(Ux),Bx=ce({},sa,{propertyName:0,elapsedTime:0,pseudoElement:0}),Yx=Bt(Bx),Gx=ce({},us,{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}),Zx=Bt(Gx),qx=ce({},sa,{newState:0,oldState:0,source:0}),Qx=Bt(qx),Vx=[9,13,27,32],Zu=Gl&&"CompositionEvent"in window,ci=null;Gl&&"documentMode"in document&&(ci=document.documentMode);var Xx=Gl&&"TextEvent"in window&&!ci,Vo=Gl&&(!Zu||ci&&8<ci&&11>=ci),Xo=" ",Ko=!1;function Jo(e,t){switch(e){case"keyup":return Vx.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function $o(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var bn=!1;function Kx(e,t){switch(e){case"compositionend":return $o(t);case"keypress":return t.which!==32?null:(Ko=!0,Xo);case"textInput":return e=t.data,e===Xo&&Ko?null:e;default:return null}}function Jx(e,t){if(bn)return e==="compositionend"||!Zu&&Jo(e,t)?(e=Yo(),as=Uu=ia=null,bn=!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 Vo&&t.locale!=="ko"?null:t.data;default:return null}}var $x={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 Wo(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!$x[e.type]:t==="textarea"}function Fo(e,t,l,a){xn?gn?gn.push(a):gn=[a]:xn=a,t=cu(t,"onChange"),0<t.length&&(l=new ss("onChange","change",null,l,a),e.push({event:l,listeners:t}))}var ri=null,oi=null;function Wx(e){Bf(e,0)}function cs(e){var t=ai(e);if(_o(t))return e}function Po(e,t){if(e==="change")return t}var e0=!1;if(Gl){var qu;if(Gl){var Qu="oninput"in document;if(!Qu){var t0=document.createElement("div");t0.setAttribute("oninput","return;"),Qu=typeof t0.oninput=="function"}qu=Qu}else qu=!1;e0=qu&&(!document.documentMode||9<document.documentMode)}function l0(){ri&&(ri.detachEvent("onpropertychange",a0),oi=ri=null)}function a0(e){if(e.propertyName==="value"&&cs(oi)){var t=[];Fo(t,oi,e,Ru(e)),Bo(Wx,t)}}function Fx(e,t,l){e==="focusin"?(l0(),ri=t,oi=l,ri.attachEvent("onpropertychange",a0)):e==="focusout"&&l0()}function Px(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return cs(oi)}function eg(e,t){if(e==="click")return cs(t)}function tg(e,t){if(e==="input"||e==="change")return cs(t)}function lg(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var el=typeof Object.is=="function"?Object.is:lg;function di(e,t){if(el(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var l=Object.keys(e),a=Object.keys(t);if(l.length!==a.length)return!1;for(a=0;a<l.length;a++){var n=l[a];if(!Xe.call(t,n)||!el(e[n],t[n]))return!1}return!0}function Vu(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}}function n0(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function i0(e,t){var l=n0(e);e=0;for(var a;l;){if(l.nodeType===3){if(a=e+l.textContent.length,e<=t&&a>=t)return{node:l,offset:t-e};e=a}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=n0(l)}}function s0(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?s0(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function u0(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Vu(e.document);t instanceof e.HTMLIFrameElement;){try{var l=typeof t.contentWindow.location.href=="string"}catch{l=!1}if(l)e=t.contentWindow;else break;t=Vu(e.document)}return t}function Xu(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 ag=Gl&&"documentMode"in document&&11>=document.documentMode,yn=null,Ku=null,fi=null,Ju=!1;function c0(e,t,l){var a=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Ju||yn==null||yn!==Vu(a)||(a=yn,"selectionStart"in a&&Xu(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),fi&&di(fi,a)||(fi=a,a=cu(Ku,"onSelect"),0<a.length&&(t=new ss("onSelect","select",null,t,l),e.push({event:t,listeners:a}),t.target=yn)))}function Ia(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var vn={animationend:Ia("Animation","AnimationEnd"),animationiteration:Ia("Animation","AnimationIteration"),animationstart:Ia("Animation","AnimationStart"),transitionrun:Ia("Transition","TransitionRun"),transitionstart:Ia("Transition","TransitionStart"),transitioncancel:Ia("Transition","TransitionCancel"),transitionend:Ia("Transition","TransitionEnd")},$u={},r0={};Gl&&(r0=document.createElement("div").style,"AnimationEvent"in window||(delete vn.animationend.animation,delete vn.animationiteration.animation,delete vn.animationstart.animation),"TransitionEvent"in window||delete vn.transitionend.transition);function Ua(e){if($u[e])return $u[e];if(!vn[e])return e;var t=vn[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in r0)return $u[e]=t[l];return e}var o0=Ua("animationend"),d0=Ua("animationiteration"),f0=Ua("animationstart"),ng=Ua("transitionrun"),ig=Ua("transitionstart"),sg=Ua("transitioncancel"),m0=Ua("transitionend"),h0=new Map,Wu="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError 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(" ");Wu.push("scrollEnd");function yl(e,t){h0.set(e,t),La(t,[e])}var ug=0;function Zl(e,t){if(e.name!=null&&e.name!=="auto")return e.name;if(t.autoName!==null)return t.autoName;e=Sl.identifierPrefix;var l=ug++;return e="_"+e+"t_"+l.toString(32)+"_",t.autoName=e}function x0(e){if(e==null||typeof e=="string")return e;var t=null,l=Hn;if(l!==null)for(var a=0;a<l.length;a++){var n=e[l[a]];if(n!=null){if(n==="none")return"none";t=t==null?n:t+(" "+n)}}return t??e.default}function ql(e,t){return e=x0(e),t=x0(t),t==null?e==="auto"?null:e:t==="auto"?null:t}var rs=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)},ol=[],pn=0,Fu=0;function os(){for(var e=pn,t=Fu=pn=0;t<e;){var l=ol[t];ol[t++]=null;var a=ol[t];ol[t++]=null;var n=ol[t];ol[t++]=null;var i=ol[t];if(ol[t++]=null,a!==null&&n!==null){var u=a.pending;u===null?n.next=n:(n.next=u.next,u.next=n),a.pending=n}i!==0&&g0(l,n,i)}}function ds(e,t,l,a){ol[pn++]=e,ol[pn++]=t,ol[pn++]=l,ol[pn++]=a,Fu|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function Pu(e,t,l,a){return ds(e,t,l,a),fs(e)}function Ha(e,t){return ds(e,null,null,t),fs(e)}function g0(e,t,l){e.lanes|=l;var a=e.alternate;a!==null&&(a.lanes|=l);for(var n=!1,i=e.return;i!==null;)i.childLanes|=l,a=i.alternate,a!==null&&(a.childLanes|=l),i.tag===22&&(e=i.stateNode,e===null||e._visibility&1||(n=!0)),e=i,i=i.return;return e.tag===3?(i=e.stateNode,n&&t!==null&&(n=31-lt(l),e=i.hiddenUpdates,a=e[n],a===null?e[n]=[t]:a.push(t),t.lane=l|536870912),i):null}function fs(e){if(50<Oi)throw Oi=0,tu=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var zn={};function cg(e,t,l,a){this.tag=e,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Xt(e,t,l,a){return new cg(e,t,l,a)}function ec(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ql(e,t){var l=e.alternate;return l===null?(l=Xt(e.tag,t,e.key,e.mode),l.elementType=e.elementType,l.type=e.type,l.stateNode=e.stateNode,l.alternate=e,e.alternate=l):(l.pendingProps=t,l.type=e.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=e.flags&1206910976,l.childLanes=e.childLanes,l.lanes=e.lanes,l.child=e.child,l.memoizedProps=e.memoizedProps,l.memoizedState=e.memoizedState,l.updateQueue=e.updateQueue,t=e.dependencies,l.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},l.sibling=e.sibling,l.index=e.index,l.ref=e.ref,l.refCleanup=e.refCleanup,l}function b0(e,t){e.flags&=1206910978;var l=e.alternate;return l===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=l.childLanes,e.lanes=l.lanes,e.child=l.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=l.memoizedProps,e.memoizedState=l.memoizedState,e.updateQueue=l.updateQueue,e.type=l.type,t=l.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function ms(e,t,l,a,n,i){var u=0;if(a=e,typeof a=="function")ec(a)&&(u=1);else if(typeof a=="string")u=Lb(e,l,zt.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(a){case be:return e=Xt(31,l,t,n),e.elementType=be,e.lanes=i,e;case Ie:return Ba(l.children,n,i,t);case Oe:u=8,n|=24;break;case W:return e=Xt(12,l,t,n|2),e.elementType=W,e.lanes=i,e;case T:return e=Xt(13,l,t,n),e.elementType=T,e.lanes=i,e;case D:return e=Xt(19,l,t,n),e.elementType=D,e.lanes=i,e;case je:case f:return e=n|32,e=Xt(30,l,t,e),e.elementType=f,e.lanes=i,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case re:u=10;break e;case X:u=9;break e;case F:u=11;break e;case ae:u=14;break e;case me:u=16,a=null;break e}u=29,l=Error(r(130,e===null?"null":typeof e,"")),a=null}return t=Xt(u,l,t,n),t.elementType=e,t.type=a,t.lanes=i,t}function Ba(e,t,l,a){return e=Xt(7,e,a,t),e.lanes=l,e}function tc(e,t,l){return e=Xt(6,e,null,t),e.lanes=l,e}function y0(e){var t=Xt(18,null,null,0);return t.stateNode=e,t}function lc(e,t,l){return t=Xt(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var v0=new WeakMap;function dl(e,t){if(typeof e=="object"&&e!==null){var l=v0.get(e);return l!==void 0?l:(t={value:e,source:t,stack:H(t)},v0.set(e,t),t)}return{value:e,source:t,stack:H(t)}}var Sn=[],Nn=0,hs=null,mi=0,fl=[],ml=0,ua=null,Tl=1,El="";function Vl(e,t){Sn[Nn++]=mi,Sn[Nn++]=hs,hs=e,mi=t}function p0(e,t,l){fl[ml++]=Tl,fl[ml++]=El,fl[ml++]=ua,ua=e;var a=Tl;e=El;var n=32-lt(a)-1;a&=~(1<<n),l+=1;var i=32-lt(t)+n;if(30<i){var u=n-n%5;i=(a&(1<<u)-1).toString(32),a>>=u,n-=u,Tl=1<<32-lt(t)+n|l<<n|a,El=i+e}else Tl=1<<i|l<<n|a,El=e}function xs(e){e.return!==null&&(Vl(e,1),p0(e,1,0))}function ac(e){for(;e===hs;)hs=Sn[--Nn],Sn[Nn]=null,mi=Sn[--Nn],Sn[Nn]=null;for(;e===ua;)ua=fl[--ml],fl[ml]=null,El=fl[--ml],fl[ml]=null,Tl=fl[--ml],fl[ml]=null}function z0(e,t){fl[ml++]=Tl,fl[ml++]=El,fl[ml++]=ua,Tl=t.id,El=t.overflow,ua=e}var jt=null,it=null,Le=!1,ca=null,hl=!1,nc=Error(r(519));function ra(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw hi(dl(t,e)),nc}function S0(e){var t=e.stateNode,l=e.type,a=e.memoizedProps;switch(t[Ct]=e,t[Vt]=a,l){case"dialog":Be("cancel",t),Be("close",t);break;case"iframe":case"object":case"embed":Be("load",t);break;case"video":case"audio":for(l=0;l<Li.length;l++)Be(Li[l],t);break;case"source":Be("error",t);break;case"img":case"image":case"link":Be("error",t),Be("load",t);break;case"details":Be("toggle",t);break;case"input":Be("invalid",t),Oo(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":Be("invalid",t);break;case"textarea":Be("invalid",t),Lo(t,a.value,a.defaultValue,a.children)}l=a.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||t.textContent===""+l||a.suppressHydrationWarning===!0||qf(t.textContent,l)?(a.popover!=null&&(Be("beforetoggle",t),Be("toggle",t)),a.onScroll!=null&&Be("scroll",t),a.onScrollEnd!=null&&Be("scrollend",t),a.onClick!=null&&(t.onclick=kl),t=!0):t=!1,t||ra(e,!0)}function gs(e){for(jt=e.return;jt;)switch(jt.tag){case 5:case 31:case 13:hl=!1;return;case 27:case 3:hl=!0;return;default:jt=jt.return}}function jn(e){if(e!==jt)return!1;if(!Le)return gs(e),Le=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||Or(e.type,e.memoizedProps)),l=!l),l&&it&&ra(e),gs(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));it=rm(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));it=rm(e)}else t===27?(t=it,ka(e.type)?(e=Zr,Zr=null,it=e):it=t):it=jt?gl(e.stateNode.nextSibling):null;return!0}function Ya(){it=jt=null,Le=!1}function ic(){var e=ca;return e!==null&&($t===null?$t=e:$t.push.apply($t,e),ca=null),e}function hi(e){ca===null?ca=[e]:ca.push(e)}var sc=Ue(null),Ga=null,Xl=null;function oa(e,t,l){qe(sc,t._currentValue),t._currentValue=l}function Kl(e){e._currentValue=sc.current,De(sc)}function bs(e,t,l){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===l)break;e=e.return}}function uc(e,t,l,a){var n=e.child;for(n!==null&&(n.return=e);n!==null;){var i=n.dependencies;if(i!==null){var u=n.child;i=i.firstContext;e:for(;i!==null;){var c=i;i=n;for(var d=0;d<t.length;d++)if(c.context===t[d]){i.lanes|=l,c=i.alternate,c!==null&&(c.lanes|=l),bs(i.return,l,e),a||(u=null);break e}i=c.next}}else if(n.tag===18){if(u=n.return,u===null)throw Error(r(341));u.lanes|=l,i=u.alternate,i!==null&&(i.lanes|=l),bs(u,l,e),u=null}else n.tag===13&&n.memoizedState!==null&&n.memoizedState.dehydrated===null?(n.lanes|=l,u=n.alternate,u!==null&&(u.lanes|=l),bs(n.return,l,e),u=n.child,u=u!==null?u.sibling:null):u=n.child;if(u!==null)u.return=n;else for(u=n;u!==null;){if(u===e){u=null;break}if(n=u.sibling,n!==null){n.return=u.return,u=n;break}u=u.return}n=u}}function Za(e,t,l,a){e=null;for(var n=t,i=!1;n!==null;){if(!i){if((n.flags&524288)!==0)i=!0;else if((n.flags&262144)!==0)break}if(n.tag===10){var u=n.alternate;if(u===null)throw Error(r(387));if(u=u.memoizedProps,u!==null){var c=n.type;el(n.pendingProps.value,u.value)||(e!==null?e.push(c):e=[c])}}else if(n===dt.current){if(u=n.alternate,u===null)throw Error(r(387));u.memoizedState.memoizedState!==n.memoizedState.memoizedState&&(e!==null?e.push(Jn):e=[Jn])}n=n.return}return e!==null&&uc(t,e,l,a),t.flags|=262144,e!==null}function ys(e){for(e=e.firstContext;e!==null;){if(!el(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function qa(e){Ga=e,Xl=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Dt(e){return N0(Ga,e)}function vs(e,t){return Ga===null&&qa(e),N0(e,t)}function N0(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},Xl===null){if(e===null)throw Error(r(308));Xl=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Xl=Xl.next=t;return l}var rg=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(l,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(l){return l()})}},og=o.unstable_scheduleCallback,dg=o.unstable_NormalPriority,gt={$$typeof:re,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function cc(){return{controller:new rg,data:new Map,refCount:0}}function xi(e){e.refCount--,e.refCount===0&&og(dg,function(){e.controller.abort()})}function j0(e,t){if((e.pendingLanes&4194048)!==0){var l=e.transitionTypes;for(l===null&&(l=e.transitionTypes=[]),e=0;e<t.length;e++){var a=t[e];l.indexOf(a)===-1&&l.push(a)}}}var gi=null;function fg(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var bi=null,rc=0,Qa=0,kn=null;function mg(e,t){if(bi===null){var l=bi=[];rc=0,Qa=kr(),kn={status:"pending",value:void 0,then:function(a){l.push(a)}}}return rc++,t.then(k0,k0),t}function k0(){if(--rc===0&&(gi=null,bi!==null)){kn!==null&&(kn.status="fulfilled");var e=bi;bi=null,Qa=0,kn=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function hg(e,t){var l=[],a={status:"pending",value:null,reason:null,then:function(n){l.push(n)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var n=0;n<l.length;n++)(0,l[n])(t)},function(n){for(a.status="rejected",a.reason=n,n=0;n<l.length;n++)(0,l[n])(void 0)}),a}var T0=K.S;K.S=function(e,t){if(vf=Mt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&mg(e,t),gi!==null)for(var l=Zn;l!==null;)j0(l,gi),l=l.next;if(l=e.types,l!==null){for(var a=Zn;a!==null;)j0(a,l),a=a.next;if(Qa!==0){a=gi,a===null&&(a=gi=[]);for(var n=0;n<l.length;n++){var i=l[n];a.indexOf(i)===-1&&a.push(i)}}}T0!==null&&T0(e,t)};var Va=Ue(null);function oc(){var e=Va.current;return e!==null?e:at.pooledCache}function ps(e,t){t===null?qe(Va,Va.current):qe(Va,t.pool)}function E0(){var e=oc();return e===null?null:{parent:gt._currentValue,pool:e}}var Tn=Error(r(460)),dc=Error(r(474)),zs=Error(r(542)),Ss={then:function(){}};function M0(e){return e=e.status,e==="fulfilled"||e==="rejected"}function w0(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(kl,kl),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,D0(e),e===void 0&&!("reason"in t)?Error(r(600)):e;default:if(typeof t.status=="string")t.then(kl,kl);else{if(e=at,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var n=t;n.status="fulfilled",n.value=a}},function(a){if(t.status==="pending"){var n=t;n.status="rejected",n.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,D0(e),e}throw Ka=t,Tn}}function Xa(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(Ka=l,Tn):l}}var Ka=null;function C0(){if(Ka===null)throw Error(r(459));var e=Ka;return Ka=null,e}function D0(e){if(e===Tn||e===zs)throw Error(r(483))}var En=null,yi=0;function Ns(e){var t=yi;return yi+=1,En===null&&(En=[]),w0(En,e,t)}function da(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function js(e,t){throw t.$$typeof===fe?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function A0(e){function t(g,m){if(e){var z=g.deletions;z===null?(g.deletions=[m],g.flags|=16):z.push(m)}}function l(g,m){if(!e)return null;for(;m!==null;)t(g,m),m=m.sibling;return null}function a(g){for(var m=new Map;g!==null;)g.key===null?m.set(g.index,g):m.set(g.key,g),g=g.sibling;return m}function n(g,m){return g=Ql(g,m),g.index=0,g.sibling=null,g}function i(g,m,z){return g.index=z,e?(z=g.alternate,z!==null?(z=z.index,z<m?(g.flags|=2,m):z):(g.flags|=134217730,m)):(g.flags|=1048576,m)}function u(g){return e&&g.alternate===null&&(g.flags|=134217730),g}function c(g,m,z,A){return m===null||m.tag!==6?(m=tc(z,g.mode,A),m.return=g,m):(m=n(m,z),m.return=g,m)}function d(g,m,z,A){var he=z.type;return he===Ie?(g=k(g,m,z.props.children,A,z.key),da(g,z),g):m!==null&&(m.elementType===he||typeof he=="object"&&he!==null&&he.$$typeof===me&&Xa(he)===m.type)?(m=n(m,z.props),da(m,z),m.return=g,m):(m=ms(z.type,z.key,z.props,null,g.mode,A),da(m,z),m.return=g,m)}function b(g,m,z,A){return m===null||m.tag!==4||m.stateNode.containerInfo!==z.containerInfo||m.stateNode.implementation!==z.implementation?(m=lc(z,g.mode,A),m.return=g,m):(m=n(m,z.children||[]),m.return=g,m)}function k(g,m,z,A,he){return m===null||m.tag!==7?(m=Ba(z,g.mode,A,he),m.return=g,m):(m=n(m,z),m.return=g,m)}function _(g,m,z){if(typeof m=="string"&&m!==""||typeof m=="number"||typeof m=="bigint")return m=tc(""+m,g.mode,z),m.return=g,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case pe:return z=ms(m.type,m.key,m.props,null,g.mode,z),da(z,m),z.return=g,z;case Ne:return m=lc(m,g.mode,z),m.return=g,m;case me:return m=Xa(m),_(g,m,z)}if(ie(m)||E(m))return m=Ba(m,g.mode,z,null),m.return=g,m;if(typeof m.then=="function")return _(g,Ns(m),z);if(m.$$typeof===re)return _(g,vs(g,m),z);js(g,m)}return null}function x(g,m,z,A){var he=m!==null?m.key:null;if(typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint")return he!==null?null:c(g,m,""+z,A);if(typeof z=="object"&&z!==null){switch(z.$$typeof){case pe:return z.key===he?d(g,m,z,A):null;case Ne:return z.key===he?b(g,m,z,A):null;case me:return z=Xa(z),x(g,m,z,A)}if(ie(z)||E(z))return he!==null?null:k(g,m,z,A,null);if(typeof z.then=="function")return x(g,m,Ns(z),A);if(z.$$typeof===re)return x(g,m,vs(g,z),A);js(g,z)}return null}function S(g,m,z,A,he){if(typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint")return g=g.get(z)||null,c(m,g,""+A,he);if(typeof A=="object"&&A!==null){switch(A.$$typeof){case pe:return g=g.get(A.key===null?z:A.key)||null,d(m,g,A,he);case Ne:return g=g.get(A.key===null?z:A.key)||null,b(m,g,A,he);case me:return A=Xa(A),S(g,m,z,A,he)}if(ie(A)||E(A))return g=g.get(z)||null,k(m,g,A,he,null);if(typeof A.then=="function")return S(g,m,z,Ns(A),he);if(A.$$typeof===re)return S(g,m,z,vs(m,A),he);js(m,A)}return null}function se(g,m,z,A){for(var he=null,Ge=null,ve=m,ke=m=0,vt=null;ve!==null&&ke<z.length;ke++){ve.index>ke?(vt=ve,ve=null):vt=ve.sibling;var Qe=x(g,ve,z[ke],A);if(Qe===null){ve===null&&(ve=vt);break}e&&ve&&Qe.alternate===null&&t(g,ve),m=i(Qe,m,ke),Ge===null?he=Qe:Ge.sibling=Qe,Ge=Qe,ve=vt}if(ke===z.length)return l(g,ve),Le&&Vl(g,ke),he;if(ve===null){for(;ke<z.length;ke++)ve=_(g,z[ke],A),ve!==null&&(m=i(ve,m,ke),Ge===null?he=ve:Ge.sibling=ve,Ge=ve);return Le&&Vl(g,ke),he}for(ve=a(ve);ke<z.length;ke++)vt=S(ve,g,ke,z[ke],A),vt!==null&&(e&&(Qe=vt.alternate,Qe!==null&&ve.delete(Qe.key===null?ke:Qe.key)),m=i(vt,m,ke),Ge===null?he=vt:Ge.sibling=vt,Ge=vt);return e&&ve.forEach(function(Ca){return t(g,Ca)}),Le&&Vl(g,ke),he}function ge(g,m,z,A){if(z==null)throw Error(r(151));for(var he=null,Ge=null,ve=m,ke=m=0,vt=null,Qe=z.next();ve!==null&&!Qe.done;ke++,Qe=z.next()){ve.index>ke?(vt=ve,ve=null):vt=ve.sibling;var Ca=x(g,ve,Qe.value,A);if(Ca===null){ve===null&&(ve=vt);break}e&&ve&&Ca.alternate===null&&t(g,ve),m=i(Ca,m,ke),Ge===null?he=Ca:Ge.sibling=Ca,Ge=Ca,ve=vt}if(Qe.done)return l(g,ve),Le&&Vl(g,ke),he;if(ve===null){for(;!Qe.done;ke++,Qe=z.next())Qe=_(g,Qe.value,A),Qe!==null&&(m=i(Qe,m,ke),Ge===null?he=Qe:Ge.sibling=Qe,Ge=Qe);return Le&&Vl(g,ke),he}for(ve=a(ve);!Qe.done;ke++,Qe=z.next())Qe=S(ve,g,ke,Qe.value,A),Qe!==null&&(e&&(vt=Qe.alternate,vt!==null&&ve.delete(vt.key===null?ke:vt.key)),m=i(Qe,m,ke),Ge===null?he=Qe:Ge.sibling=Qe,Ge=Qe);return e&&ve.forEach(function(Kb){return t(g,Kb)}),Le&&Vl(g,ke),he}function _e(g,m,z,A){if(typeof z=="object"&&z!==null&&z.type===Ie&&z.key===null&&z.props.ref===void 0&&(z=z.props.children),typeof z=="object"&&z!==null){switch(z.$$typeof){case pe:e:{for(var he=z.key;m!==null;){if(m.key===he){if(he=z.type,he===Ie){if(m.tag===7){l(g,m.sibling),A=n(m,z.props.children),da(A,z),A.return=g,g=A;break e}}else if(m.elementType===he||typeof he=="object"&&he!==null&&he.$$typeof===me&&Xa(he)===m.type){l(g,m.sibling),A=n(m,z.props),da(A,z),A.return=g,g=A;break e}l(g,m);break}else t(g,m);m=m.sibling}z.type===Ie?(A=Ba(z.props.children,g.mode,A,z.key),da(A,z),A.return=g,g=A):(A=ms(z.type,z.key,z.props,null,g.mode,A),da(A,z),A.return=g,g=A)}return u(g);case Ne:e:{for(he=z.key;m!==null;){if(m.key===he)if(m.tag===4&&m.stateNode.containerInfo===z.containerInfo&&m.stateNode.implementation===z.implementation){l(g,m.sibling),A=n(m,z.children||[]),A.return=g,g=A;break e}else{l(g,m);break}else t(g,m);m=m.sibling}A=lc(z,g.mode,A),A.return=g,g=A}return u(g);case me:return z=Xa(z),_e(g,m,z,A)}if(ie(z))return se(g,m,z,A);if(E(z)){if(he=E(z),typeof he!="function")throw Error(r(150));return z=he.call(z),ge(g,m,z,A)}if(typeof z.then=="function")return _e(g,m,Ns(z),A);if(z.$$typeof===re)return _e(g,m,vs(g,z),A);js(g,z)}return typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint"?(z=""+z,m!==null&&m.tag===6?(l(g,m.sibling),A=n(m,z),A.return=g,g=A):(l(g,m),A=tc(z,g.mode,A),A.return=g,g=A),u(g)):l(g,m)}return function(g,m,z,A){try{yi=0;var he=_e(g,m,z,A);return En=null,he}catch(ve){if(ve===Tn||ve===zs)throw ve;var Ge=Xt(29,ve,null,g.mode);return Ge.lanes=A,Ge.return=g,Ge}finally{}}}var Ja=A0(!0),_0=A0(!1),fa=!1;function fc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function mc(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 ma(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ha(e,t,l){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(Ke&2)!==0){var n=a.pending;return n===null?t.next=t:(t.next=n.next,n.next=t),a.pending=t,t=fs(e),g0(e,null,l),t}return ds(e,a,t,l),fs(e)}function vi(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,po(e,l)}}function hc(e,t){var l=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,l===a)){var n=null,i=null;if(l=l.firstBaseUpdate,l!==null){do{var u={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};i===null?n=i=u:i=i.next=u,l=l.next}while(l!==null);i===null?n=i=t:i=i.next=t}else n=i=t;l={baseState:a.baseState,firstBaseUpdate:n,lastBaseUpdate:i,shared:a.shared,callbacks:a.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var xc=!1;function pi(){if(xc){var e=kn;if(e!==null)throw e}}function zi(e,t,l,a){xc=!1;var n=e.updateQueue;fa=!1;var i=n.firstBaseUpdate,u=n.lastBaseUpdate,c=n.shared.pending;if(c!==null){n.shared.pending=null;var d=c,b=d.next;d.next=null,u===null?i=b:u.next=b,u=d;var k=e.alternate;k!==null&&(k=k.updateQueue,c=k.lastBaseUpdate,c!==u&&(c===null?k.firstBaseUpdate=b:c.next=b,k.lastBaseUpdate=d))}if(i!==null){var _=n.baseState;u=0,k=b=d=null,c=i;do{var x=c.lane&-536870913,S=x!==c.lane;if(S?(Ye&x)===x:(a&x)===x){x!==0&&x===Qa&&(xc=!0),k!==null&&(k=k.next={lane:0,tag:c.tag,payload:c.payload,callback:null,next:null});e:{var se=e,ge=c;x=t;var _e=l;switch(ge.tag){case 1:if(se=ge.payload,typeof se=="function"){_=se.call(_e,_,x);break e}_=se;break e;case 3:se.flags=se.flags&-65537|128;case 0:if(se=ge.payload,x=typeof se=="function"?se.call(_e,_,x):se,x==null)break e;_=ce({},_,x);break e;case 2:fa=!0}}x=c.callback,x!==null&&(e.flags|=64,S&&(e.flags|=8192),S=n.callbacks,S===null?n.callbacks=[x]:S.push(x))}else S={lane:x,tag:c.tag,payload:c.payload,callback:c.callback,next:null},k===null?(b=k=S,d=_):k=k.next=S,u|=x;if(c=c.next,c===null){if(c=n.shared.pending,c===null)break;S=c,c=S.next,S.next=null,n.lastBaseUpdate=S,n.shared.pending=null}}while(!0);k===null&&(d=_),n.baseState=d,n.firstBaseUpdate=b,n.lastBaseUpdate=k,i===null&&(n.shared.lanes=0),za|=u,e.lanes=u,e.memoizedState=_}}function O0(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function R0(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)O0(l[e],t)}var xa=Ue(null),ks=Ue(0);function L0(e,t){e=Pl,qe(ks,e),qe(xa,t),Pl=e|t.baseLanes}function gc(){qe(ks,Pl),qe(xa,xa.current)}function bc(){Pl=ks.current,De(xa),De(ks)}var At=Ue(null),It=null;function ga(e){var t=e.alternate;qe(_t,_t.current&1),qe(At,e),It===null&&(t===null||xa.current!==null||t.memoizedState!==null)&&(It=e)}function yc(e){qe(_t,_t.current),qe(At,e),It===null&&(It=e)}function I0(e){e.tag===22?(qe(_t,_t.current),qe(At,e),It===null&&(It=e)):ba()}function ba(){qe(_t,_t.current),qe(At,At.current)}function tl(e){De(At),It===e&&(It=null),De(_t)}var _t=Ue(0);function Si(e,t){qe(At,At.current),qe(_t,t)}function vc(e){De(_t),De(At),It===e&&(It=null)}function Ts(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||Yr(l)||Gr(l)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!=="independent"){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 Jl=0,Ae=null,tt=null,bt=null,Es=!1,Mn=!1,$a=!1,Ms=0,Ni=0,wn=null,xg=0;function ft(){throw Error(r(321))}function pc(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!el(e[l],t[l]))return!1;return!0}function zc(e,t,l,a,n,i){return Jl=i,Ae=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,K.H=e===null||e.memoizedState===null?pd:zd,$a=!1,i=l(a,n),$a=!1,Mn&&(i=H0(t,l,a,n)),U0(e),i}function U0(e){K.H=Rs;var t=tt!==null&&tt.next!==null;if(Jl=0,bt=tt=Ae=null,Es=!1,Ni=0,wn=null,t)throw Error(r(300));e===null||yt||(e=e.dependencies,e!==null&&ys(e)&&(yt=!0))}function H0(e,t,l,a){Ae=e;var n=0;do{if(Mn&&(wn=null),Ni=0,Mn=!1,25<=n)throw Error(r(301));if(n+=1,bt=tt=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}K.H=Ng,i=t(l,a)}while(Mn);return i}function gg(){var e=K.H,t=e.useState()[0];return t=typeof t.then=="function"?ji(t):t,e=e.useState()[0],(tt!==null?tt.memoizedState:null)!==e&&(Ae.flags|=1024),t}function Sc(){var e=Ms!==0;return Ms=0,e}function Nc(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function jc(e){if(Es){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Es=!1}Jl=0,bt=tt=Ae=null,Mn=!1,Ni=Ms=0,wn=null}function Yt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return bt===null?Ae.memoizedState=bt=e:bt=bt.next=e,bt}function xt(){if(tt===null){var e=Ae.alternate;e=e!==null?e.memoizedState:null}else e=tt.next;var t=bt===null?Ae.memoizedState:bt.next;if(t!==null)bt=t,tt=e;else{if(e===null)throw Ae.alternate===null?Error(r(467)):Error(r(310));tt=e,e={memoizedState:tt.memoizedState,baseState:tt.baseState,baseQueue:tt.baseQueue,queue:tt.queue,next:null},bt===null?Ae.memoizedState=bt=e:bt=bt.next=e}return bt}function ws(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ji(e){var t=Ni;return Ni+=1,wn===null&&(wn=[]),e=w0(wn,e,t),t=Ae,(bt===null?t.memoizedState:bt.next)===null&&(t=t.alternate,K.H=t===null||t.memoizedState===null?pd:zd),e}function Cs(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ji(e);if(e.$$typeof===L)return;if(e.$$typeof===re)return Dt(e)}throw Error(r(438,String(e)))}function kc(e){var t=null,l=Ae.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var a=Ae.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(n){return n.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),l===null&&(l=ws(),Ae.updateQueue=l),l.memoCache=t,l=t.data[t.index],l===void 0)for(l=t.data[t.index]=Array(e),a=0;a<e;a++)l[a]=Me;return t.index++,l}function $l(e,t){return typeof t=="function"?t(e):t}function Ds(e){var t=xt();return Tc(t,tt,e)}function Tc(e,t,l){var a=e.queue;if(a===null)throw Error(r(311));a.lastRenderedReducer=l;var n=e.baseQueue,i=a.pending;if(i!==null){if(n!==null){var u=n.next;n.next=i.next,i.next=u}t.baseQueue=n=i,a.pending=null}if(i=e.baseState,n===null)e.memoizedState=i;else{t=n.next;var c=u=null,d=null,b=t,k=!1;do{var _=b.lane&-536870913;if(_!==b.lane?(Ye&_)===_:(Jl&_)===_){var x=b.revertLane;if(x===0)d!==null&&(d=d.next={lane:0,revertLane:0,gesture:null,action:b.action,hasEagerState:b.hasEagerState,eagerState:b.eagerState,next:null}),_===Qa&&(k=!0);else if((Jl&x)===x){b=b.next,x===Qa&&(k=!0);continue}else _={lane:0,revertLane:b.revertLane,gesture:null,action:b.action,hasEagerState:b.hasEagerState,eagerState:b.eagerState,next:null},d===null?(c=d=_,u=i):d=d.next=_,Ae.lanes|=x,za|=x;_=b.action,$a&&l(i,_),i=b.hasEagerState?b.eagerState:l(i,_)}else x={lane:_,revertLane:b.revertLane,gesture:b.gesture,action:b.action,hasEagerState:b.hasEagerState,eagerState:b.eagerState,next:null},d===null?(c=d=x,u=i):d=d.next=x,Ae.lanes|=_,za|=_;b=b.next}while(b!==null&&b!==t);if(d===null?u=i:d.next=c,!el(i,e.memoizedState)&&(yt=!0,k&&(l=kn,l!==null)))throw l;e.memoizedState=i,e.baseState=u,e.baseQueue=d,a.lastRenderedState=i}return n===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function Ec(e){var t=xt(),l=t.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=e;var a=l.dispatch,n=l.pending,i=t.memoizedState;if(n!==null){l.pending=null;var u=n=n.next;do i=e(i,u.action),u=u.next;while(u!==n);el(i,t.memoizedState)||(yt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),l.lastRenderedState=i}return[i,a]}function B0(e,t,l){var a=Ae,n=xt(),i=Le;if(i){if(l===void 0)throw Error(r(407));l=l()}else l=t();var u=!el((tt||n).memoizedState,l);if(u&&(n.memoizedState=l,yt=!0),n=n.queue,Cc(Z0.bind(null,a,n,e),[e]),e=n.getSnapshot!==t||u||bt!==null&&(bt.memoizedState.tag&1)!==0,Cn(e?9:8,{destroy:void 0},G0.bind(null,a,n,l,t),null),e){if(a.flags|=2048,at===null)throw Error(r(349));i||(Jl&127)!==0||Y0(a,t,l)}return l}function Y0(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=Ae.updateQueue,t===null?(t=ws(),Ae.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function G0(e,t,l,a){t.value=l,t.getSnapshot=a,q0(t)&&Q0(e)}function Z0(e,t,l){return l(function(){q0(t)&&Q0(e)})}function q0(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!el(e,l)}catch{return!0}}function Q0(e){var t=Ha(e,2);t!==null&&Wt(t,e,2)}function Mc(e){var t=Yt();if(typeof e=="function"){var l=e;if(e=l(),$a){Re(!0);try{l()}finally{Re(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:$l,lastRenderedState:e},t}function V0(e,t,l,a){return e.baseState=l,Tc(e,tt,typeof a=="function"?a:$l)}function bg(e,t,l,a,n){if(Os(e))throw Error(r(485));if(e=t.action,e!==null){var i={payload:n,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(u){i.listeners.push(u)}};K.T!==null?l(!0):i.isTransition=!1,a(i),l=t.pending,l===null?(i.next=t.pending=i,X0(t,i)):(i.next=l.next,t.pending=l.next=i)}}function X0(e,t){var l=t.action,a=t.payload,n=e.state;if(t.isTransition){var i=K.T,u={};u.types=i!==null?i.types:null,K.T=u;try{var c=l(n,a),d=K.S;d!==null&&d(u,c),K0(e,t,c)}catch(b){wc(e,t,b)}finally{i!==null&&u.types!==null&&(i.types=u.types),K.T=i}}else try{i=l(n,a),K0(e,t,i)}catch(b){wc(e,t,b)}}function K0(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(a){J0(e,t,a)},function(a){return wc(e,t,a)}):J0(e,t,l)}function J0(e,t,l){t.status="fulfilled",t.value=l,$0(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,X0(e,l)))}function wc(e,t,l){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=l,$0(t),t=t.next;while(t!==a)}e.action=null}function $0(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function W0(e,t){return t}function F0(e,t){if(Le){var l=at.formState;if(l!==null){e:{var a=Ae;if(Le){if(it){t:{for(var n=it,i=hl;n.nodeType!==8;){if(!i){n=null;break t}if(n=gl(n.nextSibling),n===null){n=null;break t}}i=n.data,n=i==="F!"||i==="F"?n:null}if(n){it=gl(n.nextSibling),a=n.data==="F!";break e}}ra(a)}a=!1}a&&(t=l[0])}}return l=Yt(),l.memoizedState=l.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:W0,lastRenderedState:t},l.queue=a,l=bd.bind(null,Ae,a),a.dispatch=l,a=Mc(!1),i=Rc.bind(null,Ae,!1,a.queue),a=Yt(),n={state:t,dispatch:null,action:e,pending:null},a.queue=n,l=bg.bind(null,Ae,n,i,l),n.dispatch=l,a.memoizedState=e,[t,l,!1]}function P0(e){var t=xt();return ed(t,tt,e)}function ed(e,t,l){if(t=Tc(e,t,W0)[0],e=Ds($l)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=ji(t)}catch(u){throw u===Tn?zs:u}else a=t;t=xt();var n=t.queue,i=n.dispatch;return l!==t.memoizedState&&(Ae.flags|=2048,Cn(9,{destroy:void 0},yg.bind(null,n,l),null)),[a,i,e]}function yg(e,t){e.action=t}function td(e){var t=xt(),l=tt;if(l!==null)return ed(t,l,e);xt(),t=t.memoizedState,l=xt();var a=l.queue.dispatch;return l.memoizedState=e,[t,a,!1]}function Cn(e,t,l,a){return e={tag:e,create:l,deps:a,inst:t,next:null},t=Ae.updateQueue,t===null&&(t=ws(),Ae.updateQueue=t),l=t.lastEffect,l===null?t.lastEffect=e.next=e:(a=l.next,l.next=e,e.next=a,t.lastEffect=e),e}function ld(){return xt().memoizedState}function As(e,t,l,a){var n=Yt();Ae.flags|=e,n.memoizedState=Cn(1|t,{destroy:void 0},l,a===void 0?null:a)}function _s(e,t,l,a){var n=xt();a=a===void 0?null:a;var i=n.memoizedState.inst;tt!==null&&a!==null&&pc(a,tt.memoizedState.deps)?n.memoizedState=Cn(t,i,l,a):(Ae.flags|=e,n.memoizedState=Cn(1|t,i,l,a))}function ad(e,t){As(8390656,8,e,t)}function Cc(e,t){_s(2048,8,e,t)}function vg(e){Ae.flags|=4;var t=Ae.updateQueue;if(t===null)t=ws(),Ae.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function nd(e){var t=xt().memoizedState;return vg({ref:t,nextImpl:e}),function(){if((Ke&2)!==0)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function id(e,t){return _s(4,2,e,t)}function sd(e,t){return _s(4,4,e,t)}function ud(e,t){if(typeof t=="function"){e=e();var l=t(e);return function(){typeof l=="function"?l():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function cd(e,t,l){l=l!=null?l.concat([e]):null,_s(4,4,ud.bind(null,t,e),l)}function Dc(){}function rd(e,t){var l=xt();t=t===void 0?null:t;var a=l.memoizedState;return t!==null&&pc(t,a[1])?a[0]:(l.memoizedState=[e,t],e)}function od(e,t){var l=xt();t=t===void 0?null:t;var a=l.memoizedState;if(t!==null&&pc(t,a[1]))return a[0];if(a=e(),$a){Re(!0);try{e()}finally{Re(!1)}}return l.memoizedState=[a,t],a}function Ac(e,t,l){return l===void 0||(Jl&1073741824)!==0&&(Ye&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=zf(),Ae.lanes|=e,za|=e,l)}function dd(e,t,l,a){return el(l,t)?l:xa.current!==null?(e=Ac(e,l,a),el(e,t)||(yt=!0),e):(Jl&106)===0||(Jl&1073741824)!==0&&(Ye&261930)===0?(yt=!0,e.memoizedState=l):(e=zf(),Ae.lanes|=e,za|=e,t)}function fd(e,t,l,a,n){var i=ue.p;ue.p=i!==0&&8>i?i:8;var u=K.T,c={};c.types=u!==null?u.types:null,K.T=c,Rc(e,!1,t,l);try{var d=n(),b=K.S;if(b!==null&&b(c,d),d!==null&&typeof d=="object"&&typeof d.then=="function"){var k=hg(d,a);ki(e,t,k,il(e))}else ki(e,t,a,il(e))}catch(_){ki(e,t,{then:function(){},status:"rejected",reason:_},il())}finally{ue.p=i,u!==null&&c.types!==null&&(u.types=c.types),K.T=u}}function pg(){}function _c(e,t,l,a){if(e.tag!==5)throw Error(r(476));var n=md(e).queue;fd(e,n,t,we,l===null?pg:function(){return hd(e),l(a)})}function md(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:we,baseState:we,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:$l,lastRenderedState:we},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:$l,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function hd(e){var t=md(e);t.next===null&&(t=e.alternate.memoizedState),ki(e,t.next.queue,{},il())}function Oc(){return Dt(Jn)}function xd(){return xt().memoizedState}function gd(){return xt().memoizedState}function zg(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=il();e=ma(l);var a=ha(t,e,l);a!==null&&(Wt(a,t,l),vi(a,t,l)),t={cache:cc()},e.payload=t;return}t=t.return}}function Sg(e,t,l){var a=il();l={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Os(e)?yd(t,l):(l=Pu(e,t,l,a),l!==null&&(Wt(l,e,a),vd(l,t,a)))}function bd(e,t,l){var a=il();ki(e,t,l,a)}function ki(e,t,l,a){var n={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Os(e))yd(t,n);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var u=t.lastRenderedState,c=i(u,l);if(n.hasEagerState=!0,n.eagerState=c,el(c,u))return ds(e,t,n,0),at===null&&os(),!1}catch{}finally{}if(l=Pu(e,t,n,a),l!==null)return Wt(l,e,a),vd(l,t,a),!0}return!1}function Rc(e,t,l,a){if(a={lane:2,revertLane:kr(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Os(e)){if(t)throw Error(r(479))}else t=Pu(e,l,a,2),t!==null&&Wt(t,e,2)}function Os(e){var t=e.alternate;return e===Ae||t!==null&&t===Ae}function yd(e,t){Mn=Es=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function vd(e,t,l){if((l&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,po(e,l)}}var Rs={readContext:Dt,use:Cs,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,useEffectEvent:ft},pd={readContext:Dt,use:Cs,useCallback:function(e,t){return Yt().memoizedState=[e,t===void 0?null:t],e},useContext:Dt,useEffect:ad,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,As(4194308,4,ud.bind(null,t,e),l)},useLayoutEffect:function(e,t){return As(4194308,4,e,t)},useInsertionEffect:function(e,t){As(4,2,e,t)},useMemo:function(e,t){var l=Yt();t=t===void 0?null:t;var a=e();if($a){Re(!0);try{e()}finally{Re(!1)}}return l.memoizedState=[a,t],a},useReducer:function(e,t,l){var a=Yt();if(l!==void 0){var n=l(t);if($a){Re(!0);try{l(t)}finally{Re(!1)}}}else n=t;return a.memoizedState=a.baseState=n,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},a.queue=e,e=e.dispatch=Sg.bind(null,Ae,e),[a.memoizedState,e]},useRef:function(e){var t=Yt();return e={current:e},t.memoizedState=e},useState:function(e){e=Mc(e);var t=e.queue,l=bd.bind(null,Ae,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:Dc,useDeferredValue:function(e,t){var l=Yt();return Ac(l,e,t)},useTransition:function(){var e=Mc(!1);return e=fd.bind(null,Ae,e.queue,!0,!1),Yt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var a=Ae,n=Yt();if(Le){if(l===void 0)throw Error(r(407));l=l()}else{if(l=t(),at===null)throw Error(r(349));(Ye&127)!==0||Y0(a,t,l)}n.memoizedState=l;var i={value:l,getSnapshot:t};return n.queue=i,ad(Z0.bind(null,a,i,e),[e]),a.flags|=2048,Cn(9,{destroy:void 0},G0.bind(null,a,i,l,t),null),l},useId:function(){var e=Yt(),t=at.identifierPrefix;if(Le){var l=El,a=Tl;l=(a&~(1<<32-lt(a)-1)).toString(32)+l,t="_"+t+"R_"+l,l=Ms++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=xg++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Oc,useFormState:F0,useActionState:F0,useOptimistic:function(e){var t=Yt();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=Rc.bind(null,Ae,!0,l),l.dispatch=t,[e,t]},useMemoCache:kc,useCacheRefresh:function(){return Yt().memoizedState=zg.bind(null,Ae)},useEffectEvent:function(e){var t=Yt(),l={impl:e};return t.memoizedState=l,function(){if((Ke&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}},zd={readContext:Dt,use:Cs,useCallback:rd,useContext:Dt,useEffect:Cc,useImperativeHandle:cd,useInsertionEffect:id,useLayoutEffect:sd,useMemo:od,useReducer:Ds,useRef:ld,useState:function(){return Ds($l)},useDebugValue:Dc,useDeferredValue:function(e,t){var l=xt();return dd(l,tt.memoizedState,e,t)},useTransition:function(){var e=Ds($l)[0],t=xt().memoizedState;return[typeof e=="boolean"?e:ji(e),t]},useSyncExternalStore:B0,useId:xd,useHostTransitionStatus:Oc,useFormState:P0,useActionState:P0,useOptimistic:function(e,t){var l=xt();return V0(l,tt,e,t)},useMemoCache:kc,useCacheRefresh:gd,useEffectEvent:nd},Ng={readContext:Dt,use:Cs,useCallback:rd,useContext:Dt,useEffect:Cc,useImperativeHandle:cd,useInsertionEffect:id,useLayoutEffect:sd,useMemo:od,useReducer:Ec,useRef:ld,useState:function(){return Ec($l)},useDebugValue:Dc,useDeferredValue:function(e,t){var l=xt();return tt===null?Ac(l,e,t):dd(l,tt.memoizedState,e,t)},useTransition:function(){var e=Ec($l)[0],t=xt().memoizedState;return[typeof e=="boolean"?e:ji(e),t]},useSyncExternalStore:B0,useId:xd,useHostTransitionStatus:Oc,useFormState:td,useActionState:td,useOptimistic:function(e,t){var l=xt();return tt!==null?V0(l,tt,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:kc,useCacheRefresh:gd,useEffectEvent:nd};function Lc(e,t,l,a){t=e.memoizedState,l=l(a,t),l=l==null?t:ce({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var Ic={enqueueSetState:function(e,t,l){e=e._reactInternals;var a=il(),n=ma(a);n.payload=t,l!=null&&(n.callback=l),t=ha(e,n,a),t!==null&&(Wt(t,e,a),vi(t,e,a))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var a=il(),n=ma(a);n.tag=1,n.payload=t,l!=null&&(n.callback=l),t=ha(e,n,a),t!==null&&(Wt(t,e,a),vi(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=il(),a=ma(l);a.tag=2,t!=null&&(a.callback=t),t=ha(e,a,l),t!==null&&(Wt(t,e,l),vi(t,e,l))}};function Sd(e,t,l,a,n,i,u){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,i,u):t.prototype&&t.prototype.isPureReactComponent?!di(l,a)||!di(n,i):!0}function Nd(e,t,l,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(l,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(l,a),t.state!==e&&Ic.enqueueReplaceState(t,t.state,null)}function Wa(e,t){var l=t;if("ref"in t){l={};for(var a in t)a!=="ref"&&(l[a]=t[a])}if(e=e.defaultProps){l===t&&(l=ce({},l));for(var n in e)l[n]===void 0&&(l[n]=e[n])}return l}function jd(e){rs(e)}function kd(e){console.error(e)}function Td(e){rs(e)}function Ls(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function Ed(e,t,l){try{var a=e.onCaughtError;a(l.value,{componentStack:l.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(n){setTimeout(function(){throw n})}}function Uc(e,t,l){return l=ma(l),l.tag=3,l.payload={element:null},l.callback=function(){Ls(e,t)},l}function Md(e){return e=ma(e),e.tag=3,e}function wd(e,t,l,a){var n=l.type.getDerivedStateFromError;if(typeof n=="function"){var i=a.value;e.payload=function(){return n(i)},e.callback=function(){Ed(t,l,a)}}var u=l.stateNode;u!==null&&typeof u.componentDidCatch=="function"&&(e.callback=function(){Ed(t,l,a),typeof n!="function"&&(Sa===null?Sa=new Set([this]):Sa.add(this));var c=a.stack;this.componentDidCatch(a.value,{componentStack:c!==null?c:""})})}function jg(e,t,l,a,n){if(l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=l.alternate,t!==null&&Za(t,l,n,!0),l=At.current,l!==null){switch(l.tag){case 31:case 13:case 19:return It===null?au():l.alternate===null&&mt===0&&(mt=3),l.flags&=-257,l.flags|=65536,l.lanes=n,a===Ss?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([a]):t.add(a),Sr(e,a,n)),!1;case 22:return l.flags|=65536,a===Ss?l.flags|=16384:(t=l.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},l.updateQueue=t):(l=t.retryQueue,l===null?t.retryQueue=new Set([a]):l.add(a)),Sr(e,a,n)),!1}throw Error(r(435,l.tag))}return Sr(e,a,n),au(),!1}if(Le)return t=At.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=n,a!==nc&&(e=Error(r(422),{cause:a}),hi(dl(e,l)))):(a!==nc&&(t=Error(r(423),{cause:a}),hi(dl(t,l))),e=e.current.alternate,e.flags|=65536,n&=-n,e.lanes|=n,a=dl(a,l),n=Uc(e.stateNode,a,n),hc(e,n),mt!==4&&(mt=2)),!1;var i=Error(r(520),{cause:a});if(i=dl(i,l),_i===null?_i=[i]:_i.push(i),mt!==4&&(mt=2),t===null)return!0;a=dl(a,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=n&-n,l.lanes|=e,e=Uc(l.stateNode,a,e),hc(l,e),!1;case 1:if(t=l.type,i=l.stateNode,(l.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(Sa===null||!Sa.has(i))))return l.flags|=65536,n&=-n,l.lanes|=n,n=Md(n),wd(n,e,l,a),hc(l,n),!1;break;case 22:if(l.memoizedState!==null)return l.flags|=65536,!1}l=l.return}while(l!==null);return!1}var Hc=Error(r(461)),yt=!1;function pt(e,t,l,a){t.child=e===null?_0(t,null,l,a):Ja(t,e.child,l,a)}function Cd(e,t,l,a,n){l=l.render;var i=t.ref;if("ref"in a){var u={};for(var c in a)c!=="ref"&&(u[c]=a[c])}else u=a;return qa(t),a=zc(e,t,l,u,i,n),c=Sc(),e!==null&&!yt?(Nc(e,t,n),Wl(e,t,n)):(Le&&c&&xs(t),t.flags|=1,pt(e,t,a,n),t.child)}function Dd(e,t,l,a,n){if(e===null){var i=l.type;return typeof i=="function"&&!ec(i)&&i.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=i,Ad(e,t,i,a,n)):(e=ms(l.type,null,a,t,t.mode,n),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!Xc(e,n)){var u=i.memoizedProps;if(l=l.compare,l=l!==null?l:di,l(u,a)&&e.ref===t.ref)return Wl(e,t,n)}return t.flags|=1,e=Ql(i,a),e.ref=t.ref,e.return=t,t.child=e}function Ad(e,t,l,a,n){if(e!==null){var i=e.memoizedProps;if(di(i,a)&&e.ref===t.ref)if(yt=!1,t.pendingProps=a=i,Xc(e,n))(e.flags&131072)!==0&&(yt=!0);else return t.lanes=e.lanes,Wl(e,t,n)}return Bc(e,t,l,a,n)}function _d(e,t,l,a){var n=a.children,i=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((t.flags&128)!==0){if(i=i!==null?i.baseLanes|l:l,e!==null){for(a=t.child=e.child,n=0;a!==null;)n=n|a.lanes|a.childLanes,a=a.sibling;a=n&~i}else a=0,t.child=null;return Od(e,t,i,l,a)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ps(t,i!==null?i.cachePool:null),i!==null?L0(t,i):gc(),I0(t);else return a=t.lanes=536870912,Od(e,t,i!==null?i.baseLanes|l:l,l,a)}else i!==null?(ps(t,i.cachePool),L0(t,i),ba(),t.memoizedState=null):(e!==null&&ps(t,null),gc(),ba());return pt(e,t,n,l),t.child}function Ti(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Od(e,t,l,a,n){var i=oc();return i=i===null?null:{parent:gt._currentValue,pool:i},t.memoizedState={baseLanes:l,cachePool:i},e!==null&&ps(t,null),gc(),I0(t),e!==null&&Za(e,t,a,!0),t.childLanes=n,null}function Is(e,t){return t=Us({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Rd(e,t,l){return Ja(t,e.child,null,l),e=Is(t,t.pendingProps),e.flags|=2,tl(t),t.memoizedState=null,e}function kg(e,t,l){var a=t.pendingProps,n=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Le){if(a.mode==="hidden")return e=Is(t,a),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},Ti(null,e);if(yc(t),(e=it)?(e=cm(e,hl),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ua!==null?{id:Tl,overflow:El}:null,retryLane:536870912,hydrationErrors:null},l=y0(e),l.return=t,t.child=l,jt=t,it=null)):e=null,e===null)throw ra(t);return t.lanes=536870912,null}return Is(t,a)}var i=e.memoizedState;if(i!==null){var u=i.dehydrated;if(yc(t),n)if(t.flags&256)t.flags&=-257,t=Rd(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(r(558));else if(yt||Za(e,t,l,!1),n=(l&e.childLanes)!==0,yt||n){if(xa.current===null){if(a=at,a!==null&&(u=zo(a,l),u!==0&&u!==i.retryLane))throw i.retryLane=u,Ha(e,u),Wt(a,e,u),Hc;au()}t=Rd(e,t,l)}else e=i.treeContext,it=gl(u.nextSibling),jt=t,Le=!0,ca=null,hl=!1,e!==null&&z0(t,e),t=Is(t,a),t.flags|=134221824;return t}return e=Ql(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Dn(e,t){var l=t.ref;if(l===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(r(284));(e===null||e.ref!==l)&&(t.flags|=4194816)}}function Bc(e,t,l,a,n){return qa(t),l=zc(e,t,l,a,void 0,n),a=Sc(),e!==null&&!yt?(Nc(e,t,n),Wl(e,t,n)):(Le&&a&&xs(t),t.flags|=1,pt(e,t,l,n),t.child)}function Ld(e,t,l,a,n,i){return qa(t),t.updateQueue=null,l=H0(t,a,l,n),U0(e),a=Sc(),e!==null&&!yt?(Nc(e,t,i),Wl(e,t,i)):(Le&&a&&xs(t),t.flags|=1,pt(e,t,l,i),t.child)}function Id(e,t,l,a,n){if(qa(t),t.stateNode===null){var i=zn,u=l.contextType;typeof u=="object"&&u!==null&&(i=Dt(u)),i=new l(a,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=Ic,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=a,i.state=t.memoizedState,i.refs={},fc(t),u=l.contextType,i.context=typeof u=="object"&&u!==null?Dt(u):zn,i.state=t.memoizedState,u=l.getDerivedStateFromProps,typeof u=="function"&&(Lc(t,l,u,a),i.state=t.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(u=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),u!==i.state&&Ic.enqueueReplaceState(i,i.state,null),zi(t,a,i,n),pi(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){i=t.stateNode;var c=t.memoizedProps,d=Wa(l,c);i.props=d;var b=i.context,k=l.contextType;u=zn,typeof k=="object"&&k!==null&&(u=Dt(k));var _=l.getDerivedStateFromProps;k=typeof _=="function"||typeof i.getSnapshotBeforeUpdate=="function",c=t.pendingProps!==c,k||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(c||b!==u)&&Nd(t,i,a,u),fa=!1;var x=t.memoizedState;i.state=x,zi(t,a,i,n),pi(),b=t.memoizedState,c||x!==b||fa?(typeof _=="function"&&(Lc(t,l,_,a),b=t.memoizedState),(d=fa||Sd(t,l,d,a,x,b,u))?(k||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=b),i.props=a,i.state=b,i.context=u,a=d):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{i=t.stateNode,mc(e,t),u=t.memoizedProps,k=Wa(l,u),i.props=k,_=t.pendingProps,x=i.context,b=l.contextType,d=zn,typeof b=="object"&&b!==null&&(d=Dt(b)),c=l.getDerivedStateFromProps,(b=typeof c=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(u!==_||x!==d)&&Nd(t,i,a,d),fa=!1,x=t.memoizedState,i.state=x,zi(t,a,i,n),pi();var S=t.memoizedState;u!==_||x!==S||fa||e!==null&&e.dependencies!==null&&ys(e.dependencies)?(typeof c=="function"&&(Lc(t,l,c,a),S=t.memoizedState),(k=fa||Sd(t,l,k,a,x,S,d)||e!==null&&e.dependencies!==null&&ys(e.dependencies))?(b||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(a,S,d),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(a,S,d)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||u===e.memoizedProps&&x===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&x===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=S),i.props=a,i.state=S,i.context=d,a=k):(typeof i.componentDidUpdate!="function"||u===e.memoizedProps&&x===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&x===e.memoizedState||(t.flags|=1024),a=!1)}return i=a,Dn(e,t),a=(t.flags&128)!==0,i||a?(i=t.stateNode,l=a&&typeof l.getDerivedStateFromError!="function"?null:i.render(),t.flags|=1,e!==null&&a?(t.child=Ja(t,e.child,null,n),t.child=Ja(t,null,l,n)):pt(e,t,l,n),t.memoizedState=i.state,e=t.child):e=Wl(e,t,n),e}function Ud(e,t,l,a){return Ya(),t.flags|=256,pt(e,t,l,a),t.child}var Yc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Gc(e){return{baseLanes:e,cachePool:E0()}}function Zc(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=nl),e}function Hd(e,t,l){var a=t.pendingProps,n=!1,i=(t.flags&128)!==0,u;if((u=i)||(u=e!==null&&e.memoizedState===null?!1:(_t.current&2)!==0),u&&(n=!0,t.flags&=-129),u=(t.flags&32)!==0,t.flags&=-33,e===null){if(Le){if(n?ga(t):ba(),(e=it)?(e=cm(e,hl),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ua!==null?{id:Tl,overflow:El}:null,retryLane:536870912,hydrationErrors:null},l=y0(e),l.return=t,t.child=l,jt=t,it=null)):e=null,e===null)throw ra(t);return Gr(e)?t.lanes=32:t.lanes=536870912,null}return i=a.children,a=a.fallback,n?(ba(),n=t.mode,i=Us({mode:"hidden",children:i},n),a=Ba(a,n,l,null),i.return=t,a.return=t,i.sibling=a,t.child=i,a=t.child,a.memoizedState=Gc(l),a.childLanes=Zc(e,u,l),t.memoizedState=Yc,Ti(null,a)):(ga(t),qc(t,i))}var c=e.memoizedState;if(c!==null){var d=c.dehydrated;if(d!==null)return Tg(e,t,i,u,a,d,c,l)}return n?(ba(),n=a.fallback,i=t.mode,c=e.child,d=c.sibling,a=Ql(c,{mode:"hidden",children:a.children}),a.subtreeFlags=c.subtreeFlags&1206910976,d!==null?n=Ql(d,n):(n=Ba(n,i,l,null),n.flags|=2),n.return=t,a.return=t,a.sibling=n,t.child=a,Ti(null,a),a=t.child,n=e.child.memoizedState,n===null?n=Gc(l):(i=n.cachePool,i!==null?(c=gt._currentValue,i=i.parent!==c?{parent:c,pool:c}:i):i=E0(),n={baseLanes:n.baseLanes|l,cachePool:i}),a.memoizedState=n,a.childLanes=Zc(e,u,l),t.memoizedState=Yc,Ti(e.child,a)):(ga(t),l=e.child,e=l.sibling,l=Ql(l,{mode:"visible",children:a.children}),l.return=t,l.sibling=null,e!==null&&(u=t.deletions,u===null?(t.deletions=[e],t.flags|=16):u.push(e)),t.child=l,t.memoizedState=null,l)}function qc(e,t){return t=Us({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Us(e,t){return e=Xt(22,e,null,t),e.lanes=0,e}function Hs(e,t,l){return Ja(t,e.child,null,l),e=qc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Tg(e,t,l,a,n,i,u,c){if(l)return t.flags&256?(ga(t),t.flags&=-257,Hs(e,t,c)):t.memoizedState!==null?(ba(),t.child=e.child,t.flags|=128,null):(ba(),i=n.fallback,u=t.mode,n=Us({mode:"visible",children:n.children},u),i=Ba(i,u,c,null),i.flags|=2,n.return=t,i.return=t,n.sibling=i,t.child=n,Ja(t,e.child,null,c),n=t.child,n.memoizedState=Gc(c),n.childLanes=Zc(e,a,c),t.memoizedState=Yc,Ti(null,n));if(ga(t),Gr(i)){if(a=i.nextSibling&&i.nextSibling.dataset,a)var d=a.dgst;return a=d,a!==""&&(n=Error(r(419)),n.stack="",n.digest=a,hi({value:n,source:null,stack:null})),Hs(e,t,c)}if(yt||Za(e,t,c,!1),a=(c&e.childLanes)!==0,yt||a){if(xa.current!==null)return Hs(e,t,c);if(a=at,a!==null&&(n=zo(a,c),n!==0&&n!==u.retryLane))throw u.retryLane=n,Ha(e,n),Wt(a,e,n),Hc;return Yr(i)||au(),Hs(e,t,c)}return Yr(i)?(t.flags|=192,t.child=e.child,null):(e=u.treeContext,it=gl(i.nextSibling),jt=t,Le=!0,ca=null,hl=!1,e!==null&&z0(t,e),t=qc(t,n.children),t.flags|=134221824,t)}function Bd(e,t,l){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),bs(e.return,t,l)}function Yd(e){for(var t=null;e!==null;){var l=e.alternate;l!==null&&Ts(l)===null&&(t=e),e=e.sibling}return t}function Bs(e,t,l,a,n,i){var u=e.memoizedState;u===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:l,tailMode:n,treeForkCount:i}:(u.isBackwards=t,u.rendering=null,u.renderingStartTime=0,u.last=a,u.tail=l,u.tailMode=n,u.treeForkCount=i)}function Qc(e){var t=e.child;for(e.child=null;t!==null;){var l=t.sibling;t.sibling=e.child,e.child=t,t=l}}function Vc(e,t,l){var a=t.pendingProps,n=a.revealOrder,i=a.tail;a=a.children;var u=_t.current;if(t.flags&128)return Si(t,u),null;var c=(u&2)!==0;if(c?(u=u&1|2,t.flags|=128):u&=1,Si(t,u),n==="backwards"&&e!==null?(Qc(e),pt(e,t,a,l),Qc(e)):pt(e,t,a,l),a=Le?mi:0,!c&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Bd(e,l,t);else if(e.tag===19)Bd(e,l,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(n){case"backwards":l=Yd(t.child),l===null?(n=t.child,t.child=null):(n=l.sibling,l.sibling=null,Qc(t)),Bs(t,!0,n,null,i,a);break;case"unstable_legacy-backwards":for(l=null,n=t.child,t.child=null;n!==null;){if(e=n.alternate,e!==null&&Ts(e)===null){t.child=n;break}e=n.sibling,n.sibling=l,l=n,n=e}Bs(t,!0,l,null,i,a);break;case"together":Bs(t,!1,null,null,void 0,a);break;case"independent":t.memoizedState=null;break;default:l=Yd(t.child),l===null?(n=t.child,t.child=null):(n=l.sibling,l.sibling=null),Bs(t,!1,n,l,i,a)}return t.child}function Gd(e,t,l){var a=t.pendingProps;return oa(t,t.type,a.value),pt(e,t,a.children,l),t.child}function Wl(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),za|=t.lanes,(l&t.childLanes)===0)if(e!==null){if(Za(e,t,l,!1),(l&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,l=Ql(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=Ql(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function Xc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&ys(e)))}function Eg(e,t,l){switch(t.tag){case 3:Et(t,t.stateNode.containerInfo),oa(t,gt,e.memoizedState.cache),Ya();break;case 27:case 5:Il(t);break;case 4:Et(t,t.stateNode.containerInfo);break;case 10:oa(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,yc(t),null;break;case 13:var a=t.memoizedState;if(a!==null){if(a.dehydrated!==null)return ga(t),t.flags|=128,null;a=Za(e,t,l,!1);var n=t.child.childLanes;return a||(l&n)!==0?Hd(e,t,l):(ga(t),e=Wl(e,t,l),e!==null?e.sibling:null)}ga(t);break;case 19:if(t.flags&128)return Vc(e,t,l);if(n=(e.flags&128)!==0,a=(l&t.childLanes)!==0,a||(Za(e,t,l,!1),a=(l&t.childLanes)!==0),n){if(a)return Vc(e,t,l);t.flags|=128}if(n=t.memoizedState,n!==null&&(n.rendering=null,n.tail=null,n.lastEffect=null),Si(t,_t.current),a)break;return null;case 22:return t.lanes=0,_d(e,t,l,t.pendingProps);case 24:oa(t,gt,e.memoizedState.cache)}return Wl(e,t,l)}function Zd(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)yt=!0;else{if(!Xc(e,l)&&(t.flags&128)===0)return yt=!1,Eg(e,t,l);yt=(e.flags&131072)!==0}else yt=!1,Le&&(t.flags&1048576)!==0&&p0(t,mi,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=Xa(t.elementType),t.type=e,typeof e=="function")ec(e)?(a=Wa(e,a),t.tag=1,t=Id(null,t,e,a,l)):(t.tag=0,t=Bc(null,t,e,a,l));else{if(e!=null){var n=e.$$typeof;if(n===F){t.tag=11,t=Cd(null,t,e,a,l);break e}else if(n===ae){t.tag=14,t=Dd(null,t,e,a,l);break e}else if(n===re){t.tag=10,t.type=e,t=Gd(null,t,l);break e}}throw t=Q(e)||e,Error(r(306,t,""))}}return t;case 0:return Bc(e,t,t.type,t.pendingProps,l);case 1:return a=t.type,n=Wa(a,t.pendingProps),Id(e,t,a,n,l);case 3:e:{if(Et(t,t.stateNode.containerInfo),e===null)throw Error(r(387));a=t.pendingProps;var i=t.memoizedState;n=i.element,mc(e,t),zi(t,a,null,l);var u=t.memoizedState;if(a=u.cache,oa(t,gt,a),a!==i.cache&&uc(t,[gt],l,!0),pi(),a=u.element,i.isDehydrated)if(i={element:a,isDehydrated:!1,cache:u.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=Ud(e,t,a,l);break e}else if(a!==n){n=dl(Error(r(424)),t),hi(n),t=Ud(e,t,a,l);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(it=gl(e.firstChild),jt=t,Le=!0,ca=null,hl=!0,l=_0(t,null,a,l),t.child=l;l;)l.flags=l.flags&-3|134221824,l=l.sibling}else{if(Ya(),a===n){t=Wl(e,t,l);break e}pt(e,t,a,l)}t=t.child}return t;case 26:return Dn(e,t),e===null?(l=xm(t.type,null,t.pendingProps,null))?t.memoizedState=l:Le||(t.stateNode=Kf(t.type,t.pendingProps,St.current,t)):t.memoizedState=xm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Il(t),e===null&&Le&&(a=t.stateNode=dm(t.type,t.pendingProps,St.current),jt=t,hl=!0,n=it,ka(t.type)?(Zr=n,it=gl(a.firstChild)):it=n),pt(e,t,t.pendingProps.children,l),Dn(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Le&&((n=a=it)&&(a=zb(a,t.type,t.pendingProps,hl),a!==null?(t.stateNode=a,jt=t,it=gl(a.firstChild),hl=!1,n=!0):n=!1),n||ra(t)),Il(t),n=t.type,i=t.pendingProps,u=e!==null?e.memoizedProps:null,a=i.children,Or(n,i)?a=null:u!==null&&Or(n,u)&&(t.flags|=32),t.memoizedState!==null&&(n=zc(e,t,gg,null,null,l),Jn._currentValue=n),Dn(e,t),pt(e,t,a,l),t.child;case 6:return e===null&&Le&&((e=l=it)&&(l=Sb(l,t.pendingProps,hl),l!==null?(t.stateNode=l,jt=t,it=null,e=!0):e=!1),e||ra(t)),null;case 13:return Hd(e,t,l);case 4:return Et(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=Ja(t,null,a,l):pt(e,t,a,l),t.child;case 11:return Cd(e,t,t.type,t.pendingProps,l);case 7:return a=t.pendingProps,Dn(e,t),pt(e,t,a,l),t.child;case 8:return pt(e,t,t.pendingProps.children,l),t.child;case 12:return pt(e,t,t.pendingProps.children,l),t.child;case 10:return Gd(e,t,l);case 9:return n=t.type._context,a=t.pendingProps.children,qa(t),n=Dt(n),a=a(n),t.flags|=1,pt(e,t,a,l),t.child;case 14:return Dd(e,t,t.type,t.pendingProps,l);case 15:return Ad(e,t,t.type,t.pendingProps,l);case 19:return Vc(e,t,l);case 31:return kg(e,t,l);case 22:return _d(e,t,l,t.pendingProps);case 24:return qa(t),a=Dt(gt),e===null?(n=oc(),n===null&&(n=at,i=cc(),n.pooledCache=i,i.refCount++,i!==null&&(n.pooledCacheLanes|=l),n=i),t.memoizedState={parent:a,cache:n},fc(t),oa(t,gt,n)):((e.lanes&l)!==0&&(mc(e,t),zi(t,null,null,l),pi()),n=e.memoizedState,i=t.memoizedState,n.parent!==a?(n={parent:a,cache:a},t.memoizedState=n,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=n),oa(t,gt,a)):(a=i.cache,oa(t,gt,a),a!==n.cache&&uc(t,[gt],l,!0))),pt(e,t,t.pendingProps.children,l),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),a=t.pendingProps,a.name!=null&&a.name!=="auto"?t.flags|=e===null?18882560:18874368:Le&&xs(t),e!==null&&e.memoizedProps.name!==a.name?t.flags|=4194816:Dn(e,t),pt(e,t,a.children,l),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function Fl(e){e.flags|=4}function Kc(e,t,l,a,n){var i;if((i=(e.mode&32)!==0)&&(i=l===null?vm(t,a):vm(t,a)&&(a.src!==l.src||a.srcSet!==l.srcSet)),i){if(e.flags|=16777216,(n&335544128)===n)if(e.stateNode.complete)e.flags|=8192;else if(kf())e.flags|=8192;else throw Ka=Ss,dc}else e.flags&=-16777217}function qd(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!pm(t))if(kf())e.flags|=8192;else throw Ka=Ss,dc}function Ys(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?na():536870912,e.lanes|=t,Ln|=t)}function Ei(e,t){if(!Le)switch(e.tailMode){case"visible":break;case"collapsed":for(var l=e.tail,a=null;l!==null;)l.alternate!==null&&(a=l),l=l.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null;break;default:for(t=e.tail,l=null;t!==null;)t.alternate!==null&&(l=t),t=t.sibling;l===null?e.tail=null:l.sibling=null}}function st(e){var t=e.alternate!==null&&e.alternate.child===e.child,l=0,a=0;if(t)for(var n=e.child;n!==null;)l|=n.lanes|n.childLanes,a|=n.subtreeFlags&1206910976,a|=n.flags&1206910976,n.return=e,n=n.sibling;else for(n=e.child;n!==null;)l|=n.lanes|n.childLanes,a|=n.subtreeFlags,a|=n.flags,n.return=e,n=n.sibling;return e.subtreeFlags|=a,e.childLanes=l,t}function Mg(e,t,l){var a=t.pendingProps;switch(ac(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 l=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Kl(gt),qt(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(jn(t)?Fl(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,ic())),st(t),null;case 26:var n=t.type,i=t.memoizedState;return e===null?(Fl(t),i!==null?(st(t),qd(t,i)):(st(t),Kc(t,n,null,a,l))):i?i!==e.memoizedState?(Fl(t),st(t),qd(t,i)):(st(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&Fl(t),st(t),Kc(t,n,e,a,l)),null;case 27:if(Ut(t),l=St.current,n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Fl(t);else{if(!a){if(t.stateNode===null)throw Error(r(166));return st(t),t.subtreeFlags&=-33554433,null}e=zt.current,jn(t)?S0(t):(e=dm(n,a,l),t.stateNode=e,Fl(t))}return st(t),t.subtreeFlags&=-33554433,null;case 5:if(Ut(t),n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Fl(t);else{if(!a){if(t.stateNode===null)throw Error(r(166));return st(t),t.subtreeFlags&=-33554433,null}if(i=zt.current,jn(t))S0(t);else{var u=Ui(St.current);switch(i){case 1:i=u.createElementNS("http://www.w3.org/2000/svg",n);break;case 2:i=u.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;default:switch(n){case"svg":i=u.createElementNS("http://www.w3.org/2000/svg",n);break;case"math":i=u.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;case"script":i=u.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof a.is=="string"?u.createElement("select",{is:a.is}):u.createElement("select"),a.multiple?i.multiple=!0:a.size&&(i.size=a.size);break;default:i=typeof a.is=="string"?u.createElement(n,{is:a.is}):u.createElement(n)}}i[Ct]=t,i[Vt]=a;e:for(u=t.child;u!==null;){if(u.tag===5||u.tag===6)i.appendChild(u.stateNode);else if(u.tag!==4&&u.tag!==27&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===t)break e;for(;u.sibling===null;){if(u.return===null||u.return===t)break e;u=u.return}u.sibling.return=u.return,u=u.sibling}t.stateNode=i;e:switch(Rt(i,n,a),n){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&Fl(t)}}return st(t),t.subtreeFlags&=-33554433,Kc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&Fl(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(r(166));if(e=St.current,jn(t)){if(e=t.stateNode,l=t.memoizedProps,a=null,n=jt,n!==null)switch(n.tag){case 27:case 5:a=n.memoizedProps}e[Ct]=t,e=!!(e.nodeValue===l||a!==null&&a.suppressHydrationWarning===!0||qf(e.nodeValue,l)),e||ra(t,!0)}else e=Ui(e).createTextNode(a),e[Ct]=t,t.stateNode=e}return st(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(a=jn(t),l!==null){if(e===null){if(!a)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[Ct]=t}else Ya(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;st(t),e=!1}else l=ic(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(tl(t),t):(tl(t),null);if((t.flags&128)!==0)throw Error(r(558))}return st(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(n=jn(t),a!==null&&a.dehydrated!==null){if(e===null){if(!n)throw Error(r(318));if(n=t.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(r(317));n[Ct]=t}else Ya(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;st(t),n=!1}else n=ic(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),n=!0;if(!n)return t.flags&256?(tl(t),t):(tl(t),null)}return tl(t),(t.flags&128)!==0?(t.lanes=l,t):(l=a!==null,e=e!==null&&e.memoizedState!==null,l&&(a=t.child,n=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(n=a.alternate.memoizedState.cachePool.pool),i=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(i=a.memoizedState.cachePool.pool),i!==n&&(a.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),Ys(t,t.updateQueue),st(t),null);case 4:return qt(),e===null&&wr(t.stateNode.containerInfo),t.flags|=67108864,st(t),null;case 10:return Kl(t.type),st(t),null;case 19:if(vc(t),a=t.memoizedState,a===null)return st(t),null;if(n=(t.flags&128)!==0,i=a.rendering,i===null)if(n)Ei(a,!1);else{if(mt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=Ts(e),i!==null){for(t.flags|=128,Ei(a,!1),e=i.updateQueue,t.updateQueue=e,Ys(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)b0(l,e),l=l.sibling;return Si(t,_t.current&1|2),Le&&Vl(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&Mt()>Ps&&(t.flags|=128,n=!0,Ei(a,!1),t.lanes=4194304)}else{if(!n)if(e=Ts(i),e!==null){if(t.flags|=128,n=!0,e=e.updateQueue,t.updateQueue=e,Ys(t,e),Ei(a,!0),a.tail===null&&a.tailMode!=="collapsed"&&a.tailMode!=="visible"&&!i.alternate&&!Le)return st(t),null}else 2*Mt()-a.renderingStartTime>Ps&&l!==536870912&&(t.flags|=128,n=!0,Ei(a,!1),t.lanes=4194304);a.isBackwards?(i.sibling=t.child,t.child=i):(e=a.last,e!==null?e.sibling=i:t.child=i,a.last=i)}if(a.tail!==null){e=a.tail;e:{for(l=e;l!==null;){if(l.alternate!==null){l=!1;break e}l=l.sibling}l=!0}return a.rendering=e,a.tail=e.sibling,a.renderingStartTime=Mt(),e.sibling=null,i=_t.current,i=n?i&1|2:i&1,a.tailMode==="visible"||a.tailMode==="collapsed"||!l||Le?Si(t,i):(l=i,qe(At,t),qe(_t,l),It===null&&(It=t)),Le&&Vl(t,a.treeForkCount),e}return st(t),null;case 22:case 23:return tl(t),bc(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(l&536870912)!==0&&(t.flags&128)===0&&(st(t),t.subtreeFlags&6&&(t.flags|=8192)):st(t),l=t.updateQueue,l!==null&&Ys(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==l&&(t.flags|=2048),e!==null&&De(Va),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Kl(gt),st(t),null;case 25:return null;case 30:return t.flags|=33554432,st(t),null}throw Error(r(156,t.tag))}function wg(e,t){switch(ac(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Kl(gt),qt(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ut(t),null;case 31:if(t.memoizedState!==null){if(tl(t),t.alternate===null)throw Error(r(340));Ya()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(tl(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));Ya()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return vc(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return qt(),null;case 10:return Kl(t.type),null;case 22:case 23:return tl(t),bc(),e!==null&&De(Va),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Kl(gt),null;case 25:return null;default:return null}}function Qd(e,t){switch(ac(t),t.tag){case 3:Kl(gt),qt();break;case 26:case 27:case 5:Ut(t);break;case 4:qt();break;case 31:t.memoizedState!==null&&tl(t);break;case 13:tl(t);break;case 19:vc(t);break;case 10:Kl(t.type);break;case 22:case 23:tl(t),bc(),e!==null&&De(Va);break;case 24:Kl(gt)}}function Mi(e,t){try{var l=t.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var n=a.next;l=n;do{if((l.tag&e)===e){a=void 0;var i=l.create,u=l.inst;a=i(),u.destroy=a}l=l.next}while(l!==n)}}catch(c){Fe(t,t.return,c)}}function ya(e,t,l){try{var a=t.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var i=n.next;a=i;do{if((a.tag&e)===e){var u=a.inst,c=u.destroy;if(c!==void 0){u.destroy=void 0,n=t;var d=l,b=c;try{b()}catch(k){Fe(n,d,k)}}}a=a.next}while(a!==i)}}catch(k){Fe(t,t.return,k)}}function Vd(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{R0(t,l)}catch(a){Fe(e,e.return,a)}}}function Xd(e,t,l){l.props=Wa(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(a){Fe(e,t,a)}}function Ml(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:var n=e.stateNode,i=Zl(e.memoizedProps,n);(n.ref===null||n.ref.name!==i)&&(n.ref=tm(i)),a=n.ref;break;case 7:if(e.stateNode===null){var u=new sl(e);y(e.child,!1,vb,u,void 0,void 0),e.stateNode=u}a=e.stateNode;break;default:a=e.stateNode}typeof l=="function"?e.refCleanup=l(a):l.current=a}}catch(c){Fe(e,t,c)}}function Ot(e,t){var l=e.ref,a=e.refCleanup;if(l!==null)if(typeof a=="function")try{a()}catch(n){Fe(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(n){Fe(e,t,n)}else l.current=null}function Gs(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var l=0;l<t.length;l++)um(e.stateNode,t[l])}function Kd(e){for(var t=e.return;t!==null&&($c(t)&&um(e.stateNode,t.stateNode),!Jc(t));)t=t.return}function wi(e){for(var t=e.return;t!==null&&($c(t)&&pb(e.stateNode,t.stateNode),!Jc(t));)t=t.return}function Jc(e){return e.tag===5||e.tag===3||e.tag===27}function $c(e){return e&&e.tag===7&&e.stateNode!==null}function Wc(e){var t=e.type,l=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":l.autoFocus&&a.focus();break e;case"img":l.src?a.src=l.src:l.srcSet&&(a.srcset=l.srcSet)}}catch(n){Fe(e,e.return,n)}}function Fc(e,t,l){try{var a=e.stateNode;tb(a,e.type,l,t),a[Vt]=t}catch(n){Fe(e,e.return,n)}}function Jd(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ka(e.type)||e.tag===4}function Pc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Jd(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&&ka(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 er(e,t,l,a){var n=e.tag;if(n===5||n===6)n=e.stateNode,t?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(n,t):(t=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,t.appendChild(n),l=l._reactRootContainer,l!=null||t.onclick!==null||(t.onclick=kl)),Gs(e,a),Ve=!0;else if(n!==4&&(n===27&&(Gs(e,a),a=null,ka(e.type)&&(l=e.stateNode,t=null)),e=e.child,e!==null))for(er(e,t,l,a),e=e.sibling;e!==null;)er(e,t,l,a),e=e.sibling}function Zs(e,t,l,a){var n=e.tag;if(n===5||n===6)n=e.stateNode,t?l.insertBefore(n,t):l.appendChild(n),Gs(e,a),Ve=!0;else if(n!==4&&(n===27&&(Gs(e,a),a=null,ka(e.type)&&(l=e.stateNode)),e=e.child,e!==null))for(Zs(e,t,l,a),e=e.sibling;e!==null;)Zs(e,t,l,a),e=e.sibling}function $d(e){var t=e.stateNode,l=e.memoizedProps;try{for(var a=e.type,n=t.attributes;n.length;)t.removeAttributeNode(n[0]);Rt(t,a,l),t[Ct]=e,t[Vt]=l}catch(i){Fe(e,e.return,i)}}var qs=!1,ll=null;function Wd(e){(e.tag===30||(e.subtreeFlags&33554432)!==0)&&(qs=!0)}var wl=null;function Fd(){var e=wl;return wl=null,e}var Kt=0;function An(e,t,l,a,n){return Kt=0,Pd(e.child,t,l,a,n)}function Pd(e,t,l,a,n){for(var i=!1;e!==null;){if(e.tag===5){var u=e.stateNode;if(a!==null){var c=Ir(u);a.push(c),c.view&&(i=!0)}else i||Ir(u).view&&(i=!0);qs=!0,Pf(u,Kt===0?t:t+"_"+Kt,l),Kt++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&n||Pd(e.child,t,l,a,n)&&(i=!0));e=e.sibling}return i}function Cl(e,t){for(;e!==null;)e.tag===5?em(e.stateNode,e.memoizedProps):(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&t||Cl(e.child,t)),e=e.sibling}function Qs(e){if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(Qs(e),e.tag===30&&(e.flags&18874368)!==0&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name==="auto")throw Error(r(544));var l=t.name;t=ql(t.default,t.share),t!=="none"&&(An(e,l,t,null,!1)||Cl(e.child,!1))}e=e.sibling}}function tr(e,t){if(e.tag===30){var l=e.stateNode,a=e.memoizedProps,n=Zl(a,l),i=ql(a.default,l.paired?a.share:a.enter);i!=="none"?An(e,n,i,null,!1)?(Qs(e),l.paired||t||Bn(e,a.onEnter)):Cl(e.child,!1):Qs(e)}else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)tr(e,t),e=e.sibling;else Qs(e)}function lr(e){if(ll!==null&&ll.size!==0){var t=ll;if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&(e.flags&18874368)!==0){var l=e.memoizedProps,a=l.name;if(a!=null&&a!=="auto"){var n=t.get(a);if(n!==void 0){var i=ql(l.default,l.share);if(i!=="none"&&(An(e,a,i,null,!1)?(i=e.stateNode,n.paired=i,i.paired=n,Bn(e,l.onShare)):Cl(e.child,!1)),t.delete(a),t.size===0)break}}}lr(e)}e=e.sibling}}}function ar(e){if(e.tag===30){var t=e.memoizedProps,l=Zl(t,e.stateNode),a=ll!==null?ll.get(l):void 0,n=ql(t.default,a!==void 0?t.share:t.exit);n!=="none"&&(An(e,l,n,null,!1)?a!==void 0?(n=e.stateNode,a.paired=n,n.paired=a,ll.delete(l),Bn(e,t.onShare)):Bn(e,t.onExit):Cl(e.child,!1)),ll!==null&&lr(e)}else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)ar(e),e=e.sibling;else ll!==null&&lr(e)}function ef(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,l=Zl(t,e.stateNode);t=ql(t.default,t.update),e.flags&=-5,t!=="none"&&An(e,l,t,e.memoizedState=[],!1)}else(e.subtreeFlags&33554432)!==0&&ef(e);e=e.sibling}}function nr(e){if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&(e.flags&18874368)!==0){var t=e.stateNode;t.paired!==null&&(t.paired=null,Cl(e.child,!1))}nr(e)}e=e.sibling}}function Vs(e){if(e.tag===30)e.stateNode.paired=null,Cl(e.child,!1),nr(e);else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)Vs(e),e=e.sibling;else nr(e)}function tf(e){for(e=e.child;e!==null;)e.tag===30?Cl(e.child,!1):(e.subtreeFlags&33554432)!==0&&tf(e),e=e.sibling}function ir(e,t,l,a,n,i,u){for(var c=!1;t!==null;){if(t.tag===5){var d=t.stateNode;if(i!==null&&Kt<i.length){var b=i[Kt],k=Ir(d);(b.view||k.view)&&(c=!0);var _;if(_=(e.flags&4)===0)if(k.clip)_=!0;else{_=b.rect;var x=k.rect;_=_.y!==x.y||_.x!==x.x||_.height!==x.height||_.width!==x.width}_&&(e.flags|=4),k.abs?k=!b.abs:(b=b.rect,k=k.rect,k=b.height!==k.height||b.width!==k.width),k&&(e.flags|=32)}else e.flags|=32;(e.flags&4)!==0&&Pf(d,Kt===0?l:l+"_"+Kt,n),c&&(e.flags&4)!==0||(wl===null&&(wl=[]),wl.push(d,Kt===0?a:a+"_"+Kt,t.memoizedProps)),Kt++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&u?e.flags|=t.flags&32:ir(e,t.child,l,a,n,i,u)&&(c=!0));t=t.sibling}return c}function lf(e,t){for(e=e.child;e!==null;){if(e.tag===30){var l=e.memoizedProps,a=e.stateNode,n=Zl(l,a),i=ql(l.default,l.update),u;u=e.memoizedState,e.memoizedState=null,a=e;var c=e.child;Kt=0,n=ir(a,c,n,n,i,u,!1),(e.flags&4)!==0&&n&&Bn(e,l.onUpdate)}else(e.subtreeFlags&33554432)!==0&&lf(e);e=e.sibling}}var kt=!1,$e=!1,Dl=!1,sr=!1,af=typeof WeakSet=="function"?WeakSet:Set,Tt=null,Al=!1,Ci=!1,Xs=!1,ur=!1;function Cg(e,t,l){if(e=e.containerInfo,Ar=$n,e=u0(e),Xu(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var n=a.getSelection&&a.getSelection();if(n&&n.rangeCount!==0){a=n.anchorNode;var i=n.anchorOffset,u=n.focusNode;n=n.focusOffset;try{a.nodeType,u.nodeType}catch{a=null;break e}var c=0,d=-1,b=-1,k=0,_=0,x=e,S=null;t:for(;;){for(var se;x!==a||i!==0&&x.nodeType!==3||(d=c+i),x!==u||n!==0&&x.nodeType!==3||(b=c+n),x.nodeType===3&&(c+=x.nodeValue.length),(se=x.firstChild)!==null;)S=x,x=se;for(;;){if(x===e)break t;if(S===a&&++k===i&&(d=c),S===u&&++_===n&&(b=c),(se=x.nextSibling)!==null)break;x=S,S=x.parentNode}x=se}a=d===-1||b===-1?null:{start:d,end:b}}else a=null}a=a||{start:0,end:0}}else a=null;for(_r={focusedElem:e,selectionRange:a},$n=!1,l=(l&335544064)===l,Tt=t,t=l?9270:1024;Tt!==null;){if(e=Tt,l&&(a=e.deletions,a!==null))for(i=0;i<a.length;i++)l&&ar(a[i]);if(e.alternate===null&&(e.flags&2)!==0)l&&Wd(e),Ks(l);else{if(e.tag===22){if(a=e.alternate,e.memoizedState!==null){a!==null&&a.memoizedState===null&&l&&ar(a),Ks(l);continue}else if(a!==null&&a.memoizedState!==null){l&&Wd(e),Ks(l);continue}}a=e.child,(e.subtreeFlags&t)!==0&&a!==null?(a.return=e,Tt=a):(l&&ef(e),Ks(l))}}ll=null}function Ks(e){for(;Tt!==null;){var t=Tt,l=e,a=t.alternate,n=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if((n&1024)!==0&&a!==null){l=void 0,n=a.memoizedProps,a=a.memoizedState;var i=t.stateNode;try{var u=Wa(t.type,n);l=i.getSnapshotBeforeUpdate(u,a),i.__reactInternalSnapshotBeforeUpdate=l}catch(c){Fe(t,t.return,c)}}break;case 3:if((n&1024)!==0){if(a=t.stateNode.containerInfo,l=a.nodeType,l===9)Br(a);else if(l===1)switch(a.nodeName){case"HEAD":case"HTML":case"BODY":Br(a);break;default:a.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:l&&a!==null&&(l=Zl(a.memoizedProps,a.stateNode),n=t.memoizedProps,n=ql(n.default,n.update),n!=="none"&&An(a,l,n,a.memoizedState=[],!0));break;default:if((n&1024)!==0)throw Error(r(163))}if(a=t.sibling,a!==null){a.return=t.return,Tt=a;break}Tt=t.return}}function nf(e,t,l){var a=l.flags;switch(l.tag){case 0:case 11:case 15:_l(e,l),a&4&&Mi(5,l);break;case 1:if(_l(e,l),a&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(u){Fe(l,l.return,u)}else{var n=Wa(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(n,t,e.__reactInternalSnapshotBeforeUpdate)}catch(u){Fe(l,l.return,u)}}a&64&&Vd(l),a&512&&Ml(l,l.return);break;case 3:if(_l(e,l),a&64&&(e=l.updateQueue,e!==null)){if(t=null,l.child!==null)switch(l.child.tag){case 27:case 5:t=l.child.stateNode;break;case 1:t=l.child.stateNode}try{R0(e,t)}catch(u){Fe(l,l.return,u)}}break;case 27:t===null&&a&4&&$d(l);case 26:case 5:_l(e,l),t===null&&a&4&&Wc(l),a&512&&Ml(l,l.return);break;case 12:_l(e,l);break;case 31:_l(e,l),a&4&&rf(e,l);break;case 13:_l(e,l),a&4&&of(e,l),a&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=Gg.bind(null,l),Nb(e,l))));break;case 22:if(a=l.memoizedState!==null||kt,!a){var i=t!==null&&t.memoizedState!==null||$e;t=kt,n=$e,kt=a,($e=i)&&!n?(a=2,(l.subtreeFlags&8772)!==0&&(a|=1),zl(e,l,a)):_l(e,l),kt=t,$e=n}break;case 30:_l(e,l),a&512&&Ml(l,l.return);break;case 7:a&512&&Ml(l,l.return);default:_l(e,l)}}function cr(e,t){for(e=e.child;e!==null;)sf(e,t),e=e.sibling}function sf(e,t){switch(e.tag){case 5:case 26:try{var l=e.stateNode;if(t){var a=l.style;typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none"}else{var n=e.stateNode,i=e.memoizedProps.style,u=i!=null&&i.hasOwnProperty("display")?i.display:null;n.style.display=u==null||typeof u=="boolean"?"":(""+u).trim()}}catch(d){Fe(e,e.return,d)}rr(e,t);break;case 6:try{e.stateNode.nodeValue=t?"":e.memoizedProps,Ve=!0}catch(d){Fe(e,e.return,d)}break;case 18:try{var c=e.stateNode;t?Ff(c,!0):Ff(e.stateNode,!1)}catch(d){Fe(e,e.return,d)}break;case 22:case 23:e.memoizedState===null&&cr(e,t);break;default:cr(e,t)}}function rr(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){e:{var l=e,a=t;switch(l.tag){case 4:sf(l,a);break e;case 22:l.memoizedState===null&&rr(l,a);break e;default:rr(l,a)}}e=e.sibling}}function uf(e){var t=e.alternate;t!==null&&(e.alternate=null,uf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Pi(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var ct=null,Jt=!1;function vl(e,t,l){for(l=l.child;l!==null;)cf(e,t,l),l=l.sibling}function cf(e,t,l){if(ye&&typeof ye.onCommitFiberUnmount=="function")try{ye.onCommitFiberUnmount(V,l)}catch{}switch(l.tag){case 26:$e||Ot(l,t),vl(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&!$e&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:$e||Ot(l,t),wi(l);var a=ct,n=Jt;ka(l.type)&&(ct=l.stateNode,Jt=!1),vl(e,t,l),fm(l.stateNode,l.type,l.memoizedProps),ct=a,Jt=n;break;case 5:$e||Ot(l,t),wi(l);case 6:if(l.tag===6&&wi(l),a=ct,n=Jt,ct=null,vl(e,t,l),ct=a,Jt=n,ct!==null)if(Jt)try{(ct.nodeType===9?ct.body:ct.nodeName==="HTML"?ct.ownerDocument.body:ct).removeChild(l.stateNode),Ve=!0}catch(i){Fe(l,t,i)}else try{ct.removeChild(l.stateNode),Ve=!0}catch(i){Fe(l,t,i)}break;case 18:ct!==null&&(Jt?(e=ct,Wf(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),Wn(e)):Wf(ct,l.stateNode));break;case 4:a=ct,n=Jt,ct=l.stateNode.containerInfo,Jt=!0,vl(e,t,l),ct=a,Jt=n;break;case 0:case 11:case 14:case 15:ya(2,l,t),$e||ya(4,l,t),vl(e,t,l);break;case 1:$e||(Ot(l,t),a=l.stateNode,typeof a.componentWillUnmount=="function"&&Xd(l,t,a)),vl(e,t,l);break;case 21:vl(e,t,l);break;case 22:$e=(a=$e)||l.memoizedState!==null,vl(e,t,l),$e=a;break;case 30:Ot(l,t),vl(e,t,l);break;case 7:$e||Ot(l,t),vl(e,t,l);break;default:vl(e,t,l)}}function rf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Wn(e)}catch(l){Fe(t,t.return,l)}}}function of(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Wn(e)}catch(l){Fe(t,t.return,l)}}function Dg(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new af),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new af),t;default:throw Error(r(435,e.tag))}}function Js(e,t){var l=Dg(e);t.forEach(function(a){if(!l.has(a)){l.add(a);var n=Zg.bind(null,e,a);a.then(n,n)}})}function Gt(e,t,l){var a=t.deletions;if(a!==null)for(var n=0;n<a.length;n++){var i=a[n],u=e,c=t,d=c;e:for(;d!==null;){switch(d.tag){case 27:if(ka(d.type)){ct=d.stateNode,Jt=!1;break e}break;case 5:ct=d.stateNode,Jt=!1;break e;case 3:case 4:ct=d.stateNode.containerInfo,Jt=!0;break e}d=d.return}if(ct===null)throw Error(r(160));cf(u,c,i),ct=null,Jt=!1,u=i.alternate,u!==null&&(u.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)df(t,e,l),t=t.sibling}var pl=null;function df(e,t,l){var a=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(n&4&&(a=e.updateQueue,a=a!==null?a.events:null,a!==null))for(var i=0;i<a.length;i++){var u=a[i];u.ref.impl=u.nextImpl}Gt(t,e,l),Zt(e),n&4&&(ya(3,e,e.return),Mi(3,e),ya(5,e,e.return));break;case 1:Gt(t,e,l),Zt(e),n&512&&($e||a===null||Ot(a,a.return)),n&64&&kt&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?t:l.concat(t))));break;case 26:if(i=pl,Gt(t,e,l),Zt(e),n&512&&($e||a===null||Ot(a,a.return)),n&4)if(n=a!==null?a.memoizedState:null,l=e.memoizedState,a===null)if(l===null)if(e.stateNode===null)if(kt)e.stateNode=Kf(e.type,e.memoizedProps,t.containerInfo,e);else{e:{t=e.type,l=e.memoizedProps,n=i.ownerDocument||i;t:switch(t){case"title":a=n.getElementsByTagName("title")[0],(!a||a[li]||a[Ct]||a.namespaceURI==="http://www.w3.org/2000/svg"||a.hasAttribute("itemprop"))&&(a=n.createElement(t),n.head.insertBefore(a,n.querySelector("head > title"))),Rt(a,t,l),a[Ct]=e,Nt(a),t=a;break e;case"link":if(i=ym("link","href",n).get(t+(l.href||""))){for(u=0;u<i.length;u++)if(a=i[u],a.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&a.getAttribute("rel")===(l.rel==null?null:l.rel)&&a.getAttribute("title")===(l.title==null?null:l.title)&&a.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){i.splice(u,1);break t}}a=n.createElement(t),Rt(a,t,l),n.head.appendChild(a);break;case"meta":if(i=ym("meta","content",n).get(t+(l.content||""))){for(u=0;u<i.length;u++)if(a=i[u],a.getAttribute("content")===(l.content==null?null:""+l.content)&&a.getAttribute("name")===(l.name==null?null:l.name)&&a.getAttribute("property")===(l.property==null?null:l.property)&&a.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&a.getAttribute("charset")===(l.charSet==null?null:l.charSet)){i.splice(u,1);break t}}a=n.createElement(t),Rt(a,t,l),n.head.appendChild(a);break;default:throw Error(r(468,t))}a[Ct]=e,Nt(a),t=a}e.stateNode=t}else kt||Xr(i,e.type,e.stateNode);else e.stateNode=bm(i,l,e.memoizedProps);else n!==l?(n===null?(t=a.stateNode,t===null||$e||t.parentNode.removeChild(t)):n.count--,l===null?kt||Xr(i,e.type,e.stateNode):bm(i,l,e.memoizedProps)):l===null&&e.stateNode!==null&&Fc(e,e.memoizedProps,a.memoizedProps);break;case 27:Gt(t,e,l),Zt(e),n&512&&($e||a===null||Ot(a,a.return)),a!==null&&n&4&&Fc(e,e.memoizedProps,a.memoizedProps);break;case 5:if(i=Dl,Dl=!1,Gt(t,e,l),Dl=i,Zt(e),n&512&&($e||a===null||Ot(a,a.return)),e.flags&32){t=e.stateNode;try{hn(t,""),Ve=!0}catch(k){Fe(e,e.return,k)}}n&4&&e.stateNode!=null&&(t=e.memoizedProps,Fc(e,t,a!==null?a.memoizedProps:t)),n&1024&&(sr=!0);break;case 6:if(Gt(t,e,l),Zt(e),n&4){if(e.stateNode===null)throw Error(r(162));t=e.memoizedProps,l=e.stateNode;try{l.nodeValue=t,Ve=!0}catch(k){Fe(e,e.return,k)}}break;case 3:if(Ve=!1,ou=null,i=pl,pl=Hi(t.containerInfo),Gt(t,e,l),pl=i,Zt(e),n&4&&a!==null&&a.memoizedState.isDehydrated)try{Wn(t.containerInfo)}catch(k){Fe(e,e.return,k)}sr&&(sr=!1,ff(e)),Ve=!1;break;case 4:n=Dl,Dl=kt,a=Do(),i=pl,pl=Hi(e.stateNode.containerInfo),Gt(t,e,l),Zt(e),pl=i,Ve&&Ci&&(Xs=!0),Ve=a,Dl=n;break;case 12:Gt(t,e,l),Zt(e);break;case 31:Gt(t,e,l),Zt(e),n&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Js(e,t)));break;case 13:Gt(t,e,l),Zt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Fs=Mt()),n&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Js(e,t)));break;case 22:i=e.memoizedState!==null,u=a!==null&&a.memoizedState!==null;var c=kt,d=$e,b=Dl;kt=c||i,Dl=b||i,$e=d||u,Gt(t,e,l),$e=d,Dl=b,kt=c,Zt(e),n&8192&&(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,!i||a===null||u||kt||$e||(t=u||$e,l=kt,a=$e,kt=i||kt,$e=t,va(e,2),kt=l,$e=a),!i&&Dl||cr(e,i)),n&4&&(t=e.updateQueue,t!==null&&(l=t.retryQueue,l!==null&&(t.retryQueue=null,Js(e,l))));break;case 19:Gt(t,e,l),Zt(e),n&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Js(e,t)));break;case 30:n&512&&($e||a===null||Ot(a,a.return)),n=Do(),i=Ci,u=(l&335544064)===l,c=e.memoizedProps,Ci=u&&ql(c.default,c.update)!=="none",Gt(t,e,l),Zt(e),u&&a!==null&&Ve&&(e.flags|=4),Ci=i,Ve=n;break;case 21:break;case 7:n&512&&($e||a===null||Ot(a,a.return)),a&&a.stateNode!==null&&(a.stateNode._fragmentFiber=e);default:Gt(t,e,l),Zt(e)}}function Zt(e){var t=e.flags;if(t&2){try{for(var l,a=e.return;a!==null;){if(Jd(a)){l=a;break}a=a.return}a=null;for(var n=e.return;n!==null;){if($c(n)){var i=n.stateNode;a===null?a=[i]:a.push(i)}if(Jc(n))break;n=n.return}var u=a;if(l==null)throw Error(r(160));switch(l.tag){case 27:var c=l.stateNode,d=Pc(e);Zs(e,d,c,u);break;case 5:var b=l.stateNode;l.flags&32&&(hn(b,""),l.flags&=-33);var k=Pc(e);Zs(e,k,b,u);break;case 3:case 4:var _=l.stateNode.containerInfo,x=Pc(e);er(e,x,_,u);break;default:throw Error(r(161))}}catch(S){Fe(e,e.return,S)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function ff(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;ff(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,$n=!0,t.reset(),$n=!1),e=e.sibling}}function _n(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)mf(t,e),t=t.sibling;else lf(t)}function mf(e,t){var l=e.alternate;if(l===null)tr(e,!1);else switch(e.tag){case 3:if(ur=Al=!1,Fd(),_n(t,e),!Al&&!Xs){if(e=wl,e!==null)for(var a=0;a<e.length;a+=3){l=e[a];var n=e[a+1];em(l,e[a+2]),l=l.ownerDocument.documentElement,l!==null&&l.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group("+n+")"})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===""&&(e.style.viewTransitionName="none",e.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group(root)"}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:"forwards",pseudoElement:"::view-transition"})),ur=!0}wl=null;break;case 5:_n(t,e);break;case 4:a=Al,Al=!1,_n(t,e),Al&&(Xs=!0),Al=a;break;case 22:e.memoizedState===null&&(l.memoizedState!==null?tr(e,!1):_n(t,e));break;case 30:a=Al,n=Fd(),Al=!1,_n(t,e),Al&&(e.flags|=4);var i=e.memoizedProps,u=e.stateNode;t=Zl(i,u),u=Zl(l.memoizedProps,u);var c=ql(i.default,i.update);c==="none"?t=!1:(i=l.memoizedState,l.memoizedState=null,l=e.child,Kt=0,t=ir(e,l,t,u,c,i,!0),Kt!==(i===null?0:i.length)&&(e.flags|=32)),(e.flags&4)!==0&&t?(Bn(e,e.memoizedProps.onUpdate),wl=n):n!==null&&(n.push.apply(n,wl),wl=n),Al=(e.flags&32)!==0?!0:a;break;default:_n(t,e)}}function _l(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)nf(e,t.alternate,t),t=t.sibling}function va(e,t){for(e=e.child;e!==null;){var l=e,a=t;switch(l.tag){case 0:case 11:case 14:case 15:ya(4,l,l.return),va(l,a);break;case 1:Ot(l,l.return);var n=l.stateNode;typeof n.componentWillUnmount=="function"&&Xd(l,l.return,n),va(l,a);break;case 27:(a&2)!==0&&fm(l.stateNode,l.type,l.memoizedProps);case 5:Ot(l,l.return),l.tag!==5&&l.tag!==27||wi(l),va(l,a);break;case 6:wi(l);break;case 26:Ot(l,l.return),n=l.stateNode,l.memoizedState!==null||n===null||$e||n.parentNode.removeChild(n),va(l,a);break;case 22:l.memoizedState===null&&va(l,a);break;case 30:Ot(l,l.return),va(l,a);break;case 7:Ot(l,l.return);default:va(l,a)}e=e.sibling}}function zl(e,t,l){for(l=(t.subtreeFlags&8772)!==0?l:l&-2,t=t.child;t!==null;){var a=t.alternate,n=e,i=t,u=i.flags,c=(l&1)!==0;switch(i.tag){case 0:case 11:case 15:zl(n,i,l),Mi(4,i);break;case 1:if(zl(n,i,l),a=i,n=a.stateNode,typeof n.componentDidMount=="function")try{n.componentDidMount()}catch(k){Fe(a,a.return,k)}if(a=i,n=a.updateQueue,n!==null){var d=a.stateNode;try{var b=n.shared.hiddenCallbacks;if(b!==null)for(n.shared.hiddenCallbacks=null,n=0;n<b.length;n++)O0(b[n],d)}catch(k){Fe(a,a.return,k)}}c&&u&64&&Vd(i),Ml(i,i.return);break;case 27:(l&2)!==0&&$d(i);case 5:i.tag!==5&&i.tag!==27||Kd(i),zl(n,i,l),c&&a===null&&u&4&&Wc(i),Ml(i,i.return);break;case 6:Kd(i);break;case 26:d=i.stateNode,i.memoizedState!==null||d===null||kt||Xr(Hi(d.ownerDocument),i.type,d),zl(n,i,l),c&&a===null&&u&4&&Wc(i),Ml(i,i.return);break;case 12:zl(n,i,l);break;case 31:zl(n,i,l),c&&u&4&&rf(n,i);break;case 13:zl(n,i,l),c&&u&4&&of(n,i);break;case 22:i.memoizedState===null&&zl(n,i,l),Ml(i,i.return);break;case 30:zl(n,i,l),Ml(i,i.return);break;case 7:Ml(i,i.return);default:zl(n,i,l)}t=t.sibling}}function or(e,t){var l=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==l&&(e!=null&&e.refCount++,l!=null&&xi(l))}function dr(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&xi(e))}function xl(e,t,l,a){var n=(l&335544064)===l;if(t.subtreeFlags&(n?10262:10256))for(t=t.child;t!==null;)hf(e,t,l,a),t=t.sibling;else n&&tf(t)}function hf(e,t,l,a){var n=(l&335544064)===l;n&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&Vs(t);var i=t.flags;switch(t.tag){case 0:case 11:case 15:xl(e,t,l,a),i&2048&&Mi(9,t);break;case 1:xl(e,t,l,a);break;case 3:xl(e,t,l,a),n&&ur&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,e.style.viewTransitionName==="root"&&(e.style.viewTransitionName=""),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName==="none"&&(e.style.viewTransitionName="")),i&2048&&(i=null,t.alternate!==null&&(i=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==i&&(t.refCount++,i!=null&&xi(i)));break;case 12:if(i&2048){xl(e,t,l,a),i=t.stateNode;try{var u=t.memoizedProps,c=u.id,d=u.onPostCommit;typeof d=="function"&&d(c,t.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(b){Fe(t,t.return,b)}}else xl(e,t,l,a);break;case 31:xl(e,t,l,a);break;case 13:xl(e,t,l,a);break;case 23:break;case 22:u=t.stateNode,c=t.alternate,t.memoizedState!==null?(n&&c!==null&&c.memoizedState===null&&Vs(c),u._visibility&2?xl(e,t,l,a):Di(e,t)):(n&&c!==null&&c.memoizedState!==null&&Vs(t),u._visibility&2?xl(e,t,l,a):(u._visibility|=2,On(e,t,l,a,(t.subtreeFlags&10256)!==0||!1))),i&2048&&or(c,t);break;case 24:xl(e,t,l,a),i&2048&&dr(t.alternate,t);break;case 30:n&&(i=t.alternate,i!==null&&(Cl(i.child,!0),Cl(t.child,!0))),xl(e,t,l,a);break;default:xl(e,t,l,a)}}function On(e,t,l,a,n){for(n=n&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var i=e,u=t,c=l,d=a,b=u.flags;switch(u.tag){case 0:case 11:case 15:On(i,u,c,d,n),Mi(8,u);break;case 23:break;case 22:var k=u.stateNode;u.memoizedState!==null?k._visibility&2?On(i,u,c,d,n):Di(i,u):(k._visibility|=2,On(i,u,c,d,n)),n&&b&2048&&or(u.alternate,u);break;case 24:On(i,u,c,d,n),n&&b&2048&&dr(u.alternate,u);break;default:On(i,u,c,d,n)}t=t.sibling}}function Di(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var l=e,a=t,n=a.flags;switch(a.tag){case 22:Di(l,a),n&2048&&or(a.alternate,a);break;case 24:Di(l,a),n&2048&&dr(a.alternate,a);break;default:Di(l,a)}t=t.sibling}}var Fa=8192;function Pa(e,t,l){if(e.subtreeFlags&Fa)for(e=e.child;e!==null;)xf(e,t,l),e=e.sibling}function xf(e,t,l){switch(e.tag){case 26:Pa(e,t,l),e.flags&Fa&&(e.memoizedState!==null?Ib(l,pl,e.memoizedState,e.memoizedProps):(e=e.stateNode,(t&335544128)===t&&Sm(l,e)));break;case 5:Pa(e,t,l),e.flags&Fa&&(e=e.stateNode,(t&335544128)===t&&Sm(l,e));break;case 3:case 4:var a=pl;pl=Hi(e.stateNode.containerInfo),Pa(e,t,l),pl=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=Fa,Fa=16777216,Pa(e,t,l),Fa=a):Pa(e,t,l));break;case 30:if((e.flags&Fa)!==0&&(a=e.memoizedProps.name,a!=null&&a!=="auto")){var n=e.stateNode;n.paired=null,ll===null&&(ll=new Map),ll.set(a,n)}Pa(e,t,l);break;default:Pa(e,t,l)}}function gf(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Ai(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];Tt=a,yf(a,e)}gf(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)bf(e),e=e.sibling}function bf(e){switch(e.tag){case 0:case 11:case 15:Ai(e),e.flags&2048&&ya(9,e,e.return);break;case 3:Ai(e);break;case 12:Ai(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,$s(e)):Ai(e);break;default:Ai(e)}}function $s(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];Tt=a,yf(a,e)}gf(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:ya(8,t,t.return),$s(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,$s(t));break;default:$s(t)}e=e.sibling}}function yf(e,t){for(;Tt!==null;){var l=Tt;switch(l.tag){case 0:case 11:case 15:ya(8,l,t);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var a=l.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:xi(l.memoizedState.cache)}if(a=l.child,a!==null)a.return=l,Tt=a;else e:for(l=e;Tt!==null;){a=Tt;var n=a.sibling,i=a.return;if(uf(a),a===l){Tt=null;break e}if(n!==null){n.return=i,Tt=n;break e}Tt=i}}}var Ag={getCacheForType:function(e){var t=Dt(gt),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return Dt(gt).controller.signal}},_g=typeof WeakMap=="function"?WeakMap:Map,Ke=0,at=null,He=null,Ye=0,We=0,al=null,pa=!1,Rn=!1,fr=!1,Pl=0,mt=0,za=0,en=0,Ws=0,nl=0,Ln=0,_i=null,$t=null,mr=!1,Fs=0,vf=0,Ps=1/0,eu=null,Sa=null,ot=0,Sl=null,tn=null,Ol=0,hr=0,xr=null,pf=null,In=null,Un=null,Hn=null,Oi=0,tu=null;function il(){return(Ke&2)!==0&&Ye!==0?Ye&-Ye:K.T!==null?kr():So()}function zf(){if(nl===0)if((Ye&536870912)===0||Le){var e=jl;jl<<=1,(jl&3932160)===0&&(jl=262144),nl=e}else nl=536870912;return e=At.current,e!==null&&(e.flags|=32),nl}function Bn(e,t){if(t!=null){var l=e.stateNode,a=l.ref;a===null&&(a=l.ref=tm(Zl(e.memoizedProps,l))),Un===null&&(Un=[]),Un.push(t.bind(null,a))}}function Wt(e,t,l){(e===at&&(We===2||We===9)||e.cancelPendingCommit!==null)&&(Yn(e,0),Na(e,Ye,nl,!1)),Oa(e,l),((Ke&2)===0||e!==at)&&(e===at&&((Ke&2)===0&&(en|=l),mt===4&&Na(e,Ye,nl,!1)),Rl(e))}function Sf(e,t,l){if((Ke&6)!==0)throw Error(r(327));var a=!l&&(t&127)===0&&(t&e.expiredLanes)===0||aa(e,t),n=a?Lg(e,t):br(e,t,!0),i=a;do{if(n===0){Rn&&!a&&Na(e,t,0,!1);break}else{if(l=e.current.alternate,i&&!Og(l)){n=br(e,t,!1),i=!1;continue}if(n===2){if(i=t,e.errorRecoveryDisabledLanes&i)var u=0;else u=e.pendingLanes&-536870913,u=u!==0?u:u&536870912?536870912:0;if(u!==0){t=u;e:{var c=e;n=_i;var d=c.current.memoizedState.isDehydrated;if(d&&(Yn(c,u).flags|=256),u=br(c,u,!1),u!==2&&u!==6){if(fr&&!d){c.errorRecoveryDisabledLanes|=i,en|=i,n=4;break e}i=$t,$t=n,i!==null&&($t===null?$t=i:$t.push.apply($t,i))}n=u}if(i=!1,n!==2)continue}}if(n===1){Yn(e,0),Na(e,t,0,!0);break}e:{switch(a=e,i=n,i){case 0:case 1:throw Error(r(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:Na(a,t,nl,!pa);break e;case 2:$t=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(n=Fs+300-Mt(),10<n)){if(Na(a,t,nl,!pa),ti(a,0,!0)!==0)break e;Ol=t,a.timeoutHandle=Lr(Nf.bind(null,a,l,$t,eu,mr,t,nl,en,Ln,pa,i,"Throttled",-0,0),n);break e}Nf(a,l,$t,eu,mr,t,nl,en,Ln,pa,i,null,-0,0)}}break}while(!0);Rl(e)}function Nf(e,t,l,a,n,i,u,c,d,b,k,_,x,S){e.timeoutHandle=-1;var se=t.subtreeFlags,ge=(i&335544064)===i;if(_=null,(ge||se&8192||(se&16785408)===16785408)&&(_={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:kl},ll=null,xf(t,i,_),ge&&(se=_,ge=e.containerInfo,ge=(ge.nodeType===9?ge:ge.ownerDocument).__reactViewTransition,ge!=null&&(se.count++,se.waitingForViewTransition=!0,se=Gi.bind(se),ge.finished.then(se,se))),se=(i&62914560)===i?Fs-Mt():(i&4194048)===i?vf-Mt():0,se=Ub(_,se),se!==null)){Ol=i,e.cancelPendingCommit=se(Df.bind(null,e,t,i,l,a,n,u,c,d,b,k,_,null,x,S)),Na(e,i,u,!b);return}Df(e,t,i,l,a,n,u,c,d,b,k,_)}function Og(e){for(var t=e;;){var l=t.tag;if((l===0||l===11||l===15)&&t.flags&16384&&(l=t.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var a=0;a<l.length;a++){var n=l[a],i=n.getSnapshot;n=n.value;try{if(!el(i(),n))return!1}catch{return!1}}if(l=t.child,t.subtreeFlags&16384&&l!==null)l.return=t,t=l;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 Na(e,t,l,a){t=et(e,t),t&=~Ws,t&=~en,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var n=t;0<n;){var i=31-lt(n),u=1<<i;a[i]=-1,n&=~u}l!==0&&vo(e,l,t)}function lu(){return(Ke&6)===0?(Ri(0),!1):!0}function gr(){if(He!==null){if(We===0)var e=He.return;else e=He,Xl=Ga=null,jc(e),En=null,yi=0,e=He;for(;e!==null;)Qd(e.alternate,e),e=e.return;He=null}}function Yn(e,t){var l=e.timeoutHandle;return l!==-1&&(e.timeoutHandle=-1,nb(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),Ol=0,gr(),at=e,He=l=Ql(e.current,null),Ye=t,We=0,al=null,pa=!1,Rn=aa(e,t),fr=!1,Ln=nl=Ws=en=za=mt=0,$t=_i=null,mr=!1,Pl=et(e,t),os(),l}function jf(e,t){Ae=null,K.H=Rs,t===Tn||t===zs?(t=C0(),We=3):t===dc?(t=C0(),We=4):We=t===Hc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,al=t,He===null&&(mt=1,Ls(e,dl(t,e.current)))}function kf(){var e=At.current;return e===null?!0:(Ye&4194048)===Ye?It===null:(Ye&62914560)===Ye||(Ye&536870912)!==0?e===It:!1}function Tf(){var e=K.H;return K.H=Rs,e===null?Rs:e}function Ef(){var e=K.A;return K.A=Ag,e}function au(){mt=4,pa||(Ye&4194048)!==Ye&&At.current!==null||(Rn=!0),(za&134217727)===0&&(en&134217727)===0||at===null||Na(at,Ye,nl,!1)}function br(e,t,l){var a=Ke;Ke|=2;var n=Tf(),i=Ef();(at!==e||Ye!==t)&&(eu=null,Yn(e,t)),t=!1;var u=mt;e:do try{if(We!==0&&He!==null){var c=He,d=al;switch(We){case 8:gr(),u=6;break e;case 3:case 2:case 9:case 6:At.current===null&&(t=!0);var b=We;if(We=0,al=null,Gn(e,c,d,b),l&&Rn){u=0;break e}break;default:b=We,We=0,al=null,Gn(e,c,d,b)}}Rg(),u=mt;break}catch(k){jf(e,k)}while(!0);return t&&e.shellSuspendCounter++,Xl=Ga=null,Ke=a,K.H=n,K.A=i,He===null&&(at=null,Ye=0,os()),u}function Rg(){for(;He!==null;)Mf(He)}function Lg(e,t){var l=Ke;Ke|=2;var a=Tf(),n=Ef();at!==e||Ye!==t?(eu=null,Ps=Mt()+500,Yn(e,t)):Rn=aa(e,t);e:do try{if(We!==0&&He!==null){t=He;var i=al;t:switch(We){case 1:We=0,al=null,Gn(e,t,i,1);break;case 2:case 9:if(M0(i)){We=0,al=null,wf(t);break}t=function(){We!==2&&We!==9||at!==e||(We=7),Rl(e)},i.then(t,t);break e;case 3:We=7;break e;case 4:We=5;break e;case 7:M0(i)?(We=0,al=null,wf(t)):(We=0,al=null,Gn(e,t,i,7));break;case 5:var u=null;switch(He.tag){case 26:u=He.memoizedState;case 5:case 27:var c=He;if(u?pm(u):c.stateNode.complete){We=0,al=null;var d=c.sibling;if(d!==null)He=d;else{var b=c.return;b!==null?(He=b,nu(b)):He=null}break t}}We=0,al=null,Gn(e,t,i,5);break;case 6:We=0,al=null,Gn(e,t,i,6);break;case 8:gr(),mt=6;break e;default:throw Error(r(462))}}Ig();break}catch(k){jf(e,k)}while(!0);return Xl=Ga=null,K.H=a,K.A=n,Ke=l,He!==null?0:(at=null,Ye=0,os(),mt)}function Ig(){for(;He!==null&&!nt();)Mf(He)}function Mf(e){var t=Zd(e.alternate,e,Pl);e.memoizedProps=e.pendingProps,t===null?nu(e):He=t}function wf(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=Ld(l,t,t.pendingProps,t.type,void 0,Ye);break;case 11:t=Ld(l,t,t.pendingProps,t.type.render,t.ref,Ye);break;case 5:jc(t);var a=t;a===jt&&(Le?(gs(a),a.tag===5&&a.stateNode!=null&&(it=a.stateNode)):(gs(a),Le=!0));default:Qd(l,t),t=He=b0(t,Pl),t=Zd(l,t,Pl)}e.memoizedProps=e.pendingProps,t===null?nu(e):He=t}function Gn(e,t,l,a){Xl=Ga=null,jc(t),En=null,yi=0;var n=t.return;try{if(jg(e,n,t,l,Ye)){mt=1,Ls(e,dl(l,e.current)),He=null;return}}catch(i){if(n!==null)throw He=n,i;mt=1,Ls(e,dl(l,e.current)),He=null;return}t.flags&32768?(Le||a===1?e=!0:Rn||(Ye&536870912)!==0?e=!1:(pa=e=!0,(a===2||a===9||a===3||a===6)&&(a=At.current,a!==null&&a.tag===13&&(a.flags|=16384))),Cf(t,e)):nu(t)}function nu(e){var t=e;do{if((t.flags&32768)!==0){Cf(t,pa);return}e=t.return;var l=Mg(t.alternate,t,Pl);if(l!==null){He=l;return}if(t=t.sibling,t!==null){He=t;return}He=t=e}while(t!==null);mt===0&&(mt=5)}function Cf(e,t){do{var l=wg(e.alternate,e);if(l!==null){l.flags&=32767,He=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){He=e;return}He=e=l}while(e!==null);mt=6,He=null}function Df(e,t,l,a,n,i,u,c,d,b,k,_){e.cancelPendingCommit=null;do iu();while(ot!==0);if((Ke&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));e===at&&(He=at=null,Ye=0),tn=t,Sl=e,Ol=l,xr=n,pf=a,Ug(e,t,l,u,c,d,_)}}function Ug(e,t,l,a,n,i,u){var c=t.lanes|t.childLanes;if(hr=c,c|=Fu,ox(e,l,c,a,n,i),Un=null,(l&335544064)===l?(Hn=fg(e),a=10262):(Hn=null,a=10256),(t.subtreeFlags&a)!==0||(t.flags&a)!==0?(e.callbackNode=null,e.callbackPriority=0,qg(Da,function(){return zr(),null})):(e.callbackNode=null,e.callbackPriority=0),qs=!1,a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=K.T,K.T=null,n=ue.p,ue.p=2,i=Ke,Ke|=4;try{Cg(e,t,l)}finally{Ke=i,ue.p=n,K.T=a}}ot=1,qs?In=ob(u,e.containerInfo,Hn,yr,vr,Bg,pr,zr,Hg):(yr(),vr(),pr())}function Hg(e){if(ot!==0){var t=Sl.onRecoverableError;t(e,{componentStack:null})}}function Bg(){ot===3&&(ot=0,mf(tn,Sl),ot=4)}function yr(){if(ot===1){ot=0;var e=Sl,t=tn,l=Ol,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=K.T,K.T=null;var n=ue.p;ue.p=2;var i=Ke;Ke|=4;try{Ci=Xs=!1,df(t,e,l),l=_r;var u=u0(e.containerInfo),c=l.focusedElem,d=l.selectionRange;if(u!==c&&c&&c.ownerDocument&&s0(c.ownerDocument.documentElement,c)){if(d!==null&&Xu(c)){var b=d.start,k=d.end;if(k===void 0&&(k=b),"selectionStart"in c)c.selectionStart=b,c.selectionEnd=Math.min(k,c.value.length);else{var _=c.ownerDocument||document,x=_&&_.defaultView||window;if(x.getSelection){var S=x.getSelection(),se=c.textContent.length,ge=Math.min(d.start,se),_e=d.end===void 0?ge:Math.min(d.end,se);!S.extend&&ge>_e&&(u=_e,_e=ge,ge=u);var g=i0(c,ge),m=i0(c,_e);if(g&&m&&(S.rangeCount!==1||S.anchorNode!==g.node||S.anchorOffset!==g.offset||S.focusNode!==m.node||S.focusOffset!==m.offset)){var z=_.createRange();z.setStart(g.node,g.offset),S.removeAllRanges(),ge>_e?(S.addRange(z),S.extend(m.node,m.offset)):(z.setEnd(m.node,m.offset),S.addRange(z))}}}}for(_=[],S=c;S=S.parentNode;)S.nodeType===1&&_.push({element:S,left:S.scrollLeft,top:S.scrollTop});for(typeof c.focus=="function"&&c.focus(),c=0;c<_.length;c++){var A=_[c];A.element.scrollLeft=A.left,A.element.scrollTop=A.top}}$n=!!Ar,_r=Ar=null}finally{Ke=i,ue.p=n,K.T=a}}e.current=t,ot=2}}function vr(){if(ot===2){ot=0;var e=Sl,t=tn,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=K.T,K.T=null;var a=ue.p;ue.p=2;var n=Ke;Ke|=4;try{nf(e,t.alternate,t)}finally{Ke=n,ue.p=a,K.T=l}}ot=3}}function pr(){if(ot===4||ot===3){ot=0;var e=In;In=null,Ul();var t=Sl,l=tn,a=Ol,n=pf,i=(a&335544064)===a?10262:10256;if((l.subtreeFlags&i)!==0||(l.flags&i)!==0?ot=5:(ot=0,tn=Sl=null,Af(t,t.pendingLanes)),i=t.pendingLanes,i===0&&(Sa=null),wu(a),l=l.stateNode,ye&&typeof ye.onCommitFiberRoot=="function")try{ye.onCommitFiberRoot(V,l,void 0,(l.current.flags&128)===128)}catch{}if(n!==null){l=K.T,i=ue.p,ue.p=2,K.T=null;try{for(var u=t.onRecoverableError,c=0;c<n.length;c++){var d=n[c];u(d.value,{componentStack:d.stack})}}finally{K.T=l,ue.p=i}}if(n=Un,u=Hn,Hn=null,n!==null&&(Un=null,u===null&&(u=[]),e!==null))for(d=0;d<n.length;d++)l=(0,n[d])(u),l!==void 0&&e.finished.finally(l);(Ol&3)!==0&&iu(),Rl(t),i=t.pendingLanes,(a&261930)!==0&&(i&42)!==0?t===tu?Oi++:(Oi=0,tu=t):(Oi=0,tu=null),Ri(0)}}function Af(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,xi(t)))}function iu(){return In!==null&&(In.skipTransition(),In=null),yr(),vr(),pr(),zr()}function zr(){if(ot!==5)return!1;var e=Sl,t=hr;hr=0;var l=wu(Ol),a=K.T,n=ue.p;try{ue.p=32>l?32:l,K.T=null,l=xr,xr=null;var i=Sl,u=Ol;if(ot=0,tn=Sl=null,Ol=0,(Ke&6)!==0)throw Error(r(331));var c=Ke;if(Ke|=4,bf(i.current),hf(i,i.current,u,l),Ke=c,Ri(0,!1),ye&&typeof ye.onPostCommitFiberRoot=="function")try{ye.onPostCommitFiberRoot(V,i)}catch{}return!0}finally{ue.p=n,K.T=a,Af(e,t)}}function _f(e,t,l){t=dl(l,t),t=Uc(e.stateNode,t,2),e=ha(e,t,2),e!==null&&(Oa(e,2),Rl(e))}function Fe(e,t,l){if(e.tag===3)_f(e,e,l);else for(;t!==null;){if(t.tag===3){_f(t,e,l);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Sa===null||!Sa.has(a))){e=dl(l,e),l=Md(2),a=ha(t,l,2),a!==null&&(wd(l,a,t,e),Oa(a,2),Rl(a));break}}t=t.return}}function Sr(e,t,l){var a=e.pingCache;if(a===null){a=e.pingCache=new _g;var n=new Set;a.set(t,n)}else n=a.get(t),n===void 0&&(n=new Set,a.set(t,n));n.has(l)||(fr=!0,n.add(l),e=Yg.bind(null,e,t,l),t.then(e,e))}function Yg(e,t,l){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,at===e&&(Ye&l)===l&&((mt===4||mt===3&&(Ye&62914560)===Ye&&300>Mt()-Fs)&&(Ke&2)===0?Yn(e,0):Ws|=l,Ln===Ye&&(Ln=0)),Rl(e)}function Of(e,t){t===0&&(t=na()),e=Ha(e,t),e!==null&&(Oa(e,t),Rl(e))}function Gg(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),Of(e,l)}function Zg(e,t){var l=0;switch(e.tag){case 31:case 13:var a=e.stateNode,n=e.memoizedState;n!==null&&(l=n.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(r(314))}a!==null&&a.delete(t),Of(e,l)}function qg(e,t){return rt(e,t)}var Zn=null,qn=null,Nr=!1,su=!1,jr=!1,ja=0;function Rl(e){e!==qn&&e.next===null&&(qn===null?Zn=qn=e:qn=qn.next=e),su=!0,Nr||(Nr=!0,Vg())}function Ri(e,t){if(!jr&&su){jr=!0;do for(var l=!1,a=Zn;a!==null;){if(e!==0){var n=a.pendingLanes;if(n===0)var i=0;else{var u=a.suspendedLanes,c=a.pingedLanes;i=(1<<31-lt(42|e)+1)-1,i&=n&~(u&~c),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(l=!0,Uf(a,i))}else i=Ye,i=ti(a,a===at?i:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(i&3)===0||aa(a,i)||(l=!0,Uf(a,i));a=a.next}while(l);jr=!1}}function Qg(){Rf()}function Rf(){su=Nr=!1;var e=0;ja!==0&&ab()&&(e=ja);for(var t=Mt(),l=null,a=Zn;a!==null;){var n=a.next,i=Lf(a,t);i===0?(a.next=null,l===null?Zn=n:l.next=n,n===null&&(qn=l)):(l=a,(e!==0||(i&3)!==0)&&(su=!0)),a=n}ot!==0&&ot!==5||Ri(e),ja!==0&&(ja=0)}function Lf(e,t){for(var l=e.suspendedLanes,a=e.pingedLanes,n=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var u=31-lt(i),c=1<<u,d=n[u];d===-1?((c&l)===0||(c&a)!==0)&&(n[u]=cl(c,t)):d<=t&&(e.expiredLanes|=c),i&=~c}if(t=at,l=Ye,l=ti(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,l===0||e===t&&(We===2||We===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&ut(a),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||aa(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(a!==null&&ut(a),wu(l)){case 2:case 8:l=cn;break;case 32:l=Da;break;case 268435456:l=$i;break;default:l=Da}return a=If.bind(null,e),l=rt(l,a),e.callbackPriority=t,e.callbackNode=l,t}return a!==null&&a!==null&&ut(a),e.callbackPriority=2,e.callbackNode=null,2}function If(e,t){if(ot!==0&&ot!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(iu()&&e.callbackNode!==l)return null;var a=Ye;return a=ti(e,e===at?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(Sf(e,a,t),Lf(e,Mt()),e.callbackNode!=null&&e.callbackNode===l?If.bind(null,e):null)}function Uf(e,t){if(iu())return null;Sf(e,t,!0)}function Vg(){ib(function(){(Ke&6)!==0?rt(de,Qg):Rf()})}function kr(){if(ja===0){var e=Qa;e===0&&(e=Ht,Ht<<=1,(Ht&261888)===0&&(Ht=256)),ja=e}return ja}function Hf(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ls(e)}function Xg(e,t,l,a,n){if(t==="submit"&&l&&l.stateNode===n){var i=Hf((n[Vt]||null).action),u=a.submitter;u&&(t=(t=u[Vt]||null)?Hf(t.formAction):u.getAttribute("formAction"),t!==null&&(i=t,u=null));var c=new ss("action","action",null,a,n);e.push({event:c,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(ja!==0){var d=new FormData(n,u);_c(l,{pending:!0,data:d,method:n.method,action:i},null,d)}}else typeof i=="function"&&(c.preventDefault(),d=new FormData(n,u),_c(l,{pending:!0,data:d,method:n.method,action:i},i,d))},currentTarget:n}]})}}for(var Tr=0;Tr<Wu.length;Tr++){var Er=Wu[Tr],Kg=Er.toLowerCase(),Jg=Er[0].toUpperCase()+Er.slice(1);yl(Kg,"on"+Jg)}yl(o0,"onAnimationEnd"),yl(d0,"onAnimationIteration"),yl(f0,"onAnimationStart"),yl("dblclick","onDoubleClick"),yl("focusin","onFocus"),yl("focusout","onBlur"),yl(ng,"onTransitionRun"),yl(ig,"onTransitionStart"),yl(sg,"onTransitionCancel"),yl(m0,"onTransitionEnd"),fn("onMouseEnter",["mouseout","mouseover"]),fn("onMouseLeave",["mouseout","mouseover"]),fn("onPointerEnter",["pointerout","pointerover"]),fn("onPointerLeave",["pointerout","pointerover"]),La("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),La("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),La("onBeforeInput",["compositionend","keypress","textInput","paste"]),La("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),La("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),La("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Li="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(" "),$g=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Li));function Bf(e,t){t=(t&4)!==0;for(var l=0;l<e.length;l++){var a=e[l],n=a.event;a=a.listeners;e:{var i=void 0;if(t)for(var u=a.length-1;0<=u;u--){var c=a[u],d=c.instance,b=c.currentTarget;if(c=c.listener,d!==i&&n.isPropagationStopped())break e;i=c,n.currentTarget=b;try{i(n)}catch(k){rs(k)}n.currentTarget=null,i=d}else for(u=0;u<a.length;u++){if(c=a[u],d=c.instance,b=c.currentTarget,c=c.listener,d!==i&&n.isPropagationStopped())break e;i=c,n.currentTarget=b;try{i(n)}catch(k){rs(k)}n.currentTarget=null,i=d}}}}function Be(e,t){var l=t[jo];l===void 0&&(l=t[jo]=new Set);var a=e+"__bubble";l.has(a)||(Yf(t,e,2,!1),l.add(a))}function Mr(e,t,l){var a=0;t&&(a|=4),Yf(l,e,a,t)}var uu="_reactListening"+Math.random().toString(36).slice(2);function wr(e){if(!e[uu]){e[uu]=!0,Eo.forEach(function(l){l!=="selectionchange"&&($g.has(l)||Mr(l,!1,e),Mr(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[uu]||(t[uu]=!0,Mr("selectionchange",!1,t))}}function Yf(e,t,l,a){switch(Cm(t)){case 2:var n=Gb;break;case 8:n=Zb;break;default:n=Jr}l=n.bind(null,t,l,e),n=void 0,!Iu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(n=!0),a?n!==void 0?e.addEventListener(t,l,{capture:!0,passive:n}):e.addEventListener(t,l,!0):n!==void 0?e.addEventListener(t,l,{passive:n}):e.addEventListener(t,l,!1)}function Cr(e,t,l,a,n){var i=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var u=a.tag;if(u===3||u===4){var c=a.stateNode.containerInfo;if(c===n)break;if(u===4)for(u=a.return;u!==null;){var d=u.tag;if((d===3||d===4)&&u.stateNode.containerInfo===n)return;u=u.return}for(;c!==null;){if(u=Ra(c),u===null)return;if(d=u.tag,d===5||d===6||d===26||d===27){a=i=u;continue e}c=c.parentNode}}a=a.return}Bo(function(){var b=i,k=Ru(l),_=[];e:{var x=h0.get(e);if(x!==void 0){var S=ss,se=e;switch(e){case"keypress":if(ns(l)===0)break e;case"keydown":case"keyup":S=Ox;break;case"focusin":se="focus",S=Yu;break;case"focusout":se="blur",S=Yu;break;case"beforeblur":case"afterblur":S=Yu;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":S=Zo;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":S=Sx;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":S=Hx;break;case o0:case d0:case f0:S=kx;break;case m0:S=Yx;break;case"scroll":case"scrollend":S=px;break;case"wheel":S=Zx;break;case"copy":case"cut":case"paste":S=Ex;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":S=Qo;break;case"submit":S=Ix;break;case"toggle":case"beforetoggle":S=Qx}var ge=(t&4)!==0,_e=!ge&&(e==="scroll"||e==="scrollend"),g=ge?x!==null?x+"Capture":null:x;ge=[];for(var m=b,z;m!==null;){var A=m;if(z=A.stateNode,A=A.tag,A!==5&&A!==26&&A!==27||z===null||g===null||(A=ni(m,g),A!=null&&ge.push(Ii(m,A,z))),_e)break;m=m.return}0<ge.length&&(x=new S(x,se,null,l,k),_.push({event:x,listeners:ge}))}}if((t&7)===0){e:{if(S=e==="mouseover"||e==="pointerover",x=e==="mouseout"||e==="pointerout",S&&l!==Ou&&(se=l.relatedTarget||l.fromElement)&&(Ra(se)||se[rn]))break e;(x||S)&&(se=k.window===k?k:(S=k.ownerDocument)?S.defaultView||S.parentWindow:window,x?(S=l.relatedTarget||l.toElement,x=b,S=S?Ra(S):null,S!==null&&(_e=I(S),ge=S.tag,S!==_e||ge!==5&&ge!==27&&ge!==6)&&(S=null)):(x=null,S=b),x!==S&&(ge=Zo,A="onMouseLeave",g="onMouseEnter",m="mouse",(e==="pointerout"||e==="pointerover")&&(ge=Qo,A="onPointerLeave",g="onPointerEnter",m="pointer"),_e=x==null?se:ai(x),z=S==null?se:ai(S),se=new ge(A,m+"leave",x,l,k),se.target=_e,se.relatedTarget=z,A=null,Ra(k)===b&&(ge=new ge(g,m+"enter",S,l,k),ge.target=z,ge.relatedTarget=_e,A=ge),_e=A,ge=x&&S?Ee(x,S,Wg):null,x!==null&&Gf(_,se,x,ge,!1),S!==null&&_e!==null&&Gf(_,_e,S,ge,!0)))}e:{if(x=b?ai(b):window,S=x.nodeName&&x.nodeName.toLowerCase(),S==="select"||S==="input"&&x.type==="file")var he=Po;else if(Wo(x))if(e0)he=tg;else{he=Px;var Ge=Fx}else S=x.nodeName,!S||S.toLowerCase()!=="input"||x.type!=="checkbox"&&x.type!=="radio"?b&&_u(b.elementType)&&(he=Po):he=eg;if(he&&(he=he(e,b))){Fo(_,he,l,k);break e}Ge&&Ge(e,x,b)}switch(Ge=b?ai(b):window,e){case"focusin":(Wo(Ge)||Ge.contentEditable==="true")&&(yn=Ge,Ku=b,fi=null);break;case"focusout":fi=Ku=yn=null;break;case"mousedown":Ju=!0;break;case"contextmenu":case"mouseup":case"dragend":Ju=!1,c0(_,l,k);break;case"selectionchange":if(ag)break;case"keydown":case"keyup":c0(_,l,k)}var ve;if(Zu)e:{switch(e){case"compositionstart":var ke="onCompositionStart";break e;case"compositionend":ke="onCompositionEnd";break e;case"compositionupdate":ke="onCompositionUpdate";break e}ke=void 0}else bn?Jo(e,l)&&(ke="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(ke="onCompositionStart");ke&&(Vo&&l.locale!=="ko"&&(bn||ke!=="onCompositionStart"?ke==="onCompositionEnd"&&bn&&(ve=Yo()):(ia=k,Uu="value"in ia?ia.value:ia.textContent,bn=!0)),Ge=cu(b,ke),0<Ge.length&&(ke=new qo(ke,e,null,l,k),_.push({event:ke,listeners:Ge}),ve?ke.data=ve:(ve=$o(l),ve!==null&&(ke.data=ve)))),(ve=Xx?Kx(e,l):Jx(e,l))&&(ke=cu(b,"onBeforeInput"),0<ke.length&&(Ge=new qo("onBeforeInput","beforeinput",null,l,k),_.push({event:Ge,listeners:ke}),Ge.data=ve)),Xg(_,e,b,l,k)}Bf(_,t)})}function Ii(e,t,l){return{instance:e,listener:t,currentTarget:l}}function cu(e,t){for(var l=t+"Capture",a=[];e!==null;){var n=e,i=n.stateNode;if(n=n.tag,n!==5&&n!==26&&n!==27||i===null||(n=ni(e,l),n!=null&&a.unshift(Ii(e,n,i)),n=ni(e,t),n!=null&&a.push(Ii(e,n,i))),e.tag===3)return a;e=e.return}return[]}function Wg(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Gf(e,t,l,a,n){for(var i=t._reactName,u=[];l!==null&&l!==a;){var c=l,d=c.alternate,b=c.stateNode;if(c=c.tag,d!==null&&d===a)break;c!==5&&c!==26&&c!==27||b===null||(d=b,n?(b=ni(l,i),b!=null&&u.unshift(Ii(l,b,d))):n||(b=ni(l,i),b!=null&&u.push(Ii(l,b,d)))),l=l.return}u.length!==0&&e.push({event:t,listeners:u})}var Fg=/\r\n?/g,Pg=/\u0000|\uFFFD/g;function Zf(e){return(typeof e=="string"?e:""+e).replace(Fg,`
|
|
49
|
+
`).replace(Pg,"")}function qf(e,t){return t=Zf(t),Zf(e)===t}function Pe(e,t,l,a,n,i){switch(l){case"children":if(typeof a=="string")t==="body"||t==="textarea"&&a===""||hn(e,a);else if(typeof a=="number"||typeof a=="bigint")t!=="body"&&hn(e,""+a);else return;break;case"className":ts(e,"class",a);break;case"tabIndex":ts(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":ts(e,l,a);break;case"style":Uo(e,a,i);return;case"data":if(t!=="object"){ts(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||l!=="href")){e.removeAttribute(l);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=ls(a),e.setAttribute(l,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(l,"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"&&(l==="formAction"?(t!=="input"&&Pe(e,t,"name",n.name,n,null),Pe(e,t,"formEncType",n.formEncType,n,null),Pe(e,t,"formMethod",n.formMethod,n,null),Pe(e,t,"formTarget",n.formTarget,n,null)):(Pe(e,t,"encType",n.encType,n,null),Pe(e,t,"method",n.method,n,null),Pe(e,t,"target",n.target,n,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=ls(a),e.setAttribute(l,a);break;case"onClick":a!=null&&(e.onclick=kl);return;case"onScroll":a!=null&&Be("scroll",e);return;case"onScrollEnd":a!=null&&Be("scrollend",e);return;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(r(61));if(l=a.__html,l!=null){if(n.children!=null)throw Error(r(60));(i!=null?i.__html:void 0)!==l&&(e.innerHTML=l)}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}l=ls(a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,a):e.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"credentialless":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,""):e.removeAttribute(l);break;case"capture":case"download":a===!0?e.setAttribute(l,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,a):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(l,a):e.removeAttribute(l);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(l):e.setAttribute(l,a);break;case"popover":Be("beforetoggle",e),Be("toggle",e),es(e,"popover",a);break;case"xlinkActuate":Yl(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":Yl(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":Yl(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":Yl(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":Yl(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":Yl(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":Yl(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":Yl(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":Yl(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":es(e,"is",a);break;case"innerText":case"textContent":return;default:if(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")l=yx.get(l)||l,es(e,l,a);else return}Ve=!0}function Dr(e,t,l,a,n,i){switch(l){case"style":Uo(e,a,i);return;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(r(61));if(l=a.__html,l!=null){if(n.children!=null)throw Error(r(60));(i!=null?i.__html:void 0)!==l&&(e.innerHTML=l)}}break;case"children":if(typeof a=="string")hn(e,a);else if(typeof a=="number"||typeof a=="bigint")hn(e,""+a);else return;break;case"onScroll":a!=null&&Be("scroll",e);return;case"onScrollEnd":a!=null&&Be("scrollend",e);return;case"onClick":a!=null&&(e.onclick=kl);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!Mo.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(n=l.endsWith("Capture"),i=l.slice(2,n?l.length-7:void 0),t=e[Vt]||null,t=t!=null?t[l]:null,typeof t=="function"&&e.removeEventListener(i,t,n),typeof a=="function")){typeof t!="function"&&t!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(i,a,n);break e}Ve=!0,l in e?e[l]=a:a===!0?e.setAttribute(l,""):es(e,l,a)}return}Ve=!0}function Rt(e,t,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Be("error",e),Be("load",e);var a=!1,n=!1,i;for(i in l)if(l.hasOwnProperty(i)){var u=l[i];if(u!=null)switch(i){case"src":a=!0;break;case"srcSet":n=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Pe(e,t,i,u,l,null)}}n&&Pe(e,t,"srcSet",l.srcSet,l,null),a&&Pe(e,t,"src",l.src,l,null);return;case"input":Be("invalid",e);var c=i=u=n=null,d=null,b=null;for(a in l)if(l.hasOwnProperty(a)){var k=l[a];if(k!=null)switch(a){case"name":n=k;break;case"type":u=k;break;case"checked":d=k;break;case"defaultChecked":b=k;break;case"value":i=k;break;case"defaultValue":c=k;break;case"children":case"dangerouslySetInnerHTML":if(k!=null)throw Error(r(137,t));break;default:Pe(e,t,a,k,l,null)}}Oo(e,i,c,d,b,u,n,!1);return;case"select":Be("invalid",e),a=u=i=null;for(n in l)if(l.hasOwnProperty(n)&&(c=l[n],c!=null))switch(n){case"value":i=c;break;case"defaultValue":u=c;break;case"multiple":a=c;default:Pe(e,t,n,c,l,null)}t=i,l=u,e.multiple=!!a,t!=null?mn(e,!!a,t,!1):l!=null&&mn(e,!!a,l,!0);return;case"textarea":Be("invalid",e),i=n=a=null;for(u in l)if(l.hasOwnProperty(u)&&(c=l[u],c!=null))switch(u){case"value":a=c;break;case"defaultValue":n=c;break;case"children":i=c;break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(r(91));break;default:Pe(e,t,u,c,l,null)}Lo(e,a,n,i);return;case"option":for(d in l)if(l.hasOwnProperty(d)&&(a=l[d],a!=null))switch(d){case"selected":e.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:Pe(e,t,d,a,l,null)}return;case"dialog":Be("beforetoggle",e),Be("toggle",e),Be("cancel",e),Be("close",e);break;case"iframe":case"object":Be("load",e);break;case"video":case"audio":for(a=0;a<Li.length;a++)Be(Li[a],e);break;case"image":Be("error",e),Be("load",e);break;case"details":Be("toggle",e);break;case"embed":case"source":case"link":Be("error",e),Be("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(b in l)if(l.hasOwnProperty(b)&&(a=l[b],a!=null))switch(b){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Pe(e,t,b,a,l,null)}return;default:if(_u(t)){for(k in l)l.hasOwnProperty(k)&&(a=l[k],a!==void 0&&Dr(e,t,k,a,l,void 0));return}}for(c in l)l.hasOwnProperty(c)&&(a=l[c],a!=null&&Pe(e,t,c,a,l,null))}var eb={};function tb(e,t,l,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var n=null,i=null,u=null,c=null,d=null,b=null,k=null;for(S in l){var _=l[S];if(l.hasOwnProperty(S)&&_!=null)switch(S){case"checked":break;case"value":break;case"defaultValue":d=_;default:a.hasOwnProperty(S)||Pe(e,t,S,null,a,_)}}for(var x in a){var S=a[x];if(_=l[x],a.hasOwnProperty(x)&&(S!=null||_!=null))switch(x){case"type":S!==_&&(Ve=!0),i=S;break;case"name":S!==_&&(Ve=!0),n=S;break;case"checked":S!==_&&(Ve=!0),b=S;break;case"defaultChecked":S!==_&&(Ve=!0),k=S;break;case"value":S!==_&&(Ve=!0),u=S;break;case"defaultValue":S!==_&&(Ve=!0),c=S;break;case"children":case"dangerouslySetInnerHTML":if(S!=null)throw Error(r(137,t));break;default:S!==_&&Pe(e,t,x,S,a,_)}}Du(e,u,c,d,b,k,i,n);return;case"select":S=u=c=x=null;for(i in l)if(d=l[i],l.hasOwnProperty(i)&&d!=null)switch(i){case"value":break;case"multiple":S=d;default:a.hasOwnProperty(i)||Pe(e,t,i,null,a,d)}for(n in a)if(i=a[n],d=l[n],a.hasOwnProperty(n)&&(i!=null||d!=null))switch(n){case"value":i!==d&&(Ve=!0),x=i;break;case"defaultValue":i!==d&&(Ve=!0),c=i;break;case"multiple":i!==d&&(Ve=!0),u=i;default:i!==d&&Pe(e,t,n,i,a,d)}t=c,l=u,a=S,x!=null?mn(e,!!l,x,!1):!!a!=!!l&&(t!=null?mn(e,!!l,t,!0):mn(e,!!l,l?[]:"",!1));return;case"textarea":S=x=null;for(c in l)if(n=l[c],l.hasOwnProperty(c)&&n!=null&&!a.hasOwnProperty(c))switch(c){case"value":break;case"children":break;default:Pe(e,t,c,null,a,n)}for(u in a)if(n=a[u],i=l[u],a.hasOwnProperty(u)&&(n!=null||i!=null))switch(u){case"value":n!==i&&(Ve=!0),x=n;break;case"defaultValue":n!==i&&(Ve=!0),S=n;break;case"children":break;case"dangerouslySetInnerHTML":if(n!=null)throw Error(r(91));break;default:n!==i&&Pe(e,t,u,n,a,i)}Ro(e,x,S);return;case"option":for(var se in l)if(x=l[se],l.hasOwnProperty(se)&&x!=null&&!a.hasOwnProperty(se))switch(se){case"selected":e.selected=!1;break;default:Pe(e,t,se,null,a,x)}for(d in a)if(x=a[d],S=l[d],a.hasOwnProperty(d)&&x!==S&&(x!=null||S!=null))switch(d){case"selected":x!==S&&(Ve=!0),e.selected=x&&typeof x!="function"&&typeof x!="symbol";break;default:Pe(e,t,d,x,a,S)}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 ge in l)x=l[ge],l.hasOwnProperty(ge)&&x!=null&&!a.hasOwnProperty(ge)&&Pe(e,t,ge,null,a,x);for(b in a)if(x=a[b],S=l[b],a.hasOwnProperty(b)&&x!==S&&(x!=null||S!=null))switch(b){case"children":case"dangerouslySetInnerHTML":if(x!=null)throw Error(r(137,t));break;default:Pe(e,t,b,x,a,S)}return;default:if(_u(t)){for(var _e in l)x=l[_e],l.hasOwnProperty(_e)&&x!==void 0&&!a.hasOwnProperty(_e)&&Dr(e,t,_e,void 0,a,x);for(k in a)x=a[k],S=l[k],!a.hasOwnProperty(k)||x===S||x===void 0&&S===void 0||Dr(e,t,k,x,a,S);return}}for(var g in l)x=l[g],l.hasOwnProperty(g)&&x!=null&&!a.hasOwnProperty(g)&&Pe(e,t,g,null,a,x);for(_ in a)x=a[_],S=l[_],!a.hasOwnProperty(_)||x===S||x==null&&S==null||Pe(e,t,_,x,a,S)}function Qf(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function lb(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,l=performance.getEntriesByType("resource"),a=0;a<l.length;a++){var n=l[a],i=n.transferSize,u=n.initiatorType,c=n.duration;if(i&&c&&Qf(u)){for(u=0,c=n.responseEnd,a+=1;a<l.length;a++){var d=l[a],b=d.startTime;if(b>c)break;var k=d.transferSize,_=d.initiatorType;k&&Qf(_)&&(d=d.responseEnd,u+=k*(d<c?1:(c-b)/(d-b)))}if(--a,t+=8*(i+u)/(n.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 Ar=null,_r=null;function Ui(e){return e.nodeType===9?e:e.ownerDocument}function Vf(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 Xf(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 Kf(e,t,l,a){return l=Ui(l).createElement(e),l[Ct]=a,l[Vt]=t,Rt(l,e,t),Nt(l),l}function Or(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 Rr=null;function ab(){var e=window.event;return e&&e.type==="popstate"?e===Rr?!1:(Rr=e,!0):(Rr=null,!1)}var Lr=typeof setTimeout=="function"?setTimeout:void 0,nb=typeof clearTimeout=="function"?clearTimeout:void 0,Jf=typeof Promise=="function"?Promise:void 0,$f=typeof requestAnimationFrame=="function"?requestAnimationFrame:Lr,ib=typeof queueMicrotask=="function"?queueMicrotask:typeof Jf<"u"?function(e){return Jf.resolve(null).then(e).catch(sb)}:Lr;function sb(e){setTimeout(function(){throw e})}function ka(e){return e==="head"}function Wf(e,t){var l=t,a=0;do{var n=l.nextSibling;if(e.removeChild(l),n&&n.nodeType===8)if(l=n.data,l==="/$"||l==="/&"){if(a===0){e.removeChild(n),Wn(t);return}a--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")a++;else if(l==="html")qr(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,qr(l);for(var i=l.firstChild;i;){var u=i.nextSibling,c=i.nodeName;i[li]||c==="SCRIPT"||c==="STYLE"||c==="LINK"&&i.rel.toLowerCase()==="stylesheet"||l.removeChild(i),i=u}}else l==="body"&&qr(e.ownerDocument.body);l=n}while(l);Wn(t)}function Ff(e,t){var l=e;e=0;do{var a=l.nextSibling;if(l.nodeType===1?t?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(t?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),a&&a.nodeType===8)if(l=a.data,l==="/$"){if(e===0)break;e--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||e++;l=a}while(l)}function Pf(e,t,l){if(t=CSS.escape(t)!==t?"r-"+btoa(t).replace(/=/g,""):t,e.style.viewTransitionName=t,l!=null&&(e.style.viewTransitionClass=l),l=getComputedStyle(e),l.display==="inline"){if(t=e.getClientRects(),t.length===1)var a=1;else for(var n=a=0;n<t.length;n++){var i=t[n];0<i.width&&0<i.height&&a++}a===1&&(e=e.style,e.display=t.length===1?"inline-block":"block",e.marginTop="-"+l.paddingTop,e.marginBottom="-"+l.paddingBottom)}}function em(e,t){e=e.style,t=t.style;var l=t!=null?t.hasOwnProperty("viewTransitionName")?t.viewTransitionName:t.hasOwnProperty("view-transition-name")?t["view-transition-name"]:null:null;e.viewTransitionName=l==null||typeof l=="boolean"?"":(""+l).trim(),l=t!=null?t.hasOwnProperty("viewTransitionClass")?t.viewTransitionClass:t.hasOwnProperty("view-transition-class")?t["view-transition-class"]:null:null,e.viewTransitionClass=l==null||typeof l=="boolean"?"":(""+l).trim(),e.display==="inline-block"&&(t==null?e.display=e.margin="":(l=t.display,e.display=l==null||typeof l=="boolean"?"":l,l=t.margin,l!=null?e.margin=l:(l=t.hasOwnProperty("marginTop")?t.marginTop:t["margin-top"],e.marginTop=l==null||typeof l=="boolean"?"":l,t=t.hasOwnProperty("marginBottom")?t.marginBottom:t["margin-bottom"],e.marginBottom=t==null||typeof t=="boolean"?"":t)))}function ub(e,t,l){return l=l.ownerDocument.defaultView,{rect:e,abs:t.position==="absolute"||t.position==="fixed",clip:t.clipPath!=="none"||t.overflow!=="visible"||t.filter!=="none"||t.mask!=="none"||t.mask!=="none"||t.borderRadius!=="0px",view:0<=e.bottom&&0<=e.right&&e.top<=l.innerHeight&&e.left<=l.innerWidth}}function Ir(e){var t=e.getBoundingClientRect(),l=getComputedStyle(e);return ub(t,l,e)}function cb(e){return e.documentElement.clientHeight}function rb(e){this.addEventListener("load",e),this.addEventListener("error",e)}function ob(e,t,l,a,n,i,u,c,d){var b=t.nodeType===9?t:t.ownerDocument;try{var k=b.startViewTransition({update:function(){var x=b.defaultView,S=x.navigation&&x.navigation.transition,se=b.fonts.status;a();var ge=[];if(se==="loaded"&&(cb(b),b.fonts.status==="loading"&&ge.push(b.fonts.ready)),se=ge.length,e!==null)for(var _e=e.suspenseyImages,g=0,m=0;m<_e.length;m++){var z=_e[m];if(!z.complete){var A=z.getBoundingClientRect();if(0<A.bottom&&0<A.right&&A.top<x.innerHeight&&A.left<x.innerWidth){if(g+=zm(z),g>du){ge.length=se;break}z=new Promise(rb.bind(z)),ge.push(z)}}}if(0<ge.length)return x=Promise.race([Promise.all(ge),new Promise(function(he){return setTimeout(he,500)})]).then(n,n),(S?Promise.allSettled([S.finished,x]):x).then(i,i);if(n(),S)return S.finished.then(i,i);i()},types:l});b.__reactViewTransition=k;var _=[];return k.ready.then(function(){for(var x=b.documentElement.getAnimations({subtree:!0}),S=0;S<x.length;S++){var se=x[S],ge=se.effect,_e=ge.pseudoElement;if(_e!=null&&_e.startsWith("::view-transition")){_.push(se),se=ge.getKeyframes();for(var g=_e=void 0,m=!0,z=0;z<se.length;z++){var A=se[z],he=A.width;if(_e===void 0)_e=he;else if(_e!==he){m=!1;break}if(he=A.height,g===void 0)g=he;else if(g!==he){m=!1;break}delete A.width,delete A.height,A.transform==="none"&&delete A.transform}m&&_e!==void 0&&g!==void 0&&(ge.setKeyframes(se),m=getComputedStyle(ge.target,ge.pseudoElement),m.width!==_e||m.height!==g)&&(m=se[0],m.width=_e,m.height=g,m=se[se.length-1],m.width=_e,m.height=g,ge.setKeyframes(se))}}u()},function(x){b.__reactViewTransition===k&&(b.__reactViewTransition=null);try{if(typeof x=="object"&&x!==null)switch(x.name){case"InvalidStateError":(x.message==="View transition was skipped because document visibility state is hidden."||x.message==="Skipping view transition because document visibility state has become hidden."||x.message==="Skipping view transition because viewport size changed."||x.message==="Transition was aborted because of invalid state")&&(x=null)}x!==null&&d(x)}finally{a(),n(),u()}}),k.finished.finally(function(){for(var x=0;x<_.length;x++)_[x].cancel();b.__reactViewTransition===k&&(b.__reactViewTransition=null),c()}),k}catch{return a(),n(),u(),null}}function ln(e,t){this._scope=document.documentElement,this._selector="::view-transition-"+e+"("+t+")"}ln.prototype.animate=function(e,t){return t=typeof t=="number"?{duration:t}:ce({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},ln.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,l=e.getAnimations({subtree:!0}),a=[],n=0;n<l.length;n++){var i=l[n].effect;i!==null&&i.target===e&&i.pseudoElement===t&&a.push(l[n])}return a},ln.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function tm(e){return{name:e,group:new ln("group",e),imagePair:new ln("image-pair",e),old:new ln("old",e),new:new ln("new",e)}}function sl(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}sl.prototype.addEventListener=function(e,t,l){var a=null,n=null;if(!(l!=null&&typeof l!="boolean"&&(a=l.signal||null,a!==null&&a.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var i=this._eventListeners;if(am(i,e,t,l)===-1){var u=this,c=t;l!=null&&typeof l!="boolean"&&l.once===!0&&(c=function(d){u.removeEventListener(e,t,l),typeof t=="function"?t.call(this,d):t.handleEvent(d)}),a!==null&&(n=u.removeEventListener.bind(u,e,t,l),a.addEventListener("abort",n,{once:!0}),n=a.removeEventListener.bind(a,"abort",n)),a=Qn(l),i.push({type:e,listener:t,optionsOrUseCapture:l,attachedListener:c,cleanup:n}),y(this._fragmentFiber.child,!1,db,e,c,a)}this._eventListeners=i}};function db(e,t,l,a){return v(e).addEventListener(t,l,a),!1}sl.prototype.removeEventListener=function(e,t,l){var a=this._eventListeners;if(a!==null&&(t=am(a,e,t,l),t!==-1)){var n=a[t];l=n.attachedListener;var i=n.cleanup;n=Qn(n.optionsOrUseCapture),y(this._fragmentFiber.child,!1,fb,e,l,n),a.splice(t,1),i!==null&&i()}};function fb(e,t,l,a){return v(e).removeEventListener(t,l,a),!1}function Qn(e){return e!=null&&typeof e!="boolean"&&(e.once===!0||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function lm(e){return e==null?"c=0":typeof e=="boolean"?"c="+(e?"1":"0"):"c="+(e.capture?"1":"0")}function am(e,t,l,a){if(e.length===0)return-1;a=lm(a);for(var n=0;n<e.length;n++){var i=e[n];if(i.type===t&&i.listener===l&&lm(i.optionsOrUseCapture)===a)return n}return-1}sl.prototype.dispatchEvent=function(e){var t=$(this._fragmentFiber);if(t===null)return!0;t=v(t);var l=this._eventListeners;if(l!==null&&0<l.length||!e.bubbles){var a=t.nodeType===9?t.createComment(""):document.createTextNode("");if(l)for(var n=0;n<l.length;n++){var i=l[n];a.addEventListener(i.type,i.attachedListener,Qn(i.optionsOrUseCapture))}if(t.appendChild(a),e=a.dispatchEvent(e),l)for(n=0;n<l.length;n++)i=l[n],a.removeEventListener(i.type,i.attachedListener,Qn(i.optionsOrUseCapture));return t.removeChild(a),e}return t.dispatchEvent(e)},sl.prototype.focus=function(e){y(this._fragmentFiber.child,!0,nm,e,void 0,void 0)};function nm(e,t){return e.tag===6?!1:(e=v(e),jb(e,t))}sl.prototype.focusLast=function(e){var t=[];y(this._fragmentFiber.child,!0,Ur,t,void 0,void 0);for(var l=t.length-1;0<=l&&!nm(t[l],e);l--);};function Ur(e,t){return t.push(e),!1}sl.prototype.blur=function(){var e=$(this._fragmentFiber);e!==null&&(e=v(e),e=Ui(e).activeElement,e!==null&&y(this._fragmentFiber.child,!1,mb,e,void 0,void 0))};function mb(e,t){return e.tag===6?!1:(e=v(e),e===t||e.contains(t)?(t.blur(),!0):!1)}sl.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),y(this._fragmentFiber.child,!1,hb,e,void 0,void 0)};function hb(e,t){return e.tag===6||(e=v(e),t.observe(e)),!1}sl.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),y(this._fragmentFiber.child,!1,xb,e,void 0,void 0);for(var l=t=0;l<Nl.length;l++){var a=Nl[l];a.fragmentInstance===this&&a.observer===e?e.unobserve(a.instance):Nl[t++]=a}Nl.length=t}};function xb(e,t){return e.tag===6||(e=v(e),t.unobserve(e)),!1}var Nl=[],Hr=!1;function gb(e,t,l){Nl.push({fragmentInstance:e,observer:t,instance:l}),Hr||(Hr=!0,kb(function(){Hr=!1;var a=Nl;Nl=[];for(var n=0;n<a.length;n++){var i=a[n];i.observer.unobserve(i.instance)}}))}sl.prototype.getClientRects=function(){var e=[];return y(this._fragmentFiber.child,!1,bb,e,void 0,void 0),e};function bb(e,t){if(e.tag===6){e=e.stateNode;var l=e.ownerDocument.createRange();l.selectNodeContents(e),t.push.apply(t,l.getClientRects())}else e=v(e),t.push.apply(t,e.getClientRects());return!1}sl.prototype.getRootNode=function(e){var t=$(this._fragmentFiber);return t===null?this:v(t).getRootNode(e)},sl.prototype.compareDocumentPosition=function(e){var t=$(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var l=[];y(this._fragmentFiber.child,!1,Ur,l,void 0,void 0);var a=v(t);if(l.length===0){if(l=a,ne(this._fragmentFiber)){e:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break e}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(l=t)}t=this._fragmentFiber;var n=a=l.compareDocumentPosition(e);return l===e?n=Node.DOCUMENT_POSITION_CONTAINS:a&Node.DOCUMENT_POSITION_CONTAINED_BY&&(l=j(t)[1],l===null?n=Node.DOCUMENT_POSITION_PRECEDING:(e=v(l).compareDocumentPosition(e),n=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),n|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=v(l[0]),n=v(l[l.length-1]);var i=ne(this._fragmentFiber)?t.parentElement:a;if(i==null)return Node.DOCUMENT_POSITION_DISCONNECTED;a=i.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,i=i.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_CONTAINED_BY;var u=t.compareDocumentPosition(e),c=n.compareDocumentPosition(e),d=u&Node.DOCUMENT_POSITION_CONTAINED_BY||c&Node.DOCUMENT_POSITION_CONTAINED_BY;return c=a&&i&&u&Node.DOCUMENT_POSITION_FOLLOWING&&c&Node.DOCUMENT_POSITION_PRECEDING,t=a&&t===e||i&&n===e||d||c?Node.DOCUMENT_POSITION_CONTAINED_BY:!a&&t===e||!i&&n===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:u,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||yb(t,this._fragmentFiber,l[0],l[l.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function yb(e,t,l,a,n){var i=Ra(n);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(l=!!i)e:{for(;i!==null;){if(i.tag===7&&(i===t||i.alternate===t)){l=!0;break e}i=i.return}l=!1}return l}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(i===null)return i=n.ownerDocument,n===i||n===i.documentElement||n===i.body;e:{for(i=t,t=$(t);i!==null;){if(!(i.tag!==5&&i.tag!==3&&i.tag!==27||i!==t&&i.alternate!==t)){i=!0;break e}i=i.return}i=!1}return i}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!i)&&!(t=i===l)&&(t=Ee(l,i,Te),t===null?t=!1:(y(t,!0,te,i,l),i=Y,Y=null,t=i!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!i)&&!(t=i===a)&&(t=Ee(a,i,Te),t===null?t=!1:(y(t,!0,xe,i,a),i=Y,w=Y=null,t=i!==null)),t):!1}function im(e,t){var l=e.ownerDocument.createRange();l.selectNodeContents(e),e=l.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}sl.prototype.scrollIntoView=function(e){if(typeof e=="object")throw Error(r(566));var t=[];y(this._fragmentFiber.child,!1,Ur,t,void 0,void 0);var l=e!==!1;if(t.length===0){var a=j(this._fragmentFiber);if(a=l?a[1]||a[0]||$(this._fragmentFiber):a[0]||a[1],a===null)return;if(a.tag===6){e=v(a),im(e,l);return}if(a=v(a),a.nodeType!==9){if(a.nodeType===11){l="host"in a?a.host:null,l!==null&&l.scrollIntoView(e);return}a.scrollIntoView(e)}}for(a=l?t.length-1:0;a!==(l?-1:t.length);){var n=t[a];n.tag===6?(n=v(n),im(n,l)):v(n).scrollIntoView(e),a+=l?-1:1}};function vb(e,t){return e=v(e),sm(e,t),!1}function sm(e,t){e.reactFragments==null&&(e.reactFragments=new Set),e.reactFragments.add(t)}function um(e,t){var l=t._eventListeners;if(l!==null)for(var a=0;a<l.length;a++){var n=l[a];e.addEventListener(n.type,n.attachedListener,Qn(n.optionsOrUseCapture))}e.nodeType!==3&&(l=t._observers,l!==null&&l.forEach(function(i){for(var u=0,c=0;c<Nl.length;c++){var d=Nl[c];(d.fragmentInstance!==t||d.observer!==i||d.instance!==e)&&(Nl[u++]=d)}Nl.length=u,i.observe(e)}),sm(e,t))}function pb(e,t){var l=t._eventListeners;if(l!==null)for(var a=0;a<l.length;a++){var n=l[a];e.removeEventListener(n.type,n.attachedListener,Qn(n.optionsOrUseCapture))}e.nodeType!==3&&(l=t._observers,l!==null&&l.forEach(function(i){typeof i.rootMargin=="string"?gb(t,i,e):i.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function Br(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var l=t;switch(t=t.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":Br(l),Pi(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function zb(e,t,l,a){for(;e.nodeType===1;){var n=l;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[li])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!==n.rel||e.getAttribute("href")!==(n.href==null||n.href===""?null:n.href)||e.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin)||e.getAttribute("title")!==(n.title==null?null:n.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(i=e.getAttribute("src"),(i!==(n.src==null?null:n.src)||e.getAttribute("type")!==(n.type==null?null:n.type)||e.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var i=n.name==null?null:""+n.name;if(n.type==="hidden"&&e.getAttribute("name")===i)return e}else return e;if(e=gl(e.nextSibling),e===null)break}return null}function Sb(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=gl(e.nextSibling),e===null))return null;return e}function cm(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=gl(e.nextSibling),e===null))return null;return e}function Yr(e){return e.data==="$?"||e.data==="$~"}function Gr(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Nb(e,t){var l=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||l.readyState!=="loading")t();else{var a=function(){t(),l.removeEventListener("DOMContentLoaded",a)};l.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function gl(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 Zr=null;function rm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return gl(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function om(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(t===0)return e;t--}else l!=="/$"&&l!=="/&"||t++}e=e.previousSibling}return null}function jb(e,t){function l(){a=!0}if(e.ownerDocument.activeElement===e)return!0;var a=!1;try{e.ownerDocument.addEventListener("focus",l,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener("focus",l,!0)}return a}function kb(e){$f(function(){$f(function(t){return e(t)})})}function dm(e,t,l){switch(t=Ui(l),e){case"html":if(e=t.documentElement,!e)throw Error(r(452));return e;case"head":if(e=t.head,!e)throw Error(r(453));return e;case"body":if(e=t.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function fm(e,t,l){for(var a in l){var n=l[a];l.hasOwnProperty(a)&&n!=null&&Pe(e,t,a,null,eb,n)}l.dangerouslySetInnerHTML!=null&&(e.textContent=""),e.onclick===kl&&(e.onclick=null),Pi(e)}function qr(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Pi(e)}var bl=new Map,mm=new Set;function Hi(e){if(typeof e.getRootNode=="function"){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var ea=ue.d;ue.d={f:Tb,r:Eb,D:Mb,C:wb,L:Cb,m:Db,X:_b,S:Ab,M:Ob};function Tb(){var e=ea.f(),t=lu();return e||t}function Eb(e){var t=on(e);t!==null&&t.tag===5&&t.type==="form"?hd(t):ea.r(e)}var Vn=typeof document>"u"?null:document;function hm(e,t,l){var a=Vn;if(a&&typeof t=="string"&&t){var n=rl(t);n='link[rel="'+e+'"][href="'+n+'"]',typeof l=="string"&&(n+='[crossorigin="'+l+'"]'),mm.has(n)||(mm.add(n),e={rel:e,crossOrigin:l,href:t},a.querySelector(n)===null&&(t=a.createElement("link"),Rt(t,"link",e),Nt(t),a.head.appendChild(t)))}}function Mb(e){ea.D(e),hm("dns-prefetch",e,null)}function wb(e,t){ea.C(e,t),hm("preconnect",e,t)}function Cb(e,t,l){ea.L(e,t,l);var a=Vn;if(a&&e&&t){var n='link[rel="preload"][as="'+rl(t)+'"]';t==="image"&&l&&l.imageSrcSet?(n+='[imagesrcset="'+rl(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(n+='[imagesizes="'+rl(l.imageSizes)+'"]')):n+='[href="'+rl(e)+'"]';var i=n;switch(t){case"style":i=Xn(e);break;case"script":i=Kn(e)}if(!(bl.has(i)||(e=ce({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),bl.set(i,e),a.querySelector(n)!==null||t==="style"&&a.querySelector(Bi(i))||t==="script"&&a.querySelector(Yi(i))))){var u=a.createElement("link");Rt(u,"link",e),t==="style"&&(u[Fi]=!0,u.onload=u.onerror=function(){To(u)}),Nt(u),a.head.appendChild(u)}}}function Db(e,t){ea.m(e,t);var l=Vn;if(l&&e){var a=t&&typeof t.as=="string"?t.as:"script",n='link[rel="modulepreload"][as="'+rl(a)+'"][href="'+rl(e)+'"]',i=n;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=Kn(e)}if(!bl.has(i)&&(e=ce({rel:"modulepreload",href:e},t),bl.set(i,e),l.querySelector(n)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Yi(i)))return}a=l.createElement("link"),Rt(a,"link",e),Nt(a),l.head.appendChild(a)}}}function Ab(e,t,l){ea.S(e,t,l);var a=Vn;if(a&&e){var n=dn(a).hoistableStyles,i=Xn(e);t=t||"default";var u=n.get(i);if(!u){var c={loading:0,preload:null};if(u=a.querySelector(Bi(i)))c.loading=5;else{e=ce({rel:"stylesheet",href:e,"data-precedence":t},l),(l=bl.get(i))&&Qr(e,l);var d=u=a.createElement("link");Nt(d),Rt(d,"link",e),d._p=new Promise(function(b,k){d.onload=b,d.onerror=k}),d.addEventListener("load",function(){c.loading|=1}),d.addEventListener("error",function(){c.loading|=2}),c.loading|=4,ru(u,t,a)}u={type:"stylesheet",instance:u,count:1,state:c},n.set(i,u)}}}function _b(e,t){ea.X(e,t);var l=Vn;if(l&&e){var a=dn(l).hoistableScripts,n=Kn(e),i=a.get(n);i||(i=l.querySelector(Yi(n)),i||(e=ce({src:e,async:!0},t),(t=bl.get(n))&&Vr(e,t),i=l.createElement("script"),Nt(i),Rt(i,"link",e),l.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(n,i))}}function Ob(e,t){ea.M(e,t);var l=Vn;if(l&&e){var a=dn(l).hoistableScripts,n=Kn(e),i=a.get(n);i||(i=l.querySelector(Yi(n)),i||(e=ce({src:e,async:!0,type:"module"},t),(t=bl.get(n))&&Vr(e,t),i=l.createElement("script"),Nt(i),Rt(i,"link",e),l.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(n,i))}}function xm(e,t,l,a){var n=(n=St.current)?Hi(n):null;if(!n)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(l=Xn(l.href),t=dn(n).hoistableStyles,a=t.get(l),a||(a={type:"style",instance:null,count:0,state:null},t.set(l,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=Xn(l.href);var i=dn(n).hoistableStyles,u=i.get(e);if(u||(n=n.ownerDocument||n,u={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,u),(i=n.querySelector(Bi(e)))?i._p||(u.instance=i,u.state.loading=5):(i=bl.get(e),i||(i={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},bl.set(e,i)),Rb(n,e,i,u.state))),t&&a===null)throw Error(r(528,""));return u}if(t&&a!==null)throw Error(r(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(l=Kn(l),t=dn(n).hoistableScripts,a=t.get(l),a||(a={type:"script",instance:null,count:0,state:null},t.set(l,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function Xn(e){return'href="'+rl(e)+'"'}function Bi(e){return'link[rel="stylesheet"]['+e+"]"}function gm(e){return ce({},e,{"data-precedence":e.precedence,precedence:null})}function Rb(e,t,l,a){if(t=e.querySelector('link[rel="preload"][as="style"]['+t+"]")){if(t[Fi]!==!0){a.loading=1;return}}else t=e.createElement("link"),t[Fi]=!0,t.onload=t.onerror=To.bind(null,t),Rt(t,"link",l),Nt(t),e.head.appendChild(t);a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2})}function Kn(e){return'[src="'+rl(e)+'"]'}function Yi(e){return"script[async]"+e}function bm(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+rl(l.href)+'"]');if(a)return t.instance=a,Nt(a),a;var n=ce({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),Nt(a),Rt(a,"style",n),ru(a,l.precedence,e),t.instance=a;case"stylesheet":n=Xn(l.href);var i=e.querySelector(Bi(n));if(i)return t.state.loading|=4,t.instance=i,Nt(i),i;a=gm(l),(n=bl.get(n))&&Qr(a,n),i=(e.ownerDocument||e).createElement("link"),Nt(i);var u=i;return u._p=new Promise(function(c,d){u.onload=c,u.onerror=d}),Rt(i,"link",a),t.state.loading|=4,ru(i,l.precedence,e),t.instance=i;case"script":return i=Kn(l.src),(n=e.querySelector(Yi(i)))?(t.instance=n,Nt(n),n):(a=l,(n=bl.get(i))&&(a=ce({},l),Vr(a,n)),e=e.ownerDocument||e,n=e.createElement("script"),Nt(n),Rt(n,"link",a),e.head.appendChild(n),t.instance=n);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,ru(a,l.precedence,e));return t.instance}function ru(e,t,l){for(var a=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),n=a.length?a[a.length-1]:null,i=n,u=0;u<a.length;u++){var c=a[u];if(c.dataset.precedence===t)i=c;else if(i!==n)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=l.nodeType===9?l.head:l,t.insertBefore(e,t.firstChild))}function Qr(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Vr(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var ou=null;function ym(e,t,l){if(ou===null){var a=new Map,n=ou=new Map;n.set(l,a)}else n=ou,a=n.get(l),a||(a=new Map,n.set(l,a));if(a.has(e))return a;for(a.set(e,null),l=l.getElementsByTagName(e),n=0;n<l.length;n++){var i=l[n];if(!(i[li]||i[Ct]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var u=i.getAttribute(t)||"";u=e+u;var c=a.get(u);c?c.push(i):a.set(u,[i])}}return a}function Xr(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function Lb(e,t,l){if(l===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;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!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 vm(e,t){return e==="img"&&t.src!=null&&t.src!==""&&t.onLoad==null&&t.loading!=="lazy"}function pm(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function zm(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function Sm(e,t){typeof t.decode=="function"&&(e.imgCount++,t.complete||(e.imgBytes+=zm(t),e.suspenseyImages.push(t)),e=Hb.bind(e),t.decode().then(e,e))}function Ib(e,t,l,a){if(l.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var n=Xn(a.href),i=t.querySelector(Bi(n));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Gi.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=i,Nt(i);return}i=t.ownerDocument||t,a=gm(a),(n=bl.get(n))&&Qr(a,n),i=i.createElement("link"),Nt(i);var u=i;u._p=new Promise(function(c,d){u.onload=c,u.onerror=d}),Rt(i,"link",a),l.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=Gi.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var du=0;function Ub(e,t){return e.stylesheets&&e.count===0&&mu(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var a=setTimeout(function(){if(e.stylesheets&&mu(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&du===0&&(du=62500*lb());var n=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&mu(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>du?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(n)}}:null}function Nm(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)mu(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function Gi(){this.count--,Nm(this)}function Hb(){this.imgCount--,Nm(this)}var fu=null;function mu(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,fu=new Map,t.forEach(Bb,e),fu=null,Gi.call(e))}function Bb(e,t){if(!(t.state.loading&4)){var l=fu.get(e);if(l)var a=l.get(null);else{l=new Map,fu.set(e,l);for(var n=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<n.length;i++){var u=n[i];(u.nodeName==="LINK"||u.getAttribute("media")!=="not all")&&(l.set(u.dataset.precedence,u),a=u)}a&&l.set(null,a)}n=t.instance,u=n.getAttribute("data-precedence"),i=l.get(u)||a,i===a&&l.set(null,n),l.set(u,n),this.count++,a=Gi.bind(this),n.addEventListener("load",a),n.addEventListener("error",a),i?i.parentNode.insertBefore(n,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(n,e.firstChild)),t.state.loading|=4}}var Jn={$$typeof:re,Provider:null,Consumer:null,_currentValue:we,_currentValue2:we,_threadCount:0};function Yb(e,t,l,a,n,i,u,c,d){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=_a(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=_a(0),this.hiddenUpdates=_a(null),this.identifierPrefix=a,this.onUncaughtError=n,this.onCaughtError=i,this.onRecoverableError=u,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=d,this.transitionTypes=null,this.incompleteTransitions=new Map}function jm(e,t,l,a,n,i,u,c,d,b,k,_){return e=new Yb(e,t,l,u,d,b,k,_,c),t=1,i===!0&&(t|=24),i=Xt(3,null,null,t),e.current=i,i.stateNode=e,t=cc(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:a,isDehydrated:l,cache:t},fc(i),e}function km(e){return e?(e=zn,e):zn}function Tm(e,t,l,a,n,i){n=km(n),a.context===null?a.context=n:a.pendingContext=n,a=ma(t),a.payload={element:l},i=i===void 0?null:i,i!==null&&(a.callback=i),l=ha(e,a,t),l!==null&&(Wt(l,e,t),vi(l,e,t))}function Em(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function Kr(e,t){Em(e,t),(e=e.alternate)&&Em(e,t)}function Mm(e){if(e.tag===13||e.tag===31){var t=Ha(e,67108864);t!==null&&Wt(t,e,67108864),Kr(e,67108864)}}function wm(e){if(e.tag===13||e.tag===31){var t=il();t=Mu(t);var l=Ha(e,t);l!==null&&Wt(l,e,t),Kr(e,t)}}var $n=!0;function Gb(e,t,l,a){var n=K.T;K.T=null;var i=ue.p;try{ue.p=2,Jr(e,t,l,a)}finally{ue.p=i,K.T=n}}function Zb(e,t,l,a){var n=K.T;K.T=null;var i=ue.p;try{ue.p=8,Jr(e,t,l,a)}finally{ue.p=i,K.T=n}}function Jr(e,t,l,a){if($n){var n=$r(a);if(n===null)Cr(e,t,a,hu,l),Dm(e,a);else if(Qb(n,e,t,l,a))a.stopPropagation();else if(Dm(e,a),t&4&&-1<qb.indexOf(e)){for(;n!==null;){var i=on(n);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var u=Hl(i.pendingLanes);if(u!==0){var c=i;for(c.pendingLanes|=2,c.entangledLanes|=2;u;){var d=1<<31-lt(u);c.entanglements[1]|=d,u&=~d}Rl(i),(Ke&6)===0&&(Ps=Mt()+500,Ri(0))}}break;case 31:case 13:c=Ha(i,2),c!==null&&Wt(c,i,2),lu(),Kr(i,2)}if(i=$r(a),i===null&&Cr(e,t,a,hu,l),i===n)break;n=i}n!==null&&a.stopPropagation()}else Cr(e,t,a,null,l)}}function $r(e){return e=Ru(e),Wr(e)}var hu=null;function Wr(e){if(hu=null,e=Ra(e),e!==null){var t=I(e);if(t===null)e=null;else{var l=t.tag;if(l===13){if(e=ee(t),e!==null)return e;e=null}else if(l===31){if(e=B(t),e!==null)return e;e=null}else if(l===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return hu=e,null}function Cm(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"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"fullscreenerror":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"resize":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(la()){case de:return 2;case cn:return 8;case Da:case Eu:return 32;case $i:return 268435456;default:return 32}default:return 32}}var Fr=!1,Ta=null,Ea=null,Ma=null,Zi=new Map,qi=new Map,wa=[],qb="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 Dm(e,t){switch(e){case"focusin":case"focusout":Ta=null;break;case"dragenter":case"dragleave":Ea=null;break;case"mouseover":case"mouseout":Ma=null;break;case"pointerover":case"pointerout":Zi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":qi.delete(t.pointerId)}}function Qi(e,t,l,a,n,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:l,eventSystemFlags:a,nativeEvent:i,targetContainers:[n]},t!==null&&(t=on(t),t!==null&&Mm(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,n!==null&&t.indexOf(n)===-1&&t.push(n),e)}function Qb(e,t,l,a,n){switch(t){case"focusin":return Ta=Qi(Ta,e,t,l,a,n),!0;case"dragenter":return Ea=Qi(Ea,e,t,l,a,n),!0;case"mouseover":return Ma=Qi(Ma,e,t,l,a,n),!0;case"pointerover":var i=n.pointerId;return Zi.set(i,Qi(Zi.get(i)||null,e,t,l,a,n)),!0;case"gotpointercapture":return i=n.pointerId,qi.set(i,Qi(qi.get(i)||null,e,t,l,a,n)),!0}return!1}function Am(e){var t=Ra(e.target);if(t!==null){var l=I(t);if(l!==null){if(t=l.tag,t===13){if(t=ee(l),t!==null){e.blockedOn=t,No(e.priority,function(){wm(l)});return}}else if(t===31){if(t=B(l),t!==null){e.blockedOn=t,No(e.priority,function(){wm(l)});return}}else if(t===3&&l.stateNode.current.memoizedState.isDehydrated){e.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}e.blockedOn=null}function xu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=$r(e.nativeEvent);if(l===null){l=e.nativeEvent;var a=new l.constructor(l.type,l);Ou=a,l.target.dispatchEvent(a),Ou=null}else return t=on(l),t!==null&&Mm(t),e.blockedOn=l,!1;t.shift()}return!0}function _m(e,t,l){xu(e)&&l.delete(t)}function Vb(){Fr=!1,Ta!==null&&xu(Ta)&&(Ta=null),Ea!==null&&xu(Ea)&&(Ea=null),Ma!==null&&xu(Ma)&&(Ma=null),Zi.forEach(_m),qi.forEach(_m)}function gu(e,t){e.blockedOn===t&&(e.blockedOn=null,Fr||(Fr=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,Vb)))}var bu=null;function Om(e){bu!==e&&(bu=e,o.unstable_scheduleCallback(o.unstable_NormalPriority,function(){bu===e&&(bu=null);for(var t=0;t<e.length;t+=3){var l=e[t],a=e[t+1],n=e[t+2];if(typeof a!="function"){if(Wr(a||l)===null)continue;break}var i=on(l);i!==null&&(e.splice(t,3),t-=3,_c(i,{pending:!0,data:n,method:l.method,action:a},a,n))}}))}function Wn(e){function t(d){return gu(d,e)}Ta!==null&&gu(Ta,e),Ea!==null&&gu(Ea,e),Ma!==null&&gu(Ma,e),Zi.forEach(t),qi.forEach(t);for(var l=0;l<wa.length;l++){var a=wa[l];a.blockedOn===e&&(a.blockedOn=null)}for(;0<wa.length&&(l=wa[0],l.blockedOn===null);)Am(l),l.blockedOn===null&&wa.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(a=0;a<l.length;a+=3){var n=l[a],i=l[a+1],u=n[Vt]||null;if(typeof i=="function")u||Om(l);else if(u){var c=null;if(i&&i.hasAttribute("formAction")){if(n=i,u=i[Vt]||null)c=u.formAction;else if(Wr(n)!==null)continue}else c=u.action;typeof c=="function"?l[a+1]=c:(l.splice(a,3),a-=3),Om(l)}}}function Rm(){function e(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(u){return n=u})},focusReset:"manual",scroll:"manual"})}function t(){n!==null&&(n(),n=null),a||setTimeout(l,20)}function l(){if(!a&&!navigation.transition){var i=navigation.currentEntry;i&&i.url!=null&&navigation.navigate(i.url,{state:i.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,n=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(l,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),n!==null&&(n(),n=null)}}}function Pr(e){this._internalRoot=e}yu.prototype.render=Pr.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var l=t.current,a=il();Tm(l,a,e,t,null,null)},yu.prototype.unmount=Pr.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Tm(e.current,2,null,e,null,null),lu(),t[rn]=null}};function yu(e){this._internalRoot=e}yu.prototype.unstable_scheduleHydration=function(e){if(e){var t=So();e={blockedOn:null,target:e,priority:t};for(var l=0;l<wa.length&&t!==0&&t<wa[l].priority;l++);wa.splice(l,0,e),l===0&&Am(e)}};var Lm=h.version;if(Lm!=="19.3.0")throw Error(r(527,Lm,"19.3.0"));ue.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=le(t),e=e!==null?q(e):null,e=e===null?null:e.stateNode,e};var Xb={bundleType:0,version:"19.3.0",rendererPackageName:"react-dom",currentDispatcherRef:K,reconcilerVersion:"19.3.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var vu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!vu.isDisabled&&vu.supportsFiber)try{V=vu.inject(Xb),ye=vu}catch{}}return Xi.createRoot=function(e,t){if(!R(e))throw Error(r(299));var l=!1,a="",n=jd,i=kd,u=Td;return t!=null&&(t.unstable_strictMode===!0&&(l=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(n=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(u=t.onRecoverableError)),t=jm(e,1,!1,null,null,l,a,null,n,i,u,Rm),e[rn]=t.current,wr(e),new Pr(t)},Xi.hydrateRoot=function(e,t,l){if(!R(e))throw Error(r(299));var a=!1,n="",i=jd,u=kd,c=Td,d=null;return l!=null&&(l.unstable_strictMode===!0&&(a=!0),l.identifierPrefix!==void 0&&(n=l.identifierPrefix),l.onUncaughtError!==void 0&&(i=l.onUncaughtError),l.onCaughtError!==void 0&&(u=l.onCaughtError),l.onRecoverableError!==void 0&&(c=l.onRecoverableError),l.formState!==void 0&&(d=l.formState)),t=jm(e,1,!0,t,l??null,a,n,d,i,u,c,Rm),t.context=km(null),l=t.current,a=il(),a=Mu(a),n=ma(a),n.callback=null,ha(l,n,a),l=a,t.current.lanes=l,Oa(t,l),Rl(t),e[rn]=t.current,wr(e),new yu(t)},Xi.version="19.3.0",Xi}var Vm;function l1(){if(Vm)return lo.exports;Vm=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(h){console.error(h)}}return o(),lo.exports=t1(),lo.exports}var a1=l1();const n1=Pm(a1);/**
|
|
50
|
+
* @license lucide-react v1.47.0 - ISC
|
|
51
|
+
*
|
|
52
|
+
* This source code is licensed under the ISC license.
|
|
53
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
54
|
+
*/const i1=o=>o==null?void 0:o.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
55
|
+
* @license lucide-react v1.47.0 - ISC
|
|
56
|
+
*
|
|
57
|
+
* This source code is licensed under the ISC license.
|
|
58
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
59
|
+
*/function s1(o,h,U=[]){if(h==null)throw new Error("[lucide]: iconNode is required when icon name is used");return{name:i1(o),size:24,node:h,...U.length>0?{aliases:U}:{}}}/**
|
|
60
|
+
* @license lucide-react v1.47.0 - ISC
|
|
61
|
+
*
|
|
62
|
+
* This source code is licensed under the ISC license.
|
|
63
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
64
|
+
*/const u1=o=>{let h="",U=!1;for(const r of o){if(r==="-"||r==="_"||r<=" "){U=h.length>0;continue}h.length===0?h+=r.toLowerCase():h+=U?r.toUpperCase():r,U=!1}return h};/**
|
|
65
|
+
* @license lucide-react v1.47.0 - ISC
|
|
66
|
+
*
|
|
67
|
+
* This source code is licensed under the ISC license.
|
|
68
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
69
|
+
*/const c1=o=>{const h=u1(o);return h.charAt(0).toUpperCase()+h.slice(1)};/**
|
|
70
|
+
* @license lucide-react v1.47.0 - ISC
|
|
71
|
+
*
|
|
72
|
+
* This source code is licensed under the ISC license.
|
|
73
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
74
|
+
*/const co=(...o)=>o.filter((h,U,r)=>!!h&&h.trim()!==""&&r.indexOf(h)===U).join(" ").trim();/**
|
|
75
|
+
* @license lucide-react v1.47.0 - ISC
|
|
76
|
+
*
|
|
77
|
+
* This source code is licensed under the ISC license.
|
|
78
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
79
|
+
*/const an={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};/**
|
|
80
|
+
* @license lucide-react v1.47.0 - ISC
|
|
81
|
+
*
|
|
82
|
+
* This source code is licensed under the ISC license.
|
|
83
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
84
|
+
*/function so(o){return o!=null}function r1(o,h={}){var $,ne;const U=h.attributeNames??{},r=j=>U[j]??j,R=o.size??o.width??an.width,I=o.size??o.height??an.height,ee=(($=o.aliases)==null?void 0:$.filter(j=>typeof j=="string"&&j.trim()!=="").map(j=>`lucide-${j}`))??[],B=[...o.name?[`lucide-${o.name}`]:[],...ee],P=((ne=h.className)==null?void 0:ne.split(" ").filter(Boolean))??[],le=h.includeDefaultClasses===!1?co(...P):co("lucide",...B,...P),q=h.absoluteStrokeWidth?Number(h.strokeWidth??an["stroke-width"])*Number(o.size??o.width??an.width)/Number(h.size??h.width??an.width):h.strokeWidth??an["stroke-width"];return["svg",{...Object.entries(an).reduce((j,[C,v])=>(j[r(C)]=v,j),{}),..."color"in h&&h.color&&{[r("stroke")]:h.color},..."size"in h&&so(h.size)&&{[r("width")]:h.size,[r("height")]:h.size},..."width"in h&&so(h.width)&&{[r("width")]:h.width},..."height"in h&&so(h.height)&&{[r("height")]:h.height},[r("stroke-width")]:q,...le&&{[r("class")]:le},[r("viewBox")]:`0 0 ${R} ${I}`,...h.hasA11yProp===!1?{[r("aria-hidden")]:"true"}:{},..."attributes"in h&&h.attributes},o.node.map(j=>{const[C,v,Y]=j,w=h.nonScalingStroke?{[r("vector-effect")]:"non-scaling-stroke",...v}:v;return Y?[C,w,Y]:[C,w]})]}/**
|
|
85
|
+
* @license lucide-react v1.47.0 - ISC
|
|
86
|
+
*
|
|
87
|
+
* This source code is licensed under the ISC license.
|
|
88
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
89
|
+
*/function o1(o,h={}){return r1(o,{...h,attributeNames:{...h.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}/**
|
|
90
|
+
* @license lucide-react v1.47.0 - ISC
|
|
91
|
+
*
|
|
92
|
+
* This source code is licensed under the ISC license.
|
|
93
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
94
|
+
*/const d1=o=>{for(const h in o)if(h.startsWith("aria-")||h==="role"||h==="title")return!0;return!1},f1=p.createContext({}),m1=()=>p.useContext(f1),h1=p.forwardRef(({color:o,size:h,width:U,height:r,strokeWidth:R,absoluteStrokeWidth:I,nonScalingStroke:ee,className:B="",children:P,iconNode:le=[],icon:q={node:le,aliases:[],size:24},...y},$)=>{const{size:ne=24,strokeWidth:j=2,absoluteStrokeWidth:C=!1,nonScalingStroke:v=!1,color:Y="currentColor",className:w=""}=m1()??{},te=!!P||d1(y),[xe,Te,Ee=[]]=o1(q,{color:o??Y,width:U??h??ne,height:r??h??ne,strokeWidth:R??j,absoluteStrokeWidth:I??C,nonScalingStroke:ee??v,className:co(w,B),hasA11yProp:te,attributes:y});return p.createElement(xe,{ref:$,...Te},[...Ee.map(([ce,fe])=>p.createElement(ce,fe)),...Array.isArray(P)?P:[P]])});/**
|
|
95
|
+
* @license lucide-react v1.47.0 - ISC
|
|
96
|
+
*
|
|
97
|
+
* This source code is licensed under the ISC license.
|
|
98
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
99
|
+
*/function Se(o,h=[],U=[]){const r=typeof o=="string"?s1(o,h,U):o,R=p.forwardRef(({className:I,...ee},B)=>p.createElement(h1,{ref:B,icon:r,className:I,...ee}));return r.name&&(R.displayName=c1(r.name)),R}/**
|
|
100
|
+
* @license lucide-react v1.47.0 - ISC
|
|
101
|
+
*
|
|
102
|
+
* This source code is licensed under the ISC license.
|
|
103
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
104
|
+
*/const th={name:"arrow-down",size:24,node:[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]};th.node;const x1=Se(th);/**
|
|
105
|
+
* @license lucide-react v1.47.0 - ISC
|
|
106
|
+
*
|
|
107
|
+
* This source code is licensed under the ISC license.
|
|
108
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
109
|
+
*/const lh={name:"arrow-up-down",size:24,node:[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]};lh.node;const g1=Se(lh);/**
|
|
110
|
+
* @license lucide-react v1.47.0 - ISC
|
|
111
|
+
*
|
|
112
|
+
* This source code is licensed under the ISC license.
|
|
113
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
114
|
+
*/const ah={name:"arrow-up",size:24,node:[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]};ah.node;const b1=Se(ah);/**
|
|
115
|
+
* @license lucide-react v1.47.0 - ISC
|
|
116
|
+
*
|
|
117
|
+
* This source code is licensed under the ISC license.
|
|
118
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
119
|
+
*/const nh={name:"braces",size:24,node:[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]],aliases:["curly-braces"]};nh.node;const y1=Se(nh);/**
|
|
120
|
+
* @license lucide-react v1.47.0 - ISC
|
|
121
|
+
*
|
|
122
|
+
* This source code is licensed under the ISC license.
|
|
123
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
124
|
+
*/const ih={name:"calendar",size:24,node:[["path",{d:"M8 2v3",key:"1ioesn"}],["path",{d:"M16 2v3",key:"otl347"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}],["path",{d:"M3 9h18",key:"1pudct"}]]};ih.node;const v1=Se(ih);/**
|
|
125
|
+
* @license lucide-react v1.47.0 - ISC
|
|
126
|
+
*
|
|
127
|
+
* This source code is licensed under the ISC license.
|
|
128
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
129
|
+
*/const sh={name:"check",size:24,node:[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]};sh.node;const Pn=Se(sh);/**
|
|
130
|
+
* @license lucide-react v1.47.0 - ISC
|
|
131
|
+
*
|
|
132
|
+
* This source code is licensed under the ISC license.
|
|
133
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
134
|
+
*/const uh={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};uh.node;const ch=Se(uh);/**
|
|
135
|
+
* @license lucide-react v1.47.0 - ISC
|
|
136
|
+
*
|
|
137
|
+
* This source code is licensed under the ISC license.
|
|
138
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
139
|
+
*/const rh={name:"chevron-left",size:24,node:[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]};rh.node;const p1=Se(rh);/**
|
|
140
|
+
* @license lucide-react v1.47.0 - ISC
|
|
141
|
+
*
|
|
142
|
+
* This source code is licensed under the ISC license.
|
|
143
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
144
|
+
*/const oh={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};oh.node;const z1=Se(oh);/**
|
|
145
|
+
* @license lucide-react v1.47.0 - ISC
|
|
146
|
+
*
|
|
147
|
+
* This source code is licensed under the ISC license.
|
|
148
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
149
|
+
*/const dh={name:"chevron-up",size:24,node:[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]};dh.node;const S1=Se(dh);/**
|
|
150
|
+
* @license lucide-react v1.47.0 - ISC
|
|
151
|
+
*
|
|
152
|
+
* This source code is licensed under the ISC license.
|
|
153
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
154
|
+
*/const fh={name:"circle-alert",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],aliases:["alert-circle"]};fh.node;const Su=Se(fh);/**
|
|
155
|
+
* @license lucide-react v1.47.0 - ISC
|
|
156
|
+
*
|
|
157
|
+
* This source code is licensed under the ISC license.
|
|
158
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
159
|
+
*/const mh={name:"circle-check",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 9-5.5 5.5L8 12",key:"xofnsj"}]],aliases:["check-circle-2"]};mh.node;const Xm=Se(mh);/**
|
|
160
|
+
* @license lucide-react v1.47.0 - ISC
|
|
161
|
+
*
|
|
162
|
+
* This source code is licensed under the ISC license.
|
|
163
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
164
|
+
*/const hh={name:"circle-plus",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]],aliases:["plus-circle"]};hh.node;const N1=Se(hh);/**
|
|
165
|
+
* @license lucide-react v1.47.0 - ISC
|
|
166
|
+
*
|
|
167
|
+
* This source code is licensed under the ISC license.
|
|
168
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
169
|
+
*/const xh={name:"clock",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]};xh.node;const j1=Se(xh);/**
|
|
170
|
+
* @license lucide-react v1.47.0 - ISC
|
|
171
|
+
*
|
|
172
|
+
* This source code is licensed under the ISC license.
|
|
173
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
174
|
+
*/const gh={name:"code",size:24,node:[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]};gh.node;const k1=Se(gh);/**
|
|
175
|
+
* @license lucide-react v1.47.0 - ISC
|
|
176
|
+
*
|
|
177
|
+
* This source code is licensed under the ISC license.
|
|
178
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
179
|
+
*/const bh={name:"columns-2",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M12 3v18",key:"108xh3"}]],aliases:["columns"]};bh.node;const Km=Se(bh);/**
|
|
180
|
+
* @license lucide-react v1.47.0 - ISC
|
|
181
|
+
*
|
|
182
|
+
* This source code is licensed under the ISC license.
|
|
183
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
184
|
+
*/const yh={name:"copy",size:24,node:[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]};yh.node;const vh=Se(yh);/**
|
|
185
|
+
* @license lucide-react v1.47.0 - ISC
|
|
186
|
+
*
|
|
187
|
+
* This source code is licensed under the ISC license.
|
|
188
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
189
|
+
*/const ph={name:"database",size:24,node:[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]};ph.node;const oo=Se(ph);/**
|
|
190
|
+
* @license lucide-react v1.47.0 - ISC
|
|
191
|
+
*
|
|
192
|
+
* This source code is licensed under the ISC license.
|
|
193
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
194
|
+
*/const zh={name:"download",size:24,node:[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]};zh.node;const T1=Se(zh);/**
|
|
195
|
+
* @license lucide-react v1.47.0 - ISC
|
|
196
|
+
*
|
|
197
|
+
* This source code is licensed under the ISC license.
|
|
198
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
199
|
+
*/const Sh={name:"external-link",size:24,node:[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]};Sh.node;const E1=Se(Sh);/**
|
|
200
|
+
* @license lucide-react v1.47.0 - ISC
|
|
201
|
+
*
|
|
202
|
+
* This source code is licensed under the ISC license.
|
|
203
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
204
|
+
*/const Nh={name:"funnel",size:24,node:[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],aliases:["filter"]};Nh.node;const zu=Se(Nh);/**
|
|
205
|
+
* @license lucide-react v1.47.0 - ISC
|
|
206
|
+
*
|
|
207
|
+
* This source code is licensed under the ISC license.
|
|
208
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
209
|
+
*/const jh={name:"hash",size:24,node:[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]};jh.node;const M1=Se(jh);/**
|
|
210
|
+
* @license lucide-react v1.47.0 - ISC
|
|
211
|
+
*
|
|
212
|
+
* This source code is licensed under the ISC license.
|
|
213
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
214
|
+
*/const kh={name:"key",size:24,node:[["path",{d:"m2 21 9.6-9.6",key:"9l79m3"}],["path",{d:"m7.5 15.5 2.3 2.3a1 1 0 0 1 0 1.4l-2.1 2.1a1 1 0 0 1-1.4 0L4 19",key:"fw8biw"}],["circle",{cx:"15.5",cy:"7.5",r:"5.5",key:"4wxmhb"}]]};kh.node;const fo=Se(kh);/**
|
|
215
|
+
* @license lucide-react v1.47.0 - ISC
|
|
216
|
+
*
|
|
217
|
+
* This source code is licensed under the ISC license.
|
|
218
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
219
|
+
*/const Th={name:"keyboard",size:24,node:[["path",{d:"M10 8h.01",key:"1r9ogq"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M14 8h.01",key:"1primd"}],["path",{d:"M16 12h.01",key:"1l6xoz"}],["path",{d:"M18 8h.01",key:"emo2bl"}],["path",{d:"M6 8h.01",key:"x9i8wu"}],["path",{d:"M7 16h10",key:"wp8him"}],["path",{d:"M8 12h.01",key:"czm47f"}],["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}]]};Th.node;const mo=Se(Th);/**
|
|
220
|
+
* @license lucide-react v1.47.0 - ISC
|
|
221
|
+
*
|
|
222
|
+
* This source code is licensed under the ISC license.
|
|
223
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
224
|
+
*/const Eh={name:"layers",size:24,node:[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],aliases:["layers-3"]};Eh.node;const w1=Se(Eh);/**
|
|
225
|
+
* @license lucide-react v1.47.0 - ISC
|
|
226
|
+
*
|
|
227
|
+
* This source code is licensed under the ISC license.
|
|
228
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
229
|
+
*/const Mh={name:"link-2",size:24,node:[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]};Mh.node;const sn=Se(Mh);/**
|
|
230
|
+
* @license lucide-react v1.47.0 - ISC
|
|
231
|
+
*
|
|
232
|
+
* This source code is licensed under the ISC license.
|
|
233
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
234
|
+
*/const wh={name:"maximize-2",size:24,node:[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]]};wh.node;const Ch=Se(wh);/**
|
|
235
|
+
* @license lucide-react v1.47.0 - ISC
|
|
236
|
+
*
|
|
237
|
+
* This source code is licensed under the ISC license.
|
|
238
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
239
|
+
*/const Dh={name:"minimize-2",size:24,node:[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]]};Dh.node;const C1=Se(Dh);/**
|
|
240
|
+
* @license lucide-react v1.47.0 - ISC
|
|
241
|
+
*
|
|
242
|
+
* This source code is licensed under the ISC license.
|
|
243
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
244
|
+
*/const Ah={name:"moon",size:24,node:[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]};Ah.node;const _h=Se(Ah);/**
|
|
245
|
+
* @license lucide-react v1.47.0 - ISC
|
|
246
|
+
*
|
|
247
|
+
* This source code is licensed under the ISC license.
|
|
248
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
249
|
+
*/const Oh={name:"panel-left-close",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]],aliases:["sidebar-close"]};Oh.node;const D1=Se(Oh);/**
|
|
250
|
+
* @license lucide-react v1.47.0 - ISC
|
|
251
|
+
*
|
|
252
|
+
* This source code is licensed under the ISC license.
|
|
253
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
254
|
+
*/const Rh={name:"panel-left",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],aliases:["sidebar"]};Rh.node;const Lh=Se(Rh);/**
|
|
255
|
+
* @license lucide-react v1.47.0 - ISC
|
|
256
|
+
*
|
|
257
|
+
* This source code is licensed under the ISC license.
|
|
258
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
259
|
+
*/const Ih={name:"pen",size:24,node:[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],aliases:["edit-2"]};Ih.node;const Jm=Se(Ih);/**
|
|
260
|
+
* @license lucide-react v1.47.0 - ISC
|
|
261
|
+
*
|
|
262
|
+
* This source code is licensed under the ISC license.
|
|
263
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
264
|
+
*/const Uh={name:"play",size:24,node:[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]};Uh.node;const A1=Se(Uh);/**
|
|
265
|
+
* @license lucide-react v1.47.0 - ISC
|
|
266
|
+
*
|
|
267
|
+
* This source code is licensed under the ISC license.
|
|
268
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
269
|
+
*/const Hh={name:"plus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]};Hh.node;const Nu=Se(Hh);/**
|
|
270
|
+
* @license lucide-react v1.47.0 - ISC
|
|
271
|
+
*
|
|
272
|
+
* This source code is licensed under the ISC license.
|
|
273
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
274
|
+
*/const Bh={name:"refresh-cw",size:24,node:[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]};Bh.node;const Yh=Se(Bh);/**
|
|
275
|
+
* @license lucide-react v1.47.0 - ISC
|
|
276
|
+
*
|
|
277
|
+
* This source code is licensed under the ISC license.
|
|
278
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
279
|
+
*/const Gh={name:"rows-2",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 12h18",key:"1i2n21"}]],aliases:["rows"]};Gh.node;const _1=Se(Gh);/**
|
|
280
|
+
* @license lucide-react v1.47.0 - ISC
|
|
281
|
+
*
|
|
282
|
+
* This source code is licensed under the ISC license.
|
|
283
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
284
|
+
*/const Zh={name:"save",size:24,node:[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]};Zh.node;const ho=Se(Zh);/**
|
|
285
|
+
* @license lucide-react v1.47.0 - ISC
|
|
286
|
+
*
|
|
287
|
+
* This source code is licensed under the ISC license.
|
|
288
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
289
|
+
*/const qh={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};qh.node;const ei=Se(qh);/**
|
|
290
|
+
* @license lucide-react v1.47.0 - ISC
|
|
291
|
+
*
|
|
292
|
+
* This source code is licensed under the ISC license.
|
|
293
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
294
|
+
*/const Qh={name:"send",size:24,node:[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]};Qh.node;const O1=Se(Qh);/**
|
|
295
|
+
* @license lucide-react v1.47.0 - ISC
|
|
296
|
+
*
|
|
297
|
+
* This source code is licensed under the ISC license.
|
|
298
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
299
|
+
*/const Vh={name:"shield-alert",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]};Vh.node;const R1=Se(Vh);/**
|
|
300
|
+
* @license lucide-react v1.47.0 - ISC
|
|
301
|
+
*
|
|
302
|
+
* This source code is licensed under the ISC license.
|
|
303
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
304
|
+
*/const Xh={name:"sparkles",size:24,node:[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],aliases:["stars"]};Xh.node;const L1=Se(Xh);/**
|
|
305
|
+
* @license lucide-react v1.47.0 - ISC
|
|
306
|
+
*
|
|
307
|
+
* This source code is licensed under the ISC license.
|
|
308
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
309
|
+
*/const Kh={name:"star",size:24,node:[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]};Kh.node;const ju=Se(Kh);/**
|
|
310
|
+
* @license lucide-react v1.47.0 - ISC
|
|
311
|
+
*
|
|
312
|
+
* This source code is licensed under the ISC license.
|
|
313
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
314
|
+
*/const Jh={name:"sun",size:24,node:[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]};Jh.node;const $h=Se(Jh);/**
|
|
315
|
+
* @license lucide-react v1.47.0 - ISC
|
|
316
|
+
*
|
|
317
|
+
* This source code is licensed under the ISC license.
|
|
318
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
319
|
+
*/const Wh={name:"table",size:24,node:[["path",{d:"M12 3v18",key:"108xh3"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}]]};Wh.node;const xo=Se(Wh);/**
|
|
320
|
+
* @license lucide-react v1.47.0 - ISC
|
|
321
|
+
*
|
|
322
|
+
* This source code is licensed under the ISC license.
|
|
323
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
324
|
+
*/const Fh={name:"terminal",size:24,node:[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]};Fh.node;const nn=Se(Fh);/**
|
|
325
|
+
* @license lucide-react v1.47.0 - ISC
|
|
326
|
+
*
|
|
327
|
+
* This source code is licensed under the ISC license.
|
|
328
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
329
|
+
*/const Ph={name:"toggle-left",size:24,node:[["circle",{cx:"9",cy:"12",r:"3",key:"u3jwor"}],["rect",{width:"20",height:"14",x:"2",y:"5",rx:"7",key:"g7kal2"}]]};Ph.node;const I1=Se(Ph);/**
|
|
330
|
+
* @license lucide-react v1.47.0 - ISC
|
|
331
|
+
*
|
|
332
|
+
* This source code is licensed under the ISC license.
|
|
333
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
334
|
+
*/const ex={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};ex.node;const Ji=Se(ex);/**
|
|
335
|
+
* @license lucide-react v1.47.0 - ISC
|
|
336
|
+
*
|
|
337
|
+
* This source code is licensed under the ISC license.
|
|
338
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
339
|
+
*/const tx={name:"type",size:24,node:[["path",{d:"M12 4v16",key:"1654pz"}],["path",{d:"M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2",key:"e0r10z"}],["path",{d:"M9 20h6",key:"s66wpe"}]]};tx.node;const U1=Se(tx);/**
|
|
340
|
+
* @license lucide-react v1.47.0 - ISC
|
|
341
|
+
*
|
|
342
|
+
* This source code is licensed under the ISC license.
|
|
343
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
344
|
+
*/const lx={name:"undo-2",size:24,node:[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]};lx.node;const go=Se(lx);/**
|
|
345
|
+
* @license lucide-react v1.47.0 - ISC
|
|
346
|
+
*
|
|
347
|
+
* This source code is licensed under the ISC license.
|
|
348
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
349
|
+
*/const ax={name:"wand-sparkles",size:24,node:[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]],aliases:["wand-2"]};ax.node;const H1=Se(ax);/**
|
|
350
|
+
* @license lucide-react v1.47.0 - ISC
|
|
351
|
+
*
|
|
352
|
+
* This source code is licensed under the ISC license.
|
|
353
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
354
|
+
*/const nx={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};nx.node;const Ll=Se(nx);/**
|
|
355
|
+
* @license lucide-react v1.47.0 - ISC
|
|
356
|
+
*
|
|
357
|
+
* This source code is licensed under the ISC license.
|
|
358
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
359
|
+
*/const ix={name:"zap",size:24,node:[["path",{d:"M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z",key:"1v7up4"}]]};ix.node;const B1=Se(ix),sx=p.createContext(void 0),Y1=o=>{var R;const h=((R=window.__RAILS_STUDIO_CONFIG__)==null?void 0:R.basePath)||"",U=document.getElementById("favicon");if(!U)return;const r=o==="dark"?"logo-dark.svg":"logo-light.svg";U.href=`${h}/assets/${r}`},Fn=o=>o==="system"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":o,Ki=(o,h=!0)=>{const U=document.documentElement;o==="dark"?(U.classList.add("dark"),U.classList.remove("light")):(U.classList.remove("dark"),U.classList.add("light")),h&&(U.style.colorScheme=o),Y1(o)},G1=()=>{var o;return((o=Document.prototype.startViewTransition)==null?void 0:o.bind(document))??document.startViewTransition.bind(document)},Z1=o=>{if(o&&typeof o.clientX=="number"&&!("key"in o))return{x:o.clientX,y:o.clientY};const h=document.querySelector("[data-theme-toggle]");if(h){const U=h.getBoundingClientRect();return{x:U.left+U.width/2,y:U.top+U.height/2}}return{x:window.innerWidth-36,y:28}},q1=({children:o})=>{const[h,U]=p.useState(()=>{try{const B=localStorage.getItem("rails_studio_theme");if(B==="light"||B==="dark"||B==="system")return B}catch{}return"dark"}),[r,R]=p.useState("dark");p.useEffect(()=>{const B=Fn(h);R(B);const P=document.documentElement.classList.contains("theme-transitioning");if(Ki(B,!P),h!=="system")return;const le=window.matchMedia("(prefers-color-scheme: dark)"),q=()=>{const y=Fn("system");R(y),Ki(y)};return le.addEventListener("change",q),()=>le.removeEventListener("change",q)},[h]);const I=(B,P=!0)=>{U(B);const le=Fn(B);R(le),Ki(le,P);try{localStorage.setItem("rails_studio_theme",B)}catch{}},ee=B=>{const P=r==="dark"?"light":"dark",le=window.matchMedia("(prefers-reduced-motion: reduce)").matches,q=G1();if(!(typeof q=="function"&&!le)){I(P);return}const{x:$,y:ne}=Z1(B),j=Math.hypot(Math.max($,window.innerWidth-$),Math.max(ne,window.innerHeight-ne)),C=document.documentElement,v=P==="dark";if(C.classList.contains("theme-transitioning"))return;C.classList.add("theme-transitioning"),v&&C.classList.add("theme-reveal-old"),C.style.setProperty("--vt-x",`${$}px`),C.style.setProperty("--vt-y",`${ne}px`),C.style.setProperty("--vt-r",`${j}px`),C.style.setProperty("--vt-bg",v?"#f8fafc":"#09090b"),C.style.colorScheme=v?"light":"dark",C.offsetWidth;let Y=0,w=!1,te;const xe=(Te=!1)=>{if(!w){if(w=!0,window.clearTimeout(Y),Te)try{te==null||te.skipTransition()}catch{}C.classList.remove("theme-transitioning","theme-reveal-old"),C.style.removeProperty("--vt-x"),C.style.removeProperty("--vt-y"),C.style.removeProperty("--vt-r"),C.style.removeProperty("--vt-bg"),U(P),R(Fn(P)),Ki(Fn(P),!0);try{localStorage.setItem("rails_studio_theme",P)}catch{}}};Y=window.setTimeout(()=>xe(!0),800);try{te=q(()=>{Ki(Fn(P),!1);try{localStorage.setItem("rails_studio_theme",P)}catch{}})}catch{xe(!0);return}te.finished.then(()=>xe(!1)).catch(()=>xe(!0))};return s.jsx(sx.Provider,{value:{theme:h,resolvedTheme:r,setTheme:I,toggleTheme:ee},children:o})},bo=()=>{const o=p.useContext(sx);if(!o)throw new Error("useTheme must be used within a ThemeProvider");return o},Q1="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjkgOSAxMTAgMTEwIiB3aWR0aD0iMTI4IiBoZWlnaHQ9IjEyOCIgZmlsbD0ibm9uZSI+CiAgPCEtLSBUYWJsZSAtLT4KICA8cmVjdCB4PSIxMCIgeT0iMTAiIHdpZHRoPSIxMDgiIGhlaWdodD0iMTA4IiBmaWxsPSIjZmZmZmZmIiAvPgogIDxyZWN0IHg9IjEwIiB5PSIxMCIgd2lkdGg9IjEwOCIgaGVpZ2h0PSIyNCIgZmlsbD0iI2YxZjVmOSIgLz4KICA8cmVjdCB4PSIxMCIgeT0iODgiIHdpZHRoPSIxMDgiIGhlaWdodD0iMzAiIGZpbGw9IiNEMzAwMDEiIC8+CgogIDwhLS0gR3JpZDogbmFycm93IGlkIGNvbHVtbiAoMjIpICsgdHdvIGRhdGEgY29sdW1ucyAoNDMpLiAtLT4KICA8ZyBzdHJva2U9IiNjYmQ1ZTEiIHN0cm9rZS13aWR0aD0iMiI+CiAgICA8cmVjdCB4PSIxMCIgeT0iMTAiIHdpZHRoPSIxMDgiIGhlaWdodD0iMTA4IiAvPgogICAgPGxpbmUgeDE9IjMyIiB5MT0iMTAiIHgyPSIzMiIgeTI9Ijg4IiAvPgogICAgPGxpbmUgeDE9Ijc1IiB5MT0iMTAiIHgyPSI3NSIgeTI9Ijg4IiAvPgogICAgPGxpbmUgeDE9IjEwIiB5MT0iMzQiIHgyPSIxMTgiIHkyPSIzNCIgLz4KICAgIDxsaW5lIHgxPSIxMCIgeTE9IjUyIiB4Mj0iMTE4IiB5Mj0iNTIiIC8+CiAgICA8bGluZSB4MT0iMTAiIHkxPSI3MCIgeDI9IjExOCIgeTI9IjcwIiAvPgogICAgPGxpbmUgeDE9IjEwIiB5MT0iODgiIHgyPSIxMTgiIHkyPSI4OCIgLz4KICA8L2c+CgogIDwhLS0gSGVhZGVyIC0tPgogIDx0ZXh0IHg9IjIxIiB5PSIyNyIgZm9udC1mYW1pbHk9Ii1hcHBsZS1zeXN0ZW0sIEJsaW5rTWFjU3lzdGVtRm9udCwgJ1NlZ29lIFVJJywgUm9ib3RvLCBzYW5zLXNlcmlmIiBmb250LXNpemU9IjExIiBmb250LXdlaWdodD0iNzAwIiBmaWxsPSIjZTExZDQ4IiB0ZXh0LWFuY2hvcj0ibWlkZGxlIj4jPC90ZXh0PgogIDxyZWN0IHg9IjQ0IiB5PSIyMSIgd2lkdGg9IjIwIiBoZWlnaHQ9IjYiIGZpbGw9IiM5NGEzYjgiIC8+CiAgPHJlY3QgeD0iODciIHk9IjIxIiB3aWR0aD0iMjAiIGhlaWdodD0iNiIgZmlsbD0iIzk0YTNiOCIgLz4KCiAgPCEtLSBSb3cgMSAtLT4KICA8dGV4dCB4PSIyMSIgeT0iNDciIGZvbnQtZmFtaWx5PSItYXBwbGUtc3lzdGVtLCBCbGlua01hY1N5c3RlbUZvbnQsICdTZWdvZSBVSScsIFJvYm90bywgc2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMCIgZm9udC13ZWlnaHQ9IjYwMCIgZmlsbD0iIzY0NzQ4YiIgdGV4dC1hbmNob3I9Im1pZGRsZSI+MTwvdGV4dD4KICA8cmVjdCB4PSI0MiIgeT0iNDAiIHdpZHRoPSIyMiIgaGVpZ2h0PSI2IiBmaWxsPSIjMDI4NGM3IiAvPgogIDxyZWN0IHg9IjkxIiB5PSI0MCIgd2lkdGg9IjEyIiBoZWlnaHQ9IjYiIGZpbGw9IiM5MzMzZWEiIC8+CgogIDwhLS0gUm93IDIgLS0+CiAgPHRleHQgeD0iMjEiIHk9IjY1IiBmb250LWZhbWlseT0iLWFwcGxlLXN5c3RlbSwgQmxpbmtNYWNTeXN0ZW1Gb250LCAnU2Vnb2UgVUknLCBSb2JvdG8sIHNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTAiIGZvbnQtd2VpZ2h0PSI2MDAiIGZpbGw9IiM2NDc0OGIiIHRleHQtYW5jaG9yPSJtaWRkbGUiPjI8L3RleHQ+CiAgPHJlY3QgeD0iNDIiIHk9IjU4IiB3aWR0aD0iMTYiIGhlaWdodD0iNiIgZmlsbD0iIzAyODRjNyIgLz4KICA8cmVjdCB4PSI5MSIgeT0iNTgiIHdpZHRoPSIxMiIgaGVpZ2h0PSI2IiBmaWxsPSIjMDU5NjY5IiAvPgoKICA8IS0tIFJvdyAzIC0tPgogIDx0ZXh0IHg9IjIxIiB5PSI4MyIgZm9udC1mYW1pbHk9Ii1hcHBsZS1zeXN0ZW0sIEJsaW5rTWFjU3lzdGVtRm9udCwgJ1NlZ29lIFVJJywgUm9ib3RvLCBzYW5zLXNlcmlmIiBmb250LXNpemU9IjEwIiBmb250LXdlaWdodD0iNjAwIiBmaWxsPSIjNjQ3NDhiIiB0ZXh0LWFuY2hvcj0ibWlkZGxlIj4zPC90ZXh0PgogIDxyZWN0IHg9IjQyIiB5PSI3NiIgd2lkdGg9IjE4IiBoZWlnaHQ9IjYiIGZpbGw9IiNkOTc3MDYiIC8+CiAgPHJlY3QgeD0iOTEiIHk9Ijc2IiB3aWR0aD0iMTIiIGhlaWdodD0iNiIgZmlsbD0iI2UxMWQ0OCIgLz4KCiAgPCEtLSBGb290ZXIgbG9ja3VwOiBjZW50ZXJlZCBpbiB0aGUgcmVkIGJhciAoYWxwaGFiZXRpYyBiYXNlbGluZSDigJQgaW1nIHJlbmRlcmVycyBpZ25vcmUgZG9taW5hbnQtYmFzZWxpbmUpIC0tPgogIDxnIGZpbGw9IiNmZmZmZmYiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDY0IDEwMikiPgogICAgPGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTUxIDApIj4KICAgICAgPGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMSAtMTMpIHNjYWxlKDAuODUpIj4KICAgICAgICA8cGF0aCBkPSJNLjc0MSAxOS4zNjVoOC4zNnMtMS41OTgtNy4yOTEgMy42OTMtMTAuMjQzbC4xMzQtLjA2NmMxLjI4Ni0uNjM3IDQuOTA3LTIuNDMxIDEwLjcwMiAxLjg1NC4xOS0uMTU5LjM3LS4yODYuMzctLjI4NnMtNS41MDMtNS40OTItMTEuNjMtNC44NzhjLTMuMDc5LjI3NS02Ljg2NyAzLjA3OS05LjA5IDYuNzgzQzEuMDU4IDE2LjIzMy43NDEgMTkuMzY1Ljc0MSAxOS4zNjVabTguODA0LS43ODNhMTAuNjgyIDEwLjY4MiAwIDAgMS0uMTI3LTEuMzMzbDEuMTQzLjQxMmMuMDYzLjQ5OC4xNTkuOTYzLjI1NCAxLjM3NmwtMS4yNy0uNDU1Wm0tNy43OTktNC4zMTdMLjUyOSAxMy44MmMtLjIwMS40NTUtLjQyMy45ODQtLjUyOSAxLjI3bDEuMjE3LjQ0NGMuMTM3LS4zNTkuMzYtLjg3OC41MjktMS4yNjlabTcuODMxLjI5Ni44NTcuNjc3Yy4wNDItLjQxMy4xMTYtLjgyNS4yMjItMS4yMzhsLS43NjItLjYwM2MtLjEzNy4zOTEtLjIzMy43ODMtLjMxNyAxLjE2NFptMi4wNDItMi42NDYtLjUwOC0uNzYyYy4xOTEtLjI0My40MTMtLjQ4Ni42NTYtLjcwOWwuNDc2LjcyYTUuOTU4IDUuOTU4IDAgMCAwLS42MjQuNzUxWk00LjE5IDguODc4bC43NTIuNjU2Yy0uMjU0LjI2NS0uNDk4LjU1MS0uNzIuODM2bC0uODE1LS42OThjLjI0NC0uMjY1LjUwOC0uNTI5Ljc4My0uNzk0Wm05Ljc5OSAxLjAyNy0uMjQzLS43M2MuMjY1LS4xMTcuNTcxLS4yMzMuOTMxLS4zMzlsLjIzMy42OThhNi44MiA2LjgyIDAgMCAwLS45MjEuMzcxWm0zLjEyMi0uNjU2LjA0Mi0uNjY3Yy4zMzkuMDIxLjY4OC4wNjQgMS4wNDguMTM4bC0uMDQyLjY1NmE1Ljg1OSA1Ljg1OSAwIDAgMC0xLjA0OC0uMTI3Wk04Ljk0MiA2LjM5MmwtLjQ3Ni0uNzMxYy0uMjY1LjEzOC0uNTQuMjg2LS44MjYuNDU1bC40ODcuNzQxYy4yNzUtLjE2OS41NC0uMzI4LjgxNS0uNDY1Wm05LjIxNy0uMDUzLjA0Mi0uNzA5Yy0uMDk1LS4wNTMtLjM2LS4xOC0xLjAyNi0uMzcxbC0uMDQzLjY5OWMuMzQ5LjExNi42ODguMjQzIDEuMDI3LjM4MVpNMTMuMjM4IDUuMjhoLjEwNmwtLjIxMi0uNjQ1Yy0uMzI4IDAtLjY2Ni4wMjEtMS4wMTYuMDYzbC4yMDEuNjI1YTguODcgOC44NyAwIDAgMSAuOTIxLS4wNDNaIiAvPgogICAgICA8L2c+CiAgICAgIDx0ZXh0IHg9IjI0IiB5PSI1IiBmb250LWZhbWlseT0iLWFwcGxlLXN5c3RlbSwgQmxpbmtNYWNTeXN0ZW1Gb250LCAnU2Vnb2UgVUknLCBSb2JvdG8sIHNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGZvbnQtd2VpZ2h0PSI3MDAiPnJhaWxzIHN0dWRpbzwvdGV4dD4KICAgIDwvZz4KICA8L2c+Cjwvc3ZnPgo=",V1="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjkgOSAxMTAgMTEwIiB3aWR0aD0iMTI4IiBoZWlnaHQ9IjEyOCIgZmlsbD0ibm9uZSI+CiAgPCEtLSBUYWJsZSAtLT4KICA8cmVjdCB4PSIxMCIgeT0iMTAiIHdpZHRoPSIxMDgiIGhlaWdodD0iMTA4IiBmaWxsPSIjMTgxODFiIiAvPgogIDxyZWN0IHg9IjEwIiB5PSIxMCIgd2lkdGg9IjEwOCIgaGVpZ2h0PSIyNCIgZmlsbD0iIzI3MjcyYSIgLz4KICA8cmVjdCB4PSIxMCIgeT0iODgiIHdpZHRoPSIxMDgiIGhlaWdodD0iMzAiIGZpbGw9IiNEMzAwMDEiIC8+CgogIDwhLS0gR3JpZDogbmFycm93IGlkIGNvbHVtbiAoMjIpICsgdHdvIGRhdGEgY29sdW1ucyAoNDMpLiAtLT4KICA8ZyBzdHJva2U9IiMzZjNmNDYiIHN0cm9rZS13aWR0aD0iMiI+CiAgICA8cmVjdCB4PSIxMCIgeT0iMTAiIHdpZHRoPSIxMDgiIGhlaWdodD0iMTA4IiAvPgogICAgPGxpbmUgeDE9IjMyIiB5MT0iMTAiIHgyPSIzMiIgeTI9Ijg4IiAvPgogICAgPGxpbmUgeDE9Ijc1IiB5MT0iMTAiIHgyPSI3NSIgeTI9Ijg4IiAvPgogICAgPGxpbmUgeDE9IjEwIiB5MT0iMzQiIHgyPSIxMTgiIHkyPSIzNCIgLz4KICAgIDxsaW5lIHgxPSIxMCIgeTE9IjUyIiB4Mj0iMTE4IiB5Mj0iNTIiIC8+CiAgICA8bGluZSB4MT0iMTAiIHkxPSI3MCIgeDI9IjExOCIgeTI9IjcwIiAvPgogICAgPGxpbmUgeDE9IjEwIiB5MT0iODgiIHgyPSIxMTgiIHkyPSI4OCIgLz4KICA8L2c+CgogIDwhLS0gSGVhZGVyIC0tPgogIDx0ZXh0IHg9IjIxIiB5PSIyNyIgZm9udC1mYW1pbHk9Ii1hcHBsZS1zeXN0ZW0sIEJsaW5rTWFjU3lzdGVtRm9udCwgJ1NlZ29lIFVJJywgUm9ib3RvLCBzYW5zLXNlcmlmIiBmb250LXNpemU9IjExIiBmb250LXdlaWdodD0iNzAwIiBmaWxsPSIjZTExZDQ4IiB0ZXh0LWFuY2hvcj0ibWlkZGxlIj4jPC90ZXh0PgogIDxyZWN0IHg9IjQ0IiB5PSIyMSIgd2lkdGg9IjIwIiBoZWlnaHQ9IjYiIGZpbGw9IiM3MTcxN2EiIC8+CiAgPHJlY3QgeD0iODciIHk9IjIxIiB3aWR0aD0iMjAiIGhlaWdodD0iNiIgZmlsbD0iIzcxNzE3YSIgLz4KCiAgPCEtLSBSb3cgMSAtLT4KICA8dGV4dCB4PSIyMSIgeT0iNDciIGZvbnQtZmFtaWx5PSItYXBwbGUtc3lzdGVtLCBCbGlua01hY1N5c3RlbUZvbnQsICdTZWdvZSBVSScsIFJvYm90bywgc2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMCIgZm9udC13ZWlnaHQ9IjYwMCIgZmlsbD0iI2ExYTFhYSIgdGV4dC1hbmNob3I9Im1pZGRsZSI+MTwvdGV4dD4KICA8cmVjdCB4PSI0MiIgeT0iNDAiIHdpZHRoPSIyMiIgaGVpZ2h0PSI2IiBmaWxsPSIjMzhiZGY4IiAvPgogIDxyZWN0IHg9IjkxIiB5PSI0MCIgd2lkdGg9IjEyIiBoZWlnaHQ9IjYiIGZpbGw9IiNhODU1ZjciIC8+CgogIDwhLS0gUm93IDIgLS0+CiAgPHRleHQgeD0iMjEiIHk9IjY1IiBmb250LWZhbWlseT0iLWFwcGxlLXN5c3RlbSwgQmxpbmtNYWNTeXN0ZW1Gb250LCAnU2Vnb2UgVUknLCBSb2JvdG8sIHNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTAiIGZvbnQtd2VpZ2h0PSI2MDAiIGZpbGw9IiNhMWExYWEiIHRleHQtYW5jaG9yPSJtaWRkbGUiPjI8L3RleHQ+CiAgPHJlY3QgeD0iNDIiIHk9IjU4IiB3aWR0aD0iMTYiIGhlaWdodD0iNiIgZmlsbD0iIzM4YmRmOCIgLz4KICA8cmVjdCB4PSI5MSIgeT0iNTgiIHdpZHRoPSIxMiIgaGVpZ2h0PSI2IiBmaWxsPSIjMzRkMzk5IiAvPgoKICA8IS0tIFJvdyAzIC0tPgogIDx0ZXh0IHg9IjIxIiB5PSI4MyIgZm9udC1mYW1pbHk9Ii1hcHBsZS1zeXN0ZW0sIEJsaW5rTWFjU3lzdGVtRm9udCwgJ1NlZ29lIFVJJywgUm9ib3RvLCBzYW5zLXNlcmlmIiBmb250LXNpemU9IjEwIiBmb250LXdlaWdodD0iNjAwIiBmaWxsPSIjYTFhMWFhIiB0ZXh0LWFuY2hvcj0ibWlkZGxlIj4zPC90ZXh0PgogIDxyZWN0IHg9IjQyIiB5PSI3NiIgd2lkdGg9IjE4IiBoZWlnaHQ9IjYiIGZpbGw9IiNmYmJmMjQiIC8+CiAgPHJlY3QgeD0iOTEiIHk9Ijc2IiB3aWR0aD0iMTIiIGhlaWdodD0iNiIgZmlsbD0iI2UxMWQ0OCIgLz4KCiAgPCEtLSBGb290ZXIgbG9ja3VwOiBjZW50ZXJlZCBpbiB0aGUgcmVkIGJhciAoYWxwaGFiZXRpYyBiYXNlbGluZSDigJQgaW1nIHJlbmRlcmVycyBpZ25vcmUgZG9taW5hbnQtYmFzZWxpbmUpIC0tPgogIDxnIGZpbGw9IiNmZmZmZmYiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDY0IDEwMikiPgogICAgPGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTUxIDApIj4KICAgICAgPGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMSAtMTMpIHNjYWxlKDAuODUpIj4KICAgICAgICA8cGF0aCBkPSJNLjc0MSAxOS4zNjVoOC4zNnMtMS41OTgtNy4yOTEgMy42OTMtMTAuMjQzbC4xMzQtLjA2NmMxLjI4Ni0uNjM3IDQuOTA3LTIuNDMxIDEwLjcwMiAxLjg1NC4xOS0uMTU5LjM3LS4yODYuMzctLjI4NnMtNS41MDMtNS40OTItMTEuNjMtNC44NzhjLTMuMDc5LjI3NS02Ljg2NyAzLjA3OS05LjA5IDYuNzgzQzEuMDU4IDE2LjIzMy43NDEgMTkuMzY1Ljc0MSAxOS4zNjVabTguODA0LS43ODNhMTAuNjgyIDEwLjY4MiAwIDAgMS0uMTI3LTEuMzMzbDEuMTQzLjQxMmMuMDYzLjQ5OC4xNTkuOTYzLjI1NCAxLjM3NmwtMS4yNy0uNDU1Wm0tNy43OTktNC4zMTdMLjUyOSAxMy44MmMtLjIwMS40NTUtLjQyMy45ODQtLjUyOSAxLjI3bDEuMjE3LjQ0NGMuMTM3LS4zNTkuMzYtLjg3OC41MjktMS4yNjlabTcuODMxLjI5Ni44NTcuNjc3Yy4wNDItLjQxMy4xMTYtLjgyNS4yMjItMS4yMzhsLS43NjItLjYwM2MtLjEzNy4zOTEtLjIzMy43ODMtLjMxNyAxLjE2NFptMi4wNDItMi42NDYtLjUwOC0uNzYyYy4xOTEtLjI0My40MTMtLjQ4Ni42NTYtLjcwOWwuNDc2LjcyYTUuOTU4IDUuOTU4IDAgMCAwLS42MjQuNzUxWk00LjE5IDguODc4bC43NTIuNjU2Yy0uMjU0LjI2NS0uNDk4LjU1MS0uNzIuODM2bC0uODE1LS42OThjLjI0NC0uMjY1LjUwOC0uNTI5Ljc4My0uNzk0Wm05Ljc5OSAxLjAyNy0uMjQzLS43M2MuMjY1LS4xMTcuNTcxLS4yMzMuOTMxLS4zMzlsLjIzMy42OThhNi44MiA2LjgyIDAgMCAwLS45MjEuMzcxWm0zLjEyMi0uNjU2LjA0Mi0uNjY3Yy4zMzkuMDIxLjY4OC4wNjQgMS4wNDguMTM4bC0uMDQyLjY1NmE1Ljg1OSA1Ljg1OSAwIDAgMC0xLjA0OC0uMTI3Wk04Ljk0MiA2LjM5MmwtLjQ3Ni0uNzMxYy0uMjY1LjEzOC0uNTQuMjg2LS44MjYuNDU1bC40ODcuNzQxYy4yNzUtLjE2OS41NC0uMzI4LjgxNS0uNDY1Wm05LjIxNy0uMDUzLjA0Mi0uNzA5Yy0uMDk1LS4wNTMtLjM2LS4xOC0xLjAyNi0uMzcxbC0uMDQzLjY5OWMuMzQ5LjExNi42ODguMjQzIDEuMDI3LjM4MVpNMTMuMjM4IDUuMjhoLjEwNmwtLjIxMi0uNjQ1Yy0uMzI4IDAtLjY2Ni4wMjEtMS4wMTYuMDYzbC4yMDEuNjI1YTguODcgOC44NyAwIDAgMSAuOTIxLS4wNDNaIiAvPgogICAgICA8L2c+CiAgICAgIDx0ZXh0IHg9IjI0IiB5PSI1IiBmb250LWZhbWlseT0iLWFwcGxlLXN5c3RlbSwgQmxpbmtNYWNTeXN0ZW1Gb250LCAnU2Vnb2UgVUknLCBSb2JvdG8sIHNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGZvbnQtd2VpZ2h0PSI3MDAiPnJhaWxzIHN0dWRpbzwvdGV4dD4KICAgIDwvZz4KICA8L2c+Cjwvc3ZnPgo=",$m=({size:o=32,className:h=""})=>s.jsxs("span",{className:`relative inline-flex shrink-0 ${h}`,"aria-hidden":!0,children:[s.jsx("img",{src:Q1,width:o,height:o,alt:"",className:"block dark:hidden object-contain"}),s.jsx("img",{src:V1,width:o,height:o,alt:"",className:"hidden dark:block object-contain"})]}),X1="w-64",K1=({databaseInfo:o,activeTab:h,setActiveTab:U,sidebarOpen:r,onToggleSidebar:R,onOpenCommandPalette:I,onOpenShortcuts:ee})=>{const{resolvedTheme:B,toggleTheme:P}=bo(),le=typeof window<"u"&&/Mac|iPod|iPhone|iPad/.test(navigator.userAgent),q=le?"⌘B":"Ctrl+B",y=le?"⌘[":"Ctrl+[",$=le?"⌘]":"Ctrl+]",ne="h-8 inline-flex items-center gap-1.5 px-2.5 rounded-lg border border-slate-200 dark:border-zinc-800 bg-slate-100 dark:bg-zinc-950 text-slate-600 dark:text-zinc-400 hover:text-slate-900 dark:hover:text-zinc-100 hover:bg-slate-200/80 dark:hover:bg-zinc-800 transition-colors",j="hidden sm:inline-flex px-1.5 py-0.5 text-[9px] font-mono rounded border border-slate-200 dark:border-zinc-700 bg-white dark:bg-zinc-800 text-slate-500 dark:text-zinc-400";return s.jsxs("header",{className:"min-h-14 overflow-visible border-b border-slate-200 dark:border-zinc-800 bg-white/95 dark:bg-zinc-900/90 backdrop-blur flex items-stretch select-none z-20 shadow-[0_1px_2px_rgba(0,0,0,0.03)] dark:shadow-none transition-colors",children:[s.jsx("div",{className:`${r?X1:"w-12"} shrink-0 border-r border-slate-200 dark:border-zinc-800 px-2.5 py-2 flex flex-col justify-center gap-1 transition-[width] duration-150`,children:r?s.jsx(s.Fragment,{children:s.jsxs("div",{className:"flex items-center gap-2.5 min-w-0",children:[s.jsx($m,{size:40}),s.jsxs("div",{className:"flex flex-col gap-0.5 min-w-0",children:[s.jsxs("span",{className:"font-bold text-slate-900 dark:text-zinc-100 tracking-tight text-sm font-mono truncate",children:["Rails",s.jsx("span",{className:"text-red-500",children:"Studio"})]}),o&&s.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[s.jsxs("span",{className:"px-1.5 py-px rounded bg-slate-100 dark:bg-zinc-800 text-slate-600 dark:text-zinc-300 font-mono flex items-center gap-1 border border-slate-200 dark:border-zinc-700/50 text-[10px]",children:[s.jsx("span",{className:"w-1 h-1 rounded-full bg-emerald-500 animate-pulse"}),o.adapter]}),o.rails_version&&s.jsxs("span",{className:"text-[10px] text-slate-400 dark:text-zinc-500 font-mono truncate",children:["Rails ",o.rails_version]}),o.read_only&&s.jsx("span",{className:"px-1.5 py-px rounded bg-amber-50 dark:bg-amber-950/80 text-amber-700 dark:text-amber-400 border border-amber-200 dark:border-amber-700/50 text-[10px] flex items-center gap-0.5",children:s.jsx(R1,{size:10})})]})]})]})}):s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx($m,{size:32})})}),s.jsxs("div",{className:"flex-1 min-w-0 px-3 flex items-center justify-between gap-3",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("button",{onClick:R,className:ne,title:`${r?"Collapse":"Expand"} sidebar (${q})`,"aria-label":r?"Collapse sidebar":"Expand sidebar",children:[r?s.jsx(D1,{size:15}):s.jsx(Lh,{size:15}),s.jsx("kbd",{className:j,children:q})]}),s.jsxs("div",{className:"h-8 flex items-center bg-slate-100/90 dark:bg-zinc-950/80 p-0.5 rounded-lg border border-slate-200 dark:border-zinc-800",children:[s.jsxs("button",{onClick:()=>U("tables"),title:`Tables (${y})`,className:`h-full inline-flex items-center gap-1.5 px-2.5 text-xs font-medium rounded-md transition-all ${h==="tables"?"bg-white dark:bg-zinc-800 text-slate-900 dark:text-zinc-100 shadow-sm":"text-slate-500 dark:text-zinc-400 hover:text-slate-900 dark:hover:text-zinc-200"}`,children:[s.jsx(oo,{size:14}),s.jsx("span",{children:"Tables"}),s.jsx("kbd",{className:j,children:y})]}),s.jsxs("button",{onClick:()=>U("sql"),title:`SQL Runner (${$})`,className:`h-full inline-flex items-center gap-1.5 px-2.5 text-xs font-medium rounded-md transition-all ${h==="sql"?"bg-white dark:bg-zinc-800 text-slate-900 dark:text-zinc-100 shadow-sm":"text-slate-500 dark:text-zinc-400 hover:text-slate-900 dark:hover:text-zinc-200"}`,children:[s.jsx(nn,{size:14}),s.jsx("span",{children:"SQL Runner"}),s.jsx("kbd",{className:j,children:$})]})]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[I&&s.jsxs("button",{onClick:I,className:`${ne} w-40 justify-between px-2.5 text-xs`,title:`Quick Search & Commands (${le?"⌘K":"Ctrl+K"})`,children:[s.jsxs("span",{className:"flex items-center gap-1.5 min-w-0",children:[s.jsx(ei,{size:13,className:"text-slate-400 dark:text-zinc-500 shrink-0"}),s.jsx("span",{className:"truncate",children:"Search..."})]}),s.jsx("kbd",{className:`${j} shrink-0`,children:le?"⌘K":"Ctrl+K"})]}),ee&&s.jsxs("button",{onClick:ee,className:ne,title:"Keyboard shortcuts (?)","aria-label":"Keyboard shortcuts",children:[s.jsx(mo,{size:14}),s.jsx("kbd",{className:j,children:"?"})]}),s.jsxs("button",{"data-theme-toggle":!0,onClick:P,className:ne,title:`Switch to ${B==="dark"?"light":"dark"} mode (T)`,"aria-label":"Toggle theme",children:[B==="dark"?s.jsx($h,{size:15,className:"text-amber-400"}):s.jsx(_h,{size:15,className:"text-slate-600"}),s.jsx("kbd",{className:j,children:"T"})]})]})]})]})},J1=({tables:o,selectedTable:h,onSelectTable:U,loading:r,onOpenCommandPalette:R,navActive:I=!0,onActivate:ee})=>{const[B,P]=p.useState(""),[le,q]=p.useState(h),y=p.useRef(null),$=p.useRef(new Map),ne=o.filter(Y=>Y.name.toLowerCase().includes(B.toLowerCase())),j=(()=>{const Y=ne.findIndex(w=>w.name===le);return Y>=0?Y:0})();p.useEffect(()=>{h&&q(h)},[h]);const C=Y=>{var xe;if(ne.length===0)return;const w=Math.min(ne.length-1,Math.max(0,j+Y)),te=ne[w].name;q(te),(xe=$.current.get(te))==null||xe.scrollIntoView({block:"nearest"})},v=()=>{const Y=ne[j];Y&&U(Y.name)};return p.useEffect(()=>{const Y=w=>{var Ee,ce,fe;const te=w.target,xe=(Ee=te==null?void 0:te.tagName)==null?void 0:Ee.toLowerCase(),Te=xe==="input"||xe==="textarea"||xe==="select"||(te==null?void 0:te.isContentEditable);if(!Te&&w.key==="/"&&!w.ctrlKey&&!w.metaKey){w.preventDefault(),ee==null||ee(),(ce=y.current)==null||ce.focus(),(fe=y.current)==null||fe.select();return}!I||w.ctrlKey||w.metaKey||w.altKey||Te&&te!==y.current||(w.key==="ArrowDown"?(w.preventDefault(),C(1)):w.key==="ArrowUp"?(w.preventDefault(),C(-1)):w.key==="Enter"&&(te===y.current||!Te)&&(w.preventDefault(),v()))};return window.addEventListener("keydown",Y),()=>window.removeEventListener("keydown",Y)},[I,ne,j,le,h]),s.jsxs("aside",{className:"w-64 shrink-0 border-r border-slate-200 dark:border-zinc-800 bg-slate-50/70 dark:bg-zinc-900/60 flex flex-col h-full min-h-0 select-none transition-colors",onMouseDown:()=>ee==null?void 0:ee(),children:[s.jsx("div",{className:"h-[46px] px-2.5 border-b border-slate-200 dark:border-zinc-800 flex items-center",children:s.jsxs("div",{className:"relative flex items-center w-full",children:[s.jsx(ei,{size:14,className:"absolute left-2.5 top-1/2 -translate-y-1/2 text-slate-400 dark:text-zinc-500 pointer-events-none"}),s.jsx("input",{ref:y,type:"text",placeholder:"Filter tables...",value:B,onChange:Y=>P(Y.target.value),onFocus:()=>ee==null?void 0:ee(),onKeyDown:Y=>{var w;Y.key==="Escape"&&(Y.preventDefault(),Y.stopPropagation(),(w=y.current)==null||w.blur())},className:"w-full h-8 bg-white dark:bg-zinc-950/80 border border-slate-200 dark:border-zinc-800 rounded-md pl-8 pr-8 text-xs text-slate-900 dark:text-zinc-200 placeholder-slate-400 dark:placeholder-zinc-500 focus:outline-none focus:border-slate-400 dark:focus:border-zinc-700 shadow-sm dark:shadow-none"}),s.jsx("kbd",{className:"absolute right-2 px-1.5 py-0.5 text-[10px] font-mono rounded border border-slate-200 dark:border-zinc-700 bg-slate-100 dark:bg-zinc-800 text-slate-400 dark:text-zinc-500 shadow-xs pointer-events-none",title:"Press / to search tables",children:"/"})]})}),s.jsxs("div",{className:"flex-1 overflow-y-auto p-2 space-y-0.5 min-h-0",children:[s.jsx("div",{className:"px-2 py-1.5 text-[11px] font-semibold uppercase tracking-wider text-slate-400 dark:text-zinc-500 flex items-center justify-between",children:s.jsxs("span",{children:["Tables (",ne.length,")"]})}),r&&o.length===0?s.jsx("div",{className:"p-4 text-center text-xs text-slate-400 dark:text-zinc-500 font-mono",children:"Loading tables..."}):ne.length===0?s.jsxs("div",{className:"p-4 text-center text-xs text-slate-400 dark:text-zinc-500 font-mono",children:['No tables match "',B,'"']}):ne.map(Y=>{const w=h===Y.name,te=le===Y.name;return s.jsxs("button",{ref:xe=>{xe?$.current.set(Y.name,xe):$.current.delete(Y.name)},onClick:()=>{q(Y.name),U(Y.name)},className:`w-full flex items-center justify-between px-2.5 py-1.5 rounded-md text-xs font-mono transition-all text-left group ${w?"bg-white dark:bg-zinc-800 text-slate-900 dark:text-white font-medium shadow-sm border border-slate-200 dark:border-zinc-700/60":te?"bg-slate-200/70 dark:bg-zinc-800/60 text-slate-900 dark:text-zinc-100 border border-slate-300 dark:border-zinc-600":"text-slate-600 dark:text-zinc-400 hover:bg-slate-200/50 dark:hover:bg-zinc-800/50 hover:text-slate-900 dark:hover:text-zinc-200 border border-transparent"} ${te&&I?"outline outline-1 -outline-offset-1 outline-slate-400 dark:outline-zinc-500":""}`,children:[s.jsxs("div",{className:"flex items-center space-x-2 truncate",children:[s.jsx(xo,{size:14,className:`${w||te?"text-red-500 dark:text-red-400":"text-slate-400 dark:text-zinc-500 group-hover:text-slate-600 dark:group-hover:text-zinc-400"}`}),s.jsx("span",{className:"truncate",children:Y.name})]}),s.jsxs("div",{className:"flex items-center space-x-1 pl-2",children:[Y.foreign_keys_count>0&&s.jsx(sn,{size:11,className:"text-slate-400 dark:text-zinc-600",title:`${Y.foreign_keys_count} foreign keys`}),Y.primary_keys.length>0&&s.jsx(fo,{size:11,className:"text-slate-400 dark:text-zinc-600",title:`Primary key: ${Y.primary_keys.join(", ")}`}),s.jsx("span",{className:`text-[10px] px-1.5 py-0.5 rounded-full ${w?"bg-slate-100 dark:bg-zinc-700/80 text-slate-700 dark:text-zinc-200":"bg-slate-200/60 dark:bg-zinc-950 text-slate-500 dark:text-zinc-500 group-hover:text-slate-700 dark:group-hover:text-zinc-400"}`,children:Y.row_count.toLocaleString()})]})]},Y.name)})]}),s.jsx("div",{className:"h-9 px-3 border-t border-slate-200 dark:border-zinc-800 bg-slate-100/50 dark:bg-zinc-950/40 text-[11px] text-slate-500 dark:text-zinc-500 flex items-center justify-between font-mono shrink-0",children:s.jsxs("div",{className:"flex items-center space-x-1.5",children:[s.jsx(w1,{size:13,className:"text-slate-400 dark:text-zinc-500"}),s.jsxs("span",{children:[o.length," schemas loaded"]})]})})]})};var $1=eh();function W1(){const o=window.__RAILS_STUDIO_CONFIG__;return o&&o.apiBase?o.apiBase:"/rails_studio/api"}function F1(){return window.__RAILS_STUDIO_CONFIG__||{basePath:"/rails_studio",apiBase:"/rails_studio/api",railsVersion:"8.1",rubyVersion:"3.4",environment:"development",readOnly:!1}}async function ta(o,h={}){const U=`${W1()}${o}`,r=await fetch(U,{headers:{"Content-Type":"application/json",Accept:"application/json",...h.headers},...h}),R=await r.json().catch(()=>({}));if(!r.ok){const I=R.error||(R.errors?R.errors.join(", "):`HTTP error ${r.status}`);throw new Error(I)}return R}async function P1(){return ta("/overview")}async function yo(o){return ta(`/tables/${encodeURIComponent(o)}/schema`)}async function ux(o,h=1,U=50,r,R="asc",I=[]){const ee=new URLSearchParams;if(ee.set("page",String(h)),ee.set("per_page",String(U)),r&&(ee.set("sort_by",r),ee.set("sort_order",R)),I.length>0){const B=I.map(({column:P,op:le,value:q})=>({column:P,op:le,value:q}));ee.set("filters",JSON.stringify(B))}return ta(`/tables/${encodeURIComponent(o)}/records?${ee.toString()}`)}async function ey(o,h){return ta(`/tables/${encodeURIComponent(o)}/records/${encodeURIComponent(String(h))}`)}async function ty(o,h){return ta(`/tables/${encodeURIComponent(o)}/records`,{method:"POST",body:JSON.stringify({record:h})})}async function ku(o,h){return ta(`/tables/${encodeURIComponent(o)}/records/batch`,{method:"POST",body:JSON.stringify(h)})}async function ly(o){return ta("/query",{method:"POST",body:JSON.stringify({sql:o})})}async function ay(o){return ta("/console/execute",{method:"POST",body:JSON.stringify({command:o})})}async function cx(){return ta("/console/completions")}const rx=({targetTable:o,value:h,onChange:U,isNullable:r=!0,onCommit:R,onCancel:I,autoFocus:ee=!1,inline:B=!1})=>{const[P,le]=p.useState(B),[q,y]=p.useState(!1),[$,ne]=p.useState([]),[j,C]=p.useState(""),[v,Y]=p.useState(!1),[w,te]=p.useState(null),xe=p.useRef(null),Te=p.useRef(null),Ee=p.useRef(null),ce=()=>{if(xe.current){const W=xe.current.getBoundingClientRect(),X=250,T=window.innerHeight-W.bottom<X&&W.top>X?Math.max(8,W.top-X-4):W.bottom+4,D=Math.max(W.width,240),ae=Math.max(8,Math.min(W.left,window.innerWidth-D-8));te({top:T,left:ae,width:D})}};p.useEffect(()=>{if(P)return ce(),window.addEventListener("resize",ce),window.addEventListener("scroll",ce,!0),()=>{window.removeEventListener("resize",ce),window.removeEventListener("scroll",ce,!0)}},[P]),p.useEffect(()=>{let W=!0;async function X(){y(!0);try{const re=await ux(o,1,50);W&&ne(re.records)}catch{}finally{W&&y(!1)}}return X(),()=>{W=!1}},[o]),p.useEffect(()=>{P&&setTimeout(()=>{var W;return(W=Ee.current)==null?void 0:W.focus()},50)},[P]),p.useEffect(()=>{function W(X){const re=X.target;xe.current&&!xe.current.contains(re)&&Te.current&&!Te.current.contains(re)&&(le(!1),B&&(R==null||R()))}return document.addEventListener("mousedown",W),()=>document.removeEventListener("mousedown",W)},[B,R]);const fe=W=>{const X=W.id!==void 0?W.id:Object.values(W)[0],re=W.name||W.title||W.email||W.slug||W.username||W.label||W.description;return re?`#${X} - ${re}`:`#${X}`},pe=$.filter(W=>{const X=j.toLowerCase();return String(W.id??Object.values(W)[0]).includes(X)?!0:((W.name||W.title||W.email||W.slug||W.username||"")+"").toLowerCase().includes(X)}),Ne=$.find(W=>String(W.id??Object.values(W)[0])===String(h)),Ie=W=>{U(W),le(!1),R==null||R()},Oe=W=>{if(W.key==="Escape"){if(W.preventDefault(),W.stopPropagation(),P){le(!1);return}I==null||I()}};return v?s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx("input",{autoFocus:ee,type:"number",value:h??"",onChange:W=>U(W.target.value),onBlur:R,onKeyDown:W=>{W.key==="Enter"&&(R==null||R()),W.key==="Escape"&&(W.preventDefault(),W.stopPropagation(),I==null||I())},placeholder:`ID in ${o}`,className:"w-full bg-white dark:bg-zinc-900 border border-blue-500 dark:border-blue-400 rounded px-2 py-1 text-xs text-slate-900 dark:text-zinc-100 focus:outline-none font-mono shadow-xs"}),s.jsx("button",{type:"button",onClick:()=>Y(!1),className:"text-[10px] text-blue-600 dark:text-blue-400 hover:underline shrink-0",children:"List"})]}):s.jsxs("div",{ref:xe,className:`relative ${B?"min-w-[180px] w-full h-full":"w-full"}`,onKeyDown:Oe,children:[s.jsxs("div",{onClick:()=>le(!P),className:`w-full bg-white dark:bg-zinc-900 ${B?"h-full border-2 border-blue-500 dark:border-blue-400 px-2 py-0 rounded-none":"border border-slate-300 dark:border-zinc-800 py-1.5 px-2.5 rounded"} text-xs font-mono cursor-pointer flex items-center justify-between transition hover:border-slate-400 dark:hover:border-zinc-700 shadow-xs ${P?"ring-1 ring-blue-500 dark:ring-blue-400":""}`,children:[s.jsxs("div",{className:"flex items-center space-x-1.5 truncate",children:[s.jsx(sn,{size:12,className:"text-blue-500 shrink-0"}),Ne?s.jsx("span",{className:"text-slate-900 dark:text-zinc-100 font-medium truncate",children:fe(Ne)}):h!=null&&h!==""?s.jsxs("span",{className:"text-slate-900 dark:text-zinc-100 font-medium truncate",children:["#",h]}):s.jsx("span",{className:"text-slate-400 dark:text-zinc-500 italic truncate text-[11px]",children:r?"Select foreign relation...":"Select record..."})]}),s.jsx(ch,{size:13,className:`text-slate-400 shrink-0 transition-transform ${P?"rotate-180":""}`})]}),P&&w&&$1.createPortal(s.jsxs("div",{ref:Te,style:{position:"fixed",top:`${w.top}px`,left:`${w.left}px`,width:`${w.width}px`,zIndex:99999},className:"bg-white dark:bg-zinc-900 border border-slate-200 dark:border-zinc-800 rounded-lg shadow-2xl overflow-hidden flex flex-col text-xs animate-in fade-in zoom-in-95 duration-100 font-mono",children:[s.jsxs("div",{className:"p-2 border-b border-slate-100 dark:border-zinc-800 flex items-center space-x-2 bg-slate-50/80 dark:bg-zinc-950/60",children:[s.jsx(ei,{size:12,className:"text-slate-400 shrink-0"}),s.jsx("input",{ref:Ee,type:"text",placeholder:`Search in ${o}...`,value:j,onChange:W=>C(W.target.value),onClick:W=>W.stopPropagation(),onKeyDown:W=>{if(W.key==="Enter"&&(W.preventDefault(),pe.length>0)){const X=pe[0].id??Object.values(pe[0])[0];Ie(X)}W.key==="Escape"&&(W.preventDefault(),W.stopPropagation(),le(!1))},className:"flex-1 bg-transparent text-xs text-slate-900 dark:text-zinc-100 placeholder-slate-400 dark:placeholder-zinc-500 focus:outline-none font-mono"})]}),s.jsxs("div",{className:"max-h-56 overflow-y-auto divide-y divide-slate-100 dark:divide-zinc-800/40",children:[r&&s.jsxs("button",{type:"button",onClick:()=>Ie(null),className:"w-full text-left px-3 py-1.5 text-xs text-slate-400 dark:text-zinc-500 hover:bg-slate-100 dark:hover:bg-zinc-800 transition flex items-center justify-between italic",children:[s.jsx("span",{children:"None (null)"}),!h&&s.jsx(Pn,{size:12,className:"text-emerald-500"})]}),q?s.jsx("div",{className:"p-3 text-center text-slate-400 dark:text-zinc-500 font-mono text-xs",children:"Loading records..."}):pe.length===0?s.jsx("div",{className:"p-3 text-center text-slate-400 dark:text-zinc-500 font-mono text-xs",children:"No matching records"}):pe.map(W=>{const X=W.id!==void 0?W.id:Object.values(W)[0],re=String(h)===String(X),F=fe(W);return s.jsxs("button",{type:"button",onClick:()=>Ie(X),className:`w-full text-left px-3 py-1.5 text-xs font-mono transition flex items-center justify-between ${re?"bg-blue-50/90 dark:bg-blue-950/50 text-blue-700 dark:text-blue-300 font-medium":"text-slate-800 dark:text-zinc-200 hover:bg-slate-100/80 dark:hover:bg-zinc-800/60"}`,children:[s.jsx("span",{className:"truncate pr-2",children:F}),re&&s.jsx(Pn,{size:12,className:"text-blue-600 dark:text-blue-400 shrink-0"})]},X)})]}),s.jsx("div",{className:"p-1.5 border-t border-slate-100 dark:border-zinc-800 bg-slate-50 dark:bg-zinc-950/50 flex justify-end",children:s.jsx("button",{type:"button",onClick:()=>{Y(!0),le(!1)},className:"text-[10px] text-slate-500 hover:text-slate-800 dark:text-zinc-400 dark:hover:text-zinc-200 underline",children:"Enter raw ID manually"})})]}),document.body)]})};function un(o){return o==null||o===""?null:typeof o=="boolean"?o:o===1||o==="1"||o==="t"||o==="true"||o==="TRUE"?!0:o===0||o==="0"||o==="f"||o==="false"||o==="FALSE"?!1:!!o}const Tu=({value:o,onChange:h,disabled:U})=>{const r=un(o)===!0;return s.jsx("button",{type:"button",role:"switch","aria-checked":r,disabled:U,title:r?"true":"false",onClick:R=>{R.preventDefault(),R.stopPropagation(),h(!r)},onDoubleClick:R=>R.stopPropagation(),className:`relative inline-flex h-5 w-9 shrink-0 items-center rounded-full transition-colors disabled:opacity-40 ${r?"bg-emerald-500":"bg-slate-300 dark:bg-zinc-600"}`,children:s.jsx("span",{className:`inline-block h-4 w-4 rounded-full bg-white shadow-sm transition-transform ${r?"translate-x-4":"translate-x-0.5"}`})})};function ny(o){var U,r,R;if(!o)return"";const h=String(o).trim();try{const I=new Date(h);if(!isNaN(I.getTime())){const ee=B=>String(B).padStart(2,"0");return`${I.getFullYear()}-${ee(I.getMonth()+1)}-${ee(I.getDate())}T${ee(I.getHours())}:${ee(I.getMinutes())}`}}catch{}if(h.includes(" ")&&!h.includes("T")){const I=h.split(" "),ee=((U=I[1])==null?void 0:U.split(".")[0])||"00:00";return`${I[0]}T${ee.slice(0,5)}`}if(h.includes("T")){const I=h.split("T"),ee=((R=(r=I[1])==null?void 0:r.split(".")[0])==null?void 0:R.replace("Z",""))||"00:00";return`${I[0]}T${ee.slice(0,5)}`}return h}function iy(o){if(!o)return"";const h=String(o).trim();try{const U=new Date(h);if(!isNaN(U.getTime())){const r=R=>String(R).padStart(2,"0");return`${U.getFullYear()}-${r(U.getMonth()+1)}-${r(U.getDate())}`}}catch{}return h.split("T")[0].split(" ")[0]}function sy(o){if(!o)return"";const h=String(o).trim();return h.includes(" ")?h.split(" ")[1].slice(0,5):h.includes("T")?h.split("T")[1].slice(0,5):h.slice(0,5)}const uy=({schema:o,records:h,totalCount:U,page:r,perPage:R,sortBy:I,sortOrder:ee,filters:B,loading:P,stagedChanges:le,onPageChange:q,onPerPageChange:y,onSortChange:$,onFiltersChange:ne,onRefresh:j,onOpenInsertModal:C,onStageCellChange:v,onDeleteSelectedRows:Y,onOpenForeignKey:w,showFilterBar:te,onToggleFilterBar:xe,navActive:Te=!1,onActivate:Ee})=>{const[ce,fe]=p.useState(new Set),[pe,Ne]=p.useState(0),[Ie,Oe]=p.useState(!1),W=te!==void 0?te:Ie,X=xe||(()=>Oe(Z=>!Z)),[re,F]=p.useState(null),[T,D]=p.useState(null),[ae,me]=p.useState(""),[be,je]=p.useState(null),[Me,f]=p.useState(!1),[L,oe]=p.useState(B),E=p.useRef(null);p.useEffect(()=>{oe(B)},[B]),p.useEffect(()=>{fe(new Set),D(null),F(null),Ne(0)},[o.table_name,r]),p.useEffect(()=>{T&&E.current&&(E.current.focus(),"select"in E.current&&typeof E.current.select=="function"&&E.current.select())},[T==null?void 0:T.rowId,T==null?void 0:T.column]);const G=async()=>{if(ce.size===0)return;await Y(Array.from(ce))!==!1&&fe(new Set)};p.useEffect(()=>{if(!be)return;const Z=J=>{var H;if(J.key!=="Escape")return;const O=J.target,N=(H=O==null?void 0:O.tagName)==null?void 0:H.toLowerCase();N==="input"||N==="textarea"||N==="select"||O!=null&&O.isContentEditable||(J.preventDefault(),J.stopImmediatePropagation(),je(null))};return window.addEventListener("keydown",Z,!0),()=>window.removeEventListener("keydown",Z,!0)},[be]);const Q=o.primary_keys[0]||"id",ie=Z=>o.primary_keys.length>1?o.primary_keys.map(J=>Z[J]).join(","):Z[Q],K=()=>{f(!0),j(),setTimeout(()=>f(!1),750)},ue=Z=>{if(Z){const J=new Set(h.map(ie));fe(J)}else fe(new Set)},we=Z=>{const J=new Set(ce);J.has(Z)?J.delete(Z):J.add(Z),fe(J)};p.useEffect(()=>{pe>=h.length&&Ne(Math.max(0,h.length-1))},[h.length,pe]),p.useEffect(()=>{if(!Te)return;const Z=document.querySelector(`[data-row-focus="${pe}"]`);Z&&Z.scrollIntoView({block:"nearest"})},[pe,Te]),p.useEffect(()=>{const Z=J=>{var H;const O=J.target,N=(H=O==null?void 0:O.tagName)==null?void 0:H.toLowerCase();if(!(N==="input"||N==="textarea"||N==="select"||O!=null&&O.isContentEditable||T||be||J.ctrlKey||J.metaKey||J.altKey)){if(J.key==="r"||J.key==="R"){J.preventDefault(),K();return}if((J.key==="d"||J.key==="D")&&ce.size>0){J.preventDefault(),G();return}if(!(!Te||h.length===0)){if(J.key==="ArrowDown"){J.preventDefault(),Ne(Xe=>Math.min(h.length-1,Xe+1));return}if(J.key==="ArrowUp"){J.preventDefault(),Ne(Xe=>Math.max(0,Xe-1));return}if(J.key===" "||J.code==="Space"){J.preventDefault();const Xe=h[pe];Xe&&we(ie(Xe))}}}};return window.addEventListener("keydown",Z),()=>window.removeEventListener("keydown",Z)},[Te,h,pe,T,be,ce,j,Y]);const Ze=(Z,J,O)=>{const N=`${Z}:${J}`,ze=le.get(N);return ze?ze.newValue:O},Je=(Z,J,O)=>{const N=o.columns.find(H=>H.name===J);if(N!=null&&N.primary&&(N.type==="integer"||N.name==="id"))return;const ze=Ze(Z,J,O);if((N==null?void 0:N.type)==="boolean"){const H=un(ze)!==!0;v(Z,J,O,H);return}if(F({rowId:Z,column:J}),D({rowId:Z,column:J}),N!=null&&N.foreign_key){me(ze??"");return}if((N==null?void 0:N.type)==="datetime"||(N==null?void 0:N.type)==="timestamp"){me(ny(ze));return}if((N==null?void 0:N.type)==="date"){me(iy(ze));return}if((N==null?void 0:N.type)==="time"){me(sy(ze));return}me(ze==null?"":String(ze))},Ue=(Z=0)=>{if(!T)return;const{rowId:J,column:O}=T,N=h.find(rt=>ie(rt)===J);if(!N)return;const ze=N[O],H=o.columns.find(rt=>rt.name===O);let Xe=ae;if(ae===""&&(H!=null&&H.null)&&H.type!=="string"&&H.type!=="text"?Xe=null:(H==null?void 0:H.type)==="integer"?Xe=ae===""?null:parseInt(ae,10):(H==null?void 0:H.type)==="float"||(H==null?void 0:H.type)==="decimal"?Xe=ae===""?null:parseFloat(ae):(H==null?void 0:H.type)==="boolean"?Xe=ae===""?H.null?null:!1:ae==="true"||ae===!0:((H==null?void 0:H.type)==="datetime"||(H==null?void 0:H.type)==="timestamp"||(H==null?void 0:H.type)==="date"||(H==null?void 0:H.type)==="time")&&(Xe=ae===""?H.null?null:"":ae),v(J,O,ze,Xe),D(null),Z!==0){const ut=o.columns.findIndex(nt=>nt.name===O)+Z;if(ut>=0&&ut<o.columns.length){const nt=o.columns[ut];nt.primary||setTimeout(()=>{Je(J,nt.name,N[nt.name])},50)}}},De=()=>{D(null)},qe=(Z,J,O,N)=>{Z.key==="Enter"&&(Z.preventDefault(),Je(J,O,N))},zt=(Z,J,O,N)=>{const ze=Ze(Z,J,O);je({rowId:Z,column:J,value:ze==null?"":typeof ze=="object"?JSON.stringify(ze,null,2):String(ze),originalVal:O,type:N})},ht=()=>{if(!be)return;const{rowId:Z,column:J,value:O,originalVal:N,type:ze}=be;let H=O;if(ze==="json"||ze==="jsonb")try{H=JSON.parse(O)}catch{}v(Z,J,N,H),je(null)},St=()=>{var J;const Z=((J=o.columns[0])==null?void 0:J.name)||"id";oe([...L,{id:String(Date.now()),column:Z,op:"contains",value:""}])},dt=Z=>{oe(L.filter(J=>J.id!==Z))},Et=()=>{const Z=L.filter(J=>J.op==="is_null"||J.op==="is_not_null"||J.value.trim()!=="");ne(Z)},qt=()=>{oe([]),ne([])},Il=Z=>{const J=[...B];J.splice(Z,1),ne(J)},Ut=Math.max(1,Math.ceil(U/R)),ul=Z=>{if(Z.primary)return s.jsx(fo,{size:12,className:"text-amber-500 dark:text-amber-400 shrink-0"});if(Z.foreign_key)return s.jsx(sn,{size:12,className:"text-blue-500 dark:text-blue-400 shrink-0"});switch(Z.type){case"integer":case"float":case"decimal":return s.jsx(M1,{size:12,className:"text-emerald-500 dark:text-emerald-400 shrink-0"});case"boolean":return s.jsx(I1,{size:12,className:"text-purple-500 dark:text-purple-400 shrink-0"});case"datetime":case"date":case"time":return s.jsx(v1,{size:12,className:"text-orange-500 dark:text-orange-400 shrink-0"});case"json":case"jsonb":return s.jsx(y1,{size:12,className:"text-sky-500 dark:text-sky-400 shrink-0"});default:return s.jsx(U1,{size:12,className:"text-slate-400 dark:text-zinc-400 shrink-0"})}};return s.jsxs("div",{className:"flex-1 flex flex-col h-full min-h-0 overflow-hidden bg-white dark:bg-zinc-950 select-none transition-colors",onMouseDown:()=>Ee==null?void 0:Ee(),children:[s.jsxs("div",{className:"h-[46px] px-2.5 border-b border-slate-200 dark:border-zinc-800 bg-slate-50/80 dark:bg-zinc-900/30 flex items-center justify-between gap-3 text-xs",children:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsxs("button",{onClick:X,className:`px-2.5 py-1.5 rounded-md flex items-center space-x-1.5 transition border ${B.length>0||W?"bg-slate-200/90 dark:bg-zinc-800 border-slate-300 dark:border-zinc-700 text-slate-900 dark:text-zinc-100 font-medium":"bg-white dark:bg-zinc-900 border-slate-200 dark:border-zinc-800 text-slate-600 dark:text-zinc-400 hover:text-slate-900 dark:hover:text-zinc-200 shadow-xs"}`,title:"Toggle filters (F)",children:[s.jsx(zu,{size:13}),s.jsx("span",{children:"Filter"}),B.length>0&&s.jsx("span",{className:"w-4 h-4 rounded-full bg-red-500 text-white dark:bg-red-500/30 dark:text-red-300 text-[10px] flex items-center justify-center font-mono",children:B.length}),s.jsx("kbd",{className:"hidden sm:inline-flex px-1.5 py-0.2 text-[9px] font-mono rounded bg-slate-100 dark:bg-zinc-800 border border-slate-200 dark:border-zinc-700 text-slate-400 dark:text-zinc-500",children:"F"})]}),s.jsxs("button",{onClick:K,disabled:P||Me,className:`px-2.5 py-1.5 rounded-md border transition shadow-xs flex items-center space-x-1.5 ${P||Me?"bg-red-50 dark:bg-red-950/40 border-red-200 dark:border-red-900/60 text-red-600 dark:text-red-400":"bg-white dark:bg-zinc-900 border-slate-200 dark:border-zinc-800 text-slate-600 dark:text-zinc-400 hover:text-slate-900 dark:hover:text-zinc-200 hover:bg-slate-100 dark:hover:bg-zinc-800"}`,title:"Refresh records (R)",children:[s.jsx(Yh,{size:13,className:`transition-all ${P||Me?"animate-spin text-red-500":""}`}),s.jsx("span",{className:"hidden sm:inline",children:P||Me?"Refreshing...":"Refresh"}),s.jsx("kbd",{className:"hidden sm:inline-flex px-1.5 py-0.2 text-[9px] font-mono rounded bg-slate-100 dark:bg-zinc-800 border border-slate-200 dark:border-zinc-700 text-slate-400 dark:text-zinc-500",children:"R"})]}),s.jsx("span",{className:"text-[11px] text-slate-400 dark:text-zinc-500 font-mono hidden xl:inline-block pl-2",children:"Tip: Double-click or select cell & press Enter to edit inline"})]}),s.jsxs("div",{className:"flex items-center space-x-2",children:[ce.size>0&&s.jsxs("button",{onClick:()=>void G(),className:"px-3 py-1.5 rounded-md bg-rose-50 dark:bg-red-950/80 border border-rose-200 dark:border-red-800 text-rose-700 dark:text-red-300 hover:bg-rose-100 dark:hover:bg-red-900/80 transition flex items-center space-x-1.5",title:"Delete selected rows (D)",children:[s.jsx(Ji,{size:13}),s.jsxs("span",{children:["Delete (",ce.size,")"]}),s.jsx("kbd",{className:"hidden sm:inline-flex px-1.5 py-0.2 text-[9px] font-mono rounded bg-rose-100 dark:bg-red-900/80 border border-rose-200 dark:border-red-800 text-rose-600 dark:text-red-300",children:"D"})]}),s.jsxs("button",{onClick:C,className:"px-3 py-1.5 rounded-md bg-slate-900 hover:bg-slate-800 text-white dark:bg-zinc-100 dark:hover:bg-white dark:text-zinc-900 font-medium transition flex items-center space-x-1.5 shadow-sm",children:[s.jsx(Nu,{size:14}),s.jsx("span",{children:"Add Row"}),s.jsx("kbd",{className:"hidden sm:inline-flex px-1 py-0.2 text-[9px] font-mono rounded bg-slate-800 dark:bg-zinc-200 text-slate-300 dark:text-zinc-700",children:"N"})]})]})]}),B.length>0&&!W&&s.jsxs("div",{className:"px-3 py-1.5 bg-slate-50 dark:bg-zinc-900/60 border-b border-slate-200 dark:border-zinc-800/80 flex items-center space-x-2 overflow-x-auto text-xs font-mono",children:[s.jsxs("span",{className:"text-[10px] uppercase font-semibold text-slate-400 dark:text-zinc-500 shrink-0 flex items-center gap-1",children:[s.jsx(zu,{size:11})," Filters:"]}),B.map((Z,J)=>s.jsxs("span",{className:"inline-flex items-center space-x-1 px-2 py-0.5 rounded-full bg-white dark:bg-zinc-800 border border-slate-200 dark:border-zinc-700 text-slate-700 dark:text-zinc-300 text-[11px] shadow-2xs",children:[s.jsx("span",{className:"font-semibold text-slate-900 dark:text-white",children:Z.column}),s.jsx("span",{className:"text-slate-400 dark:text-zinc-500",children:Z.op}),Z.value&&s.jsxs("span",{className:"text-red-600 dark:text-red-400 font-medium truncate max-w-[120px]",children:['"',Z.value,'"']}),s.jsx("button",{onClick:()=>Il(J),className:"p-0.5 text-slate-400 hover:text-slate-600 dark:hover:text-zinc-200 rounded-full",children:s.jsx(Ll,{size:11})})]},J)),s.jsx("button",{onClick:qt,className:"text-[11px] text-slate-400 hover:text-red-500 dark:hover:text-red-400 underline shrink-0 pl-1",children:"Clear all"})]}),W&&s.jsxs("div",{className:"p-3.5 border-b border-slate-200 dark:border-zinc-800 bg-slate-50/90 dark:bg-zinc-900/60 flex flex-col space-y-3 animate-in slide-in-from-top-2 duration-150",children:[s.jsxs("div",{className:"flex items-center justify-between text-xs text-slate-600 dark:text-zinc-400",children:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx(zu,{size:13,className:"text-slate-500 dark:text-zinc-400"}),s.jsx("span",{className:"font-semibold text-slate-800 dark:text-zinc-200 text-xs",children:"Filter Table Records"}),s.jsxs("span",{className:"text-[11px] text-slate-400 dark:text-zinc-500 font-mono",children:["(",L.length," ",L.length===1?"condition":"conditions",")"]})]}),s.jsxs("div",{className:"flex items-center space-x-2",children:[L.length>0&&s.jsx("button",{onClick:qt,className:"text-xs text-slate-500 hover:text-slate-800 dark:text-zinc-400 dark:hover:text-zinc-200 px-2 py-1 rounded hover:bg-slate-200/60 dark:hover:bg-zinc-800 transition",children:"Clear All"}),s.jsxs("button",{onClick:Et,className:"px-3 py-1 rounded-md bg-red-600 hover:bg-red-500 text-white font-medium text-xs transition shadow-xs flex items-center gap-1",children:[s.jsx(Pn,{size:12}),s.jsx("span",{children:"Apply Filters"})]})]})]}),s.jsxs("div",{className:"space-y-2",children:[L.length===0?s.jsx("div",{className:"text-center p-3 text-slate-400 dark:text-zinc-500 font-mono text-xs bg-white/60 dark:bg-zinc-950/40 rounded-lg border border-dashed border-slate-200 dark:border-zinc-800",children:"No active filter conditions. Click below to add one."}):L.map(Z=>s.jsxs("div",{className:"flex items-center space-x-2 text-xs bg-white dark:bg-zinc-950 p-2 rounded-lg border border-slate-200 dark:border-zinc-800 shadow-2xs",children:[s.jsx("select",{value:Z.column,onChange:J=>{const O=L.map(N=>N.id===Z.id?{...N,column:J.target.value}:N);oe(O)},className:"bg-slate-50 dark:bg-zinc-900 border border-slate-200 dark:border-zinc-800 rounded px-2.5 py-1.5 text-slate-800 dark:text-zinc-200 font-mono text-xs focus:outline-none focus:border-slate-400 dark:focus:border-zinc-700",children:o.columns.map(J=>s.jsxs("option",{value:J.name,children:[J.name," (",J.type,")"]},J.name))}),s.jsxs("select",{value:Z.op,onChange:J=>{const O=L.map(N=>N.id===Z.id?{...N,op:J.target.value}:N);oe(O)},className:"bg-slate-50 dark:bg-zinc-900 border border-slate-200 dark:border-zinc-800 rounded px-2.5 py-1.5 text-slate-800 dark:text-zinc-200 font-mono text-xs focus:outline-none focus:border-slate-400 dark:focus:border-zinc-700",children:[s.jsx("option",{value:"contains",children:"contains"}),s.jsx("option",{value:"eq",children:"equals (=)"}),s.jsx("option",{value:"not_eq",children:"not equals (!=)"}),s.jsx("option",{value:"starts_with",children:"starts with"}),s.jsx("option",{value:"ends_with",children:"ends with"}),s.jsx("option",{value:"gt",children:"> (greater than)"}),s.jsx("option",{value:"gte",children:">= (greater or equal)"}),s.jsx("option",{value:"lt",children:"< (less than)"}),s.jsx("option",{value:"lte",children:"<= (less or equal)"}),s.jsx("option",{value:"is_null",children:"is null"}),s.jsx("option",{value:"is_not_null",children:"is not null"})]}),Z.op!=="is_null"&&Z.op!=="is_not_null"&&s.jsx("input",{type:"text",placeholder:"Filter value... (press Enter to apply)",value:Z.value,onChange:J=>{const O=L.map(N=>N.id===Z.id?{...N,value:J.target.value}:N);oe(O)},onKeyDown:J=>{J.key==="Enter"&&Et(),J.key==="Escape"&&(J.preventDefault(),J.stopPropagation(),J.currentTarget.blur())},className:"flex-1 bg-slate-50 dark:bg-zinc-900 border border-slate-200 dark:border-zinc-800 rounded px-2.5 py-1.5 text-slate-800 dark:text-zinc-200 font-mono text-xs focus:outline-none focus:border-slate-400 dark:focus:border-zinc-700"}),s.jsx("button",{onClick:()=>dt(Z.id),className:"p-1.5 text-slate-400 hover:text-slate-600 dark:text-zinc-500 dark:hover:text-zinc-300 rounded hover:bg-slate-100 dark:hover:bg-zinc-800 transition",title:"Remove condition",children:s.jsx(Ll,{size:14})})]},Z.id)),s.jsxs("button",{onClick:St,className:"text-xs text-slate-600 hover:text-slate-900 dark:text-zinc-400 dark:hover:text-zinc-100 flex items-center space-x-1.5 px-2 py-1 rounded hover:bg-slate-200/50 dark:hover:bg-zinc-800/50 transition font-mono",children:[s.jsx(Nu,{size:13,className:"text-red-500"}),s.jsx("span",{children:"Add condition"})]})]})]}),s.jsx("div",{className:"flex-1 overflow-auto relative min-h-0",children:s.jsxs("table",{className:"w-full text-left font-mono text-xs border-separate border-spacing-0",children:[s.jsx("thead",{className:"bg-slate-100/90 dark:bg-zinc-900 sticky top-0 border-b border-slate-200 dark:border-zinc-800 z-10 shadow-xs backdrop-blur",children:s.jsxs("tr",{children:[s.jsx("th",{className:"p-2.5 w-10 border-r border-slate-200 dark:border-zinc-800/80 text-center",children:s.jsx("input",{type:"checkbox",checked:h.length>0&&ce.size===h.length,onChange:Z=>ue(Z.target.checked),className:"rounded border-slate-300 dark:border-zinc-700 bg-white dark:bg-zinc-950 text-red-500 focus:ring-0 cursor-pointer"})}),s.jsx("th",{className:"p-2.5 w-12 text-slate-400 dark:text-zinc-500 text-[10px] uppercase font-medium border-r border-slate-200 dark:border-zinc-800/80 text-center",children:"#"}),o.columns.map(Z=>{const J=I===Z.name;return s.jsx("th",{onClick:()=>$(Z.name),className:"p-2.5 font-medium text-xs text-slate-700 dark:text-zinc-300 border-r border-slate-200 dark:border-zinc-800/80 cursor-pointer hover:bg-slate-200/60 dark:hover:bg-zinc-800/60 transition group whitespace-nowrap",children:s.jsxs("div",{className:"flex items-center justify-between space-x-2",children:[s.jsxs("div",{className:"flex items-center space-x-1.5",children:[ul(Z),s.jsx("span",{className:Z.primary?"font-semibold text-slate-900 dark:text-white":"",children:Z.name}),s.jsx("span",{className:"text-[10px] text-slate-400 dark:text-zinc-500 font-normal",children:Z.type})]}),s.jsx("div",{className:"text-slate-400 dark:text-zinc-500 group-hover:text-slate-700 dark:group-hover:text-zinc-300",children:J?ee==="asc"?s.jsx(b1,{size:13,className:"text-red-500"}):s.jsx(x1,{size:13,className:"text-red-500"}):s.jsx(g1,{size:11,className:"opacity-0 group-hover:opacity-100"})})]})},Z.name)})]})}),s.jsx("tbody",{className:"divide-y divide-slate-100 dark:divide-zinc-800/40",children:h.length===0?s.jsx("tr",{children:s.jsx("td",{colSpan:o.columns.length+2,className:"p-12 text-center text-slate-400 dark:text-zinc-500 font-mono text-xs",children:P?"Fetching records...":"No records found in table."})}):h.map((Z,J)=>{const O=ie(Z),N=ce.has(O),ze=Te&&pe===J;return s.jsxs("tr",{"data-row-focus":J,onClick:()=>Ne(J),className:`transition-colors ${N?"bg-slate-100/80 dark:bg-zinc-800/50":"hover:bg-slate-50/80 dark:hover:bg-zinc-900/40"} ${ze?"relative z-[1] shadow-[inset_0_0_0_1px_#94a3b8] dark:shadow-[inset_0_0_0_1px_#71717a]":""}`,children:[s.jsx("td",{className:"p-2.5 text-center border-r border-slate-100 dark:border-zinc-800/40",children:s.jsx("input",{type:"checkbox",tabIndex:-1,checked:N,onChange:()=>we(O),className:"rounded border-slate-300 dark:border-zinc-700 bg-white dark:bg-zinc-950 text-red-500 focus:ring-0 cursor-pointer"})}),s.jsx("td",{className:"p-2.5 text-center text-[10px] text-slate-400 dark:text-zinc-600 border-r border-slate-100 dark:border-zinc-800/40",children:(r-1)*R+J+1}),o.columns.map(H=>{const Xe=`${O}:${H.name}`,rt=le.get(Xe),ut=!!rt,nt=ut?rt.newValue:Z[H.name],Ul=(T==null?void 0:T.rowId)===O&&(T==null?void 0:T.column)===H.name,Mt=(re==null?void 0:re.rowId)===O&&(re==null?void 0:re.column)===H.name,la=H.primary&&(H.type==="integer"||H.name==="id");return s.jsxs("td",{tabIndex:la?-1:0,onClick:()=>F({rowId:O,column:H.name}),onDoubleClick:()=>!la&&H.type!=="boolean"&&Je(O,H.name,Z[H.name]),onKeyDown:de=>!Ul&&qe(de,O,H.name,Z[H.name]),className:`${Ul?"p-0 relative":"p-2.5"} border-r border-slate-100 dark:border-zinc-800/40 whitespace-nowrap max-w-sm truncate relative group outline-none transition-all ${ut?"bg-amber-50 dark:bg-amber-950/20 text-amber-900 dark:text-amber-200 ring-1 ring-inset ring-amber-400 dark:ring-amber-500/50":Mt&&!Ul?"ring-2 ring-inset ring-blue-500/80 bg-blue-50/20 dark:bg-blue-950/10":""} ${la?"cursor-default":"cursor-cell"}`,children:[Ul?s.jsx("div",{className:"absolute inset-0 w-full h-full flex items-center z-20",children:H.foreign_key?s.jsx("div",{className:"w-full h-full min-w-[200px]",children:s.jsx(rx,{targetTable:H.foreign_key.to_table,value:ae,onChange:de=>{me(de);const cn=Z[H.name];v(O,H.name,cn,de),D(null)},isNullable:H.null,onCommit:()=>Ue(),onCancel:De,inline:!0,autoFocus:!0})}):H.enum_values&&H.enum_values.length>0?s.jsxs("select",{ref:E,value:ae,onChange:de=>me(de.target.value),onBlur:()=>Ue(),onKeyDown:de=>{de.key==="Enter"&&Ue(),de.key==="Escape"&&(de.preventDefault(),de.stopPropagation(),De()),de.key==="Tab"&&(de.preventDefault(),Ue(de.shiftKey?-1:1))},className:"w-full h-full bg-white dark:bg-zinc-900 border-2 border-blue-500 dark:border-blue-400 px-2 text-xs text-slate-900 dark:text-zinc-100 focus:outline-none font-mono shadow-xs",children:[H.null&&s.jsx("option",{value:"",children:"(null)"}),H.enum_values.map(de=>s.jsx("option",{value:de,children:de},de))]}):H.type==="datetime"||H.type==="timestamp"?s.jsx("input",{ref:E,type:"datetime-local",value:ae,onChange:de=>me(de.target.value),onBlur:()=>Ue(),onKeyDown:de=>{de.key==="Enter"&&Ue(),de.key==="Escape"&&(de.preventDefault(),de.stopPropagation(),De()),de.key==="Tab"&&(de.preventDefault(),Ue(de.shiftKey?-1:1))},className:"w-full h-full bg-white dark:bg-zinc-900 border-2 border-blue-500 dark:border-blue-400 px-2 text-xs text-slate-900 dark:text-zinc-100 focus:outline-none font-mono shadow-xs"}):H.type==="date"?s.jsx("input",{ref:E,type:"date",value:ae,onChange:de=>me(de.target.value),onBlur:()=>Ue(),onKeyDown:de=>{de.key==="Enter"&&Ue(),de.key==="Escape"&&(de.preventDefault(),de.stopPropagation(),De()),de.key==="Tab"&&(de.preventDefault(),Ue(de.shiftKey?-1:1))},className:"w-full h-full bg-white dark:bg-zinc-900 border-2 border-blue-500 dark:border-blue-400 px-2 text-xs text-slate-900 dark:text-zinc-100 focus:outline-none font-mono shadow-xs"}):H.type==="time"?s.jsx("input",{ref:E,type:"time",value:ae,onChange:de=>me(de.target.value),onBlur:()=>Ue(),onKeyDown:de=>{de.key==="Enter"&&Ue(),de.key==="Escape"&&(de.preventDefault(),de.stopPropagation(),De()),de.key==="Tab"&&(de.preventDefault(),Ue(de.shiftKey?-1:1))},className:"w-full h-full bg-white dark:bg-zinc-900 border-2 border-blue-500 dark:border-blue-400 px-2 text-xs text-slate-900 dark:text-zinc-100 focus:outline-none font-mono shadow-xs"}):H.type==="boolean"?s.jsx(Tu,{value:ae,onChange:de=>{me(String(de)),v(O,H.name,Z[H.name],de),D(null)}}):s.jsx("input",{ref:E,type:H.type==="integer"||H.type==="float"||H.type==="decimal"?"number":"text",step:H.type==="integer"?"1":"any",value:ae,onChange:de=>me(de.target.value),onBlur:()=>Ue(),onKeyDown:de=>{de.key==="Enter"&&Ue(),de.key==="Escape"&&(de.preventDefault(),de.stopPropagation(),De()),de.key==="Tab"&&(de.preventDefault(),Ue(de.shiftKey?-1:1))},className:"w-full h-full bg-white dark:bg-zinc-900 border-2 border-blue-500 dark:border-blue-400 px-2.5 text-xs text-slate-900 dark:text-zinc-100 focus:outline-none font-mono shadow-xs"})}):s.jsxs("div",{className:"flex items-center justify-between space-x-2",children:[H.type==="boolean"?s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Tu,{value:nt,onChange:de=>v(O,H.name,Z[H.name],de)}),s.jsx("span",{className:`text-[10px] font-mono ${un(nt)===!0?"text-emerald-600 dark:text-emerald-400":nt==null?"text-slate-400 dark:text-zinc-600 italic":"text-slate-400 dark:text-zinc-500"}`,children:nt==null?"null":un(nt)?"true":"false"})]}):H.foreign_key&&nt!==null&&nt!==void 0?s.jsx("div",{className:"flex items-center space-x-1.5 truncate",children:s.jsxs("button",{onClick:de=>{de.stopPropagation(),w(H.foreign_key.to_table,nt)},className:"inline-flex items-center space-x-1 px-1.5 py-0.5 rounded bg-blue-50 border border-blue-200 text-blue-700 hover:bg-blue-100 dark:bg-blue-950/60 dark:border-blue-800/60 dark:text-blue-300 dark:hover:bg-blue-900/60 transition text-xs",children:[s.jsx(sn,{size:10}),s.jsxs("span",{children:[H.foreign_key.to_table," #",String(nt)]}),s.jsx("span",{className:"text-[10px] text-blue-500 dark:text-blue-400",children:"↗"})]})}):nt==null?s.jsx("span",{className:"text-slate-400 dark:text-zinc-600 italic",children:"null"}):typeof nt=="object"?s.jsx("span",{className:"text-slate-600 dark:text-zinc-400 truncate",children:JSON.stringify(nt)}):s.jsx("span",{className:`truncate ${H.primary?"font-semibold text-slate-900 dark:text-zinc-100":"text-slate-800 dark:text-zinc-200"}`,children:String(nt)}),!la&&H.type!=="boolean"&&s.jsxs("div",{className:"opacity-0 group-hover:opacity-100 flex items-center space-x-1 shrink-0",children:[(H.type==="text"||H.type==="json"||H.type==="jsonb")&&s.jsx("button",{type:"button",onClick:de=>{de.stopPropagation(),zt(O,H.name,Z[H.name],H.type)},className:"p-0.5 rounded text-slate-400 hover:text-slate-700 dark:hover:text-zinc-200 hover:bg-slate-200 dark:hover:bg-zinc-800 transition",title:"Edit in full dialog modal",children:s.jsx(Ch,{size:11})}),s.jsx("button",{type:"button",onClick:de=>{de.stopPropagation(),Je(O,H.name,Z[H.name])},className:"p-0.5 rounded text-slate-400 hover:text-slate-700 dark:hover:text-zinc-200 hover:bg-slate-200 dark:hover:bg-zinc-800 transition",title:"Edit cell inline",children:s.jsx(Jm,{size:11})})]})]}),ut&&s.jsx("span",{className:"absolute top-1 right-1 w-1.5 h-1.5 rounded-full bg-amber-500 animate-pulse",title:`Original: ${Z[H.name]}`})]},H.name)})]},O??J)})})]})}),s.jsxs("footer",{className:"h-9 px-3 border-t border-slate-200 dark:border-zinc-800 bg-slate-50/80 dark:bg-zinc-900/40 flex items-center justify-between text-xs font-mono text-slate-500 dark:text-zinc-400 shrink-0",children:[s.jsxs("div",{className:"flex items-center space-x-3",children:[s.jsxs("span",{children:[U.toLocaleString()," ",U===1?"row":"rows"]}),s.jsx("span",{children:"•"}),s.jsxs("div",{className:"flex items-center space-x-1.5",children:[s.jsx("span",{children:"Rows per page:"}),s.jsxs("select",{value:R,onChange:Z=>y(Number(Z.target.value)),className:"bg-white dark:bg-zinc-950 border border-slate-200 dark:border-zinc-800 rounded px-1.5 py-0.5 text-xs text-slate-700 dark:text-zinc-200 focus:outline-none shadow-xs",children:[s.jsx("option",{value:"25",children:"25"}),s.jsx("option",{value:"50",children:"50"}),s.jsx("option",{value:"100",children:"100"})]})]})]}),s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsxs("span",{children:["Page ",r," of ",Ut]}),s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("button",{onClick:()=>q(r-1),disabled:r<=1,className:"p-1 rounded bg-white dark:bg-zinc-900 border border-slate-200 dark:border-zinc-800 text-slate-700 dark:text-zinc-300 hover:bg-slate-100 dark:hover:bg-zinc-800 disabled:opacity-40 disabled:hover:bg-white dark:disabled:hover:bg-zinc-900 transition shadow-xs",children:s.jsx(p1,{size:14})}),s.jsx("button",{onClick:()=>q(r+1),disabled:r>=Ut,className:"p-1 rounded bg-white dark:bg-zinc-900 border border-slate-200 dark:border-zinc-800 text-slate-700 dark:text-zinc-300 hover:bg-slate-100 dark:hover:bg-zinc-800 disabled:opacity-40 disabled:hover:bg-white dark:disabled:hover:bg-zinc-900 transition shadow-xs",children:s.jsx(z1,{size:14})})]})]})]}),be&&s.jsx("div",{className:"fixed inset-0 bg-black/50 dark:bg-black/70 backdrop-blur-xs z-50 flex items-center justify-center p-4",children:s.jsxs("div",{className:"bg-white dark:bg-zinc-900 border border-slate-200 dark:border-zinc-800 rounded-xl shadow-2xl max-w-lg w-full overflow-hidden flex flex-col animate-in zoom-in-95 duration-150",children:[s.jsxs("div",{className:"p-3.5 border-b border-slate-200 dark:border-zinc-800 bg-slate-50 dark:bg-zinc-950/50 flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx(Jm,{size:14,className:"text-blue-500"}),s.jsxs("h3",{className:"font-semibold text-slate-900 dark:text-zinc-100 text-xs font-mono",children:["Edit ",s.jsx("span",{className:"text-red-500",children:be.column})," (",be.type,")"]})]}),s.jsx("button",{onClick:()=>je(null),className:"p-1 rounded text-slate-400 hover:text-slate-700 dark:hover:text-zinc-200 hover:bg-slate-100 dark:hover:bg-zinc-800 transition",children:s.jsx(Ll,{size:15})})]}),s.jsxs("div",{className:"p-4 flex flex-col space-y-2",children:[s.jsx("textarea",{autoFocus:!0,rows:8,value:be.value,onChange:Z=>je({...be,value:Z.target.value}),onKeyDown:Z=>{Z.key==="Escape"&&(Z.preventDefault(),Z.stopPropagation(),Z.currentTarget.blur())},placeholder:"Enter value...",className:"w-full bg-slate-50 dark:bg-zinc-950 border border-slate-300 dark:border-zinc-800 rounded-lg p-3 font-mono text-xs text-slate-900 dark:text-zinc-100 focus:outline-none focus:border-blue-500 dark:focus:border-blue-400"}),s.jsxs("div",{className:"flex items-center justify-between text-[11px] text-slate-400 dark:text-zinc-500 font-mono",children:[s.jsxs("span",{children:["Length: ",be.value.length," chars"]}),(be.type==="json"||be.type==="jsonb")&&s.jsx("button",{type:"button",onClick:()=>{try{const Z=JSON.parse(be.value);je({...be,value:JSON.stringify(Z,null,2)})}catch{}},className:"text-blue-600 dark:text-blue-400 hover:underline",children:"Format JSON"})]})]}),s.jsxs("div",{className:"p-3 bg-slate-50 dark:bg-zinc-950/50 border-t border-slate-200 dark:border-zinc-800 flex justify-end space-x-2",children:[s.jsx("button",{type:"button",onClick:()=>je(null),className:"px-3 py-1.5 rounded text-xs text-slate-600 dark:text-zinc-400 hover:bg-slate-200/70 dark:hover:bg-zinc-800 transition",children:"Cancel"}),s.jsx("button",{type:"button",onClick:ht,className:"px-4 py-1.5 rounded bg-emerald-600 hover:bg-emerald-500 text-white text-xs font-medium transition shadow-xs",children:"Apply Edit"})]})]})})]})};function cy(o,h){const U={};return o.forEach((r,R)=>{U[r]=h[R]}),U}function pu(o,h,U){const r=cy(o,h);return U.map(R=>String(r[R])).join(",")}const ry=p.forwardRef(function({columns:h,rows:U,tableName:r,primaryKeys:R=[],schema:I,filter:ee,navActive:B=!1,onActivate:P,onSelectedChange:le,onRowsChange:q},y){const ne=!!!F1().readOnly&&!!r&&R.length>0&&R.every(E=>h.includes(E)),[j,C]=p.useState(new Set),[v,Y]=p.useState(new Map),[w,te]=p.useState(null),[xe,Te]=p.useState(""),[Ee,ce]=p.useState(!1),[fe,pe]=p.useState(null),[Ne,Ie]=p.useState(0),Oe=p.useRef(null);p.useEffect(()=>{C(new Set),Y(new Map),te(null),Ie(0)},[r,h.join("|")]),p.useEffect(()=>{w&&Oe.current&&(Oe.current.focus(),Oe.current.select())},[w==null?void 0:w.rowId,w==null?void 0:w.column]);const W=E=>I==null?void 0:I.columns.find(G=>G.name===E),X=p.useMemo(()=>{if(!ee.trim())return U;const E=ee.toLowerCase();return U.filter(G=>G.some(Q=>Q!=null&&String(Q).toLowerCase().includes(E)))},[U,ee]),re=E=>{pe(E),setTimeout(()=>pe(null),2500)},F=(E,G,Q,ie)=>{Y(K=>{const ue=new Map(K),we=`${E}:${G}`;return Object.is(Q,ie)||String(Q)===String(ie)?ue.delete(we):ue.set(we,{rowId:E,column:G,originalValue:Q,newValue:ie}),ue})},T=(E,G=U)=>G.map(Q=>{const ie=pu(h,Q,R);return h.map((K,ue)=>{const we=E.get(`${ie}:${K}`);return we?we.newValue:Q[ue]})}),D=(E,G,Q)=>{if(!ne)return;const ie=W(G);if(ie!=null&&ie.primary&&(ie.type==="integer"||ie.name==="id")||R.includes(G)&&((ie==null?void 0:ie.type)==="integer"||G==="id"))return;const K=v.get(`${E}:${G}`),ue=K?K.newValue:Q;if((ie==null?void 0:ie.type)==="boolean"){F(E,G,Q,un(ue)!==!0);return}te({rowId:E,column:G}),Te(ue==null?"":String(ue))},ae=()=>{if(!w)return;const{rowId:E,column:G}=w,Q=U.find(we=>pu(h,we,R)===E);if(!Q){te(null);return}const ie=Q[h.indexOf(G)],K=W(G);let ue=xe;xe===""&&(K!=null&&K.null)&&K.type!=="string"&&K.type!=="text"?ue=null:(K==null?void 0:K.type)==="integer"?ue=xe===""?null:parseInt(xe,10):((K==null?void 0:K.type)==="float"||(K==null?void 0:K.type)==="decimal")&&(ue=xe===""?null:parseFloat(xe)),F(E,G,ie,ue),te(null)},me=E=>{C(G=>{const Q=new Set(G);return Q.has(E)?Q.delete(E):Q.add(E),Q})},be=()=>{const E=X.map((Q,ie)=>Me(Q,ie)),G=E.length>0&&E.every(Q=>j.has(Q));C(G?new Set:new Set(E))};p.useEffect(()=>{Ne>=X.length&&Ie(Math.max(0,X.length-1))},[X.length,Ne]),p.useEffect(()=>{if(!B)return;const E=document.querySelector('[data-sql-row-focus="true"]');E&&E.scrollIntoView({block:"nearest"})},[Ne,B]),p.useEffect(()=>{const E=G=>{var ue;const Q=G.target,ie=(ue=Q==null?void 0:Q.tagName)==null?void 0:ue.toLowerCase();if(!(ie==="input"||ie==="textarea"||ie==="select"||Q!=null&&Q.isContentEditable||w||G.ctrlKey||G.metaKey||G.altKey)&&B){if((G.key==="d"||G.key==="D")&&j.size>0){G.preventDefault(),je();return}if(X.length!==0){if(G.key==="ArrowDown"){G.preventDefault(),Ie(we=>Math.min(X.length-1,we+1));return}if(G.key==="ArrowUp"){G.preventDefault(),Ie(we=>Math.max(0,we-1));return}if(G.key===" "||G.code==="Space"){G.preventDefault();const we=X[Ne];we&&me(Me(we,Ne))}}}};return window.addEventListener("keydown",E),()=>window.removeEventListener("keydown",E)},[B,X,Ne,w,j,ne,h,R]);const je=async()=>{if(!(!ne||!r||j.size===0)&&confirm(`Are you sure you want to delete ${j.size} records? This action cannot be undone.`))try{await ku(r,{deletes:Array.from(j)});const E=U.filter(G=>!j.has(pu(h,G,R)));q(E),C(new Set),Y(G=>{const Q=new Map(G);return Array.from(Q.keys()).forEach(ie=>{const K=ie.slice(0,ie.lastIndexOf(":"));j.has(K)&&Q.delete(ie)}),Q}),re(`Deleted ${j.size} records`)}catch(E){re(E.message||"Failed to delete records")}},Me=(E,G)=>ne?pu(h,E,R):String(G);p.useEffect(()=>{le==null||le(ne?j.size:0)},[j,le,ne]),p.useImperativeHandle(y,()=>({deleteSelected:je}));const f=async()=>{if(!(!ne||!r||v.size===0)){ce(!0);try{const E=new Map;v.forEach(({rowId:Q,column:ie,newValue:K})=>{const ue=E.get(Q)||{};ue[ie]=K,E.set(Q,ue)});const G=Array.from(E.entries()).map(([Q,ie])=>({id:Q,changes:ie}));await ku(r,{updates:G}),q(T(v)),Y(new Map),re(`Saved ${G.length} row${G.length===1?"":"s"}`)}catch(E){re(E.message||"Failed to save changes")}finally{ce(!1)}}},L=(E,G,Q,ie)=>{const K=E[ie],ue=v.get(`${G}:${Q}`),we=ue?ue.newValue:K,Ze=W(Q),Je=(w==null?void 0:w.rowId)===G&&(w==null?void 0:w.column)===Q;return R.includes(Q)&&(Ze==null||Ze.type),Je?s.jsx("input",{ref:Oe,value:xe,onChange:De=>Te(De.target.value),onBlur:ae,onKeyDown:De=>{De.key==="Enter"&&(De.preventDefault(),ae()),De.key==="Escape"&&(De.preventDefault(),De.stopPropagation(),te(null))},className:"w-full h-full min-w-[8rem] bg-white dark:bg-zinc-900 border-2 border-blue-500 px-2 py-1 text-xs font-mono text-slate-900 dark:text-zinc-100 focus:outline-none"}):ne&&(Ze==null?void 0:Ze.type)==="boolean"?s.jsx(Tu,{value:we,onChange:De=>F(G,Q,K,De)}):we==null?s.jsx("span",{className:"text-slate-400 dark:text-zinc-600 italic",children:"null"}):typeof we=="boolean"||(Ze==null?void 0:Ze.type)==="boolean"?s.jsx("span",{className:`px-1.5 py-0.5 rounded text-[10px] font-semibold ${un(we)?"bg-emerald-50 dark:bg-emerald-950/60 text-emerald-600 dark:text-emerald-400":"bg-rose-50 dark:bg-rose-950/60 text-rose-600 dark:text-rose-400"}`,children:String(un(we)===!0)}):String(we)},oe=X.length>0&&X.every((E,G)=>j.has(Me(E,G)));return s.jsxs("div",{className:"relative min-h-full",children:[ne&&v.size>0&&s.jsxs("div",{className:"sticky top-0 z-20 px-3 py-1.5 bg-slate-50/95 dark:bg-zinc-900/95 border-b border-slate-200 dark:border-zinc-800 flex items-center gap-2 text-xs font-mono backdrop-blur",children:[s.jsxs("button",{type:"button",tabIndex:-1,onClick:()=>Y(new Map),className:"px-2.5 py-1 rounded-md border border-slate-200 dark:border-zinc-700 bg-white dark:bg-zinc-900 text-slate-600 dark:text-zinc-300 flex items-center gap-1.5",children:[s.jsx(go,{size:12}),"Discard"]}),s.jsxs("button",{type:"button",tabIndex:-1,onClick:()=>void f(),disabled:Ee,className:"px-2.5 py-1 rounded-md bg-slate-900 text-white dark:bg-zinc-100 dark:text-zinc-900 flex items-center gap-1.5 disabled:opacity-50",children:[Ee?s.jsx(ho,{size:12,className:"animate-pulse"}):s.jsx(Pn,{size:12}),"Save (",v.size,")"]}),fe&&s.jsx("span",{className:"ml-auto text-[11px] text-slate-500 dark:text-zinc-400",children:fe})]}),fe&&v.size===0&&s.jsx("div",{className:"px-3 py-1 text-[11px] font-mono text-slate-500 dark:text-zinc-400",children:fe}),s.jsxs("table",{className:"w-full text-left font-mono text-xs border-separate border-spacing-0",children:[s.jsx("thead",{className:"bg-slate-100/90 dark:bg-zinc-900 sticky top-0 border-b border-slate-200 dark:border-zinc-800 z-10 backdrop-blur shadow-xs",children:s.jsxs("tr",{children:[s.jsx("th",{className:"p-2.5 w-10 text-center border-r border-b border-slate-200 dark:border-zinc-800/80",children:s.jsx("input",{type:"checkbox",tabIndex:-1,checked:oe,onChange:be,className:"rounded border-slate-300 dark:border-zinc-700 bg-white dark:bg-zinc-950 text-red-500 focus:ring-0 cursor-pointer"})}),s.jsx("th",{className:"p-2.5 w-12 text-slate-400 dark:text-zinc-500 text-[10px] uppercase font-medium border-r border-b border-slate-200 dark:border-zinc-800/80 text-center",children:"#"}),h.map(E=>s.jsx("th",{className:"p-2.5 text-slate-700 dark:text-zinc-300 font-medium text-xs border-r border-b border-slate-200 dark:border-zinc-800/80 whitespace-nowrap",children:E},E))]})}),s.jsxs("tbody",{children:[X.map((E,G)=>{const Q=Me(E,G),ie=j.has(Q),K=B&&Ne===G;return s.jsxs("tr",{"data-sql-row-focus":K?"true":void 0,onClick:()=>{Ie(G),P==null||P()},className:`transition-colors ${ie?"bg-slate-100/80 dark:bg-zinc-800/50":"hover:bg-slate-50 dark:hover:bg-zinc-900/50"} ${K?"relative z-[1] shadow-[inset_0_0_0_1px_#94a3b8] dark:shadow-[inset_0_0_0_1px_#71717a]":""}`,children:[s.jsx("td",{className:"p-2.5 text-center border-r border-slate-100 dark:border-zinc-800/40",children:s.jsx("input",{type:"checkbox",tabIndex:-1,checked:ie,onChange:()=>me(Q),className:"rounded border-slate-300 dark:border-zinc-700 bg-white dark:bg-zinc-950 text-red-500 focus:ring-0 cursor-pointer"})}),s.jsx("td",{className:"p-2.5 text-slate-400 dark:text-zinc-600 text-center text-[10px] border-r border-slate-100 dark:border-zinc-800/40",children:G+1}),E.map((ue,we)=>{const Ze=h[we],Je=v.get(`${Q}:${Ze}`),Ue=W(Ze),De=R.includes(Ze)&&((Ue==null?void 0:Ue.type)==="integer"||Ze==="id");return s.jsx("td",{onDoubleClick:()=>!De&&D(Q,Ze,ue),className:`p-2.5 text-slate-800 dark:text-zinc-200 border-r border-slate-100 dark:border-zinc-800/40 whitespace-nowrap max-w-sm truncate ${ne&&!De?"cursor-cell":"select-text"} ${Je?"bg-amber-50 dark:bg-amber-950/20 ring-1 ring-inset ring-amber-400":""}`,children:L(E,Q,Ze,we)},Ze)})]},`${Q}-${G}`)}),X.length===0&&ee&&s.jsx("tr",{children:s.jsxs("td",{colSpan:h.length+2,className:"p-8 text-center text-slate-400 dark:text-zinc-500 font-mono",children:['No rows match filter "',ee,'"']})})]})]})]})}),oy=({isOpen:o,stars:h,currentSql:U,onClose:r,onApply:R,onStarCurrent:I,onRemove:ee})=>{const[B,P]=p.useState(""),[le,q]=p.useState(0),y=p.useRef(null),$=p.useRef(null),ne=U.trim(),j=h.some(w=>w.sql.trim()===ne);p.useEffect(()=>{if(!o)return;P(""),q(0);const w=window.setTimeout(()=>{var te;return(te=y.current)==null?void 0:te.focus()},50);return()=>window.clearTimeout(w)},[o]);const C=p.useMemo(()=>{const w=B.trim().toLowerCase();return w?h.filter(te=>(te.name||"").toLowerCase().includes(w)||te.sql.toLowerCase().includes(w)):h},[h,B]);if(p.useEffect(()=>{le>=C.length&&q(Math.max(0,C.length-1))},[C.length,le]),p.useEffect(()=>{var te;const w=(te=$.current)==null?void 0:te.querySelector('[data-active="true"]');w==null||w.scrollIntoView({block:"nearest"})},[le]),!o)return null;const v=w=>{const te=C[w];te&&(R(te.sql),r())},Y=w=>{if(w.key==="ArrowDown"){if(w.preventDefault(),C.length===0)return;q(te=>(te+1)%C.length)}else if(w.key==="ArrowUp"){if(w.preventDefault(),C.length===0)return;q(te=>(te-1+C.length)%C.length)}else if(w.key==="Enter")w.preventDefault(),v(le);else if(w.key==="Escape")w.preventDefault(),r();else if(w.key==="Delete"||w.key==="Backspace"&&B===""){const te=C[le];if(!te)return;w.preventDefault(),ee(te.id)}};return s.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-slate-900/50 dark:bg-black/70 backdrop-blur-xs animate-in fade-in duration-150",onClick:r,children:s.jsxs("div",{className:"w-full max-w-xl bg-white dark:bg-zinc-900 rounded-xl shadow-2xl border border-slate-200 dark:border-zinc-800 overflow-hidden flex flex-col max-h-[70vh] animate-in zoom-in-95 duration-150",onClick:w=>w.stopPropagation(),children:[s.jsxs("div",{className:"flex items-center px-4 py-3 border-b border-slate-200 dark:border-zinc-800 gap-3",children:[s.jsx(ei,{size:16,className:"text-slate-400 dark:text-zinc-500 shrink-0"}),s.jsx("input",{ref:y,type:"text",value:B,onChange:w=>{P(w.target.value),q(0)},onKeyDown:Y,placeholder:"Search stars by name or SQL...",className:"flex-1 bg-transparent text-sm text-slate-900 dark:text-zinc-100 placeholder-slate-400 dark:placeholder-zinc-500 outline-none"}),ne&&s.jsxs("button",{type:"button",onClick:I,className:`shrink-0 px-2 py-1 text-[11px] font-mono rounded-md border transition flex items-center gap-1 ${j?"border-amber-300 dark:border-amber-700 bg-amber-50 dark:bg-amber-950/40 text-amber-700 dark:text-amber-300":"border-slate-200 dark:border-zinc-700 bg-slate-50 dark:bg-zinc-800 text-slate-600 dark:text-zinc-300 hover:bg-slate-100 dark:hover:bg-zinc-700"}`,title:j?"Rename starred query":"Star current query",children:[s.jsx(ju,{size:12,className:j?"fill-current":""}),s.jsx("span",{children:j?"Edit star":"Star current"})]}),s.jsx("button",{type:"button",onClick:r,className:"text-slate-400 hover:text-slate-600 dark:hover:text-zinc-300 p-1 rounded-md","aria-label":"Close stars",children:s.jsx(Ll,{size:16})})]}),s.jsx("div",{ref:$,className:"flex-1 overflow-y-auto p-2 min-h-[220px]",children:C.length===0?s.jsx("div",{className:"py-12 text-center text-slate-400 dark:text-zinc-500 text-xs font-mono",children:h.length===0?"No starred queries yet. Press Ctrl+S in the editor to save one with a name.":`No stars match "${B}"`}):s.jsx("div",{className:"space-y-0.5",children:C.map((w,te)=>{var Te;const xe=te===le;return s.jsxs("div",{"data-active":xe,onClick:()=>v(te),onMouseEnter:()=>q(te),className:`group flex items-start gap-2 px-3 py-2.5 rounded-lg cursor-pointer transition-colors ${xe?"bg-slate-100 dark:bg-zinc-800 text-slate-900 dark:text-zinc-100":"text-slate-600 dark:text-zinc-300 hover:bg-slate-50 dark:hover:bg-zinc-800/50"}`,children:[s.jsx(ju,{size:13,className:"mt-0.5 shrink-0 text-amber-500 fill-amber-500"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("div",{className:"text-[13px] font-medium truncate text-slate-900 dark:text-zinc-100",children:((Te=w.name)==null?void 0:Te.trim())||w.sql.split(`
|
|
360
|
+
`)[0]}),s.jsx("pre",{className:"mt-0.5 font-mono text-[11px] text-slate-500 dark:text-zinc-400 whitespace-pre-wrap break-all line-clamp-3",children:w.sql})]}),s.jsx("button",{type:"button",onClick:Ee=>{Ee.stopPropagation(),ee(w.id)},className:"opacity-0 group-hover:opacity-100 p-1 rounded text-slate-400 hover:text-rose-600 dark:hover:text-rose-400 shrink-0",title:"Remove star",children:s.jsx(Ji,{size:13})})]},w.id)})})}),s.jsxs("div",{className:"px-4 py-2 bg-slate-50 dark:bg-zinc-950/80 border-t border-slate-200 dark:border-zinc-800 flex items-center gap-4 text-[11px] text-slate-400 dark:text-zinc-500",children:[s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx("kbd",{className:"px-1 py-0.5 text-[9px] font-mono rounded bg-white dark:bg-zinc-800 border border-slate-200 dark:border-zinc-700",children:"Up"}),s.jsx("kbd",{className:"px-1 py-0.5 text-[9px] font-mono rounded bg-white dark:bg-zinc-800 border border-slate-200 dark:border-zinc-700",children:"Down"}),"navigate"]}),s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx("kbd",{className:"px-1 py-0.5 text-[9px] font-mono rounded bg-white dark:bg-zinc-800 border border-slate-200 dark:border-zinc-700",children:"Enter"}),"insert"]}),s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx("kbd",{className:"px-1 py-0.5 text-[9px] font-mono rounded bg-white dark:bg-zinc-800 border border-slate-200 dark:border-zinc-700",children:"Esc"}),"close"]})]})]})})},Wm=["SELECT","FROM","WHERE","AND","OR","NOT","IN","LIKE","ILIKE","BETWEEN","IS NULL","IS NOT NULL","ORDER BY","GROUP BY","HAVING","LIMIT","OFFSET","JOIN","LEFT JOIN","RIGHT JOIN","INNER JOIN","CROSS JOIN","ON","AS","DISTINCT","UNION","UNION ALL","INSERT INTO","VALUES","UPDATE","SET","DELETE FROM","CREATE TABLE","DROP TABLE","ALTER TABLE","TRUNCATE","CASE","WHEN","THEN","ELSE","END","ASC","DESC","EXPLAIN","EXPLAIN ANALYZE"],dy=[{name:"COUNT(*)",insert:"COUNT(*)",desc:"Count total rows"},{name:"COUNT()",insert:"COUNT()",desc:"Count non-null values"},{name:"SUM()",insert:"SUM()",desc:"Sum of numeric values"},{name:"AVG()",insert:"AVG()",desc:"Average of values"},{name:"MIN()",insert:"MIN()",desc:"Minimum value"},{name:"MAX()",insert:"MAX()",desc:"Maximum value"},{name:"COALESCE()",insert:"COALESCE()",desc:"First non-null expression"},{name:"NOW()",insert:"NOW()",desc:"Current date and time"},{name:"LOWER()",insert:"LOWER()",desc:"Lowercase string"},{name:"UPPER()",insert:"UPPER()",desc:"Uppercase string"},{name:"CONCAT()",insert:"CONCAT()",desc:"Concatenate strings"}],fy=({tables:o,editorFocusNonce:h=0,onOpenConsole:U})=>{var Wi;const r=typeof window<"u"&&/Mac|iPod|iPhone|iPad/.test(navigator.userAgent),R="hidden sm:inline-flex px-1 py-0.5 text-[9px] font-mono rounded border border-slate-200 dark:border-zinc-700 bg-slate-50 dark:bg-zinc-800 text-slate-400 dark:text-zinc-500",I=M=>`Ctrl+Alt+${M}`,ee=r?"Cmd+Enter":"Ctrl+Enter",B=((Wi=o[0])==null?void 0:Wi.name)||"users",[P,le]=p.useState([{id:"tab-1",name:"Query 1",sql:`SELECT * FROM ${B} LIMIT 25;`,result:null,error:null}]),[q,y]=p.useState("tab-1"),[$,ne]=p.useState(()=>localStorage.getItem("rails_studio_sql_split")||"horizontal"),j=P.find(M=>M.id===q)||P[0],C=(j==null?void 0:j.sql)||"",v=(j==null?void 0:j.result)||null,Y=(j==null?void 0:j.error)||null,[w,te]=p.useState(!1),[xe,Te]=p.useState(!1),[Ee,ce]=p.useState(""),[fe,pe]=p.useState(!1),[Ne,Ie]=p.useState(()=>{try{const M=localStorage.getItem("rails_studio_sql_stars"),V=M?JSON.parse(M):[];return Array.isArray(V)?V.map(ye=>({id:String(ye.id||Date.now()),name:typeof ye.name=="string"?ye.name:"",sql:String(ye.sql||""),createdAt:Number(ye.createdAt)||Date.now()})):[]}catch{return[]}}),[Oe,W]=p.useState(!1),[X,re]=p.useState(""),F=p.useRef(null),[T,D]=p.useState([]);p.useEffect(()=>{cx().then(M=>{M.models&&D(M.models)}).catch(()=>{})},[]);const[ae,me]=p.useState([]),[be,je]=p.useState(0),[Me,f]=p.useState(!1),[L,oe]=p.useState({top:40,left:50}),E=p.useRef(null),G=p.useRef(null),Q=p.useRef(null),[ie,K]=p.useState(!1),[ue,we]=p.useState(null),[Ze,Je]=p.useState("editor"),[Ue,De]=p.useState(0),qe=p.useRef(null),zt=p.useRef(null),ht=()=>{var M;Je("editor"),(M=E.current)==null||M.focus()},St=()=>{var M,V;Je("results"),(M=E.current)==null||M.blur(),(V=qe.current)==null||V.focus()};p.useEffect(()=>{if(!h)return;const M=requestAnimationFrame(()=>ht());return()=>cancelAnimationFrame(M)},[h]),p.useEffect(()=>{if(!(v!=null&&v.table_name)){we(null);return}let M=!1;return yo(v.table_name).then(V=>{M||we(V)}).catch(()=>{M||we(null)}),()=>{M=!0}},[v==null?void 0:v.table_name,q]);const dt=M=>{le(V=>V.map(ye=>ye.id===q?{...ye,sql:M}:ye))},Et=(M,V)=>{le(ye=>ye.map(Re=>Re.id===q?{...Re,result:M,error:V}:Re))},qt=()=>{const M=$==="horizontal"?"vertical":"horizontal";ne(M),localStorage.setItem("rails_studio_sql_split",M)},Il=()=>{E.current&&G.current&&(G.current.scrollTop=E.current.scrollTop)},Ut=()=>{const M=`tab-${Date.now()}`,V={id:M,name:`Query ${P.length+1}`,sql:`SELECT * FROM ${B} LIMIT 25;`,result:null,error:null};le([...P,V]),y(M)},ul=(M,V)=>{if(V.stopPropagation(),P.length<=1)return;const ye=P.filter(Re=>Re.id!==M);le(ye),q===M&&y(ye[0].id)},Z=async M=>{const V=(M||C).trim();if(V){te(!0),Et(null,null);try{const ye=await ly(V);Et(ye,null),De(0),St()}catch(ye){const Re=ye.message||"Query execution failed";Et(null,Re)}finally{te(!1)}}},J=()=>{if(!C.trim())return;let M=C.trim().replace(/\s+/g," ");Wm.forEach(ye=>{const Re=new RegExp(`\\b${ye}\\b`,"gi");M=M.replace(Re,ye)}),["FROM","WHERE","LEFT JOIN","RIGHT JOIN","INNER JOIN","JOIN","GROUP BY","ORDER BY","LIMIT","OFFSET","HAVING","VALUES","SET"].forEach(ye=>{const Re=new RegExp(`\\s+(${ye})\\b`,"g");M=M.replace(Re,`
|
|
361
|
+
$1`)}),dt(M)},O=()=>{dt(""),Et(null,null),ht()},N=M=>{Ie(M);try{localStorage.setItem("rails_studio_sql_stars",JSON.stringify(M))}catch{}},ze=M=>M.trim().split(`
|
|
362
|
+
`)[0].replace(/\s+/g," ").slice(0,80),H=()=>{var ye;const M=C.trim();if(!M)return;const V=Ne.find(Re=>Re.sql.trim()===M);re(((ye=V==null?void 0:V.name)==null?void 0:ye.trim())||ze(M)),W(!0),requestAnimationFrame(()=>{var Re,lt;(Re=F.current)==null||Re.focus(),(lt=F.current)==null||lt.select()})},Xe=()=>{const M=C.trim();if(!M)return;const V=X.trim()||ze(M),ye=Ne.find(Re=>Re.sql.trim()===M);N(ye?Ne.map(Re=>Re.id===ye.id?{...Re,name:V,sql:M}:Re):[{id:String(Date.now()),name:V,sql:M,createdAt:Date.now()},...Ne]),W(!1)},rt=M=>{N(Ne.filter(V=>V.id!==M))},ut=M=>{dt(M),ht()},nt=(M,V)=>{const ye=M.slice(0,V),Re=ye.match(/([a-zA-Z0-9_.*]+)$/),lt=Re?Re[1]:"";if(!lt||lt.length<1){f(!1);return}const wt=lt.toLowerCase(),Qt=[],Ft=ye.toUpperCase(),Ht=Ft.lastIndexOf("FROM"),jl=Ft.lastIndexOf("JOIN"),Aa=Ft.lastIndexOf("SELECT");Ft.lastIndexOf("WHERE");const Hl=Ht>Aa&&V-Ht<80||jl>Aa&&V-jl<80;Array.from(new Set([...o.map(et=>et.name),...T.map(et=>et.table_name)])).filter(Boolean).forEach(et=>{et.toLowerCase().includes(wt)&&Qt.push({label:et,detail:"Table",type:"table"})}),T.forEach(et=>{et.columns.forEach(cl=>{cl.toLowerCase().includes(wt)&&!Qt.some(na=>na.label===cl)&&Qt.push({label:cl,detail:`Column in ${et.table_name}`,type:"column"})})}),Wm.forEach(et=>{et.toLowerCase().startsWith(wt)&&et.toLowerCase()!==wt&&Qt.push({label:et,detail:"Keyword",type:"keyword"})}),dy.forEach(et=>{et.name.toLowerCase().startsWith(wt)&&Qt.push({label:et.name,insertText:et.insert,detail:et.desc,type:"function"})}),Qt.sort((et,cl)=>{if(Hl){if(et.type==="table"&&cl.type!=="table")return-1;if(et.type!=="table"&&cl.type==="table")return 1}const na=et.label.toLowerCase().startsWith(wt)?0:1,_a=cl.label.toLowerCase().startsWith(wt)?0:1;return na-_a});const aa=Qt.slice(0,9);if(aa.length>0){me(aa),je(0),f(!0);const et=ye.split(`
|
|
363
|
+
`),cl=et.length-1,na=et[cl].length,_a=Math.min((cl+1)*20+12,180),Oa=Math.min(44+na*7.2,380);oe({top:_a,left:Oa})}else f(!1)},Ul=M=>{if(!E.current)return;const V=E.current.selectionStart,ye=C.slice(0,V),Re=C.slice(V),lt=ye.match(/([a-zA-Z0-9_.*]+)$/),wt=lt?lt[1].length:0,Qt=V-wt,Ft=M.insertText||M.label,Ht=C.slice(0,Qt)+Ft+" "+Re;dt(Ht),f(!1);const jl=Qt+Ft.length+1;setTimeout(()=>{E.current&&(E.current.focus(),E.current.setSelectionRange(jl,jl))},10)},Mt=M=>{if(Me&&ae.length>0){if(M.key==="ArrowDown"){M.preventDefault(),je(V=>(V+1)%ae.length);return}if(M.key==="ArrowUp"){M.preventDefault(),je(V=>(V-1+ae.length)%ae.length);return}if(M.key==="Tab"||M.key==="Enter"&&!M.shiftKey){M.preventDefault(),Ul(ae[be]);return}if(M.key==="Escape"){M.preventDefault(),M.stopPropagation(),f(!1);return}}if(M.key==="Escape"){M.preventDefault(),M.stopPropagation(),M.currentTarget.blur(),Je("editor");return}},la=M=>{const V=M.target.value;dt(V),nt(V,M.target.selectionStart)};p.useEffect(()=>{const M=V=>{if(V.key==="Escape"){if(Oe){V.preventDefault(),V.stopImmediatePropagation(),W(!1);return}fe&&(V.preventDefault(),V.stopImmediatePropagation(),pe(!1))}};return window.addEventListener("keydown",M,!0),()=>window.removeEventListener("keydown",M,!0)},[fe,Oe]),p.useEffect(()=>{const M=V=>{if(!(fe||Oe)){if(V.key==="Tab"&&!V.ctrlKey&&!V.metaKey&&!V.altKey){if(V.target===E.current&&Me&&ae.length>0)return;V.preventDefault(),V.stopPropagation(),Ze==="editor"||V.target===E.current?St():ht();return}if((V.ctrlKey||V.metaKey)&&V.key==="Enter"){V.preventDefault(),f(!1),Z();return}if((V.ctrlKey||V.metaKey)&&!V.altKey&&V.code==="KeyS"){V.preventDefault(),H();return}if((V.ctrlKey||V.metaKey)&&!V.altKey&&V.code==="Backslash"){V.preventDefault(),qt();return}V.ctrlKey&&V.altKey&&!V.metaKey&&(V.code==="KeyF"?(V.preventDefault(),J()):V.code==="KeyX"?(V.preventDefault(),O()):V.code==="KeyS"?(V.preventDefault(),pe(ye=>!ye)):V.code==="KeyN"&&(V.preventDefault(),Ut()))}};return window.addEventListener("keydown",M),()=>window.removeEventListener("keydown",M)},[Ze,C,Me,ae.length,$,w,P.length,fe,Oe,Ne]);const de=()=>{if(!v||!v.columns||!v.rows)return;const M=v.columns.join(","),V=v.rows.map(Qt=>Qt.map(Ft=>{if(Ft==null)return"";const Ht=String(Ft);return Ht.includes(",")||Ht.includes('"')||Ht.includes(`
|
|
364
|
+
`)?`"${Ht.replace(/"/g,'""')}"`:Ht}).join(",")),ye=[M,...V].join(`
|
|
365
|
+
`),Re=new Blob([ye],{type:"text/csv;charset=utf-8;"}),lt=URL.createObjectURL(Re),wt=document.createElement("a");wt.href=lt,wt.setAttribute("download",`query_result_${new Date().toISOString().slice(0,10)}.csv`),document.body.appendChild(wt),wt.click(),document.body.removeChild(wt)},cn=()=>{if(!v||!v.columns||!v.rows)return;const M=v.rows.map(V=>{const ye={};return v.columns.forEach((Re,lt)=>{ye[Re]=V[lt]}),ye});navigator.clipboard.writeText(JSON.stringify(M,null,2)),Te(!0),setTimeout(()=>Te(!1),2e3)},Da=C.split(`
|
|
366
|
+
`).length||1,Eu=Array.from({length:Math.max(Da,6)},(M,V)=>V+1),$i=!!(Y&&(Y.includes("Rails Console")||Y.includes("Active Record expression")));return s.jsxs("div",{className:"flex-1 flex flex-col h-full min-h-0 overflow-hidden bg-white dark:bg-zinc-950 select-none transition-colors",children:[s.jsxs("div",{className:"h-[46px] px-2.5 bg-slate-50/90 dark:bg-zinc-900/80 border-b border-slate-200 dark:border-zinc-800 flex items-center justify-between shrink-0 gap-2",children:[s.jsxs("div",{className:"flex items-center space-x-1 overflow-x-auto",children:[P.map(M=>{const V=M.id===q;return s.jsxs("div",{onClick:()=>y(M.id),className:`group flex items-center space-x-2 px-3 py-1 text-xs font-mono rounded-md border cursor-pointer transition-all ${V?"bg-white dark:bg-zinc-800 border-slate-300 dark:border-zinc-700 text-slate-900 dark:text-zinc-100 shadow-xs font-medium":"bg-transparent border-transparent text-slate-500 dark:text-zinc-400 hover:bg-slate-200/50 dark:hover:bg-zinc-800/50 hover:text-slate-800 dark:hover:text-zinc-200"}`,children:[s.jsx(nn,{size:12,className:V?"text-red-500":"text-slate-400 dark:text-zinc-500"}),s.jsx("span",{className:"truncate max-w-[120px]",children:M.name}),P.length>1&&s.jsx("button",{onClick:ye=>ul(M.id,ye),className:"p-0.5 rounded text-slate-400 hover:text-slate-700 dark:hover:text-zinc-200 hover:bg-slate-200 dark:hover:bg-zinc-700 transition",children:s.jsx(Ll,{size:11})})]},M.id)}),s.jsxs("button",{type:"button",tabIndex:-1,onClick:Ut,className:"flex items-center gap-1 p-1.5 rounded-md text-slate-400 hover:text-slate-700 dark:text-zinc-500 dark:hover:text-zinc-300 hover:bg-slate-200/60 dark:hover:bg-zinc-800 transition",title:`New Query Tab (${I("N")})`,children:[s.jsx(Nu,{size:13}),s.jsx("kbd",{className:R,children:I("N")})]})]}),s.jsxs("div",{className:"flex items-center space-x-1.5 shrink-0",children:[s.jsxs("button",{type:"button",tabIndex:-1,onClick:()=>pe(!0),className:`px-2.5 py-1 text-xs font-mono rounded-md border transition flex items-center space-x-1 shadow-xs ${fe?"bg-slate-200 dark:bg-zinc-800 border-slate-300 dark:border-zinc-700 text-slate-900 dark:text-zinc-100":"border-slate-200 dark:border-zinc-800 bg-white dark:bg-zinc-900 text-slate-600 dark:text-zinc-400 hover:text-slate-900 dark:hover:text-zinc-100 hover:bg-slate-100 dark:hover:bg-zinc-800"}`,title:`Starred queries (${I("S")})`,children:[s.jsx(ju,{size:12,className:Ne.length>0?"text-amber-500 fill-amber-500":""}),s.jsx("span",{className:"hidden sm:inline",children:"Stars"}),s.jsx("kbd",{className:R,children:I("S")}),Ne.length>0&&s.jsxs("span",{className:"text-[10px] text-slate-400 dark:text-zinc-500 font-mono",children:["(",Ne.length,")"]})]}),s.jsxs("button",{type:"button",tabIndex:-1,onClick:J,disabled:!C.trim(),className:"px-2.5 py-1 text-xs font-mono rounded-md border border-slate-200 dark:border-zinc-800 bg-white dark:bg-zinc-900 text-slate-600 dark:text-zinc-400 hover:text-slate-900 dark:hover:text-zinc-100 hover:bg-slate-100 dark:hover:bg-zinc-800 transition disabled:opacity-40 shadow-xs flex items-center space-x-1",title:`Format / Prettify SQL (${I("F")})`,children:[s.jsx(H1,{size:13}),s.jsx("span",{className:"hidden sm:inline",children:"Format"}),s.jsx("kbd",{className:R,children:I("F")})]}),s.jsxs("button",{type:"button",tabIndex:-1,onClick:O,disabled:!C.trim(),className:"px-2.5 py-1 text-xs font-mono rounded-md border border-slate-200 dark:border-zinc-800 bg-white dark:bg-zinc-900 text-slate-600 dark:text-zinc-400 hover:text-slate-900 dark:hover:text-zinc-100 hover:bg-slate-100 dark:hover:bg-zinc-800 transition disabled:opacity-40 shadow-xs flex items-center space-x-1",title:`Clear SQL editor (${I("X")})`,children:[s.jsx(Ji,{size:13}),s.jsx("span",{className:"hidden sm:inline",children:"Clear"}),s.jsx("kbd",{className:R,children:I("X")})]}),s.jsxs("button",{type:"button",tabIndex:-1,onClick:qt,className:"px-2.5 py-1 text-xs font-mono rounded-md border border-slate-200 dark:border-zinc-800 bg-white dark:bg-zinc-900 text-slate-600 dark:text-zinc-400 hover:text-slate-900 dark:hover:text-zinc-100 hover:bg-slate-100 dark:hover:bg-zinc-800 transition shadow-xs flex items-center space-x-1",title:`Switch to ${$==="horizontal"?"Side-by-side (Vertical)":"Stacked (Horizontal)"} layout (Ctrl+\\)`,children:[$==="horizontal"?s.jsx(Km,{size:13}):s.jsx(_1,{size:13}),s.jsx("kbd",{className:R,children:"Ctrl+\\"})]}),s.jsxs("button",{type:"button",tabIndex:-1,onClick:()=>Z(),disabled:w||!C.trim(),className:"flex items-center space-x-1.5 px-3 py-1.5 rounded-md bg-slate-900 hover:bg-slate-800 text-white dark:bg-zinc-100 dark:hover:bg-white dark:text-zinc-900 font-medium text-xs shadow-sm transition disabled:opacity-50",title:`Run Query (${ee})`,children:[s.jsx(A1,{size:12,className:w?"animate-spin":""}),s.jsx("span",{children:w?"Running...":"Run"}),s.jsx("kbd",{className:"hidden sm:inline-flex px-1 py-0.2 text-[9px] font-mono rounded bg-slate-800 dark:bg-zinc-200 text-slate-300 dark:text-zinc-700",children:ee})]})]})]}),s.jsxs("div",{className:`flex-1 flex overflow-hidden ${$==="vertical"?"flex-row":"flex-col"}`,children:[s.jsxs("div",{ref:Q,onMouseDown:()=>Je("editor"),className:`flex flex-col relative overflow-hidden bg-white dark:bg-zinc-950 ${$==="vertical"?"w-1/2 border-r border-slate-200 dark:border-zinc-800":"h-[42%] border-b border-slate-200 dark:border-zinc-800"}`,children:[s.jsxs("div",{className:`flex-1 flex overflow-hidden relative font-mono text-xs transition-shadow ${Ze==="editor"?"ring-1 ring-inset ring-slate-400 dark:ring-zinc-500":""}`,children:[s.jsx("div",{ref:G,className:"w-10 select-none py-3 text-right pr-2.5 text-slate-400 dark:text-zinc-600 bg-slate-50/60 dark:bg-zinc-950/80 border-r border-slate-200/80 dark:border-zinc-800/80 overflow-hidden font-mono",children:Eu.map(M=>s.jsx("div",{style:{height:"20px",lineHeight:"20px"},children:M},M))}),s.jsx("textarea",{ref:E,value:C,onChange:la,onFocus:()=>{K(!0),Je("editor")},onBlur:()=>K(!1),onKeyDown:Mt,onScroll:Il,style:{lineHeight:"20px"},placeholder:"Type your SQL query here... (e.g. SELECT * FROM users WHERE active = true)",className:"flex-1 bg-transparent p-3 text-xs font-mono text-slate-900 dark:text-zinc-100 placeholder-slate-400 dark:placeholder-zinc-600 focus:outline-none resize-none overflow-auto whitespace-pre leading-5 selection:bg-red-500/20",spellCheck:!1,autoCapitalize:"none",autoComplete:"off"}),Me&&ae.length>0&&s.jsxs("div",{style:{top:`${L.top}px`,left:`${L.left}px`},className:"absolute z-50 w-72 max-h-56 bg-white dark:bg-zinc-900 border border-slate-200 dark:border-zinc-700 rounded-lg shadow-2xl overflow-hidden flex flex-col font-mono text-xs animate-in fade-in duration-75",children:[s.jsxs("div",{className:"px-2.5 py-1 bg-slate-100 dark:bg-zinc-800 text-[10px] text-slate-500 dark:text-zinc-400 flex items-center justify-between border-b border-slate-200 dark:border-zinc-700 select-none",children:[s.jsxs("span",{className:"flex items-center gap-1 font-semibold",children:[s.jsx(L1,{size:11,className:"text-red-500"}),"Suggestions"]}),s.jsx("span",{children:"Tab or Enter to apply"})]}),s.jsx("div",{className:"overflow-y-auto divide-y divide-slate-100 dark:divide-zinc-800/60",children:ae.map((M,V)=>s.jsxs("div",{onMouseDown:ye=>{ye.preventDefault(),Ul(M)},className:`px-3 py-1.5 flex items-center justify-between cursor-pointer transition ${V===be?"bg-red-50 dark:bg-red-950/40 text-red-700 dark:text-white font-medium":"text-slate-700 dark:text-zinc-300 hover:bg-slate-100/80 dark:hover:bg-zinc-800/60"}`,children:[s.jsxs("div",{className:"flex items-center space-x-2 truncate",children:[M.type==="table"?s.jsx(xo,{size:12,className:"text-amber-500 shrink-0"}):M.type==="column"?s.jsx(Km,{size:12,className:"text-sky-500 shrink-0"}):M.type==="function"?s.jsx(B1,{size:12,className:"text-emerald-500 shrink-0"}):s.jsx(nn,{size:12,className:"text-purple-500 shrink-0"}),s.jsx("span",{className:"truncate font-semibold",children:M.label})]}),s.jsx("span",{className:"text-[10px] text-slate-400 dark:text-zinc-500 shrink-0 pl-2",children:M.detail})]},M.label+V))})]})]}),s.jsxs("div",{className:"h-6 px-3 bg-slate-50 dark:bg-zinc-950 border-t border-slate-200 dark:border-zinc-800/80 flex items-center justify-between text-[10px] text-slate-400 dark:text-zinc-500 font-mono select-none",children:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx("span",{children:"Tab switches editor / results"}),s.jsx("span",{children:"•"}),s.jsxs("span",{children:[r?"Cmd+S":"Ctrl+S"," to star"]})]}),s.jsxs("div",{children:[s.jsxs("span",{children:[C.length," chars"]}),s.jsx("span",{className:"mx-1.5",children:"•"}),s.jsxs("span",{children:[Da," lines"]})]})]})]}),s.jsxs("div",{ref:qe,tabIndex:-1,onMouseDown:()=>Je("results"),className:`flex-1 flex flex-col overflow-hidden bg-white dark:bg-zinc-950 outline-none ${$==="vertical"?"w-1/2":"h-[58%]"} ${Ze==="results"?"ring-1 ring-inset ring-slate-400 dark:ring-zinc-500":""}`,children:[s.jsxs("div",{className:"h-10 px-3 bg-slate-50/80 dark:bg-zinc-900/40 border-b border-slate-200 dark:border-zinc-800 flex items-center justify-between text-xs font-mono text-slate-600 dark:text-zinc-400 shrink-0 gap-2",children:[s.jsxs("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:[v&&v.rows&&v.rows.length>0&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"relative shrink-0",children:[s.jsx(ei,{size:12,className:"absolute left-2 top-2 text-slate-400 pointer-events-none"}),s.jsx("input",{type:"text",placeholder:"Filter results...",value:Ee,onChange:M=>ce(M.target.value),onFocus:()=>Je("results"),onKeyDown:M=>{M.key==="Escape"&&(M.preventDefault(),M.stopPropagation(),M.currentTarget.blur())},className:"w-36 lg:w-44 bg-white dark:bg-zinc-900 border border-slate-200 dark:border-zinc-800 rounded-md pl-6 pr-2 py-1 text-[11px] font-mono text-slate-800 dark:text-zinc-200 placeholder-slate-400 focus:outline-none focus:border-slate-400 dark:focus:border-zinc-700 shadow-xs"}),Ee&&s.jsx("button",{type:"button",tabIndex:-1,onClick:()=>ce(""),className:"absolute right-1.5 top-1.5 text-slate-400 hover:text-slate-600 dark:hover:text-zinc-200",children:s.jsx(Ll,{size:11})})]}),Ue>0&&s.jsxs("button",{type:"button",tabIndex:-1,onClick:()=>{var M;return void((M=zt.current)==null?void 0:M.deleteSelected())},className:"px-2.5 py-1 rounded-md bg-rose-50 dark:bg-red-950/80 border border-rose-200 dark:border-red-800 text-rose-700 dark:text-red-300 hover:bg-rose-100 dark:hover:bg-red-900/80 transition flex items-center space-x-1.5 shrink-0",title:"Delete selected rows (D)",children:[s.jsx(Ji,{size:12}),s.jsxs("span",{children:["Delete (",Ue,")"]}),s.jsx("kbd",{className:"hidden sm:inline-flex px-1.5 py-0.2 text-[9px] font-mono rounded bg-rose-100 dark:bg-red-900/80 border border-rose-200 dark:border-red-800 text-rose-600 dark:text-red-300",children:"D"})]})]}),s.jsx("div",{className:"flex items-center space-x-3 truncate min-w-0",children:v?s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"flex items-center gap-1.5 text-slate-900 dark:text-zinc-100 font-semibold",children:[s.jsx(Xm,{size:13,className:"text-emerald-500"}),s.jsx("span",{children:v.message||`${v.count} ${v.count===1?"row":"rows"}`})]}),s.jsx("span",{children:"•"}),s.jsxs("span",{className:"flex items-center gap-1 text-slate-500 dark:text-zinc-400",children:[s.jsx(j1,{size:12,className:"text-slate-400 dark:text-zinc-500"}),s.jsxs("span",{children:[v.duration_ms," ms"]})]})]}):Y?s.jsxs("span",{className:"flex items-center gap-1.5 text-rose-600 dark:text-rose-400 font-medium",children:[s.jsx(Su,{size:13}),s.jsx("span",{children:"Execution failed"})]}):s.jsxs("span",{className:"text-slate-400 dark:text-zinc-500 flex items-center gap-1.5",children:[s.jsx(oo,{size:13}),s.jsx("span",{children:"Query Results"})]})})]}),v&&v.rows&&v.rows.length>0&&s.jsxs("div",{className:"flex items-center space-x-2 shrink-0",children:[s.jsxs("button",{type:"button",tabIndex:-1,onClick:cn,className:"flex items-center space-x-1 px-2 py-1 rounded bg-white dark:bg-zinc-900 border border-slate-200 dark:border-zinc-800 text-slate-600 hover:text-slate-900 dark:text-zinc-400 dark:hover:text-zinc-200 transition text-[11px] shadow-xs",title:"Copy results as JSON",children:[xe?s.jsx(Pn,{size:12,className:"text-emerald-500"}):s.jsx(vh,{size:12}),s.jsx("span",{className:"hidden sm:inline",children:xe?"Copied!":"JSON"})]}),s.jsxs("button",{type:"button",tabIndex:-1,onClick:de,className:"flex items-center space-x-1 px-2 py-1 rounded bg-white dark:bg-zinc-900 border border-slate-200 dark:border-zinc-800 text-slate-600 hover:text-slate-900 dark:text-zinc-400 dark:hover:text-zinc-200 transition text-[11px] shadow-xs",title:"Export results to CSV",children:[s.jsx(T1,{size:12}),s.jsx("span",{className:"hidden sm:inline",children:"CSV"})]})]})]}),s.jsx("div",{className:"flex-1 overflow-auto relative",children:Y?s.jsx("div",{className:"p-6",children:s.jsxs("div",{className:"p-4 rounded-xl bg-rose-50 dark:bg-red-950/40 border border-rose-200 dark:border-red-900/60 text-rose-700 dark:text-red-300 text-xs font-mono flex flex-col space-y-3 shadow-xs",children:[s.jsxs("div",{className:"flex items-start gap-2.5",children:[s.jsx(Su,{size:17,className:"shrink-0 mt-0.5 text-red-500"}),s.jsxs("div",{children:[s.jsx("p",{className:"font-bold text-slate-900 dark:text-white",children:"ActiveRecord Query Error"}),s.jsx("p",{className:"mt-1 whitespace-pre-wrap leading-relaxed",children:Y})]})]}),$i&&U&&s.jsx("div",{className:"pt-2 border-t border-rose-200 dark:border-red-900/50 flex justify-end",children:s.jsxs("button",{onClick:()=>U(C.trim()),className:"px-3 py-1.5 rounded-lg bg-red-600 hover:bg-red-500 text-white font-sans text-xs flex items-center gap-1.5 transition shadow-sm font-medium",children:[s.jsx(nn,{size:13}),s.jsx("span",{children:"Open & Evaluate in Rails Console"})]})})]})}):v&&v.columns&&v.columns.length>0?s.jsx(ry,{ref:zt,columns:v.columns,rows:v.rows,tableName:v.table_name,primaryKeys:v.primary_keys,schema:ue,filter:Ee,navActive:Ze==="results",onActivate:()=>Je("results"),onSelectedChange:De,onRowsChange:M=>{Et({...v,rows:M,count:M.length},null)}},`${q}-${v.duration_ms}-${v.columns.join(",")}`):v&&v.columns&&v.columns.length===0?s.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8 text-center font-mono space-y-2",children:[s.jsx(Xm,{size:32,className:"text-emerald-500 animate-in zoom-in-75"}),s.jsx("p",{className:"text-sm font-semibold text-slate-800 dark:text-zinc-200",children:v.message||"Statement executed successfully"}),s.jsxs("p",{className:"text-xs text-slate-500 dark:text-zinc-500",children:["Execution time: ",v.duration_ms," ms"]})]}):w?null:s.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8 text-center font-mono text-xs text-slate-400 dark:text-zinc-500 space-y-3",children:[s.jsx("div",{className:"w-12 h-12 rounded-xl bg-slate-100 dark:bg-zinc-900 border border-slate-200 dark:border-zinc-800 flex items-center justify-center text-slate-400 dark:text-zinc-500",children:s.jsx(nn,{size:22})}),s.jsxs("div",{children:[s.jsx("p",{className:"font-semibold text-slate-700 dark:text-zinc-300",children:"Ready to execute SQL query"}),s.jsxs("p",{className:"text-[11px] mt-1 text-slate-400 dark:text-zinc-500",children:["Write raw SQL above and press ",s.jsx("span",{className:"font-semibold",children:ee})," or click Run"]})]}),s.jsx("div",{className:"flex flex-wrap items-center justify-center gap-2 pt-1",children:o.slice(0,3).map(M=>s.jsxs("button",{onClick:()=>{const V=`SELECT * FROM ${M.name} LIMIT 25;`;dt(V),Z(V)},className:"px-2.5 py-1 rounded bg-slate-100 dark:bg-zinc-900 hover:bg-slate-200 dark:hover:bg-zinc-800 text-slate-600 dark:text-zinc-400 text-[11px] border border-slate-200 dark:border-zinc-800 transition shadow-xs",children:["Browse ",M.name]},M.name))})]})})]})]}),s.jsx(oy,{isOpen:fe,stars:Ne,currentSql:C,onClose:()=>pe(!1),onApply:ut,onStarCurrent:()=>{pe(!1),H()},onRemove:rt}),Oe&&s.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-slate-900/50 dark:bg-black/70 backdrop-blur-xs animate-in fade-in duration-150",onClick:()=>W(!1),children:s.jsxs("div",{className:"w-full max-w-md bg-white dark:bg-zinc-900 rounded-xl shadow-2xl border border-slate-200 dark:border-zinc-800 overflow-hidden animate-in zoom-in-95 duration-150",onClick:M=>M.stopPropagation(),children:[s.jsxs("div",{className:"px-4 py-3 border-b border-slate-200 dark:border-zinc-800 flex items-center gap-2",children:[s.jsx(ju,{size:15,className:"text-amber-500 fill-amber-500"}),s.jsx("h3",{className:"font-semibold text-sm text-slate-900 dark:text-zinc-100",children:"Save to Stars"})]}),s.jsxs("div",{className:"p-4 space-y-3",children:[s.jsxs("label",{className:"block space-y-1.5",children:[s.jsx("span",{className:"text-[11px] uppercase tracking-wider font-semibold text-slate-400 dark:text-zinc-500",children:"Name"}),s.jsx("input",{ref:F,type:"text",value:X,onChange:M=>re(M.target.value),onKeyDown:M=>{M.key==="Enter"&&(M.preventDefault(),Xe())},placeholder:"e.g. active users this week",className:"w-full h-9 px-3 text-sm rounded-md border border-slate-200 dark:border-zinc-700 bg-white dark:bg-zinc-950 text-slate-900 dark:text-zinc-100 placeholder-slate-400 dark:placeholder-zinc-500 outline-none focus:border-slate-400 dark:focus:border-zinc-500"})]}),s.jsx("pre",{className:"max-h-32 overflow-auto rounded-md border border-slate-200 dark:border-zinc-800 bg-slate-50 dark:bg-zinc-950/80 p-2.5 font-mono text-[11px] text-slate-600 dark:text-zinc-400 whitespace-pre-wrap break-all",children:C.trim()})]}),s.jsxs("div",{className:"px-4 py-3 bg-slate-50 dark:bg-zinc-950/80 border-t border-slate-200 dark:border-zinc-800 flex items-center justify-end gap-2",children:[s.jsx("button",{type:"button",onClick:()=>W(!1),className:"px-3 py-1.5 text-xs rounded-md border border-slate-200 dark:border-zinc-700 text-slate-600 dark:text-zinc-300 hover:bg-slate-100 dark:hover:bg-zinc-800",children:"Cancel"}),s.jsx("button",{type:"button",onClick:Xe,className:"px-3 py-1.5 text-xs rounded-md bg-slate-900 hover:bg-slate-800 text-white dark:bg-zinc-100 dark:hover:bg-white dark:text-zinc-900 font-medium",children:"Save"})]})]})})]})},my=({targetTable:o,targetId:h,onClose:U,onNavigateToTable:r,onSelectNestedFk:R})=>{const[I,ee]=p.useState(null),[B,P]=p.useState(null),[le,q]=p.useState(!0),[y,$]=p.useState(null),[ne,j]=p.useState(null);p.useEffect(()=>{let v=!1;async function Y(){q(!0),$(null);try{const[w,te]=await Promise.all([ey(o,h),yo(o)]);v||(ee(w.record),P(te))}catch(w){v||$(w.message||"Failed to load foreign record")}finally{v||q(!1)}}return o&&h!=null&&Y(),()=>{v=!0}},[o,h]);const C=(v,Y)=>{navigator.clipboard.writeText(String(Y)),j(v),setTimeout(()=>j(null),1500)};return s.jsxs("div",{className:"fixed inset-y-0 right-0 w-[450px] bg-white dark:bg-zinc-900 border-l border-slate-200 dark:border-zinc-800 shadow-2xl z-50 flex flex-col animate-in slide-in-from-right duration-200 transition-colors",children:[s.jsxs("div",{className:"p-4 border-b border-slate-200 dark:border-zinc-800 flex items-center justify-between bg-slate-50 dark:bg-zinc-950/60",children:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx(sn,{size:16,className:"text-blue-500 dark:text-blue-400"}),s.jsxs("h2",{className:"text-sm font-semibold text-slate-900 dark:text-zinc-100 font-mono",children:[o," ",s.jsxs("span",{className:"text-slate-500 dark:text-zinc-500 font-normal",children:["#",h]})]})]}),s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx("button",{onClick:()=>r(o),className:"p-1.5 rounded text-slate-500 dark:text-zinc-400 hover:text-slate-900 dark:hover:text-zinc-200 hover:bg-slate-200/60 dark:hover:bg-zinc-800 transition",title:"Open table in view",children:s.jsx(E1,{size:15})}),s.jsx("button",{onClick:U,className:"p-1.5 rounded text-slate-500 dark:text-zinc-400 hover:text-slate-900 dark:hover:text-zinc-200 hover:bg-slate-200/60 dark:hover:bg-zinc-800 transition",children:s.jsx(Ll,{size:16})})]})]}),s.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:le?s.jsxs("div",{className:"flex flex-col items-center justify-center h-48 space-y-3",children:[s.jsx("div",{className:"w-6 h-6 border-2 border-blue-500 border-t-transparent rounded-full animate-spin"}),s.jsx("p",{className:"text-xs text-slate-500 dark:text-zinc-500 font-mono",children:"Loading record details..."})]}):y?s.jsxs("div",{className:"p-4 rounded-lg bg-rose-50 dark:bg-red-950/40 border border-rose-200 dark:border-red-800/50 text-rose-700 dark:text-red-300 text-xs font-mono",children:[s.jsx("p",{className:"font-semibold",children:"Error:"}),s.jsx("p",{className:"mt-1",children:y})]}):I?s.jsxs("div",{className:"space-y-4 font-mono text-xs",children:[s.jsx("div",{className:"text-[11px] uppercase tracking-wider text-slate-500 dark:text-zinc-500 font-semibold mb-2",children:"Record Attributes"}),s.jsx("div",{className:"border border-slate-200 dark:border-zinc-800 rounded-lg overflow-hidden divide-y divide-slate-100 dark:divide-zinc-800/60 bg-slate-50/50 dark:bg-zinc-950/40",children:Object.entries(I).map(([v,Y])=>{const w=B==null?void 0:B.columns.find(Te=>Te.name===v),te=w==null?void 0:w.foreign_key,xe=w==null?void 0:w.primary;return s.jsxs("div",{className:"p-2.5 flex flex-col space-y-1 hover:bg-slate-100/50 dark:hover:bg-zinc-900/40 transition",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center space-x-1.5 text-slate-600 dark:text-zinc-400",children:[xe&&s.jsx(fo,{size:11,className:"text-amber-500 dark:text-amber-400"}),te&&s.jsx(sn,{size:11,className:"text-blue-500 dark:text-blue-400"}),s.jsx("span",{className:"font-medium text-slate-800 dark:text-zinc-300",children:v}),w&&s.jsxs("span",{className:"text-[10px] text-slate-400 dark:text-zinc-500 font-normal",children:["(",w.type,")"]})]}),s.jsx("button",{onClick:()=>C(v,Y),className:"text-slate-400 hover:text-slate-700 dark:text-zinc-600 dark:hover:text-zinc-300 transition",title:"Copy value",children:ne===v?s.jsx(Pn,{size:12,className:"text-emerald-500"}):s.jsx(vh,{size:12})})]}),s.jsx("div",{className:"mt-0.5",children:Y===null?s.jsx("span",{className:"text-slate-400 dark:text-zinc-600 italic",children:"null"}):te&&Y?s.jsxs("button",{onClick:()=>R(te.to_table,Y),className:"inline-flex items-center space-x-1 px-2 py-0.5 rounded bg-blue-50 border border-blue-200 text-blue-700 hover:bg-blue-100 dark:bg-blue-950/60 dark:border-blue-800/60 dark:text-blue-300 dark:hover:bg-blue-900/60 transition text-xs",children:[s.jsx(sn,{size:10}),s.jsxs("span",{children:[te.to_table," #",String(Y)]}),s.jsx("span",{className:"text-[10px] text-blue-500 dark:text-blue-400",children:"↗"})]}):typeof Y=="boolean"?s.jsx("span",{className:`px-1.5 py-0.5 rounded text-[11px] ${Y?"bg-emerald-100 text-emerald-800 dark:bg-emerald-950 dark:text-emerald-300":"bg-rose-100 text-rose-800 dark:bg-red-950 dark:text-red-300"}`,children:Y?"true":"false"}):typeof Y=="object"?s.jsx("pre",{className:"p-2 bg-slate-100 dark:bg-zinc-950 rounded text-[11px] text-slate-800 dark:text-zinc-300 overflow-x-auto border border-slate-200 dark:border-zinc-800/80",children:JSON.stringify(Y,null,2)}):s.jsx("div",{className:"text-slate-800 dark:text-zinc-200 break-all select-text font-mono",children:String(Y)})})]},v)})})]}):null})]})},hy=({schema:o,onClose:h,onSubmit:U})=>{var ne;const[r,R]=p.useState(()=>{const j={};return o.columns.forEach(C=>{C.primary&&(C.type==="integer"||C.name==="id")||(C.default!==null&&C.default!==void 0?j[C.name]=C.default:C.type==="boolean"?j[C.name]=!1:j[C.name]="")}),j}),[I,ee]=p.useState(!1),[B,P]=p.useState(null),le=async j=>{j.preventDefault(),ee(!0),P(null);try{const C={};o.columns.forEach(v=>{if(v.primary&&(v.type==="integer"||v.name==="id")&&!r[v.name])return;const Y=r[v.name];Y===""&&v.null&&v.type!=="string"&&v.type!=="text"?C[v.name]=null:v.type==="boolean"?C[v.name]=!!Y:v.type==="integer"&&Y!==""&&Y!==null?C[v.name]=parseInt(Y,10):(v.type==="float"||v.type==="decimal")&&Y!==""&&Y!==null?C[v.name]=parseFloat(Y):C[v.name]=Y}),await U(C),h()}catch(C){P(C.message||"Failed to insert record")}finally{ee(!1)}},q=(ne=o.columns.find(j=>!(j.primary&&(j.type==="integer"||j.name==="id"))))==null?void 0:ne.name,y=uo.useRef(null);uo.useEffect(()=>{const j=setTimeout(()=>{y.current&&(y.current.focus(),"select"in y.current&&typeof y.current.select=="function"&&y.current.select())},60);return()=>clearTimeout(j)},[]);const $=(j,C)=>j.primary&&(j.type==="integer"||j.name==="id")?s.jsx("span",{className:"text-slate-400 dark:text-zinc-500 italic text-xs",children:"(Auto-generated primary key)"}):j.foreign_key?s.jsx(rx,{targetTable:j.foreign_key.to_table,value:r[j.name],onChange:v=>R({...r,[j.name]:v}),isNullable:j.null,autoFocus:C}):j.enum_values&&j.enum_values.length>0?s.jsxs("select",{ref:C?y:void 0,autoFocus:C,value:r[j.name]??"",onChange:v=>R({...r,[j.name]:v.target.value}),className:"w-full bg-slate-50 dark:bg-zinc-950 border border-slate-300 dark:border-zinc-800 rounded px-2.5 py-1.5 text-xs text-slate-900 dark:text-zinc-200 focus:outline-none focus:border-slate-500 dark:focus:border-zinc-600 font-mono shadow-xs",children:[j.null&&s.jsx("option",{value:"",children:"(null)"}),j.enum_values.map(v=>s.jsx("option",{value:v,children:v},v))]}):j.type==="boolean"?s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Tu,{value:r[j.name],onChange:v=>R({...r,[j.name]:v})}),s.jsx("span",{className:"text-xs text-slate-500 dark:text-zinc-400 font-mono",children:r[j.name]?"true":"false"})]}):j.type==="datetime"||j.type==="timestamp"?s.jsx("input",{ref:C?y:void 0,autoFocus:C,type:"datetime-local",value:r[j.name]??"",onChange:v=>R({...r,[j.name]:v.target.value}),className:"w-full bg-slate-50 dark:bg-zinc-950 border border-slate-300 dark:border-zinc-800 rounded px-2.5 py-1.5 text-xs text-slate-900 dark:text-zinc-200 focus:outline-none focus:border-slate-500 dark:focus:border-zinc-600 font-mono shadow-xs"}):j.type==="date"?s.jsx("input",{ref:C?y:void 0,autoFocus:C,type:"date",value:r[j.name]??"",onChange:v=>R({...r,[j.name]:v.target.value}),className:"w-full bg-slate-50 dark:bg-zinc-950 border border-slate-300 dark:border-zinc-800 rounded px-2.5 py-1.5 text-xs text-slate-900 dark:text-zinc-200 focus:outline-none focus:border-slate-500 dark:focus:border-zinc-600 font-mono shadow-xs"}):j.type==="time"?s.jsx("input",{ref:C?y:void 0,autoFocus:C,type:"time",value:r[j.name]??"",onChange:v=>R({...r,[j.name]:v.target.value}),className:"w-full bg-slate-50 dark:bg-zinc-950 border border-slate-300 dark:border-zinc-800 rounded px-2.5 py-1.5 text-xs text-slate-900 dark:text-zinc-200 focus:outline-none focus:border-slate-500 dark:focus:border-zinc-600 font-mono shadow-xs"}):j.type==="text"||j.type==="json"||j.type==="jsonb"?s.jsx("textarea",{ref:C?y:void 0,autoFocus:C,rows:3,value:r[j.name]??"",onChange:v=>R({...r,[j.name]:v.target.value}),placeholder:j.type.includes("json")?'{"key": "value"}':"",className:"w-full bg-slate-50 dark:bg-zinc-950 border border-slate-300 dark:border-zinc-800 rounded px-2.5 py-1.5 text-xs text-slate-900 dark:text-zinc-200 focus:outline-none focus:border-slate-500 dark:focus:border-zinc-600 font-mono shadow-xs"}):s.jsx("input",{ref:C?y:void 0,autoFocus:C,type:j.type==="integer"||j.type==="float"||j.type==="decimal"?"number":"text",value:r[j.name]??"",onChange:v=>R({...r,[j.name]:v.target.value}),placeholder:"",className:"w-full bg-slate-50 dark:bg-zinc-950 border border-slate-300 dark:border-zinc-800 rounded px-2.5 py-1.5 text-xs text-slate-900 dark:text-zinc-200 focus:outline-none focus:border-slate-500 dark:focus:border-zinc-600 font-mono shadow-xs"});return s.jsx("div",{className:"fixed inset-0 bg-black/40 dark:bg-black/60 backdrop-blur-sm z-50 flex items-center justify-center p-4 select-none transition-colors",children:s.jsxs("div",{className:"bg-white dark:bg-zinc-900 border border-slate-200 dark:border-zinc-800 rounded-xl shadow-2xl max-w-xl w-full max-h-[85vh] flex flex-col overflow-hidden animate-in fade-in zoom-in-95 duration-150",children:[s.jsxs("div",{className:"p-4 border-b border-slate-200 dark:border-zinc-800 flex items-center justify-between bg-slate-50 dark:bg-zinc-950/40 rounded-t-xl",children:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx(N1,{size:16,className:"text-emerald-500 dark:text-emerald-400"}),s.jsxs("h3",{className:"font-semibold text-slate-900 dark:text-zinc-100 text-sm font-mono",children:["Insert into ",s.jsx("span",{className:"text-red-500 dark:text-red-400",children:o.table_name})]})]}),s.jsx("button",{onClick:h,className:"p-1 rounded text-slate-400 hover:text-slate-700 dark:text-zinc-400 dark:hover:text-zinc-200 hover:bg-slate-100 dark:hover:bg-zinc-800 transition",children:s.jsx(Ll,{size:16})})]}),s.jsxs("form",{onSubmit:le,className:"flex-1 overflow-y-auto p-4 space-y-3",children:[B&&s.jsxs("div",{className:"p-3 bg-rose-50 dark:bg-red-950/40 border border-rose-200 dark:border-red-800/60 rounded text-rose-700 dark:text-red-300 text-xs flex items-center gap-2",children:[s.jsx(Su,{size:14,className:"shrink-0"}),s.jsx("span",{children:B})]}),o.columns.map(j=>j.primary&&(j.type==="integer"||j.name==="id")?null:s.jsxs("div",{className:"flex flex-col space-y-1",children:[s.jsxs("label",{className:"text-xs font-mono text-slate-500 dark:text-zinc-400 flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center space-x-1.5",children:[s.jsx("span",{className:"font-medium text-slate-800 dark:text-zinc-200",children:j.name}),s.jsxs("span",{className:"text-[10px] text-slate-400 dark:text-zinc-500",children:["(",j.type,")"]}),!j.null&&s.jsx("span",{className:"text-red-500 dark:text-red-400 text-xs",children:"*"})]}),j.foreign_key&&s.jsxs("span",{className:"text-[10px] text-blue-500 dark:text-blue-400",children:["→ ",j.foreign_key.to_table]})]}),$(j,j.name===q)]},j.name)),s.jsxs("div",{className:"pt-4 border-t border-slate-200 dark:border-zinc-800 flex justify-end space-x-2",children:[s.jsx("button",{type:"button",onClick:h,className:"px-3 py-1.5 rounded text-xs text-slate-500 dark:text-zinc-400 hover:text-slate-900 dark:hover:text-zinc-200 hover:bg-slate-100 dark:hover:bg-zinc-800 transition",children:"Cancel"}),s.jsx("button",{type:"submit",disabled:I,className:"px-4 py-1.5 rounded bg-emerald-600 hover:bg-emerald-500 text-white text-xs font-medium transition disabled:opacity-50 shadow-sm",children:I?"Inserting...":"Insert Record"})]})]})]})})},xy=({isOpen:o,onToggle:h,initialCommand:U,onClearInitialCommand:r})=>{const[R,I]=p.useState(!1),[ee,B]=p.useState(""),[P,le]=p.useState([{id:"welcome",command:"Rails.env",response:{result:'"development"',result_type:"String",duration_ms:.8},timestamp:new Date().toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}]),[q,y]=p.useState(["User.all","Rails.env"]),[$,ne]=p.useState(-1),[j,C]=p.useState([]),[v,Y]=p.useState([]),[w,te]=p.useState([]),[xe,Te]=p.useState([]),[Ee,ce]=p.useState(0),[fe,pe]=p.useState(!1),Ne=p.useRef(null),Ie=p.useRef(null),Oe=typeof window<"u"&&/Mac|iPod|iPhone|iPad/.test(navigator.userAgent);p.useEffect(()=>{async function T(){try{const D=await cx();C(D.models||[]),Y(D.common_methods||[]),te(D.globals||[])}catch{}}T()},[]),p.useEffect(()=>{U&&(o||h(),B(U),r==null||r(),setTimeout(()=>{var T;return(T=Ie.current)==null?void 0:T.focus()},100))},[U,o,h,r]),p.useEffect(()=>{var T;o&&((T=Ne.current)==null||T.scrollIntoView({behavior:"smooth"}))},[P,o]),p.useEffect(()=>{var T;o&&((T=Ie.current)==null||T.focus())},[o]),p.useEffect(()=>{const T=ee.trim();if(!T){pe(!1);return}const D=[],ae=T.lastIndexOf(".");if(ae!==-1){const me=T.substring(0,ae).trim(),be=T.substring(ae+1).toLowerCase(),je=j.find(Me=>Me.name.toLowerCase()===me.toLowerCase());je&&(je.columns.forEach(Me=>{Me.toLowerCase().startsWith(be)&&D.push({label:Me,detail:`column in ${je.name}`,type:"column"})}),je.associations.forEach(Me=>{Me.toLowerCase().startsWith(be)&&D.push({label:Me,detail:`association in ${je.name}`,type:"method"})})),v.forEach(Me=>{Me.toLowerCase().startsWith(be)&&D.push({label:Me,detail:"ActiveRecord query method",type:"method"})})}else{const me=T.toLowerCase();j.forEach(be=>{be.name.toLowerCase().startsWith(me)&&D.push({label:be.name,detail:`table: ${be.table_name}`,type:"model"})}),w.forEach(be=>{be.toLowerCase().startsWith(me)&&D.push({label:be,detail:"Rails global",type:"global"})}),v.slice(0,5).forEach(be=>{be.toLowerCase().startsWith(me)&&D.push({label:be,detail:"method",type:"method"})})}D.length>0?(Te(D.slice(0,8)),ce(0),pe(!0)):pe(!1)},[ee,j,v,w]);const W=T=>{var ae;const D=ee.lastIndexOf(".");B(D!==-1?ee.substring(0,D+1)+T.label:T.label),pe(!1),(ae=Ie.current)==null||ae.focus()},X=async T=>{T&&T.preventDefault();const D=ee.trim();if(!D)return;pe(!1),B(""),ne(-1),y(be=>[D,...be.filter(je=>je!==D)]);const ae=String(Date.now()),me={id:ae,command:D,timestamp:new Date().toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}),running:!0};le(be=>[...be,me]);try{const be=await ay(D);le(je=>je.map(Me=>Me.id===ae?{...Me,response:be,running:!1}:Me))}catch(be){le(je=>je.map(Me=>Me.id===ae?{...Me,response:{error:{class:"NetworkError",message:be.message||"Failed to reach console server"}},running:!1}:Me))}},re=T=>{if(fe&&xe.length>0){if(T.key==="ArrowDown"){T.preventDefault(),ce(D=>(D+1)%xe.length);return}if(T.key==="ArrowUp"){T.preventDefault(),ce(D=>(D-1+xe.length)%xe.length);return}if(T.key==="Tab"||T.key==="Enter"&&!T.shiftKey){T.preventDefault(),W(xe[Ee]);return}if(T.key==="Escape"){T.preventDefault(),T.stopPropagation(),pe(!1);return}}if(T.key==="Escape"){T.preventDefault(),T.stopPropagation(),T.currentTarget.blur();return}if(T.key==="ArrowUp"){if($<q.length-1){const D=$+1;ne(D),B(q[D]||"")}return}if(T.key==="ArrowDown"){if($>0){const D=$-1;ne(D),B(q[D]||"")}else $===0&&(ne(-1),B(""));return}},F=T=>T.split(`
|
|
367
|
+
`).map((ae,me)=>s.jsx("div",{className:"leading-relaxed",children:ae},me));return s.jsxs("div",{className:`fixed bottom-0 left-0 right-0 z-40 transition-all duration-200 border-t ${o?R?"h-[75vh]":"h-80":"h-9"} bg-white dark:bg-zinc-950 border-slate-200 dark:border-zinc-800 text-slate-800 dark:text-zinc-100 shadow-2xl flex flex-col font-mono select-none`,children:[s.jsxs("div",{onClick:()=>!o&&h(),className:"h-9 px-3.5 bg-slate-100/90 dark:bg-zinc-900 border-b border-slate-200 dark:border-zinc-800 flex items-center justify-between cursor-pointer select-none text-xs hover:bg-slate-200/70 dark:hover:bg-zinc-800/80 transition-colors",children:[s.jsxs("div",{className:"flex items-center space-x-2.5",children:[s.jsx(nn,{size:14,className:"text-red-500 animate-pulse"}),s.jsxs("span",{className:"font-semibold text-slate-900 dark:text-zinc-100 flex items-center gap-1.5",children:["Rails ",s.jsx("span",{className:"text-red-500 font-bold",children:"Console"})]}),s.jsx("kbd",{className:"hidden sm:inline-flex items-center px-1.5 py-0.5 text-[9px] font-mono rounded border bg-white dark:bg-zinc-800 border-slate-200 dark:border-zinc-700 text-slate-500 dark:text-zinc-400",children:o?"Esc":Oe?"⌘`":"Ctrl+`"})]}),s.jsxs("div",{className:"flex items-center space-x-1.5",onClick:T=>T.stopPropagation(),children:[o&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"hidden md:flex items-center space-x-1 mr-2 text-[10px]",children:[s.jsx("span",{className:"text-slate-400 dark:text-zinc-500",children:"Quick:"}),j.slice(0,3).map(T=>s.jsxs("button",{onClick:()=>B(`${T.name}.all`),className:"px-1.5 py-0.5 rounded bg-slate-200/80 dark:bg-zinc-800 hover:bg-slate-300 dark:hover:bg-zinc-700 text-slate-700 dark:text-zinc-300 transition",children:[T.name,".all"]},T.name)),j[0]&&s.jsxs("button",{onClick:()=>B(`${j[0].name}.count`),className:"px-1.5 py-0.5 rounded bg-slate-200/80 dark:bg-zinc-800 hover:bg-slate-300 dark:hover:bg-zinc-700 text-slate-700 dark:text-zinc-300 transition",children:[j[0].name,".count"]})]}),s.jsx("button",{onClick:()=>le([]),className:"p-1 rounded text-slate-500 dark:text-zinc-400 hover:text-slate-800 dark:hover:text-zinc-200 hover:bg-slate-200/70 dark:hover:bg-zinc-800 transition",title:"Clear console output",children:s.jsx(Ji,{size:13})}),s.jsx("button",{onClick:()=>I(!R),className:"p-1 rounded text-slate-500 dark:text-zinc-400 hover:text-slate-800 dark:hover:text-zinc-200 hover:bg-slate-200/70 dark:hover:bg-zinc-800 transition",title:R?"Restore size":"Maximize terminal",children:R?s.jsx(C1,{size:13}):s.jsx(Ch,{size:13})})]}),s.jsx("button",{onClick:h,className:"flex items-center gap-1.5 px-1.5 py-0.5 rounded text-slate-500 dark:text-zinc-400 hover:text-slate-800 dark:hover:text-zinc-200 hover:bg-slate-200/70 dark:hover:bg-zinc-800 transition",title:o?"Close console (Esc)":`Open console (${Oe?"⌘`":"Ctrl+`"})`,children:o?s.jsx(ch,{size:14}):s.jsx(S1,{size:14})})]})]}),o&&s.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden bg-slate-50/50 dark:bg-zinc-950 text-xs",children:[s.jsxs("div",{className:"flex-1 overflow-y-auto p-3 space-y-3 font-mono select-text",children:[P.map(T=>{const D=T.response,ae=!!(D!=null&&D.error);return s.jsxs("div",{className:"space-y-1 group",children:[s.jsxs("div",{className:"flex items-center space-x-2 text-slate-800 dark:text-zinc-200",children:[s.jsx("span",{className:"text-red-500 font-bold select-none",children:">>"}),s.jsx("span",{className:"font-semibold text-slate-900 dark:text-white",children:T.command}),s.jsx("span",{className:"text-[10px] text-slate-400 dark:text-zinc-600 opacity-0 group-hover:opacity-100 transition select-none",children:T.timestamp})]}),T.running&&s.jsxs("div",{className:"flex items-center space-x-2 pl-4 text-slate-500 dark:text-zinc-400 text-[11px] animate-pulse",children:[s.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-red-500 animate-ping"}),s.jsx("span",{children:"Executing in Rails environment..."})]}),(D==null?void 0:D.queries)&&D.queries.length>0&&s.jsx("div",{className:"pl-4 space-y-1 my-1",children:D.queries.map((me,be)=>s.jsxs("div",{className:"text-[11px] bg-slate-100/80 dark:bg-zinc-900/60 border border-slate-200/80 dark:border-zinc-800/80 rounded px-2 py-1 text-slate-700 dark:text-zinc-300 flex items-baseline gap-1.5",children:[s.jsx("span",{className:"text-slate-400 dark:text-zinc-600 select-none",children:"↳"}),s.jsxs("span",{className:"font-semibold text-[10px] text-slate-500 dark:text-zinc-400 shrink-0",children:["SQL (",me.duration_ms,"ms):"]}),s.jsx("span",{className:"font-mono text-slate-800 dark:text-zinc-200",children:me.sql})]},be))}),(D==null?void 0:D.stdout)&&D.stdout.trim()!==""&&s.jsx("div",{className:"pl-4 py-1 text-slate-700 dark:text-zinc-300 text-[11px] whitespace-pre-wrap bg-slate-100 dark:bg-zinc-900/40 rounded px-2 border-l-2 border-slate-300 dark:border-zinc-700",children:D.stdout}),ae?s.jsxs("div",{className:"pl-4 text-rose-700 dark:text-rose-300 bg-rose-50 dark:bg-rose-950/30 border border-rose-200 dark:border-rose-900/40 rounded p-2 text-[11px]",children:[s.jsxs("div",{className:"flex items-center gap-1.5 font-bold",children:[s.jsx(Su,{size:13,className:"shrink-0 text-rose-600 dark:text-rose-400"}),s.jsxs("span",{children:[D.error.class,":"]}),s.jsx("span",{children:D.error.message})]}),D.error.backtrace&&D.error.backtrace.length>0&&s.jsx("div",{className:"mt-1 text-[10px] text-rose-600/80 dark:text-rose-400/80 space-y-0.5",children:D.error.backtrace.map((me,be)=>s.jsxs("div",{children:["at ",me]},be))})]}):D&&D.result!==void 0?s.jsxs("div",{className:"pl-4 flex items-baseline space-x-2",children:[s.jsx("span",{className:"text-emerald-600 dark:text-emerald-400 font-bold select-none",children:"=>"}),s.jsx("div",{className:"flex-1 text-emerald-800 dark:text-emerald-300 whitespace-pre-wrap break-all font-mono text-[11px]",children:F(D.result||"nil")}),D.duration_ms!==void 0&&s.jsxs("span",{className:"text-[10px] text-slate-400 dark:text-zinc-600 select-none shrink-0",children:[D.duration_ms,"ms"]})]}):null]},T.id)}),s.jsx("div",{ref:Ne})]}),fe&&xe.length>0&&s.jsxs("div",{className:"absolute bottom-11 left-4 max-w-sm w-full bg-white dark:bg-zinc-900 border border-slate-200 dark:border-zinc-700 rounded-lg shadow-2xl overflow-hidden z-50 text-xs animate-in slide-in-from-bottom-2 duration-100",children:[s.jsxs("div",{className:"px-2.5 py-1 bg-slate-100 dark:bg-zinc-800 text-[10px] font-semibold text-slate-500 dark:text-zinc-400 flex items-center justify-between border-b border-slate-200 dark:border-zinc-700",children:[s.jsx("span",{children:"Suggestions (Tab ⇥ to select)"}),s.jsxs("span",{children:[xe.length," items"]})]}),s.jsx("div",{className:"max-h-48 overflow-y-auto divide-y divide-slate-100 dark:divide-zinc-800/60",children:xe.map((T,D)=>s.jsxs("button",{onClick:()=>W(T),className:`w-full text-left px-3 py-1.5 flex items-center justify-between text-xs transition ${D===Ee?"bg-red-500/10 text-red-700 dark:text-white font-medium border-l-2 border-red-500":"text-slate-700 dark:text-slate-300 hover:bg-slate-100/80 dark:hover:bg-zinc-800/60"}`,children:[s.jsx("span",{className:"font-mono text-red-600 dark:text-red-400 font-semibold",children:T.label}),s.jsx("span",{className:"text-[10px] text-slate-400 dark:text-zinc-500",children:T.detail})]},T.label))})]}),s.jsxs("form",{onSubmit:X,className:"h-10 px-3 border-t border-slate-200 dark:border-zinc-800 bg-white/95 dark:bg-zinc-900/90 flex items-center space-x-2",children:[s.jsx("span",{className:"text-red-500 font-bold select-none",children:">>"}),s.jsx("input",{ref:Ie,type:"text",value:ee,onChange:T=>B(T.target.value),onKeyDown:re,placeholder:"Type Ruby / Active Record code... (e.g. User.all, User.count, Article.first)",className:"flex-1 bg-transparent text-xs text-slate-900 dark:text-white placeholder-slate-400 dark:placeholder-zinc-600 font-mono focus:outline-none"}),s.jsxs("button",{type:"submit",disabled:!ee.trim(),className:"px-2.5 py-1 rounded bg-red-600 hover:bg-red-500 text-white text-xs font-medium transition disabled:opacity-30 flex items-center gap-1 shadow-sm",children:[s.jsx(O1,{size:11}),s.jsx("span",{className:"text-[11px] hidden sm:inline",children:"Eval"})]})]})]})]})},gy=({isOpen:o,onClose:h,tables:U,selectedTable:r,onSelectTable:R,activeTab:I,onSelectTab:ee,onToggleConsole:B,onOpenInsertModal:P,onRefreshTable:le,onToggleFilterBar:q,onSaveChanges:y,onDiscardChanges:$,stagedChangesCount:ne,onOpenShortcutsHelp:j,onToggleSidebar:C})=>{const[v,Y]=p.useState(""),[w,te]=p.useState(0),xe=p.useRef(null),Te=p.useRef(null),{resolvedTheme:Ee,toggleTheme:ce}=bo();p.useEffect(()=>{o&&(Y(""),te(0),setTimeout(()=>{var X;(X=xe.current)==null||X.focus()},50))},[o]);const fe=p.useMemo(()=>{const X=[];U.forEach(T=>{var ae;const D=I==="tables"&&r===T.name;X.push({id:`table-${T.name}`,title:T.name,subtitle:`${((ae=T.row_count)==null?void 0:ae.toLocaleString())??0} rows • ${T.model_name||"ActiveRecord"}`,category:"Tables",icon:s.jsx(xo,{size:15,className:D?"text-red-500":"text-slate-400 dark:text-zinc-500"}),onSelect:()=>{ee("tables"),R(T.name)}})}),r&&(X.push({id:"action-add-row",title:`Add new row to ${r}`,subtitle:"Insert a new record",category:"Actions",icon:s.jsx(Nu,{size:15,className:"text-emerald-500"}),shortcut:"N",onSelect:()=>{ee("tables"),P()}}),X.push({id:"action-refresh",title:`Refresh ${r} records`,subtitle:"Reload table schema and current page rows",category:"Actions",icon:s.jsx(Yh,{size:15,className:"text-blue-500"}),shortcut:"R",onSelect:le}),X.push({id:"action-filter",title:"Toggle column filters",subtitle:"Filter records by column values and conditions",category:"Actions",icon:s.jsx(zu,{size:15,className:"text-amber-500"}),shortcut:"F",onSelect:q})),ne>0&&y&&(X.push({id:"action-save",title:`Save ${ne} pending changes`,subtitle:"Commit cell edits to database",category:"Actions",icon:s.jsx(ho,{size:15,className:"text-emerald-500"}),shortcut:"Ctrl+S",onSelect:y}),$&&X.push({id:"action-discard",title:`Discard ${ne} pending changes`,subtitle:"Revert all unstaged cell edits",category:"Actions",icon:s.jsx(go,{size:15,className:"text-rose-500"}),shortcut:"Ctrl+C",onSelect:$}));const F=typeof window<"u"&&/Mac|iPod|iPhone|iPad/.test(navigator.userAgent)?"⌘":"Ctrl";return X.push({id:"nav-tables",title:"Go to Tables Browser",subtitle:"Browse and edit database tables and associations",category:"Navigation",icon:s.jsx(oo,{size:15,className:"text-blue-500"}),shortcut:`${F}+[`,onSelect:()=>ee("tables")}),X.push({id:"nav-sql",title:"Go to SQL Runner",subtitle:"Write and run arbitrary SQL queries",category:"Navigation",icon:s.jsx(k1,{size:15,className:"text-purple-500"}),shortcut:`${F}+]`,onSelect:()=>ee("sql")}),X.push({id:"nav-console",title:"Toggle Rails Console Terminal",subtitle:"Evaluate ActiveRecord & Ruby expressions in real-time",category:"Navigation",icon:s.jsx(nn,{size:15,className:"text-red-500"}),shortcut:"Ctrl+`",onSelect:B}),C&&X.push({id:"nav-sidebar",title:"Toggle sidebar",subtitle:"Show or hide the left brand column and table list",category:"Navigation",icon:s.jsx(Lh,{size:15,className:"text-slate-500"}),shortcut:"Ctrl+B",onSelect:C}),X.push({id:"pref-theme",title:`Switch to ${Ee==="dark"?"Light":"Dark"} Mode`,subtitle:"Toggle color theme appearance",category:"Appearance",icon:Ee==="dark"?s.jsx($h,{size:15,className:"text-amber-400"}):s.jsx(_h,{size:15,className:"text-slate-600"}),shortcut:"T",onSelect:ce}),X.push({id:"help-shortcuts",title:"Keyboard Shortcuts Reference",subtitle:"View all keyboard shortcuts and keybindings",category:"Help",icon:s.jsx(mo,{size:15,className:"text-slate-500 dark:text-zinc-400"}),shortcut:"?",onSelect:j}),X},[U,r,I,ne,Ee,R,ee,B,P,le,q,y,$,ce,j,C]),pe=p.useMemo(()=>{const X=v.trim().toLowerCase();return X?fe.filter(re=>{var ae;const F=re.title.toLowerCase().includes(X),T=(ae=re.subtitle)==null?void 0:ae.toLowerCase().includes(X),D=re.category.toLowerCase().includes(X);return F||T||D}):fe},[fe,v]);p.useEffect(()=>{w>=pe.length&&te(Math.max(0,pe.length-1))},[pe.length,w]);const Ne=X=>{if(X.key==="ArrowDown")X.preventDefault(),te(re=>pe.length>0?(re+1)%pe.length:0);else if(X.key==="ArrowUp")X.preventDefault(),te(re=>pe.length>0?(re-1+pe.length)%pe.length:0);else if(X.key==="Enter"){X.preventDefault();const re=pe[w];re&&(re.onSelect(),h())}else X.key==="Escape"&&(X.preventDefault(),h())};if(p.useEffect(()=>{if(Te.current){const X=Te.current.querySelector('[data-active="true"]');X&&X.scrollIntoView({block:"nearest"})}},[w]),!o)return null;let Ie=0;const Oe=[],W=new Map;return pe.forEach(X=>{W.has(X.category)||W.set(X.category,[]),W.get(X.category).push({item:X,index:Ie++})}),W.forEach((X,re)=>{Oe.push({name:re,items:X})}),s.jsx("div",{className:"fixed inset-0 z-50 flex items-start justify-center pt-[15vh] px-4 bg-slate-900/50 dark:bg-black/70 backdrop-blur-xs animate-in fade-in duration-150",onClick:h,children:s.jsxs("div",{className:"w-full max-w-xl bg-white dark:bg-zinc-900 rounded-xl shadow-2xl border border-slate-200 dark:border-zinc-800 overflow-hidden flex flex-col max-h-[70vh] animate-in zoom-in-95 duration-150",onClick:X=>X.stopPropagation(),children:[s.jsxs("div",{className:"flex items-center px-4 py-3 border-b border-slate-200 dark:border-zinc-800 gap-3",children:[s.jsx(ei,{size:18,className:"text-slate-400 dark:text-zinc-500 shrink-0"}),s.jsx("input",{ref:xe,type:"text",value:v,onChange:X=>{Y(X.target.value),te(0)},onKeyDown:Ne,placeholder:"Type a table name or command... (e.g. users, console, theme)",className:"flex-1 bg-transparent text-sm text-slate-900 dark:text-zinc-100 placeholder-slate-400 dark:placeholder-zinc-500 outline-none font-sans"}),v?s.jsx("button",{onClick:()=>{var X;Y(""),te(0),(X=xe.current)==null||X.focus()},className:"text-slate-400 hover:text-slate-600 dark:hover:text-zinc-300 p-1",children:s.jsx(Ll,{size:14})}):s.jsx("kbd",{className:"hidden sm:inline-flex items-center px-1.5 py-0.5 text-[10px] font-mono rounded border border-slate-200 dark:border-zinc-700 bg-slate-100 dark:bg-zinc-800 text-slate-500 dark:text-zinc-400",children:"ESC"})]}),s.jsx("div",{ref:Te,className:"flex-1 overflow-y-auto p-2 space-y-3",children:pe.length===0?s.jsxs("div",{className:"py-12 text-center text-slate-400 dark:text-zinc-500 text-xs",children:["No results found for ",s.jsxs("span",{className:"text-slate-700 dark:text-zinc-300 font-mono",children:['"',v,'"']})]}):Oe.map(X=>s.jsxs("div",{className:"space-y-0.5",children:[s.jsx("div",{className:"px-3 py-1 text-[10px] font-semibold uppercase tracking-wider text-slate-400 dark:text-zinc-500",children:X.name}),X.items.map(({item:re,index:F})=>{const T=F===w;return s.jsxs("div",{"data-active":T,onClick:()=>{re.onSelect(),h()},onMouseEnter:()=>te(F),className:`flex items-center justify-between px-3 py-2.5 rounded-lg cursor-pointer transition-colors text-sm ${T?"bg-slate-100 dark:bg-zinc-800 text-slate-900 dark:text-zinc-100":"text-slate-600 dark:text-zinc-300 hover:bg-slate-50 dark:hover:bg-zinc-800/50"}`,children:[s.jsxs("div",{className:"flex items-center space-x-3 min-w-0",children:[s.jsx("div",{className:"shrink-0",children:re.icon}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"font-medium truncate font-sans text-[13px] text-slate-900 dark:text-zinc-100",children:re.title}),re.subtitle&&s.jsx("div",{className:"text-xs text-slate-400 dark:text-zinc-500 truncate font-mono",children:re.subtitle})]})]}),re.shortcut&&s.jsx("kbd",{className:"shrink-0 ml-2 px-1.5 py-0.5 text-[11px] font-mono rounded border border-slate-200 dark:border-zinc-700 bg-white dark:bg-zinc-950 text-slate-500 dark:text-zinc-400",children:re.shortcut})]},re.id)})]},X.name))}),s.jsxs("div",{className:"px-4 py-2 bg-slate-50 dark:bg-zinc-950/80 border-t border-slate-200 dark:border-zinc-800 flex items-center justify-between text-[11px] text-slate-400 dark:text-zinc-500",children:[s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx("kbd",{className:"px-1 py-0.5 text-[9px] font-mono rounded bg-white dark:bg-zinc-800 border border-slate-200 dark:border-zinc-700",children:"↑"}),s.jsx("kbd",{className:"px-1 py-0.5 text-[9px] font-mono rounded bg-white dark:bg-zinc-800 border border-slate-200 dark:border-zinc-700",children:"↓"}),"navigate"]}),s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx("kbd",{className:"px-1 py-0.5 text-[9px] font-mono rounded bg-white dark:bg-zinc-800 border border-slate-200 dark:border-zinc-700",children:"↵"}),"select"]}),s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx("kbd",{className:"px-1 py-0.5 text-[9px] font-mono rounded bg-white dark:bg-zinc-800 border border-slate-200 dark:border-zinc-700",children:"esc"}),"close"]})]}),s.jsx("div",{className:"flex items-center gap-1 font-mono text-[10px]",children:s.jsx("span",{children:"Rails Studio Palette"})})]})]})})},by=({isOpen:o,onClose:h})=>{if(!o)return null;const r=typeof window<"u"&&/Mac|iPod|iPhone|iPad/.test(navigator.userAgent)?"⌘":"Ctrl",R=[{title:"Global & Navigation",items:[{keys:[r,"K"],description:"Open Command Palette / Quick Search"},{keys:[r,"B"],description:"Toggle sidebar / brand column"},{keys:[r,"["],description:"Switch to Tables browser"},{keys:[r,"]"],description:"Switch to SQL Runner and focus editor"},{keys:["/"],description:"Focus and filter tables in sidebar"},{keys:["↑","↓"],description:"Move highlight in the sidebar table list"},{keys:["Enter"],description:"Open the highlighted sidebar table"},{keys:["Tab"],description:"Switch focus between sidebar and table"},{keys:["←","→"],description:"Focus sidebar (←) or table (→)"},{keys:[r,"`"],description:"Toggle Rails Console Web Terminal"},{keys:[r,"S"],description:"Save pending cell edits to database"},{keys:[r,"C"],description:"Discard pending cell edits"},{keys:["T"],description:"Toggle light / dark theme"},{keys:["?"],description:"Open this Keyboard Shortcuts cheat sheet"},{keys:["Esc"],description:"Close any active modal, drawer, or search panel"}]},{title:"Table Data Browser",items:[{keys:["↑","↓"],description:"Move highlight on table rows (click table first)"},{keys:["Space"],description:"Toggle checkbox on the focused row"},{keys:["N"],description:"Add a new row / record to current table"},{keys:["D"],description:"Delete selected rows"},{keys:["R"],description:"Refresh current table schema and records"},{keys:["F"],description:"Toggle column filter bar"},{keys:["Double Click"],description:"Edit cell value inline"},{keys:["Enter"],description:"Commit cell edit value"}]},{title:"Rails Console & SQL Runner",items:[{keys:["Tab"],description:"Switch between SQL editor and results"},{keys:["Esc"],description:"Leave the SQL editor"},{keys:[r,"Enter"],description:"Run query (also works while typing)"},{keys:["Ctrl","Alt","N"],description:"New SQL query tab"},{keys:["Ctrl","Alt","F"],description:"Format / prettify SQL"},{keys:[r,"S"],description:"Save current SQL to Stars (name it for search)"},{keys:["Ctrl","Alt","S"],description:"Open starred SQL queries"},{keys:["Ctrl","\\"],description:"Toggle editor / results split layout"},{keys:["Ctrl","Alt","X"],description:"Clear SQL editor"},{keys:["↑","↓"],description:"Move highlight on result rows (or console history)"},{keys:["Space"],description:"Toggle checkbox on the focused result row"},{keys:["Tab"],description:"Console: accept autocomplete suggestion"}]}],I=ee=>s.jsxs("div",{className:"space-y-2",children:[s.jsx("h4",{className:"text-[11px] font-semibold uppercase tracking-wider text-slate-400 dark:text-zinc-500",children:ee.title}),s.jsx("div",{className:"rounded-lg border border-slate-200 dark:border-zinc-800 divide-y divide-slate-100 dark:divide-zinc-800/60 overflow-hidden bg-slate-50/50 dark:bg-zinc-950/40",children:ee.items.map((B,P)=>s.jsxs("div",{className:"flex items-center justify-between gap-3 px-3.5 py-2 text-xs",children:[s.jsx("span",{className:"text-slate-700 dark:text-zinc-300 font-sans min-w-0 pr-1",children:B.description}),s.jsx("div",{className:"flex items-center space-x-1 shrink-0",children:B.keys.map((le,q)=>s.jsx("kbd",{className:"px-2 py-0.5 text-[11px] font-mono font-medium rounded border border-slate-200 dark:border-zinc-700 bg-white dark:bg-zinc-900 text-slate-700 dark:text-zinc-300 shadow-xs",children:le},q))})]},P))})]},ee.title);return s.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-slate-900/50 dark:bg-black/70 backdrop-blur-xs animate-in fade-in duration-150",onClick:h,children:s.jsxs("div",{className:"w-full max-w-3xl bg-white dark:bg-zinc-900 rounded-xl shadow-2xl border border-slate-200 dark:border-zinc-800 overflow-hidden flex flex-col animate-in zoom-in-95 duration-150",onClick:ee=>ee.stopPropagation(),children:[s.jsxs("div",{className:"flex items-center justify-between px-5 py-3.5 border-b border-slate-200 dark:border-zinc-800",children:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx(mo,{size:18,className:"text-slate-700 dark:text-zinc-300"}),s.jsx("h3",{className:"font-semibold text-slate-900 dark:text-zinc-100 text-sm",children:"Keyboard Shortcuts"})]}),s.jsx("button",{onClick:h,className:"text-slate-400 hover:text-slate-600 dark:hover:text-zinc-300 p-1 rounded-md hover:bg-slate-100 dark:hover:bg-zinc-800 transition",children:s.jsx(Ll,{size:16})})]}),s.jsxs("div",{className:"p-5 overflow-y-auto max-h-[75vh] grid grid-cols-1 sm:grid-cols-2 gap-x-5 gap-y-5",children:[s.jsx("div",{className:"space-y-2 min-w-0",children:I(R[0])}),s.jsxs("div",{className:"space-y-5 min-w-0",children:[I(R[1]),I(R[2])]})]}),s.jsxs("div",{className:"px-5 py-2.5 bg-slate-50 dark:bg-zinc-950/80 border-t border-slate-200 dark:border-zinc-800 flex items-center justify-between text-xs text-slate-400 dark:text-zinc-500 font-mono text-[11px]",children:[s.jsxs("span",{children:["Tip: Press ",s.jsx("kbd",{className:"px-1 py-0.5 rounded border border-slate-200 dark:border-zinc-700 bg-white dark:bg-zinc-900 text-slate-600 dark:text-zinc-400",children:"?"})," anywhere to toggle this guide"]}),s.jsx("button",{onClick:h,className:"px-2.5 py-1 rounded bg-slate-200/70 dark:bg-zinc-800 hover:bg-slate-300 dark:hover:bg-zinc-700 text-slate-700 dark:text-zinc-300 text-xs transition",children:"Close"})]})]})})},yy=()=>{const{toggleTheme:o}=bo(),[h,U]=p.useState(),[r,R]=p.useState([]),[I,ee]=p.useState(null),[B,P]=p.useState("tables"),[le,q]=p.useState(0),[y,$]=p.useState("sidebar"),[ne,j]=p.useState(()=>{try{const O=localStorage.getItem("rails_studio_sidebar_open");if(O==="0")return!1;if(O==="1")return!0}catch{}return!0}),C=p.useCallback(()=>{j(O=>{const N=!O;try{localStorage.setItem("rails_studio_sidebar_open",N?"1":"0")}catch{}return N})},[]),[v,Y]=p.useState(null),[w,te]=p.useState([]),[xe,Te]=p.useState(0),[Ee,ce]=p.useState(1),[fe,pe]=p.useState(50),[Ne,Ie]=p.useState(),[Oe,W]=p.useState("asc"),[X,re]=p.useState([]),[F,T]=p.useState(!0),[D,ae]=p.useState(!1),[me,be]=p.useState(!1),[je,Me]=p.useState(new Map),[f,L]=p.useState(null),[oe,E]=p.useState(!1),[G,Q]=p.useState(!1),[ie,K]=p.useState(!1),[ue,we]=p.useState(!1),[Ze,Je]=p.useState(!1),[Ue,De]=p.useState(),[qe,zt]=p.useState(null),ht=(O,N="success")=>{zt({message:O,type:N}),setTimeout(()=>zt(null),3e3)},St=p.useCallback(async()=>{T(!0);try{const O=await P1();U(O.database),R(O.tables),!I&&O.tables.length>0&&ee(O.tables[0].name)}catch(O){ht(O.message||"Failed to connect to database","error")}finally{T(!1)}},[I]);p.useEffect(()=>{St()},[]);const dt=p.useCallback(async O=>{ae(!0);try{const N=await yo(O);Y(N);const ze=await ux(O,Ee,fe,Ne,Oe,X);te(ze.records),Te(ze.total_count)}catch(N){ht(N.message||"Failed to fetch table records","error")}finally{ae(!1)}},[Ee,fe,Ne,Oe,X]);p.useEffect(()=>{I&&B==="tables"&&dt(I)},[I,B,Ee,fe,Ne,Oe,X,dt]);const Et=O=>{O!==I&&(je.size>0&&!confirm("You have unsaved changes in the current table. Discard them?")||(Me(new Map),ee(O),ce(1),Ie(void 0),re([])))},qt=O=>{Ne===O?Oe==="asc"?W("desc"):(Ie(void 0),W("asc")):(Ie(O),W("asc")),ce(1)},Il=(O,N,ze,H)=>{const Xe=`${O}:${N}`,rt=new Map(je);H===ze?rt.delete(Xe):rt.set(Xe,{rowId:O,column:N,originalValue:ze,newValue:H}),Me(rt)},Ut=()=>{Me(new Map),ht("Changes discarded")},ul=async()=>{if(!(!I||je.size===0)){be(!0);try{const O=new Map;je.forEach(({rowId:ze,column:H,newValue:Xe})=>{const rt=O.get(ze)||{};rt[H]=Xe,O.set(ze,rt)});const N=Array.from(O.entries()).map(([ze,H])=>({id:ze,changes:H}));await ku(I,{updates:N}),ht(`Saved ${je.size} changes successfully!`),Me(new Map),dt(I),St()}catch(O){ht(O.message||"Failed to save changes","error")}finally{be(!1)}}},Z=async O=>{I&&(await ty(I,O),ht("Record created successfully!"),dt(I),St())},J=async O=>{if(!I||!confirm(`Are you sure you want to delete ${O.length} records? This action cannot be undone.`))return!1;try{return await ku(I,{deletes:O}),ht(`Deleted ${O.length} records`),dt(I),St(),!0}catch(N){return ht(N.message||"Failed to delete records","error"),!1}};return p.useEffect(()=>{const O=N=>{var rt;if((N.ctrlKey||N.metaKey)&&!N.altKey&&N.key.toLowerCase()==="k"){N.preventDefault(),Q(ut=>!ut);return}if((N.ctrlKey||N.metaKey)&&!N.altKey&&N.key.toLowerCase()==="b"){N.preventDefault(),C();return}if((N.ctrlKey||N.metaKey)&&!N.altKey&&(N.code==="Backquote"||N.key==="`"||N.key==="~")){N.preventDefault(),Je(ut=>!ut);return}if((N.ctrlKey||N.metaKey)&&!N.altKey&&!N.shiftKey&&(N.key==="["||N.code==="BracketLeft")&&!G&&!ie&&!oe&&!f){N.preventDefault(),P("tables");return}if((N.ctrlKey||N.metaKey)&&!N.altKey&&!N.shiftKey&&(N.key==="]"||N.code==="BracketRight")&&!G&&!ie&&!oe&&!f){N.preventDefault(),P("sql"),q(ut=>ut+1);return}if((N.ctrlKey||N.metaKey)&&!N.altKey&&N.key.toLowerCase()==="s"){if(N.preventDefault(),B==="sql")return;je.size>0&&!me&&ul();return}const ze=N.target,H=(rt=ze==null?void 0:ze.tagName)==null?void 0:rt.toLowerCase(),Xe=H==="input"||H==="textarea"||H==="select"||(ze==null?void 0:ze.isContentEditable);if((N.ctrlKey||N.metaKey)&&N.key.toLowerCase()==="c"){!Xe&&je.size>0&&(N.preventDefault(),Ut());return}if(N.key==="Escape"){if(G){N.preventDefault(),Q(!1);return}if(ie){N.preventDefault(),K(!1);return}if(Xe){N.preventDefault(),ze==null||ze.blur();return}if(oe){N.preventDefault(),E(!1);return}if(f){N.preventDefault(),L(null);return}if(Ze){N.preventDefault(),Je(!1);return}}if(!(Xe||G||ie||oe||f)){if(N.key==="?"){N.preventDefault(),K(ut=>!ut);return}if(N.key.toLowerCase()==="t"&&!N.ctrlKey&&!N.metaKey&&!N.altKey){N.preventDefault(),o();return}if(B==="tables"&&!N.ctrlKey&&!N.metaKey&&!N.altKey){if(N.key==="Tab"){N.preventDefault(),$(ut=>ut==="sidebar"?"records":"sidebar");return}if(N.key==="ArrowLeft"){N.preventDefault(),$("sidebar");return}if(N.key==="ArrowRight"){N.preventDefault(),$("records");return}}if(N.key.toLowerCase()==="n"&&!N.ctrlKey&&!N.metaKey){I&&B==="tables"&&v&&(N.preventDefault(),E(!0));return}if(N.key.toLowerCase()==="f"&&!N.ctrlKey&&!N.metaKey){I&&B==="tables"&&(N.preventDefault(),we(ut=>!ut));return}}};return window.addEventListener("keydown",O),()=>window.removeEventListener("keydown",O)},[G,ie,oe,f,Ze,je.size,me,I,B,v,ul,Ut,dt,C,o]),s.jsxs("div",{className:"flex flex-col h-screen w-screen overflow-hidden bg-slate-50 dark:bg-zinc-950 text-slate-900 dark:text-zinc-100 antialiased font-sans",children:[qe&&s.jsx("div",{className:`fixed bottom-24 right-4 z-50 px-4 py-2 rounded-lg shadow-xl text-xs font-mono border transition-all animate-in slide-in-from-bottom-2 ${qe.type==="success"?"bg-emerald-50 dark:bg-emerald-950/90 border-emerald-200 dark:border-emerald-800 text-emerald-800 dark:text-emerald-200":"bg-red-50 dark:bg-red-950/90 border-red-200 dark:border-red-800 text-red-800 dark:text-red-200"}`,children:qe.message}),s.jsx(K1,{databaseInfo:h,activeTab:B,setActiveTab:P,sidebarOpen:ne,onToggleSidebar:C,onOpenCommandPalette:()=>Q(!0),onOpenShortcuts:()=>K(!0)}),s.jsxs("div",{className:"flex-1 flex min-h-0 overflow-hidden",children:[ne&&s.jsx(J1,{tables:r,selectedTable:I,onSelectTable:Et,loading:F,onOpenCommandPalette:()=>Q(!0),navActive:B==="tables"&&y==="sidebar",onActivate:()=>{B==="tables"&&$("sidebar")}}),B==="tables"?v&&I?s.jsx(uy,{schema:v,records:w,totalCount:xe,page:Ee,perPage:fe,sortBy:Ne,sortOrder:Oe,filters:X,loading:D,stagedChanges:je,showFilterBar:ue,onToggleFilterBar:()=>we(O=>!O),navActive:y==="records",onActivate:()=>$("records"),onPageChange:ce,onPerPageChange:O=>{pe(O),ce(1)},onSortChange:qt,onFiltersChange:O=>{re(O),ce(1)},onRefresh:()=>dt(I),onOpenInsertModal:()=>E(!0),onStageCellChange:Il,onDeleteSelectedRows:J,onOpenForeignKey:(O,N)=>L({table:O,id:N})}):s.jsx("div",{className:"flex-1 flex items-center justify-center text-slate-400 dark:text-zinc-500 font-mono text-xs",children:"Select a table from the sidebar to inspect records"}):s.jsx(fy,{tables:r,editorFocusNonce:le,onOpenConsole:O=>{De(O),Je(!0)}})]}),s.jsx("div",{className:"h-9 shrink-0","aria-hidden":!0}),f&&s.jsx(my,{targetTable:f.table,targetId:f.id,onClose:()=>L(null),onNavigateToTable:O=>{L(null),Et(O)},onSelectNestedFk:(O,N)=>{L({table:O,id:N})}}),oe&&v&&s.jsx(hy,{schema:v,onClose:()=>E(!1),onSubmit:Z}),je.size>0&&s.jsx("div",{className:"fixed bottom-20 left-1/2 z-50 -translate-x-1/2 animate-in fade-in slide-in-from-bottom-2",children:s.jsxs("div",{className:"flex items-center gap-2 rounded-lg border border-slate-200 dark:border-zinc-700 bg-white/95 dark:bg-zinc-900/95 shadow-lg backdrop-blur px-2 py-1.5",children:[s.jsxs("div",{className:"flex items-center gap-1.5 px-2 font-mono text-[11px] text-slate-600 dark:text-zinc-300",children:[s.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-500 animate-pulse"}),s.jsxs("span",{children:[je.size," pending ",je.size===1?"change":"changes"]})]}),s.jsx("div",{className:"h-4 w-px bg-slate-200 dark:bg-zinc-700"}),s.jsxs("button",{onClick:Ut,disabled:me,className:"text-slate-600 dark:text-zinc-300 hover:text-slate-900 dark:hover:text-white text-xs px-2 py-1 rounded-md hover:bg-slate-100 dark:hover:bg-zinc-800 transition flex items-center gap-1.5 font-medium disabled:opacity-50",title:"Discard all changes (Ctrl+C)",children:[s.jsx(go,{size:13}),s.jsx("span",{children:"Discard"}),s.jsx("kbd",{className:"hidden sm:inline-flex px-1.5 py-0.5 text-[9px] font-mono rounded bg-slate-50 dark:bg-zinc-800 border border-slate-200 dark:border-zinc-700 text-slate-500 dark:text-zinc-400",children:"Ctrl+C"})]}),s.jsxs("button",{onClick:ul,disabled:me,className:"bg-emerald-600 hover:bg-emerald-500 text-white text-xs px-2.5 py-1 rounded-md font-medium transition flex items-center gap-1.5 shadow-xs disabled:opacity-50",title:"Save all changes (Ctrl+S)",children:[s.jsx(ho,{size:13}),s.jsx("span",{children:me?"Saving...":"Save"}),s.jsx("kbd",{className:"hidden sm:inline-flex px-1.5 py-0.5 text-[9px] font-mono rounded bg-emerald-700 text-emerald-100 border border-emerald-500/40",children:"Ctrl+S"})]})]})}),s.jsx(xy,{isOpen:Ze,onToggle:()=>Je(!Ze),initialCommand:Ue,onClearInitialCommand:()=>De(void 0)}),s.jsx(gy,{isOpen:G,onClose:()=>Q(!1),tables:r,selectedTable:I,onSelectTable:O=>{Et(O),Q(!1)},activeTab:B,onSelectTab:O=>{P(O),Q(!1)},onToggleConsole:()=>{Je(O=>!O),Q(!1)},onToggleSidebar:()=>{C(),Q(!1)},onOpenInsertModal:()=>{E(!0),Q(!1)},onRefreshTable:()=>{I&&dt(I),Q(!1)},onToggleFilterBar:()=>{we(O=>!O),Q(!1)},onSaveChanges:ul,onDiscardChanges:Ut,stagedChangesCount:je.size,onOpenShortcutsHelp:()=>{K(!0),Q(!1)}}),s.jsx(by,{isOpen:ie,onClose:()=>K(!1)})]})},Fm=document.getElementById("root");Fm&&n1.createRoot(Fm).render(s.jsx(uo.StrictMode,{children:s.jsx(q1,{children:s.jsx(yy,{})})}));
|