specweave 1.0.261 → 1.0.263

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 (133) hide show
  1. package/.claude-plugin/README.md +0 -2
  2. package/CLAUDE.md +27 -27
  3. package/bin/specweave.js +14 -85
  4. package/dist/dashboard/assets/index-Cv1XUAKk.css +1 -0
  5. package/dist/dashboard/assets/index-DHOztQSu.js +11 -0
  6. package/dist/dashboard/index.html +2 -2
  7. package/dist/src/adapters/README.md +1 -1
  8. package/dist/src/adapters/agents-md-generator.js +1 -1
  9. package/dist/src/adapters/agents-md-generator.js.map +1 -1
  10. package/dist/src/adapters/claude/README.md +8 -8
  11. package/dist/src/adapters/claude/adapter.js +2 -2
  12. package/dist/src/adapters/claude-md-generator.js +2 -2
  13. package/dist/src/adapters/claude-md-generator.js.map +1 -1
  14. package/dist/src/adapters/cursor/README.md +7 -7
  15. package/dist/src/adapters/generic/README.md +2 -2
  16. package/dist/src/cli/commands/create-increment.d.ts +1 -1
  17. package/dist/src/cli/commands/create-increment.js +1 -1
  18. package/dist/src/cli/commands/update.d.ts.map +1 -1
  19. package/dist/src/cli/commands/update.js +64 -1
  20. package/dist/src/cli/commands/update.js.map +1 -1
  21. package/dist/src/cli/helpers/init/api-docs-config.js +7 -7
  22. package/dist/src/cli/helpers/init/api-docs-config.js.map +1 -1
  23. package/dist/src/core/config/types.d.ts +18 -0
  24. package/dist/src/core/config/types.d.ts.map +1 -1
  25. package/dist/src/core/config/types.js +4 -0
  26. package/dist/src/core/config/types.js.map +1 -1
  27. package/dist/src/core/external-tools/external-items-display.d.ts.map +1 -1
  28. package/dist/src/core/external-tools/external-items-display.js +1 -11
  29. package/dist/src/core/external-tools/external-items-display.js.map +1 -1
  30. package/dist/src/core/increment/increment-archiver.js +1 -1
  31. package/dist/src/core/increment/increment-archiver.js.map +1 -1
  32. package/dist/src/core/increment/metadata-manager.js +2 -2
  33. package/dist/src/core/increment/metadata-manager.js.map +1 -1
  34. package/dist/src/core/increment/template-creator.d.ts +1 -1
  35. package/dist/src/core/increment/template-creator.js +4 -4
  36. package/dist/src/core/lazy-loading/llm-plugin-detector.d.ts +2 -2
  37. package/dist/src/core/lazy-loading/llm-plugin-detector.d.ts.map +1 -1
  38. package/dist/src/core/lazy-loading/llm-plugin-detector.js +15 -5
  39. package/dist/src/core/lazy-loading/llm-plugin-detector.js.map +1 -1
  40. package/dist/src/core/living-docs/feature-consistency-validator.js +1 -1
  41. package/dist/src/core/living-docs/feature-consistency-validator.js.map +1 -1
  42. package/dist/src/core/living-docs/scaffolding/scaffold.js +3 -3
  43. package/dist/src/core/notifications/command-integration.d.ts.map +1 -1
  44. package/dist/src/core/notifications/command-integration.js +0 -1
  45. package/dist/src/core/notifications/command-integration.js.map +1 -1
  46. package/dist/src/core/reflection/reflect-handler.js +2 -2
  47. package/dist/src/core/reflection/reflect-handler.js.map +1 -1
  48. package/dist/src/core/validators/ac-presence-validator.d.ts +1 -1
  49. package/dist/src/core/validators/ac-presence-validator.js +3 -3
  50. package/dist/src/core/validators/ac-presence-validator.js.map +1 -1
  51. package/dist/src/dashboard/server/command-runner.d.ts.map +1 -1
  52. package/dist/src/dashboard/server/command-runner.js +2 -2
  53. package/dist/src/dashboard/server/command-runner.js.map +1 -1
  54. package/dist/src/dashboard/server/dashboard-server.d.ts.map +1 -1
  55. package/dist/src/dashboard/server/dashboard-server.js +22 -10
  56. package/dist/src/dashboard/server/dashboard-server.js.map +1 -1
  57. package/dist/src/dashboard/server/data/dashboard-data-aggregator.d.ts +9 -1
  58. package/dist/src/dashboard/server/data/dashboard-data-aggregator.d.ts.map +1 -1
  59. package/dist/src/dashboard/server/data/dashboard-data-aggregator.js +140 -13
  60. package/dist/src/dashboard/server/data/dashboard-data-aggregator.js.map +1 -1
  61. package/dist/src/dashboard/server/data/plugin-scanner.d.ts +1 -1
  62. package/dist/src/dashboard/server/data/plugin-scanner.d.ts.map +1 -1
  63. package/dist/src/dashboard/server/data/plugin-scanner.js +2 -2
  64. package/dist/src/dashboard/server/data/plugin-scanner.js.map +1 -1
  65. package/dist/src/utils/agents-md-compiler.js +1 -1
  66. package/dist/src/utils/agents-md-compiler.js.map +1 -1
  67. package/dist/src/utils/find-project-root.d.ts +5 -4
  68. package/dist/src/utils/find-project-root.d.ts.map +1 -1
  69. package/dist/src/utils/find-project-root.js +8 -10
  70. package/dist/src/utils/find-project-root.js.map +1 -1
  71. package/dist/src/utils/generate-skills-index.js +3 -3
  72. package/dist/src/utils/notification-constants.js +1 -1
  73. package/dist/src/utils/notification-constants.js.map +1 -1
  74. package/package.json +1 -1
  75. package/plugins/FINAL-AUDIT-RECOMMENDATIONS.md +3 -3
  76. package/plugins/specweave/PLUGIN.md +0 -22
  77. package/plugins/specweave/commands/analytics.md +1 -1
  78. package/plugins/specweave/commands/discrepancies.md +0 -1
  79. package/plugins/specweave/commands/living-docs.md +0 -1
  80. package/plugins/specweave/commands/reconcile.md +1 -1
  81. package/plugins/specweave/hooks/hooks.json +19 -0
  82. package/plugins/specweave/hooks/pre-compact.sh +39 -0
  83. package/plugins/specweave/hooks/stop-sync.sh +23 -1
  84. package/plugins/specweave/hooks/universal/fail-fast-wrapper.sh +4 -0
  85. package/plugins/specweave/hooks/user-prompt-submit.sh +193 -59
  86. package/plugins/specweave/hooks/v2/dispatchers/post-tool-use-analytics.sh +83 -0
  87. package/plugins/specweave/hooks/v2/dispatchers/session-start.sh +7 -0
  88. package/plugins/specweave/hooks/v2/guards/spec-template-enforcement-guard.sh +1 -1
  89. package/plugins/specweave/hooks/v2/handlers/ac-sync-dispatcher.sh +25 -6
  90. package/plugins/specweave/hooks/v2/handlers/universal-auto-create-dispatcher.sh +21 -3
  91. package/plugins/specweave/hooks/v2/lib/check-provider-enabled.sh +52 -0
  92. package/plugins/specweave/lib/vendor/core/increment/metadata-manager.js +2 -2
  93. package/plugins/specweave/lib/vendor/core/increment/metadata-manager.js.map +1 -1
  94. package/plugins/specweave/scripts/track-analytics.sh +4 -0
  95. package/plugins/specweave/skills/do/SKILL.md +1 -1
  96. package/plugins/specweave/skills/done/SKILL.md +1 -1
  97. package/plugins/specweave/skills/framework/SKILL.md +4 -4
  98. package/plugins/specweave/skills/increment/SKILL.md +192 -25
  99. package/plugins/specweave/skills/next/SKILL.md +36 -630
  100. package/plugins/specweave/skills/pm/phases/00-deep-interview.md +2 -2
  101. package/plugins/specweave/skills/progress-sync/SKILL.md +7 -25
  102. package/plugins/specweave/skills/spec-generator/SKILL.md +44 -626
  103. package/plugins/specweave/skills/tdd-green/SKILL.md +10 -798
  104. package/plugins/specweave/skills/tdd-red/SKILL.md +8 -136
  105. package/plugins/specweave/skills/tdd-refactor/SKILL.md +15 -147
  106. package/plugins/specweave-github/hooks/github-auto-create-handler.sh +23 -5
  107. package/src/templates/AGENTS.md.template +11 -11
  108. package/src/templates/CLAUDE.md.template +1 -1
  109. package/dist/dashboard/assets/index-CDl14O5G.css +0 -1
  110. package/dist/dashboard/assets/index-CmqBqnWd.js +0 -11
  111. package/plugins/specweave/commands/api-docs.md +0 -672
  112. package/plugins/specweave/commands/check-hooks.md +0 -241
  113. package/plugins/specweave/commands/embed-acs.md +0 -445
  114. package/plugins/specweave/commands/external.md +0 -145
  115. package/plugins/specweave/commands/import-docs.md +0 -212
  116. package/plugins/specweave/commands/migrate-config.md +0 -104
  117. package/plugins/specweave/commands/notifications.md +0 -94
  118. package/plugins/specweave/commands/plugin-validator.md +0 -429
  119. package/plugins/specweave/commands/revert-wip-limit.md +0 -82
  120. package/plugins/specweave/commands/sync-acs.md +0 -342
  121. package/plugins/specweave/commands/sync-specs.md +0 -339
  122. package/plugins/specweave/commands/sync-tasks.md +0 -255
  123. package/plugins/specweave/commands/update-scope.md +0 -351
  124. package/plugins/specweave/commands/validate-features.md +0 -207
  125. package/plugins/specweave/skills/archive-increments/SKILL.md +0 -209
  126. package/plugins/specweave/skills/code-review/SKILL.md +0 -598
  127. package/plugins/specweave/skills/increment-planner/SKILL.md +0 -238
  128. package/plugins/specweave/skills/increment-work-router/SKILL.md +0 -562
  129. package/plugins/specweave/skills/multi-project-spec-mapper/SKILL.md +0 -423
  130. package/plugins/specweave/skills/pm-closure-validation/SKILL.md +0 -542
  131. package/plugins/specweave/skills/smart-reopen-detector/SKILL.md +0 -245
  132. package/plugins/specweave/skills/tdd-orchestrator/SKILL.md +0 -228
  133. package/plugins/specweave/skills/umbrella-repo-detector/SKILL.md +0 -301
@@ -1,11 +0,0 @@
1
- (function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))r(d);new MutationObserver(d=>{for(const h of d)if(h.type==="childList")for(const g of h.addedNodes)g.tagName==="LINK"&&g.rel==="modulepreload"&&r(g)}).observe(document,{childList:!0,subtree:!0});function c(d){const h={};return d.integrity&&(h.integrity=d.integrity),d.referrerPolicy&&(h.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?h.credentials="include":d.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function r(d){if(d.ep)return;d.ep=!0;const h=c(d);fetch(d.href,h)}})();var Yr={exports:{}},qn={};var f0;function _x(){if(f0)return qn;f0=1;var u=Symbol.for("react.transitional.element"),o=Symbol.for("react.fragment");function c(r,d,h){var g=null;if(h!==void 0&&(g=""+h),d.key!==void 0&&(g=""+d.key),"key"in d){h={};for(var b in d)b!=="key"&&(h[b]=d[b])}else h=d;return d=h.ref,{$$typeof:u,type:r,key:g,ref:d!==void 0?d:null,props:h}}return qn.Fragment=o,qn.jsx=c,qn.jsxs=c,qn}var d0;function Ox(){return d0||(d0=1,Yr.exports=_x()),Yr.exports}var n=Ox(),Gr={exports:{}},ae={};var m0;function Dx(){if(m0)return ae;m0=1;var u=Symbol.for("react.transitional.element"),o=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),h=Symbol.for("react.consumer"),g=Symbol.for("react.context"),b=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),x=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),R=Symbol.iterator;function G(S){return S===null||typeof S!="object"?null:(S=R&&S[R]||S["@@iterator"],typeof S=="function"?S:null)}var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Y=Object.assign,q={};function V(S,B,K){this.props=S,this.context=B,this.refs=q,this.updater=K||_}V.prototype.isReactComponent={},V.prototype.setState=function(S,B){if(typeof S!="object"&&typeof S!="function"&&S!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,S,B,"setState")},V.prototype.forceUpdate=function(S){this.updater.enqueueForceUpdate(this,S,"forceUpdate")};function L(){}L.prototype=V.prototype;function Q(S,B,K){this.props=S,this.context=B,this.refs=q,this.updater=K||_}var ue=Q.prototype=new L;ue.constructor=Q,Y(ue,V.prototype),ue.isPureReactComponent=!0;var te=Array.isArray;function k(){}var w={H:null,A:null,T:null,S:null},F=Object.prototype.hasOwnProperty;function X(S,B,K){var J=K.ref;return{$$typeof:u,type:S,key:B,ref:J!==void 0?J:null,props:K}}function Ae(S,B){return X(S.type,B,S.props)}function Ke(S){return typeof S=="object"&&S!==null&&S.$$typeof===u}function Qe(S){var B={"=":"=0",":":"=2"};return"$"+S.replace(/[=:]/g,function(K){return B[K]})}var Xt=/\/+/g;function Qt(S,B){return typeof S=="object"&&S!==null&&S.key!=null?Qe(""+S.key):B.toString(36)}function Ot(S){switch(S.status){case"fulfilled":return S.value;case"rejected":throw S.reason;default:switch(typeof S.status=="string"?S.then(k,k):(S.status="pending",S.then(function(B){S.status==="pending"&&(S.status="fulfilled",S.value=B)},function(B){S.status==="pending"&&(S.status="rejected",S.reason=B)})),S.status){case"fulfilled":return S.value;case"rejected":throw S.reason}}throw S}function D(S,B,K,J,ne){var re=typeof S;(re==="undefined"||re==="boolean")&&(S=null);var pe=!1;if(S===null)pe=!0;else switch(re){case"bigint":case"string":case"number":pe=!0;break;case"object":switch(S.$$typeof){case u:case o:pe=!0;break;case j:return pe=S._init,D(pe(S._payload),B,K,J,ne)}}if(pe)return ne=ne(S),pe=J===""?"."+Qt(S,0):J,te(ne)?(K="",pe!=null&&(K=pe.replace(Xt,"$&/")+"/"),D(ne,B,K,"",function(Zl){return Zl})):ne!=null&&(Ke(ne)&&(ne=Ae(ne,K+(ne.key==null||S&&S.key===ne.key?"":(""+ne.key).replace(Xt,"$&/")+"/")+pe)),B.push(ne)),1;pe=0;var Ie=J===""?".":J+":";if(te(S))for(var we=0;we<S.length;we++)J=S[we],re=Ie+Qt(J,we),pe+=D(J,B,K,re,ne);else if(we=G(S),typeof we=="function")for(S=we.call(S),we=0;!(J=S.next()).done;)J=J.value,re=Ie+Qt(J,we++),pe+=D(J,B,K,re,ne);else if(re==="object"){if(typeof S.then=="function")return D(Ot(S),B,K,J,ne);throw B=String(S),Error("Objects are not valid as a React child (found: "+(B==="[object Object]"?"object with keys {"+Object.keys(S).join(", ")+"}":B)+"). If you meant to render a collection of children, use an array instead.")}return pe}function Z(S,B,K){if(S==null)return S;var J=[],ne=0;return D(S,J,"","",function(re){return B.call(K,re,ne++)}),J}function ee(S){if(S._status===-1){var B=S._result;B=B(),B.then(function(K){(S._status===0||S._status===-1)&&(S._status=1,S._result=K)},function(K){(S._status===0||S._status===-1)&&(S._status=2,S._result=K)}),S._status===-1&&(S._status=0,S._result=B)}if(S._status===1)return S._result.default;throw S._result}var je=typeof reportError=="function"?reportError:function(S){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var B=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof S=="object"&&S!==null&&typeof S.message=="string"?String(S.message):String(S),error:S});if(!window.dispatchEvent(B))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",S);return}console.error(S)},Te={map:Z,forEach:function(S,B,K){Z(S,function(){B.apply(this,arguments)},K)},count:function(S){var B=0;return Z(S,function(){B++}),B},toArray:function(S){return Z(S,function(B){return B})||[]},only:function(S){if(!Ke(S))throw Error("React.Children.only expected to receive a single React element child.");return S}};return ae.Activity=y,ae.Children=Te,ae.Component=V,ae.Fragment=c,ae.Profiler=d,ae.PureComponent=Q,ae.StrictMode=r,ae.Suspense=p,ae.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,ae.__COMPILER_RUNTIME={__proto__:null,c:function(S){return w.H.useMemoCache(S)}},ae.cache=function(S){return function(){return S.apply(null,arguments)}},ae.cacheSignal=function(){return null},ae.cloneElement=function(S,B,K){if(S==null)throw Error("The argument must be a React element, but you passed "+S+".");var J=Y({},S.props),ne=S.key;if(B!=null)for(re in B.key!==void 0&&(ne=""+B.key),B)!F.call(B,re)||re==="key"||re==="__self"||re==="__source"||re==="ref"&&B.ref===void 0||(J[re]=B[re]);var re=arguments.length-2;if(re===1)J.children=K;else if(1<re){for(var pe=Array(re),Ie=0;Ie<re;Ie++)pe[Ie]=arguments[Ie+2];J.children=pe}return X(S.type,ne,J)},ae.createContext=function(S){return S={$$typeof:g,_currentValue:S,_currentValue2:S,_threadCount:0,Provider:null,Consumer:null},S.Provider=S,S.Consumer={$$typeof:h,_context:S},S},ae.createElement=function(S,B,K){var J,ne={},re=null;if(B!=null)for(J in B.key!==void 0&&(re=""+B.key),B)F.call(B,J)&&J!=="key"&&J!=="__self"&&J!=="__source"&&(ne[J]=B[J]);var pe=arguments.length-2;if(pe===1)ne.children=K;else if(1<pe){for(var Ie=Array(pe),we=0;we<pe;we++)Ie[we]=arguments[we+2];ne.children=Ie}if(S&&S.defaultProps)for(J in pe=S.defaultProps,pe)ne[J]===void 0&&(ne[J]=pe[J]);return X(S,re,ne)},ae.createRef=function(){return{current:null}},ae.forwardRef=function(S){return{$$typeof:b,render:S}},ae.isValidElement=Ke,ae.lazy=function(S){return{$$typeof:j,_payload:{_status:-1,_result:S},_init:ee}},ae.memo=function(S,B){return{$$typeof:x,type:S,compare:B===void 0?null:B}},ae.startTransition=function(S){var B=w.T,K={};w.T=K;try{var J=S(),ne=w.S;ne!==null&&ne(K,J),typeof J=="object"&&J!==null&&typeof J.then=="function"&&J.then(k,je)}catch(re){je(re)}finally{B!==null&&K.types!==null&&(B.types=K.types),w.T=B}},ae.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},ae.use=function(S){return w.H.use(S)},ae.useActionState=function(S,B,K){return w.H.useActionState(S,B,K)},ae.useCallback=function(S,B){return w.H.useCallback(S,B)},ae.useContext=function(S){return w.H.useContext(S)},ae.useDebugValue=function(){},ae.useDeferredValue=function(S,B){return w.H.useDeferredValue(S,B)},ae.useEffect=function(S,B){return w.H.useEffect(S,B)},ae.useEffectEvent=function(S){return w.H.useEffectEvent(S)},ae.useId=function(){return w.H.useId()},ae.useImperativeHandle=function(S,B,K){return w.H.useImperativeHandle(S,B,K)},ae.useInsertionEffect=function(S,B){return w.H.useInsertionEffect(S,B)},ae.useLayoutEffect=function(S,B){return w.H.useLayoutEffect(S,B)},ae.useMemo=function(S,B){return w.H.useMemo(S,B)},ae.useOptimistic=function(S,B){return w.H.useOptimistic(S,B)},ae.useReducer=function(S,B,K){return w.H.useReducer(S,B,K)},ae.useRef=function(S){return w.H.useRef(S)},ae.useState=function(S){return w.H.useState(S)},ae.useSyncExternalStore=function(S,B,K){return w.H.useSyncExternalStore(S,B,K)},ae.useTransition=function(){return w.H.useTransition()},ae.version="19.2.4",ae}var h0;function Ir(){return h0||(h0=1,Gr.exports=Dx()),Gr.exports}var T=Ir(),Xr={exports:{}},Yn={},Qr={exports:{}},Vr={};var x0;function wx(){return x0||(x0=1,(function(u){function o(D,Z){var ee=D.length;D.push(Z);e:for(;0<ee;){var je=ee-1>>>1,Te=D[je];if(0<d(Te,Z))D[je]=Z,D[ee]=Te,ee=je;else break e}}function c(D){return D.length===0?null:D[0]}function r(D){if(D.length===0)return null;var Z=D[0],ee=D.pop();if(ee!==Z){D[0]=ee;e:for(var je=0,Te=D.length,S=Te>>>1;je<S;){var B=2*(je+1)-1,K=D[B],J=B+1,ne=D[J];if(0>d(K,ee))J<Te&&0>d(ne,K)?(D[je]=ne,D[J]=ee,je=J):(D[je]=K,D[B]=ee,je=B);else if(J<Te&&0>d(ne,ee))D[je]=ne,D[J]=ee,je=J;else break e}}return Z}function d(D,Z){var ee=D.sortIndex-Z.sortIndex;return ee!==0?ee:D.id-Z.id}if(u.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var h=performance;u.unstable_now=function(){return h.now()}}else{var g=Date,b=g.now();u.unstable_now=function(){return g.now()-b}}var p=[],x=[],j=1,y=null,R=3,G=!1,_=!1,Y=!1,q=!1,V=typeof setTimeout=="function"?setTimeout:null,L=typeof clearTimeout=="function"?clearTimeout:null,Q=typeof setImmediate<"u"?setImmediate:null;function ue(D){for(var Z=c(x);Z!==null;){if(Z.callback===null)r(x);else if(Z.startTime<=D)r(x),Z.sortIndex=Z.expirationTime,o(p,Z);else break;Z=c(x)}}function te(D){if(Y=!1,ue(D),!_)if(c(p)!==null)_=!0,k||(k=!0,Qe());else{var Z=c(x);Z!==null&&Ot(te,Z.startTime-D)}}var k=!1,w=-1,F=5,X=-1;function Ae(){return q?!0:!(u.unstable_now()-X<F)}function Ke(){if(q=!1,k){var D=u.unstable_now();X=D;var Z=!0;try{e:{_=!1,Y&&(Y=!1,L(w),w=-1),G=!0;var ee=R;try{t:{for(ue(D),y=c(p);y!==null&&!(y.expirationTime>D&&Ae());){var je=y.callback;if(typeof je=="function"){y.callback=null,R=y.priorityLevel;var Te=je(y.expirationTime<=D);if(D=u.unstable_now(),typeof Te=="function"){y.callback=Te,ue(D),Z=!0;break t}y===c(p)&&r(p),ue(D)}else r(p);y=c(p)}if(y!==null)Z=!0;else{var S=c(x);S!==null&&Ot(te,S.startTime-D),Z=!1}}break e}finally{y=null,R=ee,G=!1}Z=void 0}}finally{Z?Qe():k=!1}}}var Qe;if(typeof Q=="function")Qe=function(){Q(Ke)};else if(typeof MessageChannel<"u"){var Xt=new MessageChannel,Qt=Xt.port2;Xt.port1.onmessage=Ke,Qe=function(){Qt.postMessage(null)}}else Qe=function(){V(Ke,0)};function Ot(D,Z){w=V(function(){D(u.unstable_now())},Z)}u.unstable_IdlePriority=5,u.unstable_ImmediatePriority=1,u.unstable_LowPriority=4,u.unstable_NormalPriority=3,u.unstable_Profiling=null,u.unstable_UserBlockingPriority=2,u.unstable_cancelCallback=function(D){D.callback=null},u.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):F=0<D?Math.floor(1e3/D):5},u.unstable_getCurrentPriorityLevel=function(){return R},u.unstable_next=function(D){switch(R){case 1:case 2:case 3:var Z=3;break;default:Z=R}var ee=R;R=Z;try{return D()}finally{R=ee}},u.unstable_requestPaint=function(){q=!0},u.unstable_runWithPriority=function(D,Z){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var ee=R;R=D;try{return Z()}finally{R=ee}},u.unstable_scheduleCallback=function(D,Z,ee){var je=u.unstable_now();switch(typeof ee=="object"&&ee!==null?(ee=ee.delay,ee=typeof ee=="number"&&0<ee?je+ee:je):ee=je,D){case 1:var Te=-1;break;case 2:Te=250;break;case 5:Te=1073741823;break;case 4:Te=1e4;break;default:Te=5e3}return Te=ee+Te,D={id:j++,callback:Z,priorityLevel:D,startTime:ee,expirationTime:Te,sortIndex:-1},ee>je?(D.sortIndex=ee,o(x,D),c(p)===null&&D===c(x)&&(Y?(L(w),w=-1):Y=!0,Ot(te,ee-je))):(D.sortIndex=Te,o(p,D),_||G||(_=!0,k||(k=!0,Qe()))),D},u.unstable_shouldYield=Ae,u.unstable_wrapCallback=function(D){var Z=R;return function(){var ee=R;R=Z;try{return D.apply(this,arguments)}finally{R=ee}}}})(Vr)),Vr}var g0;function Ux(){return g0||(g0=1,Qr.exports=wx()),Qr.exports}var Zr={exports:{}},Pe={};var y0;function Lx(){if(y0)return Pe;y0=1;var u=Ir();function o(p){var x="https://react.dev/errors/"+p;if(1<arguments.length){x+="?args[]="+encodeURIComponent(arguments[1]);for(var j=2;j<arguments.length;j++)x+="&args[]="+encodeURIComponent(arguments[j])}return"Minified React error #"+p+"; visit "+x+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(){}var r={d:{f:c,r:function(){throw Error(o(522))},D:c,C:c,L:c,m:c,X:c,S:c,M:c},p:0,findDOMNode:null},d=Symbol.for("react.portal");function h(p,x,j){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:d,key:y==null?null:""+y,children:p,containerInfo:x,implementation:j}}var g=u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function b(p,x){if(p==="font")return"";if(typeof x=="string")return x==="use-credentials"?x:""}return Pe.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Pe.createPortal=function(p,x){var j=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!x||x.nodeType!==1&&x.nodeType!==9&&x.nodeType!==11)throw Error(o(299));return h(p,x,null,j)},Pe.flushSync=function(p){var x=g.T,j=r.p;try{if(g.T=null,r.p=2,p)return p()}finally{g.T=x,r.p=j,r.d.f()}},Pe.preconnect=function(p,x){typeof p=="string"&&(x?(x=x.crossOrigin,x=typeof x=="string"?x==="use-credentials"?x:"":void 0):x=null,r.d.C(p,x))},Pe.prefetchDNS=function(p){typeof p=="string"&&r.d.D(p)},Pe.preinit=function(p,x){if(typeof p=="string"&&x&&typeof x.as=="string"){var j=x.as,y=b(j,x.crossOrigin),R=typeof x.integrity=="string"?x.integrity:void 0,G=typeof x.fetchPriority=="string"?x.fetchPriority:void 0;j==="style"?r.d.S(p,typeof x.precedence=="string"?x.precedence:void 0,{crossOrigin:y,integrity:R,fetchPriority:G}):j==="script"&&r.d.X(p,{crossOrigin:y,integrity:R,fetchPriority:G,nonce:typeof x.nonce=="string"?x.nonce:void 0})}},Pe.preinitModule=function(p,x){if(typeof p=="string")if(typeof x=="object"&&x!==null){if(x.as==null||x.as==="script"){var j=b(x.as,x.crossOrigin);r.d.M(p,{crossOrigin:j,integrity:typeof x.integrity=="string"?x.integrity:void 0,nonce:typeof x.nonce=="string"?x.nonce:void 0})}}else x==null&&r.d.M(p)},Pe.preload=function(p,x){if(typeof p=="string"&&typeof x=="object"&&x!==null&&typeof x.as=="string"){var j=x.as,y=b(j,x.crossOrigin);r.d.L(p,j,{crossOrigin:y,integrity:typeof x.integrity=="string"?x.integrity:void 0,nonce:typeof x.nonce=="string"?x.nonce:void 0,type:typeof x.type=="string"?x.type:void 0,fetchPriority:typeof x.fetchPriority=="string"?x.fetchPriority:void 0,referrerPolicy:typeof x.referrerPolicy=="string"?x.referrerPolicy:void 0,imageSrcSet:typeof x.imageSrcSet=="string"?x.imageSrcSet:void 0,imageSizes:typeof x.imageSizes=="string"?x.imageSizes:void 0,media:typeof x.media=="string"?x.media:void 0})}},Pe.preloadModule=function(p,x){if(typeof p=="string")if(x){var j=b(x.as,x.crossOrigin);r.d.m(p,{as:typeof x.as=="string"&&x.as!=="script"?x.as:void 0,crossOrigin:j,integrity:typeof x.integrity=="string"?x.integrity:void 0})}else r.d.m(p)},Pe.requestFormReset=function(p){r.d.r(p)},Pe.unstable_batchedUpdates=function(p,x){return p(x)},Pe.useFormState=function(p,x,j){return g.H.useFormState(p,x,j)},Pe.useFormStatus=function(){return g.H.useHostTransitionStatus()},Pe.version="19.2.4",Pe}var p0;function Hx(){if(p0)return Zr.exports;p0=1;function u(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(u)}catch(o){console.error(o)}}return u(),Zr.exports=Lx(),Zr.exports}var v0;function Bx(){if(v0)return Yn;v0=1;var u=Ux(),o=Ir(),c=Hx();function r(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function d(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function h(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function g(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function b(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function p(e){if(h(e)!==e)throw Error(r(188))}function x(e){var t=e.alternate;if(!t){if(t=h(e),t===null)throw Error(r(188));return t!==e?null:e}for(var a=e,l=t;;){var s=a.return;if(s===null)break;var i=s.alternate;if(i===null){if(l=s.return,l!==null){a=l;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===a)return p(s),e;if(i===l)return p(s),t;i=i.sibling}throw Error(r(188))}if(a.return!==l.return)a=s,l=i;else{for(var f=!1,m=s.child;m;){if(m===a){f=!0,a=s,l=i;break}if(m===l){f=!0,l=s,a=i;break}m=m.sibling}if(!f){for(m=i.child;m;){if(m===a){f=!0,a=i,l=s;break}if(m===l){f=!0,l=i,a=s;break}m=m.sibling}if(!f)throw Error(r(189))}}if(a.alternate!==l)throw Error(r(190))}if(a.tag!==3)throw Error(r(188));return a.stateNode.current===a?e:t}function j(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=j(e),t!==null)return t;e=e.sibling}return null}var y=Object.assign,R=Symbol.for("react.element"),G=Symbol.for("react.transitional.element"),_=Symbol.for("react.portal"),Y=Symbol.for("react.fragment"),q=Symbol.for("react.strict_mode"),V=Symbol.for("react.profiler"),L=Symbol.for("react.consumer"),Q=Symbol.for("react.context"),ue=Symbol.for("react.forward_ref"),te=Symbol.for("react.suspense"),k=Symbol.for("react.suspense_list"),w=Symbol.for("react.memo"),F=Symbol.for("react.lazy"),X=Symbol.for("react.activity"),Ae=Symbol.for("react.memo_cache_sentinel"),Ke=Symbol.iterator;function Qe(e){return e===null||typeof e!="object"?null:(e=Ke&&e[Ke]||e["@@iterator"],typeof e=="function"?e:null)}var Xt=Symbol.for("react.client.reference");function Qt(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Xt?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Y:return"Fragment";case V:return"Profiler";case q:return"StrictMode";case te:return"Suspense";case k:return"SuspenseList";case X:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case _:return"Portal";case Q:return e.displayName||"Context";case L:return(e._context.displayName||"Context")+".Consumer";case ue:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case w:return t=e.displayName||null,t!==null?t:Qt(e.type)||"Memo";case F:t=e._payload,e=e._init;try{return Qt(e(t))}catch{}}return null}var Ot=Array.isArray,D=o.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z=c.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee={pending:!1,data:null,method:null,action:null},je=[],Te=-1;function S(e){return{current:e}}function B(e){0>Te||(e.current=je[Te],je[Te]=null,Te--)}function K(e,t){Te++,je[Te]=e.current,e.current=t}var J=S(null),ne=S(null),re=S(null),pe=S(null);function Ie(e,t){switch(K(re,t),K(ne,e),K(J,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?wd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=wd(t),e=Ud(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}B(J),K(J,e)}function we(){B(J),B(ne),B(re)}function Zl(e){e.memoizedState!==null&&K(pe,e);var t=J.current,a=Ud(t,e.type);t!==a&&(K(ne,e),K(J,a))}function kn(e){ne.current===e&&(B(J),B(ne)),pe.current===e&&(B(pe),Un._currentValue=ee)}var Ni,rc;function Ha(e){if(Ni===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Ni=t&&t[1]||"",rc=-1<a.stack.indexOf(`
2
- at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
3
- `+Ni+e+rc}var Si=!1;function Ei(e,t){if(!e||Si)return"";Si=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var H=function(){throw Error()};if(Object.defineProperty(H.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(H,[])}catch(M){var z=M}Reflect.construct(e,[],H)}else{try{H.call()}catch(M){z=M}e.call(H.prototype)}}else{try{throw Error()}catch(M){z=M}(H=e())&&typeof H.catch=="function"&&H.catch(function(){})}}catch(M){if(M&&z&&typeof M.stack=="string")return[M.stack,z.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var s=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");s&&s.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=l.DetermineComponentFrameRoot(),f=i[0],m=i[1];if(f&&m){var v=f.split(`
4
- `),A=m.split(`
5
- `);for(s=l=0;l<v.length&&!v[l].includes("DetermineComponentFrameRoot");)l++;for(;s<A.length&&!A[s].includes("DetermineComponentFrameRoot");)s++;if(l===v.length||s===A.length)for(l=v.length-1,s=A.length-1;1<=l&&0<=s&&v[l]!==A[s];)s--;for(;1<=l&&0<=s;l--,s--)if(v[l]!==A[s]){if(l!==1||s!==1)do if(l--,s--,0>s||v[l]!==A[s]){var O=`
6
- `+v[l].replace(" at new "," at ");return e.displayName&&O.includes("<anonymous>")&&(O=O.replace("<anonymous>",e.displayName)),O}while(1<=l&&0<=s);break}}}finally{Si=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Ha(a):""}function rm(e,t){switch(e.tag){case 26:case 27:case 5:return Ha(e.type);case 16:return Ha("Lazy");case 13:return e.child!==t&&t!==null?Ha("Suspense Fallback"):Ha("Suspense");case 19:return Ha("SuspenseList");case 0:case 15:return Ei(e.type,!1);case 11:return Ei(e.type.render,!1);case 1:return Ei(e.type,!0);case 31:return Ha("Activity");default:return""}}function cc(e){try{var t="",a=null;do t+=rm(e,a),a=e,e=e.return;while(e);return t}catch(l){return`
7
- Error generating stack: `+l.message+`
8
- `+l.stack}}var Ti=Object.prototype.hasOwnProperty,Ci=u.unstable_scheduleCallback,Ai=u.unstable_cancelCallback,cm=u.unstable_shouldYield,om=u.unstable_requestPaint,ot=u.unstable_now,fm=u.unstable_getCurrentPriorityLevel,oc=u.unstable_ImmediatePriority,fc=u.unstable_UserBlockingPriority,$n=u.unstable_NormalPriority,dm=u.unstable_LowPriority,dc=u.unstable_IdlePriority,mm=u.log,hm=u.unstable_setDisableYieldValue,Kl=null,ft=null;function oa(e){if(typeof mm=="function"&&hm(e),ft&&typeof ft.setStrictMode=="function")try{ft.setStrictMode(Kl,e)}catch{}}var dt=Math.clz32?Math.clz32:ym,xm=Math.log,gm=Math.LN2;function ym(e){return e>>>=0,e===0?32:31-(xm(e)/gm|0)|0}var Jn=256,Wn=262144,Fn=4194304;function Ba(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Pn(e,t,a){var l=e.pendingLanes;if(l===0)return 0;var s=0,i=e.suspendedLanes,f=e.pingedLanes;e=e.warmLanes;var m=l&134217727;return m!==0?(l=m&~i,l!==0?s=Ba(l):(f&=m,f!==0?s=Ba(f):a||(a=m&~e,a!==0&&(s=Ba(a))))):(m=l&~i,m!==0?s=Ba(m):f!==0?s=Ba(f):a||(a=l&~e,a!==0&&(s=Ba(a)))),s===0?0:t!==0&&t!==s&&(t&i)===0&&(i=s&-s,a=t&-t,i>=a||i===32&&(a&4194048)!==0)?t:s}function kl(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function pm(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function mc(){var e=Fn;return Fn<<=1,(Fn&62914560)===0&&(Fn=4194304),e}function zi(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function $l(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function vm(e,t,a,l,s,i){var f=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var m=e.entanglements,v=e.expirationTimes,A=e.hiddenUpdates;for(a=f&~a;0<a;){var O=31-dt(a),H=1<<O;m[O]=0,v[O]=-1;var z=A[O];if(z!==null)for(A[O]=null,O=0;O<z.length;O++){var M=z[O];M!==null&&(M.lane&=-536870913)}a&=~H}l!==0&&hc(e,l,0),i!==0&&s===0&&e.tag!==0&&(e.suspendedLanes|=i&~(f&~t))}function hc(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-dt(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|a&261930}function xc(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var l=31-dt(a),s=1<<l;s&t|e[l]&t&&(e[l]|=t),a&=~s}}function gc(e,t){var a=t&-t;return a=(a&42)!==0?1:Mi(a),(a&(e.suspendedLanes|t))!==0?0:a}function Mi(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Ri(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function yc(){var e=Z.p;return e!==0?e:(e=window.event,e===void 0?32:n0(e.type))}function pc(e,t){var a=Z.p;try{return Z.p=e,t()}finally{Z.p=a}}var fa=Math.random().toString(36).slice(2),ke="__reactFiber$"+fa,at="__reactProps$"+fa,ll="__reactContainer$"+fa,_i="__reactEvents$"+fa,bm="__reactListeners$"+fa,jm="__reactHandles$"+fa,vc="__reactResources$"+fa,Jl="__reactMarker$"+fa;function Oi(e){delete e[ke],delete e[at],delete e[_i],delete e[bm],delete e[jm]}function nl(e){var t=e[ke];if(t)return t;for(var a=e.parentNode;a;){if(t=a[ll]||a[ke]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=Xd(e);e!==null;){if(a=e[ke])return a;e=Xd(e)}return t}e=a,a=e.parentNode}return null}function sl(e){if(e=e[ke]||e[ll]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Wl(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function il(e){var t=e[vc];return t||(t=e[vc]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ve(e){e[Jl]=!0}var bc=new Set,jc={};function qa(e,t){ul(e,t),ul(e+"Capture",t)}function ul(e,t){for(jc[e]=t,e=0;e<t.length;e++)bc.add(t[e])}var Nm=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Nc={},Sc={};function Sm(e){return Ti.call(Sc,e)?!0:Ti.call(Nc,e)?!1:Nm.test(e)?Sc[e]=!0:(Nc[e]=!0,!1)}function In(e,t,a){if(Sm(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function es(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function Vt(e,t,a,l){if(l===null)e.removeAttribute(a);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+l)}}function jt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ec(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Em(e,t,a){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var s=l.get,i=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(f){a=""+f,i.call(this,f)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return a},setValue:function(f){a=""+f},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Di(e){if(!e._valueTracker){var t=Ec(e)?"checked":"value";e._valueTracker=Em(e,t,""+e[t])}}function Tc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),l="";return e&&(l=Ec(e)?e.checked?"true":"false":e.value),e=l,e!==a?(t.setValue(e),!0):!1}function ts(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Tm=/[\n"\\]/g;function Nt(e){return e.replace(Tm,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function wi(e,t,a,l,s,i,f,m){e.name="",f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"?e.type=f:e.removeAttribute("type"),t!=null?f==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+jt(t)):e.value!==""+jt(t)&&(e.value=""+jt(t)):f!=="submit"&&f!=="reset"||e.removeAttribute("value"),t!=null?Ui(e,f,jt(t)):a!=null?Ui(e,f,jt(a)):l!=null&&e.removeAttribute("value"),s==null&&i!=null&&(e.defaultChecked=!!i),s!=null&&(e.checked=s&&typeof s!="function"&&typeof s!="symbol"),m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"?e.name=""+jt(m):e.removeAttribute("name")}function Cc(e,t,a,l,s,i,f,m){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||a!=null){if(!(i!=="submit"&&i!=="reset"||t!=null)){Di(e);return}a=a!=null?""+jt(a):"",t=t!=null?""+jt(t):a,m||t===e.value||(e.value=t),e.defaultValue=t}l=l??s,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=m?e.checked:!!l,e.defaultChecked=!!l,f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.name=f),Di(e)}function Ui(e,t,a){t==="number"&&ts(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function rl(e,t,a,l){if(e=e.options,t){t={};for(var s=0;s<a.length;s++)t["$"+a[s]]=!0;for(a=0;a<e.length;a++)s=t.hasOwnProperty("$"+e[a].value),e[a].selected!==s&&(e[a].selected=s),s&&l&&(e[a].defaultSelected=!0)}else{for(a=""+jt(a),t=null,s=0;s<e.length;s++){if(e[s].value===a){e[s].selected=!0,l&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function Ac(e,t,a){if(t!=null&&(t=""+jt(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+jt(a):""}function zc(e,t,a,l){if(t==null){if(l!=null){if(a!=null)throw Error(r(92));if(Ot(l)){if(1<l.length)throw Error(r(93));l=l[0]}a=l}a==null&&(a=""),t=a}a=jt(t),e.defaultValue=a,l=e.textContent,l===a&&l!==""&&l!==null&&(e.value=l),Di(e)}function cl(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var Cm=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Mc(e,t,a){var l=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,a):typeof a!="number"||a===0||Cm.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function Rc(e,t,a){if(t!=null&&typeof t!="object")throw Error(r(62));if(e=e.style,a!=null){for(var l in a)!a.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var s in t)l=t[s],t.hasOwnProperty(s)&&a[s]!==l&&Mc(e,s,l)}else for(var i in t)t.hasOwnProperty(i)&&Mc(e,i,t[i])}function Li(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Am=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),zm=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function as(e){return zm.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Zt(){}var Hi=null;function Bi(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ol=null,fl=null;function _c(e){var t=sl(e);if(t&&(e=t.stateNode)){var a=e[at]||null;e:switch(e=t.stateNode,t.type){case"input":if(wi(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Nt(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var l=a[t];if(l!==e&&l.form===e.form){var s=l[at]||null;if(!s)throw Error(r(90));wi(l,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name)}}for(t=0;t<a.length;t++)l=a[t],l.form===e.form&&Tc(l)}break e;case"textarea":Ac(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&rl(e,!!a.multiple,t,!1)}}}var qi=!1;function Oc(e,t,a){if(qi)return e(t,a);qi=!0;try{var l=e(t);return l}finally{if(qi=!1,(ol!==null||fl!==null)&&(Qs(),ol&&(t=ol,e=fl,fl=ol=null,_c(t),e)))for(t=0;t<e.length;t++)_c(e[t])}}function Fl(e,t){var a=e.stateNode;if(a===null)return null;var l=a[at]||null;if(l===null)return null;a=l[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(r(231,t,typeof a));return a}var Kt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Yi=!1;if(Kt)try{var Pl={};Object.defineProperty(Pl,"passive",{get:function(){Yi=!0}}),window.addEventListener("test",Pl,Pl),window.removeEventListener("test",Pl,Pl)}catch{Yi=!1}var da=null,Gi=null,ls=null;function Dc(){if(ls)return ls;var e,t=Gi,a=t.length,l,s="value"in da?da.value:da.textContent,i=s.length;for(e=0;e<a&&t[e]===s[e];e++);var f=a-e;for(l=1;l<=f&&t[a-l]===s[i-l];l++);return ls=s.slice(e,1<l?1-l:void 0)}function ns(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function ss(){return!0}function wc(){return!1}function lt(e){function t(a,l,s,i,f){this._reactName=a,this._targetInst=s,this.type=l,this.nativeEvent=i,this.target=f,this.currentTarget=null;for(var m in e)e.hasOwnProperty(m)&&(a=e[m],this[m]=a?a(i):i[m]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?ss:wc,this.isPropagationStopped=wc,this}return y(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=ss)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=ss)},persist:function(){},isPersistent:ss}),t}var Ya={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},is=lt(Ya),Il=y({},Ya,{view:0,detail:0}),Mm=lt(Il),Xi,Qi,en,us=y({},Il,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Zi,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!==en&&(en&&e.type==="mousemove"?(Xi=e.screenX-en.screenX,Qi=e.screenY-en.screenY):Qi=Xi=0,en=e),Xi)},movementY:function(e){return"movementY"in e?e.movementY:Qi}}),Uc=lt(us),Rm=y({},us,{dataTransfer:0}),_m=lt(Rm),Om=y({},Il,{relatedTarget:0}),Vi=lt(Om),Dm=y({},Ya,{animationName:0,elapsedTime:0,pseudoElement:0}),wm=lt(Dm),Um=y({},Ya,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Lm=lt(Um),Hm=y({},Ya,{data:0}),Lc=lt(Hm),Bm={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},qm={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"},Ym={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Gm(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Ym[e])?!!t[e]:!1}function Zi(){return Gm}var Xm=y({},Il,{key:function(e){if(e.key){var t=Bm[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ns(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?qm[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Zi,charCode:function(e){return e.type==="keypress"?ns(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ns(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Qm=lt(Xm),Vm=y({},us,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Hc=lt(Vm),Zm=y({},Il,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Zi}),Km=lt(Zm),km=y({},Ya,{propertyName:0,elapsedTime:0,pseudoElement:0}),$m=lt(km),Jm=y({},us,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Wm=lt(Jm),Fm=y({},Ya,{newState:0,oldState:0}),Pm=lt(Fm),Im=[9,13,27,32],Ki=Kt&&"CompositionEvent"in window,tn=null;Kt&&"documentMode"in document&&(tn=document.documentMode);var eh=Kt&&"TextEvent"in window&&!tn,Bc=Kt&&(!Ki||tn&&8<tn&&11>=tn),qc=" ",Yc=!1;function Gc(e,t){switch(e){case"keyup":return Im.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Xc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var dl=!1;function th(e,t){switch(e){case"compositionend":return Xc(t);case"keypress":return t.which!==32?null:(Yc=!0,qc);case"textInput":return e=t.data,e===qc&&Yc?null:e;default:return null}}function ah(e,t){if(dl)return e==="compositionend"||!Ki&&Gc(e,t)?(e=Dc(),ls=Gi=da=null,dl=!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 Bc&&t.locale!=="ko"?null:t.data;default:return null}}var lh={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 Qc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!lh[e.type]:t==="textarea"}function Vc(e,t,a,l){ol?fl?fl.push(l):fl=[l]:ol=l,t=Ws(t,"onChange"),0<t.length&&(a=new is("onChange","change",null,a,l),e.push({event:a,listeners:t}))}var an=null,ln=null;function nh(e){zd(e,0)}function rs(e){var t=Wl(e);if(Tc(t))return e}function Zc(e,t){if(e==="change")return t}var Kc=!1;if(Kt){var ki;if(Kt){var $i="oninput"in document;if(!$i){var kc=document.createElement("div");kc.setAttribute("oninput","return;"),$i=typeof kc.oninput=="function"}ki=$i}else ki=!1;Kc=ki&&(!document.documentMode||9<document.documentMode)}function $c(){an&&(an.detachEvent("onpropertychange",Jc),ln=an=null)}function Jc(e){if(e.propertyName==="value"&&rs(ln)){var t=[];Vc(t,ln,e,Bi(e)),Oc(nh,t)}}function sh(e,t,a){e==="focusin"?($c(),an=t,ln=a,an.attachEvent("onpropertychange",Jc)):e==="focusout"&&$c()}function ih(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return rs(ln)}function uh(e,t){if(e==="click")return rs(t)}function rh(e,t){if(e==="input"||e==="change")return rs(t)}function ch(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var mt=typeof Object.is=="function"?Object.is:ch;function nn(e,t){if(mt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),l=Object.keys(t);if(a.length!==l.length)return!1;for(l=0;l<a.length;l++){var s=a[l];if(!Ti.call(t,s)||!mt(e[s],t[s]))return!1}return!0}function Wc(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Fc(e,t){var a=Wc(e);e=0;for(var l;a;){if(a.nodeType===3){if(l=e+a.textContent.length,e<=t&&l>=t)return{node:a,offset:t-e};e=l}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Wc(a)}}function Pc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Pc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ic(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=ts(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=ts(e.document)}return t}function Ji(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var oh=Kt&&"documentMode"in document&&11>=document.documentMode,ml=null,Wi=null,sn=null,Fi=!1;function eo(e,t,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Fi||ml==null||ml!==ts(l)||(l=ml,"selectionStart"in l&&Ji(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),sn&&nn(sn,l)||(sn=l,l=Ws(Wi,"onSelect"),0<l.length&&(t=new is("onSelect","select",null,t,a),e.push({event:t,listeners:l}),t.target=ml)))}function Ga(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var hl={animationend:Ga("Animation","AnimationEnd"),animationiteration:Ga("Animation","AnimationIteration"),animationstart:Ga("Animation","AnimationStart"),transitionrun:Ga("Transition","TransitionRun"),transitionstart:Ga("Transition","TransitionStart"),transitioncancel:Ga("Transition","TransitionCancel"),transitionend:Ga("Transition","TransitionEnd")},Pi={},to={};Kt&&(to=document.createElement("div").style,"AnimationEvent"in window||(delete hl.animationend.animation,delete hl.animationiteration.animation,delete hl.animationstart.animation),"TransitionEvent"in window||delete hl.transitionend.transition);function Xa(e){if(Pi[e])return Pi[e];if(!hl[e])return e;var t=hl[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in to)return Pi[e]=t[a];return e}var ao=Xa("animationend"),lo=Xa("animationiteration"),no=Xa("animationstart"),fh=Xa("transitionrun"),dh=Xa("transitionstart"),mh=Xa("transitioncancel"),so=Xa("transitionend"),io=new Map,Ii="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Ii.push("scrollEnd");function Dt(e,t){io.set(e,t),qa(t,[e])}var cs=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},St=[],xl=0,eu=0;function os(){for(var e=xl,t=eu=xl=0;t<e;){var a=St[t];St[t++]=null;var l=St[t];St[t++]=null;var s=St[t];St[t++]=null;var i=St[t];if(St[t++]=null,l!==null&&s!==null){var f=l.pending;f===null?s.next=s:(s.next=f.next,f.next=s),l.pending=s}i!==0&&uo(a,s,i)}}function fs(e,t,a,l){St[xl++]=e,St[xl++]=t,St[xl++]=a,St[xl++]=l,eu|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function tu(e,t,a,l){return fs(e,t,a,l),ds(e)}function Qa(e,t){return fs(e,null,null,t),ds(e)}function uo(e,t,a){e.lanes|=a;var l=e.alternate;l!==null&&(l.lanes|=a);for(var s=!1,i=e.return;i!==null;)i.childLanes|=a,l=i.alternate,l!==null&&(l.childLanes|=a),i.tag===22&&(e=i.stateNode,e===null||e._visibility&1||(s=!0)),e=i,i=i.return;return e.tag===3?(i=e.stateNode,s&&t!==null&&(s=31-dt(a),e=i.hiddenUpdates,l=e[s],l===null?e[s]=[t]:l.push(t),t.lane=a|536870912),i):null}function ds(e){if(50<zn)throw zn=0,or=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var gl={};function hh(e,t,a,l){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ht(e,t,a,l){return new hh(e,t,a,l)}function au(e){return e=e.prototype,!(!e||!e.isReactComponent)}function kt(e,t){var a=e.alternate;return a===null?(a=ht(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function ro(e,t){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function ms(e,t,a,l,s,i){var f=0;if(l=e,typeof e=="function")au(e)&&(f=1);else if(typeof e=="string")f=vx(e,a,J.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case X:return e=ht(31,a,t,s),e.elementType=X,e.lanes=i,e;case Y:return Va(a.children,s,i,t);case q:f=8,s|=24;break;case V:return e=ht(12,a,t,s|2),e.elementType=V,e.lanes=i,e;case te:return e=ht(13,a,t,s),e.elementType=te,e.lanes=i,e;case k:return e=ht(19,a,t,s),e.elementType=k,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Q:f=10;break e;case L:f=9;break e;case ue:f=11;break e;case w:f=14;break e;case F:f=16,l=null;break e}f=29,a=Error(r(130,e===null?"null":typeof e,"")),l=null}return t=ht(f,a,t,s),t.elementType=e,t.type=l,t.lanes=i,t}function Va(e,t,a,l){return e=ht(7,e,l,t),e.lanes=a,e}function lu(e,t,a){return e=ht(6,e,null,t),e.lanes=a,e}function co(e){var t=ht(18,null,null,0);return t.stateNode=e,t}function nu(e,t,a){return t=ht(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var oo=new WeakMap;function Et(e,t){if(typeof e=="object"&&e!==null){var a=oo.get(e);return a!==void 0?a:(t={value:e,source:t,stack:cc(t)},oo.set(e,t),t)}return{value:e,source:t,stack:cc(t)}}var yl=[],pl=0,hs=null,un=0,Tt=[],Ct=0,ma=null,Ht=1,Bt="";function $t(e,t){yl[pl++]=un,yl[pl++]=hs,hs=e,un=t}function fo(e,t,a){Tt[Ct++]=Ht,Tt[Ct++]=Bt,Tt[Ct++]=ma,ma=e;var l=Ht;e=Bt;var s=32-dt(l)-1;l&=~(1<<s),a+=1;var i=32-dt(t)+s;if(30<i){var f=s-s%5;i=(l&(1<<f)-1).toString(32),l>>=f,s-=f,Ht=1<<32-dt(t)+s|a<<s|l,Bt=i+e}else Ht=1<<i|a<<s|l,Bt=e}function su(e){e.return!==null&&($t(e,1),fo(e,1,0))}function iu(e){for(;e===hs;)hs=yl[--pl],yl[pl]=null,un=yl[--pl],yl[pl]=null;for(;e===ma;)ma=Tt[--Ct],Tt[Ct]=null,Bt=Tt[--Ct],Tt[Ct]=null,Ht=Tt[--Ct],Tt[Ct]=null}function mo(e,t){Tt[Ct++]=Ht,Tt[Ct++]=Bt,Tt[Ct++]=ma,Ht=t.id,Bt=t.overflow,ma=e}var $e=null,ze=null,me=!1,ha=null,At=!1,uu=Error(r(519));function xa(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw rn(Et(t,e)),uu}function ho(e){var t=e.stateNode,a=e.type,l=e.memoizedProps;switch(t[ke]=e,t[at]=l,a){case"dialog":oe("cancel",t),oe("close",t);break;case"iframe":case"object":case"embed":oe("load",t);break;case"video":case"audio":for(a=0;a<Rn.length;a++)oe(Rn[a],t);break;case"source":oe("error",t);break;case"img":case"image":case"link":oe("error",t),oe("load",t);break;case"details":oe("toggle",t);break;case"input":oe("invalid",t),Cc(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":oe("invalid",t);break;case"textarea":oe("invalid",t),zc(t,l.value,l.defaultValue,l.children)}a=l.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||l.suppressHydrationWarning===!0||Od(t.textContent,a)?(l.popover!=null&&(oe("beforetoggle",t),oe("toggle",t)),l.onScroll!=null&&oe("scroll",t),l.onScrollEnd!=null&&oe("scrollend",t),l.onClick!=null&&(t.onclick=Zt),t=!0):t=!1,t||xa(e,!0)}function xo(e){for($e=e.return;$e;)switch($e.tag){case 5:case 31:case 13:At=!1;return;case 27:case 3:At=!0;return;default:$e=$e.return}}function vl(e){if(e!==$e)return!1;if(!me)return xo(e),me=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Tr(e.type,e.memoizedProps)),a=!a),a&&ze&&xa(e),xo(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));ze=Gd(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));ze=Gd(e)}else t===27?(t=ze,Ma(e.type)?(e=Rr,Rr=null,ze=e):ze=t):ze=$e?Mt(e.stateNode.nextSibling):null;return!0}function Za(){ze=$e=null,me=!1}function ru(){var e=ha;return e!==null&&(ut===null?ut=e:ut.push.apply(ut,e),ha=null),e}function rn(e){ha===null?ha=[e]:ha.push(e)}var cu=S(null),Ka=null,Jt=null;function ga(e,t,a){K(cu,t._currentValue),t._currentValue=a}function Wt(e){e._currentValue=cu.current,B(cu)}function ou(e,t,a){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===a)break;e=e.return}}function fu(e,t,a,l){var s=e.child;for(s!==null&&(s.return=e);s!==null;){var i=s.dependencies;if(i!==null){var f=s.child;i=i.firstContext;e:for(;i!==null;){var m=i;i=s;for(var v=0;v<t.length;v++)if(m.context===t[v]){i.lanes|=a,m=i.alternate,m!==null&&(m.lanes|=a),ou(i.return,a,e),l||(f=null);break e}i=m.next}}else if(s.tag===18){if(f=s.return,f===null)throw Error(r(341));f.lanes|=a,i=f.alternate,i!==null&&(i.lanes|=a),ou(f,a,e),f=null}else f=s.child;if(f!==null)f.return=s;else for(f=s;f!==null;){if(f===e){f=null;break}if(s=f.sibling,s!==null){s.return=f.return,f=s;break}f=f.return}s=f}}function bl(e,t,a,l){e=null;for(var s=t,i=!1;s!==null;){if(!i){if((s.flags&524288)!==0)i=!0;else if((s.flags&262144)!==0)break}if(s.tag===10){var f=s.alternate;if(f===null)throw Error(r(387));if(f=f.memoizedProps,f!==null){var m=s.type;mt(s.pendingProps.value,f.value)||(e!==null?e.push(m):e=[m])}}else if(s===pe.current){if(f=s.alternate,f===null)throw Error(r(387));f.memoizedState.memoizedState!==s.memoizedState.memoizedState&&(e!==null?e.push(Un):e=[Un])}s=s.return}e!==null&&fu(t,e,a,l),t.flags|=262144}function xs(e){for(e=e.firstContext;e!==null;){if(!mt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ka(e){Ka=e,Jt=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Je(e){return go(Ka,e)}function gs(e,t){return Ka===null&&ka(e),go(e,t)}function go(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},Jt===null){if(e===null)throw Error(r(308));Jt=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Jt=Jt.next=t;return a}var xh=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},gh=u.unstable_scheduleCallback,yh=u.unstable_NormalPriority,He={$$typeof:Q,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function du(){return{controller:new xh,data:new Map,refCount:0}}function cn(e){e.refCount--,e.refCount===0&&gh(yh,function(){e.controller.abort()})}var on=null,mu=0,jl=0,Nl=null;function ph(e,t){if(on===null){var a=on=[];mu=0,jl=gr(),Nl={status:"pending",value:void 0,then:function(l){a.push(l)}}}return mu++,t.then(yo,yo),t}function yo(){if(--mu===0&&on!==null){Nl!==null&&(Nl.status="fulfilled");var e=on;on=null,jl=0,Nl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function vh(e,t){var a=[],l={status:"pending",value:null,reason:null,then:function(s){a.push(s)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var s=0;s<a.length;s++)(0,a[s])(t)},function(s){for(l.status="rejected",l.reason=s,s=0;s<a.length;s++)(0,a[s])(void 0)}),l}var po=D.S;D.S=function(e,t){ad=ot(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&ph(e,t),po!==null&&po(e,t)};var $a=S(null);function hu(){var e=$a.current;return e!==null?e:Ce.pooledCache}function ys(e,t){t===null?K($a,$a.current):K($a,t.pool)}function vo(){var e=hu();return e===null?null:{parent:He._currentValue,pool:e}}var Sl=Error(r(460)),xu=Error(r(474)),ps=Error(r(542)),vs={then:function(){}};function bo(e){return e=e.status,e==="fulfilled"||e==="rejected"}function jo(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Zt,Zt),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,So(e),e;default:if(typeof t.status=="string")t.then(Zt,Zt);else{if(e=Ce,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var s=t;s.status="fulfilled",s.value=l}},function(l){if(t.status==="pending"){var s=t;s.status="rejected",s.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,So(e),e}throw Wa=t,Sl}}function Ja(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Wa=a,Sl):a}}var Wa=null;function No(){if(Wa===null)throw Error(r(459));var e=Wa;return Wa=null,e}function So(e){if(e===Sl||e===ps)throw Error(r(483))}var El=null,fn=0;function bs(e){var t=fn;return fn+=1,El===null&&(El=[]),jo(El,e,t)}function dn(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function js(e,t){throw t.$$typeof===R?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Eo(e){function t(E,N){if(e){var C=E.deletions;C===null?(E.deletions=[N],E.flags|=16):C.push(N)}}function a(E,N){if(!e)return null;for(;N!==null;)t(E,N),N=N.sibling;return null}function l(E){for(var N=new Map;E!==null;)E.key!==null?N.set(E.key,E):N.set(E.index,E),E=E.sibling;return N}function s(E,N){return E=kt(E,N),E.index=0,E.sibling=null,E}function i(E,N,C){return E.index=C,e?(C=E.alternate,C!==null?(C=C.index,C<N?(E.flags|=67108866,N):C):(E.flags|=67108866,N)):(E.flags|=1048576,N)}function f(E){return e&&E.alternate===null&&(E.flags|=67108866),E}function m(E,N,C,U){return N===null||N.tag!==6?(N=lu(C,E.mode,U),N.return=E,N):(N=s(N,C),N.return=E,N)}function v(E,N,C,U){var P=C.type;return P===Y?O(E,N,C.props.children,U,C.key):N!==null&&(N.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===F&&Ja(P)===N.type)?(N=s(N,C.props),dn(N,C),N.return=E,N):(N=ms(C.type,C.key,C.props,null,E.mode,U),dn(N,C),N.return=E,N)}function A(E,N,C,U){return N===null||N.tag!==4||N.stateNode.containerInfo!==C.containerInfo||N.stateNode.implementation!==C.implementation?(N=nu(C,E.mode,U),N.return=E,N):(N=s(N,C.children||[]),N.return=E,N)}function O(E,N,C,U,P){return N===null||N.tag!==7?(N=Va(C,E.mode,U,P),N.return=E,N):(N=s(N,C),N.return=E,N)}function H(E,N,C){if(typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint")return N=lu(""+N,E.mode,C),N.return=E,N;if(typeof N=="object"&&N!==null){switch(N.$$typeof){case G:return C=ms(N.type,N.key,N.props,null,E.mode,C),dn(C,N),C.return=E,C;case _:return N=nu(N,E.mode,C),N.return=E,N;case F:return N=Ja(N),H(E,N,C)}if(Ot(N)||Qe(N))return N=Va(N,E.mode,C,null),N.return=E,N;if(typeof N.then=="function")return H(E,bs(N),C);if(N.$$typeof===Q)return H(E,gs(E,N),C);js(E,N)}return null}function z(E,N,C,U){var P=N!==null?N.key:null;if(typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint")return P!==null?null:m(E,N,""+C,U);if(typeof C=="object"&&C!==null){switch(C.$$typeof){case G:return C.key===P?v(E,N,C,U):null;case _:return C.key===P?A(E,N,C,U):null;case F:return C=Ja(C),z(E,N,C,U)}if(Ot(C)||Qe(C))return P!==null?null:O(E,N,C,U,null);if(typeof C.then=="function")return z(E,N,bs(C),U);if(C.$$typeof===Q)return z(E,N,gs(E,C),U);js(E,C)}return null}function M(E,N,C,U,P){if(typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint")return E=E.get(C)||null,m(N,E,""+U,P);if(typeof U=="object"&&U!==null){switch(U.$$typeof){case G:return E=E.get(U.key===null?C:U.key)||null,v(N,E,U,P);case _:return E=E.get(U.key===null?C:U.key)||null,A(N,E,U,P);case F:return U=Ja(U),M(E,N,C,U,P)}if(Ot(U)||Qe(U))return E=E.get(C)||null,O(N,E,U,P,null);if(typeof U.then=="function")return M(E,N,C,bs(U),P);if(U.$$typeof===Q)return M(E,N,C,gs(N,U),P);js(N,U)}return null}function $(E,N,C,U){for(var P=null,xe=null,W=N,ie=N=0,de=null;W!==null&&ie<C.length;ie++){W.index>ie?(de=W,W=null):de=W.sibling;var ge=z(E,W,C[ie],U);if(ge===null){W===null&&(W=de);break}e&&W&&ge.alternate===null&&t(E,W),N=i(ge,N,ie),xe===null?P=ge:xe.sibling=ge,xe=ge,W=de}if(ie===C.length)return a(E,W),me&&$t(E,ie),P;if(W===null){for(;ie<C.length;ie++)W=H(E,C[ie],U),W!==null&&(N=i(W,N,ie),xe===null?P=W:xe.sibling=W,xe=W);return me&&$t(E,ie),P}for(W=l(W);ie<C.length;ie++)de=M(W,E,ie,C[ie],U),de!==null&&(e&&de.alternate!==null&&W.delete(de.key===null?ie:de.key),N=i(de,N,ie),xe===null?P=de:xe.sibling=de,xe=de);return e&&W.forEach(function(wa){return t(E,wa)}),me&&$t(E,ie),P}function I(E,N,C,U){if(C==null)throw Error(r(151));for(var P=null,xe=null,W=N,ie=N=0,de=null,ge=C.next();W!==null&&!ge.done;ie++,ge=C.next()){W.index>ie?(de=W,W=null):de=W.sibling;var wa=z(E,W,ge.value,U);if(wa===null){W===null&&(W=de);break}e&&W&&wa.alternate===null&&t(E,W),N=i(wa,N,ie),xe===null?P=wa:xe.sibling=wa,xe=wa,W=de}if(ge.done)return a(E,W),me&&$t(E,ie),P;if(W===null){for(;!ge.done;ie++,ge=C.next())ge=H(E,ge.value,U),ge!==null&&(N=i(ge,N,ie),xe===null?P=ge:xe.sibling=ge,xe=ge);return me&&$t(E,ie),P}for(W=l(W);!ge.done;ie++,ge=C.next())ge=M(W,E,ie,ge.value,U),ge!==null&&(e&&ge.alternate!==null&&W.delete(ge.key===null?ie:ge.key),N=i(ge,N,ie),xe===null?P=ge:xe.sibling=ge,xe=ge);return e&&W.forEach(function(Rx){return t(E,Rx)}),me&&$t(E,ie),P}function Ee(E,N,C,U){if(typeof C=="object"&&C!==null&&C.type===Y&&C.key===null&&(C=C.props.children),typeof C=="object"&&C!==null){switch(C.$$typeof){case G:e:{for(var P=C.key;N!==null;){if(N.key===P){if(P=C.type,P===Y){if(N.tag===7){a(E,N.sibling),U=s(N,C.props.children),U.return=E,E=U;break e}}else if(N.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===F&&Ja(P)===N.type){a(E,N.sibling),U=s(N,C.props),dn(U,C),U.return=E,E=U;break e}a(E,N);break}else t(E,N);N=N.sibling}C.type===Y?(U=Va(C.props.children,E.mode,U,C.key),U.return=E,E=U):(U=ms(C.type,C.key,C.props,null,E.mode,U),dn(U,C),U.return=E,E=U)}return f(E);case _:e:{for(P=C.key;N!==null;){if(N.key===P)if(N.tag===4&&N.stateNode.containerInfo===C.containerInfo&&N.stateNode.implementation===C.implementation){a(E,N.sibling),U=s(N,C.children||[]),U.return=E,E=U;break e}else{a(E,N);break}else t(E,N);N=N.sibling}U=nu(C,E.mode,U),U.return=E,E=U}return f(E);case F:return C=Ja(C),Ee(E,N,C,U)}if(Ot(C))return $(E,N,C,U);if(Qe(C)){if(P=Qe(C),typeof P!="function")throw Error(r(150));return C=P.call(C),I(E,N,C,U)}if(typeof C.then=="function")return Ee(E,N,bs(C),U);if(C.$$typeof===Q)return Ee(E,N,gs(E,C),U);js(E,C)}return typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint"?(C=""+C,N!==null&&N.tag===6?(a(E,N.sibling),U=s(N,C),U.return=E,E=U):(a(E,N),U=lu(C,E.mode,U),U.return=E,E=U),f(E)):a(E,N)}return function(E,N,C,U){try{fn=0;var P=Ee(E,N,C,U);return El=null,P}catch(W){if(W===Sl||W===ps)throw W;var xe=ht(29,W,null,E.mode);return xe.lanes=U,xe.return=E,xe}}}var Fa=Eo(!0),To=Eo(!1),ya=!1;function gu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function yu(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function pa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function va(e,t,a){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(ye&2)!==0){var s=l.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),l.pending=t,t=ds(e),uo(e,null,a),t}return fs(e,l,t,a),ds(e)}function mn(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,xc(e,a)}}function pu(e,t){var a=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,a===l)){var s=null,i=null;if(a=a.firstBaseUpdate,a!==null){do{var f={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};i===null?s=i=f:i=i.next=f,a=a.next}while(a!==null);i===null?s=i=t:i=i.next=t}else s=i=t;a={baseState:l.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:l.shared,callbacks:l.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var vu=!1;function hn(){if(vu){var e=Nl;if(e!==null)throw e}}function xn(e,t,a,l){vu=!1;var s=e.updateQueue;ya=!1;var i=s.firstBaseUpdate,f=s.lastBaseUpdate,m=s.shared.pending;if(m!==null){s.shared.pending=null;var v=m,A=v.next;v.next=null,f===null?i=A:f.next=A,f=v;var O=e.alternate;O!==null&&(O=O.updateQueue,m=O.lastBaseUpdate,m!==f&&(m===null?O.firstBaseUpdate=A:m.next=A,O.lastBaseUpdate=v))}if(i!==null){var H=s.baseState;f=0,O=A=v=null,m=i;do{var z=m.lane&-536870913,M=z!==m.lane;if(M?(fe&z)===z:(l&z)===z){z!==0&&z===jl&&(vu=!0),O!==null&&(O=O.next={lane:0,tag:m.tag,payload:m.payload,callback:null,next:null});e:{var $=e,I=m;z=t;var Ee=a;switch(I.tag){case 1:if($=I.payload,typeof $=="function"){H=$.call(Ee,H,z);break e}H=$;break e;case 3:$.flags=$.flags&-65537|128;case 0:if($=I.payload,z=typeof $=="function"?$.call(Ee,H,z):$,z==null)break e;H=y({},H,z);break e;case 2:ya=!0}}z=m.callback,z!==null&&(e.flags|=64,M&&(e.flags|=8192),M=s.callbacks,M===null?s.callbacks=[z]:M.push(z))}else M={lane:z,tag:m.tag,payload:m.payload,callback:m.callback,next:null},O===null?(A=O=M,v=H):O=O.next=M,f|=z;if(m=m.next,m===null){if(m=s.shared.pending,m===null)break;M=m,m=M.next,M.next=null,s.lastBaseUpdate=M,s.shared.pending=null}}while(!0);O===null&&(v=H),s.baseState=v,s.firstBaseUpdate=A,s.lastBaseUpdate=O,i===null&&(s.shared.lanes=0),Ea|=f,e.lanes=f,e.memoizedState=H}}function Co(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function Ao(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)Co(a[e],t)}var Tl=S(null),Ns=S(0);function zo(e,t){e=sa,K(Ns,e),K(Tl,t),sa=e|t.baseLanes}function bu(){K(Ns,sa),K(Tl,Tl.current)}function ju(){sa=Ns.current,B(Tl),B(Ns)}var xt=S(null),zt=null;function ba(e){var t=e.alternate;K(Ue,Ue.current&1),K(xt,e),zt===null&&(t===null||Tl.current!==null||t.memoizedState!==null)&&(zt=e)}function Nu(e){K(Ue,Ue.current),K(xt,e),zt===null&&(zt=e)}function Mo(e){e.tag===22?(K(Ue,Ue.current),K(xt,e),zt===null&&(zt=e)):ja()}function ja(){K(Ue,Ue.current),K(xt,xt.current)}function gt(e){B(xt),zt===e&&(zt=null),B(Ue)}var Ue=S(0);function Ss(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||zr(a)||Mr(a)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Ft=0,se=null,Ne=null,Be=null,Es=!1,Cl=!1,Pa=!1,Ts=0,gn=0,Al=null,bh=0;function Oe(){throw Error(r(321))}function Su(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!mt(e[a],t[a]))return!1;return!0}function Eu(e,t,a,l,s,i){return Ft=i,se=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,D.H=e===null||e.memoizedState===null?mf:qu,Pa=!1,i=a(l,s),Pa=!1,Cl&&(i=_o(t,a,l,s)),Ro(e),i}function Ro(e){D.H=vn;var t=Ne!==null&&Ne.next!==null;if(Ft=0,Be=Ne=se=null,Es=!1,gn=0,Al=null,t)throw Error(r(300));e===null||qe||(e=e.dependencies,e!==null&&xs(e)&&(qe=!0))}function _o(e,t,a,l){se=e;var s=0;do{if(Cl&&(Al=null),gn=0,Cl=!1,25<=s)throw Error(r(301));if(s+=1,Be=Ne=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}D.H=hf,i=t(a,l)}while(Cl);return i}function jh(){var e=D.H,t=e.useState()[0];return t=typeof t.then=="function"?yn(t):t,e=e.useState()[0],(Ne!==null?Ne.memoizedState:null)!==e&&(se.flags|=1024),t}function Tu(){var e=Ts!==0;return Ts=0,e}function Cu(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Au(e){if(Es){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Es=!1}Ft=0,Be=Ne=se=null,Cl=!1,gn=Ts=0,Al=null}function et(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Be===null?se.memoizedState=Be=e:Be=Be.next=e,Be}function Le(){if(Ne===null){var e=se.alternate;e=e!==null?e.memoizedState:null}else e=Ne.next;var t=Be===null?se.memoizedState:Be.next;if(t!==null)Be=t,Ne=e;else{if(e===null)throw se.alternate===null?Error(r(467)):Error(r(310));Ne=e,e={memoizedState:Ne.memoizedState,baseState:Ne.baseState,baseQueue:Ne.baseQueue,queue:Ne.queue,next:null},Be===null?se.memoizedState=Be=e:Be=Be.next=e}return Be}function Cs(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function yn(e){var t=gn;return gn+=1,Al===null&&(Al=[]),e=jo(Al,e,t),t=se,(Be===null?t.memoizedState:Be.next)===null&&(t=t.alternate,D.H=t===null||t.memoizedState===null?mf:qu),e}function As(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return yn(e);if(e.$$typeof===Q)return Je(e)}throw Error(r(438,String(e)))}function zu(e){var t=null,a=se.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var l=se.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(s){return s.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=Cs(),se.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),l=0;l<e;l++)a[l]=Ae;return t.index++,a}function Pt(e,t){return typeof t=="function"?t(e):t}function zs(e){var t=Le();return Mu(t,Ne,e)}function Mu(e,t,a){var l=e.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=a;var s=e.baseQueue,i=l.pending;if(i!==null){if(s!==null){var f=s.next;s.next=i.next,i.next=f}t.baseQueue=s=i,l.pending=null}if(i=e.baseState,s===null)e.memoizedState=i;else{t=s.next;var m=f=null,v=null,A=t,O=!1;do{var H=A.lane&-536870913;if(H!==A.lane?(fe&H)===H:(Ft&H)===H){var z=A.revertLane;if(z===0)v!==null&&(v=v.next={lane:0,revertLane:0,gesture:null,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null}),H===jl&&(O=!0);else if((Ft&z)===z){A=A.next,z===jl&&(O=!0);continue}else H={lane:0,revertLane:A.revertLane,gesture:null,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null},v===null?(m=v=H,f=i):v=v.next=H,se.lanes|=z,Ea|=z;H=A.action,Pa&&a(i,H),i=A.hasEagerState?A.eagerState:a(i,H)}else z={lane:H,revertLane:A.revertLane,gesture:A.gesture,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null},v===null?(m=v=z,f=i):v=v.next=z,se.lanes|=H,Ea|=H;A=A.next}while(A!==null&&A!==t);if(v===null?f=i:v.next=m,!mt(i,e.memoizedState)&&(qe=!0,O&&(a=Nl,a!==null)))throw a;e.memoizedState=i,e.baseState=f,e.baseQueue=v,l.lastRenderedState=i}return s===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function Ru(e){var t=Le(),a=t.queue;if(a===null)throw Error(r(311));a.lastRenderedReducer=e;var l=a.dispatch,s=a.pending,i=t.memoizedState;if(s!==null){a.pending=null;var f=s=s.next;do i=e(i,f.action),f=f.next;while(f!==s);mt(i,t.memoizedState)||(qe=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),a.lastRenderedState=i}return[i,l]}function Oo(e,t,a){var l=se,s=Le(),i=me;if(i){if(a===void 0)throw Error(r(407));a=a()}else a=t();var f=!mt((Ne||s).memoizedState,a);if(f&&(s.memoizedState=a,qe=!0),s=s.queue,Du(Uo.bind(null,l,s,e),[e]),s.getSnapshot!==t||f||Be!==null&&Be.memoizedState.tag&1){if(l.flags|=2048,zl(9,{destroy:void 0},wo.bind(null,l,s,a,t),null),Ce===null)throw Error(r(349));i||(Ft&127)!==0||Do(l,t,a)}return a}function Do(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=se.updateQueue,t===null?(t=Cs(),se.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function wo(e,t,a,l){t.value=a,t.getSnapshot=l,Lo(t)&&Ho(e)}function Uo(e,t,a){return a(function(){Lo(t)&&Ho(e)})}function Lo(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!mt(e,a)}catch{return!0}}function Ho(e){var t=Qa(e,2);t!==null&&rt(t,e,2)}function _u(e){var t=et();if(typeof e=="function"){var a=e;if(e=a(),Pa){oa(!0);try{a()}finally{oa(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pt,lastRenderedState:e},t}function Bo(e,t,a,l){return e.baseState=a,Mu(e,Ne,typeof l=="function"?l:Pt)}function Nh(e,t,a,l,s){if(_s(e))throw Error(r(485));if(e=t.action,e!==null){var i={payload:s,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(f){i.listeners.push(f)}};D.T!==null?a(!0):i.isTransition=!1,l(i),a=t.pending,a===null?(i.next=t.pending=i,qo(t,i)):(i.next=a.next,t.pending=a.next=i)}}function qo(e,t){var a=t.action,l=t.payload,s=e.state;if(t.isTransition){var i=D.T,f={};D.T=f;try{var m=a(s,l),v=D.S;v!==null&&v(f,m),Yo(e,t,m)}catch(A){Ou(e,t,A)}finally{i!==null&&f.types!==null&&(i.types=f.types),D.T=i}}else try{i=a(s,l),Yo(e,t,i)}catch(A){Ou(e,t,A)}}function Yo(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(l){Go(e,t,l)},function(l){return Ou(e,t,l)}):Go(e,t,a)}function Go(e,t,a){t.status="fulfilled",t.value=a,Xo(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,qo(e,a)))}function Ou(e,t,a){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=a,Xo(t),t=t.next;while(t!==l)}e.action=null}function Xo(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Qo(e,t){return t}function Vo(e,t){if(me){var a=Ce.formState;if(a!==null){e:{var l=se;if(me){if(ze){t:{for(var s=ze,i=At;s.nodeType!==8;){if(!i){s=null;break t}if(s=Mt(s.nextSibling),s===null){s=null;break t}}i=s.data,s=i==="F!"||i==="F"?s:null}if(s){ze=Mt(s.nextSibling),l=s.data==="F!";break e}}xa(l)}l=!1}l&&(t=a[0])}}return a=et(),a.memoizedState=a.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qo,lastRenderedState:t},a.queue=l,a=of.bind(null,se,l),l.dispatch=a,l=_u(!1),i=Bu.bind(null,se,!1,l.queue),l=et(),s={state:t,dispatch:null,action:e,pending:null},l.queue=s,a=Nh.bind(null,se,s,i,a),s.dispatch=a,l.memoizedState=e,[t,a,!1]}function Zo(e){var t=Le();return Ko(t,Ne,e)}function Ko(e,t,a){if(t=Mu(e,t,Qo)[0],e=zs(Pt)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=yn(t)}catch(f){throw f===Sl?ps:f}else l=t;t=Le();var s=t.queue,i=s.dispatch;return a!==t.memoizedState&&(se.flags|=2048,zl(9,{destroy:void 0},Sh.bind(null,s,a),null)),[l,i,e]}function Sh(e,t){e.action=t}function ko(e){var t=Le(),a=Ne;if(a!==null)return Ko(t,a,e);Le(),t=t.memoizedState,a=Le();var l=a.queue.dispatch;return a.memoizedState=e,[t,l,!1]}function zl(e,t,a,l){return e={tag:e,create:a,deps:l,inst:t,next:null},t=se.updateQueue,t===null&&(t=Cs(),se.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(l=a.next,a.next=e,e.next=l,t.lastEffect=e),e}function $o(){return Le().memoizedState}function Ms(e,t,a,l){var s=et();se.flags|=e,s.memoizedState=zl(1|t,{destroy:void 0},a,l===void 0?null:l)}function Rs(e,t,a,l){var s=Le();l=l===void 0?null:l;var i=s.memoizedState.inst;Ne!==null&&l!==null&&Su(l,Ne.memoizedState.deps)?s.memoizedState=zl(t,i,a,l):(se.flags|=e,s.memoizedState=zl(1|t,i,a,l))}function Jo(e,t){Ms(8390656,8,e,t)}function Du(e,t){Rs(2048,8,e,t)}function Eh(e){se.flags|=4;var t=se.updateQueue;if(t===null)t=Cs(),se.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function Wo(e){var t=Le().memoizedState;return Eh({ref:t,nextImpl:e}),function(){if((ye&2)!==0)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function Fo(e,t){return Rs(4,2,e,t)}function Po(e,t){return Rs(4,4,e,t)}function Io(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ef(e,t,a){a=a!=null?a.concat([e]):null,Rs(4,4,Io.bind(null,t,e),a)}function wu(){}function tf(e,t){var a=Le();t=t===void 0?null:t;var l=a.memoizedState;return t!==null&&Su(t,l[1])?l[0]:(a.memoizedState=[e,t],e)}function af(e,t){var a=Le();t=t===void 0?null:t;var l=a.memoizedState;if(t!==null&&Su(t,l[1]))return l[0];if(l=e(),Pa){oa(!0);try{e()}finally{oa(!1)}}return a.memoizedState=[l,t],l}function Uu(e,t,a){return a===void 0||(Ft&1073741824)!==0&&(fe&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=nd(),se.lanes|=e,Ea|=e,a)}function lf(e,t,a,l){return mt(a,t)?a:Tl.current!==null?(e=Uu(e,a,l),mt(e,t)||(qe=!0),e):(Ft&42)===0||(Ft&1073741824)!==0&&(fe&261930)===0?(qe=!0,e.memoizedState=a):(e=nd(),se.lanes|=e,Ea|=e,t)}function nf(e,t,a,l,s){var i=Z.p;Z.p=i!==0&&8>i?i:8;var f=D.T,m={};D.T=m,Bu(e,!1,t,a);try{var v=s(),A=D.S;if(A!==null&&A(m,v),v!==null&&typeof v=="object"&&typeof v.then=="function"){var O=vh(v,l);pn(e,t,O,vt(e))}else pn(e,t,l,vt(e))}catch(H){pn(e,t,{then:function(){},status:"rejected",reason:H},vt())}finally{Z.p=i,f!==null&&m.types!==null&&(f.types=m.types),D.T=f}}function Th(){}function Lu(e,t,a,l){if(e.tag!==5)throw Error(r(476));var s=sf(e).queue;nf(e,s,t,ee,a===null?Th:function(){return uf(e),a(l)})}function sf(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ee,baseState:ee,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pt,lastRenderedState:ee},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pt,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function uf(e){var t=sf(e);t.next===null&&(t=e.alternate.memoizedState),pn(e,t.next.queue,{},vt())}function Hu(){return Je(Un)}function rf(){return Le().memoizedState}function cf(){return Le().memoizedState}function Ch(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=vt();e=pa(a);var l=va(t,e,a);l!==null&&(rt(l,t,a),mn(l,t,a)),t={cache:du()},e.payload=t;return}t=t.return}}function Ah(e,t,a){var l=vt();a={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},_s(e)?ff(t,a):(a=tu(e,t,a,l),a!==null&&(rt(a,e,l),df(a,t,l)))}function of(e,t,a){var l=vt();pn(e,t,a,l)}function pn(e,t,a,l){var s={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(_s(e))ff(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var f=t.lastRenderedState,m=i(f,a);if(s.hasEagerState=!0,s.eagerState=m,mt(m,f))return fs(e,t,s,0),Ce===null&&os(),!1}catch{}if(a=tu(e,t,s,l),a!==null)return rt(a,e,l),df(a,t,l),!0}return!1}function Bu(e,t,a,l){if(l={lane:2,revertLane:gr(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},_s(e)){if(t)throw Error(r(479))}else t=tu(e,a,l,2),t!==null&&rt(t,e,2)}function _s(e){var t=e.alternate;return e===se||t!==null&&t===se}function ff(e,t){Cl=Es=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function df(e,t,a){if((a&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,xc(e,a)}}var vn={readContext:Je,use:As,useCallback:Oe,useContext:Oe,useEffect:Oe,useImperativeHandle:Oe,useLayoutEffect:Oe,useInsertionEffect:Oe,useMemo:Oe,useReducer:Oe,useRef:Oe,useState:Oe,useDebugValue:Oe,useDeferredValue:Oe,useTransition:Oe,useSyncExternalStore:Oe,useId:Oe,useHostTransitionStatus:Oe,useFormState:Oe,useActionState:Oe,useOptimistic:Oe,useMemoCache:Oe,useCacheRefresh:Oe};vn.useEffectEvent=Oe;var mf={readContext:Je,use:As,useCallback:function(e,t){return et().memoizedState=[e,t===void 0?null:t],e},useContext:Je,useEffect:Jo,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,Ms(4194308,4,Io.bind(null,t,e),a)},useLayoutEffect:function(e,t){return Ms(4194308,4,e,t)},useInsertionEffect:function(e,t){Ms(4,2,e,t)},useMemo:function(e,t){var a=et();t=t===void 0?null:t;var l=e();if(Pa){oa(!0);try{e()}finally{oa(!1)}}return a.memoizedState=[l,t],l},useReducer:function(e,t,a){var l=et();if(a!==void 0){var s=a(t);if(Pa){oa(!0);try{a(t)}finally{oa(!1)}}}else s=t;return l.memoizedState=l.baseState=s,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:s},l.queue=e,e=e.dispatch=Ah.bind(null,se,e),[l.memoizedState,e]},useRef:function(e){var t=et();return e={current:e},t.memoizedState=e},useState:function(e){e=_u(e);var t=e.queue,a=of.bind(null,se,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:wu,useDeferredValue:function(e,t){var a=et();return Uu(a,e,t)},useTransition:function(){var e=_u(!1);return e=nf.bind(null,se,e.queue,!0,!1),et().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var l=se,s=et();if(me){if(a===void 0)throw Error(r(407));a=a()}else{if(a=t(),Ce===null)throw Error(r(349));(fe&127)!==0||Do(l,t,a)}s.memoizedState=a;var i={value:a,getSnapshot:t};return s.queue=i,Jo(Uo.bind(null,l,i,e),[e]),l.flags|=2048,zl(9,{destroy:void 0},wo.bind(null,l,i,a,t),null),a},useId:function(){var e=et(),t=Ce.identifierPrefix;if(me){var a=Bt,l=Ht;a=(l&~(1<<32-dt(l)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Ts++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=bh++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Hu,useFormState:Vo,useActionState:Vo,useOptimistic:function(e){var t=et();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=Bu.bind(null,se,!0,a),a.dispatch=t,[e,t]},useMemoCache:zu,useCacheRefresh:function(){return et().memoizedState=Ch.bind(null,se)},useEffectEvent:function(e){var t=et(),a={impl:e};return t.memoizedState=a,function(){if((ye&2)!==0)throw Error(r(440));return a.impl.apply(void 0,arguments)}}},qu={readContext:Je,use:As,useCallback:tf,useContext:Je,useEffect:Du,useImperativeHandle:ef,useInsertionEffect:Fo,useLayoutEffect:Po,useMemo:af,useReducer:zs,useRef:$o,useState:function(){return zs(Pt)},useDebugValue:wu,useDeferredValue:function(e,t){var a=Le();return lf(a,Ne.memoizedState,e,t)},useTransition:function(){var e=zs(Pt)[0],t=Le().memoizedState;return[typeof e=="boolean"?e:yn(e),t]},useSyncExternalStore:Oo,useId:rf,useHostTransitionStatus:Hu,useFormState:Zo,useActionState:Zo,useOptimistic:function(e,t){var a=Le();return Bo(a,Ne,e,t)},useMemoCache:zu,useCacheRefresh:cf};qu.useEffectEvent=Wo;var hf={readContext:Je,use:As,useCallback:tf,useContext:Je,useEffect:Du,useImperativeHandle:ef,useInsertionEffect:Fo,useLayoutEffect:Po,useMemo:af,useReducer:Ru,useRef:$o,useState:function(){return Ru(Pt)},useDebugValue:wu,useDeferredValue:function(e,t){var a=Le();return Ne===null?Uu(a,e,t):lf(a,Ne.memoizedState,e,t)},useTransition:function(){var e=Ru(Pt)[0],t=Le().memoizedState;return[typeof e=="boolean"?e:yn(e),t]},useSyncExternalStore:Oo,useId:rf,useHostTransitionStatus:Hu,useFormState:ko,useActionState:ko,useOptimistic:function(e,t){var a=Le();return Ne!==null?Bo(a,Ne,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:zu,useCacheRefresh:cf};hf.useEffectEvent=Wo;function Yu(e,t,a,l){t=e.memoizedState,a=a(l,t),a=a==null?t:y({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Gu={enqueueSetState:function(e,t,a){e=e._reactInternals;var l=vt(),s=pa(l);s.payload=t,a!=null&&(s.callback=a),t=va(e,s,l),t!==null&&(rt(t,e,l),mn(t,e,l))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var l=vt(),s=pa(l);s.tag=1,s.payload=t,a!=null&&(s.callback=a),t=va(e,s,l),t!==null&&(rt(t,e,l),mn(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=vt(),l=pa(a);l.tag=2,t!=null&&(l.callback=t),t=va(e,l,a),t!==null&&(rt(t,e,a),mn(t,e,a))}};function xf(e,t,a,l,s,i,f){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,i,f):t.prototype&&t.prototype.isPureReactComponent?!nn(a,l)||!nn(s,i):!0}function gf(e,t,a,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,l),t.state!==e&&Gu.enqueueReplaceState(t,t.state,null)}function Ia(e,t){var a=t;if("ref"in t){a={};for(var l in t)l!=="ref"&&(a[l]=t[l])}if(e=e.defaultProps){a===t&&(a=y({},a));for(var s in e)a[s]===void 0&&(a[s]=e[s])}return a}function yf(e){cs(e)}function pf(e){console.error(e)}function vf(e){cs(e)}function Os(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function bf(e,t,a){try{var l=e.onCaughtError;l(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(s){setTimeout(function(){throw s})}}function Xu(e,t,a){return a=pa(a),a.tag=3,a.payload={element:null},a.callback=function(){Os(e,t)},a}function jf(e){return e=pa(e),e.tag=3,e}function Nf(e,t,a,l){var s=a.type.getDerivedStateFromError;if(typeof s=="function"){var i=l.value;e.payload=function(){return s(i)},e.callback=function(){bf(t,a,l)}}var f=a.stateNode;f!==null&&typeof f.componentDidCatch=="function"&&(e.callback=function(){bf(t,a,l),typeof s!="function"&&(Ta===null?Ta=new Set([this]):Ta.add(this));var m=l.stack;this.componentDidCatch(l.value,{componentStack:m!==null?m:""})})}function zh(e,t,a,l,s){if(a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=a.alternate,t!==null&&bl(t,a,s,!0),a=xt.current,a!==null){switch(a.tag){case 31:case 13:return zt===null?Vs():a.alternate===null&&De===0&&(De=3),a.flags&=-257,a.flags|=65536,a.lanes=s,l===vs?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([l]):t.add(l),mr(e,l,s)),!1;case 22:return a.flags|=65536,l===vs?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([l]):a.add(l)),mr(e,l,s)),!1}throw Error(r(435,a.tag))}return mr(e,l,s),Vs(),!1}if(me)return t=xt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=s,l!==uu&&(e=Error(r(422),{cause:l}),rn(Et(e,a)))):(l!==uu&&(t=Error(r(423),{cause:l}),rn(Et(t,a))),e=e.current.alternate,e.flags|=65536,s&=-s,e.lanes|=s,l=Et(l,a),s=Xu(e.stateNode,l,s),pu(e,s),De!==4&&(De=2)),!1;var i=Error(r(520),{cause:l});if(i=Et(i,a),An===null?An=[i]:An.push(i),De!==4&&(De=2),t===null)return!0;l=Et(l,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=s&-s,a.lanes|=e,e=Xu(a.stateNode,l,e),pu(a,e),!1;case 1:if(t=a.type,i=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(Ta===null||!Ta.has(i))))return a.flags|=65536,s&=-s,a.lanes|=s,s=jf(s),Nf(s,e,a,l),pu(a,s),!1}a=a.return}while(a!==null);return!1}var Qu=Error(r(461)),qe=!1;function We(e,t,a,l){t.child=e===null?To(t,null,a,l):Fa(t,e.child,a,l)}function Sf(e,t,a,l,s){a=a.render;var i=t.ref;if("ref"in l){var f={};for(var m in l)m!=="ref"&&(f[m]=l[m])}else f=l;return ka(t),l=Eu(e,t,a,f,i,s),m=Tu(),e!==null&&!qe?(Cu(e,t,s),It(e,t,s)):(me&&m&&su(t),t.flags|=1,We(e,t,l,s),t.child)}function Ef(e,t,a,l,s){if(e===null){var i=a.type;return typeof i=="function"&&!au(i)&&i.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=i,Tf(e,t,i,l,s)):(e=ms(a.type,null,l,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!Fu(e,s)){var f=i.memoizedProps;if(a=a.compare,a=a!==null?a:nn,a(f,l)&&e.ref===t.ref)return It(e,t,s)}return t.flags|=1,e=kt(i,l),e.ref=t.ref,e.return=t,t.child=e}function Tf(e,t,a,l,s){if(e!==null){var i=e.memoizedProps;if(nn(i,l)&&e.ref===t.ref)if(qe=!1,t.pendingProps=l=i,Fu(e,s))(e.flags&131072)!==0&&(qe=!0);else return t.lanes=e.lanes,It(e,t,s)}return Vu(e,t,a,l,s)}function Cf(e,t,a,l){var s=l.children,i=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(i=i!==null?i.baseLanes|a:a,e!==null){for(l=t.child=e.child,s=0;l!==null;)s=s|l.lanes|l.childLanes,l=l.sibling;l=s&~i}else l=0,t.child=null;return Af(e,t,i,a,l)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ys(t,i!==null?i.cachePool:null),i!==null?zo(t,i):bu(),Mo(t);else return l=t.lanes=536870912,Af(e,t,i!==null?i.baseLanes|a:a,a,l)}else i!==null?(ys(t,i.cachePool),zo(t,i),ja(),t.memoizedState=null):(e!==null&&ys(t,null),bu(),ja());return We(e,t,s,a),t.child}function bn(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Af(e,t,a,l,s){var i=hu();return i=i===null?null:{parent:He._currentValue,pool:i},t.memoizedState={baseLanes:a,cachePool:i},e!==null&&ys(t,null),bu(),Mo(t),e!==null&&bl(e,t,l,!0),t.childLanes=s,null}function Ds(e,t){return t=Us({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function zf(e,t,a){return Fa(t,e.child,null,a),e=Ds(t,t.pendingProps),e.flags|=2,gt(t),t.memoizedState=null,e}function Mh(e,t,a){var l=t.pendingProps,s=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(me){if(l.mode==="hidden")return e=Ds(t,l),t.lanes=536870912,bn(null,e);if(Nu(t),(e=ze)?(e=Yd(e,At),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ma!==null?{id:Ht,overflow:Bt}:null,retryLane:536870912,hydrationErrors:null},a=co(e),a.return=t,t.child=a,$e=t,ze=null)):e=null,e===null)throw xa(t);return t.lanes=536870912,null}return Ds(t,l)}var i=e.memoizedState;if(i!==null){var f=i.dehydrated;if(Nu(t),s)if(t.flags&256)t.flags&=-257,t=zf(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(r(558));else if(qe||bl(e,t,a,!1),s=(a&e.childLanes)!==0,qe||s){if(l=Ce,l!==null&&(f=gc(l,a),f!==0&&f!==i.retryLane))throw i.retryLane=f,Qa(e,f),rt(l,e,f),Qu;Vs(),t=zf(e,t,a)}else e=i.treeContext,ze=Mt(f.nextSibling),$e=t,me=!0,ha=null,At=!1,e!==null&&mo(t,e),t=Ds(t,l),t.flags|=4096;return t}return e=kt(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function ws(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(r(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function Vu(e,t,a,l,s){return ka(t),a=Eu(e,t,a,l,void 0,s),l=Tu(),e!==null&&!qe?(Cu(e,t,s),It(e,t,s)):(me&&l&&su(t),t.flags|=1,We(e,t,a,s),t.child)}function Mf(e,t,a,l,s,i){return ka(t),t.updateQueue=null,a=_o(t,l,a,s),Ro(e),l=Tu(),e!==null&&!qe?(Cu(e,t,i),It(e,t,i)):(me&&l&&su(t),t.flags|=1,We(e,t,a,i),t.child)}function Rf(e,t,a,l,s){if(ka(t),t.stateNode===null){var i=gl,f=a.contextType;typeof f=="object"&&f!==null&&(i=Je(f)),i=new a(l,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=Gu,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=l,i.state=t.memoizedState,i.refs={},gu(t),f=a.contextType,i.context=typeof f=="object"&&f!==null?Je(f):gl,i.state=t.memoizedState,f=a.getDerivedStateFromProps,typeof f=="function"&&(Yu(t,a,f,l),i.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(f=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),f!==i.state&&Gu.enqueueReplaceState(i,i.state,null),xn(t,l,i,s),hn(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){i=t.stateNode;var m=t.memoizedProps,v=Ia(a,m);i.props=v;var A=i.context,O=a.contextType;f=gl,typeof O=="object"&&O!==null&&(f=Je(O));var H=a.getDerivedStateFromProps;O=typeof H=="function"||typeof i.getSnapshotBeforeUpdate=="function",m=t.pendingProps!==m,O||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(m||A!==f)&&gf(t,i,l,f),ya=!1;var z=t.memoizedState;i.state=z,xn(t,l,i,s),hn(),A=t.memoizedState,m||z!==A||ya?(typeof H=="function"&&(Yu(t,a,H,l),A=t.memoizedState),(v=ya||xf(t,a,v,l,z,A,f))?(O||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=A),i.props=l,i.state=A,i.context=f,l=v):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{i=t.stateNode,yu(e,t),f=t.memoizedProps,O=Ia(a,f),i.props=O,H=t.pendingProps,z=i.context,A=a.contextType,v=gl,typeof A=="object"&&A!==null&&(v=Je(A)),m=a.getDerivedStateFromProps,(A=typeof m=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(f!==H||z!==v)&&gf(t,i,l,v),ya=!1,z=t.memoizedState,i.state=z,xn(t,l,i,s),hn();var M=t.memoizedState;f!==H||z!==M||ya||e!==null&&e.dependencies!==null&&xs(e.dependencies)?(typeof m=="function"&&(Yu(t,a,m,l),M=t.memoizedState),(O=ya||xf(t,a,O,l,z,M,v)||e!==null&&e.dependencies!==null&&xs(e.dependencies))?(A||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(l,M,v),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(l,M,v)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||f===e.memoizedProps&&z===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||f===e.memoizedProps&&z===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=M),i.props=l,i.state=M,i.context=v,l=O):(typeof i.componentDidUpdate!="function"||f===e.memoizedProps&&z===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||f===e.memoizedProps&&z===e.memoizedState||(t.flags|=1024),l=!1)}return i=l,ws(e,t),l=(t.flags&128)!==0,i||l?(i=t.stateNode,a=l&&typeof a.getDerivedStateFromError!="function"?null:i.render(),t.flags|=1,e!==null&&l?(t.child=Fa(t,e.child,null,s),t.child=Fa(t,null,a,s)):We(e,t,a,s),t.memoizedState=i.state,e=t.child):e=It(e,t,s),e}function _f(e,t,a,l){return Za(),t.flags|=256,We(e,t,a,l),t.child}var Zu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ku(e){return{baseLanes:e,cachePool:vo()}}function ku(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=pt),e}function Of(e,t,a){var l=t.pendingProps,s=!1,i=(t.flags&128)!==0,f;if((f=i)||(f=e!==null&&e.memoizedState===null?!1:(Ue.current&2)!==0),f&&(s=!0,t.flags&=-129),f=(t.flags&32)!==0,t.flags&=-33,e===null){if(me){if(s?ba(t):ja(),(e=ze)?(e=Yd(e,At),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ma!==null?{id:Ht,overflow:Bt}:null,retryLane:536870912,hydrationErrors:null},a=co(e),a.return=t,t.child=a,$e=t,ze=null)):e=null,e===null)throw xa(t);return Mr(e)?t.lanes=32:t.lanes=536870912,null}var m=l.children;return l=l.fallback,s?(ja(),s=t.mode,m=Us({mode:"hidden",children:m},s),l=Va(l,s,a,null),m.return=t,l.return=t,m.sibling=l,t.child=m,l=t.child,l.memoizedState=Ku(a),l.childLanes=ku(e,f,a),t.memoizedState=Zu,bn(null,l)):(ba(t),$u(t,m))}var v=e.memoizedState;if(v!==null&&(m=v.dehydrated,m!==null)){if(i)t.flags&256?(ba(t),t.flags&=-257,t=Ju(e,t,a)):t.memoizedState!==null?(ja(),t.child=e.child,t.flags|=128,t=null):(ja(),m=l.fallback,s=t.mode,l=Us({mode:"visible",children:l.children},s),m=Va(m,s,a,null),m.flags|=2,l.return=t,m.return=t,l.sibling=m,t.child=l,Fa(t,e.child,null,a),l=t.child,l.memoizedState=Ku(a),l.childLanes=ku(e,f,a),t.memoizedState=Zu,t=bn(null,l));else if(ba(t),Mr(m)){if(f=m.nextSibling&&m.nextSibling.dataset,f)var A=f.dgst;f=A,l=Error(r(419)),l.stack="",l.digest=f,rn({value:l,source:null,stack:null}),t=Ju(e,t,a)}else if(qe||bl(e,t,a,!1),f=(a&e.childLanes)!==0,qe||f){if(f=Ce,f!==null&&(l=gc(f,a),l!==0&&l!==v.retryLane))throw v.retryLane=l,Qa(e,l),rt(f,e,l),Qu;zr(m)||Vs(),t=Ju(e,t,a)}else zr(m)?(t.flags|=192,t.child=e.child,t=null):(e=v.treeContext,ze=Mt(m.nextSibling),$e=t,me=!0,ha=null,At=!1,e!==null&&mo(t,e),t=$u(t,l.children),t.flags|=4096);return t}return s?(ja(),m=l.fallback,s=t.mode,v=e.child,A=v.sibling,l=kt(v,{mode:"hidden",children:l.children}),l.subtreeFlags=v.subtreeFlags&65011712,A!==null?m=kt(A,m):(m=Va(m,s,a,null),m.flags|=2),m.return=t,l.return=t,l.sibling=m,t.child=l,bn(null,l),l=t.child,m=e.child.memoizedState,m===null?m=Ku(a):(s=m.cachePool,s!==null?(v=He._currentValue,s=s.parent!==v?{parent:v,pool:v}:s):s=vo(),m={baseLanes:m.baseLanes|a,cachePool:s}),l.memoizedState=m,l.childLanes=ku(e,f,a),t.memoizedState=Zu,bn(e.child,l)):(ba(t),a=e.child,e=a.sibling,a=kt(a,{mode:"visible",children:l.children}),a.return=t,a.sibling=null,e!==null&&(f=t.deletions,f===null?(t.deletions=[e],t.flags|=16):f.push(e)),t.child=a,t.memoizedState=null,a)}function $u(e,t){return t=Us({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Us(e,t){return e=ht(22,e,null,t),e.lanes=0,e}function Ju(e,t,a){return Fa(t,e.child,null,a),e=$u(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Df(e,t,a){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),ou(e.return,t,a)}function Wu(e,t,a,l,s,i){var f=e.memoizedState;f===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:a,tailMode:s,treeForkCount:i}:(f.isBackwards=t,f.rendering=null,f.renderingStartTime=0,f.last=l,f.tail=a,f.tailMode=s,f.treeForkCount=i)}function wf(e,t,a){var l=t.pendingProps,s=l.revealOrder,i=l.tail;l=l.children;var f=Ue.current,m=(f&2)!==0;if(m?(f=f&1|2,t.flags|=128):f&=1,K(Ue,f),We(e,t,l,a),l=me?un:0,!m&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Df(e,a,t);else if(e.tag===19)Df(e,a,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(s){case"forwards":for(a=t.child,s=null;a!==null;)e=a.alternate,e!==null&&Ss(e)===null&&(s=a),a=a.sibling;a=s,a===null?(s=t.child,t.child=null):(s=a.sibling,a.sibling=null),Wu(t,!1,s,a,i,l);break;case"backwards":case"unstable_legacy-backwards":for(a=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Ss(e)===null){t.child=s;break}e=s.sibling,s.sibling=a,a=s,s=e}Wu(t,!0,a,null,i,l);break;case"together":Wu(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function It(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Ea|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(bl(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,a=kt(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=kt(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function Fu(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&xs(e)))}function Rh(e,t,a){switch(t.tag){case 3:Ie(t,t.stateNode.containerInfo),ga(t,He,e.memoizedState.cache),Za();break;case 27:case 5:Zl(t);break;case 4:Ie(t,t.stateNode.containerInfo);break;case 10:ga(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Nu(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(ba(t),t.flags|=128,null):(a&t.child.childLanes)!==0?Of(e,t,a):(ba(t),e=It(e,t,a),e!==null?e.sibling:null);ba(t);break;case 19:var s=(e.flags&128)!==0;if(l=(a&t.childLanes)!==0,l||(bl(e,t,a,!1),l=(a&t.childLanes)!==0),s){if(l)return wf(e,t,a);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),K(Ue,Ue.current),l)break;return null;case 22:return t.lanes=0,Cf(e,t,a,t.pendingProps);case 24:ga(t,He,e.memoizedState.cache)}return It(e,t,a)}function Uf(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)qe=!0;else{if(!Fu(e,a)&&(t.flags&128)===0)return qe=!1,Rh(e,t,a);qe=(e.flags&131072)!==0}else qe=!1,me&&(t.flags&1048576)!==0&&fo(t,un,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=Ja(t.elementType),t.type=e,typeof e=="function")au(e)?(l=Ia(e,l),t.tag=1,t=Rf(null,t,e,l,a)):(t.tag=0,t=Vu(null,t,e,l,a));else{if(e!=null){var s=e.$$typeof;if(s===ue){t.tag=11,t=Sf(null,t,e,l,a);break e}else if(s===w){t.tag=14,t=Ef(null,t,e,l,a);break e}}throw t=Qt(e)||e,Error(r(306,t,""))}}return t;case 0:return Vu(e,t,t.type,t.pendingProps,a);case 1:return l=t.type,s=Ia(l,t.pendingProps),Rf(e,t,l,s,a);case 3:e:{if(Ie(t,t.stateNode.containerInfo),e===null)throw Error(r(387));l=t.pendingProps;var i=t.memoizedState;s=i.element,yu(e,t),xn(t,l,null,a);var f=t.memoizedState;if(l=f.cache,ga(t,He,l),l!==i.cache&&fu(t,[He],a,!0),hn(),l=f.element,i.isDehydrated)if(i={element:l,isDehydrated:!1,cache:f.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=_f(e,t,l,a);break e}else if(l!==s){s=Et(Error(r(424)),t),rn(s),t=_f(e,t,l,a);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,ze=Mt(e.firstChild),$e=t,me=!0,ha=null,At=!0,a=To(t,null,l,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(Za(),l===s){t=It(e,t,a);break e}We(e,t,l,a)}t=t.child}return t;case 26:return ws(e,t),e===null?(a=Kd(t.type,null,t.pendingProps,null))?t.memoizedState=a:me||(a=t.type,e=t.pendingProps,l=Fs(re.current).createElement(a),l[ke]=t,l[at]=e,Fe(l,a,e),Ve(l),t.stateNode=l):t.memoizedState=Kd(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Zl(t),e===null&&me&&(l=t.stateNode=Qd(t.type,t.pendingProps,re.current),$e=t,At=!0,s=ze,Ma(t.type)?(Rr=s,ze=Mt(l.firstChild)):ze=s),We(e,t,t.pendingProps.children,a),ws(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&me&&((s=l=ze)&&(l=ix(l,t.type,t.pendingProps,At),l!==null?(t.stateNode=l,$e=t,ze=Mt(l.firstChild),At=!1,s=!0):s=!1),s||xa(t)),Zl(t),s=t.type,i=t.pendingProps,f=e!==null?e.memoizedProps:null,l=i.children,Tr(s,i)?l=null:f!==null&&Tr(s,f)&&(t.flags|=32),t.memoizedState!==null&&(s=Eu(e,t,jh,null,null,a),Un._currentValue=s),ws(e,t),We(e,t,l,a),t.child;case 6:return e===null&&me&&((e=a=ze)&&(a=ux(a,t.pendingProps,At),a!==null?(t.stateNode=a,$e=t,ze=null,e=!0):e=!1),e||xa(t)),null;case 13:return Of(e,t,a);case 4:return Ie(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=Fa(t,null,l,a):We(e,t,l,a),t.child;case 11:return Sf(e,t,t.type,t.pendingProps,a);case 7:return We(e,t,t.pendingProps,a),t.child;case 8:return We(e,t,t.pendingProps.children,a),t.child;case 12:return We(e,t,t.pendingProps.children,a),t.child;case 10:return l=t.pendingProps,ga(t,t.type,l.value),We(e,t,l.children,a),t.child;case 9:return s=t.type._context,l=t.pendingProps.children,ka(t),s=Je(s),l=l(s),t.flags|=1,We(e,t,l,a),t.child;case 14:return Ef(e,t,t.type,t.pendingProps,a);case 15:return Tf(e,t,t.type,t.pendingProps,a);case 19:return wf(e,t,a);case 31:return Mh(e,t,a);case 22:return Cf(e,t,a,t.pendingProps);case 24:return ka(t),l=Je(He),e===null?(s=hu(),s===null&&(s=Ce,i=du(),s.pooledCache=i,i.refCount++,i!==null&&(s.pooledCacheLanes|=a),s=i),t.memoizedState={parent:l,cache:s},gu(t),ga(t,He,s)):((e.lanes&a)!==0&&(yu(e,t),xn(t,null,null,a),hn()),s=e.memoizedState,i=t.memoizedState,s.parent!==l?(s={parent:l,cache:l},t.memoizedState=s,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=s),ga(t,He,l)):(l=i.cache,ga(t,He,l),l!==s.cache&&fu(t,[He],a,!0))),We(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function ea(e){e.flags|=4}function Pu(e,t,a,l,s){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(s&335544128)===s)if(e.stateNode.complete)e.flags|=8192;else if(rd())e.flags|=8192;else throw Wa=vs,xu}else e.flags&=-16777217}function Lf(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Fd(t))if(rd())e.flags|=8192;else throw Wa=vs,xu}function Ls(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?mc():536870912,e.lanes|=t,Ol|=t)}function jn(e,t){if(!me)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var l=null;a!==null;)a.alternate!==null&&(l=a),a=a.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function Me(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,l=0;if(t)for(var s=e.child;s!==null;)a|=s.lanes|s.childLanes,l|=s.subtreeFlags&65011712,l|=s.flags&65011712,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)a|=s.lanes|s.childLanes,l|=s.subtreeFlags,l|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=l,e.childLanes=a,t}function _h(e,t,a){var l=t.pendingProps;switch(iu(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Me(t),null;case 1:return Me(t),null;case 3:return a=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Wt(He),we(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(vl(t)?ea(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,ru())),Me(t),null;case 26:var s=t.type,i=t.memoizedState;return e===null?(ea(t),i!==null?(Me(t),Lf(t,i)):(Me(t),Pu(t,s,null,l,a))):i?i!==e.memoizedState?(ea(t),Me(t),Lf(t,i)):(Me(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&ea(t),Me(t),Pu(t,s,e,l,a)),null;case 27:if(kn(t),a=re.current,s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&ea(t);else{if(!l){if(t.stateNode===null)throw Error(r(166));return Me(t),null}e=J.current,vl(t)?ho(t):(e=Qd(s,l,a),t.stateNode=e,ea(t))}return Me(t),null;case 5:if(kn(t),s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&ea(t);else{if(!l){if(t.stateNode===null)throw Error(r(166));return Me(t),null}if(i=J.current,vl(t))ho(t);else{var f=Fs(re.current);switch(i){case 1:i=f.createElementNS("http://www.w3.org/2000/svg",s);break;case 2:i=f.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;default:switch(s){case"svg":i=f.createElementNS("http://www.w3.org/2000/svg",s);break;case"math":i=f.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;case"script":i=f.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof l.is=="string"?f.createElement("select",{is:l.is}):f.createElement("select"),l.multiple?i.multiple=!0:l.size&&(i.size=l.size);break;default:i=typeof l.is=="string"?f.createElement(s,{is:l.is}):f.createElement(s)}}i[ke]=t,i[at]=l;e:for(f=t.child;f!==null;){if(f.tag===5||f.tag===6)i.appendChild(f.stateNode);else if(f.tag!==4&&f.tag!==27&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===t)break e;for(;f.sibling===null;){if(f.return===null||f.return===t)break e;f=f.return}f.sibling.return=f.return,f=f.sibling}t.stateNode=i;e:switch(Fe(i,s,l),s){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&ea(t)}}return Me(t),Pu(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&ea(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(r(166));if(e=re.current,vl(t)){if(e=t.stateNode,a=t.memoizedProps,l=null,s=$e,s!==null)switch(s.tag){case 27:case 5:l=s.memoizedProps}e[ke]=t,e=!!(e.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||Od(e.nodeValue,a)),e||xa(t,!0)}else e=Fs(e).createTextNode(l),e[ke]=t,t.stateNode=e}return Me(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(l=vl(t),a!==null){if(e===null){if(!l)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[ke]=t}else Za(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Me(t),e=!1}else a=ru(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(gt(t),t):(gt(t),null);if((t.flags&128)!==0)throw Error(r(558))}return Me(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(s=vl(t),l!==null&&l.dehydrated!==null){if(e===null){if(!s)throw Error(r(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(317));s[ke]=t}else Za(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Me(t),s=!1}else s=ru(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=s),s=!0;if(!s)return t.flags&256?(gt(t),t):(gt(t),null)}return gt(t),(t.flags&128)!==0?(t.lanes=a,t):(a=l!==null,e=e!==null&&e.memoizedState!==null,a&&(l=t.child,s=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(s=l.alternate.memoizedState.cachePool.pool),i=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(i=l.memoizedState.cachePool.pool),i!==s&&(l.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),Ls(t,t.updateQueue),Me(t),null);case 4:return we(),e===null&&br(t.stateNode.containerInfo),Me(t),null;case 10:return Wt(t.type),Me(t),null;case 19:if(B(Ue),l=t.memoizedState,l===null)return Me(t),null;if(s=(t.flags&128)!==0,i=l.rendering,i===null)if(s)jn(l,!1);else{if(De!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=Ss(e),i!==null){for(t.flags|=128,jn(l,!1),e=i.updateQueue,t.updateQueue=e,Ls(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)ro(a,e),a=a.sibling;return K(Ue,Ue.current&1|2),me&&$t(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&ot()>Gs&&(t.flags|=128,s=!0,jn(l,!1),t.lanes=4194304)}else{if(!s)if(e=Ss(i),e!==null){if(t.flags|=128,s=!0,e=e.updateQueue,t.updateQueue=e,Ls(t,e),jn(l,!0),l.tail===null&&l.tailMode==="hidden"&&!i.alternate&&!me)return Me(t),null}else 2*ot()-l.renderingStartTime>Gs&&a!==536870912&&(t.flags|=128,s=!0,jn(l,!1),t.lanes=4194304);l.isBackwards?(i.sibling=t.child,t.child=i):(e=l.last,e!==null?e.sibling=i:t.child=i,l.last=i)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=ot(),e.sibling=null,a=Ue.current,K(Ue,s?a&1|2:a&1),me&&$t(t,l.treeForkCount),e):(Me(t),null);case 22:case 23:return gt(t),ju(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(a&536870912)!==0&&(t.flags&128)===0&&(Me(t),t.subtreeFlags&6&&(t.flags|=8192)):Me(t),a=t.updateQueue,a!==null&&Ls(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==a&&(t.flags|=2048),e!==null&&B($a),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Wt(He),Me(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function Oh(e,t){switch(iu(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Wt(He),we(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return kn(t),null;case 31:if(t.memoizedState!==null){if(gt(t),t.alternate===null)throw Error(r(340));Za()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(gt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));Za()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return B(Ue),null;case 4:return we(),null;case 10:return Wt(t.type),null;case 22:case 23:return gt(t),ju(),e!==null&&B($a),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Wt(He),null;case 25:return null;default:return null}}function Hf(e,t){switch(iu(t),t.tag){case 3:Wt(He),we();break;case 26:case 27:case 5:kn(t);break;case 4:we();break;case 31:t.memoizedState!==null&&gt(t);break;case 13:gt(t);break;case 19:B(Ue);break;case 10:Wt(t.type);break;case 22:case 23:gt(t),ju(),e!==null&&B($a);break;case 24:Wt(He)}}function Nn(e,t){try{var a=t.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var s=l.next;a=s;do{if((a.tag&e)===e){l=void 0;var i=a.create,f=a.inst;l=i(),f.destroy=l}a=a.next}while(a!==s)}}catch(m){be(t,t.return,m)}}function Na(e,t,a){try{var l=t.updateQueue,s=l!==null?l.lastEffect:null;if(s!==null){var i=s.next;l=i;do{if((l.tag&e)===e){var f=l.inst,m=f.destroy;if(m!==void 0){f.destroy=void 0,s=t;var v=a,A=m;try{A()}catch(O){be(s,v,O)}}}l=l.next}while(l!==i)}}catch(O){be(t,t.return,O)}}function Bf(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{Ao(t,a)}catch(l){be(e,e.return,l)}}}function qf(e,t,a){a.props=Ia(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(l){be(e,t,l)}}function Sn(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof a=="function"?e.refCleanup=a(l):a.current=l}}catch(s){be(e,t,s)}}function qt(e,t){var a=e.ref,l=e.refCleanup;if(a!==null)if(typeof l=="function")try{l()}catch(s){be(e,t,s)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(s){be(e,t,s)}else a.current=null}function Yf(e){var t=e.type,a=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&l.focus();break e;case"img":a.src?l.src=a.src:a.srcSet&&(l.srcset=a.srcSet)}}catch(s){be(e,e.return,s)}}function Iu(e,t,a){try{var l=e.stateNode;ex(l,e.type,a,t),l[at]=t}catch(s){be(e,e.return,s)}}function Gf(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ma(e.type)||e.tag===4}function er(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Gf(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Ma(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function tr(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=Zt));else if(l!==4&&(l===27&&Ma(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(tr(e,t,a),e=e.sibling;e!==null;)tr(e,t,a),e=e.sibling}function Hs(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(l!==4&&(l===27&&Ma(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(Hs(e,t,a),e=e.sibling;e!==null;)Hs(e,t,a),e=e.sibling}function Xf(e){var t=e.stateNode,a=e.memoizedProps;try{for(var l=e.type,s=t.attributes;s.length;)t.removeAttributeNode(s[0]);Fe(t,l,a),t[ke]=e,t[at]=a}catch(i){be(e,e.return,i)}}var ta=!1,Ye=!1,ar=!1,Qf=typeof WeakSet=="function"?WeakSet:Set,Ze=null;function Dh(e,t){if(e=e.containerInfo,Sr=ni,e=Ic(e),Ji(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var l=a.getSelection&&a.getSelection();if(l&&l.rangeCount!==0){a=l.anchorNode;var s=l.anchorOffset,i=l.focusNode;l=l.focusOffset;try{a.nodeType,i.nodeType}catch{a=null;break e}var f=0,m=-1,v=-1,A=0,O=0,H=e,z=null;t:for(;;){for(var M;H!==a||s!==0&&H.nodeType!==3||(m=f+s),H!==i||l!==0&&H.nodeType!==3||(v=f+l),H.nodeType===3&&(f+=H.nodeValue.length),(M=H.firstChild)!==null;)z=H,H=M;for(;;){if(H===e)break t;if(z===a&&++A===s&&(m=f),z===i&&++O===l&&(v=f),(M=H.nextSibling)!==null)break;H=z,z=H.parentNode}H=M}a=m===-1||v===-1?null:{start:m,end:v}}else a=null}a=a||{start:0,end:0}}else a=null;for(Er={focusedElem:e,selectionRange:a},ni=!1,Ze=t;Ze!==null;)if(t=Ze,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ze=e;else for(;Ze!==null;){switch(t=Ze,i=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)s=e[a],s.ref.impl=s.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&i!==null){e=void 0,a=t,s=i.memoizedProps,i=i.memoizedState,l=a.stateNode;try{var $=Ia(a.type,s);e=l.getSnapshotBeforeUpdate($,i),l.__reactInternalSnapshotBeforeUpdate=e}catch(I){be(a,a.return,I)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)Ar(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Ar(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(r(163))}if(e=t.sibling,e!==null){e.return=t.return,Ze=e;break}Ze=t.return}}function Vf(e,t,a){var l=a.flags;switch(a.tag){case 0:case 11:case 15:la(e,a),l&4&&Nn(5,a);break;case 1:if(la(e,a),l&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(f){be(a,a.return,f)}else{var s=Ia(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(s,t,e.__reactInternalSnapshotBeforeUpdate)}catch(f){be(a,a.return,f)}}l&64&&Bf(a),l&512&&Sn(a,a.return);break;case 3:if(la(e,a),l&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{Ao(e,t)}catch(f){be(a,a.return,f)}}break;case 27:t===null&&l&4&&Xf(a);case 26:case 5:la(e,a),t===null&&l&4&&Yf(a),l&512&&Sn(a,a.return);break;case 12:la(e,a);break;case 31:la(e,a),l&4&&kf(e,a);break;case 13:la(e,a),l&4&&$f(e,a),l&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=Xh.bind(null,a),rx(e,a))));break;case 22:if(l=a.memoizedState!==null||ta,!l){t=t!==null&&t.memoizedState!==null||Ye,s=ta;var i=Ye;ta=l,(Ye=t)&&!i?na(e,a,(a.subtreeFlags&8772)!==0):la(e,a),ta=s,Ye=i}break;case 30:break;default:la(e,a)}}function Zf(e){var t=e.alternate;t!==null&&(e.alternate=null,Zf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Oi(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Re=null,nt=!1;function aa(e,t,a){for(a=a.child;a!==null;)Kf(e,t,a),a=a.sibling}function Kf(e,t,a){if(ft&&typeof ft.onCommitFiberUnmount=="function")try{ft.onCommitFiberUnmount(Kl,a)}catch{}switch(a.tag){case 26:Ye||qt(a,t),aa(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Ye||qt(a,t);var l=Re,s=nt;Ma(a.type)&&(Re=a.stateNode,nt=!1),aa(e,t,a),On(a.stateNode),Re=l,nt=s;break;case 5:Ye||qt(a,t);case 6:if(l=Re,s=nt,Re=null,aa(e,t,a),Re=l,nt=s,Re!==null)if(nt)try{(Re.nodeType===9?Re.body:Re.nodeName==="HTML"?Re.ownerDocument.body:Re).removeChild(a.stateNode)}catch(i){be(a,t,i)}else try{Re.removeChild(a.stateNode)}catch(i){be(a,t,i)}break;case 18:Re!==null&&(nt?(e=Re,Bd(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Yl(e)):Bd(Re,a.stateNode));break;case 4:l=Re,s=nt,Re=a.stateNode.containerInfo,nt=!0,aa(e,t,a),Re=l,nt=s;break;case 0:case 11:case 14:case 15:Na(2,a,t),Ye||Na(4,a,t),aa(e,t,a);break;case 1:Ye||(qt(a,t),l=a.stateNode,typeof l.componentWillUnmount=="function"&&qf(a,t,l)),aa(e,t,a);break;case 21:aa(e,t,a);break;case 22:Ye=(l=Ye)||a.memoizedState!==null,aa(e,t,a),Ye=l;break;default:aa(e,t,a)}}function kf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Yl(e)}catch(a){be(t,t.return,a)}}}function $f(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Yl(e)}catch(a){be(t,t.return,a)}}function wh(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Qf),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Qf),t;default:throw Error(r(435,e.tag))}}function Bs(e,t){var a=wh(e);t.forEach(function(l){if(!a.has(l)){a.add(l);var s=Qh.bind(null,e,l);l.then(s,s)}})}function st(e,t){var a=t.deletions;if(a!==null)for(var l=0;l<a.length;l++){var s=a[l],i=e,f=t,m=f;e:for(;m!==null;){switch(m.tag){case 27:if(Ma(m.type)){Re=m.stateNode,nt=!1;break e}break;case 5:Re=m.stateNode,nt=!1;break e;case 3:case 4:Re=m.stateNode.containerInfo,nt=!0;break e}m=m.return}if(Re===null)throw Error(r(160));Kf(i,f,s),Re=null,nt=!1,i=s.alternate,i!==null&&(i.return=null),s.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Jf(t,e),t=t.sibling}var wt=null;function Jf(e,t){var a=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:st(t,e),it(e),l&4&&(Na(3,e,e.return),Nn(3,e),Na(5,e,e.return));break;case 1:st(t,e),it(e),l&512&&(Ye||a===null||qt(a,a.return)),l&64&&ta&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?l:a.concat(l))));break;case 26:var s=wt;if(st(t,e),it(e),l&512&&(Ye||a===null||qt(a,a.return)),l&4){var i=a!==null?a.memoizedState:null;if(l=e.memoizedState,a===null)if(l===null)if(e.stateNode===null){e:{l=e.type,a=e.memoizedProps,s=s.ownerDocument||s;t:switch(l){case"title":i=s.getElementsByTagName("title")[0],(!i||i[Jl]||i[ke]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=s.createElement(l),s.head.insertBefore(i,s.querySelector("head > title"))),Fe(i,l,a),i[ke]=e,Ve(i),l=i;break e;case"link":var f=Jd("link","href",s).get(l+(a.href||""));if(f){for(var m=0;m<f.length;m++)if(i=f[m],i.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&i.getAttribute("rel")===(a.rel==null?null:a.rel)&&i.getAttribute("title")===(a.title==null?null:a.title)&&i.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){f.splice(m,1);break t}}i=s.createElement(l),Fe(i,l,a),s.head.appendChild(i);break;case"meta":if(f=Jd("meta","content",s).get(l+(a.content||""))){for(m=0;m<f.length;m++)if(i=f[m],i.getAttribute("content")===(a.content==null?null:""+a.content)&&i.getAttribute("name")===(a.name==null?null:a.name)&&i.getAttribute("property")===(a.property==null?null:a.property)&&i.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&i.getAttribute("charset")===(a.charSet==null?null:a.charSet)){f.splice(m,1);break t}}i=s.createElement(l),Fe(i,l,a),s.head.appendChild(i);break;default:throw Error(r(468,l))}i[ke]=e,Ve(i),l=i}e.stateNode=l}else Wd(s,e.type,e.stateNode);else e.stateNode=$d(s,l,e.memoizedProps);else i!==l?(i===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):i.count--,l===null?Wd(s,e.type,e.stateNode):$d(s,l,e.memoizedProps)):l===null&&e.stateNode!==null&&Iu(e,e.memoizedProps,a.memoizedProps)}break;case 27:st(t,e),it(e),l&512&&(Ye||a===null||qt(a,a.return)),a!==null&&l&4&&Iu(e,e.memoizedProps,a.memoizedProps);break;case 5:if(st(t,e),it(e),l&512&&(Ye||a===null||qt(a,a.return)),e.flags&32){s=e.stateNode;try{cl(s,"")}catch($){be(e,e.return,$)}}l&4&&e.stateNode!=null&&(s=e.memoizedProps,Iu(e,s,a!==null?a.memoizedProps:s)),l&1024&&(ar=!0);break;case 6:if(st(t,e),it(e),l&4){if(e.stateNode===null)throw Error(r(162));l=e.memoizedProps,a=e.stateNode;try{a.nodeValue=l}catch($){be(e,e.return,$)}}break;case 3:if(ei=null,s=wt,wt=Ps(t.containerInfo),st(t,e),wt=s,it(e),l&4&&a!==null&&a.memoizedState.isDehydrated)try{Yl(t.containerInfo)}catch($){be(e,e.return,$)}ar&&(ar=!1,Wf(e));break;case 4:l=wt,wt=Ps(e.stateNode.containerInfo),st(t,e),it(e),wt=l;break;case 12:st(t,e),it(e);break;case 31:st(t,e),it(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Bs(e,l)));break;case 13:st(t,e),it(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Ys=ot()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Bs(e,l)));break;case 22:s=e.memoizedState!==null;var v=a!==null&&a.memoizedState!==null,A=ta,O=Ye;if(ta=A||s,Ye=O||v,st(t,e),Ye=O,ta=A,it(e),l&8192)e:for(t=e.stateNode,t._visibility=s?t._visibility&-2:t._visibility|1,s&&(a===null||v||ta||Ye||el(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){v=a=t;try{if(i=v.stateNode,s)f=i.style,typeof f.setProperty=="function"?f.setProperty("display","none","important"):f.display="none";else{m=v.stateNode;var H=v.memoizedProps.style,z=H!=null&&H.hasOwnProperty("display")?H.display:null;m.style.display=z==null||typeof z=="boolean"?"":(""+z).trim()}}catch($){be(v,v.return,$)}}}else if(t.tag===6){if(a===null){v=t;try{v.stateNode.nodeValue=s?"":v.memoizedProps}catch($){be(v,v.return,$)}}}else if(t.tag===18){if(a===null){v=t;try{var M=v.stateNode;s?qd(M,!0):qd(v.stateNode,!1)}catch($){be(v,v.return,$)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(a=l.retryQueue,a!==null&&(l.retryQueue=null,Bs(e,a))));break;case 19:st(t,e),it(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Bs(e,l)));break;case 30:break;case 21:break;default:st(t,e),it(e)}}function it(e){var t=e.flags;if(t&2){try{for(var a,l=e.return;l!==null;){if(Gf(l)){a=l;break}l=l.return}if(a==null)throw Error(r(160));switch(a.tag){case 27:var s=a.stateNode,i=er(e);Hs(e,i,s);break;case 5:var f=a.stateNode;a.flags&32&&(cl(f,""),a.flags&=-33);var m=er(e);Hs(e,m,f);break;case 3:case 4:var v=a.stateNode.containerInfo,A=er(e);tr(e,A,v);break;default:throw Error(r(161))}}catch(O){be(e,e.return,O)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Wf(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Wf(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function la(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Vf(e,t.alternate,t),t=t.sibling}function el(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Na(4,t,t.return),el(t);break;case 1:qt(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&qf(t,t.return,a),el(t);break;case 27:On(t.stateNode);case 26:case 5:qt(t,t.return),el(t);break;case 22:t.memoizedState===null&&el(t);break;case 30:el(t);break;default:el(t)}e=e.sibling}}function na(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,s=e,i=t,f=i.flags;switch(i.tag){case 0:case 11:case 15:na(s,i,a),Nn(4,i);break;case 1:if(na(s,i,a),l=i,s=l.stateNode,typeof s.componentDidMount=="function")try{s.componentDidMount()}catch(A){be(l,l.return,A)}if(l=i,s=l.updateQueue,s!==null){var m=l.stateNode;try{var v=s.shared.hiddenCallbacks;if(v!==null)for(s.shared.hiddenCallbacks=null,s=0;s<v.length;s++)Co(v[s],m)}catch(A){be(l,l.return,A)}}a&&f&64&&Bf(i),Sn(i,i.return);break;case 27:Xf(i);case 26:case 5:na(s,i,a),a&&l===null&&f&4&&Yf(i),Sn(i,i.return);break;case 12:na(s,i,a);break;case 31:na(s,i,a),a&&f&4&&kf(s,i);break;case 13:na(s,i,a),a&&f&4&&$f(s,i);break;case 22:i.memoizedState===null&&na(s,i,a),Sn(i,i.return);break;case 30:break;default:na(s,i,a)}t=t.sibling}}function lr(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&cn(a))}function nr(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&cn(e))}function Ut(e,t,a,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Ff(e,t,a,l),t=t.sibling}function Ff(e,t,a,l){var s=t.flags;switch(t.tag){case 0:case 11:case 15:Ut(e,t,a,l),s&2048&&Nn(9,t);break;case 1:Ut(e,t,a,l);break;case 3:Ut(e,t,a,l),s&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&cn(e)));break;case 12:if(s&2048){Ut(e,t,a,l),e=t.stateNode;try{var i=t.memoizedProps,f=i.id,m=i.onPostCommit;typeof m=="function"&&m(f,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(v){be(t,t.return,v)}}else Ut(e,t,a,l);break;case 31:Ut(e,t,a,l);break;case 13:Ut(e,t,a,l);break;case 23:break;case 22:i=t.stateNode,f=t.alternate,t.memoizedState!==null?i._visibility&2?Ut(e,t,a,l):En(e,t):i._visibility&2?Ut(e,t,a,l):(i._visibility|=2,Ml(e,t,a,l,(t.subtreeFlags&10256)!==0||!1)),s&2048&&lr(f,t);break;case 24:Ut(e,t,a,l),s&2048&&nr(t.alternate,t);break;default:Ut(e,t,a,l)}}function Ml(e,t,a,l,s){for(s=s&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var i=e,f=t,m=a,v=l,A=f.flags;switch(f.tag){case 0:case 11:case 15:Ml(i,f,m,v,s),Nn(8,f);break;case 23:break;case 22:var O=f.stateNode;f.memoizedState!==null?O._visibility&2?Ml(i,f,m,v,s):En(i,f):(O._visibility|=2,Ml(i,f,m,v,s)),s&&A&2048&&lr(f.alternate,f);break;case 24:Ml(i,f,m,v,s),s&&A&2048&&nr(f.alternate,f);break;default:Ml(i,f,m,v,s)}t=t.sibling}}function En(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,l=t,s=l.flags;switch(l.tag){case 22:En(a,l),s&2048&&lr(l.alternate,l);break;case 24:En(a,l),s&2048&&nr(l.alternate,l);break;default:En(a,l)}t=t.sibling}}var Tn=8192;function Rl(e,t,a){if(e.subtreeFlags&Tn)for(e=e.child;e!==null;)Pf(e,t,a),e=e.sibling}function Pf(e,t,a){switch(e.tag){case 26:Rl(e,t,a),e.flags&Tn&&e.memoizedState!==null&&bx(a,wt,e.memoizedState,e.memoizedProps);break;case 5:Rl(e,t,a);break;case 3:case 4:var l=wt;wt=Ps(e.stateNode.containerInfo),Rl(e,t,a),wt=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=Tn,Tn=16777216,Rl(e,t,a),Tn=l):Rl(e,t,a));break;default:Rl(e,t,a)}}function If(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Cn(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];Ze=l,td(l,e)}If(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)ed(e),e=e.sibling}function ed(e){switch(e.tag){case 0:case 11:case 15:Cn(e),e.flags&2048&&Na(9,e,e.return);break;case 3:Cn(e);break;case 12:Cn(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,qs(e)):Cn(e);break;default:Cn(e)}}function qs(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];Ze=l,td(l,e)}If(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Na(8,t,t.return),qs(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,qs(t));break;default:qs(t)}e=e.sibling}}function td(e,t){for(;Ze!==null;){var a=Ze;switch(a.tag){case 0:case 11:case 15:Na(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var l=a.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:cn(a.memoizedState.cache)}if(l=a.child,l!==null)l.return=a,Ze=l;else e:for(a=e;Ze!==null;){l=Ze;var s=l.sibling,i=l.return;if(Zf(l),l===a){Ze=null;break e}if(s!==null){s.return=i,Ze=s;break e}Ze=i}}}var Uh={getCacheForType:function(e){var t=Je(He),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return Je(He).controller.signal}},Lh=typeof WeakMap=="function"?WeakMap:Map,ye=0,Ce=null,ce=null,fe=0,ve=0,yt=null,Sa=!1,_l=!1,sr=!1,sa=0,De=0,Ea=0,tl=0,ir=0,pt=0,Ol=0,An=null,ut=null,ur=!1,Ys=0,ad=0,Gs=1/0,Xs=null,Ta=null,Xe=0,Ca=null,Dl=null,ia=0,rr=0,cr=null,ld=null,zn=0,or=null;function vt(){return(ye&2)!==0&&fe!==0?fe&-fe:D.T!==null?gr():yc()}function nd(){if(pt===0)if((fe&536870912)===0||me){var e=Wn;Wn<<=1,(Wn&3932160)===0&&(Wn=262144),pt=e}else pt=536870912;return e=xt.current,e!==null&&(e.flags|=32),pt}function rt(e,t,a){(e===Ce&&(ve===2||ve===9)||e.cancelPendingCommit!==null)&&(wl(e,0),Aa(e,fe,pt,!1)),$l(e,a),((ye&2)===0||e!==Ce)&&(e===Ce&&((ye&2)===0&&(tl|=a),De===4&&Aa(e,fe,pt,!1)),Yt(e))}function sd(e,t,a){if((ye&6)!==0)throw Error(r(327));var l=!a&&(t&127)===0&&(t&e.expiredLanes)===0||kl(e,t),s=l?qh(e,t):dr(e,t,!0),i=l;do{if(s===0){_l&&!l&&Aa(e,t,0,!1);break}else{if(a=e.current.alternate,i&&!Hh(a)){s=dr(e,t,!1),i=!1;continue}if(s===2){if(i=t,e.errorRecoveryDisabledLanes&i)var f=0;else f=e.pendingLanes&-536870913,f=f!==0?f:f&536870912?536870912:0;if(f!==0){t=f;e:{var m=e;s=An;var v=m.current.memoizedState.isDehydrated;if(v&&(wl(m,f).flags|=256),f=dr(m,f,!1),f!==2){if(sr&&!v){m.errorRecoveryDisabledLanes|=i,tl|=i,s=4;break e}i=ut,ut=s,i!==null&&(ut===null?ut=i:ut.push.apply(ut,i))}s=f}if(i=!1,s!==2)continue}}if(s===1){wl(e,0),Aa(e,t,0,!0);break}e:{switch(l=e,i=s,i){case 0:case 1:throw Error(r(345));case 4:if((t&4194048)!==t)break;case 6:Aa(l,t,pt,!Sa);break e;case 2:ut=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(s=Ys+300-ot(),10<s)){if(Aa(l,t,pt,!Sa),Pn(l,0,!0)!==0)break e;ia=t,l.timeoutHandle=Ld(id.bind(null,l,a,ut,Xs,ur,t,pt,tl,Ol,Sa,i,"Throttled",-0,0),s);break e}id(l,a,ut,Xs,ur,t,pt,tl,Ol,Sa,i,null,-0,0)}}break}while(!0);Yt(e)}function id(e,t,a,l,s,i,f,m,v,A,O,H,z,M){if(e.timeoutHandle=-1,H=t.subtreeFlags,H&8192||(H&16785408)===16785408){H={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Zt},Pf(t,i,H);var $=(i&62914560)===i?Ys-ot():(i&4194048)===i?ad-ot():0;if($=jx(H,$),$!==null){ia=i,e.cancelPendingCommit=$(hd.bind(null,e,t,i,a,l,s,f,m,v,O,H,null,z,M)),Aa(e,i,f,!A);return}}hd(e,t,i,a,l,s,f,m,v)}function Hh(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var l=0;l<a.length;l++){var s=a[l],i=s.getSnapshot;s=s.value;try{if(!mt(i(),s))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;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 Aa(e,t,a,l){t&=~ir,t&=~tl,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var s=t;0<s;){var i=31-dt(s),f=1<<i;l[i]=-1,s&=~f}a!==0&&hc(e,a,t)}function Qs(){return(ye&6)===0?(Mn(0),!1):!0}function fr(){if(ce!==null){if(ve===0)var e=ce.return;else e=ce,Jt=Ka=null,Au(e),El=null,fn=0,e=ce;for(;e!==null;)Hf(e.alternate,e),e=e.return;ce=null}}function wl(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,lx(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),ia=0,fr(),Ce=e,ce=a=kt(e.current,null),fe=t,ve=0,yt=null,Sa=!1,_l=kl(e,t),sr=!1,Ol=pt=ir=tl=Ea=De=0,ut=An=null,ur=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var s=31-dt(l),i=1<<s;t|=e[s],l&=~i}return sa=t,os(),a}function ud(e,t){se=null,D.H=vn,t===Sl||t===ps?(t=No(),ve=3):t===xu?(t=No(),ve=4):ve=t===Qu?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,yt=t,ce===null&&(De=1,Os(e,Et(t,e.current)))}function rd(){var e=xt.current;return e===null?!0:(fe&4194048)===fe?zt===null:(fe&62914560)===fe||(fe&536870912)!==0?e===zt:!1}function cd(){var e=D.H;return D.H=vn,e===null?vn:e}function od(){var e=D.A;return D.A=Uh,e}function Vs(){De=4,Sa||(fe&4194048)!==fe&&xt.current!==null||(_l=!0),(Ea&134217727)===0&&(tl&134217727)===0||Ce===null||Aa(Ce,fe,pt,!1)}function dr(e,t,a){var l=ye;ye|=2;var s=cd(),i=od();(Ce!==e||fe!==t)&&(Xs=null,wl(e,t)),t=!1;var f=De;e:do try{if(ve!==0&&ce!==null){var m=ce,v=yt;switch(ve){case 8:fr(),f=6;break e;case 3:case 2:case 9:case 6:xt.current===null&&(t=!0);var A=ve;if(ve=0,yt=null,Ul(e,m,v,A),a&&_l){f=0;break e}break;default:A=ve,ve=0,yt=null,Ul(e,m,v,A)}}Bh(),f=De;break}catch(O){ud(e,O)}while(!0);return t&&e.shellSuspendCounter++,Jt=Ka=null,ye=l,D.H=s,D.A=i,ce===null&&(Ce=null,fe=0,os()),f}function Bh(){for(;ce!==null;)fd(ce)}function qh(e,t){var a=ye;ye|=2;var l=cd(),s=od();Ce!==e||fe!==t?(Xs=null,Gs=ot()+500,wl(e,t)):_l=kl(e,t);e:do try{if(ve!==0&&ce!==null){t=ce;var i=yt;t:switch(ve){case 1:ve=0,yt=null,Ul(e,t,i,1);break;case 2:case 9:if(bo(i)){ve=0,yt=null,dd(t);break}t=function(){ve!==2&&ve!==9||Ce!==e||(ve=7),Yt(e)},i.then(t,t);break e;case 3:ve=7;break e;case 4:ve=5;break e;case 7:bo(i)?(ve=0,yt=null,dd(t)):(ve=0,yt=null,Ul(e,t,i,7));break;case 5:var f=null;switch(ce.tag){case 26:f=ce.memoizedState;case 5:case 27:var m=ce;if(f?Fd(f):m.stateNode.complete){ve=0,yt=null;var v=m.sibling;if(v!==null)ce=v;else{var A=m.return;A!==null?(ce=A,Zs(A)):ce=null}break t}}ve=0,yt=null,Ul(e,t,i,5);break;case 6:ve=0,yt=null,Ul(e,t,i,6);break;case 8:fr(),De=6;break e;default:throw Error(r(462))}}Yh();break}catch(O){ud(e,O)}while(!0);return Jt=Ka=null,D.H=l,D.A=s,ye=a,ce!==null?0:(Ce=null,fe=0,os(),De)}function Yh(){for(;ce!==null&&!cm();)fd(ce)}function fd(e){var t=Uf(e.alternate,e,sa);e.memoizedProps=e.pendingProps,t===null?Zs(e):ce=t}function dd(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=Mf(a,t,t.pendingProps,t.type,void 0,fe);break;case 11:t=Mf(a,t,t.pendingProps,t.type.render,t.ref,fe);break;case 5:Au(t);default:Hf(a,t),t=ce=ro(t,sa),t=Uf(a,t,sa)}e.memoizedProps=e.pendingProps,t===null?Zs(e):ce=t}function Ul(e,t,a,l){Jt=Ka=null,Au(t),El=null,fn=0;var s=t.return;try{if(zh(e,s,t,a,fe)){De=1,Os(e,Et(a,e.current)),ce=null;return}}catch(i){if(s!==null)throw ce=s,i;De=1,Os(e,Et(a,e.current)),ce=null;return}t.flags&32768?(me||l===1?e=!0:_l||(fe&536870912)!==0?e=!1:(Sa=e=!0,(l===2||l===9||l===3||l===6)&&(l=xt.current,l!==null&&l.tag===13&&(l.flags|=16384))),md(t,e)):Zs(t)}function Zs(e){var t=e;do{if((t.flags&32768)!==0){md(t,Sa);return}e=t.return;var a=_h(t.alternate,t,sa);if(a!==null){ce=a;return}if(t=t.sibling,t!==null){ce=t;return}ce=t=e}while(t!==null);De===0&&(De=5)}function md(e,t){do{var a=Oh(e.alternate,e);if(a!==null){a.flags&=32767,ce=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){ce=e;return}ce=e=a}while(e!==null);De=6,ce=null}function hd(e,t,a,l,s,i,f,m,v){e.cancelPendingCommit=null;do Ks();while(Xe!==0);if((ye&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));if(i=t.lanes|t.childLanes,i|=eu,vm(e,a,i,f,m,v),e===Ce&&(ce=Ce=null,fe=0),Dl=t,Ca=e,ia=a,rr=i,cr=s,ld=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Vh($n,function(){return vd(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=D.T,D.T=null,s=Z.p,Z.p=2,f=ye,ye|=4;try{Dh(e,t,a)}finally{ye=f,Z.p=s,D.T=l}}Xe=1,xd(),gd(),yd()}}function xd(){if(Xe===1){Xe=0;var e=Ca,t=Dl,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=D.T,D.T=null;var l=Z.p;Z.p=2;var s=ye;ye|=4;try{Jf(t,e);var i=Er,f=Ic(e.containerInfo),m=i.focusedElem,v=i.selectionRange;if(f!==m&&m&&m.ownerDocument&&Pc(m.ownerDocument.documentElement,m)){if(v!==null&&Ji(m)){var A=v.start,O=v.end;if(O===void 0&&(O=A),"selectionStart"in m)m.selectionStart=A,m.selectionEnd=Math.min(O,m.value.length);else{var H=m.ownerDocument||document,z=H&&H.defaultView||window;if(z.getSelection){var M=z.getSelection(),$=m.textContent.length,I=Math.min(v.start,$),Ee=v.end===void 0?I:Math.min(v.end,$);!M.extend&&I>Ee&&(f=Ee,Ee=I,I=f);var E=Fc(m,I),N=Fc(m,Ee);if(E&&N&&(M.rangeCount!==1||M.anchorNode!==E.node||M.anchorOffset!==E.offset||M.focusNode!==N.node||M.focusOffset!==N.offset)){var C=H.createRange();C.setStart(E.node,E.offset),M.removeAllRanges(),I>Ee?(M.addRange(C),M.extend(N.node,N.offset)):(C.setEnd(N.node,N.offset),M.addRange(C))}}}}for(H=[],M=m;M=M.parentNode;)M.nodeType===1&&H.push({element:M,left:M.scrollLeft,top:M.scrollTop});for(typeof m.focus=="function"&&m.focus(),m=0;m<H.length;m++){var U=H[m];U.element.scrollLeft=U.left,U.element.scrollTop=U.top}}ni=!!Sr,Er=Sr=null}finally{ye=s,Z.p=l,D.T=a}}e.current=t,Xe=2}}function gd(){if(Xe===2){Xe=0;var e=Ca,t=Dl,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=D.T,D.T=null;var l=Z.p;Z.p=2;var s=ye;ye|=4;try{Vf(e,t.alternate,t)}finally{ye=s,Z.p=l,D.T=a}}Xe=3}}function yd(){if(Xe===4||Xe===3){Xe=0,om();var e=Ca,t=Dl,a=ia,l=ld;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Xe=5:(Xe=0,Dl=Ca=null,pd(e,e.pendingLanes));var s=e.pendingLanes;if(s===0&&(Ta=null),Ri(a),t=t.stateNode,ft&&typeof ft.onCommitFiberRoot=="function")try{ft.onCommitFiberRoot(Kl,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=D.T,s=Z.p,Z.p=2,D.T=null;try{for(var i=e.onRecoverableError,f=0;f<l.length;f++){var m=l[f];i(m.value,{componentStack:m.stack})}}finally{D.T=t,Z.p=s}}(ia&3)!==0&&Ks(),Yt(e),s=e.pendingLanes,(a&261930)!==0&&(s&42)!==0?e===or?zn++:(zn=0,or=e):zn=0,Mn(0)}}function pd(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,cn(t)))}function Ks(){return xd(),gd(),yd(),vd()}function vd(){if(Xe!==5)return!1;var e=Ca,t=rr;rr=0;var a=Ri(ia),l=D.T,s=Z.p;try{Z.p=32>a?32:a,D.T=null,a=cr,cr=null;var i=Ca,f=ia;if(Xe=0,Dl=Ca=null,ia=0,(ye&6)!==0)throw Error(r(331));var m=ye;if(ye|=4,ed(i.current),Ff(i,i.current,f,a),ye=m,Mn(0,!1),ft&&typeof ft.onPostCommitFiberRoot=="function")try{ft.onPostCommitFiberRoot(Kl,i)}catch{}return!0}finally{Z.p=s,D.T=l,pd(e,t)}}function bd(e,t,a){t=Et(a,t),t=Xu(e.stateNode,t,2),e=va(e,t,2),e!==null&&($l(e,2),Yt(e))}function be(e,t,a){if(e.tag===3)bd(e,e,a);else for(;t!==null;){if(t.tag===3){bd(t,e,a);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Ta===null||!Ta.has(l))){e=Et(a,e),a=jf(2),l=va(t,a,2),l!==null&&(Nf(a,l,t,e),$l(l,2),Yt(l));break}}t=t.return}}function mr(e,t,a){var l=e.pingCache;if(l===null){l=e.pingCache=new Lh;var s=new Set;l.set(t,s)}else s=l.get(t),s===void 0&&(s=new Set,l.set(t,s));s.has(a)||(sr=!0,s.add(a),e=Gh.bind(null,e,t,a),t.then(e,e))}function Gh(e,t,a){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Ce===e&&(fe&a)===a&&(De===4||De===3&&(fe&62914560)===fe&&300>ot()-Ys?(ye&2)===0&&wl(e,0):ir|=a,Ol===fe&&(Ol=0)),Yt(e)}function jd(e,t){t===0&&(t=mc()),e=Qa(e,t),e!==null&&($l(e,t),Yt(e))}function Xh(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),jd(e,a)}function Qh(e,t){var a=0;switch(e.tag){case 31:case 13:var l=e.stateNode,s=e.memoizedState;s!==null&&(a=s.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(r(314))}l!==null&&l.delete(t),jd(e,a)}function Vh(e,t){return Ci(e,t)}var ks=null,Ll=null,hr=!1,$s=!1,xr=!1,za=0;function Yt(e){e!==Ll&&e.next===null&&(Ll===null?ks=Ll=e:Ll=Ll.next=e),$s=!0,hr||(hr=!0,Kh())}function Mn(e,t){if(!xr&&$s){xr=!0;do for(var a=!1,l=ks;l!==null;){if(e!==0){var s=l.pendingLanes;if(s===0)var i=0;else{var f=l.suspendedLanes,m=l.pingedLanes;i=(1<<31-dt(42|e)+1)-1,i&=s&~(f&~m),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(a=!0,Td(l,i))}else i=fe,i=Pn(l,l===Ce?i:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(i&3)===0||kl(l,i)||(a=!0,Td(l,i));l=l.next}while(a);xr=!1}}function Zh(){Nd()}function Nd(){$s=hr=!1;var e=0;za!==0&&ax()&&(e=za);for(var t=ot(),a=null,l=ks;l!==null;){var s=l.next,i=Sd(l,t);i===0?(l.next=null,a===null?ks=s:a.next=s,s===null&&(Ll=a)):(a=l,(e!==0||(i&3)!==0)&&($s=!0)),l=s}Xe!==0&&Xe!==5||Mn(e),za!==0&&(za=0)}function Sd(e,t){for(var a=e.suspendedLanes,l=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var f=31-dt(i),m=1<<f,v=s[f];v===-1?((m&a)===0||(m&l)!==0)&&(s[f]=pm(m,t)):v<=t&&(e.expiredLanes|=m),i&=~m}if(t=Ce,a=fe,a=Pn(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,a===0||e===t&&(ve===2||ve===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&Ai(l),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||kl(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(l!==null&&Ai(l),Ri(a)){case 2:case 8:a=fc;break;case 32:a=$n;break;case 268435456:a=dc;break;default:a=$n}return l=Ed.bind(null,e),a=Ci(a,l),e.callbackPriority=t,e.callbackNode=a,t}return l!==null&&l!==null&&Ai(l),e.callbackPriority=2,e.callbackNode=null,2}function Ed(e,t){if(Xe!==0&&Xe!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Ks()&&e.callbackNode!==a)return null;var l=fe;return l=Pn(e,e===Ce?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(sd(e,l,t),Sd(e,ot()),e.callbackNode!=null&&e.callbackNode===a?Ed.bind(null,e):null)}function Td(e,t){if(Ks())return null;sd(e,t,!0)}function Kh(){nx(function(){(ye&6)!==0?Ci(oc,Zh):Nd()})}function gr(){if(za===0){var e=jl;e===0&&(e=Jn,Jn<<=1,(Jn&261888)===0&&(Jn=256)),za=e}return za}function Cd(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:as(""+e)}function Ad(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function kh(e,t,a,l,s){if(t==="submit"&&a&&a.stateNode===s){var i=Cd((s[at]||null).action),f=l.submitter;f&&(t=(t=f[at]||null)?Cd(t.formAction):f.getAttribute("formAction"),t!==null&&(i=t,f=null));var m=new is("action","action",null,l,s);e.push({event:m,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(za!==0){var v=f?Ad(s,f):new FormData(s);Lu(a,{pending:!0,data:v,method:s.method,action:i},null,v)}}else typeof i=="function"&&(m.preventDefault(),v=f?Ad(s,f):new FormData(s),Lu(a,{pending:!0,data:v,method:s.method,action:i},i,v))},currentTarget:s}]})}}for(var yr=0;yr<Ii.length;yr++){var pr=Ii[yr],$h=pr.toLowerCase(),Jh=pr[0].toUpperCase()+pr.slice(1);Dt($h,"on"+Jh)}Dt(ao,"onAnimationEnd"),Dt(lo,"onAnimationIteration"),Dt(no,"onAnimationStart"),Dt("dblclick","onDoubleClick"),Dt("focusin","onFocus"),Dt("focusout","onBlur"),Dt(fh,"onTransitionRun"),Dt(dh,"onTransitionStart"),Dt(mh,"onTransitionCancel"),Dt(so,"onTransitionEnd"),ul("onMouseEnter",["mouseout","mouseover"]),ul("onMouseLeave",["mouseout","mouseover"]),ul("onPointerEnter",["pointerout","pointerover"]),ul("onPointerLeave",["pointerout","pointerover"]),qa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),qa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),qa("onBeforeInput",["compositionend","keypress","textInput","paste"]),qa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),qa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),qa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Rn="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(" "),Wh=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Rn));function zd(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var l=e[a],s=l.event;l=l.listeners;e:{var i=void 0;if(t)for(var f=l.length-1;0<=f;f--){var m=l[f],v=m.instance,A=m.currentTarget;if(m=m.listener,v!==i&&s.isPropagationStopped())break e;i=m,s.currentTarget=A;try{i(s)}catch(O){cs(O)}s.currentTarget=null,i=v}else for(f=0;f<l.length;f++){if(m=l[f],v=m.instance,A=m.currentTarget,m=m.listener,v!==i&&s.isPropagationStopped())break e;i=m,s.currentTarget=A;try{i(s)}catch(O){cs(O)}s.currentTarget=null,i=v}}}}function oe(e,t){var a=t[_i];a===void 0&&(a=t[_i]=new Set);var l=e+"__bubble";a.has(l)||(Md(t,e,2,!1),a.add(l))}function vr(e,t,a){var l=0;t&&(l|=4),Md(a,e,l,t)}var Js="_reactListening"+Math.random().toString(36).slice(2);function br(e){if(!e[Js]){e[Js]=!0,bc.forEach(function(a){a!=="selectionchange"&&(Wh.has(a)||vr(a,!1,e),vr(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Js]||(t[Js]=!0,vr("selectionchange",!1,t))}}function Md(e,t,a,l){switch(n0(t)){case 2:var s=Ex;break;case 8:s=Tx;break;default:s=Ur}a=s.bind(null,t,a,e),s=void 0,!Yi||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),l?s!==void 0?e.addEventListener(t,a,{capture:!0,passive:s}):e.addEventListener(t,a,!0):s!==void 0?e.addEventListener(t,a,{passive:s}):e.addEventListener(t,a,!1)}function jr(e,t,a,l,s){var i=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var f=l.tag;if(f===3||f===4){var m=l.stateNode.containerInfo;if(m===s)break;if(f===4)for(f=l.return;f!==null;){var v=f.tag;if((v===3||v===4)&&f.stateNode.containerInfo===s)return;f=f.return}for(;m!==null;){if(f=nl(m),f===null)return;if(v=f.tag,v===5||v===6||v===26||v===27){l=i=f;continue e}m=m.parentNode}}l=l.return}Oc(function(){var A=i,O=Bi(a),H=[];e:{var z=io.get(e);if(z!==void 0){var M=is,$=e;switch(e){case"keypress":if(ns(a)===0)break e;case"keydown":case"keyup":M=Qm;break;case"focusin":$="focus",M=Vi;break;case"focusout":$="blur",M=Vi;break;case"beforeblur":case"afterblur":M=Vi;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":M=Uc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":M=_m;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":M=Km;break;case ao:case lo:case no:M=wm;break;case so:M=$m;break;case"scroll":case"scrollend":M=Mm;break;case"wheel":M=Wm;break;case"copy":case"cut":case"paste":M=Lm;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":M=Hc;break;case"toggle":case"beforetoggle":M=Pm}var I=(t&4)!==0,Ee=!I&&(e==="scroll"||e==="scrollend"),E=I?z!==null?z+"Capture":null:z;I=[];for(var N=A,C;N!==null;){var U=N;if(C=U.stateNode,U=U.tag,U!==5&&U!==26&&U!==27||C===null||E===null||(U=Fl(N,E),U!=null&&I.push(_n(N,U,C))),Ee)break;N=N.return}0<I.length&&(z=new M(z,$,null,a,O),H.push({event:z,listeners:I}))}}if((t&7)===0){e:{if(z=e==="mouseover"||e==="pointerover",M=e==="mouseout"||e==="pointerout",z&&a!==Hi&&($=a.relatedTarget||a.fromElement)&&(nl($)||$[ll]))break e;if((M||z)&&(z=O.window===O?O:(z=O.ownerDocument)?z.defaultView||z.parentWindow:window,M?($=a.relatedTarget||a.toElement,M=A,$=$?nl($):null,$!==null&&(Ee=h($),I=$.tag,$!==Ee||I!==5&&I!==27&&I!==6)&&($=null)):(M=null,$=A),M!==$)){if(I=Uc,U="onMouseLeave",E="onMouseEnter",N="mouse",(e==="pointerout"||e==="pointerover")&&(I=Hc,U="onPointerLeave",E="onPointerEnter",N="pointer"),Ee=M==null?z:Wl(M),C=$==null?z:Wl($),z=new I(U,N+"leave",M,a,O),z.target=Ee,z.relatedTarget=C,U=null,nl(O)===A&&(I=new I(E,N+"enter",$,a,O),I.target=C,I.relatedTarget=Ee,U=I),Ee=U,M&&$)t:{for(I=Fh,E=M,N=$,C=0,U=E;U;U=I(U))C++;U=0;for(var P=N;P;P=I(P))U++;for(;0<C-U;)E=I(E),C--;for(;0<U-C;)N=I(N),U--;for(;C--;){if(E===N||N!==null&&E===N.alternate){I=E;break t}E=I(E),N=I(N)}I=null}else I=null;M!==null&&Rd(H,z,M,I,!1),$!==null&&Ee!==null&&Rd(H,Ee,$,I,!0)}}e:{if(z=A?Wl(A):window,M=z.nodeName&&z.nodeName.toLowerCase(),M==="select"||M==="input"&&z.type==="file")var xe=Zc;else if(Qc(z))if(Kc)xe=rh;else{xe=ih;var W=sh}else M=z.nodeName,!M||M.toLowerCase()!=="input"||z.type!=="checkbox"&&z.type!=="radio"?A&&Li(A.elementType)&&(xe=Zc):xe=uh;if(xe&&(xe=xe(e,A))){Vc(H,xe,a,O);break e}W&&W(e,z,A),e==="focusout"&&A&&z.type==="number"&&A.memoizedProps.value!=null&&Ui(z,"number",z.value)}switch(W=A?Wl(A):window,e){case"focusin":(Qc(W)||W.contentEditable==="true")&&(ml=W,Wi=A,sn=null);break;case"focusout":sn=Wi=ml=null;break;case"mousedown":Fi=!0;break;case"contextmenu":case"mouseup":case"dragend":Fi=!1,eo(H,a,O);break;case"selectionchange":if(oh)break;case"keydown":case"keyup":eo(H,a,O)}var ie;if(Ki)e:{switch(e){case"compositionstart":var de="onCompositionStart";break e;case"compositionend":de="onCompositionEnd";break e;case"compositionupdate":de="onCompositionUpdate";break e}de=void 0}else dl?Gc(e,a)&&(de="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(de="onCompositionStart");de&&(Bc&&a.locale!=="ko"&&(dl||de!=="onCompositionStart"?de==="onCompositionEnd"&&dl&&(ie=Dc()):(da=O,Gi="value"in da?da.value:da.textContent,dl=!0)),W=Ws(A,de),0<W.length&&(de=new Lc(de,e,null,a,O),H.push({event:de,listeners:W}),ie?de.data=ie:(ie=Xc(a),ie!==null&&(de.data=ie)))),(ie=eh?th(e,a):ah(e,a))&&(de=Ws(A,"onBeforeInput"),0<de.length&&(W=new Lc("onBeforeInput","beforeinput",null,a,O),H.push({event:W,listeners:de}),W.data=ie)),kh(H,e,A,a,O)}zd(H,t)})}function _n(e,t,a){return{instance:e,listener:t,currentTarget:a}}function Ws(e,t){for(var a=t+"Capture",l=[];e!==null;){var s=e,i=s.stateNode;if(s=s.tag,s!==5&&s!==26&&s!==27||i===null||(s=Fl(e,a),s!=null&&l.unshift(_n(e,s,i)),s=Fl(e,t),s!=null&&l.push(_n(e,s,i))),e.tag===3)return l;e=e.return}return[]}function Fh(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Rd(e,t,a,l,s){for(var i=t._reactName,f=[];a!==null&&a!==l;){var m=a,v=m.alternate,A=m.stateNode;if(m=m.tag,v!==null&&v===l)break;m!==5&&m!==26&&m!==27||A===null||(v=A,s?(A=Fl(a,i),A!=null&&f.unshift(_n(a,A,v))):s||(A=Fl(a,i),A!=null&&f.push(_n(a,A,v)))),a=a.return}f.length!==0&&e.push({event:t,listeners:f})}var Ph=/\r\n?/g,Ih=/\u0000|\uFFFD/g;function _d(e){return(typeof e=="string"?e:""+e).replace(Ph,`
9
- `).replace(Ih,"")}function Od(e,t){return t=_d(t),_d(e)===t}function Se(e,t,a,l,s,i){switch(a){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||cl(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&cl(e,""+l);break;case"className":es(e,"class",l);break;case"tabIndex":es(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":es(e,a,l);break;case"style":Rc(e,l,i);break;case"data":if(t!=="object"){es(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=as(""+l),e.setAttribute(a,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof i=="function"&&(a==="formAction"?(t!=="input"&&Se(e,t,"name",s.name,s,null),Se(e,t,"formEncType",s.formEncType,s,null),Se(e,t,"formMethod",s.formMethod,s,null),Se(e,t,"formTarget",s.formTarget,s,null)):(Se(e,t,"encType",s.encType,s,null),Se(e,t,"method",s.method,s,null),Se(e,t,"target",s.target,s,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=as(""+l),e.setAttribute(a,l);break;case"onClick":l!=null&&(e.onclick=Zt);break;case"onScroll":l!=null&&oe("scroll",e);break;case"onScrollEnd":l!=null&&oe("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(r(61));if(a=l.__html,a!=null){if(s.children!=null)throw Error(r(60));e.innerHTML=a}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}a=as(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""+l):e.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":l===!0?e.setAttribute(a,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,l):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(a,l):e.removeAttribute(a);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(a):e.setAttribute(a,l);break;case"popover":oe("beforetoggle",e),oe("toggle",e),In(e,"popover",l);break;case"xlinkActuate":Vt(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Vt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Vt(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Vt(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Vt(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Vt(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Vt(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Vt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Vt(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":In(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=Am.get(a)||a,In(e,a,l))}}function Nr(e,t,a,l,s,i){switch(a){case"style":Rc(e,l,i);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(r(61));if(a=l.__html,a!=null){if(s.children!=null)throw Error(r(60));e.innerHTML=a}}break;case"children":typeof l=="string"?cl(e,l):(typeof l=="number"||typeof l=="bigint")&&cl(e,""+l);break;case"onScroll":l!=null&&oe("scroll",e);break;case"onScrollEnd":l!=null&&oe("scrollend",e);break;case"onClick":l!=null&&(e.onclick=Zt);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!jc.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(s=a.endsWith("Capture"),t=a.slice(2,s?a.length-7:void 0),i=e[at]||null,i=i!=null?i[a]:null,typeof i=="function"&&e.removeEventListener(t,i,s),typeof l=="function")){typeof i!="function"&&i!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,l,s);break e}a in e?e[a]=l:l===!0?e.setAttribute(a,""):In(e,a,l)}}}function Fe(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":oe("error",e),oe("load",e);var l=!1,s=!1,i;for(i in a)if(a.hasOwnProperty(i)){var f=a[i];if(f!=null)switch(i){case"src":l=!0;break;case"srcSet":s=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Se(e,t,i,f,a,null)}}s&&Se(e,t,"srcSet",a.srcSet,a,null),l&&Se(e,t,"src",a.src,a,null);return;case"input":oe("invalid",e);var m=i=f=s=null,v=null,A=null;for(l in a)if(a.hasOwnProperty(l)){var O=a[l];if(O!=null)switch(l){case"name":s=O;break;case"type":f=O;break;case"checked":v=O;break;case"defaultChecked":A=O;break;case"value":i=O;break;case"defaultValue":m=O;break;case"children":case"dangerouslySetInnerHTML":if(O!=null)throw Error(r(137,t));break;default:Se(e,t,l,O,a,null)}}Cc(e,i,m,v,A,f,s,!1);return;case"select":oe("invalid",e),l=f=i=null;for(s in a)if(a.hasOwnProperty(s)&&(m=a[s],m!=null))switch(s){case"value":i=m;break;case"defaultValue":f=m;break;case"multiple":l=m;default:Se(e,t,s,m,a,null)}t=i,a=f,e.multiple=!!l,t!=null?rl(e,!!l,t,!1):a!=null&&rl(e,!!l,a,!0);return;case"textarea":oe("invalid",e),i=s=l=null;for(f in a)if(a.hasOwnProperty(f)&&(m=a[f],m!=null))switch(f){case"value":l=m;break;case"defaultValue":s=m;break;case"children":i=m;break;case"dangerouslySetInnerHTML":if(m!=null)throw Error(r(91));break;default:Se(e,t,f,m,a,null)}zc(e,l,s,i);return;case"option":for(v in a)a.hasOwnProperty(v)&&(l=a[v],l!=null)&&(v==="selected"?e.selected=l&&typeof l!="function"&&typeof l!="symbol":Se(e,t,v,l,a,null));return;case"dialog":oe("beforetoggle",e),oe("toggle",e),oe("cancel",e),oe("close",e);break;case"iframe":case"object":oe("load",e);break;case"video":case"audio":for(l=0;l<Rn.length;l++)oe(Rn[l],e);break;case"image":oe("error",e),oe("load",e);break;case"details":oe("toggle",e);break;case"embed":case"source":case"link":oe("error",e),oe("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(A in a)if(a.hasOwnProperty(A)&&(l=a[A],l!=null))switch(A){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Se(e,t,A,l,a,null)}return;default:if(Li(t)){for(O in a)a.hasOwnProperty(O)&&(l=a[O],l!==void 0&&Nr(e,t,O,l,a,void 0));return}}for(m in a)a.hasOwnProperty(m)&&(l=a[m],l!=null&&Se(e,t,m,l,a,null))}function ex(e,t,a,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var s=null,i=null,f=null,m=null,v=null,A=null,O=null;for(M in a){var H=a[M];if(a.hasOwnProperty(M)&&H!=null)switch(M){case"checked":break;case"value":break;case"defaultValue":v=H;default:l.hasOwnProperty(M)||Se(e,t,M,null,l,H)}}for(var z in l){var M=l[z];if(H=a[z],l.hasOwnProperty(z)&&(M!=null||H!=null))switch(z){case"type":i=M;break;case"name":s=M;break;case"checked":A=M;break;case"defaultChecked":O=M;break;case"value":f=M;break;case"defaultValue":m=M;break;case"children":case"dangerouslySetInnerHTML":if(M!=null)throw Error(r(137,t));break;default:M!==H&&Se(e,t,z,M,l,H)}}wi(e,f,m,v,A,O,i,s);return;case"select":M=f=m=z=null;for(i in a)if(v=a[i],a.hasOwnProperty(i)&&v!=null)switch(i){case"value":break;case"multiple":M=v;default:l.hasOwnProperty(i)||Se(e,t,i,null,l,v)}for(s in l)if(i=l[s],v=a[s],l.hasOwnProperty(s)&&(i!=null||v!=null))switch(s){case"value":z=i;break;case"defaultValue":m=i;break;case"multiple":f=i;default:i!==v&&Se(e,t,s,i,l,v)}t=m,a=f,l=M,z!=null?rl(e,!!a,z,!1):!!l!=!!a&&(t!=null?rl(e,!!a,t,!0):rl(e,!!a,a?[]:"",!1));return;case"textarea":M=z=null;for(m in a)if(s=a[m],a.hasOwnProperty(m)&&s!=null&&!l.hasOwnProperty(m))switch(m){case"value":break;case"children":break;default:Se(e,t,m,null,l,s)}for(f in l)if(s=l[f],i=a[f],l.hasOwnProperty(f)&&(s!=null||i!=null))switch(f){case"value":z=s;break;case"defaultValue":M=s;break;case"children":break;case"dangerouslySetInnerHTML":if(s!=null)throw Error(r(91));break;default:s!==i&&Se(e,t,f,s,l,i)}Ac(e,z,M);return;case"option":for(var $ in a)z=a[$],a.hasOwnProperty($)&&z!=null&&!l.hasOwnProperty($)&&($==="selected"?e.selected=!1:Se(e,t,$,null,l,z));for(v in l)z=l[v],M=a[v],l.hasOwnProperty(v)&&z!==M&&(z!=null||M!=null)&&(v==="selected"?e.selected=z&&typeof z!="function"&&typeof z!="symbol":Se(e,t,v,z,l,M));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var I in a)z=a[I],a.hasOwnProperty(I)&&z!=null&&!l.hasOwnProperty(I)&&Se(e,t,I,null,l,z);for(A in l)if(z=l[A],M=a[A],l.hasOwnProperty(A)&&z!==M&&(z!=null||M!=null))switch(A){case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(r(137,t));break;default:Se(e,t,A,z,l,M)}return;default:if(Li(t)){for(var Ee in a)z=a[Ee],a.hasOwnProperty(Ee)&&z!==void 0&&!l.hasOwnProperty(Ee)&&Nr(e,t,Ee,void 0,l,z);for(O in l)z=l[O],M=a[O],!l.hasOwnProperty(O)||z===M||z===void 0&&M===void 0||Nr(e,t,O,z,l,M);return}}for(var E in a)z=a[E],a.hasOwnProperty(E)&&z!=null&&!l.hasOwnProperty(E)&&Se(e,t,E,null,l,z);for(H in l)z=l[H],M=a[H],!l.hasOwnProperty(H)||z===M||z==null&&M==null||Se(e,t,H,z,l,M)}function Dd(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function tx(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),l=0;l<a.length;l++){var s=a[l],i=s.transferSize,f=s.initiatorType,m=s.duration;if(i&&m&&Dd(f)){for(f=0,m=s.responseEnd,l+=1;l<a.length;l++){var v=a[l],A=v.startTime;if(A>m)break;var O=v.transferSize,H=v.initiatorType;O&&Dd(H)&&(v=v.responseEnd,f+=O*(v<m?1:(m-A)/(v-A)))}if(--l,t+=8*(i+f)/(s.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Sr=null,Er=null;function Fs(e){return e.nodeType===9?e:e.ownerDocument}function wd(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Ud(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Tr(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Cr=null;function ax(){var e=window.event;return e&&e.type==="popstate"?e===Cr?!1:(Cr=e,!0):(Cr=null,!1)}var Ld=typeof setTimeout=="function"?setTimeout:void 0,lx=typeof clearTimeout=="function"?clearTimeout:void 0,Hd=typeof Promise=="function"?Promise:void 0,nx=typeof queueMicrotask=="function"?queueMicrotask:typeof Hd<"u"?function(e){return Hd.resolve(null).then(e).catch(sx)}:Ld;function sx(e){setTimeout(function(){throw e})}function Ma(e){return e==="head"}function Bd(e,t){var a=t,l=0;do{var s=a.nextSibling;if(e.removeChild(a),s&&s.nodeType===8)if(a=s.data,a==="/$"||a==="/&"){if(l===0){e.removeChild(s),Yl(t);return}l--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")l++;else if(a==="html")On(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,On(a);for(var i=a.firstChild;i;){var f=i.nextSibling,m=i.nodeName;i[Jl]||m==="SCRIPT"||m==="STYLE"||m==="LINK"&&i.rel.toLowerCase()==="stylesheet"||a.removeChild(i),i=f}}else a==="body"&&On(e.ownerDocument.body);a=s}while(a);Yl(t)}function qd(e,t){var a=e;e=0;do{var l=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),l&&l.nodeType===8)if(a=l.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=l}while(a)}function Ar(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Ar(a),Oi(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function ix(e,t,a,l){for(;e.nodeType===1;){var s=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[Jl])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(i=e.getAttribute("rel"),i==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(i!==s.rel||e.getAttribute("href")!==(s.href==null||s.href===""?null:s.href)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin)||e.getAttribute("title")!==(s.title==null?null:s.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(i=e.getAttribute("src"),(i!==(s.src==null?null:s.src)||e.getAttribute("type")!==(s.type==null?null:s.type)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var i=s.name==null?null:""+s.name;if(s.type==="hidden"&&e.getAttribute("name")===i)return e}else return e;if(e=Mt(e.nextSibling),e===null)break}return null}function ux(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Mt(e.nextSibling),e===null))return null;return e}function Yd(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Mt(e.nextSibling),e===null))return null;return e}function zr(e){return e.data==="$?"||e.data==="$~"}function Mr(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function rx(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var l=function(){t(),a.removeEventListener("DOMContentLoaded",l)};a.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function Mt(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Rr=null;function Gd(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return Mt(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function Xd(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function Qd(e,t,a){switch(t=Fs(a),e){case"html":if(e=t.documentElement,!e)throw Error(r(452));return e;case"head":if(e=t.head,!e)throw Error(r(453));return e;case"body":if(e=t.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function On(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Oi(e)}var Rt=new Map,Vd=new Set;function Ps(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ua=Z.d;Z.d={f:cx,r:ox,D:fx,C:dx,L:mx,m:hx,X:gx,S:xx,M:yx};function cx(){var e=ua.f(),t=Qs();return e||t}function ox(e){var t=sl(e);t!==null&&t.tag===5&&t.type==="form"?uf(t):ua.r(e)}var Hl=typeof document>"u"?null:document;function Zd(e,t,a){var l=Hl;if(l&&typeof t=="string"&&t){var s=Nt(t);s='link[rel="'+e+'"][href="'+s+'"]',typeof a=="string"&&(s+='[crossorigin="'+a+'"]'),Vd.has(s)||(Vd.add(s),e={rel:e,crossOrigin:a,href:t},l.querySelector(s)===null&&(t=l.createElement("link"),Fe(t,"link",e),Ve(t),l.head.appendChild(t)))}}function fx(e){ua.D(e),Zd("dns-prefetch",e,null)}function dx(e,t){ua.C(e,t),Zd("preconnect",e,t)}function mx(e,t,a){ua.L(e,t,a);var l=Hl;if(l&&e&&t){var s='link[rel="preload"][as="'+Nt(t)+'"]';t==="image"&&a&&a.imageSrcSet?(s+='[imagesrcset="'+Nt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(s+='[imagesizes="'+Nt(a.imageSizes)+'"]')):s+='[href="'+Nt(e)+'"]';var i=s;switch(t){case"style":i=Bl(e);break;case"script":i=ql(e)}Rt.has(i)||(e=y({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Rt.set(i,e),l.querySelector(s)!==null||t==="style"&&l.querySelector(Dn(i))||t==="script"&&l.querySelector(wn(i))||(t=l.createElement("link"),Fe(t,"link",e),Ve(t),l.head.appendChild(t)))}}function hx(e,t){ua.m(e,t);var a=Hl;if(a&&e){var l=t&&typeof t.as=="string"?t.as:"script",s='link[rel="modulepreload"][as="'+Nt(l)+'"][href="'+Nt(e)+'"]',i=s;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=ql(e)}if(!Rt.has(i)&&(e=y({rel:"modulepreload",href:e},t),Rt.set(i,e),a.querySelector(s)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(wn(i)))return}l=a.createElement("link"),Fe(l,"link",e),Ve(l),a.head.appendChild(l)}}}function xx(e,t,a){ua.S(e,t,a);var l=Hl;if(l&&e){var s=il(l).hoistableStyles,i=Bl(e);t=t||"default";var f=s.get(i);if(!f){var m={loading:0,preload:null};if(f=l.querySelector(Dn(i)))m.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Rt.get(i))&&_r(e,a);var v=f=l.createElement("link");Ve(v),Fe(v,"link",e),v._p=new Promise(function(A,O){v.onload=A,v.onerror=O}),v.addEventListener("load",function(){m.loading|=1}),v.addEventListener("error",function(){m.loading|=2}),m.loading|=4,Is(f,t,l)}f={type:"stylesheet",instance:f,count:1,state:m},s.set(i,f)}}}function gx(e,t){ua.X(e,t);var a=Hl;if(a&&e){var l=il(a).hoistableScripts,s=ql(e),i=l.get(s);i||(i=a.querySelector(wn(s)),i||(e=y({src:e,async:!0},t),(t=Rt.get(s))&&Or(e,t),i=a.createElement("script"),Ve(i),Fe(i,"link",e),a.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},l.set(s,i))}}function yx(e,t){ua.M(e,t);var a=Hl;if(a&&e){var l=il(a).hoistableScripts,s=ql(e),i=l.get(s);i||(i=a.querySelector(wn(s)),i||(e=y({src:e,async:!0,type:"module"},t),(t=Rt.get(s))&&Or(e,t),i=a.createElement("script"),Ve(i),Fe(i,"link",e),a.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},l.set(s,i))}}function Kd(e,t,a,l){var s=(s=re.current)?Ps(s):null;if(!s)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Bl(a.href),a=il(s).hoistableStyles,l=a.get(t),l||(l={type:"style",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Bl(a.href);var i=il(s).hoistableStyles,f=i.get(e);if(f||(s=s.ownerDocument||s,f={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,f),(i=s.querySelector(Dn(e)))&&!i._p&&(f.instance=i,f.state.loading=5),Rt.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Rt.set(e,a),i||px(s,e,a,f.state))),t&&l===null)throw Error(r(528,""));return f}if(t&&l!==null)throw Error(r(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=ql(a),a=il(s).hoistableScripts,l=a.get(t),l||(l={type:"script",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function Bl(e){return'href="'+Nt(e)+'"'}function Dn(e){return'link[rel="stylesheet"]['+e+"]"}function kd(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function px(e,t,a,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),Fe(t,"link",a),Ve(t),e.head.appendChild(t))}function ql(e){return'[src="'+Nt(e)+'"]'}function wn(e){return"script[async]"+e}function $d(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+Nt(a.href)+'"]');if(l)return t.instance=l,Ve(l),l;var s=y({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),Ve(l),Fe(l,"style",s),Is(l,a.precedence,e),t.instance=l;case"stylesheet":s=Bl(a.href);var i=e.querySelector(Dn(s));if(i)return t.state.loading|=4,t.instance=i,Ve(i),i;l=kd(a),(s=Rt.get(s))&&_r(l,s),i=(e.ownerDocument||e).createElement("link"),Ve(i);var f=i;return f._p=new Promise(function(m,v){f.onload=m,f.onerror=v}),Fe(i,"link",l),t.state.loading|=4,Is(i,a.precedence,e),t.instance=i;case"script":return i=ql(a.src),(s=e.querySelector(wn(i)))?(t.instance=s,Ve(s),s):(l=a,(s=Rt.get(i))&&(l=y({},a),Or(l,s)),e=e.ownerDocument||e,s=e.createElement("script"),Ve(s),Fe(s,"link",l),e.head.appendChild(s),t.instance=s);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,Is(l,a.precedence,e));return t.instance}function Is(e,t,a){for(var l=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),s=l.length?l[l.length-1]:null,i=s,f=0;f<l.length;f++){var m=l[f];if(m.dataset.precedence===t)i=m;else if(i!==s)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function _r(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Or(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var ei=null;function Jd(e,t,a){if(ei===null){var l=new Map,s=ei=new Map;s.set(a,l)}else s=ei,l=s.get(a),l||(l=new Map,s.set(a,l));if(l.has(e))return l;for(l.set(e,null),a=a.getElementsByTagName(e),s=0;s<a.length;s++){var i=a[s];if(!(i[Jl]||i[ke]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var f=i.getAttribute(t)||"";f=e+f;var m=l.get(f);m?m.push(i):l.set(f,[i])}}return l}function Wd(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function vx(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Fd(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function bx(e,t,a,l){if(a.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var s=Bl(l.href),i=t.querySelector(Dn(s));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=ti.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=i,Ve(i);return}i=t.ownerDocument||t,l=kd(l),(s=Rt.get(s))&&_r(l,s),i=i.createElement("link"),Ve(i);var f=i;f._p=new Promise(function(m,v){f.onload=m,f.onerror=v}),Fe(i,"link",l),a.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=ti.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var Dr=0;function jx(e,t){return e.stylesheets&&e.count===0&&li(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var l=setTimeout(function(){if(e.stylesheets&&li(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&Dr===0&&(Dr=62500*tx());var s=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&li(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>Dr?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(s)}}:null}function ti(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)li(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ai=null;function li(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ai=new Map,t.forEach(Nx,e),ai=null,ti.call(e))}function Nx(e,t){if(!(t.state.loading&4)){var a=ai.get(e);if(a)var l=a.get(null);else{a=new Map,ai.set(e,a);for(var s=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<s.length;i++){var f=s[i];(f.nodeName==="LINK"||f.getAttribute("media")!=="not all")&&(a.set(f.dataset.precedence,f),l=f)}l&&a.set(null,l)}s=t.instance,f=s.getAttribute("data-precedence"),i=a.get(f)||l,i===l&&a.set(null,s),a.set(f,s),this.count++,l=ti.bind(this),s.addEventListener("load",l),s.addEventListener("error",l),i?i.parentNode.insertBefore(s,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(s,e.firstChild)),t.state.loading|=4}}var Un={$$typeof:Q,Provider:null,Consumer:null,_currentValue:ee,_currentValue2:ee,_threadCount:0};function Sx(e,t,a,l,s,i,f,m,v){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=zi(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zi(0),this.hiddenUpdates=zi(null),this.identifierPrefix=l,this.onUncaughtError=s,this.onCaughtError=i,this.onRecoverableError=f,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=v,this.incompleteTransitions=new Map}function Pd(e,t,a,l,s,i,f,m,v,A,O,H){return e=new Sx(e,t,a,f,v,A,O,H,m),t=1,i===!0&&(t|=24),i=ht(3,null,null,t),e.current=i,i.stateNode=e,t=du(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:l,isDehydrated:a,cache:t},gu(i),e}function Id(e){return e?(e=gl,e):gl}function e0(e,t,a,l,s,i){s=Id(s),l.context===null?l.context=s:l.pendingContext=s,l=pa(t),l.payload={element:a},i=i===void 0?null:i,i!==null&&(l.callback=i),a=va(e,l,t),a!==null&&(rt(a,e,t),mn(a,e,t))}function t0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function wr(e,t){t0(e,t),(e=e.alternate)&&t0(e,t)}function a0(e){if(e.tag===13||e.tag===31){var t=Qa(e,67108864);t!==null&&rt(t,e,67108864),wr(e,67108864)}}function l0(e){if(e.tag===13||e.tag===31){var t=vt();t=Mi(t);var a=Qa(e,t);a!==null&&rt(a,e,t),wr(e,t)}}var ni=!0;function Ex(e,t,a,l){var s=D.T;D.T=null;var i=Z.p;try{Z.p=2,Ur(e,t,a,l)}finally{Z.p=i,D.T=s}}function Tx(e,t,a,l){var s=D.T;D.T=null;var i=Z.p;try{Z.p=8,Ur(e,t,a,l)}finally{Z.p=i,D.T=s}}function Ur(e,t,a,l){if(ni){var s=Lr(l);if(s===null)jr(e,t,l,si,a),s0(e,l);else if(Ax(s,e,t,a,l))l.stopPropagation();else if(s0(e,l),t&4&&-1<Cx.indexOf(e)){for(;s!==null;){var i=sl(s);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var f=Ba(i.pendingLanes);if(f!==0){var m=i;for(m.pendingLanes|=2,m.entangledLanes|=2;f;){var v=1<<31-dt(f);m.entanglements[1]|=v,f&=~v}Yt(i),(ye&6)===0&&(Gs=ot()+500,Mn(0))}}break;case 31:case 13:m=Qa(i,2),m!==null&&rt(m,i,2),Qs(),wr(i,2)}if(i=Lr(l),i===null&&jr(e,t,l,si,a),i===s)break;s=i}s!==null&&l.stopPropagation()}else jr(e,t,l,null,a)}}function Lr(e){return e=Bi(e),Hr(e)}var si=null;function Hr(e){if(si=null,e=nl(e),e!==null){var t=h(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=g(t),e!==null)return e;e=null}else if(a===31){if(e=b(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return si=e,null}function n0(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(fm()){case oc:return 2;case fc:return 8;case $n:case dm:return 32;case dc:return 268435456;default:return 32}default:return 32}}var Br=!1,Ra=null,_a=null,Oa=null,Ln=new Map,Hn=new Map,Da=[],Cx="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function s0(e,t){switch(e){case"focusin":case"focusout":Ra=null;break;case"dragenter":case"dragleave":_a=null;break;case"mouseover":case"mouseout":Oa=null;break;case"pointerover":case"pointerout":Ln.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Hn.delete(t.pointerId)}}function Bn(e,t,a,l,s,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:a,eventSystemFlags:l,nativeEvent:i,targetContainers:[s]},t!==null&&(t=sl(t),t!==null&&a0(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function Ax(e,t,a,l,s){switch(t){case"focusin":return Ra=Bn(Ra,e,t,a,l,s),!0;case"dragenter":return _a=Bn(_a,e,t,a,l,s),!0;case"mouseover":return Oa=Bn(Oa,e,t,a,l,s),!0;case"pointerover":var i=s.pointerId;return Ln.set(i,Bn(Ln.get(i)||null,e,t,a,l,s)),!0;case"gotpointercapture":return i=s.pointerId,Hn.set(i,Bn(Hn.get(i)||null,e,t,a,l,s)),!0}return!1}function i0(e){var t=nl(e.target);if(t!==null){var a=h(t);if(a!==null){if(t=a.tag,t===13){if(t=g(a),t!==null){e.blockedOn=t,pc(e.priority,function(){l0(a)});return}}else if(t===31){if(t=b(a),t!==null){e.blockedOn=t,pc(e.priority,function(){l0(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ii(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=Lr(e.nativeEvent);if(a===null){a=e.nativeEvent;var l=new a.constructor(a.type,a);Hi=l,a.target.dispatchEvent(l),Hi=null}else return t=sl(a),t!==null&&a0(t),e.blockedOn=a,!1;t.shift()}return!0}function u0(e,t,a){ii(e)&&a.delete(t)}function zx(){Br=!1,Ra!==null&&ii(Ra)&&(Ra=null),_a!==null&&ii(_a)&&(_a=null),Oa!==null&&ii(Oa)&&(Oa=null),Ln.forEach(u0),Hn.forEach(u0)}function ui(e,t){e.blockedOn===t&&(e.blockedOn=null,Br||(Br=!0,u.unstable_scheduleCallback(u.unstable_NormalPriority,zx)))}var ri=null;function r0(e){ri!==e&&(ri=e,u.unstable_scheduleCallback(u.unstable_NormalPriority,function(){ri===e&&(ri=null);for(var t=0;t<e.length;t+=3){var a=e[t],l=e[t+1],s=e[t+2];if(typeof l!="function"){if(Hr(l||a)===null)continue;break}var i=sl(a);i!==null&&(e.splice(t,3),t-=3,Lu(i,{pending:!0,data:s,method:a.method,action:l},l,s))}}))}function Yl(e){function t(v){return ui(v,e)}Ra!==null&&ui(Ra,e),_a!==null&&ui(_a,e),Oa!==null&&ui(Oa,e),Ln.forEach(t),Hn.forEach(t);for(var a=0;a<Da.length;a++){var l=Da[a];l.blockedOn===e&&(l.blockedOn=null)}for(;0<Da.length&&(a=Da[0],a.blockedOn===null);)i0(a),a.blockedOn===null&&Da.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(l=0;l<a.length;l+=3){var s=a[l],i=a[l+1],f=s[at]||null;if(typeof i=="function")f||r0(a);else if(f){var m=null;if(i&&i.hasAttribute("formAction")){if(s=i,f=i[at]||null)m=f.formAction;else if(Hr(s)!==null)continue}else m=f.action;typeof m=="function"?a[l+1]=m:(a.splice(l,3),l-=3),r0(a)}}}function c0(){function e(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(f){return s=f})},focusReset:"manual",scroll:"manual"})}function t(){s!==null&&(s(),s=null),l||setTimeout(a,20)}function a(){if(!l&&!navigation.transition){var i=navigation.currentEntry;i&&i.url!=null&&navigation.navigate(i.url,{state:i.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,s=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),s!==null&&(s(),s=null)}}}function qr(e){this._internalRoot=e}ci.prototype.render=qr.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var a=t.current,l=vt();e0(a,l,e,t,null,null)},ci.prototype.unmount=qr.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;e0(e.current,2,null,e,null,null),Qs(),t[ll]=null}};function ci(e){this._internalRoot=e}ci.prototype.unstable_scheduleHydration=function(e){if(e){var t=yc();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Da.length&&t!==0&&t<Da[a].priority;a++);Da.splice(a,0,e),a===0&&i0(e)}};var o0=o.version;if(o0!=="19.2.4")throw Error(r(527,o0,"19.2.4"));Z.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=x(t),e=e!==null?j(e):null,e=e===null?null:e.stateNode,e};var Mx={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:D,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var oi=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!oi.isDisabled&&oi.supportsFiber)try{Kl=oi.inject(Mx),ft=oi}catch{}}return Yn.createRoot=function(e,t){if(!d(e))throw Error(r(299));var a=!1,l="",s=yf,i=pf,f=vf;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(s=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(f=t.onRecoverableError)),t=Pd(e,1,!1,null,null,a,l,null,s,i,f,c0),e[ll]=t.current,br(e),new qr(t)},Yn.hydrateRoot=function(e,t,a){if(!d(e))throw Error(r(299));var l=!1,s="",i=yf,f=pf,m=vf,v=null;return a!=null&&(a.unstable_strictMode===!0&&(l=!0),a.identifierPrefix!==void 0&&(s=a.identifierPrefix),a.onUncaughtError!==void 0&&(i=a.onUncaughtError),a.onCaughtError!==void 0&&(f=a.onCaughtError),a.onRecoverableError!==void 0&&(m=a.onRecoverableError),a.formState!==void 0&&(v=a.formState)),t=Pd(e,1,!0,t,a??null,l,s,v,i,f,m,c0),t.context=Id(null),a=t.current,l=vt(),l=Mi(l),s=pa(l),s.callback=null,va(a,s,l),a=l,t.current.lanes=a,$l(t,a),Yt(t),e[ll]=t.current,br(e),new ci(t)},Yn.version="19.2.4",Yn}var b0;function qx(){if(b0)return Xr.exports;b0=1;function u(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(u)}catch(o){console.error(o)}}return u(),Xr.exports=Bx(),Xr.exports}var Yx=qx();var j0="popstate";function Gx(u={}){function o(r,d){let{pathname:h,search:g,hash:b}=r.location;return Wr("",{pathname:h,search:g,hash:b},d.state&&d.state.usr||null,d.state&&d.state.key||"default")}function c(r,d){return typeof d=="string"?d:Xn(d)}return Qx(o,c,null,u)}function _e(u,o){if(u===!1||u===null||typeof u>"u")throw new Error(o)}function Lt(u,o){if(!u){typeof console<"u"&&console.warn(o);try{throw new Error(o)}catch{}}}function Xx(){return Math.random().toString(36).substring(2,10)}function N0(u,o){return{usr:u.state,key:u.key,idx:o}}function Wr(u,o,c=null,r){return{pathname:typeof u=="string"?u:u.pathname,search:"",hash:"",...typeof o=="string"?Ql(o):o,state:c,key:o&&o.key||r||Xx()}}function Xn({pathname:u="/",search:o="",hash:c=""}){return o&&o!=="?"&&(u+=o.charAt(0)==="?"?o:"?"+o),c&&c!=="#"&&(u+=c.charAt(0)==="#"?c:"#"+c),u}function Ql(u){let o={};if(u){let c=u.indexOf("#");c>=0&&(o.hash=u.substring(c),u=u.substring(0,c));let r=u.indexOf("?");r>=0&&(o.search=u.substring(r),u=u.substring(0,r)),u&&(o.pathname=u)}return o}function Qx(u,o,c,r={}){let{window:d=document.defaultView,v5Compat:h=!1}=r,g=d.history,b="POP",p=null,x=j();x==null&&(x=0,g.replaceState({...g.state,idx:x},""));function j(){return(g.state||{idx:null}).idx}function y(){b="POP";let q=j(),V=q==null?null:q-x;x=q,p&&p({action:b,location:Y.location,delta:V})}function R(q,V){b="PUSH";let L=Wr(Y.location,q,V);x=j()+1;let Q=N0(L,x),ue=Y.createHref(L);try{g.pushState(Q,"",ue)}catch(te){if(te instanceof DOMException&&te.name==="DataCloneError")throw te;d.location.assign(ue)}h&&p&&p({action:b,location:Y.location,delta:1})}function G(q,V){b="REPLACE";let L=Wr(Y.location,q,V);x=j();let Q=N0(L,x),ue=Y.createHref(L);g.replaceState(Q,"",ue),h&&p&&p({action:b,location:Y.location,delta:0})}function _(q){return Vx(q)}let Y={get action(){return b},get location(){return u(d,g)},listen(q){if(p)throw new Error("A history only accepts one active listener");return d.addEventListener(j0,y),p=q,()=>{d.removeEventListener(j0,y),p=null}},createHref(q){return o(d,q)},createURL:_,encodeLocation(q){let V=_(q);return{pathname:V.pathname,search:V.search,hash:V.hash}},push:R,replace:G,go(q){return g.go(q)}};return Y}function Vx(u,o=!1){let c="http://localhost";typeof window<"u"&&(c=window.location.origin!=="null"?window.location.origin:window.location.href),_e(c,"No window.location.(origin|href) available to create URL");let r=typeof u=="string"?u:Xn(u);return r=r.replace(/ $/,"%20"),!o&&r.startsWith("//")&&(r=c+r),new URL(r,c)}function w0(u,o,c="/"){return Zx(u,o,c,!1)}function Zx(u,o,c,r){let d=typeof o=="string"?Ql(o):o,h=ca(d.pathname||"/",c);if(h==null)return null;let g=U0(u);Kx(g);let b=null;for(let p=0;b==null&&p<g.length;++p){let x=lg(h);b=tg(g[p],x,r)}return b}function U0(u,o=[],c=[],r="",d=!1){let h=(g,b,p=d,x)=>{let j={relativePath:x===void 0?g.path||"":x,caseSensitive:g.caseSensitive===!0,childrenIndex:b,route:g};if(j.relativePath.startsWith("/")){if(!j.relativePath.startsWith(r)&&p)return;_e(j.relativePath.startsWith(r),`Absolute route path "${j.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),j.relativePath=j.relativePath.slice(r.length)}let y=ra([r,j.relativePath]),R=c.concat(j);g.children&&g.children.length>0&&(_e(g.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${y}".`),U0(g.children,o,R,y,p)),!(g.path==null&&!g.index)&&o.push({path:y,score:Ix(y,g.index),routesMeta:R})};return u.forEach((g,b)=>{if(g.path===""||!g.path?.includes("?"))h(g,b);else for(let p of L0(g.path))h(g,b,!0,p)}),o}function L0(u){let o=u.split("/");if(o.length===0)return[];let[c,...r]=o,d=c.endsWith("?"),h=c.replace(/\?$/,"");if(r.length===0)return d?[h,""]:[h];let g=L0(r.join("/")),b=[];return b.push(...g.map(p=>p===""?h:[h,p].join("/"))),d&&b.push(...g),b.map(p=>u.startsWith("/")&&p===""?"/":p)}function Kx(u){u.sort((o,c)=>o.score!==c.score?c.score-o.score:eg(o.routesMeta.map(r=>r.childrenIndex),c.routesMeta.map(r=>r.childrenIndex)))}var kx=/^:[\w-]+$/,$x=3,Jx=2,Wx=1,Fx=10,Px=-2,S0=u=>u==="*";function Ix(u,o){let c=u.split("/"),r=c.length;return c.some(S0)&&(r+=Px),o&&(r+=Jx),c.filter(d=>!S0(d)).reduce((d,h)=>d+(kx.test(h)?$x:h===""?Wx:Fx),r)}function eg(u,o){return u.length===o.length&&u.slice(0,-1).every((r,d)=>r===o[d])?u[u.length-1]-o[o.length-1]:0}function tg(u,o,c=!1){let{routesMeta:r}=u,d={},h="/",g=[];for(let b=0;b<r.length;++b){let p=r[b],x=b===r.length-1,j=h==="/"?o:o.slice(h.length)||"/",y=gi({path:p.relativePath,caseSensitive:p.caseSensitive,end:x},j),R=p.route;if(!y&&x&&c&&!r[r.length-1].route.index&&(y=gi({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},j)),!y)return null;Object.assign(d,y.params),g.push({params:d,pathname:ra([h,y.pathname]),pathnameBase:ug(ra([h,y.pathnameBase])),route:R}),y.pathnameBase!=="/"&&(h=ra([h,y.pathnameBase]))}return g}function gi(u,o){typeof u=="string"&&(u={path:u,caseSensitive:!1,end:!0});let[c,r]=ag(u.path,u.caseSensitive,u.end),d=o.match(c);if(!d)return null;let h=d[0],g=h.replace(/(.)\/+$/,"$1"),b=d.slice(1);return{params:r.reduce((x,{paramName:j,isOptional:y},R)=>{if(j==="*"){let _=b[R]||"";g=h.slice(0,h.length-_.length).replace(/(.)\/+$/,"$1")}const G=b[R];return y&&!G?x[j]=void 0:x[j]=(G||"").replace(/%2F/g,"/"),x},{}),pathname:h,pathnameBase:g,pattern:u}}function ag(u,o=!1,c=!0){Lt(u==="*"||!u.endsWith("*")||u.endsWith("/*"),`Route path "${u}" will be treated as if it were "${u.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${u.replace(/\*$/,"/*")}".`);let r=[],d="^"+u.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(g,b,p)=>(r.push({paramName:b,isOptional:p!=null}),p?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return u.endsWith("*")?(r.push({paramName:"*"}),d+=u==="*"||u==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):c?d+="\\/*$":u!==""&&u!=="/"&&(d+="(?:(?=\\/|$))"),[new RegExp(d,o?void 0:"i"),r]}function lg(u){try{return u.split("/").map(o=>decodeURIComponent(o).replace(/\//g,"%2F")).join("/")}catch(o){return Lt(!1,`The URL path "${u}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${o}).`),u}}function ca(u,o){if(o==="/")return u;if(!u.toLowerCase().startsWith(o.toLowerCase()))return null;let c=o.endsWith("/")?o.length-1:o.length,r=u.charAt(c);return r&&r!=="/"?null:u.slice(c)||"/"}var ng=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function sg(u,o="/"){let{pathname:c,search:r="",hash:d=""}=typeof u=="string"?Ql(u):u,h;return c?(c=c.replace(/\/\/+/g,"/"),c.startsWith("/")?h=E0(c.substring(1),"/"):h=E0(c,o)):h=o,{pathname:h,search:rg(r),hash:cg(d)}}function E0(u,o){let c=o.replace(/\/+$/,"").split("/");return u.split("/").forEach(d=>{d===".."?c.length>1&&c.pop():d!=="."&&c.push(d)}),c.length>1?c.join("/"):"/"}function Kr(u,o,c,r){return`Cannot include a '${u}' character in a manually specified \`to.${o}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${c}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function ig(u){return u.filter((o,c)=>c===0||o.route.path&&o.route.path.length>0)}function H0(u){let o=ig(u);return o.map((c,r)=>r===o.length-1?c.pathname:c.pathnameBase)}function B0(u,o,c,r=!1){let d;typeof u=="string"?d=Ql(u):(d={...u},_e(!d.pathname||!d.pathname.includes("?"),Kr("?","pathname","search",d)),_e(!d.pathname||!d.pathname.includes("#"),Kr("#","pathname","hash",d)),_e(!d.search||!d.search.includes("#"),Kr("#","search","hash",d)));let h=u===""||d.pathname==="",g=h?"/":d.pathname,b;if(g==null)b=c;else{let y=o.length-1;if(!r&&g.startsWith("..")){let R=g.split("/");for(;R[0]==="..";)R.shift(),y-=1;d.pathname=R.join("/")}b=y>=0?o[y]:"/"}let p=sg(d,b),x=g&&g!=="/"&&g.endsWith("/"),j=(h||g===".")&&c.endsWith("/");return!p.pathname.endsWith("/")&&(x||j)&&(p.pathname+="/"),p}var ra=u=>u.join("/").replace(/\/\/+/g,"/"),ug=u=>u.replace(/\/+$/,"").replace(/^\/*/,"/"),rg=u=>!u||u==="?"?"":u.startsWith("?")?u:"?"+u,cg=u=>!u||u==="#"?"":u.startsWith("#")?u:"#"+u,og=class{constructor(u,o,c,r=!1){this.status=u,this.statusText=o||"",this.internal=r,c instanceof Error?(this.data=c.toString(),this.error=c):this.data=c}};function fg(u){return u!=null&&typeof u.status=="number"&&typeof u.statusText=="string"&&typeof u.internal=="boolean"&&"data"in u}function dg(u){return u.map(o=>o.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var q0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Y0(u,o){let c=u;if(typeof c!="string"||!ng.test(c))return{absoluteURL:void 0,isExternal:!1,to:c};let r=c,d=!1;if(q0)try{let h=new URL(window.location.href),g=c.startsWith("//")?new URL(h.protocol+c):new URL(c),b=ca(g.pathname,o);g.origin===h.origin&&b!=null?c=b+g.search+g.hash:d=!0}catch{Lt(!1,`<Link to="${c}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:d,to:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var G0=["POST","PUT","PATCH","DELETE"];new Set(G0);var mg=["GET",...G0];new Set(mg);var Vl=T.createContext(null);Vl.displayName="DataRouter";var yi=T.createContext(null);yi.displayName="DataRouterState";var hg=T.createContext(!1),X0=T.createContext({isTransitioning:!1});X0.displayName="ViewTransition";var xg=T.createContext(new Map);xg.displayName="Fetchers";var gg=T.createContext(null);gg.displayName="Await";var _t=T.createContext(null);_t.displayName="Navigation";var Qn=T.createContext(null);Qn.displayName="Location";var Gt=T.createContext({outlet:null,matches:[],isDataRoute:!1});Gt.displayName="Route";var ec=T.createContext(null);ec.displayName="RouteError";var Q0="REACT_ROUTER_ERROR",yg="REDIRECT",pg="ROUTE_ERROR_RESPONSE";function vg(u){if(u.startsWith(`${Q0}:${yg}:{`))try{let o=JSON.parse(u.slice(28));if(typeof o=="object"&&o&&typeof o.status=="number"&&typeof o.statusText=="string"&&typeof o.location=="string"&&typeof o.reloadDocument=="boolean"&&typeof o.replace=="boolean")return o}catch{}}function bg(u){if(u.startsWith(`${Q0}:${pg}:{`))try{let o=JSON.parse(u.slice(40));if(typeof o=="object"&&o&&typeof o.status=="number"&&typeof o.statusText=="string")return new og(o.status,o.statusText,o.data)}catch{}}function jg(u,{relative:o}={}){_e(Vn(),"useHref() may be used only in the context of a <Router> component.");let{basename:c,navigator:r}=T.useContext(_t),{hash:d,pathname:h,search:g}=Zn(u,{relative:o}),b=h;return c!=="/"&&(b=h==="/"?c:ra([c,h])),r.createHref({pathname:b,search:g,hash:d})}function Vn(){return T.useContext(Qn)!=null}function La(){return _e(Vn(),"useLocation() may be used only in the context of a <Router> component."),T.useContext(Qn).location}var V0="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Z0(u){T.useContext(_t).static||T.useLayoutEffect(u)}function tc(){let{isDataRoute:u}=T.useContext(Gt);return u?Ug():Ng()}function Ng(){_e(Vn(),"useNavigate() may be used only in the context of a <Router> component.");let u=T.useContext(Vl),{basename:o,navigator:c}=T.useContext(_t),{matches:r}=T.useContext(Gt),{pathname:d}=La(),h=JSON.stringify(H0(r)),g=T.useRef(!1);return Z0(()=>{g.current=!0}),T.useCallback((p,x={})=>{if(Lt(g.current,V0),!g.current)return;if(typeof p=="number"){c.go(p);return}let j=B0(p,JSON.parse(h),d,x.relative==="path");u==null&&o!=="/"&&(j.pathname=j.pathname==="/"?o:ra([o,j.pathname])),(x.replace?c.replace:c.push)(j,x.state,x)},[o,c,h,d,u])}T.createContext(null);function Sg(){let{matches:u}=T.useContext(Gt),o=u[u.length-1];return o?o.params:{}}function Zn(u,{relative:o}={}){let{matches:c}=T.useContext(Gt),{pathname:r}=La(),d=JSON.stringify(H0(c));return T.useMemo(()=>B0(u,JSON.parse(d),r,o==="path"),[u,d,r,o])}function Eg(u,o){return K0(u,o)}function K0(u,o,c,r,d){_e(Vn(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:h}=T.useContext(_t),{matches:g}=T.useContext(Gt),b=g[g.length-1],p=b?b.params:{},x=b?b.pathname:"/",j=b?b.pathnameBase:"/",y=b&&b.route;{let L=y&&y.path||"";$0(x,!y||L.endsWith("*")||L.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${x}" (under <Route path="${L}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
10
-
11
- Please change the parent <Route path="${L}"> to <Route path="${L==="/"?"*":`${L}/*`}">.`)}let R=La(),G;if(o){let L=typeof o=="string"?Ql(o):o;_e(j==="/"||L.pathname?.startsWith(j),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${j}" but pathname "${L.pathname}" was given in the \`location\` prop.`),G=L}else G=R;let _=G.pathname||"/",Y=_;if(j!=="/"){let L=j.replace(/^\//,"").split("/");Y="/"+_.replace(/^\//,"").split("/").slice(L.length).join("/")}let q=w0(u,{pathname:Y});Lt(y||q!=null,`No routes matched location "${G.pathname}${G.search}${G.hash}" `),Lt(q==null||q[q.length-1].route.element!==void 0||q[q.length-1].route.Component!==void 0||q[q.length-1].route.lazy!==void 0,`Matched leaf route at location "${G.pathname}${G.search}${G.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let V=Mg(q&&q.map(L=>Object.assign({},L,{params:Object.assign({},p,L.params),pathname:ra([j,h.encodeLocation?h.encodeLocation(L.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:L.pathname]),pathnameBase:L.pathnameBase==="/"?j:ra([j,h.encodeLocation?h.encodeLocation(L.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:L.pathnameBase])})),g,c,r,d);return o&&V?T.createElement(Qn.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...G},navigationType:"POP"}},V):V}function Tg(){let u=wg(),o=fg(u)?`${u.status} ${u.statusText}`:u instanceof Error?u.message:JSON.stringify(u),c=u instanceof Error?u.stack:null,r="rgba(200,200,200, 0.5)",d={padding:"0.5rem",backgroundColor:r},h={padding:"2px 4px",backgroundColor:r},g=null;return console.error("Error handled by React Router default ErrorBoundary:",u),g=T.createElement(T.Fragment,null,T.createElement("p",null,"💿 Hey developer 👋"),T.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",T.createElement("code",{style:h},"ErrorBoundary")," or"," ",T.createElement("code",{style:h},"errorElement")," prop on your route.")),T.createElement(T.Fragment,null,T.createElement("h2",null,"Unexpected Application Error!"),T.createElement("h3",{style:{fontStyle:"italic"}},o),c?T.createElement("pre",{style:d},c):null,g)}var Cg=T.createElement(Tg,null),k0=class extends T.Component{constructor(u){super(u),this.state={location:u.location,revalidation:u.revalidation,error:u.error}}static getDerivedStateFromError(u){return{error:u}}static getDerivedStateFromProps(u,o){return o.location!==u.location||o.revalidation!=="idle"&&u.revalidation==="idle"?{error:u.error,location:u.location,revalidation:u.revalidation}:{error:u.error!==void 0?u.error:o.error,location:o.location,revalidation:u.revalidation||o.revalidation}}componentDidCatch(u,o){this.props.onError?this.props.onError(u,o):console.error("React Router caught the following error during render",u)}render(){let u=this.state.error;if(this.context&&typeof u=="object"&&u&&"digest"in u&&typeof u.digest=="string"){const c=bg(u.digest);c&&(u=c)}let o=u!==void 0?T.createElement(Gt.Provider,{value:this.props.routeContext},T.createElement(ec.Provider,{value:u,children:this.props.component})):this.props.children;return this.context?T.createElement(Ag,{error:u},o):o}};k0.contextType=hg;var kr=new WeakMap;function Ag({children:u,error:o}){let{basename:c}=T.useContext(_t);if(typeof o=="object"&&o&&"digest"in o&&typeof o.digest=="string"){let r=vg(o.digest);if(r){let d=kr.get(o);if(d)throw d;let h=Y0(r.location,c);if(q0&&!kr.get(o))if(h.isExternal||r.reloadDocument)window.location.href=h.absoluteURL||h.to;else{const g=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(h.to,{replace:r.replace}));throw kr.set(o,g),g}return T.createElement("meta",{httpEquiv:"refresh",content:`0;url=${h.absoluteURL||h.to}`})}}return u}function zg({routeContext:u,match:o,children:c}){let r=T.useContext(Vl);return r&&r.static&&r.staticContext&&(o.route.errorElement||o.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=o.route.id),T.createElement(Gt.Provider,{value:u},c)}function Mg(u,o=[],c=null,r=null,d=null){if(u==null){if(!c)return null;if(c.errors)u=c.matches;else if(o.length===0&&!c.initialized&&c.matches.length>0)u=c.matches;else return null}let h=u,g=c?.errors;if(g!=null){let j=h.findIndex(y=>y.route.id&&g?.[y.route.id]!==void 0);_e(j>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(g).join(",")}`),h=h.slice(0,Math.min(h.length,j+1))}let b=!1,p=-1;if(c)for(let j=0;j<h.length;j++){let y=h[j];if((y.route.HydrateFallback||y.route.hydrateFallbackElement)&&(p=j),y.route.id){let{loaderData:R,errors:G}=c,_=y.route.loader&&!R.hasOwnProperty(y.route.id)&&(!G||G[y.route.id]===void 0);if(y.route.lazy||_){b=!0,p>=0?h=h.slice(0,p+1):h=[h[0]];break}}}let x=c&&r?(j,y)=>{r(j,{location:c.location,params:c.matches?.[0]?.params??{},unstable_pattern:dg(c.matches),errorInfo:y})}:void 0;return h.reduceRight((j,y,R)=>{let G,_=!1,Y=null,q=null;c&&(G=g&&y.route.id?g[y.route.id]:void 0,Y=y.route.errorElement||Cg,b&&(p<0&&R===0?($0("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),_=!0,q=null):p===R&&(_=!0,q=y.route.hydrateFallbackElement||null)));let V=o.concat(h.slice(0,R+1)),L=()=>{let Q;return G?Q=Y:_?Q=q:y.route.Component?Q=T.createElement(y.route.Component,null):y.route.element?Q=y.route.element:Q=j,T.createElement(zg,{match:y,routeContext:{outlet:j,matches:V,isDataRoute:c!=null},children:Q})};return c&&(y.route.ErrorBoundary||y.route.errorElement||R===0)?T.createElement(k0,{location:c.location,revalidation:c.revalidation,component:Y,error:G,children:L(),routeContext:{outlet:null,matches:V,isDataRoute:!0},onError:x}):L()},null)}function ac(u){return`${u} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Rg(u){let o=T.useContext(Vl);return _e(o,ac(u)),o}function _g(u){let o=T.useContext(yi);return _e(o,ac(u)),o}function Og(u){let o=T.useContext(Gt);return _e(o,ac(u)),o}function lc(u){let o=Og(u),c=o.matches[o.matches.length-1];return _e(c.route.id,`${u} can only be used on routes that contain a unique "id"`),c.route.id}function Dg(){return lc("useRouteId")}function wg(){let u=T.useContext(ec),o=_g("useRouteError"),c=lc("useRouteError");return u!==void 0?u:o.errors?.[c]}function Ug(){let{router:u}=Rg("useNavigate"),o=lc("useNavigate"),c=T.useRef(!1);return Z0(()=>{c.current=!0}),T.useCallback(async(d,h={})=>{Lt(c.current,V0),c.current&&(typeof d=="number"?await u.navigate(d):await u.navigate(d,{fromRouteId:o,...h}))},[u,o])}var T0={};function $0(u,o,c){!o&&!T0[u]&&(T0[u]=!0,Lt(!1,c))}T.memo(Lg);function Lg({routes:u,future:o,state:c,onError:r}){return K0(u,void 0,c,r,o)}function tt(u){_e(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Hg({basename:u="/",children:o=null,location:c,navigationType:r="POP",navigator:d,static:h=!1,unstable_useTransitions:g}){_e(!Vn(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let b=u.replace(/^\/*/,"/"),p=T.useMemo(()=>({basename:b,navigator:d,static:h,unstable_useTransitions:g,future:{}}),[b,d,h,g]);typeof c=="string"&&(c=Ql(c));let{pathname:x="/",search:j="",hash:y="",state:R=null,key:G="default"}=c,_=T.useMemo(()=>{let Y=ca(x,b);return Y==null?null:{location:{pathname:Y,search:j,hash:y,state:R,key:G},navigationType:r}},[b,x,j,y,R,G,r]);return Lt(_!=null,`<Router basename="${b}"> is not able to match the URL "${x}${j}${y}" because it does not start with the basename, so the <Router> won't render anything.`),_==null?null:T.createElement(_t.Provider,{value:p},T.createElement(Qn.Provider,{children:o,value:_}))}function Bg({children:u,location:o}){return Eg(Fr(u),o)}function Fr(u,o=[]){let c=[];return T.Children.forEach(u,(r,d)=>{if(!T.isValidElement(r))return;let h=[...o,d];if(r.type===T.Fragment){c.push.apply(c,Fr(r.props.children,h));return}_e(r.type===tt,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),_e(!r.props.index||!r.props.children,"An index route cannot have child routes.");let g={id:r.props.id||h.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(g.children=Fr(r.props.children,h)),c.push(g)}),c}var hi="get",xi="application/x-www-form-urlencoded";function pi(u){return typeof HTMLElement<"u"&&u instanceof HTMLElement}function qg(u){return pi(u)&&u.tagName.toLowerCase()==="button"}function Yg(u){return pi(u)&&u.tagName.toLowerCase()==="form"}function Gg(u){return pi(u)&&u.tagName.toLowerCase()==="input"}function Xg(u){return!!(u.metaKey||u.altKey||u.ctrlKey||u.shiftKey)}function Qg(u,o){return u.button===0&&(!o||o==="_self")&&!Xg(u)}function Pr(u=""){return new URLSearchParams(typeof u=="string"||Array.isArray(u)||u instanceof URLSearchParams?u:Object.keys(u).reduce((o,c)=>{let r=u[c];return o.concat(Array.isArray(r)?r.map(d=>[c,d]):[[c,r]])},[]))}function Vg(u,o){let c=Pr(u);return o&&o.forEach((r,d)=>{c.has(d)||o.getAll(d).forEach(h=>{c.append(d,h)})}),c}var fi=null;function Zg(){if(fi===null)try{new FormData(document.createElement("form"),0),fi=!1}catch{fi=!0}return fi}var Kg=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function $r(u){return u!=null&&!Kg.has(u)?(Lt(!1,`"${u}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${xi}"`),null):u}function kg(u,o){let c,r,d,h,g;if(Yg(u)){let b=u.getAttribute("action");r=b?ca(b,o):null,c=u.getAttribute("method")||hi,d=$r(u.getAttribute("enctype"))||xi,h=new FormData(u)}else if(qg(u)||Gg(u)&&(u.type==="submit"||u.type==="image")){let b=u.form;if(b==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let p=u.getAttribute("formaction")||b.getAttribute("action");if(r=p?ca(p,o):null,c=u.getAttribute("formmethod")||b.getAttribute("method")||hi,d=$r(u.getAttribute("formenctype"))||$r(b.getAttribute("enctype"))||xi,h=new FormData(b,u),!Zg()){let{name:x,type:j,value:y}=u;if(j==="image"){let R=x?`${x}.`:"";h.append(`${R}x`,"0"),h.append(`${R}y`,"0")}else x&&h.append(x,y)}}else{if(pi(u))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');c=hi,r=null,d=xi,g=u}return h&&d==="text/plain"&&(g=h,h=void 0),{action:r,method:c.toLowerCase(),encType:d,formData:h,body:g}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function nc(u,o){if(u===!1||u===null||typeof u>"u")throw new Error(o)}function $g(u,o,c,r){let d=typeof u=="string"?new URL(u,typeof window>"u"?"server://singlefetch/":window.location.origin):u;return c?d.pathname.endsWith("/")?d.pathname=`${d.pathname}_.${r}`:d.pathname=`${d.pathname}.${r}`:d.pathname==="/"?d.pathname=`_root.${r}`:o&&ca(d.pathname,o)==="/"?d.pathname=`${o.replace(/\/$/,"")}/_root.${r}`:d.pathname=`${d.pathname.replace(/\/$/,"")}.${r}`,d}async function Jg(u,o){if(u.id in o)return o[u.id];try{let c=await import(u.module);return o[u.id]=c,c}catch(c){return console.error(`Error loading route module \`${u.module}\`, reloading page...`),console.error(c),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Wg(u){return u==null?!1:u.href==null?u.rel==="preload"&&typeof u.imageSrcSet=="string"&&typeof u.imageSizes=="string":typeof u.rel=="string"&&typeof u.href=="string"}async function Fg(u,o,c){let r=await Promise.all(u.map(async d=>{let h=o.routes[d.route.id];if(h){let g=await Jg(h,c);return g.links?g.links():[]}return[]}));return ty(r.flat(1).filter(Wg).filter(d=>d.rel==="stylesheet"||d.rel==="preload").map(d=>d.rel==="stylesheet"?{...d,rel:"prefetch",as:"style"}:{...d,rel:"prefetch"}))}function C0(u,o,c,r,d,h){let g=(p,x)=>c[x]?p.route.id!==c[x].route.id:!0,b=(p,x)=>c[x].pathname!==p.pathname||c[x].route.path?.endsWith("*")&&c[x].params["*"]!==p.params["*"];return h==="assets"?o.filter((p,x)=>g(p,x)||b(p,x)):h==="data"?o.filter((p,x)=>{let j=r.routes[p.route.id];if(!j||!j.hasLoader)return!1;if(g(p,x)||b(p,x))return!0;if(p.route.shouldRevalidate){let y=p.route.shouldRevalidate({currentUrl:new URL(d.pathname+d.search+d.hash,window.origin),currentParams:c[0]?.params||{},nextUrl:new URL(u,window.origin),nextParams:p.params,defaultShouldRevalidate:!0});if(typeof y=="boolean")return y}return!0}):[]}function Pg(u,o,{includeHydrateFallback:c}={}){return Ig(u.map(r=>{let d=o.routes[r.route.id];if(!d)return[];let h=[d.module];return d.clientActionModule&&(h=h.concat(d.clientActionModule)),d.clientLoaderModule&&(h=h.concat(d.clientLoaderModule)),c&&d.hydrateFallbackModule&&(h=h.concat(d.hydrateFallbackModule)),d.imports&&(h=h.concat(d.imports)),h}).flat(1))}function Ig(u){return[...new Set(u)]}function ey(u){let o={},c=Object.keys(u).sort();for(let r of c)o[r]=u[r];return o}function ty(u,o){let c=new Set;return new Set(o),u.reduce((r,d)=>{let h=JSON.stringify(ey(d));return c.has(h)||(c.add(h),r.push({key:h,link:d})),r},[])}function J0(){let u=T.useContext(Vl);return nc(u,"You must render this element inside a <DataRouterContext.Provider> element"),u}function ay(){let u=T.useContext(yi);return nc(u,"You must render this element inside a <DataRouterStateContext.Provider> element"),u}var sc=T.createContext(void 0);sc.displayName="FrameworkContext";function W0(){let u=T.useContext(sc);return nc(u,"You must render this element inside a <HydratedRouter> element"),u}function ly(u,o){let c=T.useContext(sc),[r,d]=T.useState(!1),[h,g]=T.useState(!1),{onFocus:b,onBlur:p,onMouseEnter:x,onMouseLeave:j,onTouchStart:y}=o,R=T.useRef(null);T.useEffect(()=>{if(u==="render"&&g(!0),u==="viewport"){let Y=V=>{V.forEach(L=>{g(L.isIntersecting)})},q=new IntersectionObserver(Y,{threshold:.5});return R.current&&q.observe(R.current),()=>{q.disconnect()}}},[u]),T.useEffect(()=>{if(r){let Y=setTimeout(()=>{g(!0)},100);return()=>{clearTimeout(Y)}}},[r]);let G=()=>{d(!0)},_=()=>{d(!1),g(!1)};return c?u!=="intent"?[h,R,{}]:[h,R,{onFocus:Gn(b,G),onBlur:Gn(p,_),onMouseEnter:Gn(x,G),onMouseLeave:Gn(j,_),onTouchStart:Gn(y,G)}]:[!1,R,{}]}function Gn(u,o){return c=>{u&&u(c),c.defaultPrevented||o(c)}}function ny({page:u,...o}){let{router:c}=J0(),r=T.useMemo(()=>w0(c.routes,u,c.basename),[c.routes,u,c.basename]);return r?T.createElement(iy,{page:u,matches:r,...o}):null}function sy(u){let{manifest:o,routeModules:c}=W0(),[r,d]=T.useState([]);return T.useEffect(()=>{let h=!1;return Fg(u,o,c).then(g=>{h||d(g)}),()=>{h=!0}},[u,o,c]),r}function iy({page:u,matches:o,...c}){let r=La(),{future:d,manifest:h,routeModules:g}=W0(),{basename:b}=J0(),{loaderData:p,matches:x}=ay(),j=T.useMemo(()=>C0(u,o,x,h,r,"data"),[u,o,x,h,r]),y=T.useMemo(()=>C0(u,o,x,h,r,"assets"),[u,o,x,h,r]),R=T.useMemo(()=>{if(u===r.pathname+r.search+r.hash)return[];let Y=new Set,q=!1;if(o.forEach(L=>{let Q=h.routes[L.route.id];!Q||!Q.hasLoader||(!j.some(ue=>ue.route.id===L.route.id)&&L.route.id in p&&g[L.route.id]?.shouldRevalidate||Q.hasClientLoader?q=!0:Y.add(L.route.id))}),Y.size===0)return[];let V=$g(u,b,d.unstable_trailingSlashAwareDataRequests,"data");return q&&Y.size>0&&V.searchParams.set("_routes",o.filter(L=>Y.has(L.route.id)).map(L=>L.route.id).join(",")),[V.pathname+V.search]},[b,d.unstable_trailingSlashAwareDataRequests,p,r,h,j,o,u,g]),G=T.useMemo(()=>Pg(y,h),[y,h]),_=sy(y);return T.createElement(T.Fragment,null,R.map(Y=>T.createElement("link",{key:Y,rel:"prefetch",as:"fetch",href:Y,...c})),G.map(Y=>T.createElement("link",{key:Y,rel:"modulepreload",href:Y,...c})),_.map(({key:Y,link:q})=>T.createElement("link",{key:Y,nonce:c.nonce,...q,crossOrigin:q.crossOrigin??c.crossOrigin})))}function uy(...u){return o=>{u.forEach(c=>{typeof c=="function"?c(o):c!=null&&(c.current=o)})}}var ry=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{ry&&(window.__reactRouterVersion="7.13.0")}catch{}function cy({basename:u,children:o,unstable_useTransitions:c,window:r}){let d=T.useRef();d.current==null&&(d.current=Gx({window:r,v5Compat:!0}));let h=d.current,[g,b]=T.useState({action:h.action,location:h.location}),p=T.useCallback(x=>{c===!1?b(x):T.startTransition(()=>b(x))},[c]);return T.useLayoutEffect(()=>h.listen(p),[h,p]),T.createElement(Hg,{basename:u,children:o,location:g.location,navigationType:g.action,navigator:h,unstable_useTransitions:c})}var F0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ct=T.forwardRef(function({onClick:o,discover:c="render",prefetch:r="none",relative:d,reloadDocument:h,replace:g,state:b,target:p,to:x,preventScrollReset:j,viewTransition:y,unstable_defaultShouldRevalidate:R,...G},_){let{basename:Y,unstable_useTransitions:q}=T.useContext(_t),V=typeof x=="string"&&F0.test(x),L=Y0(x,Y);x=L.to;let Q=jg(x,{relative:d}),[ue,te,k]=ly(r,G),w=dy(x,{replace:g,state:b,target:p,preventScrollReset:j,relative:d,viewTransition:y,unstable_defaultShouldRevalidate:R,unstable_useTransitions:q});function F(Ae){o&&o(Ae),Ae.defaultPrevented||w(Ae)}let X=T.createElement("a",{...G,...k,href:L.absoluteURL||Q,onClick:L.isExternal||h?o:F,ref:uy(_,te),target:p,"data-discover":!V&&c==="render"?"true":void 0});return ue&&!V?T.createElement(T.Fragment,null,X,T.createElement(ny,{page:Q})):X});ct.displayName="Link";var P0=T.forwardRef(function({"aria-current":o="page",caseSensitive:c=!1,className:r="",end:d=!1,style:h,to:g,viewTransition:b,children:p,...x},j){let y=Zn(g,{relative:x.relative}),R=La(),G=T.useContext(yi),{navigator:_,basename:Y}=T.useContext(_t),q=G!=null&&yy(y)&&b===!0,V=_.encodeLocation?_.encodeLocation(y).pathname:y.pathname,L=R.pathname,Q=G&&G.navigation&&G.navigation.location?G.navigation.location.pathname:null;c||(L=L.toLowerCase(),Q=Q?Q.toLowerCase():null,V=V.toLowerCase()),Q&&Y&&(Q=ca(Q,Y)||Q);const ue=V!=="/"&&V.endsWith("/")?V.length-1:V.length;let te=L===V||!d&&L.startsWith(V)&&L.charAt(ue)==="/",k=Q!=null&&(Q===V||!d&&Q.startsWith(V)&&Q.charAt(V.length)==="/"),w={isActive:te,isPending:k,isTransitioning:q},F=te?o:void 0,X;typeof r=="function"?X=r(w):X=[r,te?"active":null,k?"pending":null,q?"transitioning":null].filter(Boolean).join(" ");let Ae=typeof h=="function"?h(w):h;return T.createElement(ct,{...x,"aria-current":F,className:X,ref:j,style:Ae,to:g,viewTransition:b},typeof p=="function"?p(w):p)});P0.displayName="NavLink";var oy=T.forwardRef(({discover:u="render",fetcherKey:o,navigate:c,reloadDocument:r,replace:d,state:h,method:g=hi,action:b,onSubmit:p,relative:x,preventScrollReset:j,viewTransition:y,unstable_defaultShouldRevalidate:R,...G},_)=>{let{unstable_useTransitions:Y}=T.useContext(_t),q=xy(),V=gy(b,{relative:x}),L=g.toLowerCase()==="get"?"get":"post",Q=typeof b=="string"&&F0.test(b),ue=te=>{if(p&&p(te),te.defaultPrevented)return;te.preventDefault();let k=te.nativeEvent.submitter,w=k?.getAttribute("formmethod")||g,F=()=>q(k||te.currentTarget,{fetcherKey:o,method:w,navigate:c,replace:d,state:h,relative:x,preventScrollReset:j,viewTransition:y,unstable_defaultShouldRevalidate:R});Y&&c!==!1?T.startTransition(()=>F()):F()};return T.createElement("form",{ref:_,method:L,action:V,onSubmit:r?p:ue,...G,"data-discover":!Q&&u==="render"?"true":void 0})});oy.displayName="Form";function fy(u){return`${u} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function I0(u){let o=T.useContext(Vl);return _e(o,fy(u)),o}function dy(u,{target:o,replace:c,state:r,preventScrollReset:d,relative:h,viewTransition:g,unstable_defaultShouldRevalidate:b,unstable_useTransitions:p}={}){let x=tc(),j=La(),y=Zn(u,{relative:h});return T.useCallback(R=>{if(Qg(R,o)){R.preventDefault();let G=c!==void 0?c:Xn(j)===Xn(y),_=()=>x(u,{replace:G,state:r,preventScrollReset:d,relative:h,viewTransition:g,unstable_defaultShouldRevalidate:b});p?T.startTransition(()=>_()):_()}},[j,x,y,c,r,o,u,d,h,g,b,p])}function ic(u){Lt(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let o=T.useRef(Pr(u)),c=T.useRef(!1),r=La(),d=T.useMemo(()=>Vg(r.search,c.current?null:o.current),[r.search]),h=tc(),g=T.useCallback((b,p)=>{const x=Pr(typeof b=="function"?b(new URLSearchParams(d)):b);c.current=!0,h("?"+x,p)},[h,d]);return[d,g]}var my=0,hy=()=>`__${String(++my)}__`;function xy(){let{router:u}=I0("useSubmit"),{basename:o}=T.useContext(_t),c=Dg(),r=u.fetch,d=u.navigate;return T.useCallback(async(h,g={})=>{let{action:b,method:p,encType:x,formData:j,body:y}=kg(h,o);if(g.navigate===!1){let R=g.fetcherKey||hy();await r(R,c,g.action||b,{unstable_defaultShouldRevalidate:g.unstable_defaultShouldRevalidate,preventScrollReset:g.preventScrollReset,formData:j,body:y,formMethod:g.method||p,formEncType:g.encType||x,flushSync:g.flushSync})}else await d(g.action||b,{unstable_defaultShouldRevalidate:g.unstable_defaultShouldRevalidate,preventScrollReset:g.preventScrollReset,formData:j,body:y,formMethod:g.method||p,formEncType:g.encType||x,replace:g.replace,state:g.state,fromRouteId:c,flushSync:g.flushSync,viewTransition:g.viewTransition})},[r,d,o,c])}function gy(u,{relative:o}={}){let{basename:c}=T.useContext(_t),r=T.useContext(Gt);_e(r,"useFormAction must be used inside a RouteContext");let[d]=r.matches.slice(-1),h={...Zn(u||".",{relative:o})},g=La();if(u==null){h.search=g.search;let b=new URLSearchParams(h.search),p=b.getAll("index");if(p.some(j=>j==="")){b.delete("index"),p.filter(y=>y).forEach(y=>b.append("index",y));let j=b.toString();h.search=j?`?${j}`:""}}return(!u||u===".")&&d.route.index&&(h.search=h.search?h.search.replace(/^\?/,"?index&"):"?index"),c!=="/"&&(h.pathname=h.pathname==="/"?c:ra([c,h.pathname])),Xn(h)}function yy(u,{relative:o}={}){let c=T.useContext(X0);_e(c!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=I0("useViewTransitionState"),d=Zn(u,{relative:o});if(!c.isTransitioning)return!1;let h=ca(c.currentLocation.pathname,r)||c.currentLocation.pathname,g=ca(c.nextLocation.pathname,r)||c.nextLocation.pathname;return gi(d.pathname,g)!=null||gi(d.pathname,h)!=null}const em=T.createContext({projects:[],activeProject:null,setActiveProject:()=>{},refreshProjects:()=>{}});function Kn(){return T.useContext(em)}function py(){const[u,o]=T.useState([]),[c,r]=ic(),d=T.useCallback(async()=>{try{const x=await(await fetch("/api/projects")).json();x.ok&&o(x.data||[])}catch{}},[]);T.useEffect(()=>{d()},[d]);const h=c.get("project"),g=h?u.find(p=>p.id===h)||u[0]||null:u[0]||null,b=T.useCallback(p=>{r(x=>(x.set("project",p),x))},[r]);return{projects:u,activeProject:g,setActiveProject:b,refreshProjects:d}}function tm(u){const[o,c]=T.useState(null),[r,d]=T.useState(!0),[h,g]=T.useState(null),[b,p]=T.useState(0),x=T.useCallback(()=>p(j=>j+1),[]);return T.useEffect(()=>{let j=!1;return d(!0),fetch(u).then(y=>{if(!y.ok)throw new Error(`HTTP ${y.status}`);return y.json()}).then(y=>{j||(c(y.data??y),g(null))}).catch(y=>{j||g(String(y.message||y))}).finally(()=>{j||d(!1)}),()=>{j=!0}},[u,b]),{data:o,loading:r,error:h,refetch:x}}function Ge(u){const{activeProject:o}=Kn(),c=u.includes("?")?"&":"?",r=o?`${u}${c}project=${o.id}`:u;return tm(r)}function vi(u){const{url:o="/api/events"}=u,c=T.useRef(null),r=T.useRef(null),d=T.useRef(u);d.current=u;const[h,g]=T.useState("connecting"),b=T.useCallback(()=>{c.current&&c.current.close(),g("connecting");const p=new EventSource(o);c.current=p;const x=["heartbeat","increment-update","analytics-event","cost-update","notification","sync-update","sync-audit","error-detected","config-changed","activity","command-output","command-complete","job-progress"];for(const j of x)p.addEventListener(j,y=>{try{const R=JSON.parse(y.data);d.current.onEvent?.[j]?.(R),d.current.onAnyEvent?.(j,R)}catch{}});p.onopen=()=>{g("connected")},p.onerror=()=>{p.close(),g("disconnected"),r.current=setTimeout(()=>{c.current===p&&b()},3e3)}},[o]);return T.useEffect(()=>(b(),()=>{r.current&&(clearTimeout(r.current),r.current=null),c.current?.close(),c.current=null}),[b]),{status:h}}const vy=[{path:"/",label:"Overview",icon:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-4 0a1 1 0 01-1-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 01-1 1"},{path:"/increments",label:"Increments",icon:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"},{path:"/analytics",label:"Analytics",icon:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"},{path:"/costs",label:"Costs",icon:"M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z"},{path:"/sync",label:"Sync",icon:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"},{path:"/errors",label:"Errors",icon:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4.5c-.77-.833-2.694-.833-3.464 0L3.34 16.5c-.77.833.192 2.5 1.732 2.5z"},{path:"/activity",label:"Activity",icon:"M13 10V3L4 14h7v7l9-11h-7z"},{path:"/notifications",label:"Notifications",icon:"M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9",badge:!0},{path:"/config",label:"Config",icon:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.066 2.573c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.573 1.066c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.066-2.573c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z M15 12a3 3 0 11-6 0 3 3 0 016 0z"},{path:"/plugins",label:"Plugins",icon:"M17 14v6m-3-3h6M6 10h2a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v2a2 2 0 002 2zm10 0h2a2 2 0 002-2V6a2 2 0 00-2-2h-2a2 2 0 00-2 2v2a2 2 0 002 2zM6 20h2a2 2 0 002-2v-2a2 2 0 00-2-2H6a2 2 0 00-2 2v2a2 2 0 002 2z"},{path:"/repos",label:"Repos",icon:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"},{path:"/services",label:"Services",icon:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"}];function by({d:u}){return n.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:u})})}function jy(){const{projects:u,activeProject:o,setActiveProject:c}=Kn(),[r]=ic(),{data:d}=Ge("/api/overview"),[h,g]=T.useState(null),b=T.useCallback(R=>{const G=R;G?.pendingCount!=null&&g(G.pendingCount)},[]),{status:p}=vi({onEvent:{notification:b}}),x=h??d?.notifications?.pendingCount??0,j=r.get("project"),y=R=>j?`${R}?project=${j}`:R;return n.jsxs("aside",{className:"w-56 bg-gray-900 border-r border-gray-800 flex flex-col h-screen sticky top-0",children:[n.jsx("div",{className:"px-4 py-5 border-b border-gray-800",children:n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("div",{className:"w-8 h-8 bg-indigo-500 rounded-lg flex items-center justify-center",children:n.jsx("span",{className:"text-white font-bold text-sm",children:"SW"})}),n.jsxs("div",{children:[n.jsx("div",{className:"text-white font-semibold text-sm",children:"SpecWeave"}),n.jsx("div",{className:"text-gray-500 text-xs",children:"Dashboard"})]})]})}),u.length>0&&n.jsxs("div",{className:"px-3 py-3 border-b border-gray-800",children:[n.jsx("label",{className:"text-[10px] text-gray-500 uppercase tracking-wider mb-1 block",children:"Project"}),n.jsx("select",{value:o?.id||"",onChange:R=>c(R.target.value),className:"w-full bg-gray-800 border border-gray-700 text-gray-300 text-xs rounded-lg px-2 py-1.5 focus:ring-indigo-500 focus:border-indigo-500",children:u.map(R=>n.jsx("option",{value:R.id,children:R.name},R.id))})]}),n.jsx("nav",{className:"flex-1 overflow-y-auto py-3 px-2",children:vy.map(R=>n.jsxs(P0,{to:y(R.path),end:R.path==="/",className:({isActive:G})=>`flex items-center gap-3 px-3 py-2 rounded-lg text-sm mb-0.5 transition-colors ${G?"bg-indigo-500/10 text-indigo-400":"text-gray-400 hover:bg-gray-800 hover:text-gray-200"}`,children:[n.jsx(by,{d:R.icon}),n.jsx("span",{className:"flex-1",children:R.label}),R.badge&&x>0&&n.jsx("span",{className:"min-w-[18px] h-[18px] px-1 bg-rose-500 text-white text-[10px] font-bold rounded-full flex items-center justify-center",children:x>99?"99+":x})]},R.path))}),n.jsx("div",{className:"px-4 py-3 border-t border-gray-800",children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("div",{className:`w-2 h-2 rounded-full ${p==="connected"?"bg-emerald-400 pulse-dot":p==="connecting"?"bg-amber-400 pulse-dot":"bg-gray-500"}`}),n.jsx("span",{className:"text-xs text-gray-500",children:p==="connected"?"Connected":p==="connecting"?"Connecting...":"Disconnected"})]}),n.jsxs("span",{className:"text-[10px] text-gray-600",children:[u.length," project",u.length!==1?"s":""]})]})})]})}function Ny(){const{data:u}=tm("/api/health"),o=u?.projectRoot?.split("/").pop()||"Project",c=u?.uptime?Sy(u.uptime):"...";return n.jsxs("header",{className:"h-14 bg-gray-900/50 backdrop-blur border-b border-gray-800 flex items-center justify-between px-6",children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("h1",{className:"text-gray-200 font-medium text-sm",children:o}),n.jsx("span",{className:"text-gray-600 text-xs",children:"|"}),n.jsxs("span",{className:"text-gray-500 text-xs",children:["Uptime: ",c]})]}),n.jsx("div",{className:"flex items-center gap-4",children:n.jsxs("span",{className:"text-gray-500 text-xs",children:[u?.connections??0," client",(u?.connections??0)!==1?"s":""]})})]})}function Sy(u){if(u<60)return`${Math.floor(u)}s`;if(u<3600)return`${Math.floor(u/60)}m`;const o=Math.floor(u/3600),c=Math.floor(u%3600/60);return`${o}h ${c}m`}const Ey={indigo:"from-indigo-500/10 to-indigo-500/5 border-indigo-500/20",emerald:"from-emerald-500/10 to-emerald-500/5 border-emerald-500/20",amber:"from-amber-500/10 to-amber-500/5 border-amber-500/20",rose:"from-rose-500/10 to-rose-500/5 border-rose-500/20",cyan:"from-cyan-500/10 to-cyan-500/5 border-cyan-500/20"},Ty={indigo:"text-indigo-400",emerald:"text-emerald-400",amber:"text-amber-400",rose:"text-rose-400",cyan:"text-cyan-400"};function le({title:u,value:o,subtitle:c,color:r="indigo"}){return n.jsxs("div",{className:`bg-gradient-to-br ${Ey[r]} border rounded-xl p-4`,children:[n.jsx("div",{className:"text-gray-400 text-xs font-medium uppercase tracking-wider mb-2",children:u}),n.jsx("div",{className:`text-2xl font-bold ${Ty[r]}`,children:o}),c&&n.jsx("div",{className:"text-gray-500 text-xs mt-1",children:c})]})}const Cy={active:"#6366f1",completed:"#10b981",paused:"#f59e0b",planning:"#06b6d4",abandoned:"#ef4444",backlog:"#6b7280",ready_for_review:"#8b5cf6"};function Ay(u){return Cy[u]||"#6b7280"}function zy({segments:u,size:o=160,centerLabel:c,centerValue:r}){const d=u.reduce((p,x)=>p+x.value,0);if(d===0)return n.jsx("div",{className:"flex items-center justify-center",style:{width:o,height:o},children:n.jsx("span",{className:"text-gray-600 text-xs",children:"No data"})});const h=52,g=2*Math.PI*h;let b=0;return n.jsxs("div",{className:"relative inline-flex items-center justify-center",style:{width:o,height:o},children:[n.jsx("svg",{viewBox:"0 0 128 128",className:"w-full h-full -rotate-90",children:u.map((p,x)=>{const y=p.value/d*g,R=b;return b+=y,n.jsx("circle",{cx:"64",cy:"64",r:h,fill:"none",stroke:p.color,strokeWidth:"12",strokeDasharray:`${y} ${g-y}`,strokeDashoffset:-R,className:"transition-all duration-500"},x)})}),n.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:[r!=null&&n.jsx("span",{className:"text-xl font-bold text-white",children:r}),c&&n.jsx("span",{className:"text-[10px] text-gray-500 uppercase tracking-wider",children:c})]})]})}function My(u){return Object.entries(u).filter(([o,c])=>c>0).map(([o,c])=>({label:o,value:c,color:Ay(o)}))}const Ry={default:"bg-gray-800 text-gray-300",success:"bg-emerald-500/15 text-emerald-400",warning:"bg-amber-500/15 text-amber-400",error:"bg-rose-500/15 text-rose-400",info:"bg-cyan-500/15 text-cyan-400"};function he({label:u,variant:o="default"}){return n.jsx("span",{className:`inline-flex items-center px-2 py-0.5 rounded-md text-xs font-medium ${Ry[o]}`,children:u})}function bi(u){switch(u){case"active":case"running":return"info";case"completed":case"success":return"success";case"paused":case"pending":case"planning":return"warning";case"failed":case"abandoned":case"error":return"error";default:return"default"}}function _y({size:u="md"}){const o={sm:"w-4 h-4",md:"w-6 h-6",lg:"w-8 h-8"};return n.jsxs("svg",{className:`${o[u]} animate-spin text-indigo-400`,viewBox:"0 0 24 24",fill:"none",children:[n.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),n.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]})}function bt(){return n.jsx("div",{className:"flex items-center justify-center h-64",children:n.jsx(_y,{size:"lg"})})}function A0(u){switch(u){case"connected":return"success";case"sync_failed":return"warning";case"configured_never_synced":return"info";default:return"default"}}function Oy(u){switch(u){case"connected":return"Connected";case"sync_failed":return"Sync Failed";case"configured_never_synced":return"Ready";case"not_configured":return"Not Configured";default:return u||"Unknown"}}const Jr=u=>u.totalCost===0&&u.sessionCount>0;function Dy(){const{data:u,loading:o,error:c}=Ge("/api/overview"),[r,d]=T.useState([]),{activeProject:h}=Kn(),g=T.useRef(null);T.useEffect(()=>{if(!h||g.current===h.id)return;g.current=h.id;const x=`project=${h.id}`;fetch(`/api/activity/stream?limit=20&${x}`).then(j=>j.json()).then(j=>{j.ok&&Array.isArray(j.data)&&d(j.data)}).catch(()=>{})},[h]);const b=T.useCallback(x=>{d(j=>[x,...j].slice(0,20))},[]);if(vi({onEvent:{activity:b}}),o)return n.jsx(bt,{});if(c)return n.jsxs("div",{className:"p-6 text-rose-400 text-sm",children:["Error: ",c]});if(!u)return null;const p=My(u.project.statusBreakdown);return n.jsxs("div",{className:"p-6 space-y-6",children:[n.jsxs("h2",{className:"text-lg font-semibold text-gray-200",children:[u.project.name||"Project"," Overview"]}),n.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[n.jsx(ct,{to:"/increments?status=active",className:"group",children:n.jsx(le,{title:"Active Increments",value:u.project.activeIncrements,subtitle:`${u.project.totalIncrements} total`,color:"indigo"})}),n.jsx(ct,{to:"/increments?status=completed",className:"group",children:n.jsx(le,{title:"Completed",value:u.project.completedIncrements,subtitle:`${Math.round(u.project.completedIncrements/Math.max(u.project.totalIncrements,1)*100)}% done`,color:"emerald"})}),n.jsx(ct,{to:"/costs",className:"group",children:n.jsx(le,{title:"Total Cost",value:Jr(u.costs)?"$0.00":`$${u.costs.totalCost.toFixed(2)}`,subtitle:Jr(u.costs)?"Max Plan":`${u.costs.sessionCount.toLocaleString()} sessions`,color:"amber"})}),n.jsx(ct,{to:"/analytics",className:"group",children:n.jsx(le,{title:"Events Today",value:u.analytics.last24hEvents,subtitle:`${u.analytics.totalEvents.toLocaleString()} total`,color:"cyan"})})]}),Jr(u.costs)&&n.jsxs("div",{className:"bg-indigo-500/10 border border-indigo-500/20 rounded-xl px-4 py-3 flex items-center gap-3",children:[n.jsx(he,{label:"Max Plan",variant:"info"}),n.jsx("span",{className:"text-xs text-gray-300",children:"API costs included in subscription. Token usage tracked for analytics."})]}),n.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5",children:[n.jsx("h3",{className:"text-sm font-medium text-gray-300 mb-4",children:"Increment Status"}),n.jsx("div",{className:"flex items-center justify-center",children:n.jsx(zy,{segments:p,centerValue:u.project.totalIncrements,centerLabel:"total"})}),n.jsx("div",{className:"flex flex-wrap gap-2 mt-4 justify-center",children:p.map(x=>n.jsxs(ct,{to:`/increments?status=${x.label.toLowerCase()}`,className:"flex items-center gap-1.5 hover:opacity-80 transition-opacity",children:[n.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:x.color}}),n.jsxs("span",{className:"text-xs text-gray-500 hover:text-gray-300",children:[x.label," (",x.value,")"]})]},x.label))})]}),n.jsxs(ct,{to:"/sync",className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5 hover:border-gray-700 transition-colors block",children:[n.jsx("h3",{className:"text-sm font-medium text-gray-300 mb-4",children:"Sync Health"}),n.jsx("div",{className:"space-y-3",children:Object.entries(u.sync.platforms).length===0?n.jsx("p",{className:"text-gray-600 text-xs",children:"No sync platforms configured"}):Object.entries(u.sync.platforms).map(([x,j])=>n.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-800/50 rounded-lg",children:[n.jsxs("div",{children:[n.jsx("span",{className:"text-sm text-gray-300 capitalize",children:x}),j.configDetail&&n.jsx("div",{className:"text-[10px] text-gray-600 mt-0.5",children:j.configDetail}),!j.configDetail&&j.lastImport&&n.jsxs("div",{className:"text-xs text-gray-600 mt-0.5",children:["Last: ",new Date(j.lastImport).toLocaleDateString()]})]}),n.jsx(he,{label:Oy(j.connectionStatus||j.lastSyncResult),variant:A0(j.connectionStatus)!=="default"?A0(j.connectionStatus):bi(j.lastSyncResult||"")})]},x))}),n.jsx("div",{className:"mt-4 pt-4 border-t border-gray-800",children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-xs text-gray-500",children:"Notifications"}),n.jsxs("div",{className:"flex gap-2",children:[u.notifications.criticalCount>0&&n.jsx(ct,{to:"/notifications",onClick:x=>x.stopPropagation(),children:n.jsx(he,{label:`${u.notifications.criticalCount} critical`,variant:"error"})}),n.jsx(ct,{to:"/notifications",onClick:x=>x.stopPropagation(),children:n.jsx(he,{label:`${u.notifications.pendingCount} pending`,variant:u.notifications.pendingCount>0?"warning":"default"})})]})]})})]}),n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx("h3",{className:"text-sm font-medium text-gray-300",children:"Live Activity"}),n.jsx(ct,{to:"/activity",className:"text-[10px] text-indigo-400 hover:text-indigo-300",children:"View all"})]}),n.jsx("div",{className:"space-y-2 max-h-64 overflow-y-auto custom-scrollbar",children:r.length===0?n.jsx("p",{className:"text-gray-600 text-xs",children:"No recent activity"}):r.map((x,j)=>n.jsxs("div",{className:"flex items-start gap-2 py-1 slide-in",children:[n.jsx("div",{className:`w-1.5 h-1.5 rounded-full mt-1.5 ${x.severity==="error"?"bg-rose-400":x.severity==="warning"?"bg-amber-400":"bg-gray-600"}`}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("div",{className:"text-xs text-gray-400 truncate",children:x.title}),n.jsxs("div",{className:"text-[10px] text-gray-600",children:[x.category,x.timestamp&&` · ${wy(x.timestamp)}`]})]})]},j))})]})]}),n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5",children:[n.jsx("h3",{className:"text-sm font-medium text-gray-300 mb-4",children:"Increment Types"}),n.jsx("div",{className:"flex gap-4 flex-wrap",children:Object.entries(u.project.typeBreakdown).map(([x,j])=>n.jsxs(ct,{to:`/increments?type=${x}`,className:"flex items-center gap-2 px-3 py-2 bg-gray-800/50 rounded-lg hover:bg-gray-800/80 transition-colors",children:[n.jsx("span",{className:"text-sm text-gray-300 capitalize",children:x}),n.jsx("span",{className:"text-xs text-gray-500 bg-gray-800 px-2 py-0.5 rounded",children:j})]},x))})]})]})}function wy(u){try{const o=Date.now()-new Date(u).getTime(),c=Math.floor(o/6e4);if(c<1)return"just now";if(c<60)return`${c}m ago`;const r=Math.floor(c/60);return r<24?`${r}h ago`:`${Math.floor(r/24)}d ago`}catch{return""}}function al(u,o=""){const[c,r]=ic(),d=c.get(u)??o,h=T.useCallback(g=>{r(b=>{const p=new URLSearchParams(b);return g&&g!==o?p.set(u,g):p.delete(u),p})},[u,o,r]);return[d,h]}function am({title:u,description:o}){return n.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[n.jsx("div",{className:"w-12 h-12 rounded-full bg-gray-800 flex items-center justify-center mb-4",children:n.jsx("svg",{className:"w-6 h-6 text-gray-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M20 13V6a2 2 0 00-2-2H6a2 2 0 00-2 2v7m16 0v5a2 2 0 01-2 2H6a2 2 0 01-2-2v-5m16 0h-2.586a1 1 0 00-.707.293l-2.414 2.414a1 1 0 01-.707.293h-3.172a1 1 0 01-.707-.293l-2.414-2.414A1 1 0 006.586 13H4"})})}),n.jsx("h3",{className:"text-gray-400 text-sm font-medium",children:u}),o&&n.jsx("p",{className:"text-gray-600 text-xs mt-1 max-w-xs",children:o})]})}function Uy(){const{data:u,loading:o,error:c}=Ge("/api/increments"),[r,d]=al("status","all"),[h,g]=al("type","all"),b=tc();if(o)return n.jsx(bt,{});if(c)return n.jsxs("div",{className:"p-6 text-rose-400 text-sm",children:["Error: ",c]});if(!u)return null;const p=u.increments.filter(y=>!(r!=="all"&&y.status!==r||h!=="all"&&y.type!==h)),x=[...new Set(u.increments.map(y=>y.status))],j=[...new Set(u.increments.map(y=>y.type))];return n.jsxs("div",{className:"p-6 space-y-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("h2",{className:"text-lg font-semibold text-gray-200",children:"Increments"}),n.jsxs("span",{className:"text-sm text-gray-500",children:[u.increments.length," total"]})]}),n.jsxs("div",{className:"space-y-3",children:[n.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[n.jsx("span",{className:"text-xs text-gray-500 w-14",children:"Status:"}),n.jsxs("div",{className:"flex gap-1 bg-gray-900/50 border border-gray-800 rounded-lg p-1",children:[n.jsx(di,{label:"All",active:r==="all",onClick:()=>d("all")}),x.map(y=>n.jsx(di,{label:y,active:r===y,onClick:()=>d(y),count:u.increments.filter(R=>R.status===y).length},y))]})]}),n.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[n.jsx("span",{className:"text-xs text-gray-500 w-14",children:"Type:"}),n.jsxs("div",{className:"flex gap-1 bg-gray-900/50 border border-gray-800 rounded-lg p-1",children:[n.jsx(di,{label:"All",active:h==="all",onClick:()=>g("all")}),j.map(y=>n.jsx(di,{label:y,active:h===y,onClick:()=>g(y),count:u.increments.filter(R=>R.type===y).length},y))]})]}),n.jsxs("span",{className:"text-xs text-gray-500",children:[p.length," matching"]})]}),p.length===0?n.jsx(am,{title:"No increments match filters",description:"Try adjusting your filters"}):n.jsx("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl overflow-hidden",children:n.jsxs("table",{className:"w-full",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"border-b border-gray-800",children:[n.jsx("th",{className:"text-left px-4 py-3 text-xs text-gray-500 font-medium uppercase",children:"ID"}),n.jsx("th",{className:"text-left px-4 py-3 text-xs text-gray-500 font-medium uppercase",children:"Title"}),n.jsx("th",{className:"text-left px-4 py-3 text-xs text-gray-500 font-medium uppercase",children:"Status"}),n.jsx("th",{className:"text-left px-4 py-3 text-xs text-gray-500 font-medium uppercase",children:"Type"}),n.jsx("th",{className:"text-left px-4 py-3 text-xs text-gray-500 font-medium uppercase",children:"Priority"}),n.jsx("th",{className:"text-left px-4 py-3 text-xs text-gray-500 font-medium uppercase",children:"Tasks"}),n.jsx("th",{className:"text-left px-4 py-3 text-xs text-gray-500 font-medium uppercase",children:"ACs"}),n.jsx("th",{className:"text-left px-4 py-3 text-xs text-gray-500 font-medium uppercase",children:"Last Activity"})]})}),n.jsx("tbody",{children:p.map(y=>n.jsxs("tr",{onClick:()=>b(`/increments/${y.id}`),className:"border-b border-gray-800/50 hover:bg-gray-800/30 transition-colors cursor-pointer",children:[n.jsx("td",{className:"px-4 py-3",children:n.jsx("span",{className:"text-xs text-indigo-400 font-mono",children:y.id})}),n.jsx("td",{className:"px-4 py-3",children:n.jsx("span",{className:"text-sm text-gray-300",children:y.title})}),n.jsx("td",{className:"px-4 py-3",children:n.jsx(he,{label:y.status,variant:bi(y.status)})}),n.jsx("td",{className:"px-4 py-3",children:n.jsx("span",{className:"text-xs text-gray-400 capitalize",children:y.type})}),n.jsx("td",{className:"px-4 py-3",children:n.jsx(Ly,{priority:y.priority})}),n.jsx("td",{className:"px-4 py-3",children:n.jsx(z0,{completed:y.tasks.completed,total:y.tasks.total})}),n.jsx("td",{className:"px-4 py-3",children:n.jsx(z0,{completed:y.acs.completed,total:y.acs.total})}),n.jsx("td",{className:"px-4 py-3",children:n.jsx("span",{className:"text-xs text-gray-500",children:y.lastActivity?Hy(y.lastActivity):"-"})})]},y.id))})]})})]})}function di({label:u,active:o,onClick:c,count:r}){return n.jsxs("button",{onClick:c,className:`px-3 py-1 text-xs rounded-md transition-colors capitalize ${o?"bg-gray-700 text-white":"text-gray-400 hover:text-gray-300"}`,children:[u,r!==void 0&&n.jsx("span",{className:"ml-1 text-[10px] text-gray-500",children:r})]})}function z0({completed:u,total:o}){const c=o>0?Math.round(u/o*100):0;return n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("div",{className:"w-16 h-1.5 bg-gray-800 rounded-full overflow-hidden",children:n.jsx("div",{className:"h-full bg-indigo-500 rounded-full transition-all",style:{width:`${c}%`}})}),n.jsxs("span",{className:"text-xs text-gray-500",children:[u,"/",o]})]})}function Ly({priority:u}){const o={P0:"text-rose-400 bg-rose-500/10",P1:"text-amber-400 bg-amber-500/10",P2:"text-cyan-400 bg-cyan-500/10",P3:"text-gray-400 bg-gray-500/10"};return n.jsx("span",{className:`text-xs px-1.5 py-0.5 rounded ${o[u]||o.P2}`,children:u})}function Hy(u){try{const o=new Date(u),r=new Date().getTime()-o.getTime(),d=Math.floor(r/6e4);if(d<1)return"Just now";if(d<60)return`${d}m ago`;const h=Math.floor(d/60);if(h<24)return`${h}h ago`;const g=Math.floor(h/24);return g<7?`${g}d ago`:o.toLocaleDateString()}catch{return u}}function By(){const[u,o]=T.useState("commands"),{data:c,loading:r,error:d}=Ge("/api/analytics/summary"),{data:h,loading:g}=Ge("/api/analytics/skills");if(r||g)return n.jsx(bt,{});if(d)return n.jsxs("div",{className:"p-6 text-rose-400 text-sm",children:["Error: ",d]});if(!c)return null;const b=c.topCommands?.reduce((j,y)=>j+y.count,0)||0,p=c.topSkills?.reduce((j,y)=>j+y.count,0)||0,x=c.topAgents?.reduce((j,y)=>j+y.count,0)||0;return n.jsxs("div",{className:"p-6 space-y-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("h2",{className:"text-lg font-semibold text-gray-200",children:"Analytics"}),n.jsxs("span",{className:"text-sm text-gray-500",children:[c.totalEvents.toLocaleString()," total events"]})]}),n.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[n.jsx(le,{title:"Total Events",value:c.totalEvents.toLocaleString(),subtitle:`${c.successRate}% success rate`,color:"indigo"}),n.jsx(le,{title:"Commands",value:b.toLocaleString(),subtitle:`${c.topCommands?.length||0} unique`,color:"cyan"}),n.jsx(le,{title:"Skills",value:p.toLocaleString(),subtitle:`${c.topSkills?.length||0} unique`,color:"emerald"}),n.jsx(le,{title:"Agents",value:x.toLocaleString(),subtitle:`${c.topAgents?.length||0} unique`,color:"amber"})]}),n.jsx("div",{className:"flex gap-1 bg-gray-900/50 border border-gray-800 rounded-lg p-1",children:[{key:"commands",label:"Commands"},{key:"skills",label:"Skills"},{key:"agents",label:"Agents"},{key:"daily",label:"Daily Trends"}].map(j=>n.jsx("button",{onClick:()=>o(j.key),className:`flex-1 px-3 py-1.5 text-xs rounded-md transition-colors ${u===j.key?"bg-gray-700 text-white":"text-gray-400 hover:text-gray-300"}`,children:j.label},j.key))}),u==="commands"&&n.jsx(qy,{commands:c.topCommands||[]}),u==="skills"&&n.jsx(Yy,{skills:h||[]}),u==="agents"&&n.jsx(Gy,{agents:c.topAgents||[]}),u==="daily"&&n.jsx(Xy,{days:c.dailySummaries||[]})]})}function qy({commands:u}){if(u.length===0)return n.jsx("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-8 text-center",children:n.jsx("p",{className:"text-gray-500 text-sm",children:"No command data available"})});const o=[...u].sort((r,d)=>d.count-r.count),c=o[0]?.count||1;return n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl overflow-hidden",children:[n.jsx("div",{className:"px-5 py-3 border-b border-gray-800",children:n.jsx("h3",{className:"text-sm font-medium text-gray-300",children:"Top Commands"})}),n.jsxs("table",{className:"w-full",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"border-b border-gray-800",children:[n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500 w-12",children:"Rank"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Command"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Usage"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Count"})]})}),n.jsx("tbody",{children:o.map((r,d)=>{const h=Math.max(2,r.count/c*100);return n.jsxs("tr",{className:"border-b border-gray-800/50 hover:bg-gray-800/30",children:[n.jsxs("td",{className:"px-4 py-2.5 text-xs text-gray-600",children:["#",d+1]}),n.jsx("td",{className:"px-4 py-2.5",children:n.jsx("span",{className:"text-sm text-gray-300 font-mono",children:r.name})}),n.jsx("td",{className:"px-4 py-2.5",children:n.jsx("div",{className:"w-full h-1.5 bg-gray-800 rounded-full overflow-hidden",children:n.jsx("div",{className:"h-full rounded-full bg-indigo-500/60 transition-all",style:{width:`${h}%`}})})}),n.jsx("td",{className:"px-4 py-2.5 text-sm font-mono text-gray-400 text-right",children:r.count.toLocaleString()})]},r.name)})})]})]})}function Yy({skills:u}){const o=[...u].sort((c,r)=>r.count-c.count);return o.length===0?n.jsx("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-8 text-center",children:n.jsx("p",{className:"text-gray-500 text-sm",children:"No skill usage data available"})}):n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl overflow-hidden",children:[n.jsx("div",{className:"px-5 py-3 border-b border-gray-800",children:n.jsx("h3",{className:"text-sm font-medium text-gray-300",children:"Skill Usage Leaderboard"})}),n.jsxs("table",{className:"w-full",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"border-b border-gray-800",children:[n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500 w-12",children:"Rank"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Skill Name"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Plugin"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Invocations"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Success Rate"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Last Used"})]})}),n.jsx("tbody",{children:o.map((c,r)=>{const d=c.count>0?Math.round(c.successCount/c.count*100):100,h=d>=90?"success":d>=70?"warning":"error";return n.jsxs("tr",{className:"border-b border-gray-800/50 hover:bg-gray-800/30",children:[n.jsxs("td",{className:"px-4 py-2.5 text-xs text-gray-600",children:["#",r+1]}),n.jsx("td",{className:"px-4 py-2.5",children:n.jsx(ct,{to:`/analytics?skill=${encodeURIComponent(c.name)}`,className:"text-sm text-indigo-400 hover:text-indigo-300 hover:underline font-mono",children:c.name})}),n.jsx("td",{className:"px-4 py-2.5",children:c.plugin&&n.jsx("span",{className:"text-[10px] text-gray-600 bg-gray-800 px-1.5 py-0.5 rounded",children:c.plugin})}),n.jsx("td",{className:"px-4 py-2.5 text-sm font-mono text-gray-400 text-right",children:c.count.toLocaleString()}),n.jsx("td",{className:"px-4 py-2.5 text-right",children:n.jsx(he,{label:`${d}%`,variant:h})}),n.jsx("td",{className:"px-4 py-2.5 text-xs text-gray-600 text-right whitespace-nowrap",children:c.lastUsed?Qy(c.lastUsed):"-"})]},c.name)})})]})]})}function Gy({agents:u}){if(u.length===0)return n.jsx("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-8 text-center",children:n.jsx("p",{className:"text-gray-500 text-sm",children:"No agent data available"})});const o=[...u].sort((r,d)=>d.count-r.count),c=o[0]?.count||1;return n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl overflow-hidden",children:[n.jsx("div",{className:"px-5 py-3 border-b border-gray-800",children:n.jsx("h3",{className:"text-sm font-medium text-gray-300",children:"Top Agents"})}),n.jsxs("table",{className:"w-full",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"border-b border-gray-800",children:[n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500 w-12",children:"Rank"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Agent"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Usage"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Count"})]})}),n.jsx("tbody",{children:o.map((r,d)=>{const h=Math.max(2,r.count/c*100);return n.jsxs("tr",{className:"border-b border-gray-800/50 hover:bg-gray-800/30",children:[n.jsxs("td",{className:"px-4 py-2.5 text-xs text-gray-600",children:["#",d+1]}),n.jsx("td",{className:"px-4 py-2.5",children:n.jsx("span",{className:"text-sm text-gray-300",children:r.name})}),n.jsx("td",{className:"px-4 py-2.5",children:n.jsx("div",{className:"w-full h-1.5 bg-gray-800 rounded-full overflow-hidden",children:n.jsx("div",{className:"h-full rounded-full bg-cyan-500/60 transition-all",style:{width:`${h}%`}})})}),n.jsx("td",{className:"px-4 py-2.5 text-sm font-mono text-gray-400 text-right",children:r.count.toLocaleString()})]},r.name)})})]})]})}function Xy({days:u}){const o=u.slice(-14);if(o.length===0)return n.jsx("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-8 text-center",children:n.jsx("p",{className:"text-gray-500 text-sm",children:"No daily data available"})});const c=Math.max(...o.map(h=>h.totalEvents),1),r=o.reduce((h,g)=>h+g.totalEvents,0),d=Math.round(r/o.length);return n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[n.jsx(le,{title:"Period Total",value:r.toLocaleString(),subtitle:`Last ${o.length} days`,color:"indigo"}),n.jsx(le,{title:"Daily Average",value:d.toLocaleString(),color:"cyan"}),n.jsx(le,{title:"Peak Day",value:c.toLocaleString(),subtitle:o.find(h=>h.totalEvents===c)?.date||"",color:"emerald"})]}),n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5",children:[n.jsxs("h3",{className:"text-sm font-medium text-gray-300 mb-4",children:["Daily Events (Last ",o.length," Days)"]}),n.jsx("div",{className:"flex items-end gap-1.5 h-40",children:o.map(h=>{const g=Math.max(2,h.totalEvents/c*100),b=h.date.slice(5);return n.jsxs("div",{className:"flex-1 flex flex-col items-center gap-1",children:[n.jsx("span",{className:"text-[9px] text-gray-500",children:h.totalEvents}),n.jsx("div",{className:"w-full bg-indigo-500/40 rounded-t hover:bg-indigo-500/60 transition-colors cursor-default",style:{height:`${g}%`},title:`${h.date}: ${h.totalEvents} events`}),n.jsx("span",{className:"text-[8px] text-gray-700",children:b})]},h.date)})})]})]})}function Qy(u){if(!u)return"";try{const o=Date.now()-new Date(u).getTime(),c=Math.floor(o/6e4);if(c<1)return"just now";if(c<60)return`${c}m ago`;const r=Math.floor(c/60);return r<24?`${r}h ago`:`${Math.floor(r/24)}d ago`}catch{return""}}function lm({items:u,maxBars:o=10}){const c=[...u].sort((d,h)=>h.value-d.value).slice(0,o),r=Math.max(...c.map(d=>d.value),1);return n.jsx("div",{className:"space-y-2",children:c.map((d,h)=>n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("span",{className:"text-xs text-gray-400 w-28 truncate text-right",title:d.label,children:d.label}),n.jsx("div",{className:"flex-1 h-5 bg-gray-800 rounded overflow-hidden",children:n.jsx("div",{className:"h-full rounded transition-all duration-500",style:{width:`${d.value/r*100}%`,backgroundColor:d.color||"#6366f1"}})}),n.jsx("span",{className:"text-xs text-gray-500 w-10 text-right",children:d.value})]},h))})}function Vy(){const[u,o]=T.useState("overview"),[c,r]=T.useState(null),{data:d,loading:h,error:g}=Ge("/api/costs/summary");if(h)return n.jsx(bt,{});if(g)return n.jsxs("div",{className:"p-6 text-rose-400 text-sm",children:["Error: ",g]});if(!d)return null;const b=d.sessions||[],p=d.isMaxPlan===!0,x=d.modelBreakdown?Object.entries(d.modelBreakdown).map(([_,Y])=>({model:_,...Y})).sort((_,Y)=>Y.cost-_.cost):Ky(b),j=b.reduce((_,Y)=>_+(Y.inputTokens||0),0),y=b.reduce((_,Y)=>_+(Y.outputTokens||0),0),R=b.reduce((_,Y)=>_+(Y.cacheReadTokens||0),0),G=b.reduce((_,Y)=>_+(Y.cacheWriteTokens||0),0);return n.jsxs("div",{className:"p-6 space-y-6",children:[n.jsx("h2",{className:"text-lg font-semibold text-gray-200",children:"Token Usage & Costs"}),p&&n.jsxs("div",{className:"bg-indigo-500/10 border border-indigo-500/20 rounded-xl px-4 py-3 flex items-center gap-3",children:[n.jsx(he,{label:"Max Plan",variant:"info"}),n.jsx("span",{className:"text-xs text-gray-300",children:"API costs included in subscription. Token usage tracked for analytics."})]}),n.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[n.jsx(le,{title:"Total Cost",value:p?"$0.00":`$${d.totalCost.toFixed(2)}`,subtitle:p?"Included in plan":void 0,color:"amber"}),n.jsx(le,{title:"Cache Savings",value:`$${d.totalSavings.toFixed(2)}`,color:"emerald"}),n.jsx(le,{title:"Total Tokens",value:Xl(d.totalTokens),subtitle:ky(d.totalTokens),color:"indigo"}),n.jsx(le,{title:"Sessions",value:d.sessionCount.toLocaleString(),color:"cyan"})]}),n.jsx("div",{className:"flex gap-1 bg-gray-900/50 border border-gray-800 rounded-lg p-1",children:["overview","sessions"].map(_=>n.jsx("button",{onClick:()=>o(_),className:`flex-1 px-3 py-1.5 text-xs rounded-md transition-colors ${u===_?"bg-gray-700 text-white":"text-gray-400 hover:text-gray-300"}`,children:_==="overview"?"Breakdown":`Sessions (${b.length})`},_))}),u==="overview"&&n.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5",children:[n.jsx("h3",{className:"text-sm font-medium text-gray-300 mb-4",children:"Cost by Model"}),x.length>0?n.jsx(lm,{items:x.map(_=>({label:_.model,value:parseFloat(_.cost.toFixed(2)),color:"#f59e0b"}))}):n.jsx("p",{className:"text-gray-600 text-xs",children:"No model data"})]}),n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5",children:[n.jsx("h3",{className:"text-sm font-medium text-gray-300 mb-4",children:"Token Breakdown"}),n.jsxs("div",{className:"space-y-3",children:[n.jsx(mi,{label:"Input",value:j,total:d.totalTokens,color:"bg-indigo-500"}),n.jsx(mi,{label:"Output",value:y,total:d.totalTokens,color:"bg-cyan-500"}),R>0&&n.jsx(mi,{label:"Cache Read",value:R,total:d.totalTokens,color:"bg-emerald-500"}),G>0&&n.jsx(mi,{label:"Cache Write",value:G,total:d.totalTokens,color:"bg-amber-500"})]})]}),x.length>0&&n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl overflow-hidden lg:col-span-2",children:[n.jsx("div",{className:"px-5 py-3 border-b border-gray-800",children:n.jsx("h3",{className:"text-sm font-medium text-gray-300",children:"Model Details"})}),n.jsxs("table",{className:"w-full",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"border-b border-gray-800",children:[n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Model"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Sessions"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Tokens"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Cost"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Avg/Session"})]})}),n.jsx("tbody",{children:x.map(_=>n.jsxs("tr",{className:"border-b border-gray-800/50 hover:bg-gray-800/30",children:[n.jsx("td",{className:"px-4 py-2 text-sm text-gray-300",children:_.model}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500 text-right",children:_.sessions.toLocaleString()}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500 text-right",children:Xl(_.tokens)}),n.jsxs("td",{className:"px-4 py-2 text-xs text-amber-400 text-right",children:["$",_.cost.toFixed(2)]}),n.jsxs("td",{className:"px-4 py-2 text-xs text-gray-500 text-right",children:["$",_.sessions>0?(_.cost/_.sessions).toFixed(4):"0"]})]},_.model))})]})]})]}),u==="sessions"&&n.jsx(Zy,{sessions:b,expandedSession:c,onToggle:_=>r(c===_?null:_)})]})}function Zy({sessions:u,expandedSession:o,onToggle:c}){return u.length===0?n.jsx("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-8 text-center",children:n.jsx("p",{className:"text-gray-500 text-sm",children:"No session data available"})}):n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl overflow-hidden",children:[n.jsx("div",{className:"px-5 py-3 border-b border-gray-800",children:n.jsx("h3",{className:"text-sm font-medium text-gray-300",children:"Recent Sessions"})}),n.jsxs("table",{className:"w-full",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"border-b border-gray-800",children:[n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500 w-8"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Session"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Model"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Input"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Output"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Cache"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Cost"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Duration"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"When"})]})}),n.jsx("tbody",{children:u.slice(0,50).map(r=>{const d=r.sessionId||"-",h=o===d,g=(r.cacheReadTokens||0)+(r.cacheWriteTokens||0);return n.jsxs(T.Fragment,{children:[n.jsxs("tr",{className:"border-b border-gray-800/50 hover:bg-gray-800/30 cursor-pointer",onClick:()=>c(d),children:[n.jsx("td",{className:"px-4 py-2 text-xs text-gray-600",children:n.jsx("span",{className:`inline-block transition-transform ${h?"rotate-90":""}`,children:"▸"})}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-400 font-mono",children:d.slice(0,8)}),n.jsx("td",{className:"px-4 py-2",children:n.jsx(he,{label:r.model||"unknown",variant:"default"})}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500 text-right",children:Xl(r.inputTokens)}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500 text-right",children:Xl(r.outputTokens)}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500 text-right",children:g>0?Xl(g):"-"}),n.jsxs("td",{className:"px-4 py-2 text-xs text-amber-400 text-right",children:["$",r.cost?.toFixed(4)||"0.0000"]}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500 text-right",children:r.duration?M0(r.duration):"-"}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500",children:$y(r.timestamp)})]}),h&&n.jsx("tr",{className:"border-b border-gray-800/50",children:n.jsx("td",{colSpan:9,className:"px-6 py-3 bg-gray-800/20",children:n.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 text-xs",children:[n.jsxs("div",{children:[n.jsx("span",{className:"text-gray-500 block mb-1",children:"Input Tokens"}),n.jsx("span",{className:"text-gray-300 font-mono",children:r.inputTokens.toLocaleString()})]}),n.jsxs("div",{children:[n.jsx("span",{className:"text-gray-500 block mb-1",children:"Output Tokens"}),n.jsx("span",{className:"text-gray-300 font-mono",children:r.outputTokens.toLocaleString()})]}),n.jsxs("div",{children:[n.jsx("span",{className:"text-gray-500 block mb-1",children:"Cache Write"}),n.jsx("span",{className:"text-gray-300 font-mono",children:(r.cacheWriteTokens||0).toLocaleString()})]}),n.jsxs("div",{children:[n.jsx("span",{className:"text-gray-500 block mb-1",children:"Cache Read"}),n.jsx("span",{className:"text-gray-300 font-mono",children:(r.cacheReadTokens||0).toLocaleString()})]}),n.jsxs("div",{children:[n.jsx("span",{className:"text-gray-500 block mb-1",children:"Cost"}),n.jsxs("span",{className:"text-amber-400 font-mono",children:["$",r.cost?.toFixed(6)||"0"]})]}),r.savings!=null&&r.savings>0&&n.jsxs("div",{children:[n.jsx("span",{className:"text-gray-500 block mb-1",children:"Cache Savings"}),n.jsxs("span",{className:"text-emerald-400 font-mono",children:["$",r.savings.toFixed(6)]})]}),n.jsxs("div",{children:[n.jsx("span",{className:"text-gray-500 block mb-1",children:"Duration"}),n.jsx("span",{className:"text-gray-300",children:r.duration?M0(r.duration):"-"})]}),n.jsxs("div",{children:[n.jsx("span",{className:"text-gray-500 block mb-1",children:"Session ID"}),n.jsx("span",{className:"text-gray-400 font-mono text-[10px]",children:r.sessionId})]})]})})})]},d)})})]})]})}function mi({label:u,value:o,total:c,color:r}){const d=c>0?o/c*100:0,h={"bg-indigo-500":"rgb(99 102 241 / 0.6)","bg-cyan-500":"rgb(6 182 212 / 0.6)","bg-emerald-500":"rgb(16 185 129 / 0.6)","bg-amber-500":"rgb(245 158 11 / 0.6)"};return n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center justify-between mb-1",children:[n.jsx("span",{className:"text-xs text-gray-400",children:u}),n.jsxs("span",{className:"text-xs text-gray-500",children:[Xl(o)," (",d.toFixed(1),"%)"]})]}),n.jsx("div",{className:"h-2 bg-gray-800 rounded-full overflow-hidden",children:n.jsx("div",{className:"h-full rounded-full",style:{width:`${d}%`,backgroundColor:h[r]||r}})})]})}function Ky(u){const o=new Map;for(const c of u){const r=c.model||"unknown",d=o.get(r)||{cost:0,tokens:0,sessions:0};d.cost+=c.cost||0,d.tokens+=(c.inputTokens||0)+(c.outputTokens||0),d.sessions++,o.set(r,d)}return Array.from(o.entries()).map(([c,r])=>({model:c,...r})).sort((c,r)=>r.cost-c.cost)}function Xl(u){return u?u>=1e6?`${(u/1e6).toFixed(1)}M`:u>=1e3?`${(u/1e3).toFixed(1)}K`:String(u):"0"}function ky(u){return u?u.toLocaleString():"0"}function M0(u){if(u<60)return`${u}s`;const o=Math.floor(u/60),c=u%60;return o<60?`${o}m ${c}s`:`${Math.floor(o/60)}h ${o%60}m`}function $y(u){if(!u)return"-";try{const o=Date.now()-new Date(u).getTime(),c=Math.floor(o/6e4);if(c<1)return"just now";if(c<60)return`${c}m ago`;const r=Math.floor(c/60);return r<24?`${r}h ago`:`${Math.floor(r/24)}d ago`}catch{return"-"}}function uc(){const[u,o]=T.useState(!1),[c,r]=T.useState(null),[d,h]=T.useState(null),[g,b]=T.useState([]),[p,x]=T.useState("idle"),j=T.useRef(null),y=T.useRef(null);vi({onEvent:{"command-output":_=>{const Y=_;y.current&&Y.commandId===y.current&&(Y.line&&b(q=>[...q,Y.line]),Y.lines&&b(q=>[...q,...Y.lines]))},"command-complete":_=>{const Y=_;y.current&&Y.commandId===y.current&&(j.current&&(clearTimeout(j.current),j.current=null),o(!1),Y.success?(x("success"),b(q=>[...q,"Command completed successfully."])):(x("error"),h(Y.error||"Command failed"),b(q=>[...q,`Error: ${Y.error||"Command failed"}`])),y.current=null)}}}),T.useEffect(()=>()=>{j.current&&clearTimeout(j.current)},[]);const R=T.useCallback(async _=>{o(!0),h(null),b([`> specweave ${_}`]),x("running");try{const q=await(await fetch(`/api/commands/${_}`,{method:"POST"})).json();return q.ok?(r(q.data),y.current=q.data?.id||null,j.current=setTimeout(()=>{y.current&&(y.current=null,o(!1),x("error"),h("Command timed out after 60 seconds"),b(V=>[...V,"Timed out after 60 seconds."]))},6e4),q.data):(h(q.error||"Command failed"),x("error"),b(V=>[...V,`Error: ${q.error||"Command failed"}`]),o(!1),null)}catch(Y){return h(String(Y)),x("error"),b(q=>[...q,`Error: ${String(Y)}`]),o(!1),null}},[]),G=T.useCallback(()=>{o(!1),r(null),h(null),b([]),x("idle"),y.current=null,j.current&&(clearTimeout(j.current),j.current=null)},[]);return{execute:R,running:u,result:c,error:d,output:g,status:p,reset:G}}function Jy(u){switch(u){case"connected":return"success";case"sync_failed":return"warning";case"configured_never_synced":return"info";default:return"default"}}function Wy(u){switch(u){case"connected":return"Connected";case"sync_failed":return"Sync Failed";case"configured_never_synced":return"Ready";case"not_configured":return"Not Configured";default:return u||"Unknown"}}function Fy(){const[u,o]=T.useState("health"),{data:c,loading:r,error:d}=Ge("/api/sync/status"),{data:h,loading:g}=Ge("/api/sync/audit?limit=100"),{data:b,loading:p}=Ge("/api/sync/audit/summary"),{execute:x,running:j}=uc();if(r||g||p)return n.jsx(bt,{});if(d)return n.jsxs("div",{className:"p-6 text-rose-400 text-sm",children:["Error: ",d]});if(!c)return null;const y=Object.entries(c.platforms).filter(([q])=>["github","jira","ado"].includes(q)),R=h?.length||0,G=h?.filter(q=>q.result==="error").length||0,_=h?.filter(q=>q.conflict)||[],Y=y.filter(([,q])=>q.connectionStatus==="connected").length;return n.jsxs("div",{className:"p-6 space-y-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("h2",{className:"text-lg font-semibold text-gray-200",children:"Sync Health"}),n.jsx("button",{onClick:()=>x("sync-push"),disabled:j,className:"px-3 py-1.5 bg-indigo-600 hover:bg-indigo-500 disabled:opacity-50 text-white text-xs rounded-lg transition-colors",children:j?"Syncing...":"Sync Now"})]}),n.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[n.jsx(le,{title:"Platforms",value:y.length,subtitle:`${Y} connected`,color:"indigo"}),n.jsx(le,{title:"Audit Entries",value:R,color:"cyan"}),n.jsx(le,{title:"Errors",value:G,color:"rose"}),n.jsx(le,{title:"Conflicts",value:_.length,color:"amber"})]}),n.jsx("div",{className:"flex gap-1 bg-gray-900/50 border border-gray-800 rounded-lg p-1",children:["health","audit","conflicts"].map(q=>n.jsx("button",{onClick:()=>o(q),className:`flex-1 px-3 py-1.5 text-xs rounded-md transition-colors ${u===q?"bg-gray-700 text-white":"text-gray-400 hover:text-gray-300"}`,children:q==="health"?"Platform Health":q==="audit"?"Audit Log":`Conflicts (${_.length})`},q))}),u==="health"&&n.jsx(n.Fragment,{children:y.length===0?n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-8 text-center",children:[n.jsx("p",{className:"text-gray-500 text-sm",children:"No sync platforms configured"}),n.jsx("p",{className:"text-gray-600 text-xs mt-1",children:"Configure GitHub, JIRA, or ADO in your config"})]}):n.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:y.map(([q,V])=>{const L=b?.[q],Q=V.connectionStatus||"unknown";return n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5",children:[n.jsxs("div",{className:"flex items-center justify-between mb-3",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(nm,{platform:q}),n.jsxs("div",{children:[n.jsx("span",{className:"text-sm font-medium text-gray-300 capitalize",children:q}),V.configDetail&&n.jsx("div",{className:"text-[10px] text-gray-600 mt-0.5",children:V.configDetail})]})]}),n.jsx(he,{label:Wy(Q),variant:Jy(Q)})]}),V.diagnosticMessage&&n.jsx("div",{className:"text-xs text-gray-500 mb-3 p-2 bg-gray-800/30 rounded-lg",children:V.diagnosticMessage}),Q==="not_configured"&&n.jsx(ct,{to:"/config",className:"block text-center text-xs text-indigo-400 hover:text-indigo-300 py-2 border border-gray-800 rounded-lg hover:border-indigo-500/30 transition-colors",children:"Configure in Settings"}),Q==="configured_never_synced"&&n.jsx("button",{onClick:()=>x("sync-push"),disabled:j,className:"w-full text-xs text-indigo-400 hover:text-indigo-300 py-2 border border-gray-800 rounded-lg hover:border-indigo-500/30 transition-colors disabled:opacity-50",children:j?"Syncing...":"Run First Sync"}),Q==="sync_failed"&&n.jsx("button",{onClick:()=>x("sync-push"),disabled:j,className:"w-full text-xs text-amber-400 hover:text-amber-300 py-2 border border-amber-500/20 rounded-lg hover:border-amber-500/40 transition-colors disabled:opacity-50",children:j?"Retrying...":"Retry Sync"}),n.jsxs("div",{className:"space-y-2 mt-3",children:[V.lastImport&&n.jsx(Gl,{label:"Last Import",value:new Date(V.lastImport).toLocaleString()}),Q==="connected"&&!V.lastImport&&n.jsx(Gl,{label:"Status",value:"Connected, no imports yet"}),V.lastImportCount!=null&&n.jsx(Gl,{label:"Items Imported",value:V.lastImportCount.toLocaleString()}),V.lastSkippedCount!=null&&V.lastSkippedCount>0&&n.jsx(Gl,{label:"Skipped",value:V.lastSkippedCount.toLocaleString()}),L&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"border-t border-gray-800 my-2"}),n.jsx(Gl,{label:"Total Ops",value:L.total.toLocaleString()}),n.jsx(Gl,{label:"Success",value:L.success.toLocaleString()}),L.errors>0&&n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-xs text-gray-500",children:"Errors"}),n.jsx(he,{label:String(L.errors),variant:"error"})]})]})]})]},q)})})}),u==="audit"&&n.jsx(R0,{entries:h||[]}),u==="conflicts"&&n.jsx(R0,{entries:_}),c.lastUpdated&&n.jsxs("p",{className:"text-xs text-gray-600",children:["Last metadata update: ",new Date(c.lastUpdated).toLocaleString()]})]})}function R0({entries:u}){if(u.length===0)return n.jsx("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-8 text-center",children:n.jsx("p",{className:"text-gray-500 text-sm",children:"No audit entries"})});const o={success:"success",error:"error",denied:"warning",skipped:"default"};return n.jsx("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl overflow-hidden",children:n.jsxs("table",{className:"w-full",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"border-b border-gray-800",children:[n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Time"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Platform"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Operation"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Item"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Direction"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Result"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Duration"})]})}),n.jsx("tbody",{children:u.map((c,r)=>n.jsxs("tr",{className:"border-b border-gray-800/50 hover:bg-gray-800/30",children:[n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500",children:Py(c.timestamp)}),n.jsx("td",{className:"px-4 py-2",children:n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx(nm,{platform:c.platform}),n.jsx("span",{className:"text-xs text-gray-400 capitalize",children:c.platform})]})}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-400",children:c.operation}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500 font-mono max-w-[120px] truncate",children:c.itemId||"-"}),n.jsx("td",{className:"px-4 py-2",children:n.jsx(he,{label:c.direction,variant:c.direction==="push"?"info":"default"})}),n.jsx("td",{className:"px-4 py-2",children:n.jsx(he,{label:c.result,variant:o[c.result]||"default"})}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-600 text-right",children:c.duration?`${c.duration}ms`:"-"})]},r))})]})})}function Gl({label:u,value:o}){return n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-xs text-gray-500",children:u}),n.jsx("span",{className:"text-xs text-gray-400",children:o})]})}function nm({platform:u}){const o={github:"bg-gray-700",jira:"bg-blue-700",ado:"bg-blue-600"};return n.jsx("div",{className:`w-5 h-5 rounded ${o[u]||"bg-gray-700"} flex items-center justify-center`,children:n.jsx("span",{className:"text-[9px] text-white font-bold",children:u[0]?.toUpperCase()})})}function Py(u){if(!u)return"-";try{const o=Date.now()-new Date(u).getTime(),c=Math.floor(o/6e4);if(c<1)return"just now";if(c<60)return`${c}m ago`;const r=Math.floor(c/60);return r<24?`${r}h ago`:`${Math.floor(r/24)}d ago`}catch{return"-"}}const Iy={prompt_too_long:"error",api_error:"warning",tool_failure:"info",hook_error:"default",rate_limit:"warning",unknown:"default"};function ep(){const[u,o]=al("tab","groups"),[c,r]=al("type",""),[d,h]=al("session",""),{data:g,loading:b}=Ge("/api/errors/groups"),{data:p,loading:x}=Ge("/api/errors/recent?limit=100"),{data:j,loading:y}=Ge("/api/errors/sessions?limit=30");if(b||x||y)return n.jsx(bt,{});const R=p?.length||0,G=g?.length||0,_=new Set(p?.map(w=>w.sessionId)).size,Y=g?.[0]?.type||"-",q=d?j?.find(w=>w.sessionId===d):null,V=c?(p||[]).filter(w=>w.type===c):p||[],L=c?(j||[]).filter(w=>w.errors.some(F=>F.type===c)):j||[],Q=w=>{r(w),o("sessions"),h("")},ue=w=>{o(w),h("")},te=w=>{h(w)},k=()=>{h("")};return n.jsxs("div",{className:"p-6 space-y-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("h2",{className:"text-lg font-semibold text-gray-200",children:"Error Tracing"}),n.jsx("span",{className:"text-xs text-gray-500",children:"New Relic-style error investigation"})]}),n.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[n.jsx(le,{title:"Total Errors",value:R,color:"rose"}),n.jsx(le,{title:"Error Types",value:G,color:"amber"}),n.jsx(le,{title:"Affected Sessions",value:_,color:"indigo"}),n.jsx(le,{title:"Most Common",value:Y,color:"cyan"})]}),n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("div",{className:"flex gap-1 bg-gray-900/50 border border-gray-800 rounded-lg p-1",children:["groups","timeline","sessions"].map(w=>n.jsx("button",{onClick:()=>ue(w),className:`flex-1 px-3 py-1.5 text-xs rounded-md transition-colors ${u===w?"bg-gray-700 text-white":"text-gray-400 hover:text-gray-300"}`,children:w==="groups"?"Error Groups":w==="timeline"?"Timeline":"Sessions"},w))}),c&&n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx(he,{label:`type: ${c.replace(/_/g," ")}`,variant:"info"}),n.jsx("button",{onClick:()=>r(""),className:"text-xs text-gray-500 hover:text-gray-300 transition-colors",children:"clear"})]})]}),d&&q&&n.jsx(np,{session:q,onClose:k}),!d&&u==="groups"&&n.jsx(tp,{groups:g||[],onGroupClick:Q}),!d&&u==="timeline"&&n.jsx(ap,{errors:V,onSessionClick:te}),!d&&u==="sessions"&&n.jsx(lp,{sessions:L,onSelect:te}),R===0&&!d&&n.jsx(am,{title:"No errors detected",description:"Claude Code session logs are clean"})]})}function tp({groups:u,onGroupClick:o}){return u.length===0?null:n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl overflow-hidden",children:[n.jsx("div",{className:"px-5 py-3 border-b border-gray-800",children:n.jsx("h3",{className:"text-sm font-medium text-gray-300",children:"Error Groups"})}),n.jsxs("table",{className:"w-full",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"border-b border-gray-800",children:[n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Type"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Count"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Sessions"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Last Seen"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Sample Message"})]})}),n.jsx("tbody",{children:u.map(c=>n.jsxs("tr",{className:"border-b border-gray-800/50 hover:bg-gray-800/30",children:[n.jsx("td",{className:"px-4 py-2",children:n.jsx(he,{label:c.type.replace(/_/g," "),variant:Iy[c.type]||"default"})}),n.jsx("td",{className:"px-4 py-2 text-right",children:n.jsx("button",{onClick:()=>o(c.type),className:"text-sm text-indigo-400 hover:text-indigo-300 font-mono transition-colors",title:"View sessions with this error type",children:c.count})}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500 text-right",children:c.sessions}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500",children:ji(c.lastSeen)}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500 max-w-xs truncate",children:c.recentMessages[0]||"-"})]},c.type))})]})]})}function ap({errors:u,onSessionClick:o}){if(u.length===0)return null;const c={prompt_too_long:"bg-rose-400",api_error:"bg-amber-400",tool_failure:"bg-blue-400",hook_error:"bg-gray-400",rate_limit:"bg-amber-400",unknown:"bg-gray-500"};return n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5",children:[n.jsx("h3",{className:"text-sm font-medium text-gray-300 mb-4",children:"Error Timeline"}),n.jsx("div",{className:"space-y-1 max-h-[500px] overflow-y-auto custom-scrollbar",children:u.map((r,d)=>n.jsxs("div",{className:"flex items-start gap-3 py-2 px-2 hover:bg-gray-800/30 rounded cursor-pointer",onClick:()=>o(r.sessionId),children:[n.jsxs("div",{className:"flex flex-col items-center mt-1",children:[n.jsx("div",{className:`w-2 h-2 rounded-full ${c[r.type]||"bg-gray-500"}`}),d<u.length-1&&n.jsx("div",{className:"w-px h-full bg-gray-800 mt-1"})]}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{className:"text-xs text-gray-400 font-mono",children:r.type.replace(/_/g," ")}),n.jsx("span",{className:"text-[10px] text-gray-600",children:ji(r.timestamp)})]}),n.jsx("div",{className:"text-xs text-gray-500 truncate mt-0.5",children:r.message}),n.jsxs("div",{className:"text-[10px] text-gray-700 font-mono mt-0.5",children:["Session: ",r.sessionId.slice(0,8)]})]})]},d))})]})}function lp({sessions:u,onSelect:o}){return u.length===0?null:n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl overflow-hidden",children:[n.jsx("div",{className:"px-5 py-3 border-b border-gray-800",children:n.jsx("h3",{className:"text-sm font-medium text-gray-300",children:"Recent Sessions"})}),n.jsxs("table",{className:"w-full",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"border-b border-gray-800",children:[n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Session"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Branch"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Messages"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Tool Calls"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Errors"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Started"})]})}),n.jsx("tbody",{children:u.map(c=>n.jsxs("tr",{className:"border-b border-gray-800/50 hover:bg-gray-800/30 cursor-pointer",onClick:()=>o(c.sessionId),children:[n.jsx("td",{className:"px-4 py-2 text-xs text-gray-400 font-mono",children:c.sessionId.slice(0,8)}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500",children:c.gitBranch||"-"}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500 text-right",children:c.messageCount}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500 text-right",children:c.toolCallCount}),n.jsx("td",{className:"px-4 py-2 text-right",children:c.errors.length>0?n.jsx(he,{label:String(c.errors.length),variant:"error"}):n.jsx("span",{className:"text-xs text-gray-600",children:"0"})}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500",children:ji(c.startTime)})]},c.sessionId))})]})]})}function np({session:u,onClose:o}){return n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsxs("div",{children:[n.jsxs("h3",{className:"text-sm font-medium text-gray-300",children:["Session: ",n.jsx("span",{className:"font-mono",children:u.sessionId.slice(0,12)})]}),n.jsxs("div",{className:"text-[10px] text-gray-600 mt-0.5",children:["v",u.version," | ",u.gitBranch," | ",u.messageCount," messages | ",u.toolCallCount," tool calls"]})]}),n.jsx("button",{onClick:o,className:"px-2 py-1 text-xs text-gray-400 hover:text-white hover:bg-gray-700 rounded transition-colors",children:"Back"})]}),n.jsxs("div",{className:"flex gap-3 mb-4",children:[n.jsxs("div",{className:"text-xs text-gray-500",children:["Started: ",new Date(u.startTime).toLocaleString()]}),u.endTime&&n.jsxs("div",{className:"text-xs text-gray-500",children:["Ended: ",new Date(u.endTime).toLocaleString()]})]}),u.errors.length===0?n.jsx("p",{className:"text-gray-600 text-xs",children:"No errors in this session"}):n.jsx("div",{className:"space-y-2",children:u.errors.map((c,r)=>n.jsxs("div",{className:"p-3 bg-gray-800/50 rounded-lg border-l-2 border-rose-500/50",children:[n.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[n.jsx(he,{label:c.type.replace(/_/g," "),variant:"error"}),n.jsx("span",{className:"text-[10px] text-gray-600",children:ji(c.timestamp)})]}),n.jsx("div",{className:"text-xs text-gray-400 break-words",children:c.message}),c.context?.messageIndex!=null&&n.jsxs("div",{className:"text-[10px] text-gray-600 mt-1",children:["At message #",c.context.messageIndex,c.context.lastToolCall&&` | Tool: ${c.context.lastToolCall.slice(0,20)}`]})]},r))})]})}function ji(u){if(!u)return"-";const o=Date.now()-new Date(u).getTime(),c=Math.floor(o/6e4);if(c<1)return"just now";if(c<60)return`${c}m ago`;const r=Math.floor(c/60);return r<24?`${r}h ago`:`${Math.floor(r/24)}d ago`}const sp=[{value:"all",label:"All"},{value:"command",label:"Commands"},{value:"hook",label:"Hooks"},{value:"notification",label:"Notifications"},{value:"cost",label:"Cost"}],ip=[{value:"all",label:"All Levels"},{value:"error",label:"Errors"},{value:"warning",label:"Warnings"},{value:"info",label:"Info"}];function up(){const[u,o]=al("category","all"),[c,r]=al("severity","all"),d=u||"all",h=c||"all",[g,b]=T.useState([]),[p,x]=T.useState(200),[j,y]=T.useState(null),R=new URLSearchParams;R.set("limit",String(p)),d!=="all"&&R.set("categories",d),h!=="all"&&R.set("severity",h);const{data:G,loading:_}=Ge(`/api/activity/stream?${R.toString()}`),Y=T.useCallback(X=>{b(Ae=>[X,...Ae].slice(0,50))},[]);if(vi({onEvent:{activity:Y}}),_)return n.jsx(bt,{});const q=[...g,...G||[]],V=new Set,L=[];for(const X of q){const Ae=`${X.timestamp}:${X.title}`;V.has(Ae)||(V.add(Ae),L.push(X))}const Q=L.filter(X=>!(d!=="all"&&X.category!==d||h!=="all"&&X.severity!==h)),ue=L.filter(X=>X.severity==="error").length,te=L.filter(X=>X.severity==="warning").length,k=new Set(L.map(X=>X.source)),w=X=>{y(Ae=>Ae===X?null:X)},F=()=>{x(X=>X+200)};return n.jsxs("div",{className:"p-6 space-y-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("h2",{className:"text-lg font-semibold text-gray-200",children:"Activity Stream"}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("div",{className:"w-2 h-2 rounded-full bg-emerald-400 pulse-dot"}),n.jsx("span",{className:"text-xs text-gray-500",children:"Live"})]})]}),n.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[n.jsx(le,{title:"Total Events",value:L.length,color:"indigo"}),n.jsx(le,{title:"Errors",value:ue,color:"rose"}),n.jsx(le,{title:"Warnings",value:te,color:"amber"}),n.jsx(le,{title:"Sources",value:k.size,color:"cyan"})]}),n.jsxs("div",{className:"flex flex-wrap gap-4",children:[n.jsx("div",{className:"flex gap-1 bg-gray-900/50 border border-gray-800 rounded-lg p-1",children:sp.map(X=>n.jsx("button",{onClick:()=>o(X.value),className:`px-3 py-1 text-xs rounded-md transition-colors ${d===X.value?"bg-gray-700 text-white":"text-gray-400 hover:text-gray-300"}`,children:X.label},X.value))}),n.jsx("div",{className:"flex gap-1 bg-gray-900/50 border border-gray-800 rounded-lg p-1",children:ip.map(X=>n.jsx("button",{onClick:()=>r(X.value),className:`px-3 py-1 text-xs rounded-md transition-colors ${h===X.value?"bg-gray-700 text-white":"text-gray-400 hover:text-gray-300"}`,children:X.label},X.value))}),n.jsxs("span",{className:"text-xs text-gray-500 self-center",children:[Q.length," events"]})]}),n.jsx("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl divide-y divide-gray-800/50",children:Q.length===0?n.jsxs("div",{className:"p-8 text-center",children:[n.jsx("p",{className:"text-gray-500 text-sm",children:"No events match filters"}),n.jsx("p",{className:"text-gray-600 text-xs mt-1",children:"Try adjusting category or severity filters"})]}):n.jsxs(n.Fragment,{children:[Q.slice(0,p).map((X,Ae)=>{const Ke=`${X.timestamp}-${Ae}`,Qe=j===Ke;return n.jsx(rp,{event:X,isExpanded:Qe,onToggle:()=>w(Ke)},Ke)}),Q.length>=p&&n.jsx("div",{className:"p-4 text-center",children:n.jsx("button",{onClick:F,className:"px-4 py-2 text-xs text-indigo-400 hover:text-indigo-300 border border-indigo-500/30 rounded-lg transition-colors",children:"Load more events"})})]})})]})}function rp({event:u,isExpanded:o,onToggle:c}){const r=u.severity==="error"?"bg-rose-400":u.severity==="warning"?"bg-amber-400":"bg-gray-600",d={command:"M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z",hook:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101",notification:"M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9",cost:"M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1",sync:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581"},h=u.detail||u.metadata&&Object.keys(u.metadata).length>0;return n.jsxs("div",{children:[n.jsxs("div",{className:`px-4 py-3 flex items-start gap-3 transition-colors ${h?"cursor-pointer hover:bg-gray-800/20":""}`,onClick:h?c:void 0,children:[n.jsx("div",{className:`w-1.5 h-1.5 rounded-full mt-2 flex-shrink-0 ${r}`}),n.jsx("div",{className:"w-5 h-5 flex-shrink-0 mt-0.5 text-gray-500",children:n.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:d[u.category]||d.command})})}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{className:"text-sm text-gray-300",children:u.title}),n.jsx(he,{label:u.category,variant:bi(u.severity)})]}),u.detail&&!o&&n.jsx("p",{className:"text-xs text-gray-500 mt-0.5 truncate",children:u.detail}),u.source&&n.jsxs("span",{className:"text-[10px] text-gray-600 mt-0.5 block",children:["via ",u.source]})]}),n.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[u.timestamp&&n.jsx("span",{className:"text-[10px] text-gray-600 whitespace-nowrap",children:cp(u.timestamp)}),h&&n.jsx("svg",{className:`w-4 h-4 text-gray-600 transition-transform duration-200 ${o?"rotate-180":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})]}),o&&n.jsxs("div",{className:"px-4 pb-3 ml-10 space-y-2",children:[u.detail&&n.jsxs("div",{className:"bg-gray-800/50 rounded p-3",children:[n.jsx("span",{className:"text-[10px] text-gray-500 uppercase block mb-1",children:"Detail"}),n.jsx("p",{className:"text-xs text-gray-300 whitespace-pre-wrap",children:u.detail})]}),u.metadata&&Object.keys(u.metadata).length>0&&n.jsxs("div",{className:"bg-gray-800/50 rounded p-3",children:[n.jsx("span",{className:"text-[10px] text-gray-500 uppercase block mb-1",children:"Metadata"}),n.jsx("pre",{className:"text-xs text-gray-400 font-mono whitespace-pre-wrap overflow-x-auto",children:JSON.stringify(u.metadata,null,2)})]})]})]})}function cp(u){if(!u)return"-";const o=Date.now()-new Date(u).getTime(),c=Math.floor(o/6e4);if(c<1)return"just now";if(c<60)return`${c}m ago`;const r=Math.floor(c/60);return r<24?`${r}h ago`:`${Math.floor(r/24)}d ago`}function op(){const{data:u,loading:o,error:c,refetch:r}=Ge("/api/config"),{activeProject:d}=Kn(),[h,g]=T.useState(new Set),[b,p]=T.useState({}),[x,j]=T.useState(!1),[y,R]=T.useState(null),[G,_]=T.useState([]);if(o)return n.jsx(bt,{});if(c)return n.jsxs("div",{className:"p-6 text-rose-400 text-sm",children:["Error: ",c]});if(!u)return null;const Y=k=>{g(w=>{const F=new Set(w);return F.has(k)?F.delete(k):F.add(k),F})},q=Object.keys(b).length>0,V=(k,w)=>{p(F=>({...F,[k]:w})),_(F=>F.filter(X=>X.path!==k))},L=async()=>{if(q){j(!0),R(null),_([]);try{const k={};for(const[Qe,Xt]of Object.entries(b))dp(k,Qe,Xt);const w=d?`?project=${d.id}`:"",X=await(await fetch(`/api/config/validate${w}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(k)})).json();if(X.errors&&X.errors.length>0){_(X.errors),R("Validation failed. Fix errors before saving."),j(!1);return}const Ke=await(await fetch(`/api/config${w}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(k)})).json();Ke.ok?(R("Saved successfully"),p({}),_([]),r(),setTimeout(()=>R(null),3e3)):R(`Error: ${Ke.error}`)}catch(k){R(`Error: ${k}`)}finally{j(!1)}}},Q=()=>{p({}),R(null),_([])},ue=Object.entries(u).filter(([k,w])=>typeof w=="object"&&w!==null),te=Object.entries(u).filter(([k,w])=>typeof w!="object"||w===null);return n.jsxs("div",{className:"p-6 space-y-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsx("h2",{className:"text-lg font-semibold text-gray-200",children:"Configuration"}),n.jsx("span",{className:"text-xs text-gray-500",children:".specweave/config.json"})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[y&&n.jsx("span",{className:`text-xs ${y.startsWith("Error")||y.startsWith("Validation")?"text-rose-400":"text-emerald-400"}`,children:y}),q&&n.jsxs(n.Fragment,{children:[n.jsx(he,{label:`${Object.keys(b).length} changes`,variant:"warning"}),n.jsx("button",{onClick:Q,className:"px-3 py-1.5 text-xs text-gray-400 hover:text-gray-200 border border-gray-700 rounded-lg transition-colors",children:"Discard"}),n.jsx("button",{onClick:L,disabled:x,className:"px-3 py-1.5 bg-indigo-600 hover:bg-indigo-500 disabled:opacity-50 text-white text-xs rounded-lg transition-colors",children:x?"Saving...":"Save Changes"})]})]})]}),y&&!q&&y==="Saved successfully"&&n.jsxs("div",{className:"bg-emerald-500/10 border border-emerald-500/30 rounded-lg px-4 py-2 flex items-center gap-2",children:[n.jsx("div",{className:"w-2 h-2 rounded-full bg-emerald-400"}),n.jsx("span",{className:"text-xs text-emerald-400",children:"Configuration saved successfully"})]}),G.length>0&&n.jsxs("div",{className:"bg-rose-500/10 border border-rose-500/30 rounded-lg px-4 py-3 space-y-1",children:[n.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[n.jsx("div",{className:"w-2 h-2 rounded-full bg-rose-400"}),n.jsx("span",{className:"text-xs text-rose-400 font-medium",children:"Validation errors"})]}),G.map((k,w)=>n.jsxs("div",{className:"text-xs text-rose-300 pl-4",children:[n.jsx("span",{className:"font-mono text-rose-400",children:k.path}),": ",k.message]},w))]}),te.length>0&&n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5",children:[n.jsx("h3",{className:"text-sm font-medium text-gray-300 mb-3",children:"General"}),n.jsx("div",{className:"space-y-3",children:te.map(([k,w])=>n.jsx(im,{path:k,label:k,value:b[k]!==void 0?b[k]:w,original:w,onChange:F=>V(k,F),edited:b[k]!==void 0,validationError:G.find(F=>F.path===k)?.message},k))})]}),ue.map(([k,w])=>n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl overflow-hidden",children:[n.jsxs("button",{onClick:()=>Y(k),className:"w-full px-5 py-3 flex items-center justify-between hover:bg-gray-800/30 transition-colors",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("h3",{className:"text-sm font-medium text-gray-300 capitalize",children:k}),_0(b,k)>0&&n.jsx(he,{label:`${_0(b,k)} edited`,variant:"warning"}),G.some(F=>F.path.startsWith(k+"."))&&n.jsx(he,{label:"errors",variant:"error"})]}),n.jsx("svg",{className:`w-4 h-4 text-gray-500 transition-transform duration-200 ${h.has(k)?"rotate-180":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),h.has(k)&&n.jsx("div",{className:"px-5 py-3 border-t border-gray-800",children:n.jsx(sm,{data:w,path:k,edits:b,onChange:V,validationErrors:G,depth:0})})]},k))]})}function sm({data:u,path:o,edits:c,onChange:r,validationErrors:d,depth:h}){return h>4?n.jsx("span",{className:"text-xs text-gray-600",children:"..."}):n.jsx("div",{className:"space-y-3",style:{marginLeft:h>0?16:0},children:Object.entries(u).map(([g,b])=>{const p=`${o}.${g}`;return b&&typeof b=="object"&&!Array.isArray(b)?n.jsxs("div",{children:[n.jsx("span",{className:"text-xs text-gray-400 font-mono font-medium",children:g}),n.jsx(sm,{data:b,path:p,edits:c,onChange:r,validationErrors:d,depth:h+1})]},g):n.jsx(im,{path:p,label:g,value:c[p]!==void 0?c[p]:b,original:b,onChange:x=>r(p,x),edited:c[p]!==void 0,validationError:d.find(x=>x.path===p)?.message},g)})})}function im({path:u,label:o,value:c,original:r,onChange:d,edited:h,validationError:g}){return typeof r=="boolean"||typeof c=="boolean"?n.jsxs("div",{className:"py-1",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-xs text-gray-500 font-mono",children:o}),n.jsx("button",{onClick:()=>d(!c),className:`relative w-9 h-5 rounded-full transition-colors ${c?"bg-indigo-600":"bg-gray-700"} ${h?"ring-1 ring-amber-500/50":""}`,children:n.jsx("div",{className:`absolute top-0.5 w-4 h-4 bg-white rounded-full transition-transform ${c?"left-[18px]":"left-0.5"}`})})]}),g&&n.jsx("p",{className:"text-[10px] text-rose-400 mt-0.5",children:g})]}):typeof r=="number"||typeof c=="number"?n.jsxs("div",{className:"py-1",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-xs text-gray-500 font-mono",children:o}),n.jsx("input",{type:"number",value:String(c??""),onChange:b=>d(b.target.value?Number(b.target.value):0),className:`bg-gray-800 border text-xs text-amber-400 font-mono rounded px-2 py-1 w-24 text-right ${g?"border-rose-500":h?"border-amber-500/50":"border-gray-700"} focus:ring-indigo-500 focus:border-indigo-500`})]}),g&&n.jsx("p",{className:"text-[10px] text-rose-400 mt-0.5 text-right",children:g})]}):Array.isArray(r)||Array.isArray(c)?n.jsx(fp,{path:u,label:o,value:Array.isArray(c)?c:Array.isArray(r)?r:[],edited:h,onChange:d,validationError:g}):n.jsxs("div",{className:"py-1",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-xs text-gray-500 font-mono",children:o}),n.jsx("input",{type:"text",value:String(c??""),onChange:b=>d(b.target.value),className:`bg-gray-800 border text-xs text-gray-300 rounded px-2 py-1 w-48 text-right ${g?"border-rose-500":h?"border-amber-500/50":"border-gray-700"} focus:ring-indigo-500 focus:border-indigo-500`})]}),g&&n.jsx("p",{className:"text-[10px] text-rose-400 mt-0.5 text-right",children:g})]})}function fp({path:u,label:o,value:c,edited:r,onChange:d,validationError:h}){const[g,b]=T.useState(!1),[p,x]=T.useState(""),j=G=>{const _=[...c];_.splice(G,1),d(_)},y=()=>{const G=p.trim();G&&(d([...c,G]),x(""))},R=G=>{G.key==="Enter"&&(G.preventDefault(),y())};return n.jsxs("div",{className:"py-1",children:[n.jsxs("button",{onClick:()=>b(G=>!G),className:"flex items-center justify-between w-full group",children:[n.jsx("span",{className:"text-xs text-gray-500 font-mono",children:o}),n.jsxs("div",{className:"flex items-center gap-2",children:[r&&n.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-amber-500"}),n.jsxs("span",{className:"text-xs text-gray-400 font-mono",children:["[",c.length," items]"]}),n.jsx("svg",{className:`w-3 h-3 text-gray-500 transition-transform duration-200 ${g?"rotate-180":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})]}),g&&n.jsxs("div",{className:"mt-2 ml-4 space-y-1",children:[c.length===0&&n.jsx("p",{className:"text-[10px] text-gray-600",children:"No items"}),c.map((G,_)=>n.jsxs("div",{className:"flex items-center gap-2 group/item",children:[n.jsx("span",{className:"text-xs text-gray-300 font-mono flex-1 truncate",children:String(G)}),n.jsx("button",{onClick:()=>j(_),className:"text-[10px] text-gray-600 hover:text-rose-400 opacity-0 group-hover/item:opacity-100 transition-opacity",children:"remove"})]},_)),n.jsxs("div",{className:"flex items-center gap-2 mt-2",children:[n.jsx("input",{type:"text",value:p,onChange:G=>x(G.target.value),onKeyDown:R,placeholder:"Add item...",className:"bg-gray-800 border border-gray-700 text-xs text-gray-300 rounded px-2 py-1 flex-1 focus:ring-indigo-500 focus:border-indigo-500"}),n.jsx("button",{onClick:y,disabled:!p.trim(),className:"px-2 py-1 text-[10px] text-indigo-400 hover:text-indigo-300 border border-indigo-500/30 rounded disabled:opacity-50 transition-colors",children:"Add"})]})]}),h&&n.jsx("p",{className:"text-[10px] text-rose-400 mt-0.5",children:h})]})}function _0(u,o){return Object.keys(u).filter(c=>c.startsWith(o+".")).length}function dp(u,o,c){const r=o.split(".");let d=u;for(let h=0;h<r.length-1;h++)(!d[r[h]]||typeof d[r[h]]!="object")&&(d[r[h]]={}),d=d[r[h]];d[r[r.length-1]]=c}function um({lines:u,status:o,onDismiss:c}){const r=T.useRef(null);return T.useEffect(()=>{r.current?.scrollIntoView({behavior:"smooth"})},[u]),u.length===0&&o==="idle"?null:n.jsxs("div",{className:"mt-4 rounded-lg bg-gray-950 border border-gray-700 overflow-hidden",children:[n.jsxs("div",{className:"flex items-center justify-between px-3 py-2 bg-gray-900 border-b border-gray-700",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("div",{className:`w-2 h-2 rounded-full ${o==="running"?"bg-yellow-400 animate-pulse":o==="success"?"bg-green-400":o==="error"?"bg-red-400":"bg-gray-500"}`}),n.jsx("span",{className:"text-xs text-gray-400 font-mono",children:o==="running"?"Running...":o==="success"?"Completed":o==="error"?"Failed":"Output"})]}),o!=="running"&&c&&n.jsx("button",{onClick:c,className:"text-gray-500 hover:text-gray-300 text-xs",children:"Dismiss"})]}),n.jsxs("div",{className:"p-3 max-h-48 overflow-y-auto font-mono text-xs text-gray-300 whitespace-pre-wrap",children:[u.map((d,h)=>n.jsx("div",{children:d},h)),n.jsx("div",{ref:r})]})]})}function mp(){const{data:u,loading:o}=Ge("/api/plugins/full"),{execute:c,running:r,output:d,status:h,reset:g}=uc(),[b,p]=T.useState(null);if(o)return n.jsx(bt,{});const x=u?.plugins||[],j=u?.skills||[],y=u?.lsp,R=u?.warmup,G=u?.triggerCount||0,_=x.reduce((L,Q)=>L+Q.skillCount,0),Y=x.reduce((L,Q)=>L+Q.commandCount,0),q=L=>j.filter(Q=>Q.plugin===L).sort((Q,ue)=>ue.count-Q.count),V=L=>{p(Q=>Q===L?null:L)};return n.jsxs("div",{className:"p-6 space-y-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("h2",{className:"text-lg font-semibold text-gray-200",children:"Plugins & LSP"}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx("button",{onClick:()=>c("lsp-status"),disabled:r,className:"px-3 py-1.5 bg-gray-700 hover:bg-gray-600 disabled:opacity-50 text-white text-xs rounded-lg transition-colors",children:"Check LSP"}),n.jsx("button",{onClick:()=>c("refresh-marketplace"),disabled:r,className:"px-3 py-1.5 bg-indigo-600 hover:bg-indigo-500 disabled:opacity-50 text-white text-xs rounded-lg transition-colors",children:r?"Running...":"Refresh Marketplace"})]})]}),n.jsx(um,{lines:d,status:h,onDismiss:g}),n.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3",children:[n.jsx(Ua,{label:"Plugins",value:x.length}),n.jsx(Ua,{label:"Total Skills",value:_}),n.jsx(Ua,{label:"Total Commands",value:Y}),n.jsx(Ua,{label:"Trigger Keywords",value:G})]}),n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl overflow-hidden",children:[n.jsx("div",{className:"px-5 py-3 border-b border-gray-800",children:n.jsx("h3",{className:"text-sm font-medium text-gray-300",children:"Installed Plugins"})}),x.length===0?n.jsx("div",{className:"p-5 text-gray-500 text-xs",children:"No plugins installed"}):n.jsx("div",{className:"divide-y divide-gray-800/50",children:x.map(L=>{const Q=b===L.name,ue=q(L.name);return n.jsxs("div",{children:[n.jsxs("button",{onClick:()=>V(L.name),className:"w-full px-4 py-3 flex items-center justify-between hover:bg-gray-800/30 transition-colors text-left",children:[n.jsxs("div",{className:"flex items-center gap-4",children:[n.jsx("span",{className:"text-sm text-gray-300",children:L.name}),n.jsx("span",{className:"text-xs text-gray-500 font-mono",children:L.version})]}),n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx(he,{label:`${L.skillCount} skills`,variant:"info"}),n.jsx(he,{label:`${L.commandCount} cmds`,variant:"default"}),n.jsx("svg",{className:`w-4 h-4 text-gray-500 transition-transform duration-200 ${Q?"rotate-180":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})]}),Q&&n.jsx("div",{className:"px-4 pb-4 bg-gray-800/20",children:ue.length===0?n.jsx("p",{className:"text-xs text-gray-600 py-2",children:"No skill usage data for this plugin"}):n.jsxs("div",{className:"space-y-1 mt-1",children:[n.jsxs("div",{className:"grid grid-cols-[1fr,80px,80px,120px] gap-2 px-2 py-1",children:[n.jsx("span",{className:"text-[10px] text-gray-600 uppercase",children:"Skill"}),n.jsx("span",{className:"text-[10px] text-gray-600 uppercase text-right",children:"Invocations"}),n.jsx("span",{className:"text-[10px] text-gray-600 uppercase text-right",children:"Success"}),n.jsx("span",{className:"text-[10px] text-gray-600 uppercase text-right",children:"Last Used"})]}),ue.map(te=>n.jsxs("div",{className:"grid grid-cols-[1fr,80px,80px,120px] gap-2 px-2 py-1.5 bg-gray-800/40 rounded",children:[n.jsx("span",{className:"text-xs text-gray-300 font-mono truncate",children:te.name}),n.jsx("span",{className:"text-xs text-gray-400 text-right font-mono",children:te.count}),n.jsxs("span",{className:"text-xs text-right font-mono",children:[n.jsx("span",{className:"text-emerald-400",children:te.successCount}),te.failureCount>0&&n.jsxs("span",{className:"text-rose-400",children:["/",te.failureCount]})]}),n.jsx("span",{className:"text-[10px] text-gray-500 text-right",children:te.lastUsed?hp(te.lastUsed):"-"})]},te.name))]})})]},L.name)})})]}),j.length>0&&n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5",children:[n.jsx("h3",{className:"text-sm font-medium text-gray-300 mb-4",children:"Skill Usage Leaderboard"}),n.jsx(lm,{items:j.sort((L,Q)=>Q.count-L.count).slice(0,20).map(L=>({label:L.name,value:L.count,color:"#10b981"})),maxBars:20})]}),y&&n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx("h3",{className:"text-sm font-medium text-gray-300",children:"LSP Status"}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(he,{label:y.status,variant:y.status==="ok"?"success":"warning"}),y.checked&&n.jsxs("span",{className:"text-[10px] text-gray-600",children:["Checked: ",new Date(y.checked).toLocaleDateString()]})]})]}),n.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3 mb-4",children:[n.jsx(Ua,{label:"Total Languages",value:y.stats.totalLanguages}),n.jsx(Ua,{label:"Checked",value:y.stats.checkedLanguages}),n.jsx(Ua,{label:"Binary Missing",value:y.stats.binaryMissing}),n.jsx(Ua,{label:"Plugin Missing",value:y.stats.pluginMissing})]}),y.missing.length>0&&n.jsxs("div",{className:"space-y-2",children:[n.jsx("h4",{className:"text-xs text-gray-500",children:"Missing Languages"}),y.missing.map((L,Q)=>n.jsxs("div",{className:"flex items-center justify-between p-2 bg-gray-800/50 rounded",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(he,{label:L.type,variant:L.type==="binary"?"warning":"default"}),n.jsx("span",{className:"text-xs text-gray-300",children:L.language})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("code",{className:"text-[10px] text-gray-500",children:L.binaryInstall}),L.message&&n.jsx("span",{className:"text-[10px] text-gray-600 max-w-[200px] truncate",children:L.message})]})]},Q))]})]}),R&&n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx("h3",{className:"text-sm font-medium text-gray-300",children:"LSP Warmup Status"}),n.jsxs("span",{className:"text-[10px] text-gray-600",children:[R.elapsed?`${(R.elapsed/1e3).toFixed(1)}s`:""," |"," ",R.timestamp?new Date(R.timestamp).toLocaleString():""]})]}),n.jsxs("div",{className:"flex flex-wrap gap-2",children:[R.warmedUp.map(L=>n.jsx(he,{label:L,variant:"success"},L)),R.failed.map(L=>n.jsx(he,{label:L,variant:"error"},L))]}),R.warmedUp.length===0&&R.failed.length===0&&n.jsx("p",{className:"text-gray-600 text-xs",children:"No warmup data"})]})]})}function Ua({label:u,value:o}){return n.jsxs("div",{className:"bg-gray-800/50 rounded-lg p-3 text-center",children:[n.jsx("div",{className:"text-lg font-bold text-gray-300",children:o}),n.jsx("div",{className:"text-[10px] text-gray-500",children:u})]})}function hp(u){if(!u)return"-";const o=Date.now()-new Date(u).getTime(),c=Math.floor(o/6e4);if(c<1)return"just now";if(c<60)return`${c}m ago`;const r=Math.floor(c/60);return r<24?`${r}h ago`:`${Math.floor(r/24)}d ago`}function xp(){const{data:u,loading:o}=Ge("/api/links"),{data:c,loading:r,refetch:d}=Ge("/api/services"),{execute:h,running:g,output:b,status:p,reset:x}=uc();if(o||r)return n.jsx(bt,{});const j=(c||[]).filter(_=>_.status==="running").length,y=(c||[]).length,R=async _=>{await h(_),setTimeout(()=>d(),3e3)},G=async _=>{await h(_),setTimeout(()=>d(),2e3)};return n.jsxs("div",{className:"p-6 space-y-6",children:[n.jsx("h2",{className:"text-lg font-semibold text-gray-200",children:"Services & Links"}),n.jsx(um,{lines:b,status:p,onDismiss:x}),n.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[n.jsx(le,{title:"Services",value:y,color:"indigo"}),n.jsx(le,{title:"Running",value:j,color:"emerald"}),n.jsx(le,{title:"External Links",value:(u||[]).length,color:"cyan"}),n.jsx(le,{title:"Stopped",value:y-j,color:"rose"})]}),n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5",children:[n.jsx("h3",{className:"text-sm font-medium text-gray-300 mb-4",children:"Service Status"}),n.jsx("div",{className:"space-y-3",children:(c||[]).map((_,Y)=>n.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-800/50 rounded-lg",children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("div",{className:`w-2 h-2 rounded-full ${_.status==="running"?"bg-emerald-400":"bg-gray-600"}`}),n.jsxs("div",{children:[n.jsx("span",{className:"text-sm text-gray-300",children:_.name}),n.jsx("div",{className:"text-[10px] text-gray-600",children:_.status==="running"&&_.detail?n.jsx("a",{href:_.detail,target:"_blank",rel:"noopener noreferrer",className:"text-indigo-400 hover:text-indigo-300 underline transition-colors",children:_.detail}):_.detail})]})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[_.status==="running"&&_.port>0&&n.jsx(he,{label:`Port ${_.port}`,variant:"info"}),_.status==="running"?n.jsx(he,{label:"Running",variant:"success"}):n.jsx(he,{label:"Stopped",variant:"default"}),_.name==="Docs Preview"&&(_.status==="running"?n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx("a",{href:_.detail,target:"_blank",rel:"noopener noreferrer",className:"px-2 py-1 text-[10px] text-indigo-400 hover:text-indigo-300 border border-indigo-500/30 rounded transition-colors",children:"Open"}),n.jsx("button",{onClick:()=>G("docs-preview-stop"),disabled:g,className:"px-2 py-1 text-[10px] text-rose-400 hover:text-rose-300 border border-rose-500/30 rounded transition-colors disabled:opacity-50",children:"Stop"})]}):n.jsx("button",{onClick:()=>R("docs-preview-start"),disabled:g,className:"px-2 py-1 text-[10px] text-emerald-400 hover:text-emerald-300 border border-emerald-500/30 rounded transition-colors disabled:opacity-50",children:g?"Starting...":"Start"})),_.status==="running"&&_.name!=="Docs Preview"&&n.jsx("a",{href:_.detail,target:"_blank",rel:"noopener noreferrer",className:"px-2 py-1 text-[10px] text-indigo-400 hover:text-indigo-300 border border-indigo-500/30 rounded transition-colors",children:"Open"})]})]},Y))})]}),n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5",children:[n.jsx("h3",{className:"text-sm font-medium text-gray-300 mb-4",children:"External Links"}),(u||[]).length===0?n.jsx("p",{className:"text-xs text-gray-500",children:"No external links configured"}):n.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:(u||[]).map((_,Y)=>n.jsxs("a",{href:_.url,target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-between p-3 bg-gray-800/50 rounded-lg hover:bg-gray-800 transition-colors group",children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx(gp,{type:_.type}),n.jsxs("div",{children:[n.jsx("div",{className:"text-sm text-gray-300 group-hover:text-white transition-colors",children:_.name}),n.jsx("div",{className:"text-[10px] text-gray-600 truncate max-w-[200px]",children:_.url})]})]}),n.jsx("svg",{className:"w-4 h-4 text-gray-600 group-hover:text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})})]},Y))})]})]})}function gp({type:u}){const o={docs:"bg-indigo-600",github:"bg-gray-700",jira:"bg-blue-700",ado:"bg-blue-600"};return n.jsx("div",{className:`w-8 h-8 rounded-lg ${o[u]||"bg-gray-700"} flex items-center justify-center`,children:n.jsx("span",{className:"text-xs text-white font-bold",children:u[0]?.toUpperCase()})})}const O0={critical:0,warning:1,info:2};function yp(){const[u,o]=T.useState("pending"),[c,r]=T.useState(null),{activeProject:d}=Kn(),{data:h,loading:g,error:b,refetch:p}=Ge("/api/notifications");if(g)return n.jsx(bt,{});if(b)return n.jsxs("div",{className:"p-6 text-rose-400 text-sm",children:["Error: ",b]});const x=h||[],j=x.filter(w=>!w.dismissedAt),y=x.filter(w=>!!w.dismissedAt),R=j.filter(w=>w.severity==="critical"),G=j.filter(w=>w.severity==="warning"),Y=[...u==="pending"?j:u==="dismissed"?y:x].sort((w,F)=>{const X=O0[w.severity]??3,Ae=O0[F.severity]??3;return X!==Ae?X-Ae:new Date(F.createdAt).getTime()-new Date(w.createdAt).getTime()}),q=async w=>{r(w);try{const F=d?`?project=${d.id}`:"";(await fetch(`/api/notifications/${w}/dismiss${F}`,{method:"POST"})).ok&&p()}finally{r(null)}},V=async()=>{r("__all__");try{const w=d?`?project=${d.id}`:"";for(const F of j)await fetch(`/api/notifications/${F.id}/dismiss${w}`,{method:"POST"});p()}finally{r(null)}},L=w=>w==="critical"?"error":w==="warning"?"warning":"info",Q=w=>w==="critical"?"border-l-rose-500":w==="warning"?"border-l-amber-500":"border-l-blue-500",te=(w=>{const F={};for(const X of w)F[X.severity]||(F[X.severity]=[]),F[X.severity].push(X);return F})(Y),k={critical:"Critical",warning:"Warnings",info:"Informational"};return n.jsxs("div",{className:"p-6 space-y-6",children:[n.jsx("h2",{className:"text-lg font-semibold text-gray-200",children:"Notifications"}),n.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[n.jsx(le,{title:"Pending",value:j.length,color:"indigo"}),n.jsx(le,{title:"Critical",value:R.length,color:"rose"}),n.jsx(le,{title:"Warnings",value:G.length,color:"amber"}),n.jsx(le,{title:"Dismissed",value:y.length,color:"cyan"})]}),n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("div",{className:"flex gap-1 bg-gray-900/50 border border-gray-800 rounded-lg p-1",children:[{value:"pending",label:`Pending (${j.length})`},{value:"dismissed",label:`Dismissed (${y.length})`},{value:"all",label:`All (${x.length})`}].map(w=>n.jsx("button",{onClick:()=>o(w.value),className:`px-3 py-1.5 text-xs rounded-md transition-colors ${u===w.value?"bg-gray-700 text-white":"text-gray-400 hover:text-gray-300"}`,children:w.label},w.value))}),j.length>0&&n.jsx("button",{onClick:V,disabled:c==="__all__",className:"px-3 py-1.5 text-xs text-gray-400 hover:text-gray-200 border border-gray-700 rounded-lg transition-colors disabled:opacity-50",children:c==="__all__"?"Dismissing...":"Dismiss All"})]}),Y.length===0?n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-8 text-center",children:[n.jsx("div",{className:"w-12 h-12 rounded-full bg-gray-800 flex items-center justify-center mx-auto mb-4",children:n.jsx("svg",{className:"w-6 h-6 text-gray-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9"})})}),n.jsx("p",{className:"text-gray-400 text-sm font-medium",children:u==="pending"?"No pending notifications":"No notifications"}),n.jsx("p",{className:"text-gray-600 text-xs mt-1 max-w-xs mx-auto",children:"Notifications appear here when imports complete, discrepancies are found, or syncs fail"})]}):n.jsx("div",{className:"space-y-4",children:["critical","warning","info"].map(w=>{const F=te[w];return!F||F.length===0?null:n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[n.jsx("h3",{className:"text-xs font-medium text-gray-400 uppercase",children:k[w]||w}),n.jsxs("span",{className:"text-[10px] text-gray-600",children:["(",F.length,")"]})]}),n.jsx("div",{className:"space-y-2",children:F.map(X=>n.jsxs("div",{className:`bg-gray-900/50 border border-gray-800 border-l-4 ${Q(X.severity)} rounded-xl p-4 flex items-start gap-4 ${X.dismissedAt?"opacity-60":""}`,children:[n.jsx(pp,{severity:X.severity}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[n.jsx("span",{className:"text-sm font-medium text-gray-200",children:X.title}),n.jsx(he,{label:X.severity,variant:L(X.severity)}),X.type&&n.jsx(he,{label:X.type,variant:"default"})]}),X.message&&n.jsx("p",{className:"text-xs text-gray-400 mb-2",children:X.message}),n.jsxs("div",{className:"flex items-center gap-3 text-[10px] text-gray-600",children:[n.jsx("span",{children:new Date(X.createdAt).toLocaleString()}),X.source&&n.jsxs("span",{children:["via ",X.source]}),X.dismissedAt&&n.jsxs("span",{children:["Dismissed ",new Date(X.dismissedAt).toLocaleString()]})]})]}),!X.dismissedAt&&n.jsx("button",{onClick:()=>q(X.id),disabled:c===X.id,className:"px-2 py-1 text-xs text-gray-500 hover:text-gray-300 hover:bg-gray-800 rounded transition-colors disabled:opacity-50 flex-shrink-0",children:c===X.id?"...":"Dismiss"})]},X.id))})]},w)})})]})}function pp({severity:u}){return u==="critical"?n.jsx("div",{className:"w-8 h-8 rounded-full bg-rose-500/10 flex items-center justify-center flex-shrink-0",children:n.jsx("svg",{className:"w-4 h-4 text-rose-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4.5c-.77-.833-2.694-.833-3.464 0L3.34 16.5c-.77.833.192 2.5 1.732 2.5z"})})}):u==="warning"?n.jsx("div",{className:"w-8 h-8 rounded-full bg-amber-500/10 flex items-center justify-center flex-shrink-0",children:n.jsx("svg",{className:"w-4 h-4 text-amber-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}):n.jsx("div",{className:"w-8 h-8 rounded-full bg-blue-500/10 flex items-center justify-center flex-shrink-0",children:n.jsx("svg",{className:"w-4 h-4 text-blue-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})})}function vp(u){if(!u)return null;if(u.startsWith("https://"))return u.replace(/\.git$/,"");const o=u.match(/^git@([^:]+):(.+?)(?:\.git)?$/);if(o)return`https://${o[1]}/${o[2]}`;const c=u.match(/^ssh:\/\/git@([^/]+)\/(.+?)(?:\.git)?$/);return c?`https://${c[1]}/${c[2]}`:null}function bp(){const{data:u,loading:o,error:c}=Ge("/api/repos");if(o)return n.jsx(bt,{});if(c)return n.jsxs("div",{className:"p-6 text-rose-400 text-sm",children:["Error: ",c]});const r=u||[],d=[...new Set(r.map(b=>b.org))],h=r.filter(b=>b.hasSpecweave).length,g=r.find(b=>b.isCurrent);return n.jsxs("div",{className:"p-6 space-y-6",children:[n.jsx("h2",{className:"text-lg font-semibold text-gray-200",children:"Repositories"}),n.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[n.jsx(le,{title:"Repositories",value:r.length,color:"indigo"}),n.jsx(le,{title:"Organizations",value:d.length,color:"cyan"}),n.jsx(le,{title:"With SpecWeave",value:h,color:"emerald"}),n.jsx(le,{title:"Current",value:g?g.name:"-",subtitle:g?`${g.org}/${g.name}`:"No current project",color:"amber"})]}),r.length===0?n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-8 text-center",children:[n.jsx("p",{className:"text-gray-500 text-sm",children:"No repositories found"}),n.jsx("p",{className:"text-gray-600 text-xs mt-1",children:"This project doesn't use multi-repo mode, or the repositories/ directory hasn't been set up yet"})]}):n.jsx(n.Fragment,{children:d.map(b=>{const p=r.filter(x=>x.org===b);return n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[n.jsx(jp,{}),n.jsx("h3",{className:"text-sm font-medium text-gray-300",children:b}),n.jsxs("span",{className:"text-[10px] text-gray-600",children:[p.length," ",p.length===1?"repo":"repos"]})]}),n.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-3",children:p.map(x=>{const j=vp(x.remote);return n.jsxs("div",{className:`bg-gray-900/50 border rounded-xl p-4 ${x.isCurrent?"border-indigo-500/30":"border-gray-800"}`,children:[n.jsxs("div",{className:"flex items-center justify-between mb-2",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Np,{}),n.jsx("span",{className:"text-sm font-medium text-gray-300",children:x.name})]}),n.jsxs("div",{className:"flex items-center gap-1.5",children:[x.isCurrent&&n.jsx(he,{label:"Current Project",variant:"info"}),n.jsx(he,{label:x.hasSpecweave?"SpecWeave":"No SpecWeave",variant:x.hasSpecweave?"success":"default"})]})]}),n.jsxs("div",{className:"space-y-1.5 mt-3",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-[10px] text-gray-500",children:"Organization"}),n.jsx("span",{className:"text-[10px] text-gray-400",children:x.org})]}),x.branch&&n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-[10px] text-gray-500",children:"Branch"}),n.jsx(he,{label:x.branch,variant:"default"})]}),j&&n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-[10px] text-gray-500",children:"Remote"}),n.jsx("a",{href:j,target:"_blank",rel:"noopener noreferrer",className:"text-[10px] text-indigo-400 hover:text-indigo-300 hover:underline truncate max-w-[180px]",title:j,children:j.replace("https://","")})]}),!j&&x.remote&&n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-[10px] text-gray-500",children:"Remote"}),n.jsx("span",{className:"text-[10px] text-gray-600 font-mono truncate max-w-[180px]",title:x.remote,children:x.remote})]}),x.path&&n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-[10px] text-gray-500",children:"Path"}),n.jsx("span",{className:"text-[10px] text-gray-600 font-mono truncate max-w-[180px]",title:x.path,children:x.path.split("/").slice(-3).join("/")})]}),x.lastModified&&n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-[10px] text-gray-500",children:"Last Modified"}),n.jsx("span",{className:"text-[10px] text-gray-400",children:Ep(x.lastModified)})]})]}),j&&n.jsxs("a",{href:j,target:"_blank",rel:"noopener noreferrer",className:"mt-3 flex items-center justify-center gap-1.5 text-xs text-gray-400 hover:text-gray-200 py-2 border border-gray-800 rounded-lg hover:border-gray-700 transition-colors",children:[n.jsx(Sp,{}),"Open on GitHub"]})]},x.path||`${x.org}/${x.name}`)})})]},b)})})]})}function jp(){return n.jsx("div",{className:"w-6 h-6 rounded bg-gray-700 flex items-center justify-center",children:n.jsx("svg",{className:"w-3.5 h-3.5 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4"})})})}function Np(){return n.jsx("svg",{className:"w-4 h-4 text-gray-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"})})}function Sp(){return n.jsx("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 24 24",fill:"currentColor",children:n.jsx("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"})})}function Ep(u){if(!u)return"-";try{const o=Date.now()-new Date(u).getTime(),c=Math.floor(o/6e4);if(c<1)return"just now";if(c<60)return`${c}m ago`;const r=Math.floor(c/60);return r<24?`${r}h ago`:`${Math.floor(r/24)}d ago`}catch{return"-"}}function Tp(){const{id:u}=Sg(),{data:o,loading:c,error:r}=Ge(`/api/increments/${u||"_none"}`);if(!u)return n.jsx("div",{className:"p-6 text-gray-500 text-sm",children:"No increment ID specified"});if(c)return n.jsx(bt,{});if(r)return n.jsxs("div",{className:"p-6 text-rose-400 text-sm",children:["Error: ",r]});if(!o)return n.jsx("div",{className:"p-6 text-gray-500 text-sm",children:"Increment not found"});const d=o.taskSummary.total>0?Math.round(o.taskSummary.completed/o.taskSummary.total*100):0,h=o.acSummary.total>0?Math.round(o.acSummary.completed/o.acSummary.total*100):0;return n.jsxs("div",{className:"p-6 space-y-6",children:[n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center gap-3 mb-1",children:[n.jsx("span",{className:"text-xs text-indigo-400 font-mono",children:o.dirName}),n.jsx(he,{label:o.metadata.status||"unknown",variant:bi(o.metadata.status||"")}),o.metadata.type&&n.jsx("span",{className:"text-xs text-gray-400 capitalize",children:o.metadata.type}),o.metadata.priority&&n.jsx(Cp,{priority:o.metadata.priority})]}),n.jsx("h2",{className:"text-lg font-semibold text-gray-200",children:o.metadata.title||o.id}),o.metadata.project&&n.jsxs("span",{className:"text-xs text-gray-500",children:["Project: ",o.metadata.project]})]}),n.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[n.jsx(le,{title:"Tasks",value:`${o.taskSummary.completed}/${o.taskSummary.total}`,color:"indigo"}),n.jsx(le,{title:"Task Progress",value:`${d}%`,color:"cyan"}),n.jsx(le,{title:"ACs",value:`${o.acSummary.completed}/${o.acSummary.total}`,color:"emerald"}),n.jsx(le,{title:"AC Progress",value:`${h}%`,color:"amber"})]}),n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5 space-y-4",children:[n.jsx(D0,{label:"Tasks",completed:o.taskSummary.completed,total:o.taskSummary.total,color:"indigo"}),n.jsx(D0,{label:"Acceptance Criteria",completed:o.acSummary.completed,total:o.acSummary.total,color:"emerald"})]}),n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl overflow-hidden",children:[n.jsx("div",{className:"px-5 py-3 border-b border-gray-800",children:n.jsxs("h3",{className:"text-sm font-medium text-gray-300",children:["Tasks (",o.tasks.length,")"]})}),o.tasks.length===0?n.jsx("div",{className:"p-5 text-center text-gray-500 text-xs",children:"No tasks found in tasks.md"}):n.jsx("div",{className:"divide-y divide-gray-800/50",children:o.tasks.map(g=>n.jsxs("div",{className:"px-5 py-3 flex items-center gap-3",children:[n.jsx("div",{className:`w-4 h-4 rounded border flex items-center justify-center flex-shrink-0 ${g.status==="completed"?"bg-indigo-500/20 border-indigo-500 text-indigo-400":"border-gray-600"}`,children:g.status==="completed"&&n.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})})}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{className:"text-xs text-gray-500 font-mono",children:g.id}),n.jsx("span",{className:`text-sm ${g.status==="completed"?"text-gray-500 line-through":"text-gray-300"}`,children:g.title})]}),(g.userStory||g.acs)&&n.jsxs("div",{className:"flex items-center gap-2 mt-0.5",children:[g.userStory&&n.jsx("span",{className:"text-[10px] text-indigo-400",children:g.userStory}),g.acs?.map(b=>n.jsx("span",{className:"text-[10px] text-emerald-500",children:b},b))]})]})]},g.id))})]}),o.acs.length>0&&n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl overflow-hidden",children:[n.jsx("div",{className:"px-5 py-3 border-b border-gray-800",children:n.jsxs("h3",{className:"text-sm font-medium text-gray-300",children:["Acceptance Criteria (",o.acs.length,")"]})}),n.jsx("div",{className:"divide-y divide-gray-800/50",children:o.acs.map(g=>n.jsxs("div",{className:"px-5 py-3 flex items-start gap-3",children:[n.jsx("div",{className:`w-4 h-4 rounded border flex items-center justify-center flex-shrink-0 mt-0.5 ${g.completed?"bg-emerald-500/20 border-emerald-500 text-emerald-400":"border-gray-600"}`,children:g.completed&&n.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})})}),n.jsxs("div",{children:[n.jsx("span",{className:"text-xs text-emerald-500 font-mono",children:g.id}),n.jsx("span",{className:`text-sm ml-2 ${g.completed?"text-gray-500 line-through":"text-gray-300"}`,children:g.text})]})]},g.id))})]}),n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5",children:[n.jsx("h3",{className:"text-sm font-medium text-gray-300 mb-3",children:"Metadata"}),n.jsx("div",{className:"space-y-1.5",children:Object.entries(o.metadata).filter(([g])=>!["title"].includes(g)).map(([g,b])=>n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-xs text-gray-500 font-mono",children:g}),n.jsx("span",{className:"text-xs text-gray-400",children:typeof b=="object"?JSON.stringify(b):String(b??"")})]},g))})]})]})}function D0({label:u,completed:o,total:c,color:r}){const d=c>0?Math.round(o/c*100):0,h=r==="emerald"?"bg-emerald-500":"bg-indigo-500";return n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[n.jsx("span",{className:"text-xs text-gray-400",children:u}),n.jsxs("span",{className:"text-xs text-gray-500",children:[o,"/",c," (",d,"%)"]})]}),n.jsx("div",{className:"w-full h-2 bg-gray-800 rounded-full overflow-hidden",children:n.jsx("div",{className:`h-full ${h} rounded-full transition-all`,style:{width:`${d}%`}})})]})}function Cp({priority:u}){const o={P0:"text-rose-400 bg-rose-500/10",P1:"text-amber-400 bg-amber-500/10",P2:"text-cyan-400 bg-cyan-500/10",P3:"text-gray-400 bg-gray-500/10"};return n.jsx("span",{className:`text-xs px-1.5 py-0.5 rounded ${o[u]||o.P2}`,children:u})}function Ap(){const u=py();return n.jsx(em.Provider,{value:u,children:n.jsxs("div",{className:"flex min-h-screen bg-gray-950 text-gray-100",children:[n.jsx(jy,{}),n.jsxs("div",{className:"flex-1 flex flex-col min-w-0",children:[n.jsx(Ny,{}),n.jsx("main",{className:"flex-1 overflow-y-auto",children:n.jsxs(Bg,{children:[n.jsx(tt,{path:"/",element:n.jsx(Dy,{})}),n.jsx(tt,{path:"/increments",element:n.jsx(Uy,{})}),n.jsx(tt,{path:"/increments/:id",element:n.jsx(Tp,{})}),n.jsx(tt,{path:"/analytics",element:n.jsx(By,{})}),n.jsx(tt,{path:"/costs",element:n.jsx(Vy,{})}),n.jsx(tt,{path:"/sync",element:n.jsx(Fy,{})}),n.jsx(tt,{path:"/errors",element:n.jsx(ep,{})}),n.jsx(tt,{path:"/activity",element:n.jsx(up,{})}),n.jsx(tt,{path:"/config",element:n.jsx(op,{})}),n.jsx(tt,{path:"/plugins",element:n.jsx(mp,{})}),n.jsx(tt,{path:"/services",element:n.jsx(xp,{})}),n.jsx(tt,{path:"/notifications",element:n.jsx(yp,{})}),n.jsx(tt,{path:"/repos",element:n.jsx(bp,{})}),n.jsx(tt,{path:"*",element:n.jsxs("div",{className:"p-6 text-center",children:[n.jsx("h2",{className:"text-lg font-semibold text-gray-200 mb-2",children:"Page Not Found"}),n.jsx("p",{className:"text-sm text-gray-500",children:"The page you're looking for doesn't exist."})]})})]})})]})]})})}Yx.createRoot(document.getElementById("root")).render(n.jsx(T.StrictMode,{children:n.jsx(cy,{children:n.jsx(Ap,{})})}));