@manojkmfsi/monodog 1.0.1

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.
Files changed (61) hide show
  1. package/.eslintrc.cjs +15 -0
  2. package/.turbo/turbo-build.log +4 -0
  3. package/CHANGELOG.md +79 -0
  4. package/LICENCE +21 -0
  5. package/README.md +55 -0
  6. package/dist/config-loader.js +116 -0
  7. package/dist/get-db-url.js +10 -0
  8. package/dist/gitService.js +242 -0
  9. package/dist/index.js +1370 -0
  10. package/dist/serve.js +103 -0
  11. package/dist/setup.js +155 -0
  12. package/dist/utils/ci-status.js +446 -0
  13. package/dist/utils/helpers.js +237 -0
  14. package/dist/utils/monorepo-scanner.js +486 -0
  15. package/dist/utils/utilities.js +414 -0
  16. package/monodog-conf.example.json +16 -0
  17. package/monodog-conf.json +16 -0
  18. package/monodog-dashboard/README.md +58 -0
  19. package/monodog-dashboard/dist/assets/index-2d967652.js +71 -0
  20. package/monodog-dashboard/dist/assets/index-504dc418.css +1 -0
  21. package/monodog-dashboard/dist/index.html +15 -0
  22. package/package.json +50 -0
  23. package/prisma/migrations/20251017041048_init/migration.sql +19 -0
  24. package/prisma/migrations/20251017083007_add_package/migration.sql +21 -0
  25. package/prisma/migrations/20251021083705_alter_package/migration.sql +37 -0
  26. package/prisma/migrations/20251022085155_test/migration.sql +2 -0
  27. package/prisma/migrations/20251022160841_/migration.sql +35 -0
  28. package/prisma/migrations/20251023130158_rename_column_name/migration.sql +34 -0
  29. package/prisma/migrations/20251023174837_/migration.sql +34 -0
  30. package/prisma/migrations/20251023175830_uodate_schema/migration.sql +32 -0
  31. package/prisma/migrations/20251024103700_add_dependency_info/migration.sql +13 -0
  32. package/prisma/migrations/20251025192150_add_dependency_info/migration.sql +19 -0
  33. package/prisma/migrations/20251025192342_add_dependency_info/migration.sql +40 -0
  34. package/prisma/migrations/20251025204613_add_dependency_info/migration.sql +8 -0
  35. package/prisma/migrations/20251026071336_add_dependency_info/migration.sql +25 -0
  36. package/prisma/migrations/20251027062626_add_commit/migration.sql +10 -0
  37. package/prisma/migrations/20251027062748_add_commit/migration.sql +23 -0
  38. package/prisma/migrations/20251027092741_add_commit/migration.sql +17 -0
  39. package/prisma/migrations/20251027112736_add_health_status/migration.sql +16 -0
  40. package/prisma/migrations/20251027140546_init_packages/migration.sql +16 -0
  41. package/prisma/migrations/20251029073436_added_package_heath_key/migration.sql +34 -0
  42. package/prisma/migrations/20251029073830_added_package_health_key/migration.sql +49 -0
  43. package/prisma/migrations/20251111091920_/migration.sql +16 -0
  44. package/prisma/migrations/20251211155036_cascade_on_auto_delete/migration.sql +48 -0
  45. package/prisma/migrations/migration_lock.toml +3 -0
  46. package/prisma/schema.prisma +114 -0
  47. package/release.config.js +41 -0
  48. package/src/config-loader.ts +119 -0
  49. package/src/get-db-url.ts +11 -0
  50. package/src/gitService.ts +277 -0
  51. package/src/index.ts +1554 -0
  52. package/src/serve.ts +87 -0
  53. package/src/setup.ts +164 -0
  54. package/src/types/monorepo-scanner.d.ts +32 -0
  55. package/src/utils/ci-status.ts +639 -0
  56. package/src/utils/helpers.js +203 -0
  57. package/src/utils/helpers.js.map +1 -0
  58. package/src/utils/helpers.ts +238 -0
  59. package/src/utils/monorepo-scanner.ts +599 -0
  60. package/src/utils/utilities.ts +483 -0
  61. package/tsconfig.json +16 -0
@@ -0,0 +1,71 @@
1
+ function lm(e,t){for(var n=0;n<t.length;n++){const s=t[n];if(typeof s!="string"&&!Array.isArray(s)){for(const l in s)if(l!=="default"&&!(l in e)){const a=Object.getOwnPropertyDescriptor(s,l);a&&Object.defineProperty(e,l,a.get?a:{enumerable:!0,get:()=>s[l]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))s(l);new MutationObserver(l=>{for(const a of l)if(a.type==="childList")for(const i of a.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&s(i)}).observe(document,{childList:!0,subtree:!0});function n(l){const a={};return l.integrity&&(a.integrity=l.integrity),l.referrerPolicy&&(a.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?a.credentials="include":l.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function s(l){if(l.ep)return;l.ep=!0;const a=n(l);fetch(l.href,a)}})();function am(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var pc={exports:{}},Is={},gc={exports:{}},_={};/**
2
+ * @license React
3
+ * react.production.min.js
4
+ *
5
+ * Copyright (c) Facebook, Inc. and its 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 jr=Symbol.for("react.element"),im=Symbol.for("react.portal"),om=Symbol.for("react.fragment"),cm=Symbol.for("react.strict_mode"),um=Symbol.for("react.profiler"),dm=Symbol.for("react.provider"),mm=Symbol.for("react.context"),hm=Symbol.for("react.forward_ref"),fm=Symbol.for("react.suspense"),xm=Symbol.for("react.memo"),pm=Symbol.for("react.lazy"),Oi=Symbol.iterator;function gm(e){return e===null||typeof e!="object"?null:(e=Oi&&e[Oi]||e["@@iterator"],typeof e=="function"?e:null)}var yc={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},vc=Object.assign,jc={};function En(e,t,n){this.props=e,this.context=t,this.refs=jc,this.updater=n||yc}En.prototype.isReactComponent={};En.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};En.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function wc(){}wc.prototype=En.prototype;function Pa(e,t,n){this.props=e,this.context=t,this.refs=jc,this.updater=n||yc}var La=Pa.prototype=new wc;La.constructor=Pa;vc(La,En.prototype);La.isPureReactComponent=!0;var $i=Array.isArray,Nc=Object.prototype.hasOwnProperty,Ra={current:null},bc={key:!0,ref:!0,__self:!0,__source:!0};function kc(e,t,n){var s,l={},a=null,i=null;if(t!=null)for(s in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(a=""+t.key),t)Nc.call(t,s)&&!bc.hasOwnProperty(s)&&(l[s]=t[s]);var c=arguments.length-2;if(c===1)l.children=n;else if(1<c){for(var o=Array(c),u=0;u<c;u++)o[u]=arguments[u+2];l.children=o}if(e&&e.defaultProps)for(s in c=e.defaultProps,c)l[s]===void 0&&(l[s]=c[s]);return{$$typeof:jr,type:e,key:a,ref:i,props:l,_owner:Ra.current}}function ym(e,t){return{$$typeof:jr,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Ta(e){return typeof e=="object"&&e!==null&&e.$$typeof===jr}function vm(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Ii=/\/+/g;function nl(e,t){return typeof e=="object"&&e!==null&&e.key!=null?vm(""+e.key):t.toString(36)}function Zr(e,t,n,s,l){var a=typeof e;(a==="undefined"||a==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(a){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case jr:case im:i=!0}}if(i)return i=e,l=l(i),e=s===""?"."+nl(i,0):s,$i(l)?(n="",e!=null&&(n=e.replace(Ii,"$&/")+"/"),Zr(l,t,n,"",function(u){return u})):l!=null&&(Ta(l)&&(l=ym(l,n+(!l.key||i&&i.key===l.key?"":(""+l.key).replace(Ii,"$&/")+"/")+e)),t.push(l)),1;if(i=0,s=s===""?".":s+":",$i(e))for(var c=0;c<e.length;c++){a=e[c];var o=s+nl(a,c);i+=Zr(a,t,n,o,l)}else if(o=gm(e),typeof o=="function")for(e=o.call(e),c=0;!(a=e.next()).done;)a=a.value,o=s+nl(a,c++),i+=Zr(a,t,n,o,l);else if(a==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function Tr(e,t,n){if(e==null)return e;var s=[],l=0;return Zr(e,s,"","",function(a){return t.call(n,a,l++)}),s}function jm(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var fe={current:null},Gr={transition:null},wm={ReactCurrentDispatcher:fe,ReactCurrentBatchConfig:Gr,ReactCurrentOwner:Ra};function Sc(){throw Error("act(...) is not supported in production builds of React.")}_.Children={map:Tr,forEach:function(e,t,n){Tr(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Tr(e,function(){t++}),t},toArray:function(e){return Tr(e,function(t){return t})||[]},only:function(e){if(!Ta(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};_.Component=En;_.Fragment=om;_.Profiler=um;_.PureComponent=Pa;_.StrictMode=cm;_.Suspense=fm;_.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=wm;_.act=Sc;_.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var s=vc({},e.props),l=e.key,a=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(a=t.ref,i=Ra.current),t.key!==void 0&&(l=""+t.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(o in t)Nc.call(t,o)&&!bc.hasOwnProperty(o)&&(s[o]=t[o]===void 0&&c!==void 0?c[o]:t[o])}var o=arguments.length-2;if(o===1)s.children=n;else if(1<o){c=Array(o);for(var u=0;u<o;u++)c[u]=arguments[u+2];s.children=c}return{$$typeof:jr,type:e.type,key:l,ref:a,props:s,_owner:i}};_.createContext=function(e){return e={$$typeof:mm,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:dm,_context:e},e.Consumer=e};_.createElement=kc;_.createFactory=function(e){var t=kc.bind(null,e);return t.type=e,t};_.createRef=function(){return{current:null}};_.forwardRef=function(e){return{$$typeof:hm,render:e}};_.isValidElement=Ta;_.lazy=function(e){return{$$typeof:pm,_payload:{_status:-1,_result:e},_init:jm}};_.memo=function(e,t){return{$$typeof:xm,type:e,compare:t===void 0?null:t}};_.startTransition=function(e){var t=Gr.transition;Gr.transition={};try{e()}finally{Gr.transition=t}};_.unstable_act=Sc;_.useCallback=function(e,t){return fe.current.useCallback(e,t)};_.useContext=function(e){return fe.current.useContext(e)};_.useDebugValue=function(){};_.useDeferredValue=function(e){return fe.current.useDeferredValue(e)};_.useEffect=function(e,t){return fe.current.useEffect(e,t)};_.useId=function(){return fe.current.useId()};_.useImperativeHandle=function(e,t,n){return fe.current.useImperativeHandle(e,t,n)};_.useInsertionEffect=function(e,t){return fe.current.useInsertionEffect(e,t)};_.useLayoutEffect=function(e,t){return fe.current.useLayoutEffect(e,t)};_.useMemo=function(e,t){return fe.current.useMemo(e,t)};_.useReducer=function(e,t,n){return fe.current.useReducer(e,t,n)};_.useRef=function(e){return fe.current.useRef(e)};_.useState=function(e){return fe.current.useState(e)};_.useSyncExternalStore=function(e,t,n){return fe.current.useSyncExternalStore(e,t,n)};_.useTransition=function(){return fe.current.useTransition()};_.version="18.3.1";gc.exports=_;var d=gc.exports;const Nm=am(d),bm=lm({__proto__:null,default:Nm},[d]);/**
10
+ * @license React
11
+ * react-jsx-runtime.production.min.js
12
+ *
13
+ * Copyright (c) Facebook, Inc. and its 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 km=d,Sm=Symbol.for("react.element"),Cm=Symbol.for("react.fragment"),Em=Object.prototype.hasOwnProperty,Pm=km.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Lm={key:!0,ref:!0,__self:!0,__source:!0};function Cc(e,t,n){var s,l={},a=null,i=null;n!==void 0&&(a=""+n),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(i=t.ref);for(s in t)Em.call(t,s)&&!Lm.hasOwnProperty(s)&&(l[s]=t[s]);if(e&&e.defaultProps)for(s in t=e.defaultProps,t)l[s]===void 0&&(l[s]=t[s]);return{$$typeof:Sm,type:e,key:a,ref:i,props:l,_owner:Pm.current}}Is.Fragment=Cm;Is.jsx=Cc;Is.jsxs=Cc;pc.exports=Is;var r=pc.exports,Ll={},Ec={exports:{}},Ce={},Pc={exports:{}},Lc={};/**
18
+ * @license React
19
+ * scheduler.production.min.js
20
+ *
21
+ * Copyright (c) Facebook, Inc. and its 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
+ */(function(e){function t(P,T){var M=P.length;P.push(T);e:for(;0<M;){var Q=M-1>>>1,J=P[Q];if(0<l(J,T))P[Q]=T,P[M]=J,M=Q;else break e}}function n(P){return P.length===0?null:P[0]}function s(P){if(P.length===0)return null;var T=P[0],M=P.pop();if(M!==T){P[0]=M;e:for(var Q=0,J=P.length,Lr=J>>>1;Q<Lr;){var Ot=2*(Q+1)-1,tl=P[Ot],$t=Ot+1,Rr=P[$t];if(0>l(tl,M))$t<J&&0>l(Rr,tl)?(P[Q]=Rr,P[$t]=M,Q=$t):(P[Q]=tl,P[Ot]=M,Q=Ot);else if($t<J&&0>l(Rr,M))P[Q]=Rr,P[$t]=M,Q=$t;else break e}}return T}function l(P,T){var M=P.sortIndex-T.sortIndex;return M!==0?M:P.id-T.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var i=Date,c=i.now();e.unstable_now=function(){return i.now()-c}}var o=[],u=[],p=1,m=null,g=3,v=!1,w=!1,N=!1,b=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,h=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function f(P){for(var T=n(u);T!==null;){if(T.callback===null)s(u);else if(T.startTime<=P)s(u),T.sortIndex=T.expirationTime,t(o,T);else break;T=n(u)}}function j(P){if(N=!1,f(P),!w)if(n(o)!==null)w=!0,He(S);else{var T=n(u);T!==null&&Tn(j,T.startTime-P)}}function S(P,T){w=!1,N&&(N=!1,x(C),C=-1),v=!0;var M=g;try{for(f(T),m=n(o);m!==null&&(!(m.expirationTime>T)||P&&!B());){var Q=m.callback;if(typeof Q=="function"){m.callback=null,g=m.priorityLevel;var J=Q(m.expirationTime<=T);T=e.unstable_now(),typeof J=="function"?m.callback=J:m===n(o)&&s(o),f(T)}else s(o);m=n(o)}if(m!==null)var Lr=!0;else{var Ot=n(u);Ot!==null&&Tn(j,Ot.startTime-T),Lr=!1}return Lr}finally{m=null,g=M,v=!1}}var E=!1,y=null,C=-1,$=5,R=-1;function B(){return!(e.unstable_now()-R<$)}function ae(){if(y!==null){var P=e.unstable_now();R=P;var T=!0;try{T=y(!0,P)}finally{T?we():(E=!1,y=null)}}else E=!1}var we;if(typeof h=="function")we=function(){h(ae)};else if(typeof MessageChannel<"u"){var ne=new MessageChannel,$e=ne.port2;ne.port1.onmessage=ae,we=function(){$e.postMessage(null)}}else we=function(){b(ae,0)};function He(P){y=P,E||(E=!0,we())}function Tn(P,T){C=b(function(){P(e.unstable_now())},T)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(P){P.callback=null},e.unstable_continueExecution=function(){w||v||(w=!0,He(S))},e.unstable_forceFrameRate=function(P){0>P||125<P?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):$=0<P?Math.floor(1e3/P):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_getFirstCallbackNode=function(){return n(o)},e.unstable_next=function(P){switch(g){case 1:case 2:case 3:var T=3;break;default:T=g}var M=g;g=T;try{return P()}finally{g=M}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(P,T){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var M=g;g=P;try{return T()}finally{g=M}},e.unstable_scheduleCallback=function(P,T,M){var Q=e.unstable_now();switch(typeof M=="object"&&M!==null?(M=M.delay,M=typeof M=="number"&&0<M?Q+M:Q):M=Q,P){case 1:var J=-1;break;case 2:J=250;break;case 5:J=1073741823;break;case 4:J=1e4;break;default:J=5e3}return J=M+J,P={id:p++,callback:T,priorityLevel:P,startTime:M,expirationTime:J,sortIndex:-1},M>Q?(P.sortIndex=M,t(u,P),n(o)===null&&P===n(u)&&(N?(x(C),C=-1):N=!0,Tn(j,M-Q))):(P.sortIndex=J,t(o,P),w||v||(w=!0,He(S))),P},e.unstable_shouldYield=B,e.unstable_wrapCallback=function(P){var T=g;return function(){var M=g;g=T;try{return P.apply(this,arguments)}finally{g=M}}}})(Lc);Pc.exports=Lc;var Rm=Pc.exports;/**
26
+ * @license React
27
+ * react-dom.production.min.js
28
+ *
29
+ * Copyright (c) Facebook, Inc. and its 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 Tm=d,Se=Rm;function k(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Rc=new Set,qn={};function Gt(e,t){jn(e,t),jn(e+"Capture",t)}function jn(e,t){for(qn[e]=t,e=0;e<t.length;e++)Rc.add(t[e])}var st=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Rl=Object.prototype.hasOwnProperty,Mm=/^[: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]*$/,Fi={},Di={};function _m(e){return Rl.call(Di,e)?!0:Rl.call(Fi,e)?!1:Mm.test(e)?Di[e]=!0:(Fi[e]=!0,!1)}function Om(e,t,n,s){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return s?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function $m(e,t,n,s){if(t===null||typeof t>"u"||Om(e,t,n,s))return!0;if(s)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function xe(e,t,n,s,l,a,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=s,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=i}var le={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){le[e]=new xe(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];le[t]=new xe(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){le[e]=new xe(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){le[e]=new xe(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){le[e]=new xe(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){le[e]=new xe(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){le[e]=new xe(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){le[e]=new xe(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){le[e]=new xe(e,5,!1,e.toLowerCase(),null,!1,!1)});var Ma=/[\-:]([a-z])/g;function _a(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Ma,_a);le[t]=new xe(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Ma,_a);le[t]=new xe(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Ma,_a);le[t]=new xe(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){le[e]=new xe(e,1,!1,e.toLowerCase(),null,!1,!1)});le.xlinkHref=new xe("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){le[e]=new xe(e,1,!1,e.toLowerCase(),null,!0,!0)});function Oa(e,t,n,s){var l=le.hasOwnProperty(t)?le[t]:null;(l!==null?l.type!==0:s||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&($m(t,n,l,s)&&(n=null),s||l===null?_m(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):l.mustUseProperty?e[l.propertyName]=n===null?l.type===3?!1:"":n:(t=l.attributeName,s=l.attributeNamespace,n===null?e.removeAttribute(t):(l=l.type,n=l===3||l===4&&n===!0?"":""+n,s?e.setAttributeNS(s,t,n):e.setAttribute(t,n))))}var ut=Tm.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Mr=Symbol.for("react.element"),en=Symbol.for("react.portal"),tn=Symbol.for("react.fragment"),$a=Symbol.for("react.strict_mode"),Tl=Symbol.for("react.profiler"),Tc=Symbol.for("react.provider"),Mc=Symbol.for("react.context"),Ia=Symbol.for("react.forward_ref"),Ml=Symbol.for("react.suspense"),_l=Symbol.for("react.suspense_list"),Fa=Symbol.for("react.memo"),mt=Symbol.for("react.lazy"),_c=Symbol.for("react.offscreen"),Ai=Symbol.iterator;function Mn(e){return e===null||typeof e!="object"?null:(e=Ai&&e[Ai]||e["@@iterator"],typeof e=="function"?e:null)}var V=Object.assign,rl;function zn(e){if(rl===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);rl=t&&t[1]||""}return`
34
+ `+rl+e}var sl=!1;function ll(e,t){if(!e||sl)return"";sl=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var s=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){s=u}e.call(t.prototype)}else{try{throw Error()}catch(u){s=u}e()}}catch(u){if(u&&s&&typeof u.stack=="string"){for(var l=u.stack.split(`
35
+ `),a=s.stack.split(`
36
+ `),i=l.length-1,c=a.length-1;1<=i&&0<=c&&l[i]!==a[c];)c--;for(;1<=i&&0<=c;i--,c--)if(l[i]!==a[c]){if(i!==1||c!==1)do if(i--,c--,0>c||l[i]!==a[c]){var o=`
37
+ `+l[i].replace(" at new "," at ");return e.displayName&&o.includes("<anonymous>")&&(o=o.replace("<anonymous>",e.displayName)),o}while(1<=i&&0<=c);break}}}finally{sl=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?zn(e):""}function Im(e){switch(e.tag){case 5:return zn(e.type);case 16:return zn("Lazy");case 13:return zn("Suspense");case 19:return zn("SuspenseList");case 0:case 2:case 15:return e=ll(e.type,!1),e;case 11:return e=ll(e.type.render,!1),e;case 1:return e=ll(e.type,!0),e;default:return""}}function Ol(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case tn:return"Fragment";case en:return"Portal";case Tl:return"Profiler";case $a:return"StrictMode";case Ml:return"Suspense";case _l:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Mc:return(e.displayName||"Context")+".Consumer";case Tc:return(e._context.displayName||"Context")+".Provider";case Ia:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Fa:return t=e.displayName||null,t!==null?t:Ol(e.type)||"Memo";case mt:t=e._payload,e=e._init;try{return Ol(e(t))}catch{}}return null}function Fm(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ol(t);case 8:return t===$a?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Pt(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Oc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Dm(e){var t=Oc(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),s=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var l=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(i){s=""+i,a.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return s},setValue:function(i){s=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function _r(e){e._valueTracker||(e._valueTracker=Dm(e))}function $c(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),s="";return e&&(s=Oc(e)?e.checked?"true":"false":e.value),e=s,e!==n?(t.setValue(e),!0):!1}function as(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 $l(e,t){var n=t.checked;return V({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function zi(e,t){var n=t.defaultValue==null?"":t.defaultValue,s=t.checked!=null?t.checked:t.defaultChecked;n=Pt(t.value!=null?t.value:n),e._wrapperState={initialChecked:s,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Ic(e,t){t=t.checked,t!=null&&Oa(e,"checked",t,!1)}function Il(e,t){Ic(e,t);var n=Pt(t.value),s=t.type;if(n!=null)s==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(s==="submit"||s==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Fl(e,t.type,n):t.hasOwnProperty("defaultValue")&&Fl(e,t.type,Pt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Bi(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var s=t.type;if(!(s!=="submit"&&s!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Fl(e,t,n){(t!=="number"||as(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Bn=Array.isArray;function hn(e,t,n,s){if(e=e.options,t){t={};for(var l=0;l<n.length;l++)t["$"+n[l]]=!0;for(n=0;n<e.length;n++)l=t.hasOwnProperty("$"+e[n].value),e[n].selected!==l&&(e[n].selected=l),l&&s&&(e[n].defaultSelected=!0)}else{for(n=""+Pt(n),t=null,l=0;l<e.length;l++){if(e[l].value===n){e[l].selected=!0,s&&(e[l].defaultSelected=!0);return}t!==null||e[l].disabled||(t=e[l])}t!==null&&(t.selected=!0)}}function Dl(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(k(91));return V({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Ui(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(k(92));if(Bn(n)){if(1<n.length)throw Error(k(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Pt(n)}}function Fc(e,t){var n=Pt(t.value),s=Pt(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),s!=null&&(e.defaultValue=""+s)}function Hi(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Dc(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Al(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Dc(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Or,Ac=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,s,l){MSApp.execUnsafeLocalFunction(function(){return e(t,n,s,l)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Or=Or||document.createElement("div"),Or.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Or.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function er(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Vn={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Am=["Webkit","ms","Moz","O"];Object.keys(Vn).forEach(function(e){Am.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Vn[t]=Vn[e]})});function zc(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Vn.hasOwnProperty(e)&&Vn[e]?(""+t).trim():t+"px"}function Bc(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var s=n.indexOf("--")===0,l=zc(n,t[n],s);n==="float"&&(n="cssFloat"),s?e.setProperty(n,l):e[n]=l}}var zm=V({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function zl(e,t){if(t){if(zm[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(k(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(k(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(k(61))}if(t.style!=null&&typeof t.style!="object")throw Error(k(62))}}function Bl(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";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 Ul=null;function Da(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Hl=null,fn=null,xn=null;function Vi(e){if(e=br(e)){if(typeof Hl!="function")throw Error(k(280));var t=e.stateNode;t&&(t=Bs(t),Hl(e.stateNode,e.type,t))}}function Uc(e){fn?xn?xn.push(e):xn=[e]:fn=e}function Hc(){if(fn){var e=fn,t=xn;if(xn=fn=null,Vi(e),t)for(e=0;e<t.length;e++)Vi(t[e])}}function Vc(e,t){return e(t)}function Wc(){}var al=!1;function Qc(e,t,n){if(al)return e(t,n);al=!0;try{return Vc(e,t,n)}finally{al=!1,(fn!==null||xn!==null)&&(Wc(),Hc())}}function tr(e,t){var n=e.stateNode;if(n===null)return null;var s=Bs(n);if(s===null)return null;n=s[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":(s=!s.disabled)||(e=e.type,s=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!s;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(k(231,t,typeof n));return n}var Vl=!1;if(st)try{var _n={};Object.defineProperty(_n,"passive",{get:function(){Vl=!0}}),window.addEventListener("test",_n,_n),window.removeEventListener("test",_n,_n)}catch{Vl=!1}function Bm(e,t,n,s,l,a,i,c,o){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(p){this.onError(p)}}var Wn=!1,is=null,os=!1,Wl=null,Um={onError:function(e){Wn=!0,is=e}};function Hm(e,t,n,s,l,a,i,c,o){Wn=!1,is=null,Bm.apply(Um,arguments)}function Vm(e,t,n,s,l,a,i,c,o){if(Hm.apply(this,arguments),Wn){if(Wn){var u=is;Wn=!1,is=null}else throw Error(k(198));os||(os=!0,Wl=u)}}function Kt(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Yc(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 Wi(e){if(Kt(e)!==e)throw Error(k(188))}function Wm(e){var t=e.alternate;if(!t){if(t=Kt(e),t===null)throw Error(k(188));return t!==e?null:e}for(var n=e,s=t;;){var l=n.return;if(l===null)break;var a=l.alternate;if(a===null){if(s=l.return,s!==null){n=s;continue}break}if(l.child===a.child){for(a=l.child;a;){if(a===n)return Wi(l),e;if(a===s)return Wi(l),t;a=a.sibling}throw Error(k(188))}if(n.return!==s.return)n=l,s=a;else{for(var i=!1,c=l.child;c;){if(c===n){i=!0,n=l,s=a;break}if(c===s){i=!0,s=l,n=a;break}c=c.sibling}if(!i){for(c=a.child;c;){if(c===n){i=!0,n=a,s=l;break}if(c===s){i=!0,s=a,n=l;break}c=c.sibling}if(!i)throw Error(k(189))}}if(n.alternate!==s)throw Error(k(190))}if(n.tag!==3)throw Error(k(188));return n.stateNode.current===n?e:t}function Zc(e){return e=Wm(e),e!==null?Gc(e):null}function Gc(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Gc(e);if(t!==null)return t;e=e.sibling}return null}var Kc=Se.unstable_scheduleCallback,Qi=Se.unstable_cancelCallback,Qm=Se.unstable_shouldYield,Ym=Se.unstable_requestPaint,Y=Se.unstable_now,Zm=Se.unstable_getCurrentPriorityLevel,Aa=Se.unstable_ImmediatePriority,Xc=Se.unstable_UserBlockingPriority,cs=Se.unstable_NormalPriority,Gm=Se.unstable_LowPriority,Jc=Se.unstable_IdlePriority,Fs=null,Ze=null;function Km(e){if(Ze&&typeof Ze.onCommitFiberRoot=="function")try{Ze.onCommitFiberRoot(Fs,e,void 0,(e.current.flags&128)===128)}catch{}}var ze=Math.clz32?Math.clz32:qm,Xm=Math.log,Jm=Math.LN2;function qm(e){return e>>>=0,e===0?32:31-(Xm(e)/Jm|0)|0}var $r=64,Ir=4194304;function Un(e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function us(e,t){var n=e.pendingLanes;if(n===0)return 0;var s=0,l=e.suspendedLanes,a=e.pingedLanes,i=n&268435455;if(i!==0){var c=i&~l;c!==0?s=Un(c):(a&=i,a!==0&&(s=Un(a)))}else i=n&~l,i!==0?s=Un(i):a!==0&&(s=Un(a));if(s===0)return 0;if(t!==0&&t!==s&&!(t&l)&&(l=s&-s,a=t&-t,l>=a||l===16&&(a&4194240)!==0))return t;if(s&4&&(s|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=s;0<t;)n=31-ze(t),l=1<<n,s|=e[n],t&=~l;return s}function eh(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64: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:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function th(e,t){for(var n=e.suspendedLanes,s=e.pingedLanes,l=e.expirationTimes,a=e.pendingLanes;0<a;){var i=31-ze(a),c=1<<i,o=l[i];o===-1?(!(c&n)||c&s)&&(l[i]=eh(c,t)):o<=t&&(e.expiredLanes|=c),a&=~c}}function Ql(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function qc(){var e=$r;return $r<<=1,!($r&4194240)&&($r=64),e}function il(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function wr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ze(t),e[t]=n}function nh(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var s=e.eventTimes;for(e=e.expirationTimes;0<n;){var l=31-ze(n),a=1<<l;t[l]=0,s[l]=-1,e[l]=-1,n&=~a}}function za(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var s=31-ze(n),l=1<<s;l&t|e[s]&t&&(e[s]|=t),n&=~l}}var I=0;function eu(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var tu,Ba,nu,ru,su,Yl=!1,Fr=[],vt=null,jt=null,wt=null,nr=new Map,rr=new Map,ft=[],rh="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 submit".split(" ");function Yi(e,t){switch(e){case"focusin":case"focusout":vt=null;break;case"dragenter":case"dragleave":jt=null;break;case"mouseover":case"mouseout":wt=null;break;case"pointerover":case"pointerout":nr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":rr.delete(t.pointerId)}}function On(e,t,n,s,l,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:s,nativeEvent:a,targetContainers:[l]},t!==null&&(t=br(t),t!==null&&Ba(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,l!==null&&t.indexOf(l)===-1&&t.push(l),e)}function sh(e,t,n,s,l){switch(t){case"focusin":return vt=On(vt,e,t,n,s,l),!0;case"dragenter":return jt=On(jt,e,t,n,s,l),!0;case"mouseover":return wt=On(wt,e,t,n,s,l),!0;case"pointerover":var a=l.pointerId;return nr.set(a,On(nr.get(a)||null,e,t,n,s,l)),!0;case"gotpointercapture":return a=l.pointerId,rr.set(a,On(rr.get(a)||null,e,t,n,s,l)),!0}return!1}function lu(e){var t=At(e.target);if(t!==null){var n=Kt(t);if(n!==null){if(t=n.tag,t===13){if(t=Yc(n),t!==null){e.blockedOn=t,su(e.priority,function(){nu(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Kr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Zl(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var s=new n.constructor(n.type,n);Ul=s,n.target.dispatchEvent(s),Ul=null}else return t=br(n),t!==null&&Ba(t),e.blockedOn=n,!1;t.shift()}return!0}function Zi(e,t,n){Kr(e)&&n.delete(t)}function lh(){Yl=!1,vt!==null&&Kr(vt)&&(vt=null),jt!==null&&Kr(jt)&&(jt=null),wt!==null&&Kr(wt)&&(wt=null),nr.forEach(Zi),rr.forEach(Zi)}function $n(e,t){e.blockedOn===t&&(e.blockedOn=null,Yl||(Yl=!0,Se.unstable_scheduleCallback(Se.unstable_NormalPriority,lh)))}function sr(e){function t(l){return $n(l,e)}if(0<Fr.length){$n(Fr[0],e);for(var n=1;n<Fr.length;n++){var s=Fr[n];s.blockedOn===e&&(s.blockedOn=null)}}for(vt!==null&&$n(vt,e),jt!==null&&$n(jt,e),wt!==null&&$n(wt,e),nr.forEach(t),rr.forEach(t),n=0;n<ft.length;n++)s=ft[n],s.blockedOn===e&&(s.blockedOn=null);for(;0<ft.length&&(n=ft[0],n.blockedOn===null);)lu(n),n.blockedOn===null&&ft.shift()}var pn=ut.ReactCurrentBatchConfig,ds=!0;function ah(e,t,n,s){var l=I,a=pn.transition;pn.transition=null;try{I=1,Ua(e,t,n,s)}finally{I=l,pn.transition=a}}function ih(e,t,n,s){var l=I,a=pn.transition;pn.transition=null;try{I=4,Ua(e,t,n,s)}finally{I=l,pn.transition=a}}function Ua(e,t,n,s){if(ds){var l=Zl(e,t,n,s);if(l===null)gl(e,t,s,ms,n),Yi(e,s);else if(sh(l,e,t,n,s))s.stopPropagation();else if(Yi(e,s),t&4&&-1<rh.indexOf(e)){for(;l!==null;){var a=br(l);if(a!==null&&tu(a),a=Zl(e,t,n,s),a===null&&gl(e,t,s,ms,n),a===l)break;l=a}l!==null&&s.stopPropagation()}else gl(e,t,s,null,n)}}var ms=null;function Zl(e,t,n,s){if(ms=null,e=Da(s),e=At(e),e!==null)if(t=Kt(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Yc(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return ms=e,null}function au(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Zm()){case Aa:return 1;case Xc:return 4;case cs:case Gm:return 16;case Jc:return 536870912;default:return 16}default:return 16}}var pt=null,Ha=null,Xr=null;function iu(){if(Xr)return Xr;var e,t=Ha,n=t.length,s,l="value"in pt?pt.value:pt.textContent,a=l.length;for(e=0;e<n&&t[e]===l[e];e++);var i=n-e;for(s=1;s<=i&&t[n-s]===l[a-s];s++);return Xr=l.slice(e,1<s?1-s:void 0)}function Jr(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 Dr(){return!0}function Gi(){return!1}function Ee(e){function t(n,s,l,a,i){this._reactName=n,this._targetInst=l,this.type=s,this.nativeEvent=a,this.target=i,this.currentTarget=null;for(var c in e)e.hasOwnProperty(c)&&(n=e[c],this[c]=n?n(a):a[c]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?Dr:Gi,this.isPropagationStopped=Gi,this}return V(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Dr)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Dr)},persist:function(){},isPersistent:Dr}),t}var Pn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Va=Ee(Pn),Nr=V({},Pn,{view:0,detail:0}),oh=Ee(Nr),ol,cl,In,Ds=V({},Nr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Wa,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!==In&&(In&&e.type==="mousemove"?(ol=e.screenX-In.screenX,cl=e.screenY-In.screenY):cl=ol=0,In=e),ol)},movementY:function(e){return"movementY"in e?e.movementY:cl}}),Ki=Ee(Ds),ch=V({},Ds,{dataTransfer:0}),uh=Ee(ch),dh=V({},Nr,{relatedTarget:0}),ul=Ee(dh),mh=V({},Pn,{animationName:0,elapsedTime:0,pseudoElement:0}),hh=Ee(mh),fh=V({},Pn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),xh=Ee(fh),ph=V({},Pn,{data:0}),Xi=Ee(ph),gh={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},yh={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"},vh={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function jh(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=vh[e])?!!t[e]:!1}function Wa(){return jh}var wh=V({},Nr,{key:function(e){if(e.key){var t=gh[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Jr(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?yh[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Wa,charCode:function(e){return e.type==="keypress"?Jr(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Jr(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Nh=Ee(wh),bh=V({},Ds,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ji=Ee(bh),kh=V({},Nr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Wa}),Sh=Ee(kh),Ch=V({},Pn,{propertyName:0,elapsedTime:0,pseudoElement:0}),Eh=Ee(Ch),Ph=V({},Ds,{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}),Lh=Ee(Ph),Rh=[9,13,27,32],Qa=st&&"CompositionEvent"in window,Qn=null;st&&"documentMode"in document&&(Qn=document.documentMode);var Th=st&&"TextEvent"in window&&!Qn,ou=st&&(!Qa||Qn&&8<Qn&&11>=Qn),qi=String.fromCharCode(32),eo=!1;function cu(e,t){switch(e){case"keyup":return Rh.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function uu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var nn=!1;function Mh(e,t){switch(e){case"compositionend":return uu(t);case"keypress":return t.which!==32?null:(eo=!0,qi);case"textInput":return e=t.data,e===qi&&eo?null:e;default:return null}}function _h(e,t){if(nn)return e==="compositionend"||!Qa&&cu(e,t)?(e=iu(),Xr=Ha=pt=null,nn=!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 ou&&t.locale!=="ko"?null:t.data;default:return null}}var Oh={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 to(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Oh[e.type]:t==="textarea"}function du(e,t,n,s){Uc(s),t=hs(t,"onChange"),0<t.length&&(n=new Va("onChange","change",null,n,s),e.push({event:n,listeners:t}))}var Yn=null,lr=null;function $h(e){Nu(e,0)}function As(e){var t=ln(e);if($c(t))return e}function Ih(e,t){if(e==="change")return t}var mu=!1;if(st){var dl;if(st){var ml="oninput"in document;if(!ml){var no=document.createElement("div");no.setAttribute("oninput","return;"),ml=typeof no.oninput=="function"}dl=ml}else dl=!1;mu=dl&&(!document.documentMode||9<document.documentMode)}function ro(){Yn&&(Yn.detachEvent("onpropertychange",hu),lr=Yn=null)}function hu(e){if(e.propertyName==="value"&&As(lr)){var t=[];du(t,lr,e,Da(e)),Qc($h,t)}}function Fh(e,t,n){e==="focusin"?(ro(),Yn=t,lr=n,Yn.attachEvent("onpropertychange",hu)):e==="focusout"&&ro()}function Dh(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return As(lr)}function Ah(e,t){if(e==="click")return As(t)}function zh(e,t){if(e==="input"||e==="change")return As(t)}function Bh(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ue=typeof Object.is=="function"?Object.is:Bh;function ar(e,t){if(Ue(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),s=Object.keys(t);if(n.length!==s.length)return!1;for(s=0;s<n.length;s++){var l=n[s];if(!Rl.call(t,l)||!Ue(e[l],t[l]))return!1}return!0}function so(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function lo(e,t){var n=so(e);e=0;for(var s;n;){if(n.nodeType===3){if(s=e+n.textContent.length,e<=t&&s>=t)return{node:n,offset:t-e};e=s}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=so(n)}}function fu(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?fu(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function xu(){for(var e=window,t=as();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=as(e.document)}return t}function Ya(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")}function Uh(e){var t=xu(),n=e.focusedElem,s=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&fu(n.ownerDocument.documentElement,n)){if(s!==null&&Ya(n)){if(t=s.start,e=s.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var l=n.textContent.length,a=Math.min(s.start,l);s=s.end===void 0?a:Math.min(s.end,l),!e.extend&&a>s&&(l=s,s=a,a=l),l=lo(n,a);var i=lo(n,s);l&&i&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),a>s?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Hh=st&&"documentMode"in document&&11>=document.documentMode,rn=null,Gl=null,Zn=null,Kl=!1;function ao(e,t,n){var s=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Kl||rn==null||rn!==as(s)||(s=rn,"selectionStart"in s&&Ya(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),Zn&&ar(Zn,s)||(Zn=s,s=hs(Gl,"onSelect"),0<s.length&&(t=new Va("onSelect","select",null,t,n),e.push({event:t,listeners:s}),t.target=rn)))}function Ar(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var sn={animationend:Ar("Animation","AnimationEnd"),animationiteration:Ar("Animation","AnimationIteration"),animationstart:Ar("Animation","AnimationStart"),transitionend:Ar("Transition","TransitionEnd")},hl={},pu={};st&&(pu=document.createElement("div").style,"AnimationEvent"in window||(delete sn.animationend.animation,delete sn.animationiteration.animation,delete sn.animationstart.animation),"TransitionEvent"in window||delete sn.transitionend.transition);function zs(e){if(hl[e])return hl[e];if(!sn[e])return e;var t=sn[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in pu)return hl[e]=t[n];return e}var gu=zs("animationend"),yu=zs("animationiteration"),vu=zs("animationstart"),ju=zs("transitionend"),wu=new Map,io="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Rt(e,t){wu.set(e,t),Gt(t,[e])}for(var fl=0;fl<io.length;fl++){var xl=io[fl],Vh=xl.toLowerCase(),Wh=xl[0].toUpperCase()+xl.slice(1);Rt(Vh,"on"+Wh)}Rt(gu,"onAnimationEnd");Rt(yu,"onAnimationIteration");Rt(vu,"onAnimationStart");Rt("dblclick","onDoubleClick");Rt("focusin","onFocus");Rt("focusout","onBlur");Rt(ju,"onTransitionEnd");jn("onMouseEnter",["mouseout","mouseover"]);jn("onMouseLeave",["mouseout","mouseover"]);jn("onPointerEnter",["pointerout","pointerover"]);jn("onPointerLeave",["pointerout","pointerover"]);Gt("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Gt("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Gt("onBeforeInput",["compositionend","keypress","textInput","paste"]);Gt("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Gt("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Gt("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Hn="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(" "),Qh=new Set("cancel close invalid load scroll toggle".split(" ").concat(Hn));function oo(e,t,n){var s=e.type||"unknown-event";e.currentTarget=n,Vm(s,t,void 0,e),e.currentTarget=null}function Nu(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var s=e[n],l=s.event;s=s.listeners;e:{var a=void 0;if(t)for(var i=s.length-1;0<=i;i--){var c=s[i],o=c.instance,u=c.currentTarget;if(c=c.listener,o!==a&&l.isPropagationStopped())break e;oo(l,c,u),a=o}else for(i=0;i<s.length;i++){if(c=s[i],o=c.instance,u=c.currentTarget,c=c.listener,o!==a&&l.isPropagationStopped())break e;oo(l,c,u),a=o}}}if(os)throw e=Wl,os=!1,Wl=null,e}function D(e,t){var n=t[ta];n===void 0&&(n=t[ta]=new Set);var s=e+"__bubble";n.has(s)||(bu(t,e,2,!1),n.add(s))}function pl(e,t,n){var s=0;t&&(s|=4),bu(n,e,s,t)}var zr="_reactListening"+Math.random().toString(36).slice(2);function ir(e){if(!e[zr]){e[zr]=!0,Rc.forEach(function(n){n!=="selectionchange"&&(Qh.has(n)||pl(n,!1,e),pl(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[zr]||(t[zr]=!0,pl("selectionchange",!1,t))}}function bu(e,t,n,s){switch(au(t)){case 1:var l=ah;break;case 4:l=ih;break;default:l=Ua}n=l.bind(null,t,n,e),l=void 0,!Vl||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(l=!0),s?l!==void 0?e.addEventListener(t,n,{capture:!0,passive:l}):e.addEventListener(t,n,!0):l!==void 0?e.addEventListener(t,n,{passive:l}):e.addEventListener(t,n,!1)}function gl(e,t,n,s,l){var a=s;if(!(t&1)&&!(t&2)&&s!==null)e:for(;;){if(s===null)return;var i=s.tag;if(i===3||i===4){var c=s.stateNode.containerInfo;if(c===l||c.nodeType===8&&c.parentNode===l)break;if(i===4)for(i=s.return;i!==null;){var o=i.tag;if((o===3||o===4)&&(o=i.stateNode.containerInfo,o===l||o.nodeType===8&&o.parentNode===l))return;i=i.return}for(;c!==null;){if(i=At(c),i===null)return;if(o=i.tag,o===5||o===6){s=a=i;continue e}c=c.parentNode}}s=s.return}Qc(function(){var u=a,p=Da(n),m=[];e:{var g=wu.get(e);if(g!==void 0){var v=Va,w=e;switch(e){case"keypress":if(Jr(n)===0)break e;case"keydown":case"keyup":v=Nh;break;case"focusin":w="focus",v=ul;break;case"focusout":w="blur",v=ul;break;case"beforeblur":case"afterblur":v=ul;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":v=Ki;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":v=uh;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":v=Sh;break;case gu:case yu:case vu:v=hh;break;case ju:v=Eh;break;case"scroll":v=oh;break;case"wheel":v=Lh;break;case"copy":case"cut":case"paste":v=xh;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":v=Ji}var N=(t&4)!==0,b=!N&&e==="scroll",x=N?g!==null?g+"Capture":null:g;N=[];for(var h=u,f;h!==null;){f=h;var j=f.stateNode;if(f.tag===5&&j!==null&&(f=j,x!==null&&(j=tr(h,x),j!=null&&N.push(or(h,j,f)))),b)break;h=h.return}0<N.length&&(g=new v(g,w,null,n,p),m.push({event:g,listeners:N}))}}if(!(t&7)){e:{if(g=e==="mouseover"||e==="pointerover",v=e==="mouseout"||e==="pointerout",g&&n!==Ul&&(w=n.relatedTarget||n.fromElement)&&(At(w)||w[lt]))break e;if((v||g)&&(g=p.window===p?p:(g=p.ownerDocument)?g.defaultView||g.parentWindow:window,v?(w=n.relatedTarget||n.toElement,v=u,w=w?At(w):null,w!==null&&(b=Kt(w),w!==b||w.tag!==5&&w.tag!==6)&&(w=null)):(v=null,w=u),v!==w)){if(N=Ki,j="onMouseLeave",x="onMouseEnter",h="mouse",(e==="pointerout"||e==="pointerover")&&(N=Ji,j="onPointerLeave",x="onPointerEnter",h="pointer"),b=v==null?g:ln(v),f=w==null?g:ln(w),g=new N(j,h+"leave",v,n,p),g.target=b,g.relatedTarget=f,j=null,At(p)===u&&(N=new N(x,h+"enter",w,n,p),N.target=f,N.relatedTarget=b,j=N),b=j,v&&w)t:{for(N=v,x=w,h=0,f=N;f;f=Jt(f))h++;for(f=0,j=x;j;j=Jt(j))f++;for(;0<h-f;)N=Jt(N),h--;for(;0<f-h;)x=Jt(x),f--;for(;h--;){if(N===x||x!==null&&N===x.alternate)break t;N=Jt(N),x=Jt(x)}N=null}else N=null;v!==null&&co(m,g,v,N,!1),w!==null&&b!==null&&co(m,b,w,N,!0)}}e:{if(g=u?ln(u):window,v=g.nodeName&&g.nodeName.toLowerCase(),v==="select"||v==="input"&&g.type==="file")var S=Ih;else if(to(g))if(mu)S=zh;else{S=Dh;var E=Fh}else(v=g.nodeName)&&v.toLowerCase()==="input"&&(g.type==="checkbox"||g.type==="radio")&&(S=Ah);if(S&&(S=S(e,u))){du(m,S,n,p);break e}E&&E(e,g,u),e==="focusout"&&(E=g._wrapperState)&&E.controlled&&g.type==="number"&&Fl(g,"number",g.value)}switch(E=u?ln(u):window,e){case"focusin":(to(E)||E.contentEditable==="true")&&(rn=E,Gl=u,Zn=null);break;case"focusout":Zn=Gl=rn=null;break;case"mousedown":Kl=!0;break;case"contextmenu":case"mouseup":case"dragend":Kl=!1,ao(m,n,p);break;case"selectionchange":if(Hh)break;case"keydown":case"keyup":ao(m,n,p)}var y;if(Qa)e:{switch(e){case"compositionstart":var C="onCompositionStart";break e;case"compositionend":C="onCompositionEnd";break e;case"compositionupdate":C="onCompositionUpdate";break e}C=void 0}else nn?cu(e,n)&&(C="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(C="onCompositionStart");C&&(ou&&n.locale!=="ko"&&(nn||C!=="onCompositionStart"?C==="onCompositionEnd"&&nn&&(y=iu()):(pt=p,Ha="value"in pt?pt.value:pt.textContent,nn=!0)),E=hs(u,C),0<E.length&&(C=new Xi(C,e,null,n,p),m.push({event:C,listeners:E}),y?C.data=y:(y=uu(n),y!==null&&(C.data=y)))),(y=Th?Mh(e,n):_h(e,n))&&(u=hs(u,"onBeforeInput"),0<u.length&&(p=new Xi("onBeforeInput","beforeinput",null,n,p),m.push({event:p,listeners:u}),p.data=y))}Nu(m,t)})}function or(e,t,n){return{instance:e,listener:t,currentTarget:n}}function hs(e,t){for(var n=t+"Capture",s=[];e!==null;){var l=e,a=l.stateNode;l.tag===5&&a!==null&&(l=a,a=tr(e,n),a!=null&&s.unshift(or(e,a,l)),a=tr(e,t),a!=null&&s.push(or(e,a,l))),e=e.return}return s}function Jt(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function co(e,t,n,s,l){for(var a=t._reactName,i=[];n!==null&&n!==s;){var c=n,o=c.alternate,u=c.stateNode;if(o!==null&&o===s)break;c.tag===5&&u!==null&&(c=u,l?(o=tr(n,a),o!=null&&i.unshift(or(n,o,c))):l||(o=tr(n,a),o!=null&&i.push(or(n,o,c)))),n=n.return}i.length!==0&&e.push({event:t,listeners:i})}var Yh=/\r\n?/g,Zh=/\u0000|\uFFFD/g;function uo(e){return(typeof e=="string"?e:""+e).replace(Yh,`
38
+ `).replace(Zh,"")}function Br(e,t,n){if(t=uo(t),uo(e)!==t&&n)throw Error(k(425))}function fs(){}var Xl=null,Jl=null;function ql(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var ea=typeof setTimeout=="function"?setTimeout:void 0,Gh=typeof clearTimeout=="function"?clearTimeout:void 0,mo=typeof Promise=="function"?Promise:void 0,Kh=typeof queueMicrotask=="function"?queueMicrotask:typeof mo<"u"?function(e){return mo.resolve(null).then(e).catch(Xh)}:ea;function Xh(e){setTimeout(function(){throw e})}function yl(e,t){var n=t,s=0;do{var l=n.nextSibling;if(e.removeChild(n),l&&l.nodeType===8)if(n=l.data,n==="/$"){if(s===0){e.removeChild(l),sr(t);return}s--}else n!=="$"&&n!=="$?"&&n!=="$!"||s++;n=l}while(n);sr(t)}function Nt(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==="$?")break;if(t==="/$")return null}}return e}function ho(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Ln=Math.random().toString(36).slice(2),Ye="__reactFiber$"+Ln,cr="__reactProps$"+Ln,lt="__reactContainer$"+Ln,ta="__reactEvents$"+Ln,Jh="__reactListeners$"+Ln,qh="__reactHandles$"+Ln;function At(e){var t=e[Ye];if(t)return t;for(var n=e.parentNode;n;){if(t=n[lt]||n[Ye]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=ho(e);e!==null;){if(n=e[Ye])return n;e=ho(e)}return t}e=n,n=e.parentNode}return null}function br(e){return e=e[Ye]||e[lt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ln(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(k(33))}function Bs(e){return e[cr]||null}var na=[],an=-1;function Tt(e){return{current:e}}function A(e){0>an||(e.current=na[an],na[an]=null,an--)}function F(e,t){an++,na[an]=e.current,e.current=t}var Lt={},de=Tt(Lt),ye=Tt(!1),Vt=Lt;function wn(e,t){var n=e.type.contextTypes;if(!n)return Lt;var s=e.stateNode;if(s&&s.__reactInternalMemoizedUnmaskedChildContext===t)return s.__reactInternalMemoizedMaskedChildContext;var l={},a;for(a in n)l[a]=t[a];return s&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function ve(e){return e=e.childContextTypes,e!=null}function xs(){A(ye),A(de)}function fo(e,t,n){if(de.current!==Lt)throw Error(k(168));F(de,t),F(ye,n)}function ku(e,t,n){var s=e.stateNode;if(t=t.childContextTypes,typeof s.getChildContext!="function")return n;s=s.getChildContext();for(var l in s)if(!(l in t))throw Error(k(108,Fm(e)||"Unknown",l));return V({},n,s)}function ps(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Lt,Vt=de.current,F(de,e),F(ye,ye.current),!0}function xo(e,t,n){var s=e.stateNode;if(!s)throw Error(k(169));n?(e=ku(e,t,Vt),s.__reactInternalMemoizedMergedChildContext=e,A(ye),A(de),F(de,e)):A(ye),F(ye,n)}var qe=null,Us=!1,vl=!1;function Su(e){qe===null?qe=[e]:qe.push(e)}function ef(e){Us=!0,Su(e)}function Mt(){if(!vl&&qe!==null){vl=!0;var e=0,t=I;try{var n=qe;for(I=1;e<n.length;e++){var s=n[e];do s=s(!0);while(s!==null)}qe=null,Us=!1}catch(l){throw qe!==null&&(qe=qe.slice(e+1)),Kc(Aa,Mt),l}finally{I=t,vl=!1}}return null}var on=[],cn=0,gs=null,ys=0,Pe=[],Le=0,Wt=null,et=1,tt="";function It(e,t){on[cn++]=ys,on[cn++]=gs,gs=e,ys=t}function Cu(e,t,n){Pe[Le++]=et,Pe[Le++]=tt,Pe[Le++]=Wt,Wt=e;var s=et;e=tt;var l=32-ze(s)-1;s&=~(1<<l),n+=1;var a=32-ze(t)+l;if(30<a){var i=l-l%5;a=(s&(1<<i)-1).toString(32),s>>=i,l-=i,et=1<<32-ze(t)+l|n<<l|s,tt=a+e}else et=1<<a|n<<l|s,tt=e}function Za(e){e.return!==null&&(It(e,1),Cu(e,1,0))}function Ga(e){for(;e===gs;)gs=on[--cn],on[cn]=null,ys=on[--cn],on[cn]=null;for(;e===Wt;)Wt=Pe[--Le],Pe[Le]=null,tt=Pe[--Le],Pe[Le]=null,et=Pe[--Le],Pe[Le]=null}var ke=null,be=null,z=!1,Ae=null;function Eu(e,t){var n=Re(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function po(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,ke=e,be=Nt(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,ke=e,be=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Wt!==null?{id:et,overflow:tt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Re(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,ke=e,be=null,!0):!1;default:return!1}}function ra(e){return(e.mode&1)!==0&&(e.flags&128)===0}function sa(e){if(z){var t=be;if(t){var n=t;if(!po(e,t)){if(ra(e))throw Error(k(418));t=Nt(n.nextSibling);var s=ke;t&&po(e,t)?Eu(s,n):(e.flags=e.flags&-4097|2,z=!1,ke=e)}}else{if(ra(e))throw Error(k(418));e.flags=e.flags&-4097|2,z=!1,ke=e}}}function go(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;ke=e}function Ur(e){if(e!==ke)return!1;if(!z)return go(e),z=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!ql(e.type,e.memoizedProps)),t&&(t=be)){if(ra(e))throw Pu(),Error(k(418));for(;t;)Eu(e,t),t=Nt(t.nextSibling)}if(go(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(k(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){be=Nt(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}be=null}}else be=ke?Nt(e.stateNode.nextSibling):null;return!0}function Pu(){for(var e=be;e;)e=Nt(e.nextSibling)}function Nn(){be=ke=null,z=!1}function Ka(e){Ae===null?Ae=[e]:Ae.push(e)}var tf=ut.ReactCurrentBatchConfig;function Fn(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(k(309));var s=n.stateNode}if(!s)throw Error(k(147,e));var l=s,a=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===a?t.ref:(t=function(i){var c=l.refs;i===null?delete c[a]:c[a]=i},t._stringRef=a,t)}if(typeof e!="string")throw Error(k(284));if(!n._owner)throw Error(k(290,e))}return e}function Hr(e,t){throw e=Object.prototype.toString.call(t),Error(k(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function yo(e){var t=e._init;return t(e._payload)}function Lu(e){function t(x,h){if(e){var f=x.deletions;f===null?(x.deletions=[h],x.flags|=16):f.push(h)}}function n(x,h){if(!e)return null;for(;h!==null;)t(x,h),h=h.sibling;return null}function s(x,h){for(x=new Map;h!==null;)h.key!==null?x.set(h.key,h):x.set(h.index,h),h=h.sibling;return x}function l(x,h){return x=Ct(x,h),x.index=0,x.sibling=null,x}function a(x,h,f){return x.index=f,e?(f=x.alternate,f!==null?(f=f.index,f<h?(x.flags|=2,h):f):(x.flags|=2,h)):(x.flags|=1048576,h)}function i(x){return e&&x.alternate===null&&(x.flags|=2),x}function c(x,h,f,j){return h===null||h.tag!==6?(h=Cl(f,x.mode,j),h.return=x,h):(h=l(h,f),h.return=x,h)}function o(x,h,f,j){var S=f.type;return S===tn?p(x,h,f.props.children,j,f.key):h!==null&&(h.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===mt&&yo(S)===h.type)?(j=l(h,f.props),j.ref=Fn(x,h,f),j.return=x,j):(j=ls(f.type,f.key,f.props,null,x.mode,j),j.ref=Fn(x,h,f),j.return=x,j)}function u(x,h,f,j){return h===null||h.tag!==4||h.stateNode.containerInfo!==f.containerInfo||h.stateNode.implementation!==f.implementation?(h=El(f,x.mode,j),h.return=x,h):(h=l(h,f.children||[]),h.return=x,h)}function p(x,h,f,j,S){return h===null||h.tag!==7?(h=Ht(f,x.mode,j,S),h.return=x,h):(h=l(h,f),h.return=x,h)}function m(x,h,f){if(typeof h=="string"&&h!==""||typeof h=="number")return h=Cl(""+h,x.mode,f),h.return=x,h;if(typeof h=="object"&&h!==null){switch(h.$$typeof){case Mr:return f=ls(h.type,h.key,h.props,null,x.mode,f),f.ref=Fn(x,null,h),f.return=x,f;case en:return h=El(h,x.mode,f),h.return=x,h;case mt:var j=h._init;return m(x,j(h._payload),f)}if(Bn(h)||Mn(h))return h=Ht(h,x.mode,f,null),h.return=x,h;Hr(x,h)}return null}function g(x,h,f,j){var S=h!==null?h.key:null;if(typeof f=="string"&&f!==""||typeof f=="number")return S!==null?null:c(x,h,""+f,j);if(typeof f=="object"&&f!==null){switch(f.$$typeof){case Mr:return f.key===S?o(x,h,f,j):null;case en:return f.key===S?u(x,h,f,j):null;case mt:return S=f._init,g(x,h,S(f._payload),j)}if(Bn(f)||Mn(f))return S!==null?null:p(x,h,f,j,null);Hr(x,f)}return null}function v(x,h,f,j,S){if(typeof j=="string"&&j!==""||typeof j=="number")return x=x.get(f)||null,c(h,x,""+j,S);if(typeof j=="object"&&j!==null){switch(j.$$typeof){case Mr:return x=x.get(j.key===null?f:j.key)||null,o(h,x,j,S);case en:return x=x.get(j.key===null?f:j.key)||null,u(h,x,j,S);case mt:var E=j._init;return v(x,h,f,E(j._payload),S)}if(Bn(j)||Mn(j))return x=x.get(f)||null,p(h,x,j,S,null);Hr(h,j)}return null}function w(x,h,f,j){for(var S=null,E=null,y=h,C=h=0,$=null;y!==null&&C<f.length;C++){y.index>C?($=y,y=null):$=y.sibling;var R=g(x,y,f[C],j);if(R===null){y===null&&(y=$);break}e&&y&&R.alternate===null&&t(x,y),h=a(R,h,C),E===null?S=R:E.sibling=R,E=R,y=$}if(C===f.length)return n(x,y),z&&It(x,C),S;if(y===null){for(;C<f.length;C++)y=m(x,f[C],j),y!==null&&(h=a(y,h,C),E===null?S=y:E.sibling=y,E=y);return z&&It(x,C),S}for(y=s(x,y);C<f.length;C++)$=v(y,x,C,f[C],j),$!==null&&(e&&$.alternate!==null&&y.delete($.key===null?C:$.key),h=a($,h,C),E===null?S=$:E.sibling=$,E=$);return e&&y.forEach(function(B){return t(x,B)}),z&&It(x,C),S}function N(x,h,f,j){var S=Mn(f);if(typeof S!="function")throw Error(k(150));if(f=S.call(f),f==null)throw Error(k(151));for(var E=S=null,y=h,C=h=0,$=null,R=f.next();y!==null&&!R.done;C++,R=f.next()){y.index>C?($=y,y=null):$=y.sibling;var B=g(x,y,R.value,j);if(B===null){y===null&&(y=$);break}e&&y&&B.alternate===null&&t(x,y),h=a(B,h,C),E===null?S=B:E.sibling=B,E=B,y=$}if(R.done)return n(x,y),z&&It(x,C),S;if(y===null){for(;!R.done;C++,R=f.next())R=m(x,R.value,j),R!==null&&(h=a(R,h,C),E===null?S=R:E.sibling=R,E=R);return z&&It(x,C),S}for(y=s(x,y);!R.done;C++,R=f.next())R=v(y,x,C,R.value,j),R!==null&&(e&&R.alternate!==null&&y.delete(R.key===null?C:R.key),h=a(R,h,C),E===null?S=R:E.sibling=R,E=R);return e&&y.forEach(function(ae){return t(x,ae)}),z&&It(x,C),S}function b(x,h,f,j){if(typeof f=="object"&&f!==null&&f.type===tn&&f.key===null&&(f=f.props.children),typeof f=="object"&&f!==null){switch(f.$$typeof){case Mr:e:{for(var S=f.key,E=h;E!==null;){if(E.key===S){if(S=f.type,S===tn){if(E.tag===7){n(x,E.sibling),h=l(E,f.props.children),h.return=x,x=h;break e}}else if(E.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===mt&&yo(S)===E.type){n(x,E.sibling),h=l(E,f.props),h.ref=Fn(x,E,f),h.return=x,x=h;break e}n(x,E);break}else t(x,E);E=E.sibling}f.type===tn?(h=Ht(f.props.children,x.mode,j,f.key),h.return=x,x=h):(j=ls(f.type,f.key,f.props,null,x.mode,j),j.ref=Fn(x,h,f),j.return=x,x=j)}return i(x);case en:e:{for(E=f.key;h!==null;){if(h.key===E)if(h.tag===4&&h.stateNode.containerInfo===f.containerInfo&&h.stateNode.implementation===f.implementation){n(x,h.sibling),h=l(h,f.children||[]),h.return=x,x=h;break e}else{n(x,h);break}else t(x,h);h=h.sibling}h=El(f,x.mode,j),h.return=x,x=h}return i(x);case mt:return E=f._init,b(x,h,E(f._payload),j)}if(Bn(f))return w(x,h,f,j);if(Mn(f))return N(x,h,f,j);Hr(x,f)}return typeof f=="string"&&f!==""||typeof f=="number"?(f=""+f,h!==null&&h.tag===6?(n(x,h.sibling),h=l(h,f),h.return=x,x=h):(n(x,h),h=Cl(f,x.mode,j),h.return=x,x=h),i(x)):n(x,h)}return b}var bn=Lu(!0),Ru=Lu(!1),vs=Tt(null),js=null,un=null,Xa=null;function Ja(){Xa=un=js=null}function qa(e){var t=vs.current;A(vs),e._currentValue=t}function la(e,t,n){for(;e!==null;){var s=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,s!==null&&(s.childLanes|=t)):s!==null&&(s.childLanes&t)!==t&&(s.childLanes|=t),e===n)break;e=e.return}}function gn(e,t){js=e,Xa=un=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ge=!0),e.firstContext=null)}function Me(e){var t=e._currentValue;if(Xa!==e)if(e={context:e,memoizedValue:t,next:null},un===null){if(js===null)throw Error(k(308));un=e,js.dependencies={lanes:0,firstContext:e}}else un=un.next=e;return t}var zt=null;function ei(e){zt===null?zt=[e]:zt.push(e)}function Tu(e,t,n,s){var l=t.interleaved;return l===null?(n.next=n,ei(t)):(n.next=l.next,l.next=n),t.interleaved=n,at(e,s)}function at(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var ht=!1;function ti(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Mu(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function nt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function bt(e,t,n){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,O&2){var l=s.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),s.pending=t,at(e,n)}return l=s.interleaved,l===null?(t.next=t,ei(s)):(t.next=l.next,l.next=t),s.interleaved=t,at(e,n)}function qr(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var s=t.lanes;s&=e.pendingLanes,n|=s,t.lanes=n,za(e,n)}}function vo(e,t){var n=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,n===s)){var l=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};a===null?l=a=i:a=a.next=i,n=n.next}while(n!==null);a===null?l=a=t:a=a.next=t}else l=a=t;n={baseState:s.baseState,firstBaseUpdate:l,lastBaseUpdate:a,shared:s.shared,effects:s.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function ws(e,t,n,s){var l=e.updateQueue;ht=!1;var a=l.firstBaseUpdate,i=l.lastBaseUpdate,c=l.shared.pending;if(c!==null){l.shared.pending=null;var o=c,u=o.next;o.next=null,i===null?a=u:i.next=u,i=o;var p=e.alternate;p!==null&&(p=p.updateQueue,c=p.lastBaseUpdate,c!==i&&(c===null?p.firstBaseUpdate=u:c.next=u,p.lastBaseUpdate=o))}if(a!==null){var m=l.baseState;i=0,p=u=o=null,c=a;do{var g=c.lane,v=c.eventTime;if((s&g)===g){p!==null&&(p=p.next={eventTime:v,lane:0,tag:c.tag,payload:c.payload,callback:c.callback,next:null});e:{var w=e,N=c;switch(g=t,v=n,N.tag){case 1:if(w=N.payload,typeof w=="function"){m=w.call(v,m,g);break e}m=w;break e;case 3:w.flags=w.flags&-65537|128;case 0:if(w=N.payload,g=typeof w=="function"?w.call(v,m,g):w,g==null)break e;m=V({},m,g);break e;case 2:ht=!0}}c.callback!==null&&c.lane!==0&&(e.flags|=64,g=l.effects,g===null?l.effects=[c]:g.push(c))}else v={eventTime:v,lane:g,tag:c.tag,payload:c.payload,callback:c.callback,next:null},p===null?(u=p=v,o=m):p=p.next=v,i|=g;if(c=c.next,c===null){if(c=l.shared.pending,c===null)break;g=c,c=g.next,g.next=null,l.lastBaseUpdate=g,l.shared.pending=null}}while(1);if(p===null&&(o=m),l.baseState=o,l.firstBaseUpdate=u,l.lastBaseUpdate=p,t=l.shared.interleaved,t!==null){l=t;do i|=l.lane,l=l.next;while(l!==t)}else a===null&&(l.shared.lanes=0);Yt|=i,e.lanes=i,e.memoizedState=m}}function jo(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var s=e[t],l=s.callback;if(l!==null){if(s.callback=null,s=n,typeof l!="function")throw Error(k(191,l));l.call(s)}}}var kr={},Ge=Tt(kr),ur=Tt(kr),dr=Tt(kr);function Bt(e){if(e===kr)throw Error(k(174));return e}function ni(e,t){switch(F(dr,t),F(ur,e),F(Ge,kr),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Al(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Al(t,e)}A(Ge),F(Ge,t)}function kn(){A(Ge),A(ur),A(dr)}function _u(e){Bt(dr.current);var t=Bt(Ge.current),n=Al(t,e.type);t!==n&&(F(ur,e),F(Ge,n))}function ri(e){ur.current===e&&(A(Ge),A(ur))}var U=Tt(0);function Ns(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)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=[];function si(){for(var e=0;e<jl.length;e++)jl[e]._workInProgressVersionPrimary=null;jl.length=0}var es=ut.ReactCurrentDispatcher,wl=ut.ReactCurrentBatchConfig,Qt=0,H=null,K=null,q=null,bs=!1,Gn=!1,mr=0,nf=0;function ie(){throw Error(k(321))}function li(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Ue(e[n],t[n]))return!1;return!0}function ai(e,t,n,s,l,a){if(Qt=a,H=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,es.current=e===null||e.memoizedState===null?af:of,e=n(s,l),Gn){a=0;do{if(Gn=!1,mr=0,25<=a)throw Error(k(301));a+=1,q=K=null,t.updateQueue=null,es.current=cf,e=n(s,l)}while(Gn)}if(es.current=ks,t=K!==null&&K.next!==null,Qt=0,q=K=H=null,bs=!1,t)throw Error(k(300));return e}function ii(){var e=mr!==0;return mr=0,e}function Qe(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return q===null?H.memoizedState=q=e:q=q.next=e,q}function _e(){if(K===null){var e=H.alternate;e=e!==null?e.memoizedState:null}else e=K.next;var t=q===null?H.memoizedState:q.next;if(t!==null)q=t,K=e;else{if(e===null)throw Error(k(310));K=e,e={memoizedState:K.memoizedState,baseState:K.baseState,baseQueue:K.baseQueue,queue:K.queue,next:null},q===null?H.memoizedState=q=e:q=q.next=e}return q}function hr(e,t){return typeof t=="function"?t(e):t}function Nl(e){var t=_e(),n=t.queue;if(n===null)throw Error(k(311));n.lastRenderedReducer=e;var s=K,l=s.baseQueue,a=n.pending;if(a!==null){if(l!==null){var i=l.next;l.next=a.next,a.next=i}s.baseQueue=l=a,n.pending=null}if(l!==null){a=l.next,s=s.baseState;var c=i=null,o=null,u=a;do{var p=u.lane;if((Qt&p)===p)o!==null&&(o=o.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),s=u.hasEagerState?u.eagerState:e(s,u.action);else{var m={lane:p,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};o===null?(c=o=m,i=s):o=o.next=m,H.lanes|=p,Yt|=p}u=u.next}while(u!==null&&u!==a);o===null?i=s:o.next=c,Ue(s,t.memoizedState)||(ge=!0),t.memoizedState=s,t.baseState=i,t.baseQueue=o,n.lastRenderedState=s}if(e=n.interleaved,e!==null){l=e;do a=l.lane,H.lanes|=a,Yt|=a,l=l.next;while(l!==e)}else l===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function bl(e){var t=_e(),n=t.queue;if(n===null)throw Error(k(311));n.lastRenderedReducer=e;var s=n.dispatch,l=n.pending,a=t.memoizedState;if(l!==null){n.pending=null;var i=l=l.next;do a=e(a,i.action),i=i.next;while(i!==l);Ue(a,t.memoizedState)||(ge=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),n.lastRenderedState=a}return[a,s]}function Ou(){}function $u(e,t){var n=H,s=_e(),l=t(),a=!Ue(s.memoizedState,l);if(a&&(s.memoizedState=l,ge=!0),s=s.queue,oi(Du.bind(null,n,s,e),[e]),s.getSnapshot!==t||a||q!==null&&q.memoizedState.tag&1){if(n.flags|=2048,fr(9,Fu.bind(null,n,s,l,t),void 0,null),ee===null)throw Error(k(349));Qt&30||Iu(n,t,l)}return l}function Iu(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=H.updateQueue,t===null?(t={lastEffect:null,stores:null},H.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Fu(e,t,n,s){t.value=n,t.getSnapshot=s,Au(t)&&zu(e)}function Du(e,t,n){return n(function(){Au(t)&&zu(e)})}function Au(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Ue(e,n)}catch{return!0}}function zu(e){var t=at(e,1);t!==null&&Be(t,e,1,-1)}function wo(e){var t=Qe();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:hr,lastRenderedState:e},t.queue=e,e=e.dispatch=lf.bind(null,H,e),[t.memoizedState,e]}function fr(e,t,n,s){return e={tag:e,create:t,destroy:n,deps:s,next:null},t=H.updateQueue,t===null?(t={lastEffect:null,stores:null},H.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(s=n.next,n.next=e,e.next=s,t.lastEffect=e)),e}function Bu(){return _e().memoizedState}function ts(e,t,n,s){var l=Qe();H.flags|=e,l.memoizedState=fr(1|t,n,void 0,s===void 0?null:s)}function Hs(e,t,n,s){var l=_e();s=s===void 0?null:s;var a=void 0;if(K!==null){var i=K.memoizedState;if(a=i.destroy,s!==null&&li(s,i.deps)){l.memoizedState=fr(t,n,a,s);return}}H.flags|=e,l.memoizedState=fr(1|t,n,a,s)}function No(e,t){return ts(8390656,8,e,t)}function oi(e,t){return Hs(2048,8,e,t)}function Uu(e,t){return Hs(4,2,e,t)}function Hu(e,t){return Hs(4,4,e,t)}function Vu(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Wu(e,t,n){return n=n!=null?n.concat([e]):null,Hs(4,4,Vu.bind(null,t,e),n)}function ci(){}function Qu(e,t){var n=_e();t=t===void 0?null:t;var s=n.memoizedState;return s!==null&&t!==null&&li(t,s[1])?s[0]:(n.memoizedState=[e,t],e)}function Yu(e,t){var n=_e();t=t===void 0?null:t;var s=n.memoizedState;return s!==null&&t!==null&&li(t,s[1])?s[0]:(e=e(),n.memoizedState=[e,t],e)}function Zu(e,t,n){return Qt&21?(Ue(n,t)||(n=qc(),H.lanes|=n,Yt|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,ge=!0),e.memoizedState=n)}function rf(e,t){var n=I;I=n!==0&&4>n?n:4,e(!0);var s=wl.transition;wl.transition={};try{e(!1),t()}finally{I=n,wl.transition=s}}function Gu(){return _e().memoizedState}function sf(e,t,n){var s=St(e);if(n={lane:s,action:n,hasEagerState:!1,eagerState:null,next:null},Ku(e))Xu(t,n);else if(n=Tu(e,t,n,s),n!==null){var l=he();Be(n,e,s,l),Ju(n,t,s)}}function lf(e,t,n){var s=St(e),l={lane:s,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ku(e))Xu(t,l);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var i=t.lastRenderedState,c=a(i,n);if(l.hasEagerState=!0,l.eagerState=c,Ue(c,i)){var o=t.interleaved;o===null?(l.next=l,ei(t)):(l.next=o.next,o.next=l),t.interleaved=l;return}}catch{}finally{}n=Tu(e,t,l,s),n!==null&&(l=he(),Be(n,e,s,l),Ju(n,t,s))}}function Ku(e){var t=e.alternate;return e===H||t!==null&&t===H}function Xu(e,t){Gn=bs=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ju(e,t,n){if(n&4194240){var s=t.lanes;s&=e.pendingLanes,n|=s,t.lanes=n,za(e,n)}}var ks={readContext:Me,useCallback:ie,useContext:ie,useEffect:ie,useImperativeHandle:ie,useInsertionEffect:ie,useLayoutEffect:ie,useMemo:ie,useReducer:ie,useRef:ie,useState:ie,useDebugValue:ie,useDeferredValue:ie,useTransition:ie,useMutableSource:ie,useSyncExternalStore:ie,useId:ie,unstable_isNewReconciler:!1},af={readContext:Me,useCallback:function(e,t){return Qe().memoizedState=[e,t===void 0?null:t],e},useContext:Me,useEffect:No,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,ts(4194308,4,Vu.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ts(4194308,4,e,t)},useInsertionEffect:function(e,t){return ts(4,2,e,t)},useMemo:function(e,t){var n=Qe();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var s=Qe();return t=n!==void 0?n(t):t,s.memoizedState=s.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},s.queue=e,e=e.dispatch=sf.bind(null,H,e),[s.memoizedState,e]},useRef:function(e){var t=Qe();return e={current:e},t.memoizedState=e},useState:wo,useDebugValue:ci,useDeferredValue:function(e){return Qe().memoizedState=e},useTransition:function(){var e=wo(!1),t=e[0];return e=rf.bind(null,e[1]),Qe().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var s=H,l=Qe();if(z){if(n===void 0)throw Error(k(407));n=n()}else{if(n=t(),ee===null)throw Error(k(349));Qt&30||Iu(s,t,n)}l.memoizedState=n;var a={value:n,getSnapshot:t};return l.queue=a,No(Du.bind(null,s,a,e),[e]),s.flags|=2048,fr(9,Fu.bind(null,s,a,n,t),void 0,null),n},useId:function(){var e=Qe(),t=ee.identifierPrefix;if(z){var n=tt,s=et;n=(s&~(1<<32-ze(s)-1)).toString(32)+n,t=":"+t+"R"+n,n=mr++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=nf++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},of={readContext:Me,useCallback:Qu,useContext:Me,useEffect:oi,useImperativeHandle:Wu,useInsertionEffect:Uu,useLayoutEffect:Hu,useMemo:Yu,useReducer:Nl,useRef:Bu,useState:function(){return Nl(hr)},useDebugValue:ci,useDeferredValue:function(e){var t=_e();return Zu(t,K.memoizedState,e)},useTransition:function(){var e=Nl(hr)[0],t=_e().memoizedState;return[e,t]},useMutableSource:Ou,useSyncExternalStore:$u,useId:Gu,unstable_isNewReconciler:!1},cf={readContext:Me,useCallback:Qu,useContext:Me,useEffect:oi,useImperativeHandle:Wu,useInsertionEffect:Uu,useLayoutEffect:Hu,useMemo:Yu,useReducer:bl,useRef:Bu,useState:function(){return bl(hr)},useDebugValue:ci,useDeferredValue:function(e){var t=_e();return K===null?t.memoizedState=e:Zu(t,K.memoizedState,e)},useTransition:function(){var e=bl(hr)[0],t=_e().memoizedState;return[e,t]},useMutableSource:Ou,useSyncExternalStore:$u,useId:Gu,unstable_isNewReconciler:!1};function Fe(e,t){if(e&&e.defaultProps){t=V({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function aa(e,t,n,s){t=e.memoizedState,n=n(s,t),n=n==null?t:V({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Vs={isMounted:function(e){return(e=e._reactInternals)?Kt(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var s=he(),l=St(e),a=nt(s,l);a.payload=t,n!=null&&(a.callback=n),t=bt(e,a,l),t!==null&&(Be(t,e,l,s),qr(t,e,l))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var s=he(),l=St(e),a=nt(s,l);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=bt(e,a,l),t!==null&&(Be(t,e,l,s),qr(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=he(),s=St(e),l=nt(n,s);l.tag=2,t!=null&&(l.callback=t),t=bt(e,l,s),t!==null&&(Be(t,e,s,n),qr(t,e,s))}};function bo(e,t,n,s,l,a,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,a,i):t.prototype&&t.prototype.isPureReactComponent?!ar(n,s)||!ar(l,a):!0}function qu(e,t,n){var s=!1,l=Lt,a=t.contextType;return typeof a=="object"&&a!==null?a=Me(a):(l=ve(t)?Vt:de.current,s=t.contextTypes,a=(s=s!=null)?wn(e,l):Lt),t=new t(n,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Vs,e.stateNode=t,t._reactInternals=e,s&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=l,e.__reactInternalMemoizedMaskedChildContext=a),t}function ko(e,t,n,s){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,s),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,s),t.state!==e&&Vs.enqueueReplaceState(t,t.state,null)}function ia(e,t,n,s){var l=e.stateNode;l.props=n,l.state=e.memoizedState,l.refs={},ti(e);var a=t.contextType;typeof a=="object"&&a!==null?l.context=Me(a):(a=ve(t)?Vt:de.current,l.context=wn(e,a)),l.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a=="function"&&(aa(e,t,a,n),l.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof l.getSnapshotBeforeUpdate=="function"||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(t=l.state,typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount(),t!==l.state&&Vs.enqueueReplaceState(l,l.state,null),ws(e,n,l,s),l.state=e.memoizedState),typeof l.componentDidMount=="function"&&(e.flags|=4194308)}function Sn(e,t){try{var n="",s=t;do n+=Im(s),s=s.return;while(s);var l=n}catch(a){l=`
39
+ Error generating stack: `+a.message+`
40
+ `+a.stack}return{value:e,source:t,stack:l,digest:null}}function kl(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function oa(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var uf=typeof WeakMap=="function"?WeakMap:Map;function ed(e,t,n){n=nt(-1,n),n.tag=3,n.payload={element:null};var s=t.value;return n.callback=function(){Cs||(Cs=!0,ya=s),oa(e,t)},n}function td(e,t,n){n=nt(-1,n),n.tag=3;var s=e.type.getDerivedStateFromError;if(typeof s=="function"){var l=t.value;n.payload=function(){return s(l)},n.callback=function(){oa(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(n.callback=function(){oa(e,t),typeof s!="function"&&(kt===null?kt=new Set([this]):kt.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),n}function So(e,t,n){var s=e.pingCache;if(s===null){s=e.pingCache=new uf;var l=new Set;s.set(t,l)}else l=s.get(t),l===void 0&&(l=new Set,s.set(t,l));l.has(n)||(l.add(n),e=kf.bind(null,e,t,n),t.then(e,e))}function Co(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Eo(e,t,n,s,l){return e.mode&1?(e.flags|=65536,e.lanes=l,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=nt(-1,1),t.tag=2,bt(n,t,1))),n.lanes|=1),e)}var df=ut.ReactCurrentOwner,ge=!1;function me(e,t,n,s){t.child=e===null?Ru(t,null,n,s):bn(t,e.child,n,s)}function Po(e,t,n,s,l){n=n.render;var a=t.ref;return gn(t,l),s=ai(e,t,n,s,a,l),n=ii(),e!==null&&!ge?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,it(e,t,l)):(z&&n&&Za(t),t.flags|=1,me(e,t,s,l),t.child)}function Lo(e,t,n,s,l){if(e===null){var a=n.type;return typeof a=="function"&&!gi(a)&&a.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=a,nd(e,t,a,s,l)):(e=ls(n.type,null,s,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!(e.lanes&l)){var i=a.memoizedProps;if(n=n.compare,n=n!==null?n:ar,n(i,s)&&e.ref===t.ref)return it(e,t,l)}return t.flags|=1,e=Ct(a,s),e.ref=t.ref,e.return=t,t.child=e}function nd(e,t,n,s,l){if(e!==null){var a=e.memoizedProps;if(ar(a,s)&&e.ref===t.ref)if(ge=!1,t.pendingProps=s=a,(e.lanes&l)!==0)e.flags&131072&&(ge=!0);else return t.lanes=e.lanes,it(e,t,l)}return ca(e,t,n,s,l)}function rd(e,t,n){var s=t.pendingProps,l=s.children,a=e!==null?e.memoizedState:null;if(s.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},F(mn,Ne),Ne|=n;else{if(!(n&1073741824))return e=a!==null?a.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,F(mn,Ne),Ne|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},s=a!==null?a.baseLanes:n,F(mn,Ne),Ne|=s}else a!==null?(s=a.baseLanes|n,t.memoizedState=null):s=n,F(mn,Ne),Ne|=s;return me(e,t,l,n),t.child}function sd(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function ca(e,t,n,s,l){var a=ve(n)?Vt:de.current;return a=wn(t,a),gn(t,l),n=ai(e,t,n,s,a,l),s=ii(),e!==null&&!ge?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,it(e,t,l)):(z&&s&&Za(t),t.flags|=1,me(e,t,n,l),t.child)}function Ro(e,t,n,s,l){if(ve(n)){var a=!0;ps(t)}else a=!1;if(gn(t,l),t.stateNode===null)ns(e,t),qu(t,n,s),ia(t,n,s,l),s=!0;else if(e===null){var i=t.stateNode,c=t.memoizedProps;i.props=c;var o=i.context,u=n.contextType;typeof u=="object"&&u!==null?u=Me(u):(u=ve(n)?Vt:de.current,u=wn(t,u));var p=n.getDerivedStateFromProps,m=typeof p=="function"||typeof i.getSnapshotBeforeUpdate=="function";m||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(c!==s||o!==u)&&ko(t,i,s,u),ht=!1;var g=t.memoizedState;i.state=g,ws(t,s,i,l),o=t.memoizedState,c!==s||g!==o||ye.current||ht?(typeof p=="function"&&(aa(t,n,p,s),o=t.memoizedState),(c=ht||bo(t,n,c,s,g,o,u))?(m||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=s,t.memoizedState=o),i.props=s,i.state=o,i.context=u,s=c):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{i=t.stateNode,Mu(e,t),c=t.memoizedProps,u=t.type===t.elementType?c:Fe(t.type,c),i.props=u,m=t.pendingProps,g=i.context,o=n.contextType,typeof o=="object"&&o!==null?o=Me(o):(o=ve(n)?Vt:de.current,o=wn(t,o));var v=n.getDerivedStateFromProps;(p=typeof v=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(c!==m||g!==o)&&ko(t,i,s,o),ht=!1,g=t.memoizedState,i.state=g,ws(t,s,i,l);var w=t.memoizedState;c!==m||g!==w||ye.current||ht?(typeof v=="function"&&(aa(t,n,v,s),w=t.memoizedState),(u=ht||bo(t,n,u,s,g,w,o)||!1)?(p||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(s,w,o),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(s,w,o)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||c===e.memoizedProps&&g===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&g===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=w),i.props=s,i.state=w,i.context=o,s=u):(typeof i.componentDidUpdate!="function"||c===e.memoizedProps&&g===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&g===e.memoizedState||(t.flags|=1024),s=!1)}return ua(e,t,n,s,a,l)}function ua(e,t,n,s,l,a){sd(e,t);var i=(t.flags&128)!==0;if(!s&&!i)return l&&xo(t,n,!1),it(e,t,a);s=t.stateNode,df.current=t;var c=i&&typeof n.getDerivedStateFromError!="function"?null:s.render();return t.flags|=1,e!==null&&i?(t.child=bn(t,e.child,null,a),t.child=bn(t,null,c,a)):me(e,t,c,a),t.memoizedState=s.state,l&&xo(t,n,!0),t.child}function ld(e){var t=e.stateNode;t.pendingContext?fo(e,t.pendingContext,t.pendingContext!==t.context):t.context&&fo(e,t.context,!1),ni(e,t.containerInfo)}function To(e,t,n,s,l){return Nn(),Ka(l),t.flags|=256,me(e,t,n,s),t.child}var da={dehydrated:null,treeContext:null,retryLane:0};function ma(e){return{baseLanes:e,cachePool:null,transitions:null}}function ad(e,t,n){var s=t.pendingProps,l=U.current,a=!1,i=(t.flags&128)!==0,c;if((c=i)||(c=e!==null&&e.memoizedState===null?!1:(l&2)!==0),c?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(l|=1),F(U,l&1),e===null)return sa(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(i=s.children,e=s.fallback,a?(s=t.mode,a=t.child,i={mode:"hidden",children:i},!(s&1)&&a!==null?(a.childLanes=0,a.pendingProps=i):a=Ys(i,s,0,null),e=Ht(e,s,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=ma(n),t.memoizedState=da,e):ui(t,i));if(l=e.memoizedState,l!==null&&(c=l.dehydrated,c!==null))return mf(e,t,i,s,c,l,n);if(a){a=s.fallback,i=t.mode,l=e.child,c=l.sibling;var o={mode:"hidden",children:s.children};return!(i&1)&&t.child!==l?(s=t.child,s.childLanes=0,s.pendingProps=o,t.deletions=null):(s=Ct(l,o),s.subtreeFlags=l.subtreeFlags&14680064),c!==null?a=Ct(c,a):(a=Ht(a,i,n,null),a.flags|=2),a.return=t,s.return=t,s.sibling=a,t.child=s,s=a,a=t.child,i=e.child.memoizedState,i=i===null?ma(n):{baseLanes:i.baseLanes|n,cachePool:null,transitions:i.transitions},a.memoizedState=i,a.childLanes=e.childLanes&~n,t.memoizedState=da,s}return a=e.child,e=a.sibling,s=Ct(a,{mode:"visible",children:s.children}),!(t.mode&1)&&(s.lanes=n),s.return=t,s.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=s,t.memoizedState=null,s}function ui(e,t){return t=Ys({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Vr(e,t,n,s){return s!==null&&Ka(s),bn(t,e.child,null,n),e=ui(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function mf(e,t,n,s,l,a,i){if(n)return t.flags&256?(t.flags&=-257,s=kl(Error(k(422))),Vr(e,t,i,s)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(a=s.fallback,l=t.mode,s=Ys({mode:"visible",children:s.children},l,0,null),a=Ht(a,l,i,null),a.flags|=2,s.return=t,a.return=t,s.sibling=a,t.child=s,t.mode&1&&bn(t,e.child,null,i),t.child.memoizedState=ma(i),t.memoizedState=da,a);if(!(t.mode&1))return Vr(e,t,i,null);if(l.data==="$!"){if(s=l.nextSibling&&l.nextSibling.dataset,s)var c=s.dgst;return s=c,a=Error(k(419)),s=kl(a,s,void 0),Vr(e,t,i,s)}if(c=(i&e.childLanes)!==0,ge||c){if(s=ee,s!==null){switch(i&-i){case 4:l=2;break;case 16:l=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:l=32;break;case 536870912:l=268435456;break;default:l=0}l=l&(s.suspendedLanes|i)?0:l,l!==0&&l!==a.retryLane&&(a.retryLane=l,at(e,l),Be(s,e,l,-1))}return pi(),s=kl(Error(k(421))),Vr(e,t,i,s)}return l.data==="$?"?(t.flags|=128,t.child=e.child,t=Sf.bind(null,e),l._reactRetry=t,null):(e=a.treeContext,be=Nt(l.nextSibling),ke=t,z=!0,Ae=null,e!==null&&(Pe[Le++]=et,Pe[Le++]=tt,Pe[Le++]=Wt,et=e.id,tt=e.overflow,Wt=t),t=ui(t,s.children),t.flags|=4096,t)}function Mo(e,t,n){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),la(e.return,t,n)}function Sl(e,t,n,s,l){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:n,tailMode:l}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=s,a.tail=n,a.tailMode=l)}function id(e,t,n){var s=t.pendingProps,l=s.revealOrder,a=s.tail;if(me(e,t,s.children,n),s=U.current,s&2)s=s&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Mo(e,n,t);else if(e.tag===19)Mo(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}s&=1}if(F(U,s),!(t.mode&1))t.memoizedState=null;else switch(l){case"forwards":for(n=t.child,l=null;n!==null;)e=n.alternate,e!==null&&Ns(e)===null&&(l=n),n=n.sibling;n=l,n===null?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),Sl(t,!1,l,n,a);break;case"backwards":for(n=null,l=t.child,t.child=null;l!==null;){if(e=l.alternate,e!==null&&Ns(e)===null){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}Sl(t,!0,n,null,a);break;case"together":Sl(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ns(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function it(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Yt|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(k(153));if(t.child!==null){for(e=t.child,n=Ct(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Ct(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function hf(e,t,n){switch(t.tag){case 3:ld(t),Nn();break;case 5:_u(t);break;case 1:ve(t.type)&&ps(t);break;case 4:ni(t,t.stateNode.containerInfo);break;case 10:var s=t.type._context,l=t.memoizedProps.value;F(vs,s._currentValue),s._currentValue=l;break;case 13:if(s=t.memoizedState,s!==null)return s.dehydrated!==null?(F(U,U.current&1),t.flags|=128,null):n&t.child.childLanes?ad(e,t,n):(F(U,U.current&1),e=it(e,t,n),e!==null?e.sibling:null);F(U,U.current&1);break;case 19:if(s=(n&t.childLanes)!==0,e.flags&128){if(s)return id(e,t,n);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),F(U,U.current),s)break;return null;case 22:case 23:return t.lanes=0,rd(e,t,n)}return it(e,t,n)}var od,ha,cd,ud;od=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};ha=function(){};cd=function(e,t,n,s){var l=e.memoizedProps;if(l!==s){e=t.stateNode,Bt(Ge.current);var a=null;switch(n){case"input":l=$l(e,l),s=$l(e,s),a=[];break;case"select":l=V({},l,{value:void 0}),s=V({},s,{value:void 0}),a=[];break;case"textarea":l=Dl(e,l),s=Dl(e,s),a=[];break;default:typeof l.onClick!="function"&&typeof s.onClick=="function"&&(e.onclick=fs)}zl(n,s);var i;n=null;for(u in l)if(!s.hasOwnProperty(u)&&l.hasOwnProperty(u)&&l[u]!=null)if(u==="style"){var c=l[u];for(i in c)c.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(qn.hasOwnProperty(u)?a||(a=[]):(a=a||[]).push(u,null));for(u in s){var o=s[u];if(c=l!=null?l[u]:void 0,s.hasOwnProperty(u)&&o!==c&&(o!=null||c!=null))if(u==="style")if(c){for(i in c)!c.hasOwnProperty(i)||o&&o.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in o)o.hasOwnProperty(i)&&c[i]!==o[i]&&(n||(n={}),n[i]=o[i])}else n||(a||(a=[]),a.push(u,n)),n=o;else u==="dangerouslySetInnerHTML"?(o=o?o.__html:void 0,c=c?c.__html:void 0,o!=null&&c!==o&&(a=a||[]).push(u,o)):u==="children"?typeof o!="string"&&typeof o!="number"||(a=a||[]).push(u,""+o):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(qn.hasOwnProperty(u)?(o!=null&&u==="onScroll"&&D("scroll",e),a||c===o||(a=[])):(a=a||[]).push(u,o))}n&&(a=a||[]).push("style",n);var u=a;(t.updateQueue=u)&&(t.flags|=4)}};ud=function(e,t,n,s){n!==s&&(t.flags|=4)};function Dn(e,t){if(!z)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var s=null;n!==null;)n.alternate!==null&&(s=n),n=n.sibling;s===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null}}function oe(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,s=0;if(t)for(var l=e.child;l!==null;)n|=l.lanes|l.childLanes,s|=l.subtreeFlags&14680064,s|=l.flags&14680064,l.return=e,l=l.sibling;else for(l=e.child;l!==null;)n|=l.lanes|l.childLanes,s|=l.subtreeFlags,s|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=s,e.childLanes=n,t}function ff(e,t,n){var s=t.pendingProps;switch(Ga(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return oe(t),null;case 1:return ve(t.type)&&xs(),oe(t),null;case 3:return s=t.stateNode,kn(),A(ye),A(de),si(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(e===null||e.child===null)&&(Ur(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ae!==null&&(wa(Ae),Ae=null))),ha(e,t),oe(t),null;case 5:ri(t);var l=Bt(dr.current);if(n=t.type,e!==null&&t.stateNode!=null)cd(e,t,n,s,l),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!s){if(t.stateNode===null)throw Error(k(166));return oe(t),null}if(e=Bt(Ge.current),Ur(t)){s=t.stateNode,n=t.type;var a=t.memoizedProps;switch(s[Ye]=t,s[cr]=a,e=(t.mode&1)!==0,n){case"dialog":D("cancel",s),D("close",s);break;case"iframe":case"object":case"embed":D("load",s);break;case"video":case"audio":for(l=0;l<Hn.length;l++)D(Hn[l],s);break;case"source":D("error",s);break;case"img":case"image":case"link":D("error",s),D("load",s);break;case"details":D("toggle",s);break;case"input":zi(s,a),D("invalid",s);break;case"select":s._wrapperState={wasMultiple:!!a.multiple},D("invalid",s);break;case"textarea":Ui(s,a),D("invalid",s)}zl(n,a),l=null;for(var i in a)if(a.hasOwnProperty(i)){var c=a[i];i==="children"?typeof c=="string"?s.textContent!==c&&(a.suppressHydrationWarning!==!0&&Br(s.textContent,c,e),l=["children",c]):typeof c=="number"&&s.textContent!==""+c&&(a.suppressHydrationWarning!==!0&&Br(s.textContent,c,e),l=["children",""+c]):qn.hasOwnProperty(i)&&c!=null&&i==="onScroll"&&D("scroll",s)}switch(n){case"input":_r(s),Bi(s,a,!0);break;case"textarea":_r(s),Hi(s);break;case"select":case"option":break;default:typeof a.onClick=="function"&&(s.onclick=fs)}s=l,t.updateQueue=s,s!==null&&(t.flags|=4)}else{i=l.nodeType===9?l:l.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Dc(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=i.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof s.is=="string"?e=i.createElement(n,{is:s.is}):(e=i.createElement(n),n==="select"&&(i=e,s.multiple?i.multiple=!0:s.size&&(i.size=s.size))):e=i.createElementNS(e,n),e[Ye]=t,e[cr]=s,od(e,t,!1,!1),t.stateNode=e;e:{switch(i=Bl(n,s),n){case"dialog":D("cancel",e),D("close",e),l=s;break;case"iframe":case"object":case"embed":D("load",e),l=s;break;case"video":case"audio":for(l=0;l<Hn.length;l++)D(Hn[l],e);l=s;break;case"source":D("error",e),l=s;break;case"img":case"image":case"link":D("error",e),D("load",e),l=s;break;case"details":D("toggle",e),l=s;break;case"input":zi(e,s),l=$l(e,s),D("invalid",e);break;case"option":l=s;break;case"select":e._wrapperState={wasMultiple:!!s.multiple},l=V({},s,{value:void 0}),D("invalid",e);break;case"textarea":Ui(e,s),l=Dl(e,s),D("invalid",e);break;default:l=s}zl(n,l),c=l;for(a in c)if(c.hasOwnProperty(a)){var o=c[a];a==="style"?Bc(e,o):a==="dangerouslySetInnerHTML"?(o=o?o.__html:void 0,o!=null&&Ac(e,o)):a==="children"?typeof o=="string"?(n!=="textarea"||o!=="")&&er(e,o):typeof o=="number"&&er(e,""+o):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(qn.hasOwnProperty(a)?o!=null&&a==="onScroll"&&D("scroll",e):o!=null&&Oa(e,a,o,i))}switch(n){case"input":_r(e),Bi(e,s,!1);break;case"textarea":_r(e),Hi(e);break;case"option":s.value!=null&&e.setAttribute("value",""+Pt(s.value));break;case"select":e.multiple=!!s.multiple,a=s.value,a!=null?hn(e,!!s.multiple,a,!1):s.defaultValue!=null&&hn(e,!!s.multiple,s.defaultValue,!0);break;default:typeof l.onClick=="function"&&(e.onclick=fs)}switch(n){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}}s&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return oe(t),null;case 6:if(e&&t.stateNode!=null)ud(e,t,e.memoizedProps,s);else{if(typeof s!="string"&&t.stateNode===null)throw Error(k(166));if(n=Bt(dr.current),Bt(Ge.current),Ur(t)){if(s=t.stateNode,n=t.memoizedProps,s[Ye]=t,(a=s.nodeValue!==n)&&(e=ke,e!==null))switch(e.tag){case 3:Br(s.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Br(s.nodeValue,n,(e.mode&1)!==0)}a&&(t.flags|=4)}else s=(n.nodeType===9?n:n.ownerDocument).createTextNode(s),s[Ye]=t,t.stateNode=s}return oe(t),null;case 13:if(A(U),s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(z&&be!==null&&t.mode&1&&!(t.flags&128))Pu(),Nn(),t.flags|=98560,a=!1;else if(a=Ur(t),s!==null&&s.dehydrated!==null){if(e===null){if(!a)throw Error(k(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(k(317));a[Ye]=t}else Nn(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;oe(t),a=!1}else Ae!==null&&(wa(Ae),Ae=null),a=!0;if(!a)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(s=s!==null,s!==(e!==null&&e.memoizedState!==null)&&s&&(t.child.flags|=8192,t.mode&1&&(e===null||U.current&1?X===0&&(X=3):pi())),t.updateQueue!==null&&(t.flags|=4),oe(t),null);case 4:return kn(),ha(e,t),e===null&&ir(t.stateNode.containerInfo),oe(t),null;case 10:return qa(t.type._context),oe(t),null;case 17:return ve(t.type)&&xs(),oe(t),null;case 19:if(A(U),a=t.memoizedState,a===null)return oe(t),null;if(s=(t.flags&128)!==0,i=a.rendering,i===null)if(s)Dn(a,!1);else{if(X!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=Ns(e),i!==null){for(t.flags|=128,Dn(a,!1),s=i.updateQueue,s!==null&&(t.updateQueue=s,t.flags|=4),t.subtreeFlags=0,s=n,n=t.child;n!==null;)a=n,e=s,a.flags&=14680066,i=a.alternate,i===null?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=i.childLanes,a.lanes=i.lanes,a.child=i.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=i.memoizedProps,a.memoizedState=i.memoizedState,a.updateQueue=i.updateQueue,a.type=i.type,e=i.dependencies,a.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return F(U,U.current&1|2),t.child}e=e.sibling}a.tail!==null&&Y()>Cn&&(t.flags|=128,s=!0,Dn(a,!1),t.lanes=4194304)}else{if(!s)if(e=Ns(i),e!==null){if(t.flags|=128,s=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Dn(a,!0),a.tail===null&&a.tailMode==="hidden"&&!i.alternate&&!z)return oe(t),null}else 2*Y()-a.renderingStartTime>Cn&&n!==1073741824&&(t.flags|=128,s=!0,Dn(a,!1),t.lanes=4194304);a.isBackwards?(i.sibling=t.child,t.child=i):(n=a.last,n!==null?n.sibling=i:t.child=i,a.last=i)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Y(),t.sibling=null,n=U.current,F(U,s?n&1|2:n&1),t):(oe(t),null);case 22:case 23:return xi(),s=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==s&&(t.flags|=8192),s&&t.mode&1?Ne&1073741824&&(oe(t),t.subtreeFlags&6&&(t.flags|=8192)):oe(t),null;case 24:return null;case 25:return null}throw Error(k(156,t.tag))}function xf(e,t){switch(Ga(t),t.tag){case 1:return ve(t.type)&&xs(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return kn(),A(ye),A(de),si(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return ri(t),null;case 13:if(A(U),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(k(340));Nn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return A(U),null;case 4:return kn(),null;case 10:return qa(t.type._context),null;case 22:case 23:return xi(),null;case 24:return null;default:return null}}var Wr=!1,ce=!1,pf=typeof WeakSet=="function"?WeakSet:Set,L=null;function dn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(s){W(e,t,s)}else n.current=null}function fa(e,t,n){try{n()}catch(s){W(e,t,s)}}var _o=!1;function gf(e,t){if(Xl=ds,e=xu(),Ya(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var s=n.getSelection&&n.getSelection();if(s&&s.rangeCount!==0){n=s.anchorNode;var l=s.anchorOffset,a=s.focusNode;s=s.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break e}var i=0,c=-1,o=-1,u=0,p=0,m=e,g=null;t:for(;;){for(var v;m!==n||l!==0&&m.nodeType!==3||(c=i+l),m!==a||s!==0&&m.nodeType!==3||(o=i+s),m.nodeType===3&&(i+=m.nodeValue.length),(v=m.firstChild)!==null;)g=m,m=v;for(;;){if(m===e)break t;if(g===n&&++u===l&&(c=i),g===a&&++p===s&&(o=i),(v=m.nextSibling)!==null)break;m=g,g=m.parentNode}m=v}n=c===-1||o===-1?null:{start:c,end:o}}else n=null}n=n||{start:0,end:0}}else n=null;for(Jl={focusedElem:e,selectionRange:n},ds=!1,L=t;L!==null;)if(t=L,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,L=e;else for(;L!==null;){t=L;try{var w=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var N=w.memoizedProps,b=w.memoizedState,x=t.stateNode,h=x.getSnapshotBeforeUpdate(t.elementType===t.type?N:Fe(t.type,N),b);x.__reactInternalSnapshotBeforeUpdate=h}break;case 3:var f=t.stateNode.containerInfo;f.nodeType===1?f.textContent="":f.nodeType===9&&f.documentElement&&f.removeChild(f.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(k(163))}}catch(j){W(t,t.return,j)}if(e=t.sibling,e!==null){e.return=t.return,L=e;break}L=t.return}return w=_o,_o=!1,w}function Kn(e,t,n){var s=t.updateQueue;if(s=s!==null?s.lastEffect:null,s!==null){var l=s=s.next;do{if((l.tag&e)===e){var a=l.destroy;l.destroy=void 0,a!==void 0&&fa(t,n,a)}l=l.next}while(l!==s)}}function Ws(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var s=n.create;n.destroy=s()}n=n.next}while(n!==t)}}function xa(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function dd(e){var t=e.alternate;t!==null&&(e.alternate=null,dd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ye],delete t[cr],delete t[ta],delete t[Jh],delete t[qh])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function md(e){return e.tag===5||e.tag===3||e.tag===4}function Oo(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||md(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.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 pa(e,t,n){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=fs));else if(s!==4&&(e=e.child,e!==null))for(pa(e,t,n),e=e.sibling;e!==null;)pa(e,t,n),e=e.sibling}function ga(e,t,n){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(s!==4&&(e=e.child,e!==null))for(ga(e,t,n),e=e.sibling;e!==null;)ga(e,t,n),e=e.sibling}var re=null,De=!1;function dt(e,t,n){for(n=n.child;n!==null;)hd(e,t,n),n=n.sibling}function hd(e,t,n){if(Ze&&typeof Ze.onCommitFiberUnmount=="function")try{Ze.onCommitFiberUnmount(Fs,n)}catch{}switch(n.tag){case 5:ce||dn(n,t);case 6:var s=re,l=De;re=null,dt(e,t,n),re=s,De=l,re!==null&&(De?(e=re,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):re.removeChild(n.stateNode));break;case 18:re!==null&&(De?(e=re,n=n.stateNode,e.nodeType===8?yl(e.parentNode,n):e.nodeType===1&&yl(e,n),sr(e)):yl(re,n.stateNode));break;case 4:s=re,l=De,re=n.stateNode.containerInfo,De=!0,dt(e,t,n),re=s,De=l;break;case 0:case 11:case 14:case 15:if(!ce&&(s=n.updateQueue,s!==null&&(s=s.lastEffect,s!==null))){l=s=s.next;do{var a=l,i=a.destroy;a=a.tag,i!==void 0&&(a&2||a&4)&&fa(n,t,i),l=l.next}while(l!==s)}dt(e,t,n);break;case 1:if(!ce&&(dn(n,t),s=n.stateNode,typeof s.componentWillUnmount=="function"))try{s.props=n.memoizedProps,s.state=n.memoizedState,s.componentWillUnmount()}catch(c){W(n,t,c)}dt(e,t,n);break;case 21:dt(e,t,n);break;case 22:n.mode&1?(ce=(s=ce)||n.memoizedState!==null,dt(e,t,n),ce=s):dt(e,t,n);break;default:dt(e,t,n)}}function $o(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new pf),t.forEach(function(s){var l=Cf.bind(null,e,s);n.has(s)||(n.add(s),s.then(l,l))})}}function Ie(e,t){var n=t.deletions;if(n!==null)for(var s=0;s<n.length;s++){var l=n[s];try{var a=e,i=t,c=i;e:for(;c!==null;){switch(c.tag){case 5:re=c.stateNode,De=!1;break e;case 3:re=c.stateNode.containerInfo,De=!0;break e;case 4:re=c.stateNode.containerInfo,De=!0;break e}c=c.return}if(re===null)throw Error(k(160));hd(a,i,l),re=null,De=!1;var o=l.alternate;o!==null&&(o.return=null),l.return=null}catch(u){W(l,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)fd(t,e),t=t.sibling}function fd(e,t){var n=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Ie(t,e),Ve(e),s&4){try{Kn(3,e,e.return),Ws(3,e)}catch(N){W(e,e.return,N)}try{Kn(5,e,e.return)}catch(N){W(e,e.return,N)}}break;case 1:Ie(t,e),Ve(e),s&512&&n!==null&&dn(n,n.return);break;case 5:if(Ie(t,e),Ve(e),s&512&&n!==null&&dn(n,n.return),e.flags&32){var l=e.stateNode;try{er(l,"")}catch(N){W(e,e.return,N)}}if(s&4&&(l=e.stateNode,l!=null)){var a=e.memoizedProps,i=n!==null?n.memoizedProps:a,c=e.type,o=e.updateQueue;if(e.updateQueue=null,o!==null)try{c==="input"&&a.type==="radio"&&a.name!=null&&Ic(l,a),Bl(c,i);var u=Bl(c,a);for(i=0;i<o.length;i+=2){var p=o[i],m=o[i+1];p==="style"?Bc(l,m):p==="dangerouslySetInnerHTML"?Ac(l,m):p==="children"?er(l,m):Oa(l,p,m,u)}switch(c){case"input":Il(l,a);break;case"textarea":Fc(l,a);break;case"select":var g=l._wrapperState.wasMultiple;l._wrapperState.wasMultiple=!!a.multiple;var v=a.value;v!=null?hn(l,!!a.multiple,v,!1):g!==!!a.multiple&&(a.defaultValue!=null?hn(l,!!a.multiple,a.defaultValue,!0):hn(l,!!a.multiple,a.multiple?[]:"",!1))}l[cr]=a}catch(N){W(e,e.return,N)}}break;case 6:if(Ie(t,e),Ve(e),s&4){if(e.stateNode===null)throw Error(k(162));l=e.stateNode,a=e.memoizedProps;try{l.nodeValue=a}catch(N){W(e,e.return,N)}}break;case 3:if(Ie(t,e),Ve(e),s&4&&n!==null&&n.memoizedState.isDehydrated)try{sr(t.containerInfo)}catch(N){W(e,e.return,N)}break;case 4:Ie(t,e),Ve(e);break;case 13:Ie(t,e),Ve(e),l=e.child,l.flags&8192&&(a=l.memoizedState!==null,l.stateNode.isHidden=a,!a||l.alternate!==null&&l.alternate.memoizedState!==null||(hi=Y())),s&4&&$o(e);break;case 22:if(p=n!==null&&n.memoizedState!==null,e.mode&1?(ce=(u=ce)||p,Ie(t,e),ce=u):Ie(t,e),Ve(e),s&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!p&&e.mode&1)for(L=e,p=e.child;p!==null;){for(m=L=p;L!==null;){switch(g=L,v=g.child,g.tag){case 0:case 11:case 14:case 15:Kn(4,g,g.return);break;case 1:dn(g,g.return);var w=g.stateNode;if(typeof w.componentWillUnmount=="function"){s=g,n=g.return;try{t=s,w.props=t.memoizedProps,w.state=t.memoizedState,w.componentWillUnmount()}catch(N){W(s,n,N)}}break;case 5:dn(g,g.return);break;case 22:if(g.memoizedState!==null){Fo(m);continue}}v!==null?(v.return=g,L=v):Fo(m)}p=p.sibling}e:for(p=null,m=e;;){if(m.tag===5){if(p===null){p=m;try{l=m.stateNode,u?(a=l.style,typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none"):(c=m.stateNode,o=m.memoizedProps.style,i=o!=null&&o.hasOwnProperty("display")?o.display:null,c.style.display=zc("display",i))}catch(N){W(e,e.return,N)}}}else if(m.tag===6){if(p===null)try{m.stateNode.nodeValue=u?"":m.memoizedProps}catch(N){W(e,e.return,N)}}else if((m.tag!==22&&m.tag!==23||m.memoizedState===null||m===e)&&m.child!==null){m.child.return=m,m=m.child;continue}if(m===e)break e;for(;m.sibling===null;){if(m.return===null||m.return===e)break e;p===m&&(p=null),m=m.return}p===m&&(p=null),m.sibling.return=m.return,m=m.sibling}}break;case 19:Ie(t,e),Ve(e),s&4&&$o(e);break;case 21:break;default:Ie(t,e),Ve(e)}}function Ve(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(md(n)){var s=n;break e}n=n.return}throw Error(k(160))}switch(s.tag){case 5:var l=s.stateNode;s.flags&32&&(er(l,""),s.flags&=-33);var a=Oo(e);ga(e,a,l);break;case 3:case 4:var i=s.stateNode.containerInfo,c=Oo(e);pa(e,c,i);break;default:throw Error(k(161))}}catch(o){W(e,e.return,o)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function yf(e,t,n){L=e,xd(e)}function xd(e,t,n){for(var s=(e.mode&1)!==0;L!==null;){var l=L,a=l.child;if(l.tag===22&&s){var i=l.memoizedState!==null||Wr;if(!i){var c=l.alternate,o=c!==null&&c.memoizedState!==null||ce;c=Wr;var u=ce;if(Wr=i,(ce=o)&&!u)for(L=l;L!==null;)i=L,o=i.child,i.tag===22&&i.memoizedState!==null?Do(l):o!==null?(o.return=i,L=o):Do(l);for(;a!==null;)L=a,xd(a),a=a.sibling;L=l,Wr=c,ce=u}Io(e)}else l.subtreeFlags&8772&&a!==null?(a.return=l,L=a):Io(e)}}function Io(e){for(;L!==null;){var t=L;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:ce||Ws(5,t);break;case 1:var s=t.stateNode;if(t.flags&4&&!ce)if(n===null)s.componentDidMount();else{var l=t.elementType===t.type?n.memoizedProps:Fe(t.type,n.memoizedProps);s.componentDidUpdate(l,n.memoizedState,s.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;a!==null&&jo(t,a,s);break;case 3:var i=t.updateQueue;if(i!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}jo(t,i,n)}break;case 5:var c=t.stateNode;if(n===null&&t.flags&4){n=c;var o=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":o.autoFocus&&n.focus();break;case"img":o.src&&(n.src=o.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var p=u.memoizedState;if(p!==null){var m=p.dehydrated;m!==null&&sr(m)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(k(163))}ce||t.flags&512&&xa(t)}catch(g){W(t,t.return,g)}}if(t===e){L=null;break}if(n=t.sibling,n!==null){n.return=t.return,L=n;break}L=t.return}}function Fo(e){for(;L!==null;){var t=L;if(t===e){L=null;break}var n=t.sibling;if(n!==null){n.return=t.return,L=n;break}L=t.return}}function Do(e){for(;L!==null;){var t=L;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Ws(4,t)}catch(o){W(t,n,o)}break;case 1:var s=t.stateNode;if(typeof s.componentDidMount=="function"){var l=t.return;try{s.componentDidMount()}catch(o){W(t,l,o)}}var a=t.return;try{xa(t)}catch(o){W(t,a,o)}break;case 5:var i=t.return;try{xa(t)}catch(o){W(t,i,o)}}}catch(o){W(t,t.return,o)}if(t===e){L=null;break}var c=t.sibling;if(c!==null){c.return=t.return,L=c;break}L=t.return}}var vf=Math.ceil,Ss=ut.ReactCurrentDispatcher,di=ut.ReactCurrentOwner,Te=ut.ReactCurrentBatchConfig,O=0,ee=null,Z=null,se=0,Ne=0,mn=Tt(0),X=0,xr=null,Yt=0,Qs=0,mi=0,Xn=null,pe=null,hi=0,Cn=1/0,Je=null,Cs=!1,ya=null,kt=null,Qr=!1,gt=null,Es=0,Jn=0,va=null,rs=-1,ss=0;function he(){return O&6?Y():rs!==-1?rs:rs=Y()}function St(e){return e.mode&1?O&2&&se!==0?se&-se:tf.transition!==null?(ss===0&&(ss=qc()),ss):(e=I,e!==0||(e=window.event,e=e===void 0?16:au(e.type)),e):1}function Be(e,t,n,s){if(50<Jn)throw Jn=0,va=null,Error(k(185));wr(e,n,s),(!(O&2)||e!==ee)&&(e===ee&&(!(O&2)&&(Qs|=n),X===4&&xt(e,se)),je(e,s),n===1&&O===0&&!(t.mode&1)&&(Cn=Y()+500,Us&&Mt()))}function je(e,t){var n=e.callbackNode;th(e,t);var s=us(e,e===ee?se:0);if(s===0)n!==null&&Qi(n),e.callbackNode=null,e.callbackPriority=0;else if(t=s&-s,e.callbackPriority!==t){if(n!=null&&Qi(n),t===1)e.tag===0?ef(Ao.bind(null,e)):Su(Ao.bind(null,e)),Kh(function(){!(O&6)&&Mt()}),n=null;else{switch(eu(s)){case 1:n=Aa;break;case 4:n=Xc;break;case 16:n=cs;break;case 536870912:n=Jc;break;default:n=cs}n=bd(n,pd.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function pd(e,t){if(rs=-1,ss=0,O&6)throw Error(k(327));var n=e.callbackNode;if(yn()&&e.callbackNode!==n)return null;var s=us(e,e===ee?se:0);if(s===0)return null;if(s&30||s&e.expiredLanes||t)t=Ps(e,s);else{t=s;var l=O;O|=2;var a=yd();(ee!==e||se!==t)&&(Je=null,Cn=Y()+500,Ut(e,t));do try{Nf();break}catch(c){gd(e,c)}while(1);Ja(),Ss.current=a,O=l,Z!==null?t=0:(ee=null,se=0,t=X)}if(t!==0){if(t===2&&(l=Ql(e),l!==0&&(s=l,t=ja(e,l))),t===1)throw n=xr,Ut(e,0),xt(e,s),je(e,Y()),n;if(t===6)xt(e,s);else{if(l=e.current.alternate,!(s&30)&&!jf(l)&&(t=Ps(e,s),t===2&&(a=Ql(e),a!==0&&(s=a,t=ja(e,a))),t===1))throw n=xr,Ut(e,0),xt(e,s),je(e,Y()),n;switch(e.finishedWork=l,e.finishedLanes=s,t){case 0:case 1:throw Error(k(345));case 2:Ft(e,pe,Je);break;case 3:if(xt(e,s),(s&130023424)===s&&(t=hi+500-Y(),10<t)){if(us(e,0)!==0)break;if(l=e.suspendedLanes,(l&s)!==s){he(),e.pingedLanes|=e.suspendedLanes&l;break}e.timeoutHandle=ea(Ft.bind(null,e,pe,Je),t);break}Ft(e,pe,Je);break;case 4:if(xt(e,s),(s&4194240)===s)break;for(t=e.eventTimes,l=-1;0<s;){var i=31-ze(s);a=1<<i,i=t[i],i>l&&(l=i),s&=~a}if(s=l,s=Y()-s,s=(120>s?120:480>s?480:1080>s?1080:1920>s?1920:3e3>s?3e3:4320>s?4320:1960*vf(s/1960))-s,10<s){e.timeoutHandle=ea(Ft.bind(null,e,pe,Je),s);break}Ft(e,pe,Je);break;case 5:Ft(e,pe,Je);break;default:throw Error(k(329))}}}return je(e,Y()),e.callbackNode===n?pd.bind(null,e):null}function ja(e,t){var n=Xn;return e.current.memoizedState.isDehydrated&&(Ut(e,t).flags|=256),e=Ps(e,t),e!==2&&(t=pe,pe=n,t!==null&&wa(t)),e}function wa(e){pe===null?pe=e:pe.push.apply(pe,e)}function jf(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var s=0;s<n.length;s++){var l=n[s],a=l.getSnapshot;l=l.value;try{if(!Ue(a(),l))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function xt(e,t){for(t&=~mi,t&=~Qs,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-ze(t),s=1<<n;e[n]=-1,t&=~s}}function Ao(e){if(O&6)throw Error(k(327));yn();var t=us(e,0);if(!(t&1))return je(e,Y()),null;var n=Ps(e,t);if(e.tag!==0&&n===2){var s=Ql(e);s!==0&&(t=s,n=ja(e,s))}if(n===1)throw n=xr,Ut(e,0),xt(e,t),je(e,Y()),n;if(n===6)throw Error(k(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ft(e,pe,Je),je(e,Y()),null}function fi(e,t){var n=O;O|=1;try{return e(t)}finally{O=n,O===0&&(Cn=Y()+500,Us&&Mt())}}function Zt(e){gt!==null&&gt.tag===0&&!(O&6)&&yn();var t=O;O|=1;var n=Te.transition,s=I;try{if(Te.transition=null,I=1,e)return e()}finally{I=s,Te.transition=n,O=t,!(O&6)&&Mt()}}function xi(){Ne=mn.current,A(mn)}function Ut(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Gh(n)),Z!==null)for(n=Z.return;n!==null;){var s=n;switch(Ga(s),s.tag){case 1:s=s.type.childContextTypes,s!=null&&xs();break;case 3:kn(),A(ye),A(de),si();break;case 5:ri(s);break;case 4:kn();break;case 13:A(U);break;case 19:A(U);break;case 10:qa(s.type._context);break;case 22:case 23:xi()}n=n.return}if(ee=e,Z=e=Ct(e.current,null),se=Ne=t,X=0,xr=null,mi=Qs=Yt=0,pe=Xn=null,zt!==null){for(t=0;t<zt.length;t++)if(n=zt[t],s=n.interleaved,s!==null){n.interleaved=null;var l=s.next,a=n.pending;if(a!==null){var i=a.next;a.next=l,s.next=i}n.pending=s}zt=null}return e}function gd(e,t){do{var n=Z;try{if(Ja(),es.current=ks,bs){for(var s=H.memoizedState;s!==null;){var l=s.queue;l!==null&&(l.pending=null),s=s.next}bs=!1}if(Qt=0,q=K=H=null,Gn=!1,mr=0,di.current=null,n===null||n.return===null){X=1,xr=t,Z=null;break}e:{var a=e,i=n.return,c=n,o=t;if(t=se,c.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){var u=o,p=c,m=p.tag;if(!(p.mode&1)&&(m===0||m===11||m===15)){var g=p.alternate;g?(p.updateQueue=g.updateQueue,p.memoizedState=g.memoizedState,p.lanes=g.lanes):(p.updateQueue=null,p.memoizedState=null)}var v=Co(i);if(v!==null){v.flags&=-257,Eo(v,i,c,a,t),v.mode&1&&So(a,u,t),t=v,o=u;var w=t.updateQueue;if(w===null){var N=new Set;N.add(o),t.updateQueue=N}else w.add(o);break e}else{if(!(t&1)){So(a,u,t),pi();break e}o=Error(k(426))}}else if(z&&c.mode&1){var b=Co(i);if(b!==null){!(b.flags&65536)&&(b.flags|=256),Eo(b,i,c,a,t),Ka(Sn(o,c));break e}}a=o=Sn(o,c),X!==4&&(X=2),Xn===null?Xn=[a]:Xn.push(a),a=i;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t;var x=ed(a,o,t);vo(a,x);break e;case 1:c=o;var h=a.type,f=a.stateNode;if(!(a.flags&128)&&(typeof h.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(kt===null||!kt.has(f)))){a.flags|=65536,t&=-t,a.lanes|=t;var j=td(a,c,t);vo(a,j);break e}}a=a.return}while(a!==null)}jd(n)}catch(S){t=S,Z===n&&n!==null&&(Z=n=n.return);continue}break}while(1)}function yd(){var e=Ss.current;return Ss.current=ks,e===null?ks:e}function pi(){(X===0||X===3||X===2)&&(X=4),ee===null||!(Yt&268435455)&&!(Qs&268435455)||xt(ee,se)}function Ps(e,t){var n=O;O|=2;var s=yd();(ee!==e||se!==t)&&(Je=null,Ut(e,t));do try{wf();break}catch(l){gd(e,l)}while(1);if(Ja(),O=n,Ss.current=s,Z!==null)throw Error(k(261));return ee=null,se=0,X}function wf(){for(;Z!==null;)vd(Z)}function Nf(){for(;Z!==null&&!Qm();)vd(Z)}function vd(e){var t=Nd(e.alternate,e,Ne);e.memoizedProps=e.pendingProps,t===null?jd(e):Z=t,di.current=null}function jd(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=xf(n,t),n!==null){n.flags&=32767,Z=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{X=6,Z=null;return}}else if(n=ff(n,t,Ne),n!==null){Z=n;return}if(t=t.sibling,t!==null){Z=t;return}Z=t=e}while(t!==null);X===0&&(X=5)}function Ft(e,t,n){var s=I,l=Te.transition;try{Te.transition=null,I=1,bf(e,t,n,s)}finally{Te.transition=l,I=s}return null}function bf(e,t,n,s){do yn();while(gt!==null);if(O&6)throw Error(k(327));n=e.finishedWork;var l=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(k(177));e.callbackNode=null,e.callbackPriority=0;var a=n.lanes|n.childLanes;if(nh(e,a),e===ee&&(Z=ee=null,se=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Qr||(Qr=!0,bd(cs,function(){return yn(),null})),a=(n.flags&15990)!==0,n.subtreeFlags&15990||a){a=Te.transition,Te.transition=null;var i=I;I=1;var c=O;O|=4,di.current=null,gf(e,n),fd(n,e),Uh(Jl),ds=!!Xl,Jl=Xl=null,e.current=n,yf(n),Ym(),O=c,I=i,Te.transition=a}else e.current=n;if(Qr&&(Qr=!1,gt=e,Es=l),a=e.pendingLanes,a===0&&(kt=null),Km(n.stateNode),je(e,Y()),t!==null)for(s=e.onRecoverableError,n=0;n<t.length;n++)l=t[n],s(l.value,{componentStack:l.stack,digest:l.digest});if(Cs)throw Cs=!1,e=ya,ya=null,e;return Es&1&&e.tag!==0&&yn(),a=e.pendingLanes,a&1?e===va?Jn++:(Jn=0,va=e):Jn=0,Mt(),null}function yn(){if(gt!==null){var e=eu(Es),t=Te.transition,n=I;try{if(Te.transition=null,I=16>e?16:e,gt===null)var s=!1;else{if(e=gt,gt=null,Es=0,O&6)throw Error(k(331));var l=O;for(O|=4,L=e.current;L!==null;){var a=L,i=a.child;if(L.flags&16){var c=a.deletions;if(c!==null){for(var o=0;o<c.length;o++){var u=c[o];for(L=u;L!==null;){var p=L;switch(p.tag){case 0:case 11:case 15:Kn(8,p,a)}var m=p.child;if(m!==null)m.return=p,L=m;else for(;L!==null;){p=L;var g=p.sibling,v=p.return;if(dd(p),p===u){L=null;break}if(g!==null){g.return=v,L=g;break}L=v}}}var w=a.alternate;if(w!==null){var N=w.child;if(N!==null){w.child=null;do{var b=N.sibling;N.sibling=null,N=b}while(N!==null)}}L=a}}if(a.subtreeFlags&2064&&i!==null)i.return=a,L=i;else e:for(;L!==null;){if(a=L,a.flags&2048)switch(a.tag){case 0:case 11:case 15:Kn(9,a,a.return)}var x=a.sibling;if(x!==null){x.return=a.return,L=x;break e}L=a.return}}var h=e.current;for(L=h;L!==null;){i=L;var f=i.child;if(i.subtreeFlags&2064&&f!==null)f.return=i,L=f;else e:for(i=h;L!==null;){if(c=L,c.flags&2048)try{switch(c.tag){case 0:case 11:case 15:Ws(9,c)}}catch(S){W(c,c.return,S)}if(c===i){L=null;break e}var j=c.sibling;if(j!==null){j.return=c.return,L=j;break e}L=c.return}}if(O=l,Mt(),Ze&&typeof Ze.onPostCommitFiberRoot=="function")try{Ze.onPostCommitFiberRoot(Fs,e)}catch{}s=!0}return s}finally{I=n,Te.transition=t}}return!1}function zo(e,t,n){t=Sn(n,t),t=ed(e,t,1),e=bt(e,t,1),t=he(),e!==null&&(wr(e,1,t),je(e,t))}function W(e,t,n){if(e.tag===3)zo(e,e,n);else for(;t!==null;){if(t.tag===3){zo(t,e,n);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(kt===null||!kt.has(s))){e=Sn(n,e),e=td(t,e,1),t=bt(t,e,1),e=he(),t!==null&&(wr(t,1,e),je(t,e));break}}t=t.return}}function kf(e,t,n){var s=e.pingCache;s!==null&&s.delete(t),t=he(),e.pingedLanes|=e.suspendedLanes&n,ee===e&&(se&n)===n&&(X===4||X===3&&(se&130023424)===se&&500>Y()-hi?Ut(e,0):mi|=n),je(e,t)}function wd(e,t){t===0&&(e.mode&1?(t=Ir,Ir<<=1,!(Ir&130023424)&&(Ir=4194304)):t=1);var n=he();e=at(e,t),e!==null&&(wr(e,t,n),je(e,n))}function Sf(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),wd(e,n)}function Cf(e,t){var n=0;switch(e.tag){case 13:var s=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:s=e.stateNode;break;default:throw Error(k(314))}s!==null&&s.delete(t),wd(e,n)}var Nd;Nd=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ye.current)ge=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return ge=!1,hf(e,t,n);ge=!!(e.flags&131072)}else ge=!1,z&&t.flags&1048576&&Cu(t,ys,t.index);switch(t.lanes=0,t.tag){case 2:var s=t.type;ns(e,t),e=t.pendingProps;var l=wn(t,de.current);gn(t,n),l=ai(null,t,s,e,l,n);var a=ii();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,ve(s)?(a=!0,ps(t)):a=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,ti(t),l.updater=Vs,t.stateNode=l,l._reactInternals=t,ia(t,s,e,n),t=ua(null,t,s,!0,a,n)):(t.tag=0,z&&a&&Za(t),me(null,t,l,n),t=t.child),t;case 16:s=t.elementType;e:{switch(ns(e,t),e=t.pendingProps,l=s._init,s=l(s._payload),t.type=s,l=t.tag=Pf(s),e=Fe(s,e),l){case 0:t=ca(null,t,s,e,n);break e;case 1:t=Ro(null,t,s,e,n);break e;case 11:t=Po(null,t,s,e,n);break e;case 14:t=Lo(null,t,s,Fe(s.type,e),n);break e}throw Error(k(306,s,""))}return t;case 0:return s=t.type,l=t.pendingProps,l=t.elementType===s?l:Fe(s,l),ca(e,t,s,l,n);case 1:return s=t.type,l=t.pendingProps,l=t.elementType===s?l:Fe(s,l),Ro(e,t,s,l,n);case 3:e:{if(ld(t),e===null)throw Error(k(387));s=t.pendingProps,a=t.memoizedState,l=a.element,Mu(e,t),ws(t,s,null,n);var i=t.memoizedState;if(s=i.element,a.isDehydrated)if(a={element:s,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){l=Sn(Error(k(423)),t),t=To(e,t,s,n,l);break e}else if(s!==l){l=Sn(Error(k(424)),t),t=To(e,t,s,n,l);break e}else for(be=Nt(t.stateNode.containerInfo.firstChild),ke=t,z=!0,Ae=null,n=Ru(t,null,s,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Nn(),s===l){t=it(e,t,n);break e}me(e,t,s,n)}t=t.child}return t;case 5:return _u(t),e===null&&sa(t),s=t.type,l=t.pendingProps,a=e!==null?e.memoizedProps:null,i=l.children,ql(s,l)?i=null:a!==null&&ql(s,a)&&(t.flags|=32),sd(e,t),me(e,t,i,n),t.child;case 6:return e===null&&sa(t),null;case 13:return ad(e,t,n);case 4:return ni(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=bn(t,null,s,n):me(e,t,s,n),t.child;case 11:return s=t.type,l=t.pendingProps,l=t.elementType===s?l:Fe(s,l),Po(e,t,s,l,n);case 7:return me(e,t,t.pendingProps,n),t.child;case 8:return me(e,t,t.pendingProps.children,n),t.child;case 12:return me(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(s=t.type._context,l=t.pendingProps,a=t.memoizedProps,i=l.value,F(vs,s._currentValue),s._currentValue=i,a!==null)if(Ue(a.value,i)){if(a.children===l.children&&!ye.current){t=it(e,t,n);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var c=a.dependencies;if(c!==null){i=a.child;for(var o=c.firstContext;o!==null;){if(o.context===s){if(a.tag===1){o=nt(-1,n&-n),o.tag=2;var u=a.updateQueue;if(u!==null){u=u.shared;var p=u.pending;p===null?o.next=o:(o.next=p.next,p.next=o),u.pending=o}}a.lanes|=n,o=a.alternate,o!==null&&(o.lanes|=n),la(a.return,n,t),c.lanes|=n;break}o=o.next}}else if(a.tag===10)i=a.type===t.type?null:a.child;else if(a.tag===18){if(i=a.return,i===null)throw Error(k(341));i.lanes|=n,c=i.alternate,c!==null&&(c.lanes|=n),la(i,n,t),i=a.sibling}else i=a.child;if(i!==null)i.return=a;else for(i=a;i!==null;){if(i===t){i=null;break}if(a=i.sibling,a!==null){a.return=i.return,i=a;break}i=i.return}a=i}me(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,s=t.pendingProps.children,gn(t,n),l=Me(l),s=s(l),t.flags|=1,me(e,t,s,n),t.child;case 14:return s=t.type,l=Fe(s,t.pendingProps),l=Fe(s.type,l),Lo(e,t,s,l,n);case 15:return nd(e,t,t.type,t.pendingProps,n);case 17:return s=t.type,l=t.pendingProps,l=t.elementType===s?l:Fe(s,l),ns(e,t),t.tag=1,ve(s)?(e=!0,ps(t)):e=!1,gn(t,n),qu(t,s,l),ia(t,s,l,n),ua(null,t,s,!0,e,n);case 19:return id(e,t,n);case 22:return rd(e,t,n)}throw Error(k(156,t.tag))};function bd(e,t){return Kc(e,t)}function Ef(e,t,n,s){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Re(e,t,n,s){return new Ef(e,t,n,s)}function gi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Pf(e){if(typeof e=="function")return gi(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Ia)return 11;if(e===Fa)return 14}return 2}function Ct(e,t){var n=e.alternate;return n===null?(n=Re(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function ls(e,t,n,s,l,a){var i=2;if(s=e,typeof e=="function")gi(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case tn:return Ht(n.children,l,a,t);case $a:i=8,l|=8;break;case Tl:return e=Re(12,n,t,l|2),e.elementType=Tl,e.lanes=a,e;case Ml:return e=Re(13,n,t,l),e.elementType=Ml,e.lanes=a,e;case _l:return e=Re(19,n,t,l),e.elementType=_l,e.lanes=a,e;case _c:return Ys(n,l,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Tc:i=10;break e;case Mc:i=9;break e;case Ia:i=11;break e;case Fa:i=14;break e;case mt:i=16,s=null;break e}throw Error(k(130,e==null?e:typeof e,""))}return t=Re(i,n,t,l),t.elementType=e,t.type=s,t.lanes=a,t}function Ht(e,t,n,s){return e=Re(7,e,s,t),e.lanes=n,e}function Ys(e,t,n,s){return e=Re(22,e,s,t),e.elementType=_c,e.lanes=n,e.stateNode={isHidden:!1},e}function Cl(e,t,n){return e=Re(6,e,null,t),e.lanes=n,e}function El(e,t,n){return t=Re(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Lf(e,t,n,s,l){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=il(0),this.expirationTimes=il(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=il(0),this.identifierPrefix=s,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function yi(e,t,n,s,l,a,i,c,o){return e=new Lf(e,t,n,c,o),t===1?(t=1,a===!0&&(t|=8)):t=0,a=Re(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:s,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ti(a),e}function Rf(e,t,n){var s=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:en,key:s==null?null:""+s,children:e,containerInfo:t,implementation:n}}function kd(e){if(!e)return Lt;e=e._reactInternals;e:{if(Kt(e)!==e||e.tag!==1)throw Error(k(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(ve(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(k(171))}if(e.tag===1){var n=e.type;if(ve(n))return ku(e,n,t)}return t}function Sd(e,t,n,s,l,a,i,c,o){return e=yi(n,s,!0,e,l,a,i,c,o),e.context=kd(null),n=e.current,s=he(),l=St(n),a=nt(s,l),a.callback=t??null,bt(n,a,l),e.current.lanes=l,wr(e,l,s),je(e,s),e}function Zs(e,t,n,s){var l=t.current,a=he(),i=St(l);return n=kd(n),t.context===null?t.context=n:t.pendingContext=n,t=nt(a,i),t.payload={element:e},s=s===void 0?null:s,s!==null&&(t.callback=s),e=bt(l,t,i),e!==null&&(Be(e,l,i,a),qr(e,l,i)),i}function Ls(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Bo(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function vi(e,t){Bo(e,t),(e=e.alternate)&&Bo(e,t)}function Tf(){return null}var Cd=typeof reportError=="function"?reportError:function(e){console.error(e)};function ji(e){this._internalRoot=e}Gs.prototype.render=ji.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(k(409));Zs(e,t,null,null)};Gs.prototype.unmount=ji.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Zt(function(){Zs(null,e,null,null)}),t[lt]=null}};function Gs(e){this._internalRoot=e}Gs.prototype.unstable_scheduleHydration=function(e){if(e){var t=ru();e={blockedOn:null,target:e,priority:t};for(var n=0;n<ft.length&&t!==0&&t<ft[n].priority;n++);ft.splice(n,0,e),n===0&&lu(e)}};function wi(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Ks(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Uo(){}function Mf(e,t,n,s,l){if(l){if(typeof s=="function"){var a=s;s=function(){var u=Ls(i);a.call(u)}}var i=Sd(t,s,e,0,null,!1,!1,"",Uo);return e._reactRootContainer=i,e[lt]=i.current,ir(e.nodeType===8?e.parentNode:e),Zt(),i}for(;l=e.lastChild;)e.removeChild(l);if(typeof s=="function"){var c=s;s=function(){var u=Ls(o);c.call(u)}}var o=yi(e,0,!1,null,null,!1,!1,"",Uo);return e._reactRootContainer=o,e[lt]=o.current,ir(e.nodeType===8?e.parentNode:e),Zt(function(){Zs(t,o,n,s)}),o}function Xs(e,t,n,s,l){var a=n._reactRootContainer;if(a){var i=a;if(typeof l=="function"){var c=l;l=function(){var o=Ls(i);c.call(o)}}Zs(t,i,e,l)}else i=Mf(n,t,e,l,s);return Ls(i)}tu=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Un(t.pendingLanes);n!==0&&(za(t,n|1),je(t,Y()),!(O&6)&&(Cn=Y()+500,Mt()))}break;case 13:Zt(function(){var s=at(e,1);if(s!==null){var l=he();Be(s,e,1,l)}}),vi(e,1)}};Ba=function(e){if(e.tag===13){var t=at(e,134217728);if(t!==null){var n=he();Be(t,e,134217728,n)}vi(e,134217728)}};nu=function(e){if(e.tag===13){var t=St(e),n=at(e,t);if(n!==null){var s=he();Be(n,e,t,s)}vi(e,t)}};ru=function(){return I};su=function(e,t){var n=I;try{return I=e,t()}finally{I=n}};Hl=function(e,t,n){switch(t){case"input":if(Il(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var s=n[t];if(s!==e&&s.form===e.form){var l=Bs(s);if(!l)throw Error(k(90));$c(s),Il(s,l)}}}break;case"textarea":Fc(e,n);break;case"select":t=n.value,t!=null&&hn(e,!!n.multiple,t,!1)}};Vc=fi;Wc=Zt;var _f={usingClientEntryPoint:!1,Events:[br,ln,Bs,Uc,Hc,fi]},An={findFiberByHostInstance:At,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Of={bundleType:An.bundleType,version:An.version,rendererPackageName:An.rendererPackageName,rendererConfig:An.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ut.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Zc(e),e===null?null:e.stateNode},findFiberByHostInstance:An.findFiberByHostInstance||Tf,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Yr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Yr.isDisabled&&Yr.supportsFiber)try{Fs=Yr.inject(Of),Ze=Yr}catch{}}Ce.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=_f;Ce.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!wi(t))throw Error(k(200));return Rf(e,t,null,n)};Ce.createRoot=function(e,t){if(!wi(e))throw Error(k(299));var n=!1,s="",l=Cd;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onRecoverableError!==void 0&&(l=t.onRecoverableError)),t=yi(e,1,!1,null,null,n,!1,s,l),e[lt]=t.current,ir(e.nodeType===8?e.parentNode:e),new ji(t)};Ce.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(k(188)):(e=Object.keys(e).join(","),Error(k(268,e)));return e=Zc(t),e=e===null?null:e.stateNode,e};Ce.flushSync=function(e){return Zt(e)};Ce.hydrate=function(e,t,n){if(!Ks(t))throw Error(k(200));return Xs(null,e,t,!0,n)};Ce.hydrateRoot=function(e,t,n){if(!wi(e))throw Error(k(405));var s=n!=null&&n.hydratedSources||null,l=!1,a="",i=Cd;if(n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onRecoverableError!==void 0&&(i=n.onRecoverableError)),t=Sd(t,null,e,1,n??null,l,!1,a,i),e[lt]=t.current,ir(e),s)for(e=0;e<s.length;e++)n=s[e],l=n._getVersion,l=l(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,l]:t.mutableSourceEagerHydrationData.push(n,l);return new Gs(t)};Ce.render=function(e,t,n){if(!Ks(t))throw Error(k(200));return Xs(null,e,t,!1,n)};Ce.unmountComponentAtNode=function(e){if(!Ks(e))throw Error(k(40));return e._reactRootContainer?(Zt(function(){Xs(null,null,e,!1,function(){e._reactRootContainer=null,e[lt]=null})}),!0):!1};Ce.unstable_batchedUpdates=fi;Ce.unstable_renderSubtreeIntoContainer=function(e,t,n,s){if(!Ks(n))throw Error(k(200));if(e==null||e._reactInternals===void 0)throw Error(k(38));return Xs(e,t,n,!1,s)};Ce.version="18.3.1-next-f1338f8080-20240426";function Ed(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Ed)}catch(e){console.error(e)}}Ed(),Ec.exports=Ce;var $f=Ec.exports,Ho=$f;Ll.createRoot=Ho.createRoot,Ll.hydrateRoot=Ho.hydrateRoot;/**
41
+ * @remix-run/router v1.23.1
42
+ *
43
+ * Copyright (c) Remix Software Inc.
44
+ *
45
+ * This source code is licensed under the MIT license found in the
46
+ * LICENSE.md file in the root directory of this source tree.
47
+ *
48
+ * @license MIT
49
+ */function pr(){return pr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},pr.apply(this,arguments)}var yt;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(yt||(yt={}));const Vo="popstate";function If(e){e===void 0&&(e={});function t(s,l){let{pathname:a,search:i,hash:c}=s.location;return Na("",{pathname:a,search:i,hash:c},l.state&&l.state.usr||null,l.state&&l.state.key||"default")}function n(s,l){return typeof l=="string"?l:Rs(l)}return Df(t,n,null,e)}function G(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Ni(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Ff(){return Math.random().toString(36).substr(2,8)}function Wo(e,t){return{usr:e.state,key:e.key,idx:t}}function Na(e,t,n,s){return n===void 0&&(n=null),pr({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Rn(t):t,{state:n,key:t&&t.key||s||Ff()})}function Rs(e){let{pathname:t="/",search:n="",hash:s=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),s&&s!=="#"&&(t+=s.charAt(0)==="#"?s:"#"+s),t}function Rn(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let s=e.indexOf("?");s>=0&&(t.search=e.substr(s),e=e.substr(0,s)),e&&(t.pathname=e)}return t}function Df(e,t,n,s){s===void 0&&(s={});let{window:l=document.defaultView,v5Compat:a=!1}=s,i=l.history,c=yt.Pop,o=null,u=p();u==null&&(u=0,i.replaceState(pr({},i.state,{idx:u}),""));function p(){return(i.state||{idx:null}).idx}function m(){c=yt.Pop;let b=p(),x=b==null?null:b-u;u=b,o&&o({action:c,location:N.location,delta:x})}function g(b,x){c=yt.Push;let h=Na(N.location,b,x);n&&n(h,b),u=p()+1;let f=Wo(h,u),j=N.createHref(h);try{i.pushState(f,"",j)}catch(S){if(S instanceof DOMException&&S.name==="DataCloneError")throw S;l.location.assign(j)}a&&o&&o({action:c,location:N.location,delta:1})}function v(b,x){c=yt.Replace;let h=Na(N.location,b,x);n&&n(h,b),u=p();let f=Wo(h,u),j=N.createHref(h);i.replaceState(f,"",j),a&&o&&o({action:c,location:N.location,delta:0})}function w(b){let x=l.location.origin!=="null"?l.location.origin:l.location.href,h=typeof b=="string"?b:Rs(b);return h=h.replace(/ $/,"%20"),G(x,"No window.location.(origin|href) available to create URL for href: "+h),new URL(h,x)}let N={get action(){return c},get location(){return e(l,i)},listen(b){if(o)throw new Error("A history only accepts one active listener");return l.addEventListener(Vo,m),o=b,()=>{l.removeEventListener(Vo,m),o=null}},createHref(b){return t(l,b)},createURL:w,encodeLocation(b){let x=w(b);return{pathname:x.pathname,search:x.search,hash:x.hash}},push:g,replace:v,go(b){return i.go(b)}};return N}var Qo;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Qo||(Qo={}));function Af(e,t,n){return n===void 0&&(n="/"),zf(e,t,n,!1)}function zf(e,t,n,s){let l=typeof t=="string"?Rn(t):t,a=bi(l.pathname||"/",n);if(a==null)return null;let i=Pd(e);Bf(i);let c=null;for(let o=0;c==null&&o<i.length;++o){let u=Jf(a);c=Kf(i[o],u,s)}return c}function Pd(e,t,n,s){t===void 0&&(t=[]),n===void 0&&(n=[]),s===void 0&&(s="");let l=(a,i,c)=>{let o={relativePath:c===void 0?a.path||"":c,caseSensitive:a.caseSensitive===!0,childrenIndex:i,route:a};o.relativePath.startsWith("/")&&(G(o.relativePath.startsWith(s),'Absolute route path "'+o.relativePath+'" nested under path '+('"'+s+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),o.relativePath=o.relativePath.slice(s.length));let u=Et([s,o.relativePath]),p=n.concat(o);a.children&&a.children.length>0&&(G(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),Pd(a.children,t,p,u)),!(a.path==null&&!a.index)&&t.push({path:u,score:Zf(u,a.index),routesMeta:p})};return e.forEach((a,i)=>{var c;if(a.path===""||!((c=a.path)!=null&&c.includes("?")))l(a,i);else for(let o of Ld(a.path))l(a,i,o)}),t}function Ld(e){let t=e.split("/");if(t.length===0)return[];let[n,...s]=t,l=n.endsWith("?"),a=n.replace(/\?$/,"");if(s.length===0)return l?[a,""]:[a];let i=Ld(s.join("/")),c=[];return c.push(...i.map(o=>o===""?a:[a,o].join("/"))),l&&c.push(...i),c.map(o=>e.startsWith("/")&&o===""?"/":o)}function Bf(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Gf(t.routesMeta.map(s=>s.childrenIndex),n.routesMeta.map(s=>s.childrenIndex)))}const Uf=/^:[\w-]+$/,Hf=3,Vf=2,Wf=1,Qf=10,Yf=-2,Yo=e=>e==="*";function Zf(e,t){let n=e.split("/"),s=n.length;return n.some(Yo)&&(s+=Yf),t&&(s+=Vf),n.filter(l=>!Yo(l)).reduce((l,a)=>l+(Uf.test(a)?Hf:a===""?Wf:Qf),s)}function Gf(e,t){return e.length===t.length&&e.slice(0,-1).every((s,l)=>s===t[l])?e[e.length-1]-t[t.length-1]:0}function Kf(e,t,n){n===void 0&&(n=!1);let{routesMeta:s}=e,l={},a="/",i=[];for(let c=0;c<s.length;++c){let o=s[c],u=c===s.length-1,p=a==="/"?t:t.slice(a.length)||"/",m=Zo({path:o.relativePath,caseSensitive:o.caseSensitive,end:u},p),g=o.route;if(!m&&u&&n&&!s[s.length-1].route.index&&(m=Zo({path:o.relativePath,caseSensitive:o.caseSensitive,end:!1},p)),!m)return null;Object.assign(l,m.params),i.push({params:l,pathname:Et([a,m.pathname]),pathnameBase:r0(Et([a,m.pathnameBase])),route:g}),m.pathnameBase!=="/"&&(a=Et([a,m.pathnameBase]))}return i}function Zo(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,s]=Xf(e.path,e.caseSensitive,e.end),l=t.match(n);if(!l)return null;let a=l[0],i=a.replace(/(.)\/+$/,"$1"),c=l.slice(1);return{params:s.reduce((u,p,m)=>{let{paramName:g,isOptional:v}=p;if(g==="*"){let N=c[m]||"";i=a.slice(0,a.length-N.length).replace(/(.)\/+$/,"$1")}const w=c[m];return v&&!w?u[g]=void 0:u[g]=(w||"").replace(/%2F/g,"/"),u},{}),pathname:a,pathnameBase:i,pattern:e}}function Xf(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Ni(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let s=[],l="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,c,o)=>(s.push({paramName:c,isOptional:o!=null}),o?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(s.push({paramName:"*"}),l+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?l+="\\/*$":e!==""&&e!=="/"&&(l+="(?:(?=\\/|$))"),[new RegExp(l,t?void 0:"i"),s]}function Jf(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Ni(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function bi(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,s=e.charAt(n);return s&&s!=="/"?null:e.slice(n)||"/"}const qf=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,e0=e=>qf.test(e);function t0(e,t){t===void 0&&(t="/");let{pathname:n,search:s="",hash:l=""}=typeof e=="string"?Rn(e):e,a;if(n)if(e0(n))a=n;else{if(n.includes("//")){let i=n;n=n.replace(/\/\/+/g,"/"),Ni(!1,"Pathnames cannot have embedded double slashes - normalizing "+(i+" -> "+n))}n.startsWith("/")?a=Go(n.substring(1),"/"):a=Go(n,t)}else a=t;return{pathname:a,search:s0(s),hash:l0(l)}}function Go(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(l=>{l===".."?n.length>1&&n.pop():l!=="."&&n.push(l)}),n.length>1?n.join("/"):"/"}function Pl(e,t,n,s){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(s)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function n0(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Rd(e,t){let n=n0(e);return t?n.map((s,l)=>l===n.length-1?s.pathname:s.pathnameBase):n.map(s=>s.pathnameBase)}function Td(e,t,n,s){s===void 0&&(s=!1);let l;typeof e=="string"?l=Rn(e):(l=pr({},e),G(!l.pathname||!l.pathname.includes("?"),Pl("?","pathname","search",l)),G(!l.pathname||!l.pathname.includes("#"),Pl("#","pathname","hash",l)),G(!l.search||!l.search.includes("#"),Pl("#","search","hash",l)));let a=e===""||l.pathname==="",i=a?"/":l.pathname,c;if(i==null)c=n;else{let m=t.length-1;if(!s&&i.startsWith("..")){let g=i.split("/");for(;g[0]==="..";)g.shift(),m-=1;l.pathname=g.join("/")}c=m>=0?t[m]:"/"}let o=t0(l,c),u=i&&i!=="/"&&i.endsWith("/"),p=(a||i===".")&&n.endsWith("/");return!o.pathname.endsWith("/")&&(u||p)&&(o.pathname+="/"),o}const Et=e=>e.join("/").replace(/\/\/+/g,"/"),r0=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),s0=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,l0=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function a0(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Md=["post","put","patch","delete"];new Set(Md);const i0=["get",...Md];new Set(i0);/**
50
+ * React Router v6.30.2
51
+ *
52
+ * Copyright (c) Remix Software Inc.
53
+ *
54
+ * This source code is licensed under the MIT license found in the
55
+ * LICENSE.md file in the root directory of this source tree.
56
+ *
57
+ * @license MIT
58
+ */function gr(){return gr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},gr.apply(this,arguments)}const ki=d.createContext(null),o0=d.createContext(null),Xt=d.createContext(null),Js=d.createContext(null),_t=d.createContext({outlet:null,matches:[],isDataRoute:!1}),_d=d.createContext(null);function c0(e,t){let{relative:n}=t===void 0?{}:t;Sr()||G(!1);let{basename:s,navigator:l}=d.useContext(Xt),{hash:a,pathname:i,search:c}=$d(e,{relative:n}),o=i;return s!=="/"&&(o=i==="/"?s:Et([s,i])),l.createHref({pathname:o,search:c,hash:a})}function Sr(){return d.useContext(Js)!=null}function Cr(){return Sr()||G(!1),d.useContext(Js).location}function Od(e){d.useContext(Xt).static||d.useLayoutEffect(e)}function u0(){let{isDataRoute:e}=d.useContext(_t);return e?k0():d0()}function d0(){Sr()||G(!1);let e=d.useContext(ki),{basename:t,future:n,navigator:s}=d.useContext(Xt),{matches:l}=d.useContext(_t),{pathname:a}=Cr(),i=JSON.stringify(Rd(l,n.v7_relativeSplatPath)),c=d.useRef(!1);return Od(()=>{c.current=!0}),d.useCallback(function(u,p){if(p===void 0&&(p={}),!c.current)return;if(typeof u=="number"){s.go(u);return}let m=Td(u,JSON.parse(i),a,p.relative==="path");e==null&&t!=="/"&&(m.pathname=m.pathname==="/"?t:Et([t,m.pathname])),(p.replace?s.replace:s.push)(m,p.state,p)},[t,s,i,a,e])}function m0(){let{matches:e}=d.useContext(_t),t=e[e.length-1];return t?t.params:{}}function $d(e,t){let{relative:n}=t===void 0?{}:t,{future:s}=d.useContext(Xt),{matches:l}=d.useContext(_t),{pathname:a}=Cr(),i=JSON.stringify(Rd(l,s.v7_relativeSplatPath));return d.useMemo(()=>Td(e,JSON.parse(i),a,n==="path"),[e,i,a,n])}function h0(e,t){return f0(e,t)}function f0(e,t,n,s){Sr()||G(!1);let{navigator:l}=d.useContext(Xt),{matches:a}=d.useContext(_t),i=a[a.length-1],c=i?i.params:{};i&&i.pathname;let o=i?i.pathnameBase:"/";i&&i.route;let u=Cr(),p;if(t){var m;let b=typeof t=="string"?Rn(t):t;o==="/"||(m=b.pathname)!=null&&m.startsWith(o)||G(!1),p=b}else p=u;let g=p.pathname||"/",v=g;if(o!=="/"){let b=o.replace(/^\//,"").split("/");v="/"+g.replace(/^\//,"").split("/").slice(b.length).join("/")}let w=Af(e,{pathname:v}),N=v0(w&&w.map(b=>Object.assign({},b,{params:Object.assign({},c,b.params),pathname:Et([o,l.encodeLocation?l.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?o:Et([o,l.encodeLocation?l.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),a,n,s);return t&&N?d.createElement(Js.Provider,{value:{location:gr({pathname:"/",search:"",hash:"",state:null,key:"default"},p),navigationType:yt.Pop}},N):N}function x0(){let e=b0(),t=a0(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,l={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},a=null;return d.createElement(d.Fragment,null,d.createElement("h2",null,"Unexpected Application Error!"),d.createElement("h3",{style:{fontStyle:"italic"}},t),n?d.createElement("pre",{style:l},n):null,a)}const p0=d.createElement(x0,null);class g0 extends d.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?d.createElement(_t.Provider,{value:this.props.routeContext},d.createElement(_d.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function y0(e){let{routeContext:t,match:n,children:s}=e,l=d.useContext(ki);return l&&l.static&&l.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(l.staticContext._deepestRenderedBoundaryId=n.route.id),d.createElement(_t.Provider,{value:t},s)}function v0(e,t,n,s){var l;if(t===void 0&&(t=[]),n===void 0&&(n=null),s===void 0&&(s=null),e==null){var a;if(!n)return null;if(n.errors)e=n.matches;else if((a=s)!=null&&a.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let i=e,c=(l=n)==null?void 0:l.errors;if(c!=null){let p=i.findIndex(m=>m.route.id&&(c==null?void 0:c[m.route.id])!==void 0);p>=0||G(!1),i=i.slice(0,Math.min(i.length,p+1))}let o=!1,u=-1;if(n&&s&&s.v7_partialHydration)for(let p=0;p<i.length;p++){let m=i[p];if((m.route.HydrateFallback||m.route.hydrateFallbackElement)&&(u=p),m.route.id){let{loaderData:g,errors:v}=n,w=m.route.loader&&g[m.route.id]===void 0&&(!v||v[m.route.id]===void 0);if(m.route.lazy||w){o=!0,u>=0?i=i.slice(0,u+1):i=[i[0]];break}}}return i.reduceRight((p,m,g)=>{let v,w=!1,N=null,b=null;n&&(v=c&&m.route.id?c[m.route.id]:void 0,N=m.route.errorElement||p0,o&&(u<0&&g===0?(S0("route-fallback",!1),w=!0,b=null):u===g&&(w=!0,b=m.route.hydrateFallbackElement||null)));let x=t.concat(i.slice(0,g+1)),h=()=>{let f;return v?f=N:w?f=b:m.route.Component?f=d.createElement(m.route.Component,null):m.route.element?f=m.route.element:f=p,d.createElement(y0,{match:m,routeContext:{outlet:p,matches:x,isDataRoute:n!=null},children:f})};return n&&(m.route.ErrorBoundary||m.route.errorElement||g===0)?d.createElement(g0,{location:n.location,revalidation:n.revalidation,component:N,error:v,children:h(),routeContext:{outlet:null,matches:x,isDataRoute:!0}}):h()},null)}var Id=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Id||{}),Ts=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Ts||{});function j0(e){let t=d.useContext(ki);return t||G(!1),t}function w0(e){let t=d.useContext(o0);return t||G(!1),t}function N0(e){let t=d.useContext(_t);return t||G(!1),t}function Fd(e){let t=N0(),n=t.matches[t.matches.length-1];return n.route.id||G(!1),n.route.id}function b0(){var e;let t=d.useContext(_d),n=w0(Ts.UseRouteError),s=Fd(Ts.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[s]}function k0(){let{router:e}=j0(Id.UseNavigateStable),t=Fd(Ts.UseNavigateStable),n=d.useRef(!1);return Od(()=>{n.current=!0}),d.useCallback(function(l,a){a===void 0&&(a={}),n.current&&(typeof l=="number"?e.navigate(l):e.navigate(l,gr({fromRouteId:t},a)))},[e,t])}const Ko={};function S0(e,t,n){!t&&!Ko[e]&&(Ko[e]=!0)}function C0(e,t){e==null||e.v7_startTransition,(e==null?void 0:e.v7_relativeSplatPath)===void 0&&(!t||t.v7_relativeSplatPath),t&&(t.v7_fetcherPersist,t.v7_normalizeFormMethod,t.v7_partialHydration,t.v7_skipActionErrorRevalidation)}function ba(e){G(!1)}function E0(e){let{basename:t="/",children:n=null,location:s,navigationType:l=yt.Pop,navigator:a,static:i=!1,future:c}=e;Sr()&&G(!1);let o=t.replace(/^\/*/,"/"),u=d.useMemo(()=>({basename:o,navigator:a,static:i,future:gr({v7_relativeSplatPath:!1},c)}),[o,c,a,i]);typeof s=="string"&&(s=Rn(s));let{pathname:p="/",search:m="",hash:g="",state:v=null,key:w="default"}=s,N=d.useMemo(()=>{let b=bi(p,o);return b==null?null:{location:{pathname:b,search:m,hash:g,state:v,key:w},navigationType:l}},[o,p,m,g,v,w,l]);return N==null?null:d.createElement(Xt.Provider,{value:u},d.createElement(Js.Provider,{children:n,value:N}))}function P0(e){let{children:t,location:n}=e;return h0(ka(t),n)}new Promise(()=>{});function ka(e,t){t===void 0&&(t=[]);let n=[];return d.Children.forEach(e,(s,l)=>{if(!d.isValidElement(s))return;let a=[...t,l];if(s.type===d.Fragment){n.push.apply(n,ka(s.props.children,a));return}s.type!==ba&&G(!1),!s.props.index||!s.props.children||G(!1);let i={id:s.props.id||a.join("-"),caseSensitive:s.props.caseSensitive,element:s.props.element,Component:s.props.Component,index:s.props.index,path:s.props.path,loader:s.props.loader,action:s.props.action,errorElement:s.props.errorElement,ErrorBoundary:s.props.ErrorBoundary,hasErrorBoundary:s.props.ErrorBoundary!=null||s.props.errorElement!=null,shouldRevalidate:s.props.shouldRevalidate,handle:s.props.handle,lazy:s.props.lazy};s.props.children&&(i.children=ka(s.props.children,a)),n.push(i)}),n}/**
59
+ * React Router DOM v6.30.2
60
+ *
61
+ * Copyright (c) Remix Software Inc.
62
+ *
63
+ * This source code is licensed under the MIT license found in the
64
+ * LICENSE.md file in the root directory of this source tree.
65
+ *
66
+ * @license MIT
67
+ */function Sa(){return Sa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},Sa.apply(this,arguments)}function L0(e,t){if(e==null)return{};var n={},s=Object.keys(e),l,a;for(a=0;a<s.length;a++)l=s[a],!(t.indexOf(l)>=0)&&(n[l]=e[l]);return n}function R0(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function T0(e,t){return e.button===0&&(!t||t==="_self")&&!R0(e)}const M0=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],_0="6";try{window.__reactRouterVersion=_0}catch{}const O0="startTransition",Xo=bm[O0];function $0(e){let{basename:t,children:n,future:s,window:l}=e,a=d.useRef();a.current==null&&(a.current=If({window:l,v5Compat:!0}));let i=a.current,[c,o]=d.useState({action:i.action,location:i.location}),{v7_startTransition:u}=s||{},p=d.useCallback(m=>{u&&Xo?Xo(()=>o(m)):o(m)},[o,u]);return d.useLayoutEffect(()=>i.listen(p),[i,p]),d.useEffect(()=>C0(s),[s]),d.createElement(E0,{basename:t,children:n,location:c.location,navigationType:c.action,navigator:i,future:s})}const I0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",F0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,rt=d.forwardRef(function(t,n){let{onClick:s,relative:l,reloadDocument:a,replace:i,state:c,target:o,to:u,preventScrollReset:p,viewTransition:m}=t,g=L0(t,M0),{basename:v}=d.useContext(Xt),w,N=!1;if(typeof u=="string"&&F0.test(u)&&(w=u,I0))try{let f=new URL(window.location.href),j=u.startsWith("//")?new URL(f.protocol+u):new URL(u),S=bi(j.pathname,v);j.origin===f.origin&&S!=null?u=S+j.search+j.hash:N=!0}catch{}let b=c0(u,{relative:l}),x=D0(u,{replace:i,state:c,target:o,preventScrollReset:p,relative:l,viewTransition:m});function h(f){s&&s(f),f.defaultPrevented||x(f)}return d.createElement("a",Sa({},g,{href:w||b,onClick:N||a?s:h,ref:n,target:o}))});var Jo;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Jo||(Jo={}));var qo;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(qo||(qo={}));function D0(e,t){let{target:n,replace:s,state:l,preventScrollReset:a,relative:i,viewTransition:c}=t===void 0?{}:t,o=u0(),u=Cr(),p=$d(e,{relative:i});return d.useCallback(m=>{if(T0(m,n)){m.preventDefault();let g=s!==void 0?s:Rs(u)===Rs(p);o(e,{replace:g,state:l,preventScrollReset:a,relative:i,viewTransition:c})}},[u,o,p,s,l,n,e,a,i,c])}const Dd=[{path:"/",name:"dashboard",component:"Dashboard",title:"Dashboard",description:"Main dashboard overview",exact:!0},{path:"/packages",name:"packages",component:"PackagesOverview",title:"Packages",description:"Package management and overview",exact:!0},{path:"/packages/:name",name:"package-detail",component:"PackageDetail",title:"Package Details",description:"Detailed view of a specific package"},{path:"/dependencies",name:"dependencies",component:"DependencyGraph",title:"Dependencies",description:"Dependency graph visualization"},{path:"/health",name:"health",component:"HealthStatus",title:"Health Status",description:"Monorepo health monitoring"},{path:"/config",name:"config",component:"ConfigInspector",title:"Configuration",description:"Configuration file inspector"}];Dd.filter(e=>!e.path.includes(":")&&e.path!=="/");function A0({isOpen:e,onClose:t,children:n}){return e?r.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:r.jsx("div",{className:"bg-white rounded-lg shadow-xl w-full max-w-4xl max-h-[90vh] overflow-hidden",onClick:s=>s.stopPropagation(),children:n})}):null}function z0({title:e,titleId:t,...n},s){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},n),e?d.createElement("title",{id:t},e):null,d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 13.5 12 21m0 0-7.5-7.5M12 21V3"}))}const B0=d.forwardRef(z0),Ad=B0;function U0({title:e,titleId:t,...n},s){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},n),e?d.createElement("title",{id:t},e):null,d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 19.5 3 12m0 0 7.5-7.5M3 12h18"}))}const H0=d.forwardRef(U0),V0=H0;function W0({title:e,titleId:t,...n},s){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},n),e?d.createElement("title",{id:t},e):null,d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"}))}const Q0=d.forwardRef(W0),ot=Q0;function Y0({title:e,titleId:t,...n},s){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},n),e?d.createElement("title",{id:t},e):null,d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 4.5 21 12m0 0-7.5 7.5M21 12H3"}))}const Z0=d.forwardRef(Y0),ec=Z0;function G0({title:e,titleId:t,...n},s){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},n),e?d.createElement("title",{id:t},e):null,d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 10.5 12 3m0 0 7.5 7.5M12 3v18"}))}const K0=d.forwardRef(G0),Si=K0;function X0({title:e,titleId:t,...n},s){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},n),e?d.createElement("title",{id:t},e):null,d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.75 3.104v5.714a2.25 2.25 0 0 1-.659 1.591L5 14.5M9.75 3.104c-.251.023-.501.05-.75.082m.75-.082a24.301 24.301 0 0 1 4.5 0m0 0v5.714c0 .597.237 1.17.659 1.591L19.8 15.3M14.25 3.104c.251.023.501.05.75.082M19.8 15.3l-1.57.393A9.065 9.065 0 0 1 12 15a9.065 9.065 0 0 0-6.23-.693L5 14.5m14.8.8 1.402 1.402c1.232 1.232.65 3.318-1.067 3.611A48.309 48.309 0 0 1 12 21c-2.773 0-5.491-.235-8.135-.687-1.718-.293-2.3-2.379-1.067-3.61L5 14.5"}))}const J0=d.forwardRef(X0),q0=J0;function ex({title:e,titleId:t,...n},s){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},n),e?d.createElement("title",{id:t},e):null,d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 0 1 2.25-2.25h13.5A2.25 2.25 0 0 1 21 7.5v11.25m-18 0A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75m-18 0v-7.5A2.25 2.25 0 0 1 5.25 9h13.5A2.25 2.25 0 0 1 21 11.25v7.5"}))}const tx=d.forwardRef(ex),zd=tx;function nx({title:e,titleId:t,...n},s){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},n),e?d.createElement("title",{id:t},e):null,d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 0 1 3 19.875v-6.75ZM9.75 8.625c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125v11.25c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V8.625ZM16.5 4.125c0-.621.504-1.125 1.125-1.125h2.25C20.496 3 21 3.504 21 4.125v15.75c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V4.125Z"}))}const rx=d.forwardRef(nx),Er=rx;function sx({title:e,titleId:t,...n},s){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},n),e?d.createElement("title",{id:t},e):null,d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const lx=d.forwardRef(sx),Ke=lx;function ax({title:e,titleId:t,...n},s){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},n),e?d.createElement("title",{id:t},e):null,d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 12.75 6 6 9-13.5"}))}const ix=d.forwardRef(ax),Ci=ix;function ox({title:e,titleId:t,...n},s){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},n),e?d.createElement("title",{id:t},e):null,d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.35 3.836c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75 2.25 2.25 0 0 0-.1-.664m-5.8 0A2.251 2.251 0 0 1 13.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m8.9-4.414c.376.023.75.05 1.124.08 1.131.094 1.976 1.057 1.976 2.192V16.5A2.25 2.25 0 0 1 18 18.75h-2.25m-7.5-10.5H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V18.75m-7.5-10.5h6.375c.621 0 1.125.504 1.125 1.125v9.375m-8.25-3 1.5 1.5 3-3.75"}))}const cx=d.forwardRef(ox),tc=cx;function ux({title:e,titleId:t,...n},s){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},n),e?d.createElement("title",{id:t},e):null,d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.666 3.888A2.25 2.25 0 0 0 13.5 2.25h-3c-1.03 0-1.9.693-2.166 1.638m7.332 0c.055.194.084.4.084.612v0a.75.75 0 0 1-.75.75H9a.75.75 0 0 1-.75-.75v0c0-.212.03-.418.084-.612m7.332 0c.646.049 1.288.11 1.927.184 1.1.128 1.907 1.077 1.907 2.185V19.5a2.25 2.25 0 0 1-2.25 2.25H6.75A2.25 2.25 0 0 1 4.5 19.5V6.257c0-1.108.806-2.057 1.907-2.185a48.208 48.208 0 0 1 1.927-.184"}))}const dx=d.forwardRef(ux),nc=dx;function mx({title:e,titleId:t,...n},s){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},n),e?d.createElement("title",{id:t},e):null,d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const hx=d.forwardRef(mx),ct=hx;function fx({title:e,titleId:t,...n},s){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},n),e?d.createElement("title",{id:t},e):null,d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 16.5V9.75m0 0 3 3m-3-3-3 3M6.75 19.5a4.5 4.5 0 0 1-1.41-8.775 5.25 5.25 0 0 1 10.233-2.33 3 3 0 0 1 3.758 3.848A3.752 3.752 0 0 1 18 19.5H6.75Z"}))}const xx=d.forwardRef(fx),px=xx;function gx({title:e,titleId:t,...n},s){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},n),e?d.createElement("title",{id:t},e):null,d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28Z"}),d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}))}const yx=d.forwardRef(gx),Ms=yx;function vx({title:e,titleId:t,...n},s){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},n),e?d.createElement("title",{id:t},e):null,d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12a7.5 7.5 0 0 0 15 0m-15 0a7.5 7.5 0 1 1 15 0m-15 0H3m16.5 0H21m-1.5 0H12m-8.457 3.077 1.41-.513m14.095-5.13 1.41-.513M5.106 17.785l1.15-.964m11.49-9.642 1.149-.964M7.501 19.795l.75-1.3m7.5-12.99.75-1.3m-6.063 16.658.26-1.477m2.605-14.772.26-1.477m0 17.726-.26-1.477M10.698 4.614l-.26-1.477M16.5 19.794l-.75-1.299M7.5 4.205 12 12m6.894 5.785-1.149-.964M6.256 7.178l-1.15-.964m15.352 8.864-1.41-.513M4.954 9.435l-1.41-.514M12.002 12l-3.75 6.495"}))}const jx=d.forwardRef(vx),Bd=jx;function wx({title:e,titleId:t,...n},s){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},n),e?d.createElement("title",{id:t},e):null,d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 3v1.5M4.5 8.25H3m18 0h-1.5M4.5 12H3m18 0h-1.5m-15 3.75H3m18 0h-1.5M8.25 19.5V21M12 3v1.5m0 15V21m3.75-18v1.5m0 15V21m-9-1.5h10.5a2.25 2.25 0 0 0 2.25-2.25V6.75a2.25 2.25 0 0 0-2.25-2.25H6.75A2.25 2.25 0 0 0 4.5 6.75v10.5a2.25 2.25 0 0 0 2.25 2.25Zm.75-12h9v9h-9v-9Z"}))}const Nx=d.forwardRef(wx),bx=Nx;function kx({title:e,titleId:t,...n},s){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},n),e?d.createElement("title",{id:t},e):null,d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 7.5-9-5.25L3 7.5m18 0-9 5.25m9-5.25v9l-9 5.25M3 7.5l9 5.25M3 7.5v9l9 5.25m0-9v9"}))}const Sx=d.forwardRef(kx),qs=Sx;function Cx({title:e,titleId:t,...n},s){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},n),e?d.createElement("title",{id:t},e):null,d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.125 2.25h-4.5c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125v-9M10.125 2.25h.375a9 9 0 0 1 9 9v.375M10.125 2.25A3.375 3.375 0 0 1 13.5 5.625v1.5c0 .621.504 1.125 1.125 1.125h1.5a3.375 3.375 0 0 1 3.375 3.375M9 15l2.25 2.25L15 12"}))}const Ex=d.forwardRef(Cx),Px=Ex;function Lx({title:e,titleId:t,...n},s){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},n),e?d.createElement("title",{id:t},e):null,d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 17.25v3.375c0 .621-.504 1.125-1.125 1.125h-9.75a1.125 1.125 0 0 1-1.125-1.125V7.875c0-.621.504-1.125 1.125-1.125H6.75a9.06 9.06 0 0 1 1.5.124m7.5 10.376h3.375c.621 0 1.125-.504 1.125-1.125V11.25c0-4.46-3.243-8.161-7.5-8.876a9.06 9.06 0 0 0-1.5-.124H9.375c-.621 0-1.125.504-1.125 1.125v3.5m7.5 10.375H9.375a1.125 1.125 0 0 1-1.125-1.125v-9.25m12 6.625v-1.875a3.375 3.375 0 0 0-3.375-3.375h-1.5a1.125 1.125 0 0 1-1.125-1.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H9.75"}))}const Rx=d.forwardRef(Lx),Tx=Rx;function Mx({title:e,titleId:t,...n},s){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},n),e?d.createElement("title",{id:t},e):null,d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"}))}const _x=d.forwardRef(Mx),Ei=_x;function Ox({title:e,titleId:t,...n},s){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},n),e?d.createElement("title",{id:t},e):null,d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z"}))}const $x=d.forwardRef(Ox),te=$x;function Ix({title:e,titleId:t,...n},s){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},n),e?d.createElement("title",{id:t},e):null,d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.98 8.223A10.477 10.477 0 0 0 1.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.451 10.451 0 0 1 12 4.5c4.756 0 8.773 3.162 10.065 7.498a10.522 10.522 0 0 1-4.293 5.774M6.228 6.228 3 3m3.228 3.228 3.65 3.65m7.894 7.894L21 21m-3.228-3.228-3.65-3.65m0 0a3 3 0 1 0-4.243-4.243m4.242 4.242L9.88 9.88"}))}const Fx=d.forwardRef(Ix),Dx=Fx;function Ax({title:e,titleId:t,...n},s){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},n),e?d.createElement("title",{id:t},e):null,d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z"}),d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}))}const zx=d.forwardRef(Ax),Bx=zx;function Ux({title:e,titleId:t,...n},s){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},n),e?d.createElement("title",{id:t},e):null,d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 3c2.755 0 5.455.232 8.083.678.533.09.917.556.917 1.096v1.044a2.25 2.25 0 0 1-.659 1.591l-5.432 5.432a2.25 2.25 0 0 0-.659 1.591v2.927a2.25 2.25 0 0 1-1.244 2.013L9.75 21v-6.568a2.25 2.25 0 0 0-.659-1.591L3.659 7.409A2.25 2.25 0 0 1 3 5.818V4.774c0-.54.384-1.006.917-1.096A48.32 48.32 0 0 1 12 3Z"}))}const Hx=d.forwardRef(Ux),el=Hx;function Vx({title:e,titleId:t,...n},s){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},n),e?d.createElement("title",{id:t},e):null,d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 8.25c0-2.485-2.099-4.5-4.688-4.5-1.935 0-3.597 1.126-4.312 2.733-.715-1.607-2.377-2.733-4.313-2.733C5.1 3.75 3 5.765 3 8.25c0 7.22 9 12 9 12s9-4.78 9-12Z"}))}const Wx=d.forwardRef(Vx),Ud=Wx;function Qx({title:e,titleId:t,...n},s){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},n),e?d.createElement("title",{id:t},e):null,d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m2.25 12 8.954-8.955c.44-.439 1.152-.439 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25"}))}const Yx=d.forwardRef(Qx),Zx=Yx;function Gx({title:e,titleId:t,...n},s){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},n),e?d.createElement("title",{id:t},e):null,d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z"}))}const Kx=d.forwardRef(Gx),vn=Kx;function Xx({title:e,titleId:t,...n},s){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},n),e?d.createElement("title",{id:t},e):null,d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 6.75h12M8.25 12h12m-12 5.25h12M3.75 6.75h.007v.008H3.75V6.75Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0ZM3.75 12h.007v.008H3.75V12Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm-.375 5.25h.007v.008H3.75v-.008Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z"}))}const Jx=d.forwardRef(Xx),qx=Jx;function ep({title:e,titleId:t,...n},s){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},n),e?d.createElement("title",{id:t},e):null,d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607ZM13.5 10.5h-6"}))}const tp=d.forwardRef(ep),np=tp;function rp({title:e,titleId:t,...n},s){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},n),e?d.createElement("title",{id:t},e):null,d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607ZM10.5 7.5v6m3-3h-6"}))}const sp=d.forwardRef(rp),lp=sp;function ap({title:e,titleId:t,...n},s){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},n),e?d.createElement("title",{id:t},e):null,d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"}))}const ip=d.forwardRef(ap),Pi=ip;function op({title:e,titleId:t,...n},s){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},n),e?d.createElement("title",{id:t},e):null,d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 5.25v13.5m-7.5-13.5v13.5"}))}const cp=d.forwardRef(op),up=cp;function dp({title:e,titleId:t,...n},s){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},n),e?d.createElement("title",{id:t},e):null,d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L6.832 19.82a4.5 4.5 0 0 1-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 0 1 1.13-1.897L16.863 4.487Zm0 0L19.5 7.125"}))}const mp=d.forwardRef(dp),hp=mp;function fp({title:e,titleId:t,...n},s){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},n),e?d.createElement("title",{id:t},e):null,d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 5.653c0-.856.917-1.398 1.667-.986l11.54 6.347a1.125 1.125 0 0 1 0 1.972l-11.54 6.347a1.125 1.125 0 0 1-1.667-.986V5.653Z"}))}const xp=d.forwardRef(fp),Li=xp;function pp({title:e,titleId:t,...n},s){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},n),e?d.createElement("title",{id:t},e):null,d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6A2.25 2.25 0 0 1 6 3.75h2.25A2.25 2.25 0 0 1 10.5 6v2.25a2.25 2.25 0 0 1-2.25 2.25H6a2.25 2.25 0 0 1-2.25-2.25V6ZM3.75 15.75A2.25 2.25 0 0 1 6 13.5h2.25a2.25 2.25 0 0 1 2.25 2.25V18a2.25 2.25 0 0 1-2.25 2.25H6A2.25 2.25 0 0 1 3.75 18v-2.25ZM13.5 6a2.25 2.25 0 0 1 2.25-2.25H18A2.25 2.25 0 0 1 20.25 6v2.25A2.25 2.25 0 0 1 18 10.5h-2.25a2.25 2.25 0 0 1-2.25-2.25V6ZM13.5 15.75a2.25 2.25 0 0 1 2.25-2.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-2.25A2.25 2.25 0 0 1 13.5 18v-2.25Z"}))}const gp=d.forwardRef(pp),yp=gp;function vp({title:e,titleId:t,...n},s){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},n),e?d.createElement("title",{id:t},e):null,d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 7.5A2.25 2.25 0 0 1 7.5 5.25h9a2.25 2.25 0 0 1 2.25 2.25v9a2.25 2.25 0 0 1-2.25 2.25h-9a2.25 2.25 0 0 1-2.25-2.25v-9Z"}))}const jp=d.forwardRef(vp),Ca=jp;function wp({title:e,titleId:t,...n},s){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},n),e?d.createElement("title",{id:t},e):null,d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.568 3H5.25A2.25 2.25 0 0 0 3 5.25v4.318c0 .597.237 1.17.659 1.591l9.581 9.581c.699.699 1.78.872 2.607.33a18.095 18.095 0 0 0 5.223-5.223c.542-.827.369-1.908-.33-2.607L11.16 3.66A2.25 2.25 0 0 0 9.568 3Z"}),d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 6h.008v.008H6V6Z"}))}const Np=d.forwardRef(wp),Ri=Np;function bp({title:e,titleId:t,...n},s){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},n),e?d.createElement("title",{id:t},e):null,d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 6a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0ZM4.501 20.118a7.5 7.5 0 0 1 14.998 0A17.933 17.933 0 0 1 12 21.75c-2.676 0-5.216-.584-7.499-1.632Z"}))}const kp=d.forwardRef(bp),Sp=kp;function Cp({title:e,titleId:t,...n},s){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},n),e?d.createElement("title",{id:t},e):null,d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m9.75 9.75 4.5 4.5m0-4.5-4.5 4.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const Ep=d.forwardRef(Cp),Xe=Ep;function Pp({title:e,titleId:t,...n},s){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},n),e?d.createElement("title",{id:t},e):null,d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"}))}const Lp=d.forwardRef(Pp),Pr=Lp;function Rp({onSave:e,onClose:t}){return r.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-gray-200",children:[r.jsxs("div",{className:"flex items-center space-x-3",children:[r.jsx(Bd,{className:"w-6 h-6 text-gray-600"}),r.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:"Dashboard Configuration"})]}),r.jsxs("div",{className:"flex space-x-3",children:[r.jsxs("button",{onClick:e,className:"bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 flex items-center space-x-2",children:[r.jsx(Ci,{className:"w-5 h-5"}),r.jsx("span",{children:"Save"})]}),r.jsxs("button",{onClick:t,className:"bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 flex items-center space-x-2",children:[r.jsx(Pr,{className:"w-5 h-5"}),r.jsx("span",{children:"Cancel"})]})]})]})}const Tp=()=>[{id:"general",label:"General",icon:"⚙️"},{id:"features",label:"Features",icon:"🚀"},{id:"branding",label:"Branding",icon:"🎨"},{id:"monorepo",label:"Monorepo",icon:"📦"}],Mp=()=>({title:"monodog Dashboard",description:"Visual management of our monorepo packages",packageTypes:["app","lib","tool","service"],customFields:["team","priority","environment"],features:{healthChecks:!0,ciIntegration:!0,dependencyGraph:!0,publishControl:!0,searchAndFilter:!0,configurationInspector:!0},branding:{logo:"",primaryColor:"#3B82F6",secondaryColor:"#1E40AF"},monorepo:{structure:"standard",packageManager:"pnpm",directories:["apps","packages","libs"],ignorePatterns:["node_modules","dist",".git"]}}),rc=e=>{const t=Mp();return{...t,...e,features:{...t.features,...e.features},branding:{...t.branding,...e.branding},monorepo:{...t.monorepo,...e.monorepo}}},_p=e=>{var n,s,l;const t=[];return(!e.title||e.title.trim()==="")&&t.push("Dashboard title is required"),(n=e.monorepo)!=null&&n.directories&&e.monorepo.directories.length===0&&t.push("At least one package directory is required"),(s=e.branding)!=null&&s.primaryColor&&!sc(e.branding.primaryColor)&&t.push("Primary color must be a valid hex color"),(l=e.branding)!=null&&l.secondaryColor&&!sc(e.branding.secondaryColor)&&t.push("Secondary color must be a valid hex color"),{isValid:t.length===0,errors:t}},sc=e=>/^#[0-9A-F]{6}$/i.test(e),_s=e=>e.split(",").map(t=>t.trim()).filter(t=>t.length>0),Os=e=>e?e.join(", "):"",Op=e=>e.replace(/([A-Z])/g," $1").trim();function $p({activeTab:e,onTabChange:t}){const n=Tp();return r.jsx("div",{className:"border-b border-gray-200",children:r.jsx("nav",{className:"flex space-x-8 px-6",children:n.map(s=>r.jsxs("button",{onClick:()=>t(s.id),className:`py-4 px-1 border-b-2 font-medium text-sm flex items-center space-x-2 ${e===s.id?"border-blue-500 text-blue-600":"border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300"}`,children:[r.jsx("span",{children:s.icon}),r.jsx("span",{children:s.label})]},s.id))})})}function lc({config:e,onConfigChange:t}){return r.jsx("div",{className:"space-y-6",children:r.jsxs("div",{children:[r.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"General Settings"}),r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[r.jsxs("div",{children:[r.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Dashboard Title"}),r.jsx("input",{type:"text",value:e.title||"",onChange:n=>t({title:n.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",placeholder:"My Monorepo Dashboard"})]}),r.jsxs("div",{children:[r.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Description"}),r.jsx("input",{type:"text",value:e.description||"",onChange:n=>t({description:n.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",placeholder:"Visual management of our monorepo packages"})]}),r.jsxs("div",{children:[r.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Package Types"}),r.jsx("input",{type:"text",value:Os(e.packageTypes),onChange:n=>t({packageTypes:_s(n.target.value)}),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",placeholder:"app, lib, tool, service"}),r.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Comma-separated list of package types"})]}),r.jsxs("div",{children:[r.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Custom Fields"}),r.jsx("input",{type:"text",value:Os(e.customFields),onChange:n=>t({customFields:_s(n.target.value)}),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",placeholder:"team, priority, environment"}),r.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Additional fields to display for packages"})]})]})]})})}function Ip({config:e,onConfigChange:t}){const n=(s,l)=>{t({features:{...e.features,[s]:l}})};return r.jsx("div",{className:"space-y-6",children:r.jsxs("div",{children:[r.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"Feature Toggles"}),r.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:Object.entries(e.features||{}).map(([s,l])=>r.jsxs("label",{className:"flex items-center space-x-3",children:[r.jsx("input",{type:"checkbox",checked:l,onChange:a=>n(s,a.target.checked),className:"h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded"}),r.jsx("span",{className:"text-sm font-medium text-gray-700 capitalize",children:Op(s)})]},s))}),r.jsxs("div",{className:"mt-6 p-4 bg-blue-50 border border-blue-200 rounded-lg",children:[r.jsx("h4",{className:"text-sm font-medium text-blue-900 mb-2",children:"Feature Descriptions"}),r.jsxs("div",{className:"text-xs text-blue-800 space-y-1",children:[r.jsxs("div",{children:[r.jsx("strong",{children:"Health Checks:"})," Monitor package health and status"]}),r.jsxs("div",{children:[r.jsx("strong",{children:"CI Integration:"})," Connect with CI/CD providers"]}),r.jsxs("div",{children:[r.jsx("strong",{children:"Dependency Graph:"})," Visualize package dependencies"]}),r.jsxs("div",{children:[r.jsx("strong",{children:"Publish Control:"})," Manage package publishing and versioning"]}),r.jsxs("div",{children:[r.jsx("strong",{children:"Search And Filter:"})," Advanced search and filtering capabilities"]}),r.jsxs("div",{children:[r.jsx("strong",{children:"Configuration Inspector:"})," View and edit configuration files"]})]})]})]})})}function Fp({config:e,onConfigChange:t}){var s,l,a,i,c,o,u,p;const n=(m,g)=>{t({branding:{...e.branding,[m]:g}})};return r.jsx("div",{className:"space-y-6",children:r.jsxs("div",{children:[r.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"Branding & Appearance"}),r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[r.jsxs("div",{children:[r.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Logo URL"}),r.jsx("input",{type:"text",value:((s=e.branding)==null?void 0:s.logo)||"",onChange:m=>n("logo",m.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",placeholder:"https://example.com/logo.png"}),r.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"URL to your company logo"})]}),r.jsxs("div",{children:[r.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Primary Color"}),r.jsxs("div",{className:"flex items-center space-x-3",children:[r.jsx("input",{type:"color",value:((l=e.branding)==null?void 0:l.primaryColor)||"#3B82F6",onChange:m=>n("primaryColor",m.target.value),className:"h-10 w-20 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent"}),r.jsx("input",{type:"text",value:((a=e.branding)==null?void 0:a.primaryColor)||"#3B82F6",onChange:m=>n("primaryColor",m.target.value),className:"flex-1 px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",placeholder:"#3B82F6"})]}),r.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Primary brand color for buttons and accents"})]}),r.jsxs("div",{children:[r.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Secondary Color"}),r.jsxs("div",{className:"flex items-center space-x-3",children:[r.jsx("input",{type:"color",value:((i=e.branding)==null?void 0:i.secondaryColor)||"#1E40AF",onChange:m=>n("secondaryColor",m.target.value),className:"h-10 w-20 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent"}),r.jsx("input",{type:"text",value:((c=e.branding)==null?void 0:c.secondaryColor)||"#1E40AF",onChange:m=>n("secondaryColor",m.target.value),className:"flex-1 px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",placeholder:"#1E40AF"})]}),r.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Secondary color for hover states and highlights"})]})]}),r.jsxs("div",{className:"mt-6 p-4 bg-gray-50 border border-gray-200 rounded-lg",children:[r.jsx("h4",{className:"text-sm font-medium text-gray-900 mb-3",children:"Color Preview"}),r.jsxs("div",{className:"flex items-center space-x-4",children:[r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx("div",{className:"w-8 h-8 rounded-lg border border-gray-300",style:{backgroundColor:((o=e.branding)==null?void 0:o.primaryColor)||"#3B82F6"}}),r.jsx("span",{className:"text-sm text-gray-600",children:"Primary"})]}),r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx("div",{className:"w-8 h-8 rounded-lg border border-gray-300",style:{backgroundColor:((u=e.branding)==null?void 0:u.secondaryColor)||"#1E40AF"}}),r.jsx("span",{className:"text-sm text-gray-600",children:"Secondary"})]}),r.jsx("button",{className:"px-4 py-2 rounded-lg text-white text-sm font-medium",style:{backgroundColor:((p=e.branding)==null?void 0:p.primaryColor)||"#3B82F6"},children:"Sample Button"})]})]})]})})}function Dp({config:e,onConfigChange:t}){var s,l,a,i,c,o,u,p,m,g,v;const n=(w,N)=>{t({monorepo:{...e.monorepo,[w]:N}})};return r.jsx("div",{className:"space-y-6",children:r.jsxs("div",{children:[r.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"Monorepo Configuration"}),r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[r.jsxs("div",{children:[r.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Structure Type"}),r.jsxs("select",{value:((s=e.monorepo)==null?void 0:s.structure)||"standard",onChange:w=>n("structure",w.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:[r.jsx("option",{value:"standard",children:"Standard (apps/packages/libs)"}),r.jsx("option",{value:"custom",children:"Custom Structure"})]}),r.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Choose your monorepo directory structure"})]}),r.jsxs("div",{children:[r.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Package Manager"}),r.jsxs("select",{value:((l=e.monorepo)==null?void 0:l.packageManager)||"pnpm",onChange:w=>n("packageManager",w.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:[r.jsx("option",{value:"pnpm",children:"pnpm"}),r.jsx("option",{value:"npm",children:"npm"}),r.jsx("option",{value:"yarn",children:"Yarn"}),r.jsx("option",{value:"lerna",children:"Lerna"}),r.jsx("option",{value:"nx",children:"Nx"})]}),r.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Package manager used in your monorepo"})]}),r.jsxs("div",{children:[r.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Package Directories"}),r.jsx("input",{type:"text",value:Os((a=e.monorepo)==null?void 0:a.directories),onChange:w=>n("directories",_s(w.target.value)),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",placeholder:"apps, packages, libs, services"}),r.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Directories containing packages"})]}),r.jsxs("div",{children:[r.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Ignore Patterns"}),r.jsx("input",{type:"text",value:Os((i=e.monorepo)==null?void 0:i.ignorePatterns),onChange:w=>n("ignorePatterns",_s(w.target.value)),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",placeholder:"node_modules, dist, .git"}),r.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Patterns to ignore when scanning"})]})]}),r.jsxs("div",{className:"mt-6 p-4 bg-gray-50 border border-gray-200 rounded-lg",children:[r.jsx("h4",{className:"text-sm font-medium text-gray-900 mb-3",children:"Configuration Preview"}),r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 text-sm",children:[r.jsxs("div",{children:[r.jsx("span",{className:"font-medium text-gray-700",children:"Structure:"}),r.jsx("span",{className:"ml-2 text-gray-600 capitalize",children:((c=e.monorepo)==null?void 0:c.structure)||"standard"})]}),r.jsxs("div",{children:[r.jsx("span",{className:"font-medium text-gray-700",children:"Package Manager:"}),r.jsx("span",{className:"ml-2 text-gray-600",children:((o=e.monorepo)==null?void 0:o.packageManager)||"pnpm"})]}),r.jsxs("div",{children:[r.jsx("span",{className:"font-medium text-gray-700",children:"Directories:"}),r.jsxs("span",{className:"ml-2 text-gray-600",children:[((p=(u=e.monorepo)==null?void 0:u.directories)==null?void 0:p.length)||0," configured"]})]}),r.jsxs("div",{children:[r.jsx("span",{className:"font-medium text-gray-700",children:"Ignore Patterns:"}),r.jsxs("span",{className:"ml-2 text-gray-600",children:[((g=(m=e.monorepo)==null?void 0:m.ignorePatterns)==null?void 0:g.length)||0," patterns"]})]})]})]}),((v=e.monorepo)==null?void 0:v.packageManager)&&r.jsxs("div",{className:"mt-4 p-4 bg-blue-50 border border-blue-200 rounded-lg",children:[r.jsxs("h4",{className:"text-sm font-medium text-blue-900 mb-2",children:[e.monorepo.packageManager.toUpperCase()," Configuration Tips"]}),r.jsxs("div",{className:"text-xs text-blue-800",children:[e.monorepo.packageManager==="pnpm"&&r.jsx("p",{children:"Make sure you have a pnpm-workspace.yaml file in your root directory."}),e.monorepo.packageManager==="npm"&&r.jsx("p",{children:'Configure workspaces in your package.json with the "workspaces" field.'}),e.monorepo.packageManager==="yarn"&&r.jsx("p",{children:"Ensure you have workspaces configured in your package.json."}),e.monorepo.packageManager==="lerna"&&r.jsx("p",{children:"Make sure you have a lerna.json configuration file in your root."}),e.monorepo.packageManager==="nx"&&r.jsx("p",{children:"Ensure you have an nx.json configuration file in your workspace root."})]})]})]})})}function Ap({isOpen:e,onClose:t,onSave:n,currentConfig:s}){const[l,a]=d.useState(rc(s)),[i,c]=d.useState("general");d.useEffect(()=>{a(rc(s))},[s]);const o=()=>{const m=_p(l);m.isValid||console.warn("Configuration validation errors:",m.errors),n(l),t()},u=m=>{a(g=>({...g,...m}))},p=()=>{const m={config:l,onConfigChange:u};switch(i){case"general":return r.jsx(lc,{...m});case"features":return r.jsx(Ip,{...m});case"branding":return r.jsx(Fp,{...m});case"monorepo":return r.jsx(Dp,{...m});default:return r.jsx(lc,{...m})}};return r.jsxs(A0,{isOpen:e,onClose:t,children:[r.jsx(Rp,{onSave:o,onClose:t}),r.jsx($p,{activeTab:i,onTabChange:c}),r.jsx("div",{className:"p-6 overflow-y-auto max-h-[60vh]",children:p()})]})}function zp({isOpen:e,onClose:t,children:n}){return e?r.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center p-4 z-50",children:r.jsx("div",{className:"bg-white rounded-lg shadow-xl max-w-2xl w-full max-h-[90vh] overflow-hidden",onClick:s=>s.stopPropagation(),children:n})}):null}function Bp({onClose:e}){return r.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-gray-200",children:[r.jsxs("div",{children:[r.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:"Setup Guide"}),r.jsx("p",{className:"text-sm text-gray-600 mt-1",children:"Configure your monorepo dashboard for optimal performance"})]}),r.jsx("button",{onClick:e,className:"text-gray-400 hover:text-gray-600 transition-colors",children:r.jsx(Pr,{className:"w-6 h-6"})})]})}function Up({progress:e}){const{currentStep:t,totalSteps:n,completedSteps:s}=e,l=(t+1)/n*100;return r.jsxs("div",{className:"px-6 py-4 border-b border-gray-200",children:[r.jsxs("div",{className:"flex items-center justify-between mb-2",children:[r.jsxs("span",{className:"text-sm font-medium text-gray-700",children:["Step ",t+1," of ",n]}),r.jsxs("span",{className:"text-sm text-gray-500",children:[s," completed"]})]}),r.jsx("div",{className:"w-full bg-gray-200 rounded-full h-2",children:r.jsx("div",{className:"bg-blue-600 h-2 rounded-full transition-all duration-300",style:{width:`${l}%`}})})]})}function Hp({step:e,onStepComplete:t}){const n=()=>{switch(e.id){case"monorepo-structure":return r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4",children:[r.jsx("h4",{className:"font-medium text-blue-900 mb-2",children:"Quick Setup"}),r.jsx("p",{className:"text-blue-800 text-sm mb-3",children:"Choose your monorepo structure to get started quickly:"}),r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[r.jsxs("button",{onClick:()=>t(e.id),className:"p-3 border border-blue-300 rounded-lg hover:bg-blue-100 text-left",children:[r.jsx("div",{className:"font-medium text-blue-900",children:"Standard Structure"}),r.jsx("div",{className:"text-sm text-blue-700",children:"apps/, packages/, libs/"})]}),r.jsxs("button",{onClick:()=>t(e.id),className:"p-3 border border-blue-300 rounded-lg hover:bg-blue-100 text-left",children:[r.jsx("div",{className:"font-medium text-blue-900",children:"Custom Structure"}),r.jsx("div",{className:"text-sm text-blue-700",children:"Define your own directories"})]})]})]}),r.jsxs("div",{className:"bg-gray-50 border border-gray-200 rounded-lg p-4",children:[r.jsx("h4",{className:"font-medium text-gray-900 mb-2",children:"Manual Configuration"}),r.jsxs("div",{className:"space-y-3",children:[r.jsxs("div",{children:[r.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Root Directory"}),r.jsx("input",{type:"text",defaultValue:"/path/to/monorepo",className:"w-full px-3 py-2 border border-gray-300 rounded-md text-sm"})]}),r.jsxs("div",{children:[r.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Package Manager"}),r.jsxs("select",{className:"w-full px-3 py-2 border border-gray-300 rounded-md text-sm",children:[r.jsx("option",{value:"pnpm",children:"pnpm"}),r.jsx("option",{value:"npm",children:"npm"}),r.jsx("option",{value:"yarn",children:"yarn"})]})]})]})]})]});case"package-scanning":return r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"bg-green-50 border border-green-200 rounded-lg p-4",children:[r.jsx("h4",{className:"font-medium text-green-900 mb-2",children:"Automatic Discovery"}),r.jsx("p",{className:"text-green-800 text-sm mb-3",children:"We'll scan your monorepo for packages automatically:"}),r.jsx("button",{onClick:()=>t(e.id),className:"bg-green-600 text-white px-4 py-2 rounded-lg hover:bg-green-700 text-sm",children:"Start Package Scan"})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsxs("div",{className:"flex items-center text-sm text-gray-600",children:[r.jsx(vn,{className:"w-4 h-4 mr-2"}),"Scans for package.json files"]}),r.jsxs("div",{className:"flex items-center text-sm text-gray-600",children:[r.jsx(vn,{className:"w-4 h-4 mr-2"}),"Analyzes dependencies and relationships"]}),r.jsxs("div",{className:"flex items-center text-sm text-gray-600",children:[r.jsx(vn,{className:"w-4 h-4 mr-2"}),"Detects build configurations"]})]})]});case"ci-integration":return r.jsx("div",{className:"space-y-4",children:r.jsxs("div",{className:"bg-purple-50 border border-purple-200 rounded-lg p-4",children:[r.jsx("h4",{className:"font-medium text-purple-900 mb-2",children:"Connect CI/CD"}),r.jsx("p",{className:"text-purple-800 text-sm mb-3",children:"Choose your CI/CD provider to monitor builds and deployments:"}),r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[r.jsxs("button",{onClick:()=>t(e.id),className:"p-3 border border-purple-300 rounded-lg hover:bg-purple-100 text-left",children:[r.jsx("div",{className:"font-medium text-purple-900",children:"GitHub Actions"}),r.jsx("div",{className:"text-sm text-purple-700",children:"Connect with GitHub"})]}),r.jsxs("button",{onClick:()=>t(e.id),className:"p-3 border border-purple-300 rounded-lg hover:bg-purple-100 text-left",children:[r.jsx("div",{className:"font-medium text-purple-900",children:"GitLab CI"}),r.jsx("div",{className:"text-sm text-purple-700",children:"Connect with GitLab"})]}),r.jsxs("button",{onClick:()=>t(e.id),className:"p-3 border border-purple-300 rounded-lg hover:bg-purple-100 text-left",children:[r.jsx("div",{className:"font-medium text-purple-900",children:"Jenkins"}),r.jsx("div",{className:"text-sm text-purple-700",children:"Connect with Jenkins"})]}),r.jsxs("button",{onClick:()=>t(e.id),className:"p-3 border border-purple-300 rounded-lg hover:bg-purple-100 text-left",children:[r.jsx("div",{className:"font-medium text-purple-900",children:"Skip for now"}),r.jsx("div",{className:"text-sm text-purple-700",children:"Configure later"})]})]})]})});case"health-checks":return r.jsx("div",{className:"space-y-4",children:r.jsxs("div",{className:"bg-orange-50 border border-orange-200 rounded-lg p-4",children:[r.jsx("h4",{className:"font-medium text-orange-900 mb-2",children:"Health Monitoring"}),r.jsx("p",{className:"text-orange-800 text-sm mb-3",children:"Configure how we monitor your package health:"}),r.jsxs("div",{className:"space-y-3",children:[r.jsxs("label",{className:"flex items-center",children:[r.jsx("input",{type:"checkbox",className:"mr-2",defaultChecked:!0}),r.jsx("span",{className:"text-sm text-orange-900",children:"Monitor build status"})]}),r.jsxs("label",{className:"flex items-center",children:[r.jsx("input",{type:"checkbox",className:"mr-2",defaultChecked:!0}),r.jsx("span",{className:"text-sm text-orange-900",children:"Track test coverage"})]}),r.jsxs("label",{className:"flex items-center",children:[r.jsx("input",{type:"checkbox",className:"mr-2"}),r.jsx("span",{className:"text-sm text-orange-900",children:"Dependency vulnerability scanning"})]}),r.jsxs("label",{className:"flex items-center",children:[r.jsx("input",{type:"checkbox",className:"mr-2"}),r.jsx("span",{className:"text-sm text-orange-900",children:"Performance monitoring"})]})]}),r.jsx("button",{onClick:()=>t(e.id),className:"mt-3 bg-orange-600 text-white px-4 py-2 rounded-lg hover:bg-orange-700 text-sm",children:"Save Settings"})]})});case"notifications":return r.jsx("div",{className:"space-y-4",children:r.jsxs("div",{className:"bg-indigo-50 border border-indigo-200 rounded-lg p-4",children:[r.jsx("h4",{className:"font-medium text-indigo-900 mb-2",children:"Notification Preferences"}),r.jsx("p",{className:"text-indigo-800 text-sm mb-3",children:"Choose how you want to be notified about important events:"}),r.jsxs("div",{className:"space-y-3",children:[r.jsxs("label",{className:"flex items-center",children:[r.jsx("input",{type:"checkbox",className:"mr-2",defaultChecked:!0}),r.jsx("span",{className:"text-sm text-indigo-900",children:"Build failures"})]}),r.jsxs("label",{className:"flex items-center",children:[r.jsx("input",{type:"checkbox",className:"mr-2"}),r.jsx("span",{className:"text-sm text-indigo-900",children:"Security vulnerabilities"})]}),r.jsxs("label",{className:"flex items-center",children:[r.jsx("input",{type:"checkbox",className:"mr-2"}),r.jsx("span",{className:"text-sm text-indigo-900",children:"Dependency updates"})]}),r.jsxs("label",{className:"flex items-center",children:[r.jsx("input",{type:"checkbox",className:"mr-2"}),r.jsx("span",{className:"text-sm text-indigo-900",children:"Performance degradation"})]})]}),r.jsx("button",{onClick:()=>t(e.id),className:"mt-3 bg-indigo-600 text-white px-4 py-2 rounded-lg hover:bg-indigo-700 text-sm",children:"Save Preferences"})]})});default:return r.jsx("div",{className:"text-center py-8",children:r.jsx("p",{className:"text-gray-500",children:"Step content not found"})})}};return r.jsxs("div",{className:"p-6 overflow-y-auto max-h-[50vh]",children:[r.jsxs("div",{className:"mb-6",children:[r.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:e.title}),r.jsx("p",{className:"text-gray-600 mb-4",children:e.description})]}),n()]})}function Vp({currentStep:e,totalSteps:t,canGoNext:n,canGoPrevious:s,onNext:l,onPrevious:a,onComplete:i,isLastStep:c}){return r.jsxs("div",{className:"flex items-center justify-between p-6 border-t border-gray-200",children:[r.jsx("button",{onClick:a,disabled:!s,className:`px-4 py-2 text-sm rounded-lg border transition-colors ${s?"border-gray-300 text-gray-700 hover:bg-gray-50":"border-gray-200 text-gray-400 cursor-not-allowed"}`,children:"Previous"}),r.jsx("div",{className:"flex space-x-2",children:Array.from({length:t},(o,u)=>r.jsx("div",{className:`w-2 h-2 rounded-full transition-colors ${u<=e?"bg-blue-600":"bg-gray-300"}`},u))}),c?r.jsxs("button",{onClick:i,className:"bg-green-600 text-white px-4 py-2 rounded-lg hover:bg-green-700 flex items-center space-x-2 text-sm",children:[r.jsx(Ci,{className:"w-4 h-4"}),r.jsx("span",{children:"Complete Setup"})]}):r.jsx("button",{onClick:l,disabled:!n,className:`px-4 py-2 text-sm rounded-lg transition-colors ${n?"bg-blue-600 text-white hover:bg-blue-700":"bg-gray-300 text-gray-500 cursor-not-allowed"}`,children:"Next"})]})}const Wp=()=>[{id:"monorepo-structure",title:"Monorepo Structure",description:"Configure your monorepo directory structure and package manager",completed:!1,required:!0},{id:"package-scanning",title:"Package Scanning",description:"Set up automatic package discovery and dependency analysis",completed:!1,required:!0},{id:"ci-integration",title:"CI/CD Integration",description:"Connect with your CI/CD providers (GitHub Actions, GitLab CI, etc.)",completed:!1,required:!1},{id:"health-checks",title:"Health Monitoring",description:"Configure package health checks and status monitoring",completed:!1,required:!1},{id:"notifications",title:"Notifications",description:"Set up alerts and notifications for important events",completed:!1,required:!1}],Qp=(e,t)=>({currentStep:t,totalSteps:e.length,completedSteps:e.filter(n=>n.completed).length}),Yp=(e,t)=>{const n=e[t];return!n.required||n.completed},Zp=e=>e.filter(n=>n.required).every(n=>n.completed),Gp=(e,t)=>e.map(n=>n.id===t?{...n,completed:!0}:n);function Kp({isOpen:e,onClose:t,onComplete:n}){const[s,l]=d.useState(0),[a,i]=d.useState(Wp()),c=b=>{const x=Gp(a,b);i(x),x[s].completed&&s<a.length-1&&l(f=>f+1)},o=()=>{s<a.length-1&&l(b=>b+1)},u=()=>{s>0&&l(b=>b-1)},p=()=>{Zp(a)&&(n(),t())},m=Qp(a,s),g=Yp(a,s),v=s>0,w=s===a.length-1,N=a[s];return r.jsxs(zp,{isOpen:e,onClose:t,children:[r.jsx(Bp,{onClose:t}),r.jsx(Up,{progress:m}),r.jsx(Hp,{step:N,onStepComplete:c}),r.jsx(Vp,{currentStep:s,totalSteps:a.length,canGoNext:g,canGoPrevious:v,onNext:o,onPrevious:u,onComplete:p,isLastStep:w})]})}function Xp({config:e,onShowSetupGuide:t,onShowConfig:n,onRefresh:s}){return r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"text-heading text-3xl",children:e.title}),r.jsx("p",{className:"text-body mt-2",children:e.description}),r.jsx("button",{onClick:t,className:"hidden text-primary-600 hover:text-primary-700 text-sm font-medium mt-2",children:"🚀 First time? Run the setup guide"})]}),r.jsxs("div",{className:"flex space-x-3",children:[r.jsxs("button",{onClick:s,className:"btn-primary flex items-center space-x-2",children:[r.jsx(ot,{className:"w-5 h-5"}),r.jsx("span",{children:"Refresh"})]}),r.jsxs("button",{onClick:n,className:"hidden btn-ghost flex items-center space-x-2",children:[r.jsx(Bd,{className:"w-5 h-5"}),r.jsx("span",{children:"Configure"})]})]})]})}function Jp({stats:e}){return r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6",children:[r.jsx("div",{className:"card p-6",children:r.jsxs("div",{className:"flex items-center",children:[r.jsx("div",{className:"p-2 bg-primary-100 rounded-lg",children:r.jsx(qs,{className:"w-6 h-6 text-primary-600"})}),r.jsxs("div",{className:"ml-4",children:[r.jsx("p",{className:"text-caption font-medium",children:"Total Packages"}),r.jsx("p",{className:"text-heading text-2xl",children:e.total})]})]})}),r.jsx("div",{className:"card p-6",children:r.jsxs("div",{className:"flex items-center",children:[r.jsx("div",{className:"p-2 bg-secondary-100 rounded-lg",children:r.jsx("span",{className:"text-2xl",children:"🚀"})}),r.jsxs("div",{className:"ml-4",children:[r.jsx("p",{className:"text-caption font-medium",children:"Applications"}),r.jsx("p",{className:"text-heading text-2xl",children:e.apps})]})]})}),r.jsx("div",{className:"card p-6",children:r.jsxs("div",{className:"flex items-center",children:[r.jsx("div",{className:"p-2 bg-accent-100 rounded-lg",children:r.jsx("span",{className:"text-2xl",children:"📚"})}),r.jsxs("div",{className:"ml-4",children:[r.jsx("p",{className:"text-caption font-medium",children:"Libraries"}),r.jsx("p",{className:"text-heading text-2xl",children:e.libs})]})]})}),r.jsx("div",{className:"card p-6",children:r.jsxs("div",{className:"flex items-center",children:[r.jsx("div",{className:"p-2 bg-info-100 rounded-lg",children:r.jsx("span",{className:"text-2xl",children:"🔗"})}),r.jsxs("div",{className:"ml-4",children:[r.jsx("p",{className:"text-caption font-medium",children:"Dependencies"}),r.jsx("p",{className:"text-heading text-2xl",children:e.totalDependencies})]})]})})]})}function qp({packages:e,packageTypes:t,getTypeIcon:n}){return r.jsxs("div",{className:"bg-white p-6 rounded-lg shadow border",children:[r.jsx("h3",{className:"text-lg font-semibold text-gray-900 mb-4",children:"Package Distribution"}),r.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:t.map(s=>r.jsxs("div",{className:"text-center p-4 bg-gray-50 rounded-lg",children:[r.jsx("div",{className:"text-3xl mb-2",children:n(s)}),r.jsx("div",{className:"text-sm font-medium text-gray-600 capitalize",children:s}),r.jsx("div",{className:"text-2xl font-bold text-gray-900",children:e.filter(l=>l.type===s).length})]},s))})]})}function eg(){return r.jsxs("div",{className:"bg-white p-6 rounded-lg shadow border",children:[r.jsx("h3",{className:"text-lg font-semibold text-gray-900 mb-4",children:"Quick Actions"}),r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[r.jsx(rt,{to:"/dependencies",className:"p-4 border border-gray-200 rounded-lg hover:border-blue-300 hover:bg-blue-50 transition-colors",children:r.jsxs("div",{className:"flex items-center space-x-3",children:[r.jsx("div",{className:"p-2 bg-blue-100 rounded-lg",children:r.jsx(Er,{className:"w-6 h-6 text-blue-600"})}),r.jsxs("div",{children:[r.jsx("h4",{className:"font-medium text-gray-900",children:"Dependency Graph"}),r.jsx("p",{className:"text-sm text-gray-600",children:"Visualize package relationships"})]})]})}),r.jsx(rt,{to:"/health",className:"p-4 border border-gray-200 rounded-lg hover:border-green-300 hover:bg-green-50 transition-colors",children:r.jsxs("div",{className:"flex items-center space-x-3",children:[r.jsx("div",{className:"p-2 bg-green-100 rounded-lg",children:r.jsx("span",{className:"text-2xl",children:"🏥"})}),r.jsxs("div",{children:[r.jsx("h4",{className:"font-medium text-gray-900",children:"Health Check"}),r.jsx("p",{className:"text-sm text-gray-600",children:"Monitor package health"})]})]})}),r.jsx(rt,{to:"/ci",className:"p-4 border border-gray-200 rounded-lg hover:border-purple-300 hover:bg-purple-50 transition-colors",children:r.jsxs("div",{className:"flex items-center space-x-3",children:[r.jsx("div",{className:"p-2 bg-purple-100 rounded-lg",children:r.jsx("span",{className:"text-2xl",children:"🧪"})}),r.jsxs("div",{children:[r.jsx("h4",{className:"font-medium text-gray-900",children:"CI/CD Status"}),r.jsx("p",{className:"text-sm text-gray-600",children:"View build status"})]})]})})]})]})}function tg({searchTerm:e,selectedType:t,packageTypes:n,onSearchChange:s,onTypeChange:l}){return r.jsxs("div",{className:"flex flex-col md:flex-row gap-4 mb-6",children:[r.jsxs("div",{className:"flex-1 relative",children:[r.jsx(Pi,{className:"w-5 h-5 absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400"}),r.jsx("input",{type:"text",placeholder:"Search packages...",value:e,onChange:a=>s(a.target.value),className:"w-full pl-10 pr-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent"})]}),r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx(el,{className:"w-5 h-5 text-gray-400"}),r.jsxs("select",{value:t,onChange:a=>l(a.target.value),className:"px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:[r.jsx("option",{value:"all",children:"All Types"}),n.map(a=>r.jsx("option",{value:a,className:"capitalize",children:a},a))]})]})]})}function ng({packages:e,getTypeIcon:t,getStatusColor:n}){return r.jsx("div",{className:"overflow-x-auto",children:r.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[r.jsx("thead",{className:"bg-gray-50",children:r.jsxs("tr",{children:[r.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Package"}),r.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Type"}),r.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Version"}),r.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Dependencies"}),r.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Description"}),r.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Actions"})]})}),r.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:e.map(s=>r.jsxs("tr",{className:"hover:bg-gray-50",children:[r.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:r.jsxs("div",{className:"flex items-center",children:[r.jsx("div",{className:"text-2xl mr-3",children:t(s.type)}),r.jsxs("div",{children:[r.jsx("div",{className:"text-sm font-medium text-gray-900",children:s.name}),r.jsx("div",{className:"text-sm text-gray-500",children:s.path})]})]})}),r.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:r.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${n(s.type)}`,children:s.type})}),r.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-900",children:s.version}),r.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-900",children:Object.keys(s.dependencies).length+Object.keys(s.devDependencies).length+Object.keys(s.peerDependencies).length}),r.jsx("td",{className:"px-6 py-4 text-sm text-gray-900 max-w-xs truncate",children:s.description||"No description"}),r.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium",children:r.jsx(rt,{to:`/packages/${encodeURIComponent(s.name)}`,className:"text-blue-600 hover:text-blue-500",children:"View Details"})})]},s.name))})]})})}var xc;const rg=((xc=window.ENV)==null?void 0:xc.API_URL)??"localhost:8999",We=`http://${rg}/api`;class sg{constructor(){this.mockPackages=[]}async getPackages(){try{const t=await fetch(`${We}/packages`);if(t.ok)return await t.json();console.error(`getPackages: initial fetch failed with status ${t.status}. Attempting refresh...`);try{return await this.refreshPackages()}catch(n){return console.error("getPackages: refresh failed",n),[]}}catch(t){return console.error("getPackages: unexpected error",t),[]}}async getPackage(t){const n=await fetch(`${We}/packages/`+encodeURIComponent(t));if(!n.ok)throw new Error(`Failed to fetch package details for "${t}" (Status: ${n.status})`);return await n.json()}async getDependencies(){await new Promise(n=>setTimeout(n,200));const t=new Set;try{return(await this.getPackages()).forEach(l=>{var a;(a=l.dependencies)==null||a.forEach(i=>t.add(i))}),Array.from(t).map(l=>({name:l,version:"unknown",type:"dependency",status:"active"}))}catch(n){return console.error("Error fetching dependencies:",n),[]}}async refreshPackages(){try{const t=await fetch(`${We}/packages/refresh`);if(!t.ok)return console.error(`refreshPackages: fetch failed with status ${t.status}`),[];const n=await t.json();return console.log("data from refreshPackage:",n),n}catch(t){return console.error("refreshPackages: unexpected error",t),[]}}async getHealthStatus(){console.log("getHealthStatus");try{const t=await fetch(`${We}/health/packages`);if(console.log("Health data from getHealthStatus:",t),!t.ok){if(console.log("Health data not available, attempting refresh..."),!(await fetch(`${We}/health/refresh`,{method:"POST",headers:{"Content-Type":"application/json"}})).ok)throw new Error("Failed to refresh health data");await new Promise(i=>setTimeout(i,1e3));const l=await fetch(`${We}/health/packages`);if(!l.ok)throw new Error("Failed to fetch health data after refresh");const a=await l.json();return console.log("Health data after refresh:",a),a}const n=await t.json();return console.log("Health data from getHealthStatus:",n),n}catch(t){console.error("Error fetching health data:",t)}}async refreshHealthStatus(){try{const t=await fetch(`${We}/health/refresh`);if(!t.ok)throw new Error("Failed to fetch health data");const n=await t.json();return console.log("Health data from refreshHealthStatus:",n),n}catch(t){console.error("Error fetching health data:",t)}}async getFallbackHealthStatus(){await new Promise(l=>setTimeout(l,400));const t=[{name:"Package Count",value:this.mockPackages.length,status:"healthy",description:`${this.mockPackages.length} packages in monorepo`},{name:"Dependency Health",value:85,status:"healthy",description:"Dependencies are up to date"},{name:"Build Status",value:95,status:"healthy",description:"Most builds are successful"}],n=this.mockPackages.map(l=>({package:l.name,score:l.status==="healthy"?90:l.status==="warning"?70:50,issues:l.status==="healthy"?[]:["Needs attention"]}));return{overallScore:85,metrics:t,packageHealth:n}}async updatePackageConfiguration(t,n,s){try{console.log("📤 Updating package configuration via MonorepoService:",t);const l=await fetch(`${We}/packages/update`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({packageName:t,config:n,packagePath:s})});if(console.log("📥 Response status:",l.status),!l.ok){const i=await l.text();console.error("📥 Error response:",i);let c=`HTTP error ${l.status}`;if(i)try{const o=JSON.parse(i);c=o.error||o.message||c}catch{c=i||c}throw new Error(c)}const a=await l.json();return console.log("📥 Success response:",a),a}catch(l){throw console.error("❌ Error updating package configuration:",l),l}}async getBuildStatus(){await new Promise(n=>setTimeout(n,500));const t=[];for(const n of this.mockPackages){const s=n.scripts&&n.scripts.build,l=n.scripts&&n.scripts.test;if(s||l){const a=new Date(Date.now()-Math.random()*864e5).toISOString(),i=Math.random()>.8?"failed":Math.random()>.6?"building":Math.random()>.4?"queued":"success";t.push({id:`build-${n.name}-${Date.now()}`,package:n.name,status:i,startTime:a,endTime:i!=="building"?new Date(Date.now()-Math.random()*36e5).toISOString():void 0,duration:i!=="building"?Math.floor(Math.random()*300)+60:void 0,stages:this.generateBuildStages(n,i)})}}return t}async getConfigurationFiles(){try{console.log("Fetching configuration files from backend...");const t=await fetch(`${We}/config/files`);if(!t.ok)throw new Error(`Failed to fetch config files: ${t.status} ${t.statusText}`);const n=await t.json();if(console.log("Response from config files API:",n),n.success&&n.files)return console.log(`Successfully fetched ${n.files.length} configuration files`),n.files;throw new Error("Invalid response format from config files API")}catch(t){return console.error("Error fetching configuration files from backend:",t),console.log("Returning empty config files list due to error..."),[]}}async saveConfigurationFile(t,n){try{console.log("Saving configuration file:",t);const s=await fetch(`${We}/config/files/${encodeURIComponent(t)}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:n})});if(!s.ok){const a=await s.json();throw new Error(a.error||`Failed to save file: ${s.status} ${s.statusText}`)}const l=await s.json();if(l.success&&l.file)return console.log("File saved successfully:",t),l.file;throw new Error("Invalid response format from save file API")}catch(s){throw console.error("Error saving configuration file:",s),s}}generateBuildStages(t,n){const s=[{name:"Install",status:"success",duration:Math.floor(Math.random()*30)+10,logs:["Installing dependencies...","Dependencies installed successfully"]},{name:"Lint",status:n==="failed"&&Math.random()>.7?"failed":"success",duration:Math.floor(Math.random()*20)+5,logs:["Running ESLint...","Linting completed"]},{name:"Test",status:n==="failed"&&Math.random()>.5?"failed":"success",duration:Math.floor(Math.random()*60)+30,logs:["Running tests...","Test suite completed"]},{name:"Build",status:n==="failed"?"failed":"success",duration:Math.floor(Math.random()*120)+60,logs:["Building package...","Build completed successfully"]}];if(n==="building"){const l=Math.floor(Math.random()*s.length);s[l].status="running",s.slice(l+1).forEach(a=>a.status="pending")}return s}}const Oe=new sg,lg=e=>({total:e.length,apps:e.filter(t=>t.type==="app").length,libs:e.filter(t=>t.type==="lib").length,tools:e.filter(t=>t.type==="tool").length,custom:e.filter(t=>!["app","Plib","tool"].includes(t.type)).length,totalDependencies:e.reduce((t,n)=>t+Object.keys(n.dependencies).length+Object.keys(n.peerDependencies).length+Object.keys(n.devDependencies).length,0)}),ag=e=>[...new Set(e.map(t=>t.type))],ig=(e,t,n)=>e.filter(s=>{var i;const l=s.name.toLowerCase().includes(t.toLowerCase())||((i=s.description)==null?void 0:i.toLowerCase().includes(t.toLowerCase())),a=n==="all"||s.type===n;return l&&a}),og=e=>{switch(e){case"app":return"bg-blue-100 text-blue-800";case"lib":return"bg-green-100 text-green-800";case"tool":return"bg-purple-100 text-purple-800";default:return"bg-gray-100 text-gray-800"}},ac=e=>{switch(e){case"app":return"🚀";case"lib":return"📚";case"tool":return"🔧";default:return"📦"}},ic={title:"Monorepo Dashboard",description:"Visual management and monitoring of your monorepo packages",packageTypes:["app","lib","tool"],features:{healthChecks:!0,ciIntegration:!0,dependencyGraph:!0,publishControl:!0,searchAndFilter:!0,configurationInspector:!0},branding:{primaryColor:"#3B82F6",secondaryColor:"#1E40AF"}};function cg(){const[e,t]=d.useState(),[n,s]=d.useState(""),[l,a]=d.useState("all"),[i,c]=d.useState(ic),[o,u]=d.useState(!1),[p,m]=d.useState(!1),[g,v]=d.useState(!0),[w,N]=d.useState(null),[b,x]=d.useState(!1);d.useEffect(()=>{(async()=>{try{v(!0);const C=await Oe.getPackages();t(C),N(null)}catch(C){N("Failed to fetch packages"),console.error("Error fetching packages:",C)}finally{v(!1)}})()},[]),d.useEffect(()=>{const y=localStorage.getItem("monodog-config");y&&c({...ic,...JSON.parse(y)})},[]);const h=y=>{c(y),localStorage.setItem("monodog-config",JSON.stringify(y))},f=async()=>{try{x(!0),N(null),v(!0);try{const y=await Oe.refreshPackages();console.log("package data:",y),t(y),N(null)}catch(y){N("Failed to fetch package data"),console.error("Error fetching package data:",y)}finally{v(!1)}}catch(y){N("Failed to refresh package data"),console.error("Error refreshing package data:",y)}finally{x(!1)}},j=ig(e??[],n,l),S=ag(e??[]),E=lg(e??[]);return r.jsxs("div",{className:"p-6 space-y-6",children:[b&&e&&r.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center z-50",children:r.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-lg text-center",children:[r.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto"}),r.jsx("p",{className:"mt-4 text-gray-700",children:"Refreshing packages..."})]})}),r.jsx(Xp,{config:i,onShowSetupGuide:()=>m(!0),onShowConfig:()=>u(!0),onRefresh:f}),r.jsx(Jp,{stats:E}),r.jsx(qp,{packages:e??[],packageTypes:S,getTypeIcon:ac}),r.jsx(eg,{}),r.jsxs("div",{className:"bg-white p-6 rounded-lg shadow border",children:[r.jsx(tg,{searchTerm:n,selectedType:l,packageTypes:S,onSearchChange:s,onTypeChange:a}),r.jsx(ng,{packages:j,getTypeIcon:ac,getStatusColor:og})]}),r.jsx(Ap,{isOpen:o,onClose:()=>u(!1),onSave:h,currentConfig:i}),r.jsx(Kp,{isOpen:p,onClose:()=>m(!1),onComplete:()=>m(!1)})]})}function Hd({message:e="Loading packages..."}){return r.jsx("div",{className:"flex items-center justify-center h-64",children:r.jsxs("div",{className:"text-center",children:[r.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto"}),r.jsx("p",{className:"mt-4 text-gray-600",children:e})]})})}function ug({error:e,onRetry:t}){return r.jsx("div",{className:"flex items-center justify-center h-64",children:r.jsxs("div",{className:"text-center",children:[r.jsx(te,{className:"w-12 h-12 text-red-500 mx-auto"}),r.jsx("p",{className:"mt-4 text-red-600",children:e}),t&&r.jsx("button",{onClick:t,className:"mt-4 bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 transition-colors",children:"Retry"})]})})}function dg({stats:e}){return r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-6",children:[r.jsx("div",{className:"bg-white p-6 rounded-lg shadow border",children:r.jsxs("div",{className:"flex items-center",children:[r.jsx("div",{className:"p-2 bg-blue-100 rounded-lg",children:r.jsx("div",{className:"text-2xl",children:"📦"})}),r.jsxs("div",{className:"ml-4",children:[r.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Total Packages"}),r.jsx("p",{className:"text-2xl font-semibold text-gray-900",children:e.total})]})]})}),r.jsx("div",{className:"bg-white p-6 rounded-lg shadow border",children:r.jsxs("div",{className:"flex items-center",children:[r.jsx("div",{className:"p-2 bg-green-100 rounded-lg",children:r.jsx(Ke,{className:"w-6 h-6 text-green-600"})}),r.jsxs("div",{className:"ml-4",children:[r.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Healthy"}),r.jsx("p",{className:"text-2xl font-semibold text-green-600",children:e.healthy})]})]})}),r.jsx("div",{className:"bg-white p-6 rounded-lg shadow border",children:r.jsxs("div",{className:"flex items-center",children:[r.jsx("div",{className:"p-2 bg-yellow-100 rounded-lg",children:r.jsx(te,{className:"w-6 h-6 text-yellow-600"})}),r.jsxs("div",{className:"ml-4",children:[r.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Warnings"}),r.jsx("p",{className:"text-2xl font-semibold text-yellow-600",children:e.warnings})]})]})}),r.jsx("div",{className:"bg-white p-6 rounded-lg shadow border",children:r.jsxs("div",{className:"flex items-center",children:[r.jsx("div",{className:"p-2 bg-red-100 rounded-lg",children:r.jsx(Xe,{className:"w-6 h-6 text-red-600"})}),r.jsxs("div",{className:"ml-4",children:[r.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Errors"}),r.jsx("p",{className:"text-2xl font-semibold text-red-600",children:e.errors})]})]})})]})}function mg({filters:e,onFiltersChange:t,availableTypes:n,availableStatuses:s}){return r.jsx("div",{className:"bg-white p-6 rounded-lg shadow border",children:r.jsxs("div",{className:"flex flex-col md:flex-row md:items-center md:justify-between space-y-4 md:space-y-0 md:space-x-4",children:[r.jsxs("div",{className:"flex-1 relative",children:[r.jsx(Pi,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 h-5 w-5"}),r.jsx("input",{type:"text",placeholder:"Search packages by name, description, or tags...",value:e.search,onChange:l=>t({...e,search:l.target.value}),className:"w-full pl-10 pr-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent"})]}),r.jsxs("div",{className:"flex items-center space-x-4",children:[r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx(el,{className:"h-5 w-5 text-gray-400"}),r.jsxs("select",{value:e.type,onChange:l=>t({...e,type:l.target.value}),className:"border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:[r.jsx("option",{value:"all",children:"All Types"}),n.map(l=>r.jsx("option",{value:l,children:l.charAt(0).toUpperCase()+l.slice(1)},l))]})]}),r.jsxs("select",{value:e.status,onChange:l=>t({...e,status:l.target.value}),className:"border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:[r.jsx("option",{value:"all",children:"All Status"}),s.map(l=>r.jsx("option",{value:l,children:l.charAt(0).toUpperCase()+l.slice(1)},l))]})]})]})})}const hg=e=>({total:e.length,healthy:e.filter(t=>t.status==="healthy").length,warnings:e.filter(t=>t.status==="warning").length,errors:e.filter(t=>t.status==="error").length}),fg=e=>[...new Set(e.map(t=>t.type))],xg=e=>[...new Set(e.map(t=>t.status))],pg=(e,t)=>e.filter(n=>{const s=n.name.toLowerCase().includes(t.search.toLowerCase())||n.description.toLowerCase().includes(t.search.toLowerCase()),l=t.type==="all"||n.type===t.type,a=t.status==="all"||n.status===t.status;return s&&l&&a}),gg=(e,t)=>[...e].sort((n,s)=>{let l,a;switch(t.field){case"name":l=n.name.toLowerCase(),a=s.name.toLowerCase();break;case"version":l=n.version,a=s.version;break;case"lastUpdated":l=new Date(n.lastUpdated),a=new Date(s.lastUpdated);break;case"dependencies":l=Object.keys(n.dependencies).length,a=Object.keys(s.dependencies).length;break;default:return 0}return l<a?t.order==="asc"?-1:1:l>a?t.order==="asc"?1:-1:0}),Vd=e=>{switch(e){case"healthy":return"bg-green-100 text-green-800";case"warning":return"bg-yellow-100 text-yellow-800";case"error":return"bg-red-100 text-red-800";case"building":return"bg-blue-100 text-blue-800";default:return"bg-gray-100 text-gray-800"}},Wd=e=>{switch(e){case"app":return"bg-blue-100 text-blue-800";case"lib":return"bg-purple-100 text-purple-800";case"tool":return"bg-orange-100 text-orange-800";case"service":return"bg-green-100 text-green-800";default:return"bg-gray-100 text-gray-800"}},yg=e=>{switch(e){case"up-to-date":return"bg-green-100 text-green-800";case"outdated":return"bg-yellow-100 text-yellow-800";case"major-update":return"bg-red-100 text-red-800";default:return"bg-gray-100 text-gray-800"}},vg=e=>{switch(e){case"feature":return"bg-blue-100 text-blue-800";case"fix":return"bg-green-100 text-green-800";case"chore":return"bg-gray-100 text-gray-800";case"breaking":return"bg-red-100 text-red-800";default:return"bg-gray-100 text-gray-800"}},Ti=e=>new Date(e).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),Qd=e=>e.startsWith("v")?e:`v${e}`,Yd=e=>{switch(e){case"app":return"🚀";case"lib":return"📚";case"tool":return"🔧";case"service":return"🌐";default:return"📦"}};function jg({packages:e,sorting:t,onSortChange:n}){const s=a=>{const i=t.field===a&&t.order==="asc"?"desc":"asc";n({field:a,order:i})},l=a=>t.field!==a?null:t.order==="asc"?r.jsx(Si,{className:"w-4 h-4"}):r.jsx(Ad,{className:"w-4 h-4"});return r.jsx("div",{className:"bg-white rounded-lg shadow border overflow-hidden",children:r.jsx("div",{className:"overflow-x-auto",children:r.jsxs("table",{className:"w-full",children:[r.jsx("thead",{className:"bg-gray-50",children:r.jsxs("tr",{children:[r.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider cursor-pointer hover:bg-gray-100",onClick:()=>s("name"),children:r.jsxs("div",{className:"flex items-center space-x-1",children:[r.jsx("span",{children:"Package"}),l("name")]})}),r.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider cursor-pointer hover:bg-gray-100",onClick:()=>s("version"),children:r.jsxs("div",{className:"flex items-center space-x-1",children:[r.jsx("span",{children:"Version"}),l("version")]})}),r.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Type"}),r.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Status"}),r.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider cursor-pointer hover:bg-gray-100",onClick:()=>s("dependencies"),children:r.jsxs("div",{className:"flex items-center space-x-1",children:[r.jsx("span",{children:"Dependencies"}),l("dependencies")]})}),r.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider cursor-pointer hover:bg-gray-100",onClick:()=>s("lastUpdated"),children:r.jsxs("div",{className:"flex items-center space-x-1",children:[r.jsx("span",{children:"Last Updated"}),l("lastUpdated")]})}),r.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Maintainers"})]})}),r.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:e.map(a=>r.jsxs("tr",{className:"hover:bg-gray-50",children:[r.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:r.jsxs("div",{className:"flex items-center",children:[r.jsx("div",{className:"text-2xl mr-3",children:Yd(a.type)}),r.jsxs("div",{children:[r.jsx(rt,{to:`/packages/${encodeURIComponent(a.name)}`,className:"text-sm font-medium text-blue-600 hover:text-blue-500",children:a.name}),r.jsx("div",{className:"text-sm text-gray-500",children:a.description})]})]})}),r.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:r.jsx("span",{className:"text-sm font-mono text-gray-900",children:Qd(a.version)})}),r.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:r.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${Wd(a.type)}`,children:a.type})}),r.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:r.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${Vd(a.status)}`,children:a.status})}),r.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-900",children:Object.keys(a.dependencies).length>0&&r.jsxs("div",{className:"text-xs text-gray-500 mt-1",children:[Object.keys(a.dependencies).slice(0,3).join(", "),Object.keys(a.dependencies).length>3&&` +${Object.keys(a.dependencies).length-3} more`]})}),r.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:Ti(a.lastUpdated)}),r.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:r.jsxs("div",{className:"flex -space-x-1",children:[a.maintainers.slice(0,3).map((i,c)=>r.jsx("div",{className:"inline-flex items-center justify-center h-6 w-6 rounded-full bg-gray-500 text-xs font-medium text-white",title:i,children:i.charAt(0).toUpperCase()},i)),a.maintainers.length>3&&r.jsxs("div",{className:"inline-flex items-center justify-center h-6 w-6 rounded-full bg-gray-300 text-xs font-medium text-gray-600",children:["+",a.maintainers.length-3]})]})})]},a.name))})]})})})}function wg({packageData:e}){var n,s,l,a;const t=i=>{switch(i){case"healthy":return r.jsx(Ke,{className:"h-5 w-5 text-green-500"});case"warning":return r.jsx(te,{className:"h-5 w-5 text-yellow-500"});case"error":return r.jsx(te,{className:"h-5 w-5 text-red-500"});default:return r.jsx(ct,{className:"h-5 w-5 text-gray-500"})}};return r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"mb-6",children:r.jsxs(rt,{to:"/packages",className:"inline-flex items-center text-sm text-gray-500 hover:text-gray-700",children:[r.jsx(V0,{className:"mr-2 h-4 w-4"}),"Back to Packages"]})}),r.jsxs("div",{className:"bg-white rounded-lg shadow border p-6 mb-6",children:[r.jsxs("div",{className:"flex items-start justify-between",children:[r.jsxs("div",{className:"flex items-start space-x-4",children:[r.jsx("div",{className:"text-4xl",children:Yd(e.type)}),r.jsxs("div",{children:[r.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:e.name}),r.jsx("p",{className:"text-gray-600 mt-1",children:e.description}),r.jsxs("div",{className:"flex items-center space-x-4 mt-4",children:[r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx("span",{className:"text-sm font-medium text-gray-500",children:"Version:"}),r.jsx("span",{className:"text-sm font-mono bg-gray-100 px-2 py-1 rounded",children:Qd(e.version)})]}),r.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${Wd(e.type)}`,children:e.type}),r.jsxs("div",{className:"flex items-center space-x-1",children:[t(e.status),r.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${Vd(e.status)}`,children:e.status})]})]})]})]}),r.jsxs("div",{className:"text-right",children:[r.jsx("div",{className:"text-sm text-gray-500 mb-2",children:"Health Score"}),r.jsxs("div",{className:"text-2xl font-bold text-blue-600",children:[((n=e.packageHealth)==null?void 0:n.packageOverallScore)??"","%"]})]})]}),r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4 mt-6 pt-6 border-t border-gray-200",children:[r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx(zd,{className:"h-4 w-4 text-gray-400"}),r.jsxs("div",{children:[r.jsx("div",{className:"text-xs text-gray-500",children:"Last Updated"}),r.jsx("div",{className:"text-sm font-medium",children:Ti(e.lastUpdated)})]})]}),r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx(Sp,{className:"h-4 w-4 text-gray-400"}),r.jsxs("div",{children:[r.jsx("div",{className:"text-xs text-gray-500",children:"Maintainers"}),r.jsx("div",{className:"text-sm font-medium",children:e.maintainers.length})]})]}),r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx(Ri,{className:"h-4 w-4 text-gray-400"}),r.jsxs("div",{children:[r.jsx("div",{className:"text-xs text-gray-500",children:"License"}),r.jsx("div",{className:"text-sm font-medium",children:e.license})]})]}),r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx("div",{className:"h-4 w-4 text-gray-400",children:"🔗"}),r.jsxs("div",{children:[r.jsx("div",{className:"text-xs text-gray-500",children:"Repository"}),r.jsx("div",{className:"text-sm font-medium truncate",children:r.jsx("a",{href:e.repository.url||"",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-500",children:(l=(s=e.repository)==null?void 0:s.url)==null?void 0:l.split("/").pop()})})]})]})]}),((a=e.tags)==null?void 0:a.length)>0&&r.jsxs("div",{className:"mt-4",children:[r.jsx("div",{className:"text-xs text-gray-500 mb-2",children:"Tags"}),r.jsx("div",{className:"flex flex-wrap gap-2",children:e.tags.map(i=>r.jsx("span",{className:"inline-flex px-2 py-1 text-xs bg-gray-100 text-gray-700 rounded-full",children:i},i))})]})]})]})}function Ng({activeTab:e,onTabChange:t}){const n=[{id:"overview",label:"Overview",icon:qs},{id:"dependencies",label:"Dependencies",icon:Ei},{id:"commits",label:"Recent Commits",icon:ct},{id:"health",label:"Health Metrics",icon:Ud},{id:"config",label:"Configuration",icon:Ms}];return r.jsx("div",{className:"border-b border-gray-200",children:r.jsx("nav",{className:"flex space-x-8",children:n.map(s=>{const l=s.icon;return r.jsxs("button",{onClick:()=>t(s.id),className:`py-4 px-1 border-b-2 font-medium text-sm flex items-center space-x-2 ${e===s.id?"border-blue-500 text-blue-600":"border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300"}`,children:[r.jsx(l,{className:"w-4 h-4"}),r.jsx("span",{children:s.label})]},s.id)})})})}function bg({packageData:e}){if(!e.dependenciesInfo.length)return r.jsx("p",{className:"py-6 text-gray-600",children:"No dependency found."});const t=(n,s)=>r.jsxs("div",{className:"mb-8",children:[r.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:s}),r.jsx("div",{className:"bg-white border rounded-lg overflow-hidden",children:r.jsxs("table",{className:"w-full",children:[r.jsx("thead",{className:"bg-gray-50",children:r.jsxs("tr",{children:[r.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Package"}),r.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Current"}),r.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Latest"}),r.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Status"}),r.jsx("th",{className:"hidden px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Actions"})]})}),r.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:n.map(l=>r.jsxs("tr",{className:"hover:bg-gray-50",children:[r.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:r.jsx("div",{className:"text-sm font-medium text-gray-900",children:l.name})}),r.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:r.jsx("span",{className:"text-sm font-mono text-gray-700",children:l.version})}),r.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:r.jsx("span",{className:"text-sm font-mono text-gray-700",children:l.latest})}),r.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:r.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${yg(l.status)}`,children:l.status.replace("-"," ")})}),r.jsx("td",{className:"hidden px-6 py-4 whitespace-nowrap text-sm",children:l.status!=="up-to-date"&&r.jsxs("button",{className:"text-blue-600 hover:text-blue-500 flex items-center space-x-1",children:[r.jsx(Si,{className:"w-4 h-4"}),r.jsx("span",{children:"Update"})]})})]},l.name))})]})})]});return r.jsxs("div",{className:"py-6",children:[t(e.dependenciesInfo.filter(n=>n.type=="dependency"),"Dependencies"),t(e.dependenciesInfo.filter(n=>n.type=="devDependency"),"Dev Dependencies"),t(e.dependenciesInfo.filter(n=>n.type=="peerDependency"),"Peer Dependencies"),r.jsxs("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4",children:[r.jsx("h4",{className:"font-medium text-blue-900 mb-2",children:"Dependency Summary"}),r.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 text-sm",children:[r.jsxs("div",{children:[r.jsx("span",{className:"font-medium text-blue-800",children:"Total Dependencies:"}),r.jsx("span",{className:"ml-2 text-blue-700",children:e.dependenciesInfo.filter(n=>n.type=="dependency").length})]}),r.jsxs("div",{children:[r.jsx("span",{className:"font-medium text-blue-800",children:"Dev Dependencies:"}),r.jsx("span",{className:"ml-2 text-blue-700",children:e.dependenciesInfo.filter(n=>n.type=="devDependency").length})]}),r.jsxs("div",{children:[r.jsx("span",{className:"font-medium text-blue-800",children:"Peer Dependencies:"}),r.jsx("span",{className:"ml-2 text-blue-700",children:e.dependenciesInfo.filter(n=>n.type=="peerDependency").length})]}),r.jsxs("div",{children:[r.jsx("span",{className:"font-medium text-blue-800",children:"Outdated:"}),r.jsx("span",{className:"ml-2 text-blue-700",children:e.dependenciesInfo.filter(n=>n.status==="outdated").length})]}),r.jsxs("div",{children:[r.jsx("span",{className:"font-medium text-blue-800",children:"Major Updates:"}),r.jsx("span",{className:"ml-2 text-blue-700",children:e.dependenciesInfo.filter(n=>n.status==="major-update").length})]})]})]})]})}function kg({packageData:e}){return r.jsxs("div",{className:"py-6",children:[r.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"Recent Commits"}),r.jsx("div",{className:"space-y-4",children:e.commits.map(t=>r.jsx("div",{className:"bg-white border rounded-lg p-4 hover:shadow-md transition-shadow",children:r.jsxs("div",{className:"flex items-start justify-between",children:[r.jsxs("div",{className:"flex-1",children:[r.jsxs("div",{className:"flex items-center space-x-3 mb-2",children:[r.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${vg(t.type)}`,children:t.type}),r.jsx("span",{className:"text-sm font-mono text-gray-500",children:t.hash})]}),r.jsx("p",{className:"text-sm font-medium text-gray-900 mb-2",children:t.message}),r.jsxs("div",{className:"flex items-center space-x-4 text-sm text-gray-500",children:[r.jsxs("span",{children:["by ",t.author]}),r.jsx("span",{children:Ti(t.date)})]})]}),r.jsx("div",{className:"hidden ml-4",children:r.jsx("button",{className:"text-blue-600 hover:text-blue-500 text-sm",children:"View Diff"})})]})},t.hash))}),e.commits.length===0&&r.jsxs("div",{className:"text-center py-8",children:[r.jsx("div",{className:"text-gray-400 text-4xl mb-2",children:"📝"}),r.jsx("p",{className:"text-gray-500",children:"No recent commits found"})]}),r.jsxs("div",{className:"mt-6 bg-gray-50 border border-gray-200 rounded-lg p-4",children:[r.jsx("h4",{className:"font-medium text-gray-900 mb-2",children:"Commit Summary"}),r.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 text-sm",children:[r.jsxs("div",{children:[r.jsx("span",{className:"font-medium text-gray-800",children:"Features:"}),r.jsx("span",{className:"ml-2 text-gray-600",children:e.commits.filter(t=>t.type==="feat").length})]}),r.jsxs("div",{children:[r.jsx("span",{className:"font-medium text-gray-800",children:"Fixes:"}),r.jsx("span",{className:"ml-2 text-gray-600",children:e.commits.filter(t=>t.type==="fix").length})]}),r.jsxs("div",{children:[r.jsx("span",{className:"font-medium text-gray-800",children:"Chores:"}),r.jsx("span",{className:"ml-2 text-gray-600",children:e.commits.filter(t=>t.type==="chore").length})]}),r.jsxs("div",{children:[r.jsx("span",{className:"font-medium text-gray-800",children:"Breaking:"}),r.jsx("span",{className:"ml-2 text-gray-600",children:e.commits.filter(t=>t.type==="breaking").length})]})]})]})]})}function Sg({packageData:e}){var a;const t=i=>i>=80?"text-green-600":i>=60?"text-yellow-600":"text-red-600",n=i=>{switch(i){case"success":return r.jsx(Ke,{className:"w-5 h-5 text-green-500"});case"failed":return r.jsx(Xe,{className:"w-5 h-5 text-red-500"});case"running":return r.jsx("div",{className:"w-5 h-5 border-2 border-blue-500 border-t-transparent rounded-full animate-spin"});default:return r.jsx(te,{className:"w-5 h-5 text-gray-500"})}},s=i=>{switch(i){case"success":return"bg-green-100 text-green-800";case"failed":return"bg-red-100 text-red-800";case"running":return"bg-blue-100 text-blue-800";default:return"bg-gray-100 text-gray-800"}},l=i=>{switch(i){case"pass":return"bg-green-100 text-green-800";case"fail":return"bg-red-100 text-red-800";case"warning":return"bg-yellow-100 text-yellow-800";default:return"bg-gray-100 text-gray-800"}};return(a=e.packageHealth)!=null&&a.packageOverallScore?r.jsxs("div",{className:"py-6",children:[r.jsxs("div",{className:"bg-white border rounded-lg p-6 mb-6",children:[r.jsxs("div",{className:"flex items-center justify-between mb-4",children:[r.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Health Score"}),r.jsxs("div",{className:`text-3xl font-bold ${t(e.packageHealth.packageOverallScore)}`,children:[e.packageHealth.packageOverallScore,"%"]})]}),r.jsx("div",{className:"w-full bg-gray-200 rounded-full h-3 mb-4",children:r.jsx("div",{className:`h-3 rounded-full transition-all duration-300 ${e.packageHealth.packageOverallScore>=80?"bg-green-500":e.packageHealth.packageOverallScore>=60?"bg-yellow-500":"bg-red-500"}`,style:{width:`${e.packageHealth.packageOverallScore}%`}})}),r.jsxs("p",{className:"text-sm text-gray-600",children:[e.packageHealth.packageOverallScore>=80&&"Excellent health - package is in great condition",e.packageHealth.packageOverallScore>=60&&e.packageHealth.packageOverallScore<80&&"Good health - minor issues detected",e.packageHealth.packageOverallScore<60&&"Needs attention - several issues require fixing"]})]}),r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6 mb-6",children:[r.jsxs("div",{className:"bg-white border rounded-lg p-6",children:[r.jsxs("div",{className:"flex items-center justify-between mb-4",children:[r.jsx("h4",{className:"text-sm font-medium text-gray-900",children:"Build Status"}),n(e.packageHealth.packageBuildStatus)]}),r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${s(e.packageHealth.packageBuildStatus)}`,children:e.packageHealth.packageBuildStatus}),r.jsx("button",{className:"hidden text-blue-600 hover:text-blue-500 text-sm",children:"View Logs"})]})]}),r.jsxs("div",{className:"hidden bg-white border rounded-lg p-6",children:[r.jsxs("div",{className:"flex items-center justify-between mb-4",children:[r.jsx("h4",{className:"text-sm font-medium text-gray-900",children:"Test Coverage"}),r.jsxs("div",{className:`text-lg font-semibold ${e.packageHealth.packageTestCoverage>=80?"text-green-600":e.packageHealth.packageTestCoverage>=60?"text-yellow-600":"text-red-600"}`,children:[e.packageHealth.packageTestCoverage,"%"]})]}),r.jsx("div",{className:"w-full bg-gray-200 rounded-full h-2",children:r.jsx("div",{className:`h-2 rounded-full ${e.packageHealth.packageTestCoverage>=80?"bg-green-500":e.packageHealth.packageTestCoverage>=60?"bg-yellow-500":"bg-red-500"}`,style:{width:`${e.packageHealth.packageTestCoverage}%`}})})]}),r.jsxs("div",{className:"bg-white border rounded-lg p-6",children:[r.jsxs("div",{className:"flex items-center justify-between mb-4",children:[r.jsx("h4",{className:"text-sm font-medium text-gray-900",children:"Lint Status"}),e.packageHealth.packageLintStatus==="pass"&&r.jsx(Ke,{className:"w-5 h-5 text-green-500"}),e.packageHealth.packageLintStatus==="fail"&&r.jsx(Xe,{className:"w-5 h-5 text-red-500"}),e.packageHealth.packageLintStatus==="warning"&&r.jsx(te,{className:"w-5 h-5 text-yellow-500"})]}),r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${l(e.packageHealth.packageLintStatus)}`,children:e.packageHealth.packageLintStatus}),r.jsx("button",{className:"hidden text-blue-600 hover:text-blue-500 text-sm",children:"View Issues"})]})]})]}),r.jsxs("div",{className:"bg-white border rounded-lg p-6",children:[r.jsx("h4",{className:"text-lg font-medium text-gray-900 mb-4",children:"Detailed Metrics"}),r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[r.jsxs("div",{children:[r.jsx("h5",{className:"text-sm font-medium text-gray-700 mb-3",children:"Dependencies"}),r.jsxs("div",{className:"space-y-2 text-sm",children:[r.jsxs("div",{className:"flex justify-between",children:[r.jsx("span",{className:"text-gray-600",children:"Total Dependencies:"}),r.jsx("span",{className:"font-medium",children:Object.keys(e.dependenciesInfo).length})]}),r.jsxs("div",{className:"flex justify-between",children:[r.jsx("span",{className:"text-gray-600",children:"Outdated:"}),r.jsx("span",{className:"font-medium text-yellow-600",children:e.dependenciesInfo.filter(i=>i.status==="outdated").length})]}),r.jsxs("div",{className:"flex justify-between",children:[r.jsx("span",{className:"text-gray-600",children:"Major Updates Available:"}),r.jsx("span",{className:"font-medium text-red-600",children:e.dependenciesInfo.filter(i=>i.status==="major-update").length})]})]})]}),r.jsxs("div",{children:[r.jsx("h5",{className:"text-sm font-medium text-gray-700 mb-3",children:"Code Quality"}),r.jsxs("div",{className:"space-y-2 text-sm",children:[r.jsxs("div",{className:"flex justify-between",children:[r.jsx("span",{className:"text-gray-600",children:"Build Status:"}),r.jsx("span",{className:`font-medium ${e.packageHealth.packageBuildStatus==="success"?"text-green-600":e.packageHealth.packageBuildStatus==="failed"?"text-red-600":"text-yellow-600"}`,children:e.packageHealth.packageBuildStatus})]}),r.jsxs("div",{className:"hidden flex justify-between",children:[r.jsx("span",{className:"text-gray-600",children:"Test Coverage:"}),r.jsxs("span",{className:"font-medium",children:[e.packageHealth.packageTestCoverage,"%"]})]}),r.jsxs("div",{className:"flex justify-between",children:[r.jsx("span",{className:"text-gray-600",children:"Lint Status:"}),r.jsx("span",{className:`font-medium ${e.packageHealth.packageLintStatus==="pass"?"text-green-600":e.packageHealth.packageLintStatus==="fail"?"text-red-600":"text-yellow-600"}`,children:e.packageHealth.packageLintStatus})]})]})]})]})]})]}):r.jsx("p",{className:"py-6 text-gray-600",children:"No health data available."})}function Cg({packageData:e}){const[t,n]=d.useState(!1),[s,l]=d.useState(""),[a,i]=d.useState(!1),[c,o]=d.useState(""),[u,p]=d.useState(null),[m,g]=d.useState(!1);console.log("Package Data:",e);const v=()=>{const f={name:e.name,version:e.version,description:e.description||"",license:e.license||"",repository:e.repository||{},scripts:e.scripts||{},dependencies:e.dependencies||{},devDependencies:e.devDependencies||{},peerDependencies:e.peerDependencies||{}};return JSON.stringify(f,null,2)};d.useState(()=>{l(v())});const w=()=>{n(!0),l(v()),o("")},N=()=>{n(!1),l(v()),o("")},b=async()=>{if(!s.trim()){o("Configuration cannot be empty");return}i(!0),o("");try{console.log("💾 Saving package configuration...");const f=await Oe.updatePackageConfiguration(e.name,s,e.path);if(f.success)o("Configuration updated successfully!"),n(!1),console.log("✅ Update successful:",f);else throw new Error(f.message||"Update failed")}catch(f){console.error("❌ Error saving configuration:",f),o(f instanceof Error?f.message:"Failed to save configuration. Please try again.")}finally{i(!1)}},x=f=>{l(f.target.value),c&&o("")},h=async(f,j,S)=>{try{await navigator.clipboard.writeText(f),j==="config"?(g(!0),setTimeout(()=>g(!1),4e3)):j==="script"&&S&&(p(S),setTimeout(()=>p(null),4e3))}catch(E){console.error("Failed to copy to clipboard:",E);const y=document.createElement("textarea");y.value=f,document.body.appendChild(y),y.select();try{document.execCommand("copy"),j==="config"?(g(!0),setTimeout(()=>g(!1),2e3)):j==="script"&&S&&(p(S),setTimeout(()=>p(null),2e3))}catch(C){console.error("Fallback copy failed:",C),j==="config"&&o("Failed to copy to clipboard")}document.body.removeChild(y)}};return r.jsxs("div",{className:"py-6",children:[r.jsxs("div",{className:"bg-white border rounded-lg p-6 mb-6",children:[r.jsxs("div",{className:"flex items-center space-x-2 mb-4",children:[r.jsx(Ei,{className:"w-5 h-5 text-gray-600"}),r.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Package Scripts"})]}),r.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:Object.entries(e.scripts).map(([f,j])=>r.jsxs("div",{className:"border border-gray-200 rounded-lg p-4",children:[r.jsxs("div",{className:"flex items-center justify-between mb-2",children:[r.jsx("h4",{className:"text-sm font-medium text-gray-900",children:f}),r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx("button",{onClick:()=>h(j,"script",f),className:`text-sm flex items-center space-x-1 ${u===f?"text-green-600":"text-gray-600 hover:text-gray-700"}`,title:"Copy command to clipboard",children:u===f?r.jsxs(r.Fragment,{children:[r.jsx(tc,{className:"w-4 h-4"}),r.jsx("span",{children:"Copied!"})]}):r.jsxs(r.Fragment,{children:[r.jsx(nc,{className:"w-4 h-4"}),r.jsx("span",{children:"Copy"})]})}),r.jsx("button",{className:"hidden text-blue-600 hover:text-blue-500 text-sm",children:"Run"})]})]}),r.jsx("code",{className:"text-xs text-gray-600 bg-gray-100 p-2 rounded block overflow-x-auto",children:j})]},f))}),Object.keys(e.scripts).length===0&&r.jsxs("div",{className:"text-center py-8",children:[r.jsx("div",{className:"text-gray-400 text-4xl mb-2",children:"📝"}),r.jsx("p",{className:"text-gray-500",children:"No scripts configured"})]})]}),r.jsxs("div",{className:"bg-white border rounded-lg p-6",children:[r.jsxs("div",{className:"flex items-center justify-between mb-4",children:[r.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Package Configuration"}),!t&&r.jsx("div",{className:"text-sm text-gray-500",children:"Read-only preview"})]}),t?r.jsxs("div",{className:"space-y-4",children:[r.jsx("div",{className:"bg-gray-900 text-gray-100 p-4 rounded-lg",children:r.jsx("textarea",{value:s,onChange:x,className:"w-full h-96 bg-gray-900 text-gray-100 text-sm font-mono resize-none focus:outline-none focus:ring-2 focus:ring-blue-500 rounded",spellCheck:"false"})}),c&&r.jsx("div",{className:`p-3 rounded-lg text-sm ${c.includes("successfully")?"bg-green-50 text-green-700 border border-green-200":"bg-red-50 text-red-700 border border-red-200"}`,children:c}),r.jsxs("div",{className:"flex space-x-3",children:[r.jsx("button",{onClick:b,disabled:a,className:"bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 disabled:bg-blue-300 disabled:cursor-not-allowed text-sm flex items-center space-x-2",children:a?r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"w-4 h-4 border-2 border-white border-t-transparent rounded-full animate-spin"}),r.jsx("span",{children:"Saving..."})]}):r.jsx("span",{children:"Save Changes"})}),r.jsx("button",{onClick:N,disabled:a,className:"border border-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed text-sm",children:"Cancel"})]})]}):r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"bg-gray-900 text-gray-100 p-4 rounded-lg overflow-x-auto",children:r.jsx("pre",{className:"text-sm",children:s})}),r.jsxs("div",{className:"mt-4 flex space-x-3",children:[r.jsx("button",{onClick:w,className:"bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 text-sm",children:"Edit Configuration"}),r.jsx("button",{onClick:()=>h(t?s:v(),"config"),className:"border border-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-50 text-sm flex items-center space-x-2",children:m?r.jsxs(r.Fragment,{children:[r.jsx(tc,{className:"w-4 h-4 text-green-600"}),r.jsx("span",{children:"Copied!"})]}):r.jsxs(r.Fragment,{children:[r.jsx(nc,{className:"w-4 h-4"}),r.jsx("span",{children:"Copy"})]})})]})]})]})]})}function Eg(){const[e,t]=d.useState([]),[n,s]=d.useState(!0),[l,a]=d.useState(null),[i,c]=d.useState({search:"",type:"all",status:"all"}),[o,u]=d.useState({field:"name",order:"asc"});d.useEffect(()=>{(async()=>{try{s(!0);const x=await Oe.getPackages();t(x),a(null)}catch(x){a("Failed to fetch packages"),console.error("Error fetching packages:",x)}finally{s(!1)}})()},[]);const p=()=>{window.location.reload()},m=pg(e,i),g=gg(m,o),v=hg(e),w=fg(e),N=xg(e);return n?r.jsx(Hd,{}):l?r.jsx(ug,{error:l,onRetry:p}):r.jsxs("div",{className:"space-y-6",children:[r.jsx("div",{className:"flex items-center justify-between",children:r.jsxs("div",{children:[r.jsx("h1",{className:"text-heading text-2xl",children:"Packages Overview"}),r.jsx("p",{className:"text-body mt-1",children:"Manage and monitor all packages in your monorepo"})]})}),r.jsx(dg,{stats:v}),r.jsx(mg,{filters:i,onFiltersChange:c,availableTypes:w,availableStatuses:N}),r.jsxs("div",{className:"flex items-center justify-between text-sm text-gray-600",children:[r.jsxs("span",{children:["Showing ",g.length," of ",e.length," packages",i.search&&` matching "${i.search}"`]}),r.jsxs("span",{children:[i.type!=="all"&&`Filtered by type: ${i.type}`,i.status!=="all"&&` • status: ${i.status}`]})]}),r.jsx(jg,{packages:g,sorting:o,onSortChange:u}),g.length===0&&!n&&r.jsxs("div",{className:"text-center py-12",children:[r.jsx("div",{className:"text-neutral-400 text-6xl mb-4",children:"📦"}),r.jsx("h3",{className:"text-heading text-lg mb-2",children:"No packages found"}),r.jsx("p",{className:"text-body mb-4",children:i.search||i.type!=="all"||i.status!=="all"?"Try adjusting your filters to see more results.":"Get started by adding your first package to the monorepo."}),(i.search||i.type!=="all"||i.status!=="all")&&r.jsx("button",{onClick:()=>c({search:"",type:"all",status:"all"}),className:"text-primary-600 hover:text-primary-500",children:"Clear Filters"})]})]})}function Pg(){const{name:e}=m0(),[t,n]=d.useState(null),[s,l]=d.useState("overview");if(d.useEffect(()=>{(async()=>{try{const c=await Oe.getPackage(e??"");n(c)}catch(c){console.error("Error fetching packages:",c)}})()},[e]),!t)return r.jsx(Hd,{message:"Loading package details..."});const a=()=>{var i;switch(s){case"overview":return r.jsx("div",{className:"py-6",children:r.jsxs("div",{className:"bg-white border rounded-lg p-6",children:[r.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"Package Overview"}),r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[r.jsxs("div",{children:[r.jsx("h4",{className:"text-sm font-medium text-gray-700 mb-2",children:"Description"}),r.jsx("p",{className:"text-gray-600 mb-4",children:t.description}),r.jsx("h4",{className:"text-sm font-medium text-gray-700 mb-2",children:"Maintainers"}),r.jsx("div",{className:"space-y-1",children:Object.keys(t.maintainers).map(c=>r.jsx("div",{className:"text-sm text-gray-600",children:c},c))})]}),r.jsxs("div",{children:[r.jsx("h4",{className:"text-sm font-medium text-gray-700 mb-2",children:"Quick Stats"}),r.jsxs("div",{className:"space-y-2 text-sm",children:[r.jsxs("div",{className:"flex justify-between",children:[r.jsx("span",{className:"text-gray-600",children:"Dependencies:"}),r.jsx("span",{className:"font-medium",children:t.dependenciesInfo.filter(c=>c.type=="dependency").length})]}),r.jsxs("div",{className:"flex justify-between",children:[r.jsx("span",{className:"text-gray-600",children:"Dev Dependencies:"}),r.jsx("span",{className:"font-medium",children:t.dependenciesInfo.filter(c=>c.type=="devDependency").length})]}),r.jsxs("div",{className:"flex justify-between",children:[r.jsx("span",{className:"text-gray-600",children:"Peer Dependencies:"}),r.jsx("span",{className:"font-medium",children:t.dependenciesInfo.filter(c=>c.type=="peerDependency").length})]}),r.jsxs("div",{className:"flex justify-between",children:[r.jsx("span",{className:"text-gray-600",children:"Scripts:"}),r.jsx("span",{className:"font-medium",children:Object.keys(t.scripts).length})]}),r.jsxs("div",{className:"flex justify-between",children:[r.jsx("span",{className:"text-gray-600",children:"Recent Commits:"}),r.jsx("span",{className:"font-medium",children:(i=t.commits)==null?void 0:i.length})]})]})]})]})]})});case"dependencies":return r.jsx(bg,{packageData:t});case"commits":return r.jsx(kg,{packageData:t});case"health":return r.jsx(Sg,{packageData:t});case"config":return r.jsx(Cg,{packageData:t});default:return null}};return r.jsxs("div",{className:"space-y-6",children:[r.jsx(wg,{packageData:t}),r.jsxs("div",{className:"bg-white rounded-lg shadow border",children:[r.jsx(Ng,{activeTab:s,onTabChange:l}),r.jsx("div",{className:"px-6",children:a()})]})]})}function Lg({message:e="Loading dependency graph..."}){return r.jsx("div",{className:"flex items-center justify-center h-64",children:r.jsxs("div",{className:"text-center",children:[r.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto"}),r.jsx("p",{className:"mt-4 text-gray-600",children:e})]})})}function Rg({error:e,onRetry:t}){return r.jsx("div",{className:"flex items-center justify-center h-64",children:r.jsxs("div",{className:"text-center",children:[r.jsx(te,{className:"w-12 h-12 text-red-500 mx-auto"}),r.jsx("p",{className:"mt-4 text-red-600",children:e}),t&&r.jsx("button",{onClick:t,className:"mt-4 bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 transition-colors",children:"Retry"})]})})}function Tg({onRefresh:e,loading:t=!1}){return r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Dependency Graph"}),r.jsx("p",{className:"text-gray-600 mt-1",children:"Visualize package dependencies and relationships"})]}),e&&r.jsxs("button",{onClick:e,disabled:t,className:"hidden bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed flex items-center space-x-2 transition-colors",children:[r.jsx(ot,{className:`w-5 h-5 ${t?"animate-spin":""}`}),r.jsx("span",{children:"Refresh"})]})]})}function Mg({viewMode:e,onViewModeChange:t,layout:n,onLayoutChange:s,showLegend:l,onToggleLegend:a,zoomLevel:i,onZoomChange:c}){return r.jsxs("div",{className:"bg-white p-4 rounded-lg shadow border flex items-center justify-between",children:[r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx("span",{className:"text-sm font-medium text-gray-700",children:"View:"}),r.jsxs("div",{className:"flex rounded-lg border border-gray-300 overflow-hidden",children:[r.jsxs("button",{onClick:()=>t("graph"),className:`px-3 py-2 text-sm font-medium flex items-center space-x-1 ${e==="graph"?"bg-blue-600 text-white":"bg-white text-gray-700 hover:bg-gray-50"}`,children:[r.jsx(yp,{className:"w-4 h-4"}),r.jsx("span",{children:"Graph"})]}),r.jsxs("button",{onClick:()=>t("list"),className:`px-3 py-2 text-sm font-medium flex items-center space-x-1 ${e==="list"?"bg-blue-600 text-white":"bg-white text-gray-700 hover:bg-gray-50"}`,children:[r.jsx(qx,{className:"w-4 h-4"}),r.jsx("span",{children:"List"})]})]})]}),e==="graph"&&r.jsxs("div",{className:"flex items-center space-x-4",children:[r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx("span",{className:"text-sm font-medium text-gray-700",children:"Layout:"}),r.jsxs("select",{value:n,onChange:o=>s(o.target.value),className:"border border-gray-300 rounded-md px-3 py-1 text-sm focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:[r.jsx("option",{value:"hierarchical",children:"Hierarchical"}),r.jsx("option",{value:"circular",children:"Circular"}),r.jsx("option",{value:"force",children:"Force-Directed"})]})]}),r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx("span",{className:"text-sm font-medium text-gray-700",children:"Zoom:"}),r.jsxs("div",{className:"flex items-center space-x-1",children:[r.jsx("button",{onClick:()=>c(Math.max(.5,i-.1)),className:"p-1 text-gray-600 hover:text-gray-800 disabled:opacity-50",disabled:i<=.5,children:r.jsx(np,{className:"w-4 h-4"})}),r.jsxs("span",{className:"text-sm text-gray-600 min-w-[3rem] text-center",children:[Math.round(i*100),"%"]}),r.jsx("button",{onClick:()=>c(Math.min(2,i+.1)),className:"p-1 text-gray-600 hover:text-gray-800 disabled:opacity-50",disabled:i>=2,children:r.jsx(lp,{className:"w-4 h-4"})})]})]})]}),r.jsxs("button",{onClick:a,className:`px-3 py-2 text-sm font-medium rounded-lg flex items-center space-x-1 transition-colors ${l?"bg-blue-100 text-blue-700":"bg-gray-100 text-gray-700 hover:bg-gray-200"}`,children:[r.jsx(vn,{className:"w-4 h-4"}),r.jsx("span",{children:"Legend"})]})]})}const Zd=e=>{switch(e){case"healthy":return"text-green-600 bg-green-100";case"warning":return"text-yellow-600 bg-yellow-100";case"error":return"text-red-600 bg-red-100";default:return"text-gray-600 bg-gray-100"}},Gd=e=>{switch(e){case"app":return"text-blue-600 bg-blue-100";case"lib":return"text-purple-600 bg-purple-100";case"tool":return"text-orange-600 bg-orange-100";default:return"text-gray-600 bg-gray-100"}},oc=(e,t)=>{const n=t.find(s=>s.name===e);if(!n)return"text-gray-400";switch(n.status){case"healthy":return"text-green-500";case"warning":return"text-yellow-500";case"error":return"text-red-500";default:return"text-gray-400"}},_g=e=>{const t=e.length,n=e.reduce((o,u)=>o+Object.keys(u.dependencies).length,0),s=e.filter(o=>Object.keys(o.dependencies).length===0).length,l=e.filter(o=>o.dependents.length===0).length,a=Og(e),i=t>0?n/t:0,c=Kd(e);return{totalPackages:t,totalDependencies:n,circularDependencies:c.length,leafPackages:s,rootPackages:l,maxDepth:a,avgDependencies:Math.round(i*10)/10}},Og=e=>{const t=new Set;let n=0;const s=(l,a)=>{if(t.has(l))return a;t.add(l);const i=e.find(o=>o.name===l);if(!i)return a;let c=a;for(const o of Object.keys(i.dependencies)){const u=s(o,a+1);c=Math.max(c,u)}return c};for(const l of e)if(!t.has(l.name)){const a=s(l.name,0);n=Math.max(n,a)}return n},Kd=e=>{const t=[],n=new Set,s=new Set,l=[],a=i=>{if(s.has(i)){const o=l.indexOf(i),u=l.slice(o).concat(i);return t.push({cycle:u,severity:u.length>5?"high":u.length>3?"medium":"low",impact:`Circular dependency involving ${u.length} packages`}),!0}if(n.has(i))return!1;n.add(i),s.add(i),l.push(i);const c=e.find(o=>o.name===i);if(c){for(const o of Object.keys(c.dependencies))if(a(o))return!0}return s.delete(i),l.pop(),!1};for(const i of e)n.has(i.name)||a(i.name);return t},$g=(e,t,n)=>[...e].sort((s,l)=>{let a,i;switch(t){case"name":a=s.name.toLowerCase(),i=l.name.toLowerCase();break;case"dependencies":a=Object.keys(s.dependencies).length,i=Object.keys(l.dependencies).length;break;case"dependents":a=s.dependents.length,i=l.dependents.length;break;case"status":{const c={error:0,warning:1,healthy:2};a=c[s.status]||3,i=c[l.status]||3;break}default:return 0}return a<i?n==="asc"?-1:1:a>i?n==="asc"?1:-1:0}),Ig=(e,t,n=800,s=600)=>{switch(t){case"hierarchical":return Fg(e,n,s);case"circular":return Dg(e,n,s);case"force":return Ag(e,n,s);default:return e}},Fg=(e,t,n)=>{const s=[],l=new Set,a=(i,c)=>{if(l.has(i))return;l.add(i),s[c]||(s[c]=[]),s[c].push(i);const o=e.find(u=>u.name===i);o&&o.dependents.forEach(u=>a(u,c+1))};return e.filter(i=>Object.keys(i.dependencies).length===0&&i.dependents.length>0).forEach(i=>{a(i.name,0)}),s.length===0&&e.filter(i=>Object.keys(i.dependencies).length>0&&i.dependents.length>0).forEach(i=>{a(i.name,0)}),e.map(i=>{var p,m;const c=s.findIndex(g=>g.includes(i.name)),o=((p=s[c])==null?void 0:p.indexOf(i.name))||0,u=((m=s[c])==null?void 0:m.length)||1;return{...i,x:t/(s.length+1)*(c+1)-50,y:n/(u+1)*(o+1)-25}})},Dg=(e,t,n)=>{const s=t/2,l=n/2,a=Math.min(t,n)/3;return e.map((i,c)=>{const o=2*Math.PI*c/e.length;return{...i,x:s+a*Math.cos(o)-50,y:l+a*Math.sin(o)-25}})},Ag=(e,t,n)=>{const s=e.map((l,a)=>({...l,x:Math.random()*(t-100),y:Math.random()*(n-50)}));for(let l=0;l<50;l++)s.forEach(a=>{let i=0,c=0;s.forEach(o=>{if(o.name!==a.name){const u=a.x-o.x,p=a.y-o.y,m=Math.sqrt(u*u+p*p)||1,g=1e3/(m*m);i+=u/m*g,c+=p/m*g}}),Object.keys(a.dependencies).forEach(o=>{const u=s.find(p=>p.name===o);if(u){const p=u.x-a.x,m=u.y-a.y,g=Math.sqrt(p*p+m*m)||1,v=g*.01;i+=p/g*v,c+=m/g*v}}),a.x+=i*.1,a.y+=c*.1,a.x=Math.max(50,Math.min(t-100,a.x)),a.y=Math.max(25,Math.min(n-50,a.y))});return s},zg=e=>{switch(e){case"app":return"🚀";case"lib":return"📚";case"tool":return"🔧";default:return"📦"}},Bg=e=>e.length>12?`${e.substring(0,12)}...`:e,Ug=e=>{const t={};return e.forEach(n=>{t[n.name]=[]}),e.forEach(n=>{const s=n.name;[...Object.keys(n.dependencies??{}),...Object.keys(n.devDependencies??{}),...Object.keys(n.peerDependencies??{})].forEach(a=>{t[a]||(t[a]=[]),t[a].includes(s)||t[a].push(s)})}),t};function Hg({packages:e,selectedPackage:t,hoveredPackage:n,onPackageSelect:s,onPackageHover:l,layout:a}){return r.jsxs("div",{className:"relative bg-white rounded-lg shadow-sm border border-gray-200 p-6 min-h-[600px]",children:[r.jsxs("svg",{className:"w-full h-full absolute inset-0",viewBox:"0 0 800 600",children:[e.map(i=>Object.keys(i.dependencies).map(c=>{const o=e.find(p=>p.name===c);if(!o)return null;console.log("Rendering edge from",i.name,"to",o.name);const u=n===i.name||n===c||t===i.name||t===c;return r.jsxs("g",{children:[r.jsx("defs",{children:r.jsx("marker",{id:`arrow-${i.name}-${c}`,markerWidth:"10",markerHeight:"10",refX:"9",refY:"3",orient:"auto",markerUnits:"strokeWidth",children:r.jsx("path",{d:"M0,0 L0,6 L9,3 z",fill:u?"#3B82F6":"#6B7280"})})}),r.jsx("line",{x1:o.x+50,y1:o.y+25,x2:i.x,y2:i.y+25,stroke:u?"#3B82F6":"#6B7280",strokeWidth:u?"3":"2",markerEnd:`url(#arrow-${i.name}-${c})`,className:"transition-all duration-200",style:{opacity:u?1:.6}})]},`${i.name}-${c}`)})),e.map(i=>{const c=t===i.name,o=n===i.name,u=t&&(Object.keys(i.dependencies).includes(t)||Object.keys(i.dependents).includes(t));return r.jsxs("g",{children:[r.jsx("rect",{x:i.x,y:i.y,width:"100",height:"50",rx:"8",fill:"white",stroke:c?"#3B82F6":u?"#10B981":o?"#6B7280":"#E5E7EB",strokeWidth:c?"3":"2",className:"cursor-pointer transition-all duration-200",style:{filter:o||c||u?"drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1))":"none"},onMouseEnter:()=>l(i.name),onMouseLeave:()=>l(null),onClick:()=>s(c?null:i.name)}),r.jsx("text",{x:i.x+50,y:i.y+20,textAnchor:"middle",className:"text-xs font-medium fill-gray-900 pointer-events-none",children:Bg(i.name)}),r.jsxs("text",{x:i.x+50,y:i.y+35,textAnchor:"middle",className:"text-xs fill-gray-500 pointer-events-none",children:["v",i.version]}),r.jsx("circle",{cx:i.x+85,cy:i.y+15,r:"6",fill:i.status==="healthy"?"#10B981":i.status==="warning"?"#F59E0B":"#EF4444",className:"pointer-events-none"}),r.jsx("rect",{x:i.x+5,y:i.y+5,width:"12",height:"8",rx:"2",fill:i.type==="app"?"#3B82F6":i.type==="lib"?"#8B5CF6":"#F97316",className:"pointer-events-none"})]},i.name)})]}),e.length===0&&r.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:r.jsxs("div",{className:"text-center",children:[r.jsx("div",{className:"text-gray-400 text-6xl mb-4",children:"🔗"}),r.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"No dependencies found"}),r.jsx("p",{className:"text-gray-600",children:"No package dependencies to display."})]})})]})}function Vg({packages:e,selectedPackage:t,onPackageSelect:n,sortBy:s,sortOrder:l,onSortChange:a}){const i=o=>{a(o,s===o&&l==="asc"?"desc":"asc")},c=o=>s!==o?null:l==="asc"?r.jsx(Si,{className:"w-4 h-4"}):r.jsx(Ad,{className:"w-4 h-4"});return r.jsxs("div",{className:"bg-white rounded-lg shadow-sm border border-gray-200",children:[r.jsxs("div",{className:"p-6 border-b border-gray-200",children:[r.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Package Dependencies"}),r.jsx("p",{className:"text-sm text-gray-600 mt-1",children:"Click on a view details to explore its dependencies, commits, configuration and health"})]}),r.jsx("div",{className:"overflow-x-auto",children:r.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[r.jsx("thead",{className:"bg-gray-50",children:r.jsxs("tr",{children:[r.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider cursor-pointer hover:bg-gray-100",onClick:()=>i("name"),children:r.jsxs("div",{className:"flex items-center space-x-1",children:[r.jsx("span",{children:"Package"}),c("name")]})}),r.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Type"}),r.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Status"}),r.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider cursor-pointer hover:bg-gray-100",onClick:()=>i("dependencies"),children:r.jsxs("div",{className:"flex items-center space-x-1",children:[r.jsx("span",{children:"Dependencies"}),c("dependencies")]})}),r.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider cursor-pointer hover:bg-gray-100",onClick:()=>i("dependents"),children:r.jsxs("div",{className:"flex items-center space-x-1",children:[r.jsx("span",{children:"Dependents"}),c("dependents")]})}),r.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Actions"})]})}),r.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:e.map(o=>r.jsxs("tr",{className:`hover:bg-gray-50 cursor-pointer transition-colors ${t===o.name?"bg-blue-50":""}`,onClick:()=>n(o.name),children:[r.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:r.jsxs("div",{className:"flex items-center",children:[r.jsx("div",{className:"text-2xl mr-3",children:zg(o.type)}),r.jsxs("div",{children:[r.jsx("div",{className:"text-sm font-medium text-gray-900",children:o.name}),r.jsxs("div",{className:"text-sm text-gray-500",children:["v",o.version]})]})]})}),r.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:r.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${Gd(o.type)}`,children:o.type})}),r.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:r.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${Zd(o.status)}`,children:o.status})}),r.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:r.jsxs("div",{className:"text-sm text-gray-900",children:[Object.keys(o.dependencies).length,Object.keys(o.dependencies).length>0&&r.jsxs("div",{className:"text-xs text-gray-500 mt-1",children:[Object.keys(o.dependencies).slice(0,3).join(", "),Object.keys(o.dependencies).length>3&&` +${Object.keys(o.dependencies).length-3} more`]})]})}),r.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:r.jsxs("div",{className:"text-sm text-gray-900",children:[o.dependents.length,o.dependents.length>0&&r.jsxs("div",{className:"text-xs text-gray-500 mt-1",children:[o.dependents.slice(0,3).join(", "),o.dependents.length>3&&` +${o.dependents.length-3} more`]})]})}),r.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm",children:r.jsx(rt,{to:`/packages/${encodeURIComponent(o.name)}`,className:"text-blue-600 hover:text-blue-500",onClick:u=>u.stopPropagation(),children:"View Details"})})]},o.name))})]})}),e.length===0&&r.jsxs("div",{className:"text-center py-12",children:[r.jsx("div",{className:"text-gray-400 text-4xl mb-2",children:"📦"}),r.jsx("p",{className:"text-gray-500",children:"No packages found"})]})]})}function Wg({package:e,packages:t,onClose:n}){return e?r.jsxs("div",{className:"absolute top-4 right-4 bg-white p-4 rounded-lg shadow-lg border border-gray-200 w-80 max-h-[80vh] overflow-y-auto",children:[r.jsxs("div",{className:"flex items-center justify-between mb-3",children:[r.jsx("h3",{className:"text-lg font-medium text-gray-900",children:e.name}),r.jsx("button",{onClick:n,className:"text-gray-400 hover:text-gray-600 transition-colors",children:r.jsx(Pr,{className:"w-5 h-5"})})]}),r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center space-x-2 mb-2",children:[r.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${Gd(e.type)}`,children:e.type}),r.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${Zd(e.status)}`,children:e.status})]}),r.jsxs("div",{className:"text-sm text-gray-600",children:["Version: ",r.jsx("span",{className:"font-mono",children:e.version})]})]}),r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center justify-between mb-2",children:[r.jsx("h4",{className:"text-sm font-medium text-gray-700",children:"Dependencies"}),r.jsxs("span",{className:"text-xs text-gray-500",children:["(",Object.keys(e.dependencies).length,")"]})]}),Object.keys(e.dependencies).length>0?r.jsx("div",{className:"space-y-1 max-h-32 overflow-y-auto",children:Object.keys(e.dependencies).map(s=>{const l=t.find(a=>a.name===s);return l?r.jsxs("div",{className:"flex items-center justify-between text-sm py-1",children:[r.jsx("span",{className:"text-gray-600 truncate",children:l.name}),r.jsxs("div",{className:"flex items-center space-x-1",children:[r.jsx("span",{className:"text-xs text-gray-400",children:l.version}),r.jsx("span",{className:`${oc(s,t)}`,children:l.status==="healthy"?"✓":l.status==="warning"?"⚠":"✗"})]})]},s):r.jsxs("div",{className:"text-sm text-gray-400 py-1",children:[s," (not found)"]},s)})}):r.jsx("div",{className:"text-sm text-gray-500 text-center py-2",children:"No dependencies"})]}),r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center justify-between mb-2",children:[r.jsx("h4",{className:"text-sm font-medium text-gray-700",children:"Dependents"}),r.jsxs("span",{className:"text-xs text-gray-500",children:["(",e.dependents.length,")"]})]}),e.dependents.length>0?r.jsx("div",{className:"space-y-1 max-h-32 overflow-y-auto",children:e.dependents.map(s=>{const l=t.find(a=>a.name===s);return l?r.jsxs("div",{className:"flex items-center justify-between text-sm py-1",children:[r.jsx("span",{className:"text-gray-600 truncate",children:l.name}),r.jsxs("div",{className:"flex items-center space-x-1",children:[r.jsx("span",{className:"text-xs text-gray-400",children:l.version}),r.jsx("span",{className:`${oc(s,t)}`,children:l.status==="healthy"?"✓":l.status==="warning"?"⚠":"✗"})]})]},s):r.jsxs("div",{className:"text-sm text-gray-400 py-1",children:[s," (not found)"]},s)})}):r.jsx("div",{className:"text-sm text-gray-500 text-center py-2",children:"No dependents"})]}),r.jsxs("div",{className:"pt-2 border-t border-gray-200",children:[r.jsx("h4",{className:"text-sm font-medium text-gray-700 mb-2",children:"Impact Analysis"}),r.jsxs("div",{className:"space-y-1 text-xs text-gray-600",children:[r.jsxs("div",{className:"flex justify-between",children:[r.jsx("span",{children:"Direct dependencies:"}),r.jsx("span",{className:"font-medium",children:Object.keys(e.dependencies).length})]}),r.jsxs("div",{className:"flex justify-between",children:[r.jsx("span",{children:"Direct dependents:"}),r.jsx("span",{className:"font-medium",children:e.dependents.length})]}),r.jsxs("div",{className:"flex justify-between",children:[r.jsx("span",{children:"Risk level:"}),r.jsx("span",{className:`font-medium ${e.dependents.length>5?"text-red-600":e.dependents.length>2?"text-yellow-600":"text-green-600"}`,children:e.dependents.length>5?"High":e.dependents.length>2?"Medium":"Low"})]})]})]}),r.jsx("div",{className:"pt-2 border-t border-gray-200",children:r.jsx(rt,{to:`/packages/${encodeURIComponent(e.name)}`,className:"block w-full text-center bg-blue-600 text-white px-3 py-2 rounded-lg hover:bg-blue-700 text-sm font-medium transition-colors",children:"View Package Details →"})})]})]}):null}function Qg({stats:e,packages:t}){return r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4",children:[r.jsx("div",{className:"bg-white p-4 rounded-lg shadow border",children:r.jsxs("div",{className:"flex items-center",children:[r.jsx("div",{className:"p-2 bg-blue-100 rounded-lg",children:r.jsx(qs,{className:"w-6 h-6 text-blue-600"})}),r.jsxs("div",{className:"ml-4",children:[r.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Total Packages"}),r.jsx("p",{className:"text-2xl font-semibold text-gray-900",children:e.totalPackages})]})]})}),r.jsx("div",{className:"bg-white p-4 rounded-lg shadow border",children:r.jsxs("div",{className:"flex items-center",children:[r.jsx("div",{className:"p-2 bg-green-100 rounded-lg",children:r.jsx(ot,{className:"w-6 h-6 text-green-600"})}),r.jsxs("div",{className:"ml-4",children:[r.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Dependencies"}),r.jsx("p",{className:"text-2xl font-semibold text-gray-900",children:e.totalDependencies})]})]})}),r.jsx("div",{className:"bg-white p-4 rounded-lg shadow border",children:r.jsxs("div",{className:"flex items-center",children:[r.jsx("div",{className:`p-2 rounded-lg ${e.circularDependencies>0?"bg-red-100":"bg-green-100"}`,children:r.jsx(te,{className:`w-6 h-6 ${e.circularDependencies>0?"text-red-600":"text-green-600"}`})}),r.jsxs("div",{className:"ml-4",children:[r.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Circular Deps"}),r.jsx("p",{className:`text-2xl font-semibold ${e.circularDependencies>0?"text-red-600":"text-green-600"}`,children:e.circularDependencies})]})]})}),r.jsx("div",{className:"bg-white p-4 rounded-lg shadow border",children:r.jsxs("div",{className:"flex items-center",children:[r.jsx("div",{className:"p-2 bg-purple-100 rounded-lg",children:r.jsx(Er,{className:"w-6 h-6 text-purple-600"})}),r.jsxs("div",{className:"ml-4",children:[r.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Max Depth"}),r.jsx("p",{className:"text-2xl font-semibold text-gray-900",children:e.maxDepth})]})]})}),r.jsxs("div",{className:"md:col-span-4 bg-white p-4 rounded-lg shadow border",children:[r.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"Dependency Analysis"}),r.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[r.jsxs("div",{className:"text-center",children:[r.jsx("div",{className:"text-2xl font-bold text-blue-600",children:e.leafPackages}),r.jsx("div",{className:"text-sm text-gray-600",children:"Leaf Packages"}),r.jsx("div",{className:"text-xs text-gray-500",children:"No dependencies"})]}),r.jsxs("div",{className:"text-center",children:[r.jsx("div",{className:"text-2xl font-bold text-green-600",children:e.rootPackages}),r.jsx("div",{className:"text-sm text-gray-600",children:"Root Packages"}),r.jsx("div",{className:"text-xs text-gray-500",children:"No dependents"})]}),r.jsxs("div",{className:"text-center",children:[r.jsx("div",{className:"text-2xl font-bold text-purple-600",children:e.avgDependencies}),r.jsx("div",{className:"text-sm text-gray-600",children:"Avg Dependencies"}),r.jsx("div",{className:"text-xs text-gray-500",children:"Per package"})]}),r.jsxs("div",{className:"text-center",children:[r.jsx("div",{className:"text-2xl font-bold text-orange-600",children:t.filter(n=>n.status==="healthy").length}),r.jsx("div",{className:"text-sm text-gray-600",children:"Healthy Packages"}),r.jsxs("div",{className:"text-xs text-gray-500",children:[Math.round(t.filter(n=>n.status==="healthy").length/t.length*100),"% of total"]})]})]})]})]})}function Yg({cycles:e,packages:t,onPackageSelect:n}){const s=a=>{switch(a){case"high":return"bg-red-100 text-red-800 border-red-200";case"medium":return"bg-yellow-100 text-yellow-800 border-yellow-200";case"low":return"bg-blue-100 text-blue-800 border-blue-200";default:return"bg-gray-100 text-gray-800 border-gray-200"}},l=a=>{switch(a){case"high":return"🔴";case"medium":return"🟡";case"low":return"🔵";default:return"⚪"}};return e.length===0?r.jsxs("div",{className:"bg-white p-6 rounded-lg shadow border",children:[r.jsxs("div",{className:"flex items-center space-x-3 mb-4",children:[r.jsx("div",{className:"p-2 bg-green-100 rounded-lg",children:r.jsx(te,{className:"w-6 h-6 text-green-600"})}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Circular Dependencies"}),r.jsx("p",{className:"text-sm text-gray-600",children:"Dependency cycle analysis"})]})]}),r.jsxs("div",{className:"text-center py-8",children:[r.jsx("div",{className:"text-green-400 text-4xl mb-2",children:"✅"}),r.jsx("h4",{className:"text-green-800 font-medium mb-1",children:"No Circular Dependencies!"}),r.jsx("p",{className:"text-green-700 text-sm",children:"Your dependency graph is clean and free of circular references."})]})]}):r.jsxs("div",{className:"bg-white p-6 rounded-lg shadow border",children:[r.jsxs("div",{className:"flex items-center space-x-3 mb-4",children:[r.jsx("div",{className:"p-2 bg-red-100 rounded-lg",children:r.jsx(te,{className:"w-6 h-6 text-red-600"})}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Circular Dependencies"}),r.jsxs("p",{className:"text-sm text-gray-600",children:["Found ",e.length," circular dependency cycle",e.length>1?"s":""]})]})]}),r.jsx("div",{className:"space-y-4",children:e.map((a,i)=>r.jsxs("div",{className:`border rounded-lg p-4 ${s(a.severity)}`,children:[r.jsxs("div",{className:"flex items-center justify-between mb-3",children:[r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx("span",{className:"text-lg",children:l(a.severity)}),r.jsxs("span",{className:"text-sm font-medium capitalize",children:[a.severity," Severity"]})]}),r.jsxs("span",{className:"text-xs opacity-75",children:[a.cycle.length," packages affected"]})]}),r.jsx("div",{className:"mb-3",children:r.jsx("p",{className:"text-sm mb-2",children:a.impact})}),r.jsx("div",{className:"bg-white bg-opacity-50 rounded-lg p-3",children:r.jsxs("div",{className:"flex items-center flex-wrap gap-2",children:[a.cycle.map((c,o)=>r.jsxs(React.Fragment,{children:[r.jsx("button",{onClick:()=>n(c),className:"px-3 py-1 bg-white rounded-lg text-sm font-medium hover:bg-gray-50 transition-colors border shadow-sm",children:c}),o<a.cycle.length-1&&r.jsx(ec,{className:"w-4 h-4 text-gray-400"})]},`${c}-${o}`)),a.cycle.length>1&&r.jsxs(r.Fragment,{children:[r.jsx(ec,{className:"w-4 h-4 text-gray-400"}),r.jsxs("span",{className:"text-sm text-gray-500 italic",children:["(cycles back to ",a.cycle[0],")"]})]})]})}),r.jsxs("div",{className:"mt-3 pt-3 border-t border-current border-opacity-20",children:[r.jsx("h5",{className:"text-xs font-medium mb-1",children:"Recommendation:"}),r.jsxs("p",{className:"text-xs opacity-90",children:[a.severity==="high"&&"Critical: Refactor immediately to break this cycle. Consider dependency inversion or splitting packages.",a.severity==="medium"&&"Important: Plan to refactor this cycle. Review package boundaries and extract common dependencies.",a.severity==="low"&&"Minor: Monitor this cycle. Consider if these packages could be merged or dependencies restructured."]})]})]},i))}),r.jsx("div",{className:"mt-6 pt-4 border-t border-gray-200",children:r.jsxs("div",{className:"grid grid-cols-3 gap-4 text-center",children:[r.jsxs("div",{children:[r.jsx("div",{className:"text-lg font-bold text-red-600",children:e.filter(a=>a.severity==="high").length}),r.jsx("div",{className:"text-xs text-gray-600",children:"High Severity"})]}),r.jsxs("div",{children:[r.jsx("div",{className:"text-lg font-bold text-yellow-600",children:e.filter(a=>a.severity==="medium").length}),r.jsx("div",{className:"text-xs text-gray-600",children:"Medium Severity"})]}),r.jsxs("div",{children:[r.jsx("div",{className:"text-lg font-bold text-blue-600",children:e.filter(a=>a.severity==="low").length}),r.jsx("div",{className:"text-xs text-gray-600",children:"Low Severity"})]})]})})]})}function Zg({show:e}){return e?r.jsxs("div",{className:"bg-white p-4 rounded-lg shadow border",children:[r.jsx("h4",{className:"text-sm font-medium text-gray-900 mb-3",children:"Legend"}),r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{children:[r.jsx("h5",{className:"text-xs font-medium text-gray-700 mb-2",children:"Package Types"}),r.jsxs("div",{className:"grid grid-cols-3 gap-2 text-xs",children:[r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx("div",{className:"w-3 h-2 bg-blue-500 rounded"}),r.jsx("span",{children:"App"})]}),r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx("div",{className:"w-3 h-2 bg-purple-500 rounded"}),r.jsx("span",{children:"Library"})]}),r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx("div",{className:"w-3 h-2 bg-orange-500 rounded"}),r.jsx("span",{children:"Tool"})]})]})]}),r.jsxs("div",{children:[r.jsx("h5",{className:"text-xs font-medium text-gray-700 mb-2",children:"Health Status"}),r.jsxs("div",{className:"grid grid-cols-3 gap-2 text-xs",children:[r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx("div",{className:"w-3 h-3 bg-green-500 rounded-full"}),r.jsx("span",{children:"Healthy"})]}),r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx("div",{className:"w-3 h-3 bg-yellow-500 rounded-full"}),r.jsx("span",{children:"Warning"})]}),r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx("div",{className:"w-3 h-3 bg-red-500 rounded-full"}),r.jsx("span",{children:"Error"})]})]})]}),r.jsxs("div",{children:[r.jsx("h5",{className:"text-xs font-medium text-gray-700 mb-2",children:"Visual Elements"}),r.jsxs("div",{className:"space-y-1 text-xs",children:[r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsxs("svg",{width:"16",height:"8",children:[r.jsx("line",{x1:"0",y1:"4",x2:"16",y2:"4",stroke:"#6B7280",strokeWidth:"2",markerEnd:"url(#arrow)"}),r.jsx("defs",{children:r.jsx("marker",{id:"arrow",markerWidth:"10",markerHeight:"10",refX:"9",refY:"3",orient:"auto",markerUnits:"strokeWidth",children:r.jsx("path",{d:"M0,0 L0,6 L9,3 z",fill:"#6B7280"})})})]}),r.jsx("span",{children:"Dependency"})]}),r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx("div",{className:"w-4 h-3 border-2 border-blue-500 rounded bg-white"}),r.jsx("span",{children:"Selected"})]}),r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx("div",{className:"w-4 h-3 border-2 border-green-500 rounded bg-white"}),r.jsx("span",{children:"Connected"})]})]})]}),r.jsxs("div",{children:[r.jsx("h5",{className:"text-xs font-medium text-gray-700 mb-2",children:"Interactions"}),r.jsxs("div",{className:"space-y-1 text-xs text-gray-600",children:[r.jsx("div",{children:"• Click a package to select and view details"}),r.jsx("div",{children:"• Hover to highlight connections"}),r.jsx("div",{children:"• Use toolbar to change layout and zoom"})]})]})]})]}):null}function Gg(){d.useEffect(()=>{(async()=>{try{t(!0);const He=await Oe.getPackages(),Tn=Ug(He),P=He.map(T=>({...T,dependencies:{...T.dependencies,...T.devDependencies,...T.peerDependencies},dependents:Tn[T.name]}));a(P),s(null)}catch(He){s("Failed to fetch packages"),console.error("Error fetching packages:",He)}finally{t(!1)}})()},[]);const[e,t]=d.useState(!1),[n,s]=d.useState(null),[l,a]=d.useState([]),[i,c]=d.useState("graph"),[o,u]=d.useState("hierarchical"),[p,m]=d.useState(null),[g,v]=d.useState(null),[w,N]=d.useState(!0),[b,x]=d.useState(1),[h,f]=d.useState("name"),[j,S]=d.useState("asc"),E=d.useMemo(()=>Ig(l??[],o,800,600),[l,o]),y=d.useMemo(()=>$g(l,h,j),[l,h,j]),C=d.useMemo(()=>_g(l),[l]),$=d.useMemo(()=>Kd(l),[l]),R=p&&l.find($e=>$e.name===p)||null,B=()=>{console.log("Refreshing dependency graph...")},ae=$e=>{m($e)},we=($e,He)=>{f($e),S(He)},ne=()=>{window.location.reload()};return e?r.jsx(Lg,{}):n?r.jsx(Rg,{error:n,onRetry:ne}):r.jsxs("div",{className:"space-y-6",children:[r.jsx(Tg,{onRefresh:B,loading:e}),r.jsx(Qg,{stats:C,packages:l??[]}),$.length>0&&r.jsx(Yg,{cycles:$,packages:l,onPackageSelect:ae}),r.jsx(Mg,{viewMode:i,onViewModeChange:c,layout:o,onLayoutChange:u,showLegend:w,onToggleLegend:()=>N(!w),zoomLevel:b,onZoomChange:x}),r.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6",children:[r.jsx("div",{className:`${w?"lg:col-span-3":"lg:col-span-4"}`,children:i==="graph"?r.jsxs("div",{className:"relative",children:[r.jsx("div",{style:{transform:`scale(${b})`,transformOrigin:"top left"},children:r.jsx(Hg,{packages:E,selectedPackage:p,hoveredPackage:g,onPackageSelect:ae,onPackageHover:v,layout:o})}),r.jsx(Wg,{package:R,packages:l,onClose:()=>m(null)})]}):r.jsx(Vg,{packages:y,selectedPackage:p,onPackageSelect:ae,sortBy:h,sortOrder:j,onSortChange:we})}),w&&r.jsx("div",{className:"lg:col-span-1",children:r.jsx(Zg,{show:w})})]}),l.length===0&&!e&&r.jsxs("div",{className:"text-center py-12",children:[r.jsx("div",{className:"text-gray-400 text-6xl mb-4",children:"🔗"}),r.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"No dependencies found"}),r.jsx("p",{className:"text-gray-600 mb-4",children:"No package dependencies available to display."})]})]})}function Kg(){var h,f,j,S,E;const[e,t]=d.useState(0),[n,s]=d.useState(null),[l,a]=d.useState(!0),[i,c]=d.useState(null),[o,u]=d.useState(!1);d.useEffect(()=>{(async()=>{try{a(!0);const C=await Oe.getHealthStatus();console.log("Health data from inside useEffect:",C),s(C),c(null)}catch(C){c("Failed to fetch health data"),console.error("Error fetching health data:",C)}finally{a(!1)}})()},[e]),console.log("Health data from outside of useEffect:",n);const p=async()=>{try{u(!0),c(null),a(!0);try{const y=await Oe.refreshHealthStatus();console.log("Health data:",y),s(y),c(null)}catch(y){c("Failed to fetch health data"),console.error("Error fetching health data:",y)}finally{a(!1)}}catch(y){c("Failed to refresh health data"),console.error("Error refreshing health data:",y)}finally{u(!1)}},m=()=>{t(y=>y+1)},g=y=>{switch(y){case"healthy":case"success":case"pass":case"up-to-date":return"bg-green-100 text-green-800";case"warning":case"warn":case"outdated":return"bg-yellow-100 text-yellow-800";case"error":case"failed":case"fail":case"vulnerable":return"bg-red-100 text-red-800";default:return"bg-gray-100 text-gray-800"}};if(l&&!n)return r.jsx("div",{className:"flex items-center justify-center h-64",children:r.jsxs("div",{className:"text-center",children:[r.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto"}),r.jsx("p",{className:"mt-4 text-gray-600",children:"Loading health data..."})]})});if(i)return r.jsx("div",{className:"flex items-center justify-center h-64",children:r.jsxs("div",{className:"text-center",children:[r.jsx(te,{className:"w-12 h-12 text-red-500 mx-auto"}),r.jsx("p",{className:"mt-4 text-red-600",children:i}),r.jsx("button",{onClick:m,className:"mt-4 bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 transition-colors",children:"Retry"})]})});const v=n?(h=n.summary)==null?void 0:h.averageScore:0,w=n?(f=n==null?void 0:n.packages)==null?void 0:f.filter(y=>y.health.overallScore>=80).length:0,N=n?(j=n==null?void 0:n.packages)==null?void 0:j.filter(y=>y.health.overallScore>=60&&y.health.overallScore<80).length:0,b=n?(S=n==null?void 0:n.packages)==null?void 0:S.filter(y=>y.health.overallScore<60).length:0,x=[{name:"Package Health",value:w||0,status:(()=>{const y=w||0,C=(n==null?void 0:n.packages.length)||0;if(C===0)return"healthy";const $=y/C;return $>=.8?"healthy":$>=.6?"warning":"error"})(),description:`${w||0} healthy packages out of ${(n==null?void 0:n.packages.length)||0}`},{name:"Overall Score",value:Math.round(v),status:Math.round(v)>=80?"healthy":Math.round(v)>=60?"warning":"error",description:`Average health score: ${Math.round(v)}/100`},{name:"Unhealthy Packages",value:N+b||0,status:(N+b||0)===0?"healthy":(N+b||0)<=2?"warning":"error",description:`${N+b||0} packages need attention`}];return r.jsxs("div",{className:"",children:[r.jsxs("div",{className:"flex items-center justify-between my-3",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Health Status"}),r.jsx("p",{className:"text-gray-600 mt-1",children:"Monitor the health and performance of your monorepo packages"})]}),r.jsxs("button",{onClick:p,disabled:o,className:"bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 disabled:bg-blue-400 disabled:cursor-not-allowed flex items-center space-x-2 transition-colors",children:[o?r.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-white"}):r.jsx(ot,{className:"w-5 h-5"}),r.jsx("span",{children:o?"Refreshing...":"Refresh"})]})]}),o&&n&&r.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center z-50",children:r.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-lg text-center",children:[r.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto"}),r.jsx("p",{className:"mt-4 text-gray-700",children:"Refreshing health data..."})]})}),r.jsxs("div",{className:"my-3 bg-gradient-to-r from-blue-500 to-purple-600 rounded-lg p-6 text-white",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{children:[r.jsx("h2",{className:"text-xl font-semibold",children:"Overall Monorepo Health"}),r.jsx("p",{className:"text-blue-100 mt-1",children:"Based on all package metrics and recent activity"})]}),r.jsxs("div",{className:"text-right",children:[r.jsx("div",{className:"text-4xl font-bold",children:v==null?void 0:v.toFixed(2)}),r.jsx("div",{className:"text-blue-100",children:"out of 100"})]})]}),r.jsxs("div",{className:"mt-4 flex space-x-4",children:[r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx(Ke,{className:"w-5 h-5 text-green-300"}),r.jsxs("span",{children:[w," Healthy"]})]}),r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx(te,{className:"w-5 h-5 text-yellow-300"}),r.jsxs("span",{children:[N," Warnings"]})]}),r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx(Xe,{className:"w-5 h-5 text-red-300"}),r.jsxs("span",{children:[b," Errors"]})]})]})]}),r.jsx("div",{className:"my-3 grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:x.map(y=>r.jsxs("div",{className:"bg-white p-6 rounded-lg shadow border",children:[r.jsxs("div",{className:"flex items-center justify-between mb-4",children:[r.jsx("h3",{className:"text-lg font-medium text-gray-900",children:y.name}),r.jsx("div",{className:`w-3 h-3 rounded-full ${y.status==="healthy"?"bg-green-500":y.status==="warning"?"bg-yellow-500":"bg-red-500"}`})]}),r.jsx("div",{className:"flex items-end space-x-2",children:r.jsx("span",{className:"text-3xl font-bold text-gray-900",children:y.value})}),r.jsxs("div",{className:"mt-4 flex items-center justify-between",children:[r.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${g(y.status)}`,children:y.status}),r.jsx("span",{className:"text-sm text-gray-500",children:y.description})]})]},y.name))}),r.jsxs("div",{className:"my-3 bg-white rounded-lg shadow border overflow-hidden",children:[r.jsx("div",{className:"px-6 py-4 border-b border-gray-200",children:r.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Package Health Details"})}),r.jsx("div",{className:"overflow-x-auto",children:r.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[r.jsx("thead",{className:"bg-gray-50",children:r.jsxs("tr",{children:[r.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Package"}),r.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Overall Score"}),r.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Build Status"}),r.jsx("th",{className:"hidden px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Test Coverage"}),r.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Lint Status"}),r.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Security"}),r.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Dependencies"}),r.jsx("th",{className:"hidden px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Actions"})]})}),r.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:(E=n==null?void 0:n.packages)==null?void 0:E.map(y=>r.jsxs("tr",{className:"hover:bg-gray-50",children:[r.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:r.jsxs("div",{className:"flex items-center",children:[r.jsx("div",{className:"h-8 w-8 rounded-lg bg-gray-100 flex items-center justify-center",children:r.jsx("div",{className:"text-sm",children:"📦"})}),r.jsxs("div",{className:"ml-3",children:[r.jsx("div",{className:"text-sm font-medium text-gray-900",children:y.packageName}),r.jsxs("div",{className:"text-sm text-gray-500",children:["Score: ",y.health.overallScore,"/100"]})]})]})}),r.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:r.jsxs("div",{className:"flex items-center",children:[r.jsx("div",{className:"w-16 bg-gray-200 rounded-full h-2 mr-2",children:r.jsx("div",{className:`h-2 rounded-full ${y.health.overallScore>=80?"bg-green-500":y.health.overallScore>=60?"bg-yellow-500":"bg-red-500"}`,style:{width:`${y.health.overallScore}%`}})}),r.jsx("span",{className:"text-sm font-medium text-gray-900",children:y.health.overallScore})]})}),r.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:r.jsxs("div",{className:"flex items-center",children:[r.jsx("div",{className:`w-3 h-3 rounded-full ${y.health.buildStatus==="success"?"bg-green-500":y.health.buildStatus==="unknown"?"bg-yellow-500":"bg-red-500"}`}),r.jsx("span",{className:`ml-2 inline-flex px-2 py-1 text-xs font-semibold rounded-full ${g(y.health.buildStatus==="success"?"healthy":y.health.buildStatus==="unknown"?"warning":"error")}`,children:y.health.buildStatus==="success"?"healthy":y.health.buildStatus==="unknown"?"warning":"error"})]})}),r.jsx("td",{className:"hidden px-6 py-4 whitespace-nowrap",children:r.jsxs("div",{className:"flex items-center",children:[r.jsx(q0,{className:"w-4 h-4 text-gray-400 mr-1"}),r.jsx("span",{className:"text-sm text-gray-900",children:"-"})]})}),r.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:r.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${g(y.health.lintStatus==="pass"?"pass":y.health.lintStatus==="unknown"?"warn":"fail")}`,children:y.health.lintStatus==="pass"?"pass":y.health.lintStatus==="unknown"?"warn":"fail"})}),r.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:r.jsx("div",{className:"flex items-center",children:r.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${g(y.health.securityAudit==="pass"?"pass":y.health.securityAudit==="unknown"?"warn":"fail")}`,children:y.health.securityAudit==="pass"?"pass":y.health.securityAudit==="unknown"?"warn":"fail"})})}),r.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:r.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${g(y.health.overallScore>=80?"up-to-date":y.health.overallScore>=60?"outdated":"vulnerable")}`,children:y.health.overallScore>=80?"up-to-date":y.health.overallScore>=60?"outdated":"vulnerable"})}),r.jsx("td",{className:"hidden px-6 py-4 whitespace-nowrap text-sm font-medium",children:r.jsx("div",{className:"flex space-x-2",children:r.jsx("button",{className:"text-blue-600 hover:text-blue-900",children:"Details"})})})]},y.packageName))})]})})]}),r.jsxs("div",{className:"hidden bg-white rounded-lg shadow border p-6",children:[r.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"Health Recommendations"}),r.jsxs("div",{className:"space-y-3",children:[r.jsxs("div",{className:"flex items-start space-x-3 p-3 bg-yellow-50 rounded-lg border border-yellow-200",children:[r.jsx(te,{className:"w-5 h-5 text-yellow-600 mt-0.5"}),r.jsxs("div",{children:[r.jsx("p",{className:"text-sm font-medium text-yellow-800",children:"Test Coverage Below Target"}),r.jsx("p",{className:"text-sm text-yellow-700",children:"Consider adding more tests to improve coverage above 90%"})]})]}),r.jsxs("div",{className:"flex items-start space-x-3 p-3 bg-red-50 rounded-lg border border-red-200",children:[r.jsx(Xe,{className:"w-5 h-5 text-red-600 mt-0.5"}),r.jsxs("div",{children:[r.jsx("p",{className:"text-sm font-medium text-red-800",children:"Build Failures Detected"}),r.jsx("p",{className:"text-sm text-red-700",children:"monorepo-scanner package has build failures that need immediate attention"})]})]}),r.jsxs("div",{className:"flex items-start space-x-3 p-3 bg-blue-50 rounded-lg border border-blue-200",children:[r.jsx(Er,{className:"w-5 h-5 text-blue-600 mt-0.5"}),r.jsxs("div",{children:[r.jsx("p",{className:"text-sm font-medium text-blue-800",children:"Performance Improvements Available"}),r.jsx("p",{className:"text-sm text-blue-700",children:"Consider optimizing build times and dependency resolution"})]})]})]})]})]})}function Xg({packageCount:e,onNewRelease:t}){return r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Publish Control"}),r.jsxs("p",{className:"text-gray-600 mt-1",children:["Manage package releases and versioning across your monorepo (",e," packages)"]})]}),r.jsxs("button",{onClick:t,className:"bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 flex items-center space-x-2",children:[r.jsx(px,{className:"w-5 h-5"}),r.jsx("span",{children:"New Release"})]})]})}function Jg({stats:e}){return r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[r.jsx("div",{className:"bg-white p-6 rounded-lg shadow border",children:r.jsxs("div",{className:"flex items-center",children:[r.jsx("div",{className:"p-2 bg-green-100 rounded-lg",children:r.jsx(Li,{className:"w-6 h-6 text-green-600"})}),r.jsxs("div",{className:"ml-4",children:[r.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Ready to Publish"}),r.jsx("p",{className:"text-2xl font-semibold text-gray-900",children:e.readyToPublish})]})]})}),r.jsx("div",{className:"bg-white p-6 rounded-lg shadow border",children:r.jsxs("div",{className:"flex items-center",children:[r.jsx("div",{className:"p-2 bg-blue-100 rounded-lg",children:r.jsx("div",{className:"h-6 w-6 animate-spin rounded-full border-2 border-blue-500 border-t-transparent"})}),r.jsxs("div",{className:"ml-4",children:[r.jsx("p",{className:"text-sm font-medium text-gray-600",children:"In Progress"}),r.jsx("p",{className:"text-2xl font-semibold text-gray-900",children:e.inProgress})]})]})}),r.jsx("div",{className:"bg-white p-6 rounded-lg shadow border",children:r.jsxs("div",{className:"flex items-center",children:[r.jsx("div",{className:"p-2 bg-purple-100 rounded-lg",children:r.jsx("span",{className:"text-2xl",children:"🚀"})}),r.jsxs("div",{className:"ml-4",children:[r.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Published Today"}),r.jsx("p",{className:"text-2xl font-semibold text-gray-900",children:e.published})]})]})})]})}const qg=e=>({readyToPublish:e.filter(t=>t.status==="ready").length,inProgress:e.filter(t=>t.status==="building"||t.status==="testing").length,published:e.filter(t=>t.status==="published").length}),Xd=e=>{switch(e){case"ready":case"completed":return"bg-green-100 text-green-800";case"building":case"testing":case"in-progress":return"bg-blue-100 text-blue-800";case"published":return"bg-purple-100 text-purple-800";case"failed":return"bg-red-100 text-red-800";case"scheduled":return"bg-yellow-100 text-yellow-800";default:return"bg-gray-100 text-gray-800"}},ey=e=>{switch(e){case"patch":return"bg-green-100 text-green-800";case"minor":return"bg-blue-100 text-blue-800";case"major":return"bg-red-100 text-red-800";case"prerelease":return"bg-yellow-100 text-yellow-800";default:return"bg-gray-100 text-gray-800"}},ty=(e,t)=>t==="all"?e:e.filter(n=>n.name===t);function ny({packages:e,selectedPackage:t,onPackageChange:n}){return r.jsxs("div",{className:"bg-white rounded-lg shadow border overflow-hidden",children:[r.jsx("div",{className:"px-6 py-4 border-b border-gray-200",children:r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Package Release Status"}),r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx("span",{className:"text-sm text-gray-500",children:"Filter by package:"}),r.jsxs("select",{value:t,onChange:s=>n(s.target.value),className:"px-3 py-1 border border-gray-300 rounded text-sm focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:[r.jsx("option",{value:"all",children:"All Packages"}),[...new Set(e.map(s=>s.name))].map(s=>r.jsx("option",{value:s,children:s},s))]})]})]})}),r.jsx("div",{className:"overflow-x-auto",children:r.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[r.jsx("thead",{className:"bg-gray-50",children:r.jsxs("tr",{children:[r.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Package"}),r.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Current Version"}),r.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Next Version"}),r.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Type"}),r.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Status"}),r.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Commits"}),r.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Last Published"}),r.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Actions"})]})}),r.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:e.map(s=>r.jsxs("tr",{className:"hover:bg-gray-50",children:[r.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:r.jsxs("div",{className:"flex items-center",children:[r.jsx("div",{className:"h-8 w-8 rounded-lg bg-gray-100 flex items-center justify-center",children:r.jsx(Ri,{className:"w-4 h-4 text-gray-600"})}),r.jsxs("div",{className:"ml-3",children:[r.jsx("div",{className:"text-sm font-medium text-gray-900",children:s.name}),r.jsxs("div",{className:"text-sm text-gray-500",children:[Object.keys(s.dependencies).length," dependencies"]})]})]})}),r.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-900",children:s.currentVersion}),r.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-900",children:s.nextVersion}),r.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:r.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${ey(s.publishType)}`,children:s.publishType})}),r.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:r.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${Xd(s.status)}`,children:s.status})}),r.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-900",children:s.commits}),r.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:r.jsxs("div",{className:"flex items-center text-sm text-gray-900",children:[r.jsx(ct,{className:"w-4 h-4 mr-1 text-gray-400"}),s.lastPublished]})}),r.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium",children:r.jsxs("div",{className:"flex space-x-2",children:[s.status==="ready"&&r.jsx("button",{className:"text-green-600 hover:text-green-900",children:"Publish"}),r.jsx("button",{className:"text-blue-600 hover:text-blue-900",children:"Details"}),r.jsx("button",{className:"text-purple-600 hover:text-purple-900",children:"Changelog"})]})})]},s.name))})]})})]})}function ry({releases:e,selectedStatus:t,onStatusChange:n}){const s=[{id:"1",packageName:"dashboard",version:"1.0.1",status:"scheduled",scheduledFor:"2024-01-16 10:00 AM",changelog:"Bug fixes and performance improvements",author:"team-frontend"},{id:"2",packageName:"backend",version:"1.3.0",status:"in-progress",scheduledFor:"2024-01-16 11:00 AM",startedAt:"2024-01-16 11:05 AM",changelog:"New API endpoints and enhanced security",author:"team-backend"}];return r.jsxs("div",{className:"bg-white rounded-lg shadow border overflow-hidden",children:[r.jsx("div",{className:"px-6 py-4 border-b border-gray-200",children:r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Release Schedule"}),r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx("span",{className:"text-sm text-gray-500",children:"Filter by status:"}),r.jsxs("select",{value:t,onChange:l=>n(l.target.value),className:"px-3 py-1 border border-gray-300 rounded text-sm focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:[r.jsx("option",{value:"all",children:"All Status"}),r.jsx("option",{value:"scheduled",children:"Scheduled"}),r.jsx("option",{value:"in-progress",children:"In Progress"}),r.jsx("option",{value:"completed",children:"Completed"}),r.jsx("option",{value:"failed",children:"Failed"})]})]})]})}),r.jsx("div",{className:"p-6",children:r.jsx("div",{className:"space-y-4",children:s.map(l=>r.jsxs("div",{className:"border rounded-lg p-4 hover:bg-gray-50",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{className:"flex items-center space-x-3",children:[r.jsx("div",{className:"h-8 w-8 rounded-lg bg-purple-100 flex items-center justify-center",children:r.jsx(zd,{className:"w-4 h-4 text-purple-600"})}),r.jsxs("div",{children:[r.jsxs("div",{className:"text-sm font-medium text-gray-900",children:[l.packageName," v",l.version]}),r.jsxs("div",{className:"text-sm text-gray-500",children:["by ",l.author]})]})]}),r.jsxs("div",{className:"flex items-center space-x-3",children:[r.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${Xd(l.status)}`,children:l.status}),r.jsxs("div",{className:"text-sm text-gray-500 flex items-center",children:[r.jsx(ct,{className:"w-4 h-4 mr-1"}),l.scheduledFor]})]})]}),r.jsx("div",{className:"mt-3 text-sm text-gray-700",children:l.changelog})]},l.id))})})]})}function sy(){const e=[{id:"1",packageName:"dashboard",version:"1.0.0",date:"2024-01-15",changes:["Added new dashboard layout","Improved search functionality","Fixed responsive design issues"],author:"team-frontend",type:"feature"},{id:"2",packageName:"backend",version:"1.2.0",date:"2024-01-14",changes:["Added authentication middleware","Implemented rate limiting","Fixed database connection pool"],author:"team-backend",type:"feature"}],t=n=>{switch(n){case"feature":return"bg-green-100 text-green-800";case"bugfix":return"bg-blue-100 text-blue-800";case"breaking":return"bg-red-100 text-red-800";case"docs":return"bg-gray-100 text-gray-800";default:return"bg-gray-100 text-gray-800"}};return r.jsxs("div",{className:"bg-white rounded-lg shadow border overflow-hidden",children:[r.jsx("div",{className:"px-6 py-4 border-b border-gray-200",children:r.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Recent Changelogs"})}),r.jsx("div",{className:"p-6",children:r.jsx("div",{className:"space-y-6",children:e.map(n=>r.jsxs("div",{className:"border-l-4 border-blue-500 pl-4",children:[r.jsxs("div",{className:"flex items-center justify-between mb-2",children:[r.jsxs("div",{className:"flex items-center space-x-3",children:[r.jsx("div",{className:"h-8 w-8 rounded-lg bg-blue-100 flex items-center justify-center",children:r.jsx(Ri,{className:"w-4 h-4 text-blue-600"})}),r.jsxs("div",{children:[r.jsxs("div",{className:"text-sm font-medium text-gray-900",children:[n.packageName," v",n.version]}),r.jsxs("div",{className:"text-sm text-gray-500",children:[n.date," • by ",n.author]})]})]}),r.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${t(n.type)}`,children:n.type})]}),r.jsx("div",{className:"space-y-1",children:n.changes.map((s,l)=>r.jsxs("div",{className:"flex items-start space-x-2",children:[r.jsx(Ei,{className:"w-4 h-4 text-gray-400 mt-0.5 flex-shrink-0"}),r.jsx("span",{className:"text-sm text-gray-700",children:s})]},l))})]},n.id))})})]})}function ly(){return r.jsx("div",{className:"flex items-center justify-center h-64",children:r.jsxs("div",{className:"text-center",children:[r.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto"}),r.jsx("p",{className:"mt-4 text-gray-600",children:"Loading package data..."})]})})}function ay({error:e,onRetry:t}){return r.jsx("div",{className:"flex items-center justify-center h-64",children:r.jsxs("div",{className:"text-center",children:[r.jsx(te,{className:"w-12 h-12 text-red-500 mx-auto"}),r.jsx("p",{className:"mt-4 text-red-600",children:e}),r.jsx("button",{onClick:t,className:"mt-4 bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 transition-colors",children:"Retry"})]})})}const cc=[{name:"dashboard",currentVersion:"1.0.0",nextVersion:"1.0.1",status:"ready",lastPublished:"2024-01-10",changelog:"Bug fixes and performance improvements",commits:15,dependencies:["react","tailwindcss"],publishType:"patch"},{name:"backend",currentVersion:"1.2.0",nextVersion:"1.3.0",status:"building",lastPublished:"2024-01-08",changelog:"New API endpoints and enhanced security",commits:28,dependencies:["express","prisma"],publishType:"minor"},{name:"utils",currentVersion:"0.5.2",nextVersion:"1.0.0",status:"ready",lastPublished:"2024-01-05",changelog:"Major refactor with breaking changes",commits:42,dependencies:["lodash"],publishType:"major"},{name:"ci-status",currentVersion:"0.3.1",nextVersion:"0.4.0",status:"testing",lastPublished:"2024-01-12",changelog:"Enhanced CI monitoring and reporting",commits:18,dependencies:["axios","ws"],publishType:"minor"}],iy=[{id:"1",packageName:"dashboard",version:"1.0.1",status:"scheduled",scheduledFor:"2024-01-16 10:00 AM",changelog:"Bug fixes and performance improvements",author:"team-frontend"},{id:"2",packageName:"backend",version:"1.3.0",status:"in-progress",scheduledFor:"2024-01-16 09:00 AM",startedAt:"2024-01-16 09:00 AM",changelog:"New API endpoints and enhanced security",author:"team-backend"},{id:"3",packageName:"utils",version:"1.0.0",status:"completed",scheduledFor:"2024-01-15 02:00 PM",startedAt:"2024-01-15 02:00 PM",completedAt:"2024-01-15 02:15 PM",changelog:"Major refactor with breaking changes",author:"team-shared"}];function oy(){const[e,t]=d.useState("all"),[n,s]=d.useState("all"),[l,a]=d.useState(cc),[i,c]=d.useState(!1),[o,u]=d.useState(null);d.useEffect(()=>{(async()=>{try{c(!0);const f=(await Oe.getPackages()).map(j=>({name:j.name,currentVersion:j.version,nextVersion:p(j.version),status:m(j.status),lastPublished:j.lastUpdated,changelog:j.description||"No changelog available",commits:Math.floor(Math.random()*20)+1,dependencies:j.dependencies||[],publishType:g()}));a(f),u(null)}catch(h){u("Failed to fetch package data"),console.error("Error fetching packages:",h),a(cc)}finally{c(!1)}})()},[]);const p=x=>{const h=x.split(".").map(Number);return h[2]+=1,h.join(".")},m=x=>{switch(x){case"healthy":return"ready";case"warning":return"testing";case"error":return"failed";case"building":return"building";default:return"ready"}},g=()=>{const x=["patch","minor","major","prerelease"];return x[Math.floor(Math.random()*x.length)]},v=()=>{console.log("Creating new release...")},w=()=>{window.location.reload()},N=ty(l,e),b=qg(l);return i?r.jsx(ly,{}):o?r.jsx(ay,{error:o,onRetry:w}):r.jsxs("div",{className:"space-y-6",children:[r.jsx(Xg,{packageCount:l.length,onNewRelease:v}),r.jsx(Jg,{stats:b}),r.jsx(ny,{packages:N,selectedPackage:e,onPackageChange:t}),r.jsx(ry,{releases:iy,selectedStatus:n,onStatusChange:s}),r.jsx(sy,{})]})}function cy({message:e="Loading CI/CD data..."}){return r.jsx("div",{className:"flex items-center justify-center h-64",children:r.jsxs("div",{className:"text-center",children:[r.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto"}),r.jsx("p",{className:"mt-4 text-gray-600",children:e})]})})}function uy({error:e,onRetry:t}){return r.jsx("div",{className:"flex items-center justify-center h-64",children:r.jsxs("div",{className:"text-center",children:[r.jsx(te,{className:"w-12 h-12 text-red-500 mx-auto"}),r.jsx("p",{className:"mt-4 text-red-600",children:e}),t&&r.jsx("button",{onClick:t,className:"mt-4 bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 transition-colors",children:"Retry"})]})})}function dy({onTriggerBuild:e,onCreatePipeline:t}){return r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"text-heading text-2xl",children:"CI/CD Integration"}),r.jsx("p",{className:"text-body mt-1",children:"Monitor and manage continuous integration and deployment pipelines"})]}),r.jsxs("div",{className:"flex space-x-2",children:[r.jsxs("button",{onClick:e,className:"btn-secondary flex items-center space-x-2",children:[r.jsx(Li,{className:"w-5 h-5"}),r.jsx("span",{children:"Trigger Build"})]}),r.jsxs("button",{onClick:t,className:"btn-primary flex items-center space-x-2",children:[r.jsx(bx,{className:"w-5 h-5"}),r.jsx("span",{children:"New Pipeline"})]})]})]})}const $s=e=>{switch(e){case"success":case"active":return"bg-green-100 text-green-800";case"running":return"bg-blue-100 text-blue-800";case"pending":return"bg-yellow-100 text-yellow-800";case"failed":case"cancelled":return"bg-red-100 text-red-800";case"paused":return"bg-gray-100 text-gray-800";case"skipped":return"bg-gray-100 text-gray-600";default:return"bg-gray-100 text-gray-800"}},my=e=>{switch(e){case"success":return"bg-green-100 text-green-800";case"running":return"bg-blue-100 text-blue-800";case"pending":return"bg-gray-100 text-gray-800";case"failed":return"bg-red-100 text-red-800";case"skipped":return"bg-gray-100 text-gray-600";default:return"bg-gray-100 text-gray-800"}},hy=e=>{const t=e.length,n=e.filter(o=>o.status==="success").length,s=e.filter(o=>o.status==="failed").length,l=e.filter(o=>o.status==="running").length,a=t>0?Math.round(n/t*100):0,i=e.filter(o=>o.duration),c=i.length>0?Math.round(i.reduce((o,u)=>o+(u.duration||0),0)/i.length):0;return{total:t,successful:n,failed:s,running:l,successRate:a,avgDuration:c}},fy=(e,t)=>e.filter(n=>{const s=t.package==="all"||n.packageName===t.package,l=t.status==="all"||n.status===t.status;return s&&l&&!0}),xy=e=>[...new Set(e.map(t=>t.packageName))],py=e=>[...new Set(e.map(t=>t.status))],yr=e=>{if(e<60)return`${e}s`;if(e<3600){const t=Math.floor(e/60),n=e%60;return n>0?`${t}m ${n}s`:`${t}m`}else{const t=Math.floor(e/3600),n=Math.floor(e%3600/60);return n>0?`${t}h ${n}m`:`${t}h`}},uc=e=>new Date(e).toLocaleString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}),Jd=e=>{const t=new Date(e),s=new Date().getTime()-t.getTime(),l=Math.floor(s/(1e3*60)),a=Math.floor(l/60),i=Math.floor(a/24);return l<1?"Just now":l<60?`${l} min ago`:a<24?`${a} hour${a>1?"s":""} ago`:`${i} day${i>1?"s":""} ago`},gy=e=>{if(e.status==="success"||e.status==="failed"||e.status==="cancelled")return 100;if(e.status==="pending")return 0;const t=e.stages.length;if(t===0)return 0;const n=e.stages.filter(a=>a.status==="success"||a.status==="failed"||a.status==="skipped").length,s=e.stages.filter(a=>a.status==="running").length,l=(n+s*.5)/t;return Math.round(l*100)},yy=e=>{const t=e.toLowerCase();return t.includes("build")||t.includes("compile")?"🔨":t.includes("test")?"🧪":t.includes("lint")||t.includes("format")?"✨":t.includes("deploy")||t.includes("publish")?"🚀":t.includes("security")||t.includes("audit")?"🔒":t.includes("install")||t.includes("dependencies")?"📦":"⚙️"},vy=e=>e.status==="failed"?"critical":e.status==="paused"?"warning":e.successRate<70?"critical":e.successRate<85?"warning":"healthy",qd=e=>e.substring(0,8);function jy({stats:e,onRefresh:t,loading:n=!1}){return r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("h2",{className:"text-heading text-lg",children:"Build Statistics"}),r.jsxs("button",{onClick:t,disabled:n,className:"btn-ghost",children:[r.jsx(ot,{className:`w-4 h-4 mr-2 ${n?"animate-spin":""}`}),"Refresh"]})]}),r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-5 gap-4",children:[r.jsx("div",{className:"card p-4",children:r.jsxs("div",{className:"flex items-center",children:[r.jsx("div",{className:"p-2 bg-primary-100 rounded-lg",children:r.jsx(Er,{className:"w-6 h-6 text-primary-600"})}),r.jsxs("div",{className:"ml-4",children:[r.jsx("p",{className:"text-caption font-medium",children:"Total Builds"}),r.jsx("p",{className:"text-heading text-2xl",children:e.total})]})]})}),r.jsx("div",{className:"card p-4",children:r.jsxs("div",{className:"flex items-center",children:[r.jsx("div",{className:"p-2 bg-success-100 rounded-lg",children:r.jsx(Ke,{className:"w-6 h-6 text-success-600"})}),r.jsxs("div",{className:"ml-4",children:[r.jsx("p",{className:"text-caption font-medium",children:"Successful"}),r.jsx("p",{className:"text-heading text-2xl text-success-600",children:e.successful})]})]})}),r.jsx("div",{className:"card p-4",children:r.jsxs("div",{className:"flex items-center",children:[r.jsx("div",{className:"p-2 bg-error-100 rounded-lg",children:r.jsx(Xe,{className:"w-6 h-6 text-error-600"})}),r.jsxs("div",{className:"ml-4",children:[r.jsx("p",{className:"text-caption font-medium",children:"Failed"}),r.jsx("p",{className:"text-heading text-2xl text-error-600",children:e.failed})]})]})}),r.jsx("div",{className:"card p-4",children:r.jsxs("div",{className:"flex items-center",children:[r.jsx("div",{className:"p-2 bg-info-100 rounded-lg",children:r.jsx(ct,{className:"w-6 h-6 text-info-600"})}),r.jsxs("div",{className:"ml-4",children:[r.jsx("p",{className:"text-caption font-medium",children:"Running"}),r.jsx("p",{className:"text-heading text-2xl text-info-600",children:e.running})]})]})}),r.jsxs("div",{className:"card p-4",children:[r.jsxs("div",{className:"flex items-center justify-between mb-2",children:[r.jsx("p",{className:"text-caption font-medium",children:"Success Rate"}),r.jsxs("span",{className:`text-lg font-bold ${e.successRate>=90?"text-success-600":e.successRate>=70?"text-warning-600":"text-error-600"}`,children:[e.successRate,"%"]})]}),r.jsx("div",{className:"w-full bg-neutral-200 rounded-full h-2",children:r.jsx("div",{className:`h-2 rounded-full transition-all duration-300 ${e.successRate>=90?"bg-success-500":e.successRate>=70?"bg-warning-500":"bg-error-500"}`,style:{width:`${e.successRate}%`}})})]})]}),r.jsxs("div",{className:"card p-6",children:[r.jsx("h3",{className:"text-heading text-lg mb-4",children:"Performance Metrics"}),r.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[r.jsxs("div",{className:"text-center",children:[r.jsx("div",{className:"text-heading text-2xl text-primary-600",children:yr(e.avgDuration)}),r.jsx("div",{className:"text-caption",children:"Avg Duration"})]}),r.jsxs("div",{className:"text-center",children:[r.jsxs("div",{className:"text-heading text-2xl text-success-600",children:[e.total>0?Math.round(e.successful/e.total*100):0,"%"]}),r.jsx("div",{className:"text-caption",children:"Success Rate"})]}),r.jsxs("div",{className:"text-center",children:[r.jsxs("div",{className:"text-heading text-2xl text-error-600",children:[e.total>0?Math.round(e.failed/e.total*100):0,"%"]}),r.jsx("div",{className:"text-caption",children:"Failure Rate"})]}),r.jsxs("div",{className:"text-center",children:[r.jsx("div",{className:"text-heading text-2xl text-accent-600",children:e.running}),r.jsx("div",{className:"text-caption",children:"Active Builds"})]})]})]})]})}function wy({builds:e,selectedBuild:t,onBuildSelect:n,filters:s,onFiltersChange:l}){const a=xy(e),i=py(e),c=o=>{switch(o){case"success":return r.jsx(Ke,{className:"h-5 w-5 text-green-500"});case"running":return r.jsx("div",{className:"h-5 w-5 animate-spin rounded-full border-2 border-blue-500 border-t-transparent"});case"pending":return r.jsx(ct,{className:"h-5 w-5 text-yellow-500"});case"failed":return r.jsx(Xe,{className:"h-5 w-5 text-red-500"});case"cancelled":return r.jsx(Ca,{className:"h-5 w-5 text-red-500"});default:return r.jsx(ct,{className:"h-5 w-5 text-gray-500"})}};return r.jsxs("div",{className:"space-y-4",children:[r.jsx("div",{className:"bg-white p-4 rounded-lg shadow border",children:r.jsxs("div",{className:"flex items-center space-x-4",children:[r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx(el,{className:"h-4 w-4 text-gray-400"}),r.jsxs("select",{value:s.package,onChange:o=>l({...s,package:o.target.value}),className:"border border-gray-300 rounded-md px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:[r.jsx("option",{value:"all",children:"All Packages"}),a.map(o=>r.jsx("option",{value:o,children:o},o))]})]}),r.jsxs("select",{value:s.status,onChange:o=>l({...s,status:o.target.value}),className:"border border-gray-300 rounded-md px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:[r.jsx("option",{value:"all",children:"All Statuses"}),i.map(o=>r.jsx("option",{value:o,children:o.charAt(0).toUpperCase()+o.slice(1)},o))]}),r.jsxs("select",{value:s.dateRange,onChange:o=>l({...s,dateRange:o.target.value}),className:"border border-gray-300 rounded-md px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:[r.jsx("option",{value:"all",children:"All Time"}),r.jsx("option",{value:"today",children:"Today"}),r.jsx("option",{value:"week",children:"This Week"}),r.jsx("option",{value:"month",children:"This Month"})]})]})}),r.jsxs("div",{className:"bg-white rounded-lg shadow border",children:[r.jsxs("div",{className:"p-4 border-b border-gray-200",children:[r.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Recent Builds"}),r.jsxs("p",{className:"text-sm text-gray-500 mt-1",children:[e.length," build",e.length!==1?"s":""," found"]})]}),e.length===0?r.jsxs("div",{className:"p-8 text-center",children:[r.jsx("div",{className:"text-gray-400 text-4xl mb-2",children:"🔨"}),r.jsx("p",{className:"text-gray-500",children:"No builds found matching your filters"})]}):r.jsx("div",{className:"divide-y divide-gray-200",children:e.map(o=>{const u=gy(o),p=t===o.id;return r.jsxs("div",{className:`p-4 cursor-pointer transition-colors ${p?"bg-blue-50 border-l-4 border-blue-500":"hover:bg-gray-50"}`,onClick:()=>n(p?null:o.id),children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{className:"flex items-center space-x-4",children:[c(o.status),r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx("h4",{className:"text-sm font-medium text-gray-900",children:o.packageName}),r.jsx("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-gray-100 text-gray-800",children:o.branch}),r.jsx("span",{className:"text-xs text-gray-500 font-mono",children:qd(o.commit)})]}),r.jsxs("div",{className:"flex items-center space-x-2 mt-1",children:[r.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${$s(o.status)}`,children:o.status}),r.jsxs("span",{className:"text-xs text-gray-500",children:["by ",o.triggeredBy]}),r.jsx("span",{className:"text-xs text-gray-500",children:Jd(o.startTime)})]})]})]}),r.jsxs("div",{className:"text-right",children:[o.duration&&r.jsx("div",{className:"text-sm font-medium text-gray-900",children:yr(o.duration)}),o.status==="running"&&r.jsx("div",{className:"mt-1",children:r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx("div",{className:"w-20 bg-gray-200 rounded-full h-2",children:r.jsx("div",{className:"bg-blue-500 h-2 rounded-full transition-all duration-300",style:{width:`${u}%`}})}),r.jsxs("span",{className:"text-xs text-gray-500",children:[u,"%"]})]})})]})]}),p&&o.stages.length>0&&r.jsx("div",{className:"mt-4 pt-4 border-t border-gray-100",children:r.jsx("div",{className:"flex items-center space-x-2",children:o.stages.map((m,g)=>r.jsx("div",{className:`flex items-center px-2 py-1 text-xs rounded ${$s(m.status)}`,title:`${m.name}: ${m.status}`,children:m.name},m.name))})})]},o.id)})})]})]})}function Ny({pipelines:e,onPipelineSelect:t,onPipelineToggle:n}){const s=a=>{switch(a){case"healthy":return r.jsx(Ke,{className:"w-5 h-5 text-green-500"});case"warning":return r.jsx(te,{className:"w-5 h-5 text-yellow-500"});case"critical":return r.jsx(Xe,{className:"w-5 h-5 text-red-500"});default:return r.jsx(Ms,{className:"w-5 h-5 text-gray-500"})}},l=a=>{switch(a){case"healthy":return"bg-green-100 text-green-800";case"warning":return"bg-yellow-100 text-yellow-800";case"critical":return"bg-red-100 text-red-800";default:return"bg-gray-100 text-gray-800"}};return e.length===0?r.jsx("div",{className:"bg-white rounded-lg shadow border p-6",children:r.jsxs("div",{className:"text-center",children:[r.jsx(Ms,{className:"w-12 h-12 text-gray-400 mx-auto mb-4"}),r.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"No Pipelines Configured"}),r.jsx("p",{className:"text-gray-600 mb-4",children:"Get started by creating your first CI/CD pipeline to automate builds and deployments."}),r.jsx("button",{className:"bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 transition-colors",children:"Create Pipeline"})]})}):r.jsxs("div",{className:"bg-white rounded-lg shadow border",children:[r.jsxs("div",{className:"p-4 border-b border-gray-200",children:[r.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Pipeline Status"}),r.jsxs("p",{className:"text-sm text-gray-500 mt-1",children:[e.length," pipeline",e.length!==1?"s":""," ","configured"]})]}),r.jsx("div",{className:"divide-y divide-gray-200",children:e.map(a=>{const i=vy(a);return r.jsxs("div",{className:"p-4 hover:bg-gray-50 transition-colors cursor-pointer",onClick:()=>t(a.id),children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{className:"flex items-center space-x-4",children:[s(i),r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx("h4",{className:"text-sm font-medium text-gray-900",children:a.name}),r.jsx("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-gray-100 text-gray-800",children:a.packageName})]}),r.jsxs("div",{className:"flex items-center space-x-4 mt-1",children:[r.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${$s(a.status)}`,children:a.status}),r.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${l(i)}`,children:i})]})]})]}),r.jsx("div",{className:"flex items-center space-x-4",children:r.jsx("button",{onClick:c=>{c.stopPropagation(),n(a.id,a.status!=="active")},className:`p-2 rounded-lg transition-colors ${a.status==="active"?"text-green-600 hover:bg-green-100":"text-gray-400 hover:bg-gray-100"}`,title:a.status==="active"?"Pause Pipeline":"Activate Pipeline",children:a.status==="active"?r.jsx(up,{className:"w-5 h-5"}):r.jsx(Li,{className:"w-5 h-5"})})})]}),r.jsxs("div",{className:"mt-3 grid grid-cols-4 gap-4 text-xs",children:[r.jsxs("div",{children:[r.jsx("span",{className:"text-gray-500",children:"Success Rate:"}),r.jsxs("div",{className:`font-medium ${a.successRate>=90?"text-green-600":a.successRate>=70?"text-yellow-600":"text-red-600"}`,children:[a.successRate,"%"]})]}),r.jsxs("div",{children:[r.jsx("span",{className:"text-gray-500",children:"Avg Duration:"}),r.jsx("div",{className:"font-medium text-gray-900",children:yr(a.avgDuration)})]}),r.jsxs("div",{children:[r.jsx("span",{className:"text-gray-500",children:"Last Run:"}),r.jsx("div",{className:"font-medium text-gray-900",children:Jd(a.lastRun)})]}),r.jsxs("div",{children:[r.jsx("span",{className:"text-gray-500",children:"Triggers:"}),r.jsx("div",{className:"font-medium text-gray-900",children:a.triggers.length})]})]}),r.jsxs("div",{className:"mt-3",children:[r.jsxs("div",{className:"flex items-center justify-between text-xs mb-1",children:[r.jsx("span",{className:"text-gray-500",children:"Pipeline Health"}),r.jsxs("span",{className:"font-medium text-gray-900",children:[a.successRate,"%"]})]}),r.jsx("div",{className:"w-full bg-gray-200 rounded-full h-2",children:r.jsx("div",{className:`h-2 rounded-full transition-all duration-300 ${a.successRate>=90?"bg-green-500":a.successRate>=70?"bg-yellow-500":"bg-red-500"}`,style:{width:`${a.successRate}%`}})})]}),r.jsx("div",{className:"mt-3",children:r.jsxs("div",{className:"flex items-center space-x-1",children:[r.jsx("span",{className:"text-xs text-gray-500",children:"Triggers:"}),a.triggers.map(c=>r.jsx("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-blue-100 text-blue-800",children:c},c))]})})]},a.id)})})]})}function by({build:e,onClose:t,onCancel:n,onRetry:s}){if(!e)return null;const l=a=>{switch(a){case"success":return r.jsx(Ke,{className:"h-5 w-5 text-green-500"});case"running":return r.jsx("div",{className:"h-5 w-5 animate-spin rounded-full border-2 border-blue-500 border-t-transparent"});case"pending":return r.jsx(ct,{className:"h-5 w-5 text-yellow-500"});case"failed":return r.jsx(Xe,{className:"h-5 w-5 text-red-500"});case"cancelled":return r.jsx(Ca,{className:"h-5 w-5 text-red-500"});default:return r.jsx(ct,{className:"h-5 w-5 text-gray-500"})}};return r.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:r.jsxs("div",{className:"bg-white rounded-lg shadow-xl max-w-4xl w-full max-h-[90vh] overflow-hidden",children:[r.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-gray-200",children:[r.jsxs("div",{className:"flex items-center space-x-3",children:[l(e.status),r.jsxs("div",{children:[r.jsxs("h2",{className:"text-xl font-semibold text-gray-900",children:[e.packageName," Build"]}),r.jsxs("p",{className:"text-sm text-gray-600",children:[e.branch," • ",qd(e.commit)]})]})]}),r.jsxs("div",{className:"flex items-center space-x-2",children:[e.status==="running"&&n&&r.jsxs("button",{onClick:()=>n(e.id),className:"inline-flex items-center px-3 py-2 text-sm font-medium text-red-700 bg-red-100 rounded-lg hover:bg-red-200 transition-colors",children:[r.jsx(Ca,{className:"w-4 h-4 mr-1"}),"Cancel"]}),(e.status==="failed"||e.status==="cancelled")&&s&&r.jsxs("button",{onClick:()=>s(e.id),className:"inline-flex items-center px-3 py-2 text-sm font-medium text-green-700 bg-green-100 rounded-lg hover:bg-green-200 transition-colors",children:[r.jsx(ot,{className:"w-4 h-4 mr-1"}),"Retry"]}),r.jsx("button",{onClick:t,className:"text-gray-400 hover:text-gray-600 transition-colors",children:r.jsx(Pr,{className:"w-6 h-6"})})]})]}),r.jsxs("div",{className:"p-6 overflow-y-auto max-h-[70vh]",children:[r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 mb-6",children:[r.jsx("div",{className:"space-y-4",children:r.jsxs("div",{children:[r.jsx("h3",{className:"text-sm font-medium text-gray-700 mb-2",children:"Build Information"}),r.jsxs("div",{className:"space-y-2 text-sm",children:[r.jsxs("div",{className:"flex justify-between",children:[r.jsx("span",{className:"text-gray-600",children:"Status:"}),r.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${$s(e.status)}`,children:e.status})]}),r.jsxs("div",{className:"flex justify-between",children:[r.jsx("span",{className:"text-gray-600",children:"Started:"}),r.jsx("span",{className:"font-medium",children:uc(e.startTime)})]}),e.endTime&&r.jsxs("div",{className:"flex justify-between",children:[r.jsx("span",{className:"text-gray-600",children:"Ended:"}),r.jsx("span",{className:"font-medium",children:uc(e.endTime)})]}),e.duration&&r.jsxs("div",{className:"flex justify-between",children:[r.jsx("span",{className:"text-gray-600",children:"Duration:"}),r.jsx("span",{className:"font-medium",children:yr(e.duration)})]}),r.jsxs("div",{className:"flex justify-between",children:[r.jsx("span",{className:"text-gray-600",children:"Triggered by:"}),r.jsx("span",{className:"font-medium",children:e.triggeredBy})]})]})]})}),r.jsx("div",{className:"space-y-4",children:r.jsxs("div",{children:[r.jsx("h3",{className:"text-sm font-medium text-gray-700 mb-2",children:"Artifacts"}),e.artifacts.length>0?r.jsx("div",{className:"space-y-1",children:e.artifacts.map((a,i)=>r.jsx("div",{className:"text-sm",children:r.jsx("a",{href:"#",className:"text-blue-600 hover:text-blue-500 font-medium",children:a})},i))}):r.jsx("p",{className:"text-sm text-gray-500",children:"No artifacts generated"})]})})]}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"Build Stages"}),r.jsx("div",{className:"space-y-4",children:e.stages.map((a,i)=>r.jsxs("div",{className:"border border-gray-200 rounded-lg p-4",children:[r.jsxs("div",{className:"flex items-center justify-between mb-3",children:[r.jsxs("div",{className:"flex items-center space-x-3",children:[r.jsx("span",{className:"text-2xl",children:yy(a.name)}),r.jsxs("div",{children:[r.jsx("h4",{className:"text-sm font-medium text-gray-900",children:a.name}),r.jsxs("div",{className:"flex items-center space-x-2 mt-1",children:[r.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${my(a.status)}`,children:a.status}),a.duration&&r.jsx("span",{className:"text-xs text-gray-500",children:yr(a.duration)})]})]})]}),r.jsxs("div",{className:"text-sm text-gray-500",children:["Step ",i+1," of ",e.stages.length]})]}),a.logs&&a.logs.length>0&&r.jsxs("div",{className:"mt-3",children:[r.jsx("h5",{className:"text-xs font-medium text-gray-700 mb-2",children:"Logs"}),r.jsx("div",{className:"bg-gray-900 text-gray-100 p-3 rounded-lg text-xs font-mono max-h-32 overflow-y-auto",children:a.logs.map((c,o)=>r.jsx("div",{className:"mb-1",children:c},o))})]})]},a.name))})]})]})]})})}const ky=[{id:"1",name:"Dashboard CI",packageName:"dashboard",status:"active",lastRun:"2024-01-16T09:00:00Z",nextRun:"2024-01-16T10:00:00Z",successRate:95,avgDuration:420,triggers:["push","pull_request"]},{id:"2",name:"Backend CI",packageName:"backend",status:"active",lastRun:"2024-01-16T08:30:00Z",nextRun:"2024-01-16T09:30:00Z",successRate:88,avgDuration:900,triggers:["push","pull_request","tag"]},{id:"3",name:"Utils CI",packageName:"utils",status:"paused",lastRun:"2024-01-16T08:00:00Z",successRate:75,avgDuration:600,triggers:["push","pull_request"]}];function Sy(){const[e,t]=d.useState(!0),[n,s]=d.useState(null),[l,a]=d.useState([]),[i]=d.useState(ky),[c,o]=d.useState(null),[u,p]=d.useState({package:"all",status:"all",pipeline:"all",dateRange:"all"});d.useEffect(()=>{(async()=>{try{t(!0);const $=(await Oe.getBuildStatus()).map(R=>({id:R.id||Math.random().toString(36).substr(2,9),packageName:R.package||R.packageName||"unknown",branch:R.branch||"main",commit:R.commit||"unknown",status:R.status||"pending",startTime:R.startTime||new Date().toISOString(),endTime:R.endTime,duration:R.duration,stages:R.stages||[],triggeredBy:R.triggeredBy||"system",artifacts:R.artifacts||[]}));a($),s(null)}catch(C){s("Failed to fetch build data"),console.error("Error fetching build data:",C)}finally{t(!1)}})()},[]);const m=fy(l,u),g=hy(l),v=c&&l.find(y=>y.id===c)||null,w=()=>{window.location.reload()},N=()=>{console.log("Triggering new build...")},b=()=>{console.log("Creating new pipeline...")},x=y=>{o(y)},h=y=>{console.log("Selected pipeline:",y)},f=(y,C)=>{console.log("Toggle pipeline:",y,"active:",C)},j=y=>{console.log("Cancelling build:",y),o(null)},S=y=>{console.log("Retrying build:",y),o(null)},E=()=>{window.location.reload()};return e?r.jsx(cy,{}):n?r.jsx(uy,{error:n,onRetry:E}):r.jsxs("div",{className:"space-y-6",children:[r.jsx(dy,{onTriggerBuild:N,onCreatePipeline:b}),r.jsx(jy,{stats:g,onRefresh:w,loading:e}),r.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[r.jsx("div",{className:"lg:col-span-2",children:r.jsx(wy,{builds:m,selectedBuild:c,onBuildSelect:x,filters:u,onFiltersChange:p})}),r.jsx("div",{className:"lg:col-span-1",children:r.jsx(Ny,{pipelines:i,onPipelineSelect:h,onPipelineToggle:f})})]}),r.jsx(by,{build:v,onClose:()=>o(null),onCancel:j,onRetry:S}),m.length===0&&l.length>0&&r.jsxs("div",{className:"text-center py-12",children:[r.jsx("div",{className:"text-gray-400 text-6xl mb-4",children:"🔨"}),r.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"No builds found"}),r.jsx("p",{className:"text-gray-600 mb-4",children:"No builds match your current filters. Try adjusting your search criteria."}),r.jsx("button",{onClick:()=>p({package:"all",status:"all",pipeline:"all",dateRange:"all"}),className:"text-blue-600 hover:text-blue-500",children:"Clear Filters"})]}),l.length===0&&!e&&r.jsxs("div",{className:"text-center py-12",children:[r.jsx("div",{className:"text-gray-400 text-6xl mb-4",children:"🚀"}),r.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"No CI/CD data available"}),r.jsx("p",{className:"text-gray-600 mb-4",children:"Get started by triggering your first build or setting up a pipeline."}),r.jsxs("div",{className:"flex justify-center space-x-4",children:[r.jsx("button",{onClick:N,className:"bg-green-600 text-white px-4 py-2 rounded-lg hover:bg-green-700 transition-colors",children:"Trigger Build"}),r.jsx("button",{onClick:b,className:"bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 transition-colors",children:"Create Pipeline"})]})]})]})}function Cy({message:e="Loading configuration files..."}){return r.jsx("div",{className:"flex items-center justify-center h-64",children:r.jsxs("div",{className:"text-center",children:[r.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto"}),r.jsx("p",{className:"mt-4 text-gray-600",children:e})]})})}function Ey({error:e,onRetry:t}){return r.jsx("div",{className:"flex items-center justify-center h-64",children:r.jsxs("div",{className:"text-center",children:[r.jsx(te,{className:"w-12 h-12 text-red-500 mx-auto"}),r.jsx("p",{className:"mt-4 text-red-600",children:e}),t&&r.jsx("button",{onClick:t,className:"mt-4 bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 transition-colors",children:"Retry"})]})})}function Py({onRefresh:e,loading:t=!1}){return r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Configuration Inspector"}),r.jsx("p",{className:"text-gray-600 mt-1",children:"View and manage configuration files across your monorepo"})]}),e&&r.jsxs("button",{onClick:e,disabled:t,className:"bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed flex items-center space-x-2 transition-colors",children:[r.jsx(ot,{className:`w-5 h-5 ${t?"animate-spin":""}`}),r.jsx("span",{children:"Refresh"})]})]})}/*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT */function em(e){return typeof e>"u"||e===null}function Ly(e){return typeof e=="object"&&e!==null}function Ry(e){return Array.isArray(e)?e:em(e)?[]:[e]}function Ty(e,t){var n,s,l,a;if(t)for(a=Object.keys(t),n=0,s=a.length;n<s;n+=1)l=a[n],e[l]=t[l];return e}function My(e,t){var n="",s;for(s=0;s<t;s+=1)n+=e;return n}function _y(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var Oy=em,$y=Ly,Iy=Ry,Fy=My,Dy=_y,Ay=Ty,Mi={isNothing:Oy,isObject:$y,toArray:Iy,repeat:Fy,isNegativeZero:Dy,extend:Ay};function tm(e,t){var n="",s=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(n+='in "'+e.mark.name+'" '),n+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(n+=`
68
+
69
+ `+e.mark.snippet),s+" "+n):s}function vr(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=tm(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}vr.prototype=Object.create(Error.prototype);vr.prototype.constructor=vr;vr.prototype.toString=function(t){return this.name+": "+tm(this,t)};var Dt=vr,zy=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],By=["scalar","sequence","mapping"];function Uy(e){var t={};return e!==null&&Object.keys(e).forEach(function(n){e[n].forEach(function(s){t[String(s)]=n})}),t}function Hy(e,t){if(t=t||{},Object.keys(t).forEach(function(n){if(zy.indexOf(n)===-1)throw new Dt('Unknown option "'+n+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(n){return n},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=Uy(t.styleAliases||null),By.indexOf(this.kind)===-1)throw new Dt('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var ue=Hy;function dc(e,t){var n=[];return e[t].forEach(function(s){var l=n.length;n.forEach(function(a,i){a.tag===s.tag&&a.kind===s.kind&&a.multi===s.multi&&(l=i)}),n[l]=s}),n}function Vy(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,n;function s(l){l.multi?(e.multi[l.kind].push(l),e.multi.fallback.push(l)):e[l.kind][l.tag]=e.fallback[l.tag]=l}for(t=0,n=arguments.length;t<n;t+=1)arguments[t].forEach(s);return e}function Ea(e){return this.extend(e)}Ea.prototype.extend=function(t){var n=[],s=[];if(t instanceof ue)s.push(t);else if(Array.isArray(t))s=s.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(n=n.concat(t.implicit)),t.explicit&&(s=s.concat(t.explicit));else throw new Dt("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");n.forEach(function(a){if(!(a instanceof ue))throw new Dt("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(a.loadKind&&a.loadKind!=="scalar")throw new Dt("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(a.multi)throw new Dt("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),s.forEach(function(a){if(!(a instanceof ue))throw new Dt("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var l=Object.create(Ea.prototype);return l.implicit=(this.implicit||[]).concat(n),l.explicit=(this.explicit||[]).concat(s),l.compiledImplicit=dc(l,"implicit"),l.compiledExplicit=dc(l,"explicit"),l.compiledTypeMap=Vy(l.compiledImplicit,l.compiledExplicit),l};var Wy=Ea,Qy=new ue("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),Yy=new ue("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),Zy=new ue("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),Gy=new Wy({explicit:[Qy,Yy,Zy]});function Ky(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function Xy(){return null}function Jy(e){return e===null}var qy=new ue("tag:yaml.org,2002:null",{kind:"scalar",resolve:Ky,construct:Xy,predicate:Jy,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function ev(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}function tv(e){return e==="true"||e==="True"||e==="TRUE"}function nv(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var rv=new ue("tag:yaml.org,2002:bool",{kind:"scalar",resolve:ev,construct:tv,predicate:nv,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});function sv(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function lv(e){return 48<=e&&e<=55}function av(e){return 48<=e&&e<=57}function iv(e){if(e===null)return!1;var t=e.length,n=0,s=!1,l;if(!t)return!1;if(l=e[n],(l==="-"||l==="+")&&(l=e[++n]),l==="0"){if(n+1===t)return!0;if(l=e[++n],l==="b"){for(n++;n<t;n++)if(l=e[n],l!=="_"){if(l!=="0"&&l!=="1")return!1;s=!0}return s&&l!=="_"}if(l==="x"){for(n++;n<t;n++)if(l=e[n],l!=="_"){if(!sv(e.charCodeAt(n)))return!1;s=!0}return s&&l!=="_"}if(l==="o"){for(n++;n<t;n++)if(l=e[n],l!=="_"){if(!lv(e.charCodeAt(n)))return!1;s=!0}return s&&l!=="_"}}if(l==="_")return!1;for(;n<t;n++)if(l=e[n],l!=="_"){if(!av(e.charCodeAt(n)))return!1;s=!0}return!(!s||l==="_")}function ov(e){var t=e,n=1,s;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),s=t[0],(s==="-"||s==="+")&&(s==="-"&&(n=-1),t=t.slice(1),s=t[0]),t==="0")return 0;if(s==="0"){if(t[1]==="b")return n*parseInt(t.slice(2),2);if(t[1]==="x")return n*parseInt(t.slice(2),16);if(t[1]==="o")return n*parseInt(t.slice(2),8)}return n*parseInt(t,10)}function cv(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Mi.isNegativeZero(e)}var uv=new ue("tag:yaml.org,2002:int",{kind:"scalar",resolve:iv,construct:ov,predicate:cv,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),dv=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function mv(e){return!(e===null||!dv.test(e)||e[e.length-1]==="_")}function hv(e){var t,n;return t=e.replace(/_/g,"").toLowerCase(),n=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?n===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:n*parseFloat(t,10)}var fv=/^[-+]?[0-9]+e/;function xv(e,t){var n;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Mi.isNegativeZero(e))return"-0.0";return n=e.toString(10),fv.test(n)?n.replace("e",".e"):n}function pv(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Mi.isNegativeZero(e))}var gv=new ue("tag:yaml.org,2002:float",{kind:"scalar",resolve:mv,construct:hv,predicate:pv,represent:xv,defaultStyle:"lowercase"}),yv=Gy.extend({implicit:[qy,rv,uv,gv]}),vv=yv,nm=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),rm=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function jv(e){return e===null?!1:nm.exec(e)!==null||rm.exec(e)!==null}function wv(e){var t,n,s,l,a,i,c,o=0,u=null,p,m,g;if(t=nm.exec(e),t===null&&(t=rm.exec(e)),t===null)throw new Error("Date resolve error");if(n=+t[1],s=+t[2]-1,l=+t[3],!t[4])return new Date(Date.UTC(n,s,l));if(a=+t[4],i=+t[5],c=+t[6],t[7]){for(o=t[7].slice(0,3);o.length<3;)o+="0";o=+o}return t[9]&&(p=+t[10],m=+(t[11]||0),u=(p*60+m)*6e4,t[9]==="-"&&(u=-u)),g=new Date(Date.UTC(n,s,l,a,i,c,o)),u&&g.setTime(g.getTime()-u),g}function Nv(e){return e.toISOString()}var bv=new ue("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:jv,construct:wv,instanceOf:Date,represent:Nv});function kv(e){return e==="<<"||e===null}var Sv=new ue("tag:yaml.org,2002:merge",{kind:"scalar",resolve:kv}),_i=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
70
+ \r`;function Cv(e){if(e===null)return!1;var t,n,s=0,l=e.length,a=_i;for(n=0;n<l;n++)if(t=a.indexOf(e.charAt(n)),!(t>64)){if(t<0)return!1;s+=6}return s%8===0}function Ev(e){var t,n,s=e.replace(/[\r\n=]/g,""),l=s.length,a=_i,i=0,c=[];for(t=0;t<l;t++)t%4===0&&t&&(c.push(i>>16&255),c.push(i>>8&255),c.push(i&255)),i=i<<6|a.indexOf(s.charAt(t));return n=l%4*6,n===0?(c.push(i>>16&255),c.push(i>>8&255),c.push(i&255)):n===18?(c.push(i>>10&255),c.push(i>>2&255)):n===12&&c.push(i>>4&255),new Uint8Array(c)}function Pv(e){var t="",n=0,s,l,a=e.length,i=_i;for(s=0;s<a;s++)s%3===0&&s&&(t+=i[n>>18&63],t+=i[n>>12&63],t+=i[n>>6&63],t+=i[n&63]),n=(n<<8)+e[s];return l=a%3,l===0?(t+=i[n>>18&63],t+=i[n>>12&63],t+=i[n>>6&63],t+=i[n&63]):l===2?(t+=i[n>>10&63],t+=i[n>>4&63],t+=i[n<<2&63],t+=i[64]):l===1&&(t+=i[n>>2&63],t+=i[n<<4&63],t+=i[64],t+=i[64]),t}function Lv(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var Rv=new ue("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Cv,construct:Ev,predicate:Lv,represent:Pv}),Tv=Object.prototype.hasOwnProperty,Mv=Object.prototype.toString;function _v(e){if(e===null)return!0;var t=[],n,s,l,a,i,c=e;for(n=0,s=c.length;n<s;n+=1){if(l=c[n],i=!1,Mv.call(l)!=="[object Object]")return!1;for(a in l)if(Tv.call(l,a))if(!i)i=!0;else return!1;if(!i)return!1;if(t.indexOf(a)===-1)t.push(a);else return!1}return!0}function Ov(e){return e!==null?e:[]}var $v=new ue("tag:yaml.org,2002:omap",{kind:"sequence",resolve:_v,construct:Ov}),Iv=Object.prototype.toString;function Fv(e){if(e===null)return!0;var t,n,s,l,a,i=e;for(a=new Array(i.length),t=0,n=i.length;t<n;t+=1){if(s=i[t],Iv.call(s)!=="[object Object]"||(l=Object.keys(s),l.length!==1))return!1;a[t]=[l[0],s[l[0]]]}return!0}function Dv(e){if(e===null)return[];var t,n,s,l,a,i=e;for(a=new Array(i.length),t=0,n=i.length;t<n;t+=1)s=i[t],l=Object.keys(s),a[t]=[l[0],s[l[0]]];return a}var Av=new ue("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Fv,construct:Dv}),zv=Object.prototype.hasOwnProperty;function Bv(e){if(e===null)return!0;var t,n=e;for(t in n)if(zv.call(n,t)&&n[t]!==null)return!1;return!0}function Uv(e){return e!==null?e:{}}var Hv=new ue("tag:yaml.org,2002:set",{kind:"mapping",resolve:Bv,construct:Uv});vv.extend({implicit:[bv,Sv],explicit:[Rv,$v,Av,Hv]});function mc(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
71
+ `:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"…":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}var Vv=new Array(256),Wv=new Array(256);for(var qt=0;qt<256;qt++)Vv[qt]=mc(qt)?1:0,Wv[qt]=mc(qt);const Qv=e=>{switch(e){case"workspace":return"bg-blue-100 text-blue-800";case"package":return"bg-green-100 text-green-800";case"environment":return"bg-purple-100 text-purple-800";case"tool":return"bg-orange-100 text-orange-800";default:return"bg-gray-100 text-gray-800"}},hc=e=>{switch(e){case"valid":return"bg-green-100 text-green-800";case"warning":return"bg-yellow-100 text-yellow-800";case"error":return"bg-red-100 text-red-800";default:return"bg-gray-100 text-gray-800"}},Yv=(e,t)=>e.filter(n=>{const s=t.section==="all"||n.id===t.section,l=t.type==="all"||n.type===t.type,a=t.status==="all"||t.status==="secrets"&&n.hasSecrets||t.status==="standard"&&!n.hasSecrets,i=!t.search||n.name.toLowerCase().includes(t.search.toLowerCase())||n.path.toLowerCase().includes(t.search.toLowerCase());return s&&l&&a&&i}),Zv=e=>[...new Set(e.map(t=>t.type))],Gv=e=>{if(e===0)return"0 Bytes";const t=1024,n=["Bytes","KB","MB","GB"],s=Math.floor(Math.log(e)/Math.log(t));return parseFloat((e/Math.pow(t,s)).toFixed(2))+" "+n[s]},Kv=e=>new Date(e).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}),sm=e=>{var s;const t=(s=e.split(".").pop())==null?void 0:s.toLowerCase(),n={json:"json",yaml:"yaml",yml:"yaml",js:"javascript",mjs:"javascript",cjs:"javascript",ts:"typescript",mts:"typescript",cts:"typescript",env:"env",config:"text",rc:"text",lock:"text",md:"markdown",txt:"text"};return e==="package.json"?"json":e==="docker-compose.yml"||e==="docker-compose.yaml"?"yaml":e===".eslintrc.js"||e===".prettierrc.js"?"javascript":e==="tsconfig.json"?"json":n[t||""]||"text"},Xv=e=>{const t=[/^([A-Z_]+(?:PASSWORD|SECRET|KEY|TOKEN|AUTH)[A-Z_]*)\s*=\s*(.+)$/gim,/"([^"]*(?:password|secret|key|token|auth)[^"]*)"\s*:\s*"([^"]+)"/gi,/^(\s*[^:\s]*(?:password|secret|key|token|auth)[^:\s]*)\s*:\s*(.+)$/gim];let n=e;return t.forEach(s=>{n=n.replace(s,(l,a,i)=>{const c="*".repeat(Math.min(i.length,8));return l.replace(i,c)})}),n},Jv=e=>{switch(sm(e)){case"json":return"📄";case"yaml":return"📋";case"javascript":case"typescript":return"⚙️";case"env":return"🔐";case"markdown":return"📝";default:return"📁"}};function qv({configs:e,selectedConfig:t,onConfigSelect:n,filters:s,onFiltersChange:l}){const a=Zv(e);return r.jsxs("div",{className:"bg-white rounded-lg shadow border h-full flex flex-col max-h-[calc(100vh-180px)]",children:[r.jsxs("div",{className:"p-4 border-b border-gray-200",children:[r.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"Configuration Files"}),r.jsxs("div",{className:"relative mb-4",children:[r.jsx(Pi,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 h-4 w-4"}),r.jsx("input",{type:"text",placeholder:"Search config files...",value:s.search,onChange:i=>l({...s,search:i.target.value}),className:"w-full pl-10 pr-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent text-sm"})]}),r.jsxs("div",{className:"space-y-3",children:[r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx(el,{className:"h-4 w-4 text-gray-400"}),r.jsxs("select",{value:s.type,onChange:i=>l({...s,type:i.target.value}),className:"flex-1 border border-gray-300 rounded-md px-3 py-1 text-sm focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:[r.jsx("option",{value:"all",children:"All Types"}),a.map(i=>r.jsx("option",{value:i,children:i.charAt(0).toUpperCase()+i.slice(1)},i))]})]}),r.jsxs("select",{value:s.status,onChange:i=>l({...s,status:i.target.value}),className:"w-full border border-gray-300 rounded-md px-3 py-1 text-sm focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:[r.jsx("option",{value:"all",children:"All Files"}),r.jsx("option",{value:"standard",children:"Standard Files"}),r.jsx("option",{value:"secrets",children:"Files with Secrets"})]})]})]}),r.jsx("div",{className:"flex-1 overflow-y-auto",children:e.length===0?r.jsxs("div",{className:"p-4 text-center text-gray-500",children:[r.jsx("div",{className:"text-4xl mb-2",children:"📁"}),r.jsx("p",{className:"text-sm",children:"No configuration files found"})]}):r.jsx("div",{className:"p-2",children:e.map(i=>r.jsx("button",{onClick:()=>n(i.id),className:`w-full text-left p-3 rounded-lg mb-2 transition-colors ${t===i.id?"bg-blue-50 border border-blue-200":"hover:bg-gray-50 border border-transparent"}`,children:r.jsxs("div",{className:"flex items-start space-x-3",children:[r.jsx("div",{className:"text-2xl",children:Jv(i.name)}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsxs("div",{className:"flex items-center space-x-2 mb-1",children:[r.jsx("p",{className:"text-sm font-medium text-gray-900 truncate",children:i.name}),i.hasSecrets&&r.jsx("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-yellow-100 text-yellow-800",children:"🔒"})]}),r.jsx("p",{className:"text-xs text-gray-500 truncate mb-1",children:i.path}),r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("span",{className:`inline-flex px-2 py-0.5 text-xs font-semibold rounded-full ${Qv(i.type)}`,children:i.type}),r.jsx("span",{className:"text-xs text-gray-400",children:Gv(i.size)})]}),r.jsx("p",{className:"text-xs text-gray-400 mt-1",children:Kv(i.lastModified)})]})]})},i.id))})}),r.jsx("div",{className:"p-4 border-t border-gray-200",children:r.jsxs("div",{className:"text-xs text-gray-500",children:[e.length," file",e.length!==1?"s":""," found"]})})]})}function e1({isEditing:e,canEdit:t,hasSecrets:n,showSecrets:s,saving:l,onStartEdit:a,onSaveEdit:i,onCancelEdit:c,onToggleSecrets:o,onRefresh:u,content:p}){const[m,g]=d.useState(!1),v=async()=>{try{const w=p||"No content available";await navigator.clipboard.writeText(w),g(!0),setTimeout(()=>{g(!1)},4e3)}catch(w){console.error("Failed to copy to clipboard:",w),g(!0),setTimeout(()=>g(!1),2e3)}};return l?r.jsxs("div",{className:"flex items-center justify-between p-4 bg-gray-50 border-b border-gray-200",children:[r.jsx("div",{className:"flex items-center space-x-2",children:r.jsxs("div",{className:"inline-flex items-center px-3 py-1.5 text-sm font-medium text-orange-600 bg-white border border-gray-300 rounded-lg",children:[r.jsx(ot,{className:"w-4 h-4 mr-1 animate-spin"}),"Saving..."]})}),r.jsx("div",{className:"flex items-center space-x-2",children:r.jsxs("button",{onClick:u,className:"inline-flex items-center px-3 py-1.5 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-lg hover:bg-gray-50 transition-colors",children:[r.jsx(ot,{className:"w-4 h-4 mr-1"}),"Refresh"]})})]}):r.jsxs("div",{className:"flex items-center justify-between p-4 bg-gray-50 border-b border-gray-200",children:[r.jsxs("div",{className:"flex items-center space-x-2",children:[e?r.jsxs(r.Fragment,{children:[r.jsxs("button",{onClick:i,className:"inline-flex items-center px-3 py-1.5 text-sm font-medium text-white bg-green-600 rounded-lg hover:bg-green-700 transition-colors",children:[r.jsx(Ci,{className:"w-4 h-4 mr-1"}),"Save"]}),r.jsxs("button",{onClick:c,className:"inline-flex items-center px-3 py-1.5 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-lg hover:bg-gray-50 transition-colors",children:[r.jsx(Pr,{className:"w-4 h-4 mr-1"}),"Cancel"]})]}):t&&r.jsxs("button",{onClick:a,className:"inline-flex items-center px-3 py-1.5 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-lg hover:bg-gray-50 transition-colors",children:[r.jsx(hp,{className:"w-4 h-4 mr-1"}),"Edit"]}),n&&r.jsx("button",{onClick:o,className:`inline-flex items-center px-3 py-1.5 text-sm font-medium rounded-lg transition-colors ${s?"text-red-700 bg-red-100 hover:bg-red-200":"text-yellow-700 bg-yellow-100 hover:bg-yellow-200"}`,children:s?r.jsxs(r.Fragment,{children:[r.jsx(Dx,{className:"w-4 h-4 mr-1"}),"Hide Secrets"]}):r.jsxs(r.Fragment,{children:[r.jsx(Bx,{className:"w-4 h-4 mr-1"}),"Show Secrets"]})})]}),r.jsx("div",{className:"flex items-center space-x-2",children:r.jsx("button",{onClick:v,className:`inline-flex items-center px-3 py-1.5 text-sm font-medium rounded-lg transition-colors ${m?"text-green-700 bg-green-100 border border-green-300":"text-gray-700 bg-white border border-gray-300 hover:bg-gray-50"}`,children:m?r.jsxs(r.Fragment,{children:[r.jsx(Px,{className:"w-4 h-4 mr-1"}),"Copied!"]}):r.jsxs(r.Fragment,{children:[r.jsx(Tx,{className:"w-4 h-4 mr-1"}),"Copy"]})})})]})}function t1({config:e,isEditing:t,editValue:n,onStartEdit:s,onSaveEdit:l,onCancelEdit:a,onValueChange:i,showSecrets:c,onToggleSecrets:o}){if(!e)return r.jsx("div",{className:"flex items-center justify-center h-64 bg-gray-50 rounded-lg",children:r.jsxs("div",{className:"text-center",children:[r.jsx("div",{className:"text-gray-400 text-4xl mb-2",children:"📄"}),r.jsx("p",{className:"text-gray-500",children:"Select a configuration file to view or edit"})]})});const u=sm(e.name),p=c?e.content:Xv(e.content);return r.jsxs("div",{className:"bg-white rounded-lg shadow border h-full flex flex-col",children:[r.jsx("div",{className:"p-4 border-b border-gray-200",children:r.jsxs("div",{className:"flex items-center space-x-3",children:[r.jsx("div",{className:"text-2xl",children:"📄"}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-lg font-medium text-gray-900",children:e.name}),r.jsx("p",{className:"text-sm text-gray-500",children:e.path})]})]})}),r.jsx("div",{className:"flex-1 p-4",children:t?r.jsx("div",{className:"h-full",children:r.jsx("textarea",{value:n,onChange:m=>i(m.target.value),className:"w-full h-full font-mono text-sm border border-gray-300 rounded-lg p-4 focus:ring-2 focus:ring-blue-500 focus:border-transparent resize-none",placeholder:"Enter configuration content...",spellCheck:!1})}):r.jsx("div",{className:"h-full",children:r.jsx("pre",{className:"w-full h-full font-mono text-sm bg-gray-50 border border-gray-200 rounded-lg p-4 overflow-auto whitespace-pre-wrap",children:r.jsx("code",{className:`language-${u}`,children:p})})})}),r.jsx("div",{className:"p-4 border-t border-gray-200 bg-gray-50",children:r.jsxs("div",{className:"flex items-center justify-between text-sm text-gray-500",children:[r.jsxs("div",{className:"flex items-center space-x-4",children:[r.jsxs("span",{children:["Language: ",u.toUpperCase()]}),r.jsxs("span",{children:["Size: ",e.content.length," characters"]}),e.hasSecrets&&r.jsx("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-yellow-100 text-yellow-800",children:"🔒 Contains secrets"})]}),r.jsx("div",{children:t?r.jsx("span",{className:"text-blue-600 font-medium",children:"Editing mode"}):e.isEditable?r.jsx("span",{className:"text-green-600",children:"Editable"}):r.jsx("span",{className:"text-gray-400",children:"Read-only"})})]})})]})}function n1({validation:e,configName:t}){const n=o=>{switch(o){case"valid":return r.jsx(Ke,{className:"w-5 h-5 text-green-500"});case"warning":return r.jsx(te,{className:"w-5 h-5 text-yellow-500"});case"error":return r.jsx(Xe,{className:"w-5 h-5 text-red-500"});default:return r.jsx(vn,{className:"w-5 h-5 text-gray-500"})}},l=(()=>e.some(o=>o.status==="error")?"error":e.some(o=>o.status==="warning")?"warning":"valid")(),a=e.filter(o=>o.status==="error").length,i=e.filter(o=>o.status==="warning").length,c=e.filter(o=>o.status==="valid").length;return e.length===0?r.jsx("div",{className:"bg-white rounded-lg shadow border p-6",children:r.jsxs("div",{className:"text-center",children:[r.jsx(vn,{className:"w-8 h-8 text-gray-400 mx-auto mb-2"}),r.jsx("h3",{className:"text-sm font-medium text-gray-900 mb-1",children:"No Validation Results"}),r.jsx("p",{className:"text-sm text-gray-500",children:"Select a configuration file to see validation results."})]})}):r.jsxs("div",{className:"bg-white rounded-lg shadow border",children:[r.jsxs("div",{className:"p-4 border-b border-gray-200",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Validation Results"}),r.jsxs("div",{className:"flex items-center space-x-2",children:[n(l),r.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${hc(l)}`,children:l.toUpperCase()})]})]}),r.jsxs("p",{className:"text-sm text-gray-500 mt-1",children:["Validation results for ",t]})]}),r.jsx("div",{className:"p-4 border-b border-gray-200 bg-gray-50",children:r.jsxs("div",{className:"grid grid-cols-3 gap-4 text-center",children:[r.jsxs("div",{children:[r.jsx("div",{className:"text-lg font-bold text-green-600",children:c}),r.jsx("div",{className:"text-xs text-gray-600",children:"Valid"})]}),r.jsxs("div",{children:[r.jsx("div",{className:"text-lg font-bold text-yellow-600",children:i}),r.jsx("div",{className:"text-xs text-gray-600",children:"Warnings"})]}),r.jsxs("div",{children:[r.jsx("div",{className:"text-lg font-bold text-red-600",children:a}),r.jsx("div",{className:"text-xs text-gray-600",children:"Errors"})]})]})}),r.jsx("div",{className:"p-4",children:r.jsx("div",{className:"space-y-3",children:e.map((o,u)=>r.jsx("div",{className:`p-3 rounded-lg border ${o.status==="error"?"border-red-200 bg-red-50":o.status==="warning"?"border-yellow-200 bg-yellow-50":"border-green-200 bg-green-50"}`,children:r.jsxs("div",{className:"flex items-start space-x-3",children:[n(o.status),r.jsxs("div",{className:"flex-1",children:[r.jsxs("div",{className:"flex items-center space-x-2 mb-1",children:[r.jsx("h4",{className:"text-sm font-medium text-gray-900",children:o.field}),r.jsx("span",{className:`inline-flex px-2 py-0.5 text-xs font-semibold rounded-full ${hc(o.status)}`,children:o.status})]}),r.jsx("p",{className:"text-sm text-gray-600",children:o.message})]})]})},u))})}),(a>0||i>0)&&r.jsx("div",{className:"p-4 border-t border-gray-200 bg-gray-50",children:r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{className:"text-sm text-gray-600",children:[a>0&&r.jsxs("span",{className:"text-red-600 font-medium",children:[a," error",a>1?"s":""," need attention"]}),i>0&&a===0&&r.jsxs("span",{className:"text-yellow-600 font-medium",children:[i," warning",i>1?"s":""," to review"]})]}),r.jsx("button",{className:"text-blue-600 hover:text-blue-500 text-sm font-medium",children:"View Details"})]})})]})}function r1(){const[e,t]=d.useState(!0),[n,s]=d.useState(!1),[l,a]=d.useState(null),[i,c]=d.useState([]),[o,u]=d.useState(null),[p,m]=d.useState(!1),[g,v]=d.useState(""),[w,N]=d.useState(!1),[b,x]=d.useState({section:"all",type:"all",status:"all",search:""});d.useEffect(()=>{(async()=>{try{t(!0);const ae=await Oe.getConfigurationFiles();console.log("Config data from inside useEffect:",ae);const we=ae.map(ne=>{var $e;return{id:ne.id||ne.name,name:ne.name,path:ne.path||ne.name,type:ne.type||"text",content:ne.content||"",size:(($e=ne.content)==null?void 0:$e.length)||0,lastModified:ne.lastModified||new Date().toISOString(),hasSecrets:ne.hasSecrets||!1,isEditable:ne.isEditable!==!1,validation:ne.validation||[]}});c(we),a(null)}catch(ae){a("Failed to fetch configuration files"),console.error("Error fetching config files:",ae)}finally{t(!1)}})()},[]);const h=Yv(i,b),f=o&&i.find(B=>B.id===o)||null;console.log("selectedConfigData:",f);const j=()=>{window.location.reload()},S=B=>{u(B),m(!1),v("")},E=()=>{f&&(m(!0),v(f.content))},y=async()=>{if(f&&!n)try{s(!0),a(null),console.log("Saving config:",f.name,g);const B=await Oe.saveConfigurationFile(f.id,g);c(ae=>ae.map(we=>we.id===o?{...B,isEditable:we.isEditable}:we)),o===f.id&&u(f.id),m(!1),v(""),console.log("Config file saved successfully")}catch(B){console.error("Error saving config file:",B),a(`Failed to save configuration: ${B.message}`)}finally{s(!1)}},C=()=>{m(!1),v("")},$=()=>{N(!w)},R=()=>{window.location.reload()};return e?r.jsx(Cy,{}):l?r.jsx(Ey,{error:l,onRetry:R}):r.jsxs("div",{className:"space-y-6",children:[r.jsx(Py,{onRefresh:j,loading:e}),r.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-[800px]",children:[r.jsx("div",{className:"lg:col-span-1",children:r.jsx(qv,{configs:h,selectedConfig:o,onConfigSelect:S,filters:b,onFiltersChange:x})}),r.jsxs("div",{className:"lg:col-span-2 flex flex-col",children:[f&&r.jsx("div",{className:"mb-4",children:r.jsx(e1,{isEditing:p,canEdit:f.isEditable,hasSecrets:f.hasSecrets,showSecrets:w,saving:n,onStartEdit:E,onSaveEdit:y,onCancelEdit:C,onToggleSecrets:$,onRefresh:j,content:p?g:f==null?void 0:f.content})}),r.jsx("div",{className:"flex-1",children:r.jsx(t1,{config:f,isEditing:p,editValue:g,saving:n,onStartEdit:E,onSaveEdit:y,onCancelEdit:C,onValueChange:v,showSecrets:w,onToggleSecrets:$})})]}),r.jsx("div",{className:"lg:col-span-1 space-y-6",children:r.jsx(n1,{validation:(f==null?void 0:f.validation)||[],configName:(f==null?void 0:f.name)||"No file selected"})})]}),h.length===0&&!e&&r.jsxs("div",{className:"text-center py-12",children:[r.jsx("div",{className:"text-gray-400 text-6xl mb-4",children:"📁"}),r.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"No configuration files found"}),r.jsx("p",{className:"text-gray-600 mb-4",children:b.search||b.type!=="all"||b.status!=="all"?"Try adjusting your filters to see more results.":"No configuration files are available to inspect."}),(b.search||b.type!=="all"||b.status!=="all")&&r.jsx("button",{onClick:()=>x({section:"all",type:"all",status:"all",search:""}),className:"text-blue-600 hover:text-blue-500",children:"Clear Filters"})]})]})}const fc=[{name:"Dashboard",href:"/",icon:Zx},{name:"Packages",href:"/packages",icon:qs},{name:"Dependencies",href:"/dependencies",icon:Er},{name:"Health Status",href:"/health",icon:Ud},{name:"Configuration",href:"/config",icon:Ms}];function s1({children:e}){var n;const t=Cr();return r.jsxs("div",{className:"min-h-screen bg-neutral-50",children:[r.jsxs("div",{className:"fixed inset-y-0 left-0 z-50 w-64 bg-white shadow-medium",children:[r.jsx("div",{className:"flex h-16 items-center justify-center border-b border-neutral-200",children:r.jsx("h1",{className:"text-heading text-xl text-primary-700",children:"MonoDog"})}),r.jsx("nav",{className:"mt-8 px-4",children:r.jsx("ul",{className:"space-y-2",children:fc.map(s=>{const l=t.pathname===s.href;return r.jsx("li",{children:r.jsxs(rt,{to:s.href,className:`nav-link ${l?"nav-link-active":"nav-link-inactive"}`,children:[r.jsx(s.icon,{className:"mr-3 h-5 w-5"}),s.name]})},s.name)})})})]}),r.jsxs("div",{className:"pl-64",children:[r.jsxs("header",{className:"bg-white shadow-soft border-b border-neutral-200 flex items-center justify-between px-6 py-4",children:[r.jsx("div",{className:"flex items-center gap-4",children:r.jsx("h2",{className:"text-heading text-lg font-semibold",children:((n=fc.find(s=>s.href===t.pathname))==null?void 0:n.name)||"Dashboard"})}),r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsxs("div",{className:"flex flex-col items-end text-sm",children:[r.jsx("span",{className:"font-medium text-primary-700",children:"John Doe"}),r.jsx("span",{className:"text-neutral-500",children:"Admin"})]}),r.jsx("img",{src:"https://ui-avatars.com/api/?name=John+Doe&background=0D8ABC&color=fff",alt:"User Avatar",className:"h-8 w-8 rounded-full border border-neutral-200"})]})]}),r.jsx("main",{className:"p-6",children:e})]})]})}const l1={Dashboard:cg,PackagesOverview:Eg,PackageDetail:Pg,DependencyGraph:Gg,HealthStatus:Kg,PublishControl:oy,CIIntegration:Sy,ConfigInspector:r1},a1=({componentName:e})=>{const t=l1[e];return t?r.jsx(t,{}):r.jsx("div",{className:"flex items-center justify-center h-64",children:r.jsxs("div",{className:"text-center",children:[r.jsx("h2",{className:"text-xl font-semibold text-gray-900 mb-2",children:"Page Not Found"}),r.jsx("p",{className:"text-gray-600",children:"The requested page could not be found."})]})})};function i1(){return r.jsxs(P0,{children:[Dd.map(e=>r.jsx(ba,{path:e.path,element:r.jsx(a1,{componentName:e.component})},e.path)),r.jsx(ba,{path:"*",element:r.jsx("div",{className:"flex items-center justify-center h-64",children:r.jsxs("div",{className:"text-center",children:[r.jsx("div",{className:"text-gray-400 text-6xl mb-4",children:"🔍"}),r.jsx("h2",{className:"text-xl font-semibold text-gray-900 mb-2",children:"404 - Page Not Found"}),r.jsx("p",{className:"text-gray-600 mb-4",children:"The page you're looking for doesn't exist or has been moved."}),r.jsx("a",{href:"/",className:"text-blue-600 hover:text-blue-500 font-medium",children:"Go back to Dashboard"})]})})})]})}function o1(){return r.jsx($0,{children:r.jsx(s1,{children:r.jsx(i1,{})})})}Ll.createRoot(document.getElementById("root")).render(r.jsx(o1,{}));