vibe-roast 0.98.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (164) hide show
  1. package/README.md +418 -0
  2. package/assests/README.md +43 -0
  3. package/assests/badges/.gitkeep +0 -0
  4. package/assests/badges/01-builder/builder-badge.png +0 -0
  5. package/assests/badges/01-builder/builder-badge.svg +4 -0
  6. package/assests/badges/02-debugger/debugger-badge.png +0 -0
  7. package/assests/badges/02-debugger/debugger-badge.svg +4 -0
  8. package/assests/badges/03-architect/architect-badge.png +0 -0
  9. package/assests/badges/03-architect/architect-badge.svg +4 -0
  10. package/assests/badges/04-codex-believer/codex-believer-badge.png +0 -0
  11. package/assests/badges/04-codex-believer/codex-believer-badge.svg +4 -0
  12. package/assests/badges/05-prompt-priest/prompt-priest-badge.png +0 -0
  13. package/assests/badges/05-prompt-priest/prompt-priest-badge.svg +4 -0
  14. package/assests/badges/06-tab-hoarder/tab-hoarder-badge.png +0 -0
  15. package/assests/badges/06-tab-hoarder/tab-hoarder-badge.svg +4 -0
  16. package/assests/badges/07-context-maxxer/context-maxxer-badge.png +0 -0
  17. package/assests/badges/07-context-maxxer/context-maxxer-badge.svg +4 -0
  18. package/assests/badges/08-yolo-shipper/yolo-shipper-badge.png +0 -0
  19. package/assests/badges/08-yolo-shipper/yolo-shipper-badge.svg +4 -0
  20. package/assests/banners/.gitkeep +0 -0
  21. package/assests/banners/home-hero.png +0 -0
  22. package/assests/banners/home-hero.svg +3 -0
  23. package/assests/banners/result-header.png +0 -0
  24. package/assests/banners/result-header.svg +3 -0
  25. package/assests/banners/share-strip.png +0 -0
  26. package/assests/banners/share-strip.svg +3 -0
  27. package/assests/characters/01-builder/builder-card.sbti-archive.svg +5 -0
  28. package/assests/characters/01-builder/builder-card.svg +3 -0
  29. package/assests/characters/01-builder/builder-character.sbti-archive.svg +3 -0
  30. package/assests/characters/01-builder/builder-character.svg +3 -0
  31. package/assests/characters/01-builder/builder-figure.png +0 -0
  32. package/assests/characters/01-builder/builder-mascot.png +0 -0
  33. package/assests/characters/02-debugger/debugger-card.sbti-archive.svg +5 -0
  34. package/assests/characters/02-debugger/debugger-card.svg +3 -0
  35. package/assests/characters/02-debugger/debugger-character.sbti-archive.svg +3 -0
  36. package/assests/characters/02-debugger/debugger-character.svg +3 -0
  37. package/assests/characters/02-debugger/debugger-figure.png +0 -0
  38. package/assests/characters/02-debugger/debugger-mascot.png +0 -0
  39. package/assests/characters/03-architect/architect-card.sbti-archive.svg +5 -0
  40. package/assests/characters/03-architect/architect-card.svg +3 -0
  41. package/assests/characters/03-architect/architect-character.sbti-archive.svg +3 -0
  42. package/assests/characters/03-architect/architect-character.svg +3 -0
  43. package/assests/characters/03-architect/architect-figure.png +0 -0
  44. package/assests/characters/03-architect/architect-mascot.png +0 -0
  45. package/assests/characters/04-codex-believer/codex-believer-card.sbti-archive.svg +5 -0
  46. package/assests/characters/04-codex-believer/codex-believer-card.svg +3 -0
  47. package/assests/characters/04-codex-believer/codex-believer-character.sbti-archive.svg +3 -0
  48. package/assests/characters/04-codex-believer/codex-believer-character.svg +3 -0
  49. package/assests/characters/04-codex-believer/codex-believer-figure.png +0 -0
  50. package/assests/characters/04-codex-believer/codex-believer-mascot.png +0 -0
  51. package/assests/characters/05-prompt-priest/prompt-priest-card.sbti-archive.svg +5 -0
  52. package/assests/characters/05-prompt-priest/prompt-priest-card.svg +3 -0
  53. package/assests/characters/05-prompt-priest/prompt-priest-character.sbti-archive.svg +3 -0
  54. package/assests/characters/05-prompt-priest/prompt-priest-character.svg +3 -0
  55. package/assests/characters/05-prompt-priest/prompt-priest-figure.png +0 -0
  56. package/assests/characters/05-prompt-priest/prompt-priest-mascot.png +0 -0
  57. package/assests/characters/06-tab-hoarder/tab-hoarder-card.sbti-archive.svg +5 -0
  58. package/assests/characters/06-tab-hoarder/tab-hoarder-card.svg +3 -0
  59. package/assests/characters/06-tab-hoarder/tab-hoarder-character.sbti-archive.svg +3 -0
  60. package/assests/characters/06-tab-hoarder/tab-hoarder-character.svg +3 -0
  61. package/assests/characters/06-tab-hoarder/tab-hoarder-figure.png +0 -0
  62. package/assests/characters/06-tab-hoarder/tab-hoarder-mascot.png +0 -0
  63. package/assests/characters/07-context-maxxer/context-maxxer-card.sbti-archive.svg +5 -0
  64. package/assests/characters/07-context-maxxer/context-maxxer-card.svg +3 -0
  65. package/assests/characters/07-context-maxxer/context-maxxer-character.sbti-archive.svg +3 -0
  66. package/assests/characters/07-context-maxxer/context-maxxer-character.svg +3 -0
  67. package/assests/characters/07-context-maxxer/context-maxxer-figure.png +0 -0
  68. package/assests/characters/07-context-maxxer/context-maxxer-mascot.png +0 -0
  69. package/assests/characters/08-yolo-shipper/yolo-shipper-card.sbti-archive.svg +5 -0
  70. package/assests/characters/08-yolo-shipper/yolo-shipper-card.svg +3 -0
  71. package/assests/characters/08-yolo-shipper/yolo-shipper-character.sbti-archive.svg +3 -0
  72. package/assests/characters/08-yolo-shipper/yolo-shipper-character.svg +3 -0
  73. package/assests/characters/08-yolo-shipper/yolo-shipper-figure.png +0 -0
  74. package/assests/characters/08-yolo-shipper/yolo-shipper-mascot.png +0 -0
  75. package/assests/characters-vibe-types/aosf-strategy-shipper/strategy-shipper-figure.png +0 -0
  76. package/assests/characters-vibe-types/aosx-agent-believer/agent-believer-figure.png +0 -0
  77. package/assests/characters-vibe-types/aovf-systems-architect/systems-architect-figure.png +0 -0
  78. package/assests/characters-vibe-types/aovx-context-cartographer/context-cartographer-figure.png +0 -0
  79. package/assests/characters-vibe-types/apsf-diagram-sprinter/diagram-sprinter-figure.png +0 -0
  80. package/assests/characters-vibe-types/apsx-infinite-planner/infinite-planner-figure.png +0 -0
  81. package/assests/characters-vibe-types/apvf-architect/architect-figure.png +0 -0
  82. package/assests/characters-vibe-types/apvx-prompt-priest/prompt-priest-figure.png +0 -0
  83. package/assests/characters-vibe-types/mosf-yolo-shipper/yolo-shipper-figure.png +0 -0
  84. package/assests/characters-vibe-types/mosx-agent-commander/agent-commander-figure.png +0 -0
  85. package/assests/characters-vibe-types/movf-agent-engineer/agent-engineer-figure.png +0 -0
  86. package/assests/characters-vibe-types/movx-systems-wrangler/systems-wrangler-figure.png +0 -0
  87. package/assests/characters-vibe-types/mpsf-builder/builder-figure.png +0 -0
  88. package/assests/characters-vibe-types/mpsx-tab-hoarder/tab-hoarder-figure.png +0 -0
  89. package/assests/characters-vibe-types/mpvf-debugger/debugger-figure.png +0 -0
  90. package/assests/characters-vibe-types/mpvx-context-maxxer/context-maxxer-figure.png +0 -0
  91. package/assests/live-report.html +1403 -0
  92. package/assests/notes/live-inspect-summary.json +3487 -0
  93. package/assests/scripts/compose-banners.py +148 -0
  94. package/assests/scripts/live-report-boot.js +2 -0
  95. package/assests/scripts/profiles.json +104 -0
  96. package/assests/scripts/qa-faces.mjs +72 -0
  97. package/assests/scripts/roast-extras.js +619 -0
  98. package/assests/scripts/score-engine.js +62 -0
  99. package/assests/scripts/split-badges.py +49 -0
  100. package/assests/scripts/split-reference.py +38 -0
  101. package/assests/scripts/sync-banners.mjs +45 -0
  102. package/assests/scripts/sync-cards.mjs +50 -0
  103. package/assests/scripts/sync-raster.mjs +118 -0
  104. package/assests/scripts/vibe-types.json +22 -0
  105. package/assests/source/design-system.md +50 -0
  106. package/assests/source/prompts/01-builder.md +19 -0
  107. package/assests/source/prompts/02-debugger.md +17 -0
  108. package/assests/source/prompts/03-architect.md +16 -0
  109. package/assests/source/prompts/04-codex-believer.md +13 -0
  110. package/assests/source/prompts/05-prompt-priest.md +13 -0
  111. package/assests/source/prompts/06-tab-hoarder.md +13 -0
  112. package/assests/source/prompts/07-context-maxxer.md +13 -0
  113. package/assests/source/prompts/08-yolo-shipper.md +13 -0
  114. package/assests/source/references/sbti-style-reference-board.png +0 -0
  115. package/assests/source/references/vibe-badges-v6-board.png +0 -0
  116. package/assests/source/references/vibe-mascots-v4-reference.png +0 -0
  117. package/assests/source/references/vibe-profiles-v5-board-a.png +0 -0
  118. package/assests/source/references/vibe-profiles-v5-board-b.png +0 -0
  119. package/assests/source/vibe-types-visual-brief.md +38 -0
  120. package/bin/hook.js +121 -0
  121. package/bin/vibe-roast.js +98 -0
  122. package/bin/vibe-wrapper.js +4 -0
  123. package/dashboard/dist/assets/index-DlBycTcO.css +1 -0
  124. package/dashboard/dist/assets/index-t8m64Hm9.js +168 -0
  125. package/dashboard/dist/index.html +32 -0
  126. package/package.json +58 -0
  127. package/src/extract/environment.js +160 -0
  128. package/src/extract/phrase-stats.js +684 -0
  129. package/src/extract/prompt-analysis.js +368 -0
  130. package/src/extract/text.js +30 -0
  131. package/src/hooks/install.js +184 -0
  132. package/src/inspect.js +261 -0
  133. package/src/lib/activity-metrics.js +238 -0
  134. package/src/lib/agent-score.js +187 -0
  135. package/src/lib/ai-roast.js +446 -0
  136. package/src/lib/dates.js +43 -0
  137. package/src/lib/hashtags.js +150 -0
  138. package/src/lib/jsonl.js +48 -0
  139. package/src/lib/load-env.js +59 -0
  140. package/src/lib/roast-evidence.js +186 -0
  141. package/src/lib/roast-snapshot.js +58 -0
  142. package/src/server.js +644 -0
  143. package/src/sources/aider.js +150 -0
  144. package/src/sources/amazonq.js +113 -0
  145. package/src/sources/antigravity.js +147 -0
  146. package/src/sources/claude.js +262 -0
  147. package/src/sources/cline.js +11 -0
  148. package/src/sources/codex.js +222 -0
  149. package/src/sources/common.js +133 -0
  150. package/src/sources/continue.js +67 -0
  151. package/src/sources/copilot.js +170 -0
  152. package/src/sources/cursor.js +238 -0
  153. package/src/sources/gemini.js +75 -0
  154. package/src/sources/index.js +61 -0
  155. package/src/sources/roo.js +11 -0
  156. package/src/sources/token-tracker.js +171 -0
  157. package/src/sources/vibe-tracker.js +79 -0
  158. package/src/sources/vscode-tasks.js +142 -0
  159. package/src/sources/windsurf.js +109 -0
  160. package/worker/README.md +96 -0
  161. package/worker/package-lock.json +1547 -0
  162. package/worker/package.json +20 -0
  163. package/worker/src/index.mjs +694 -0
  164. package/worker/wrangler.jsonc +40 -0
@@ -0,0 +1,168 @@
1
+ (function(){const c=document.createElement("link").relList;if(c&&c.supports&&c.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))d(f);new MutationObserver(f=>{for(const v of f)if(v.type==="childList")for(const m of v.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&d(m)}).observe(document,{childList:!0,subtree:!0});function u(f){const v={};return f.integrity&&(v.integrity=f.integrity),f.referrerPolicy&&(v.referrerPolicy=f.referrerPolicy),f.crossOrigin==="use-credentials"?v.credentials="include":f.crossOrigin==="anonymous"?v.credentials="omit":v.credentials="same-origin",v}function d(f){if(f.ep)return;f.ep=!0;const v=u(f);fetch(f.href,v)}})();function ws(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var us={exports:{}},no={},cs={exports:{}},ze={};/**
2
+ * @license React
3
+ * react.production.min.js
4
+ *
5
+ * Copyright (c) Facebook, Inc. and its affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var oc;function Wf(){if(oc)return ze;oc=1;var a=Symbol.for("react.element"),c=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),d=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),v=Symbol.for("react.provider"),m=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),y=Symbol.for("react.memo"),C=Symbol.for("react.lazy"),E=Symbol.iterator;function w(S){return S===null||typeof S!="object"?null:(S=E&&S[E]||S["@@iterator"],typeof S=="function"?S:null)}var G={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},O=Object.assign,T={};function P(S,_,z){this.props=S,this.context=_,this.refs=T,this.updater=z||G}P.prototype.isReactComponent={},P.prototype.setState=function(S,_){if(typeof S!="object"&&typeof S!="function"&&S!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,S,_,"setState")},P.prototype.forceUpdate=function(S){this.updater.enqueueForceUpdate(this,S,"forceUpdate")};function ie(){}ie.prototype=P.prototype;function ue(S,_,z){this.props=S,this.context=_,this.refs=T,this.updater=z||G}var F=ue.prototype=new ie;F.constructor=ue,O(F,P.prototype),F.isPureReactComponent=!0;var Q=Array.isArray,U=Object.prototype.hasOwnProperty,I={current:null},he={key:!0,ref:!0,__self:!0,__source:!0};function Se(S,_,z){var W,me={},X=null,Ce=null;if(_!=null)for(W in _.ref!==void 0&&(Ce=_.ref),_.key!==void 0&&(X=""+_.key),_)U.call(_,W)&&!he.hasOwnProperty(W)&&(me[W]=_[W]);var fe=arguments.length-2;if(fe===1)me.children=z;else if(1<fe){for(var Ee=Array(fe),nt=0;nt<fe;nt++)Ee[nt]=arguments[nt+2];me.children=Ee}if(S&&S.defaultProps)for(W in fe=S.defaultProps,fe)me[W]===void 0&&(me[W]=fe[W]);return{$$typeof:a,type:S,key:X,ref:Ce,props:me,_owner:I.current}}function ce(S,_){return{$$typeof:a,type:S.type,key:_,ref:S.ref,props:S.props,_owner:S._owner}}function Me(S){return typeof S=="object"&&S!==null&&S.$$typeof===a}function Fe(S){var _={"=":"=0",":":"=2"};return"$"+S.replace(/[=:]/g,function(z){return _[z]})}var ee=/\/+/g;function je(S,_){return typeof S=="object"&&S!==null&&S.key!=null?Fe(""+S.key):_.toString(36)}function te(S,_,z,W,me){var X=typeof S;(X==="undefined"||X==="boolean")&&(S=null);var Ce=!1;if(S===null)Ce=!0;else switch(X){case"string":case"number":Ce=!0;break;case"object":switch(S.$$typeof){case a:case c:Ce=!0}}if(Ce)return Ce=S,me=me(Ce),S=W===""?"."+je(Ce,0):W,Q(me)?(z="",S!=null&&(z=S.replace(ee,"$&/")+"/"),te(me,_,z,"",function(nt){return nt})):me!=null&&(Me(me)&&(me=ce(me,z+(!me.key||Ce&&Ce.key===me.key?"":(""+me.key).replace(ee,"$&/")+"/")+S)),_.push(me)),1;if(Ce=0,W=W===""?".":W+":",Q(S))for(var fe=0;fe<S.length;fe++){X=S[fe];var Ee=W+je(X,fe);Ce+=te(X,_,z,Ee,me)}else if(Ee=w(S),typeof Ee=="function")for(S=Ee.call(S),fe=0;!(X=S.next()).done;)X=X.value,Ee=W+je(X,fe++),Ce+=te(X,_,z,Ee,me);else if(X==="object")throw _=String(S),Error("Objects are not valid as a React child (found: "+(_==="[object Object]"?"object with keys {"+Object.keys(S).join(", ")+"}":_)+"). If you meant to render a collection of children, use an array instead.");return Ce}function ye(S,_,z){if(S==null)return S;var W=[],me=0;return te(S,W,"","",function(X){return _.call(z,X,me++)}),W}function Pe(S){if(S._status===-1){var _=S._result;_=_(),_.then(function(z){(S._status===0||S._status===-1)&&(S._status=1,S._result=z)},function(z){(S._status===0||S._status===-1)&&(S._status=2,S._result=z)}),S._status===-1&&(S._status=0,S._result=_)}if(S._status===1)return S._result.default;throw S._result}var Ne={current:null},H={transition:null},oe={ReactCurrentDispatcher:Ne,ReactCurrentBatchConfig:H,ReactCurrentOwner:I};function K(){throw Error("act(...) is not supported in production builds of React.")}return ze.Children={map:ye,forEach:function(S,_,z){ye(S,function(){_.apply(this,arguments)},z)},count:function(S){var _=0;return ye(S,function(){_++}),_},toArray:function(S){return ye(S,function(_){return _})||[]},only:function(S){if(!Me(S))throw Error("React.Children.only expected to receive a single React element child.");return S}},ze.Component=P,ze.Fragment=u,ze.Profiler=f,ze.PureComponent=ue,ze.StrictMode=d,ze.Suspense=p,ze.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=oe,ze.act=K,ze.cloneElement=function(S,_,z){if(S==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+S+".");var W=O({},S.props),me=S.key,X=S.ref,Ce=S._owner;if(_!=null){if(_.ref!==void 0&&(X=_.ref,Ce=I.current),_.key!==void 0&&(me=""+_.key),S.type&&S.type.defaultProps)var fe=S.type.defaultProps;for(Ee in _)U.call(_,Ee)&&!he.hasOwnProperty(Ee)&&(W[Ee]=_[Ee]===void 0&&fe!==void 0?fe[Ee]:_[Ee])}var Ee=arguments.length-2;if(Ee===1)W.children=z;else if(1<Ee){fe=Array(Ee);for(var nt=0;nt<Ee;nt++)fe[nt]=arguments[nt+2];W.children=fe}return{$$typeof:a,type:S.type,key:me,ref:X,props:W,_owner:Ce}},ze.createContext=function(S){return S={$$typeof:m,_currentValue:S,_currentValue2:S,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},S.Provider={$$typeof:v,_context:S},S.Consumer=S},ze.createElement=Se,ze.createFactory=function(S){var _=Se.bind(null,S);return _.type=S,_},ze.createRef=function(){return{current:null}},ze.forwardRef=function(S){return{$$typeof:g,render:S}},ze.isValidElement=Me,ze.lazy=function(S){return{$$typeof:C,_payload:{_status:-1,_result:S},_init:Pe}},ze.memo=function(S,_){return{$$typeof:y,type:S,compare:_===void 0?null:_}},ze.startTransition=function(S){var _=H.transition;H.transition={};try{S()}finally{H.transition=_}},ze.unstable_act=K,ze.useCallback=function(S,_){return Ne.current.useCallback(S,_)},ze.useContext=function(S){return Ne.current.useContext(S)},ze.useDebugValue=function(){},ze.useDeferredValue=function(S){return Ne.current.useDeferredValue(S)},ze.useEffect=function(S,_){return Ne.current.useEffect(S,_)},ze.useId=function(){return Ne.current.useId()},ze.useImperativeHandle=function(S,_,z){return Ne.current.useImperativeHandle(S,_,z)},ze.useInsertionEffect=function(S,_){return Ne.current.useInsertionEffect(S,_)},ze.useLayoutEffect=function(S,_){return Ne.current.useLayoutEffect(S,_)},ze.useMemo=function(S,_){return Ne.current.useMemo(S,_)},ze.useReducer=function(S,_,z){return Ne.current.useReducer(S,_,z)},ze.useRef=function(S){return Ne.current.useRef(S)},ze.useState=function(S){return Ne.current.useState(S)},ze.useSyncExternalStore=function(S,_,z){return Ne.current.useSyncExternalStore(S,_,z)},ze.useTransition=function(){return Ne.current.useTransition()},ze.version="18.3.1",ze}var lc;function Ss(){return lc||(lc=1,cs.exports=Wf()),cs.exports}/**
10
+ * @license React
11
+ * react-jsx-runtime.production.min.js
12
+ *
13
+ * Copyright (c) Facebook, Inc. and its affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var ac;function Vf(){if(ac)return no;ac=1;var a=Ss(),c=Symbol.for("react.element"),u=Symbol.for("react.fragment"),d=Object.prototype.hasOwnProperty,f=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,v={key:!0,ref:!0,__self:!0,__source:!0};function m(g,p,y){var C,E={},w=null,G=null;y!==void 0&&(w=""+y),p.key!==void 0&&(w=""+p.key),p.ref!==void 0&&(G=p.ref);for(C in p)d.call(p,C)&&!v.hasOwnProperty(C)&&(E[C]=p[C]);if(g&&g.defaultProps)for(C in p=g.defaultProps,p)E[C]===void 0&&(E[C]=p[C]);return{$$typeof:c,type:g,key:w,ref:G,props:E,_owner:f.current}}return no.Fragment=u,no.jsx=m,no.jsxs=m,no}var sc;function Gf(){return sc||(sc=1,us.exports=Vf()),us.exports}var s=Gf(),M=Ss();const Yf=ws(M);var gl={},ds={exports:{}},Et={},fs={exports:{}},ps={};/**
18
+ * @license React
19
+ * scheduler.production.min.js
20
+ *
21
+ * Copyright (c) Facebook, Inc. and its affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */var ic;function Kf(){return ic||(ic=1,(function(a){function c(H,oe){var K=H.length;H.push(oe);e:for(;0<K;){var S=K-1>>>1,_=H[S];if(0<f(_,oe))H[S]=oe,H[K]=_,K=S;else break e}}function u(H){return H.length===0?null:H[0]}function d(H){if(H.length===0)return null;var oe=H[0],K=H.pop();if(K!==oe){H[0]=K;e:for(var S=0,_=H.length,z=_>>>1;S<z;){var W=2*(S+1)-1,me=H[W],X=W+1,Ce=H[X];if(0>f(me,K))X<_&&0>f(Ce,me)?(H[S]=Ce,H[X]=K,S=X):(H[S]=me,H[W]=K,S=W);else if(X<_&&0>f(Ce,K))H[S]=Ce,H[X]=K,S=X;else break e}}return oe}function f(H,oe){var K=H.sortIndex-oe.sortIndex;return K!==0?K:H.id-oe.id}if(typeof performance=="object"&&typeof performance.now=="function"){var v=performance;a.unstable_now=function(){return v.now()}}else{var m=Date,g=m.now();a.unstable_now=function(){return m.now()-g}}var p=[],y=[],C=1,E=null,w=3,G=!1,O=!1,T=!1,P=typeof setTimeout=="function"?setTimeout:null,ie=typeof clearTimeout=="function"?clearTimeout:null,ue=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function F(H){for(var oe=u(y);oe!==null;){if(oe.callback===null)d(y);else if(oe.startTime<=H)d(y),oe.sortIndex=oe.expirationTime,c(p,oe);else break;oe=u(y)}}function Q(H){if(T=!1,F(H),!O)if(u(p)!==null)O=!0,Pe(U);else{var oe=u(y);oe!==null&&Ne(Q,oe.startTime-H)}}function U(H,oe){O=!1,T&&(T=!1,ie(Se),Se=-1),G=!0;var K=w;try{for(F(oe),E=u(p);E!==null&&(!(E.expirationTime>oe)||H&&!Fe());){var S=E.callback;if(typeof S=="function"){E.callback=null,w=E.priorityLevel;var _=S(E.expirationTime<=oe);oe=a.unstable_now(),typeof _=="function"?E.callback=_:E===u(p)&&d(p),F(oe)}else d(p);E=u(p)}if(E!==null)var z=!0;else{var W=u(y);W!==null&&Ne(Q,W.startTime-oe),z=!1}return z}finally{E=null,w=K,G=!1}}var I=!1,he=null,Se=-1,ce=5,Me=-1;function Fe(){return!(a.unstable_now()-Me<ce)}function ee(){if(he!==null){var H=a.unstable_now();Me=H;var oe=!0;try{oe=he(!0,H)}finally{oe?je():(I=!1,he=null)}}else I=!1}var je;if(typeof ue=="function")je=function(){ue(ee)};else if(typeof MessageChannel<"u"){var te=new MessageChannel,ye=te.port2;te.port1.onmessage=ee,je=function(){ye.postMessage(null)}}else je=function(){P(ee,0)};function Pe(H){he=H,I||(I=!0,je())}function Ne(H,oe){Se=P(function(){H(a.unstable_now())},oe)}a.unstable_IdlePriority=5,a.unstable_ImmediatePriority=1,a.unstable_LowPriority=4,a.unstable_NormalPriority=3,a.unstable_Profiling=null,a.unstable_UserBlockingPriority=2,a.unstable_cancelCallback=function(H){H.callback=null},a.unstable_continueExecution=function(){O||G||(O=!0,Pe(U))},a.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ce=0<H?Math.floor(1e3/H):5},a.unstable_getCurrentPriorityLevel=function(){return w},a.unstable_getFirstCallbackNode=function(){return u(p)},a.unstable_next=function(H){switch(w){case 1:case 2:case 3:var oe=3;break;default:oe=w}var K=w;w=oe;try{return H()}finally{w=K}},a.unstable_pauseExecution=function(){},a.unstable_requestPaint=function(){},a.unstable_runWithPriority=function(H,oe){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var K=w;w=H;try{return oe()}finally{w=K}},a.unstable_scheduleCallback=function(H,oe,K){var S=a.unstable_now();switch(typeof K=="object"&&K!==null?(K=K.delay,K=typeof K=="number"&&0<K?S+K:S):K=S,H){case 1:var _=-1;break;case 2:_=250;break;case 5:_=1073741823;break;case 4:_=1e4;break;default:_=5e3}return _=K+_,H={id:C++,callback:oe,priorityLevel:H,startTime:K,expirationTime:_,sortIndex:-1},K>S?(H.sortIndex=K,c(y,H),u(p)===null&&H===u(y)&&(T?(ie(Se),Se=-1):T=!0,Ne(Q,K-S))):(H.sortIndex=_,c(p,H),O||G||(O=!0,Pe(U))),H},a.unstable_shouldYield=Fe,a.unstable_wrapCallback=function(H){var oe=w;return function(){var K=w;w=oe;try{return H.apply(this,arguments)}finally{w=K}}}})(ps)),ps}var uc;function Qf(){return uc||(uc=1,fs.exports=Kf()),fs.exports}/**
26
+ * @license React
27
+ * react-dom.production.min.js
28
+ *
29
+ * Copyright (c) Facebook, Inc. and its affiliates.
30
+ *
31
+ * This source code is licensed under the MIT license found in the
32
+ * LICENSE file in the root directory of this source tree.
33
+ */var cc;function Xf(){if(cc)return Et;cc=1;var a=Ss(),c=Qf();function u(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var d=new Set,f={};function v(e,t){m(e,t),m(e+"Capture",t)}function m(e,t){for(f[e]=t,e=0;e<t.length;e++)d.add(t[e])}var g=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),p=Object.prototype.hasOwnProperty,y=/^[: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]*$/,C={},E={};function w(e){return p.call(E,e)?!0:p.call(C,e)?!1:y.test(e)?E[e]=!0:(C[e]=!0,!1)}function G(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function O(e,t,n,r){if(t===null||typeof t>"u"||G(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function T(e,t,n,r,o,l,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=l,this.removeEmptyString=i}var P={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){P[e]=new T(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];P[t]=new T(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){P[e]=new T(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){P[e]=new T(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){P[e]=new T(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){P[e]=new T(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){P[e]=new T(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){P[e]=new T(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){P[e]=new T(e,5,!1,e.toLowerCase(),null,!1,!1)});var ie=/[\-:]([a-z])/g;function ue(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(ie,ue);P[t]=new T(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(ie,ue);P[t]=new T(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(ie,ue);P[t]=new T(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){P[e]=new T(e,1,!1,e.toLowerCase(),null,!1,!1)}),P.xlinkHref=new T("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){P[e]=new T(e,1,!1,e.toLowerCase(),null,!0,!0)});function F(e,t,n,r){var o=P.hasOwnProperty(t)?P[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(O(t,n,o,r)&&(n=null),r||o===null?w(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=n===null?o.type===3?!1:"":n:(t=o.attributeName,r=o.attributeNamespace,n===null?e.removeAttribute(t):(o=o.type,n=o===3||o===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Q=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,U=Symbol.for("react.element"),I=Symbol.for("react.portal"),he=Symbol.for("react.fragment"),Se=Symbol.for("react.strict_mode"),ce=Symbol.for("react.profiler"),Me=Symbol.for("react.provider"),Fe=Symbol.for("react.context"),ee=Symbol.for("react.forward_ref"),je=Symbol.for("react.suspense"),te=Symbol.for("react.suspense_list"),ye=Symbol.for("react.memo"),Pe=Symbol.for("react.lazy"),Ne=Symbol.for("react.offscreen"),H=Symbol.iterator;function oe(e){return e===null||typeof e!="object"?null:(e=H&&e[H]||e["@@iterator"],typeof e=="function"?e:null)}var K=Object.assign,S;function _(e){if(S===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);S=t&&t[1]||""}return`
34
+ `+S+e}var z=!1;function W(e,t){if(!e||z)return"";z=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(N){var r=N}Reflect.construct(e,[],t)}else{try{t.call()}catch(N){r=N}e.call(t.prototype)}else{try{throw Error()}catch(N){r=N}e()}}catch(N){if(N&&r&&typeof N.stack=="string"){for(var o=N.stack.split(`
35
+ `),l=r.stack.split(`
36
+ `),i=o.length-1,h=l.length-1;1<=i&&0<=h&&o[i]!==l[h];)h--;for(;1<=i&&0<=h;i--,h--)if(o[i]!==l[h]){if(i!==1||h!==1)do if(i--,h--,0>h||o[i]!==l[h]){var x=`
37
+ `+o[i].replace(" at new "," at ");return e.displayName&&x.includes("<anonymous>")&&(x=x.replace("<anonymous>",e.displayName)),x}while(1<=i&&0<=h);break}}}finally{z=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?_(e):""}function me(e){switch(e.tag){case 5:return _(e.type);case 16:return _("Lazy");case 13:return _("Suspense");case 19:return _("SuspenseList");case 0:case 2:case 15:return e=W(e.type,!1),e;case 11:return e=W(e.type.render,!1),e;case 1:return e=W(e.type,!0),e;default:return""}}function X(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case he:return"Fragment";case I:return"Portal";case ce:return"Profiler";case Se:return"StrictMode";case je:return"Suspense";case te:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Fe:return(e.displayName||"Context")+".Consumer";case Me:return(e._context.displayName||"Context")+".Provider";case ee:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ye:return t=e.displayName||null,t!==null?t:X(e.type)||"Memo";case Pe:t=e._payload,e=e._init;try{return X(e(t))}catch{}}return null}function Ce(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return X(t);case 8:return t===Se?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function fe(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ee(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function nt(e){var t=Ee(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,l=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(i){r=""+i,l.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function nn(e){e._valueTracker||(e._valueTracker=nt(e))}function _e(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Ee(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function A(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Z(e,t){var n=t.checked;return K({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function J(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=fe(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function ke(e,t){t=t.checked,t!=null&&F(e,"checked",t,!1)}function pe(e,t){ke(e,t);var n=fe(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Ae(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ae(e,t.type,fe(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Te(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Ae(e,t,n){(t!=="number"||A(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Le=Array.isArray;function be(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+fe(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function Ye(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(u(91));return K({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Re(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(u(92));if(Le(n)){if(1<n.length)throw Error(u(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:fe(n)}}function Ue(e,t){var n=fe(t.value),r=fe(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function D(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function V(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ae(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?V(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Y,de=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Y=Y||document.createElement("div"),Y.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Y.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ve(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var De={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Ke=["Webkit","ms","Moz","O"];Object.keys(De).forEach(function(e){Ke.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),De[t]=De[e]})});function He(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||De.hasOwnProperty(e)&&De[e]?(""+t).trim():t+"px"}function qe(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=He(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var We=K({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function pt(e,t){if(t){if(We[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(u(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(u(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(u(61))}if(t.style!=null&&typeof t.style!="object")throw Error(u(62))}}function rt(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var At=null;function Lt(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var yt=null,Qt=null,Rt=null;function ao(e){if(e=Ur(e)){if(typeof yt!="function")throw Error(u(280));var t=e.stateNode;t&&(t=Po(t),yt(e.stateNode,e.type,t))}}function so(e){Qt?Rt?Rt.push(e):Rt=[e]:Qt=e}function mt(){if(Qt){var e=Qt,t=Rt;if(Rt=Qt=null,ao(e),t)for(e=0;e<t.length;e++)ao(t[e])}}function An(e,t){return e(t)}function kr(){}var Zn=!1;function wr(e,t,n){if(Zn)return e(t,n);Zn=!0;try{return An(e,t,n)}finally{Zn=!1,(Qt!==null||Rt!==null)&&(kr(),mt())}}function fn(e,t){var n=e.stateNode;if(n===null)return null;var r=Po(n);if(r===null)return null;n=r[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":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(u(231,t,typeof n));return n}var Sr=!1;if(g)try{var Ln={};Object.defineProperty(Ln,"passive",{get:function(){Sr=!0}}),window.addEventListener("test",Ln,Ln),window.removeEventListener("test",Ln,Ln)}catch{Sr=!1}function El(e,t,n,r,o,l,i,h,x){var N=Array.prototype.slice.call(arguments,3);try{t.apply(n,N)}catch(R){this.onError(R)}}var Rn=!1,io=null,uo=!1,Tl=null,Xc={onError:function(e){Rn=!0,io=e}};function Zc(e,t,n,r,o,l,i,h,x){Rn=!1,io=null,El.apply(Xc,arguments)}function qc(e,t,n,r,o,l,i,h,x){if(Zc.apply(this,arguments),Rn){if(Rn){var N=io;Rn=!1,io=null}else throw Error(u(198));uo||(uo=!0,Tl=N)}}function On(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Es(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 Ts(e){if(On(e)!==e)throw Error(u(188))}function Jc(e){var t=e.alternate;if(!t){if(t=On(e),t===null)throw Error(u(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var l=o.alternate;if(l===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===l.child){for(l=o.child;l;){if(l===n)return Ts(o),e;if(l===r)return Ts(o),t;l=l.sibling}throw Error(u(188))}if(n.return!==r.return)n=o,r=l;else{for(var i=!1,h=o.child;h;){if(h===n){i=!0,n=o,r=l;break}if(h===r){i=!0,r=o,n=l;break}h=h.sibling}if(!i){for(h=l.child;h;){if(h===n){i=!0,n=l,r=o;break}if(h===r){i=!0,r=l,n=o;break}h=h.sibling}if(!i)throw Error(u(189))}}if(n.alternate!==r)throw Error(u(190))}if(n.tag!==3)throw Error(u(188));return n.stateNode.current===n?e:t}function _s(e){return e=Jc(e),e!==null?Ms(e):null}function Ms(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Ms(e);if(t!==null)return t;e=e.sibling}return null}var Ps=c.unstable_scheduleCallback,zs=c.unstable_cancelCallback,ed=c.unstable_shouldYield,td=c.unstable_requestPaint,et=c.unstable_now,nd=c.unstable_getCurrentPriorityLevel,_l=c.unstable_ImmediatePriority,As=c.unstable_UserBlockingPriority,co=c.unstable_NormalPriority,rd=c.unstable_LowPriority,Ls=c.unstable_IdlePriority,fo=null,Xt=null;function od(e){if(Xt&&typeof Xt.onCommitFiberRoot=="function")try{Xt.onCommitFiberRoot(fo,e,void 0,(e.current.flags&128)===128)}catch{}}var Ht=Math.clz32?Math.clz32:sd,ld=Math.log,ad=Math.LN2;function sd(e){return e>>>=0,e===0?32:31-(ld(e)/ad|0)|0}var po=64,mo=4194304;function Cr(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ho(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,l=e.pingedLanes,i=n&268435455;if(i!==0){var h=i&~o;h!==0?r=Cr(h):(l&=i,l!==0&&(r=Cr(l)))}else i=n&~o,i!==0?r=Cr(i):l!==0&&(r=Cr(l));if(r===0)return 0;if(t!==0&&t!==r&&(t&o)===0&&(o=r&-r,l=t&-t,o>=l||o===16&&(l&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Ht(t),o=1<<n,r|=e[n],t&=~o;return r}function id(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ud(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,l=e.pendingLanes;0<l;){var i=31-Ht(l),h=1<<i,x=o[i];x===-1?((h&n)===0||(h&r)!==0)&&(o[i]=id(h,t)):x<=t&&(e.expiredLanes|=h),l&=~h}}function Ml(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Rs(){var e=po;return po<<=1,(po&4194240)===0&&(po=64),e}function Pl(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function jr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ht(t),e[t]=n}function cd(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-Ht(n),l=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~l}}function zl(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ht(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var $e=0;function Os(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var Is,Al,Ds,$s,Fs,Ll=!1,go=[],pn=null,mn=null,hn=null,br=new Map,Nr=new Map,gn=[],dd="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Us(e,t){switch(e){case"focusin":case"focusout":pn=null;break;case"dragenter":case"dragleave":mn=null;break;case"mouseover":case"mouseout":hn=null;break;case"pointerover":case"pointerout":br.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Nr.delete(t.pointerId)}}function Er(e,t,n,r,o,l){return e===null||e.nativeEvent!==l?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:l,targetContainers:[o]},t!==null&&(t=Ur(t),t!==null&&Al(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function fd(e,t,n,r,o){switch(t){case"focusin":return pn=Er(pn,e,t,n,r,o),!0;case"dragenter":return mn=Er(mn,e,t,n,r,o),!0;case"mouseover":return hn=Er(hn,e,t,n,r,o),!0;case"pointerover":var l=o.pointerId;return br.set(l,Er(br.get(l)||null,e,t,n,r,o)),!0;case"gotpointercapture":return l=o.pointerId,Nr.set(l,Er(Nr.get(l)||null,e,t,n,r,o)),!0}return!1}function Hs(e){var t=In(e.target);if(t!==null){var n=On(t);if(n!==null){if(t=n.tag,t===13){if(t=Es(n),t!==null){e.blockedOn=t,Fs(e.priority,function(){Ds(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function xo(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Ol(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);At=r,n.target.dispatchEvent(r),At=null}else return t=Ur(n),t!==null&&Al(t),e.blockedOn=n,!1;t.shift()}return!0}function Bs(e,t,n){xo(e)&&n.delete(t)}function pd(){Ll=!1,pn!==null&&xo(pn)&&(pn=null),mn!==null&&xo(mn)&&(mn=null),hn!==null&&xo(hn)&&(hn=null),br.forEach(Bs),Nr.forEach(Bs)}function Tr(e,t){e.blockedOn===t&&(e.blockedOn=null,Ll||(Ll=!0,c.unstable_scheduleCallback(c.unstable_NormalPriority,pd)))}function _r(e){function t(o){return Tr(o,e)}if(0<go.length){Tr(go[0],e);for(var n=1;n<go.length;n++){var r=go[n];r.blockedOn===e&&(r.blockedOn=null)}}for(pn!==null&&Tr(pn,e),mn!==null&&Tr(mn,e),hn!==null&&Tr(hn,e),br.forEach(t),Nr.forEach(t),n=0;n<gn.length;n++)r=gn[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<gn.length&&(n=gn[0],n.blockedOn===null);)Hs(n),n.blockedOn===null&&gn.shift()}var qn=Q.ReactCurrentBatchConfig,vo=!0;function md(e,t,n,r){var o=$e,l=qn.transition;qn.transition=null;try{$e=1,Rl(e,t,n,r)}finally{$e=o,qn.transition=l}}function hd(e,t,n,r){var o=$e,l=qn.transition;qn.transition=null;try{$e=4,Rl(e,t,n,r)}finally{$e=o,qn.transition=l}}function Rl(e,t,n,r){if(vo){var o=Ol(e,t,n,r);if(o===null)Jl(e,t,r,yo,n),Us(e,r);else if(fd(o,e,t,n,r))r.stopPropagation();else if(Us(e,r),t&4&&-1<dd.indexOf(e)){for(;o!==null;){var l=Ur(o);if(l!==null&&Is(l),l=Ol(e,t,n,r),l===null&&Jl(e,t,r,yo,n),l===o)break;o=l}o!==null&&r.stopPropagation()}else Jl(e,t,r,null,n)}}var yo=null;function Ol(e,t,n,r){if(yo=null,e=Lt(r),e=In(e),e!==null)if(t=On(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Es(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return yo=e,null}function Ws(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(nd()){case _l:return 1;case As:return 4;case co:case rd:return 16;case Ls:return 536870912;default:return 16}default:return 16}}var xn=null,Il=null,ko=null;function Vs(){if(ko)return ko;var e,t=Il,n=t.length,r,o="value"in xn?xn.value:xn.textContent,l=o.length;for(e=0;e<n&&t[e]===o[e];e++);var i=n-e;for(r=1;r<=i&&t[n-r]===o[l-r];r++);return ko=o.slice(e,1<r?1-r:void 0)}function wo(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 So(){return!0}function Gs(){return!1}function Tt(e){function t(n,r,o,l,i){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=l,this.target=i,this.currentTarget=null;for(var h in e)e.hasOwnProperty(h)&&(n=e[h],this[h]=n?n(l):l[h]);return this.isDefaultPrevented=(l.defaultPrevented!=null?l.defaultPrevented:l.returnValue===!1)?So:Gs,this.isPropagationStopped=Gs,this}return K(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=So)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=So)},persist:function(){},isPersistent:So}),t}var Jn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Dl=Tt(Jn),Mr=K({},Jn,{view:0,detail:0}),gd=Tt(Mr),$l,Fl,Pr,Co=K({},Mr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Hl,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!==Pr&&(Pr&&e.type==="mousemove"?($l=e.screenX-Pr.screenX,Fl=e.screenY-Pr.screenY):Fl=$l=0,Pr=e),$l)},movementY:function(e){return"movementY"in e?e.movementY:Fl}}),Ys=Tt(Co),xd=K({},Co,{dataTransfer:0}),vd=Tt(xd),yd=K({},Mr,{relatedTarget:0}),Ul=Tt(yd),kd=K({},Jn,{animationName:0,elapsedTime:0,pseudoElement:0}),wd=Tt(kd),Sd=K({},Jn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Cd=Tt(Sd),jd=K({},Jn,{data:0}),Ks=Tt(jd),bd={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Nd={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"},Ed={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Td(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Ed[e])?!!t[e]:!1}function Hl(){return Td}var _d=K({},Mr,{key:function(e){if(e.key){var t=bd[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=wo(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Nd[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Hl,charCode:function(e){return e.type==="keypress"?wo(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?wo(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Md=Tt(_d),Pd=K({},Co,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Qs=Tt(Pd),zd=K({},Mr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Hl}),Ad=Tt(zd),Ld=K({},Jn,{propertyName:0,elapsedTime:0,pseudoElement:0}),Rd=Tt(Ld),Od=K({},Co,{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}),Id=Tt(Od),Dd=[9,13,27,32],Bl=g&&"CompositionEvent"in window,zr=null;g&&"documentMode"in document&&(zr=document.documentMode);var $d=g&&"TextEvent"in window&&!zr,Xs=g&&(!Bl||zr&&8<zr&&11>=zr),Zs=" ",qs=!1;function Js(e,t){switch(e){case"keyup":return Dd.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ei(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var er=!1;function Fd(e,t){switch(e){case"compositionend":return ei(t);case"keypress":return t.which!==32?null:(qs=!0,Zs);case"textInput":return e=t.data,e===Zs&&qs?null:e;default:return null}}function Ud(e,t){if(er)return e==="compositionend"||!Bl&&Js(e,t)?(e=Vs(),ko=Il=xn=null,er=!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 Xs&&t.locale!=="ko"?null:t.data;default:return null}}var Hd={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 ti(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Hd[e.type]:t==="textarea"}function ni(e,t,n,r){so(r),t=To(t,"onChange"),0<t.length&&(n=new Dl("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Ar=null,Lr=null;function Bd(e){ki(e,0)}function jo(e){var t=lr(e);if(_e(t))return e}function Wd(e,t){if(e==="change")return t}var ri=!1;if(g){var Wl;if(g){var Vl="oninput"in document;if(!Vl){var oi=document.createElement("div");oi.setAttribute("oninput","return;"),Vl=typeof oi.oninput=="function"}Wl=Vl}else Wl=!1;ri=Wl&&(!document.documentMode||9<document.documentMode)}function li(){Ar&&(Ar.detachEvent("onpropertychange",ai),Lr=Ar=null)}function ai(e){if(e.propertyName==="value"&&jo(Lr)){var t=[];ni(t,Lr,e,Lt(e)),wr(Bd,t)}}function Vd(e,t,n){e==="focusin"?(li(),Ar=t,Lr=n,Ar.attachEvent("onpropertychange",ai)):e==="focusout"&&li()}function Gd(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return jo(Lr)}function Yd(e,t){if(e==="click")return jo(t)}function Kd(e,t){if(e==="input"||e==="change")return jo(t)}function Qd(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Bt=typeof Object.is=="function"?Object.is:Qd;function Rr(e,t){if(Bt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!p.call(t,o)||!Bt(e[o],t[o]))return!1}return!0}function si(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ii(e,t){var n=si(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=si(n)}}function ui(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ui(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ci(){for(var e=window,t=A();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=A(e.document)}return t}function Gl(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Xd(e){var t=ci(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&ui(n.ownerDocument.documentElement,n)){if(r!==null&&Gl(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,l=Math.min(r.start,o);r=r.end===void 0?l:Math.min(r.end,o),!e.extend&&l>r&&(o=r,r=l,l=o),o=ii(n,l);var i=ii(n,r);o&&i&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),l>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Zd=g&&"documentMode"in document&&11>=document.documentMode,tr=null,Yl=null,Or=null,Kl=!1;function di(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Kl||tr==null||tr!==A(r)||(r=tr,"selectionStart"in r&&Gl(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Or&&Rr(Or,r)||(Or=r,r=To(Yl,"onSelect"),0<r.length&&(t=new Dl("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=tr)))}function bo(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var nr={animationend:bo("Animation","AnimationEnd"),animationiteration:bo("Animation","AnimationIteration"),animationstart:bo("Animation","AnimationStart"),transitionend:bo("Transition","TransitionEnd")},Ql={},fi={};g&&(fi=document.createElement("div").style,"AnimationEvent"in window||(delete nr.animationend.animation,delete nr.animationiteration.animation,delete nr.animationstart.animation),"TransitionEvent"in window||delete nr.transitionend.transition);function No(e){if(Ql[e])return Ql[e];if(!nr[e])return e;var t=nr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in fi)return Ql[e]=t[n];return e}var pi=No("animationend"),mi=No("animationiteration"),hi=No("animationstart"),gi=No("transitionend"),xi=new Map,vi="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function vn(e,t){xi.set(e,t),v(t,[e])}for(var Xl=0;Xl<vi.length;Xl++){var Zl=vi[Xl],qd=Zl.toLowerCase(),Jd=Zl[0].toUpperCase()+Zl.slice(1);vn(qd,"on"+Jd)}vn(pi,"onAnimationEnd"),vn(mi,"onAnimationIteration"),vn(hi,"onAnimationStart"),vn("dblclick","onDoubleClick"),vn("focusin","onFocus"),vn("focusout","onBlur"),vn(gi,"onTransitionEnd"),m("onMouseEnter",["mouseout","mouseover"]),m("onMouseLeave",["mouseout","mouseover"]),m("onPointerEnter",["pointerout","pointerover"]),m("onPointerLeave",["pointerout","pointerover"]),v("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),v("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),v("onBeforeInput",["compositionend","keypress","textInput","paste"]),v("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),v("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),v("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ir="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(" "),ef=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ir));function yi(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,qc(r,t,void 0,e),e.currentTarget=null}function ki(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var l=void 0;if(t)for(var i=r.length-1;0<=i;i--){var h=r[i],x=h.instance,N=h.currentTarget;if(h=h.listener,x!==l&&o.isPropagationStopped())break e;yi(o,h,N),l=x}else for(i=0;i<r.length;i++){if(h=r[i],x=h.instance,N=h.currentTarget,h=h.listener,x!==l&&o.isPropagationStopped())break e;yi(o,h,N),l=x}}}if(uo)throw e=Tl,uo=!1,Tl=null,e}function Ve(e,t){var n=t[la];n===void 0&&(n=t[la]=new Set);var r=e+"__bubble";n.has(r)||(wi(t,e,2,!1),n.add(r))}function ql(e,t,n){var r=0;t&&(r|=4),wi(n,e,r,t)}var Eo="_reactListening"+Math.random().toString(36).slice(2);function Dr(e){if(!e[Eo]){e[Eo]=!0,d.forEach(function(n){n!=="selectionchange"&&(ef.has(n)||ql(n,!1,e),ql(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Eo]||(t[Eo]=!0,ql("selectionchange",!1,t))}}function wi(e,t,n,r){switch(Ws(t)){case 1:var o=md;break;case 4:o=hd;break;default:o=Rl}n=o.bind(null,t,n,e),o=void 0,!Sr||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function Jl(e,t,n,r,o){var l=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var i=r.tag;if(i===3||i===4){var h=r.stateNode.containerInfo;if(h===o||h.nodeType===8&&h.parentNode===o)break;if(i===4)for(i=r.return;i!==null;){var x=i.tag;if((x===3||x===4)&&(x=i.stateNode.containerInfo,x===o||x.nodeType===8&&x.parentNode===o))return;i=i.return}for(;h!==null;){if(i=In(h),i===null)return;if(x=i.tag,x===5||x===6){r=l=i;continue e}h=h.parentNode}}r=r.return}wr(function(){var N=l,R=Lt(n),$=[];e:{var L=xi.get(e);if(L!==void 0){var q=Dl,re=e;switch(e){case"keypress":if(wo(n)===0)break e;case"keydown":case"keyup":q=Md;break;case"focusin":re="focus",q=Ul;break;case"focusout":re="blur",q=Ul;break;case"beforeblur":case"afterblur":q=Ul;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":q=Ys;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":q=vd;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":q=Ad;break;case pi:case mi:case hi:q=wd;break;case gi:q=Rd;break;case"scroll":q=gd;break;case"wheel":q=Id;break;case"copy":case"cut":case"paste":q=Cd;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":q=Qs}var le=(t&4)!==0,tt=!le&&e==="scroll",j=le?L!==null?L+"Capture":null:L;le=[];for(var k=N,b;k!==null;){b=k;var B=b.stateNode;if(b.tag===5&&B!==null&&(b=B,j!==null&&(B=fn(k,j),B!=null&&le.push($r(k,B,b)))),tt)break;k=k.return}0<le.length&&(L=new q(L,re,null,n,R),$.push({event:L,listeners:le}))}}if((t&7)===0){e:{if(L=e==="mouseover"||e==="pointerover",q=e==="mouseout"||e==="pointerout",L&&n!==At&&(re=n.relatedTarget||n.fromElement)&&(In(re)||re[rn]))break e;if((q||L)&&(L=R.window===R?R:(L=R.ownerDocument)?L.defaultView||L.parentWindow:window,q?(re=n.relatedTarget||n.toElement,q=N,re=re?In(re):null,re!==null&&(tt=On(re),re!==tt||re.tag!==5&&re.tag!==6)&&(re=null)):(q=null,re=N),q!==re)){if(le=Ys,B="onMouseLeave",j="onMouseEnter",k="mouse",(e==="pointerout"||e==="pointerover")&&(le=Qs,B="onPointerLeave",j="onPointerEnter",k="pointer"),tt=q==null?L:lr(q),b=re==null?L:lr(re),L=new le(B,k+"leave",q,n,R),L.target=tt,L.relatedTarget=b,B=null,In(R)===N&&(le=new le(j,k+"enter",re,n,R),le.target=b,le.relatedTarget=tt,B=le),tt=B,q&&re)t:{for(le=q,j=re,k=0,b=le;b;b=rr(b))k++;for(b=0,B=j;B;B=rr(B))b++;for(;0<k-b;)le=rr(le),k--;for(;0<b-k;)j=rr(j),b--;for(;k--;){if(le===j||j!==null&&le===j.alternate)break t;le=rr(le),j=rr(j)}le=null}else le=null;q!==null&&Si($,L,q,le,!1),re!==null&&tt!==null&&Si($,tt,re,le,!0)}}e:{if(L=N?lr(N):window,q=L.nodeName&&L.nodeName.toLowerCase(),q==="select"||q==="input"&&L.type==="file")var se=Wd;else if(ti(L))if(ri)se=Kd;else{se=Gd;var ge=Vd}else(q=L.nodeName)&&q.toLowerCase()==="input"&&(L.type==="checkbox"||L.type==="radio")&&(se=Yd);if(se&&(se=se(e,N))){ni($,se,n,R);break e}ge&&ge(e,L,N),e==="focusout"&&(ge=L._wrapperState)&&ge.controlled&&L.type==="number"&&Ae(L,"number",L.value)}switch(ge=N?lr(N):window,e){case"focusin":(ti(ge)||ge.contentEditable==="true")&&(tr=ge,Yl=N,Or=null);break;case"focusout":Or=Yl=tr=null;break;case"mousedown":Kl=!0;break;case"contextmenu":case"mouseup":case"dragend":Kl=!1,di($,n,R);break;case"selectionchange":if(Zd)break;case"keydown":case"keyup":di($,n,R)}var xe;if(Bl)e:{switch(e){case"compositionstart":var we="onCompositionStart";break e;case"compositionend":we="onCompositionEnd";break e;case"compositionupdate":we="onCompositionUpdate";break e}we=void 0}else er?Js(e,n)&&(we="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(we="onCompositionStart");we&&(Xs&&n.locale!=="ko"&&(er||we!=="onCompositionStart"?we==="onCompositionEnd"&&er&&(xe=Vs()):(xn=R,Il="value"in xn?xn.value:xn.textContent,er=!0)),ge=To(N,we),0<ge.length&&(we=new Ks(we,e,null,n,R),$.push({event:we,listeners:ge}),xe?we.data=xe:(xe=ei(n),xe!==null&&(we.data=xe)))),(xe=$d?Fd(e,n):Ud(e,n))&&(N=To(N,"onBeforeInput"),0<N.length&&(R=new Ks("onBeforeInput","beforeinput",null,n,R),$.push({event:R,listeners:N}),R.data=xe))}ki($,t)})}function $r(e,t,n){return{instance:e,listener:t,currentTarget:n}}function To(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,l=o.stateNode;o.tag===5&&l!==null&&(o=l,l=fn(e,n),l!=null&&r.unshift($r(e,l,o)),l=fn(e,t),l!=null&&r.push($r(e,l,o))),e=e.return}return r}function rr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Si(e,t,n,r,o){for(var l=t._reactName,i=[];n!==null&&n!==r;){var h=n,x=h.alternate,N=h.stateNode;if(x!==null&&x===r)break;h.tag===5&&N!==null&&(h=N,o?(x=fn(n,l),x!=null&&i.unshift($r(n,x,h))):o||(x=fn(n,l),x!=null&&i.push($r(n,x,h)))),n=n.return}i.length!==0&&e.push({event:t,listeners:i})}var tf=/\r\n?/g,nf=/\u0000|\uFFFD/g;function Ci(e){return(typeof e=="string"?e:""+e).replace(tf,`
38
+ `).replace(nf,"")}function _o(e,t,n){if(t=Ci(t),Ci(e)!==t&&n)throw Error(u(425))}function Mo(){}var ea=null,ta=null;function na(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var ra=typeof setTimeout=="function"?setTimeout:void 0,rf=typeof clearTimeout=="function"?clearTimeout:void 0,ji=typeof Promise=="function"?Promise:void 0,of=typeof queueMicrotask=="function"?queueMicrotask:typeof ji<"u"?function(e){return ji.resolve(null).then(e).catch(lf)}:ra;function lf(e){setTimeout(function(){throw e})}function oa(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(r===0){e.removeChild(o),_r(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);_r(t)}function yn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function bi(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var or=Math.random().toString(36).slice(2),Zt="__reactFiber$"+or,Fr="__reactProps$"+or,rn="__reactContainer$"+or,la="__reactEvents$"+or,af="__reactListeners$"+or,sf="__reactHandles$"+or;function In(e){var t=e[Zt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[rn]||n[Zt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=bi(e);e!==null;){if(n=e[Zt])return n;e=bi(e)}return t}e=n,n=e.parentNode}return null}function Ur(e){return e=e[Zt]||e[rn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function lr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(u(33))}function Po(e){return e[Fr]||null}var aa=[],ar=-1;function kn(e){return{current:e}}function Ge(e){0>ar||(e.current=aa[ar],aa[ar]=null,ar--)}function Be(e,t){ar++,aa[ar]=e.current,e.current=t}var wn={},ht=kn(wn),St=kn(!1),Dn=wn;function sr(e,t){var n=e.type.contextTypes;if(!n)return wn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},l;for(l in n)o[l]=t[l];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Ct(e){return e=e.childContextTypes,e!=null}function zo(){Ge(St),Ge(ht)}function Ni(e,t,n){if(ht.current!==wn)throw Error(u(168));Be(ht,t),Be(St,n)}function Ei(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(u(108,Ce(e)||"Unknown",o));return K({},n,r)}function Ao(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||wn,Dn=ht.current,Be(ht,e),Be(St,St.current),!0}function Ti(e,t,n){var r=e.stateNode;if(!r)throw Error(u(169));n?(e=Ei(e,t,Dn),r.__reactInternalMemoizedMergedChildContext=e,Ge(St),Ge(ht),Be(ht,e)):Ge(St),Be(St,n)}var on=null,Lo=!1,sa=!1;function _i(e){on===null?on=[e]:on.push(e)}function uf(e){Lo=!0,_i(e)}function Sn(){if(!sa&&on!==null){sa=!0;var e=0,t=$e;try{var n=on;for($e=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}on=null,Lo=!1}catch(o){throw on!==null&&(on=on.slice(e+1)),Ps(_l,Sn),o}finally{$e=t,sa=!1}}return null}var ir=[],ur=0,Ro=null,Oo=0,Ot=[],It=0,$n=null,ln=1,an="";function Fn(e,t){ir[ur++]=Oo,ir[ur++]=Ro,Ro=e,Oo=t}function Mi(e,t,n){Ot[It++]=ln,Ot[It++]=an,Ot[It++]=$n,$n=e;var r=ln;e=an;var o=32-Ht(r)-1;r&=~(1<<o),n+=1;var l=32-Ht(t)+o;if(30<l){var i=o-o%5;l=(r&(1<<i)-1).toString(32),r>>=i,o-=i,ln=1<<32-Ht(t)+o|n<<o|r,an=l+e}else ln=1<<l|n<<o|r,an=e}function ia(e){e.return!==null&&(Fn(e,1),Mi(e,1,0))}function ua(e){for(;e===Ro;)Ro=ir[--ur],ir[ur]=null,Oo=ir[--ur],ir[ur]=null;for(;e===$n;)$n=Ot[--It],Ot[It]=null,an=Ot[--It],Ot[It]=null,ln=Ot[--It],Ot[It]=null}var _t=null,Mt=null,Qe=!1,Wt=null;function Pi(e,t){var n=Ut(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function zi(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,_t=e,Mt=yn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,_t=e,Mt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=$n!==null?{id:ln,overflow:an}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Ut(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,_t=e,Mt=null,!0):!1;default:return!1}}function ca(e){return(e.mode&1)!==0&&(e.flags&128)===0}function da(e){if(Qe){var t=Mt;if(t){var n=t;if(!zi(e,t)){if(ca(e))throw Error(u(418));t=yn(n.nextSibling);var r=_t;t&&zi(e,t)?Pi(r,n):(e.flags=e.flags&-4097|2,Qe=!1,_t=e)}}else{if(ca(e))throw Error(u(418));e.flags=e.flags&-4097|2,Qe=!1,_t=e}}}function Ai(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;_t=e}function Io(e){if(e!==_t)return!1;if(!Qe)return Ai(e),Qe=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!na(e.type,e.memoizedProps)),t&&(t=Mt)){if(ca(e))throw Li(),Error(u(418));for(;t;)Pi(e,t),t=yn(t.nextSibling)}if(Ai(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Mt=yn(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Mt=null}}else Mt=_t?yn(e.stateNode.nextSibling):null;return!0}function Li(){for(var e=Mt;e;)e=yn(e.nextSibling)}function cr(){Mt=_t=null,Qe=!1}function fa(e){Wt===null?Wt=[e]:Wt.push(e)}var cf=Q.ReactCurrentBatchConfig;function Hr(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(u(309));var r=n.stateNode}if(!r)throw Error(u(147,e));var o=r,l=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===l?t.ref:(t=function(i){var h=o.refs;i===null?delete h[l]:h[l]=i},t._stringRef=l,t)}if(typeof e!="string")throw Error(u(284));if(!n._owner)throw Error(u(290,e))}return e}function Do(e,t){throw e=Object.prototype.toString.call(t),Error(u(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Ri(e){var t=e._init;return t(e._payload)}function Oi(e){function t(j,k){if(e){var b=j.deletions;b===null?(j.deletions=[k],j.flags|=16):b.push(k)}}function n(j,k){if(!e)return null;for(;k!==null;)t(j,k),k=k.sibling;return null}function r(j,k){for(j=new Map;k!==null;)k.key!==null?j.set(k.key,k):j.set(k.index,k),k=k.sibling;return j}function o(j,k){return j=Mn(j,k),j.index=0,j.sibling=null,j}function l(j,k,b){return j.index=b,e?(b=j.alternate,b!==null?(b=b.index,b<k?(j.flags|=2,k):b):(j.flags|=2,k)):(j.flags|=1048576,k)}function i(j){return e&&j.alternate===null&&(j.flags|=2),j}function h(j,k,b,B){return k===null||k.tag!==6?(k=rs(b,j.mode,B),k.return=j,k):(k=o(k,b),k.return=j,k)}function x(j,k,b,B){var se=b.type;return se===he?R(j,k,b.props.children,B,b.key):k!==null&&(k.elementType===se||typeof se=="object"&&se!==null&&se.$$typeof===Pe&&Ri(se)===k.type)?(B=o(k,b.props),B.ref=Hr(j,k,b),B.return=j,B):(B=il(b.type,b.key,b.props,null,j.mode,B),B.ref=Hr(j,k,b),B.return=j,B)}function N(j,k,b,B){return k===null||k.tag!==4||k.stateNode.containerInfo!==b.containerInfo||k.stateNode.implementation!==b.implementation?(k=os(b,j.mode,B),k.return=j,k):(k=o(k,b.children||[]),k.return=j,k)}function R(j,k,b,B,se){return k===null||k.tag!==7?(k=Kn(b,j.mode,B,se),k.return=j,k):(k=o(k,b),k.return=j,k)}function $(j,k,b){if(typeof k=="string"&&k!==""||typeof k=="number")return k=rs(""+k,j.mode,b),k.return=j,k;if(typeof k=="object"&&k!==null){switch(k.$$typeof){case U:return b=il(k.type,k.key,k.props,null,j.mode,b),b.ref=Hr(j,null,k),b.return=j,b;case I:return k=os(k,j.mode,b),k.return=j,k;case Pe:var B=k._init;return $(j,B(k._payload),b)}if(Le(k)||oe(k))return k=Kn(k,j.mode,b,null),k.return=j,k;Do(j,k)}return null}function L(j,k,b,B){var se=k!==null?k.key:null;if(typeof b=="string"&&b!==""||typeof b=="number")return se!==null?null:h(j,k,""+b,B);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case U:return b.key===se?x(j,k,b,B):null;case I:return b.key===se?N(j,k,b,B):null;case Pe:return se=b._init,L(j,k,se(b._payload),B)}if(Le(b)||oe(b))return se!==null?null:R(j,k,b,B,null);Do(j,b)}return null}function q(j,k,b,B,se){if(typeof B=="string"&&B!==""||typeof B=="number")return j=j.get(b)||null,h(k,j,""+B,se);if(typeof B=="object"&&B!==null){switch(B.$$typeof){case U:return j=j.get(B.key===null?b:B.key)||null,x(k,j,B,se);case I:return j=j.get(B.key===null?b:B.key)||null,N(k,j,B,se);case Pe:var ge=B._init;return q(j,k,b,ge(B._payload),se)}if(Le(B)||oe(B))return j=j.get(b)||null,R(k,j,B,se,null);Do(k,B)}return null}function re(j,k,b,B){for(var se=null,ge=null,xe=k,we=k=0,ct=null;xe!==null&&we<b.length;we++){xe.index>we?(ct=xe,xe=null):ct=xe.sibling;var Ie=L(j,xe,b[we],B);if(Ie===null){xe===null&&(xe=ct);break}e&&xe&&Ie.alternate===null&&t(j,xe),k=l(Ie,k,we),ge===null?se=Ie:ge.sibling=Ie,ge=Ie,xe=ct}if(we===b.length)return n(j,xe),Qe&&Fn(j,we),se;if(xe===null){for(;we<b.length;we++)xe=$(j,b[we],B),xe!==null&&(k=l(xe,k,we),ge===null?se=xe:ge.sibling=xe,ge=xe);return Qe&&Fn(j,we),se}for(xe=r(j,xe);we<b.length;we++)ct=q(xe,j,we,b[we],B),ct!==null&&(e&&ct.alternate!==null&&xe.delete(ct.key===null?we:ct.key),k=l(ct,k,we),ge===null?se=ct:ge.sibling=ct,ge=ct);return e&&xe.forEach(function(Pn){return t(j,Pn)}),Qe&&Fn(j,we),se}function le(j,k,b,B){var se=oe(b);if(typeof se!="function")throw Error(u(150));if(b=se.call(b),b==null)throw Error(u(151));for(var ge=se=null,xe=k,we=k=0,ct=null,Ie=b.next();xe!==null&&!Ie.done;we++,Ie=b.next()){xe.index>we?(ct=xe,xe=null):ct=xe.sibling;var Pn=L(j,xe,Ie.value,B);if(Pn===null){xe===null&&(xe=ct);break}e&&xe&&Pn.alternate===null&&t(j,xe),k=l(Pn,k,we),ge===null?se=Pn:ge.sibling=Pn,ge=Pn,xe=ct}if(Ie.done)return n(j,xe),Qe&&Fn(j,we),se;if(xe===null){for(;!Ie.done;we++,Ie=b.next())Ie=$(j,Ie.value,B),Ie!==null&&(k=l(Ie,k,we),ge===null?se=Ie:ge.sibling=Ie,ge=Ie);return Qe&&Fn(j,we),se}for(xe=r(j,xe);!Ie.done;we++,Ie=b.next())Ie=q(xe,j,we,Ie.value,B),Ie!==null&&(e&&Ie.alternate!==null&&xe.delete(Ie.key===null?we:Ie.key),k=l(Ie,k,we),ge===null?se=Ie:ge.sibling=Ie,ge=Ie);return e&&xe.forEach(function(Bf){return t(j,Bf)}),Qe&&Fn(j,we),se}function tt(j,k,b,B){if(typeof b=="object"&&b!==null&&b.type===he&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case U:e:{for(var se=b.key,ge=k;ge!==null;){if(ge.key===se){if(se=b.type,se===he){if(ge.tag===7){n(j,ge.sibling),k=o(ge,b.props.children),k.return=j,j=k;break e}}else if(ge.elementType===se||typeof se=="object"&&se!==null&&se.$$typeof===Pe&&Ri(se)===ge.type){n(j,ge.sibling),k=o(ge,b.props),k.ref=Hr(j,ge,b),k.return=j,j=k;break e}n(j,ge);break}else t(j,ge);ge=ge.sibling}b.type===he?(k=Kn(b.props.children,j.mode,B,b.key),k.return=j,j=k):(B=il(b.type,b.key,b.props,null,j.mode,B),B.ref=Hr(j,k,b),B.return=j,j=B)}return i(j);case I:e:{for(ge=b.key;k!==null;){if(k.key===ge)if(k.tag===4&&k.stateNode.containerInfo===b.containerInfo&&k.stateNode.implementation===b.implementation){n(j,k.sibling),k=o(k,b.children||[]),k.return=j,j=k;break e}else{n(j,k);break}else t(j,k);k=k.sibling}k=os(b,j.mode,B),k.return=j,j=k}return i(j);case Pe:return ge=b._init,tt(j,k,ge(b._payload),B)}if(Le(b))return re(j,k,b,B);if(oe(b))return le(j,k,b,B);Do(j,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,k!==null&&k.tag===6?(n(j,k.sibling),k=o(k,b),k.return=j,j=k):(n(j,k),k=rs(b,j.mode,B),k.return=j,j=k),i(j)):n(j,k)}return tt}var dr=Oi(!0),Ii=Oi(!1),$o=kn(null),Fo=null,fr=null,pa=null;function ma(){pa=fr=Fo=null}function ha(e){var t=$o.current;Ge($o),e._currentValue=t}function ga(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function pr(e,t){Fo=e,pa=fr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(jt=!0),e.firstContext=null)}function Dt(e){var t=e._currentValue;if(pa!==e)if(e={context:e,memoizedValue:t,next:null},fr===null){if(Fo===null)throw Error(u(308));fr=e,Fo.dependencies={lanes:0,firstContext:e}}else fr=fr.next=e;return t}var Un=null;function xa(e){Un===null?Un=[e]:Un.push(e)}function Di(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,xa(t)):(n.next=o.next,o.next=n),t.interleaved=n,sn(e,r)}function sn(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Cn=!1;function va(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function $i(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function un(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function jn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(Oe&2)!==0){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,sn(e,n)}return o=r.interleaved,o===null?(t.next=t,xa(r)):(t.next=o.next,o.next=t),r.interleaved=t,sn(e,n)}function Uo(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,zl(e,n)}}function Fi(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,l=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};l===null?o=l=i:l=l.next=i,n=n.next}while(n!==null);l===null?o=l=t:l=l.next=t}else o=l=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:l,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Ho(e,t,n,r){var o=e.updateQueue;Cn=!1;var l=o.firstBaseUpdate,i=o.lastBaseUpdate,h=o.shared.pending;if(h!==null){o.shared.pending=null;var x=h,N=x.next;x.next=null,i===null?l=N:i.next=N,i=x;var R=e.alternate;R!==null&&(R=R.updateQueue,h=R.lastBaseUpdate,h!==i&&(h===null?R.firstBaseUpdate=N:h.next=N,R.lastBaseUpdate=x))}if(l!==null){var $=o.baseState;i=0,R=N=x=null,h=l;do{var L=h.lane,q=h.eventTime;if((r&L)===L){R!==null&&(R=R.next={eventTime:q,lane:0,tag:h.tag,payload:h.payload,callback:h.callback,next:null});e:{var re=e,le=h;switch(L=t,q=n,le.tag){case 1:if(re=le.payload,typeof re=="function"){$=re.call(q,$,L);break e}$=re;break e;case 3:re.flags=re.flags&-65537|128;case 0:if(re=le.payload,L=typeof re=="function"?re.call(q,$,L):re,L==null)break e;$=K({},$,L);break e;case 2:Cn=!0}}h.callback!==null&&h.lane!==0&&(e.flags|=64,L=o.effects,L===null?o.effects=[h]:L.push(h))}else q={eventTime:q,lane:L,tag:h.tag,payload:h.payload,callback:h.callback,next:null},R===null?(N=R=q,x=$):R=R.next=q,i|=L;if(h=h.next,h===null){if(h=o.shared.pending,h===null)break;L=h,h=L.next,L.next=null,o.lastBaseUpdate=L,o.shared.pending=null}}while(!0);if(R===null&&(x=$),o.baseState=x,o.firstBaseUpdate=N,o.lastBaseUpdate=R,t=o.shared.interleaved,t!==null){o=t;do i|=o.lane,o=o.next;while(o!==t)}else l===null&&(o.shared.lanes=0);Wn|=i,e.lanes=i,e.memoizedState=$}}function Ui(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(o!==null){if(r.callback=null,r=n,typeof o!="function")throw Error(u(191,o));o.call(r)}}}var Br={},qt=kn(Br),Wr=kn(Br),Vr=kn(Br);function Hn(e){if(e===Br)throw Error(u(174));return e}function ya(e,t){switch(Be(Vr,t),Be(Wr,e),Be(qt,Br),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ae(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=ae(t,e)}Ge(qt),Be(qt,t)}function mr(){Ge(qt),Ge(Wr),Ge(Vr)}function Hi(e){Hn(Vr.current);var t=Hn(qt.current),n=ae(t,e.type);t!==n&&(Be(Wr,e),Be(qt,n))}function ka(e){Wr.current===e&&(Ge(qt),Ge(Wr))}var Xe=kn(0);function Bo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==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 wa=[];function Sa(){for(var e=0;e<wa.length;e++)wa[e]._workInProgressVersionPrimary=null;wa.length=0}var Wo=Q.ReactCurrentDispatcher,Ca=Q.ReactCurrentBatchConfig,Bn=0,Ze=null,at=null,it=null,Vo=!1,Gr=!1,Yr=0,df=0;function gt(){throw Error(u(321))}function ja(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Bt(e[n],t[n]))return!1;return!0}function ba(e,t,n,r,o,l){if(Bn=l,Ze=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Wo.current=e===null||e.memoizedState===null?hf:gf,e=n(r,o),Gr){l=0;do{if(Gr=!1,Yr=0,25<=l)throw Error(u(301));l+=1,it=at=null,t.updateQueue=null,Wo.current=xf,e=n(r,o)}while(Gr)}if(Wo.current=Ko,t=at!==null&&at.next!==null,Bn=0,it=at=Ze=null,Vo=!1,t)throw Error(u(300));return e}function Na(){var e=Yr!==0;return Yr=0,e}function Jt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return it===null?Ze.memoizedState=it=e:it=it.next=e,it}function $t(){if(at===null){var e=Ze.alternate;e=e!==null?e.memoizedState:null}else e=at.next;var t=it===null?Ze.memoizedState:it.next;if(t!==null)it=t,at=e;else{if(e===null)throw Error(u(310));at=e,e={memoizedState:at.memoizedState,baseState:at.baseState,baseQueue:at.baseQueue,queue:at.queue,next:null},it===null?Ze.memoizedState=it=e:it=it.next=e}return it}function Kr(e,t){return typeof t=="function"?t(e):t}function Ea(e){var t=$t(),n=t.queue;if(n===null)throw Error(u(311));n.lastRenderedReducer=e;var r=at,o=r.baseQueue,l=n.pending;if(l!==null){if(o!==null){var i=o.next;o.next=l.next,l.next=i}r.baseQueue=o=l,n.pending=null}if(o!==null){l=o.next,r=r.baseState;var h=i=null,x=null,N=l;do{var R=N.lane;if((Bn&R)===R)x!==null&&(x=x.next={lane:0,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null}),r=N.hasEagerState?N.eagerState:e(r,N.action);else{var $={lane:R,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null};x===null?(h=x=$,i=r):x=x.next=$,Ze.lanes|=R,Wn|=R}N=N.next}while(N!==null&&N!==l);x===null?i=r:x.next=h,Bt(r,t.memoizedState)||(jt=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=x,n.lastRenderedState=r}if(e=n.interleaved,e!==null){o=e;do l=o.lane,Ze.lanes|=l,Wn|=l,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Ta(e){var t=$t(),n=t.queue;if(n===null)throw Error(u(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,l=t.memoizedState;if(o!==null){n.pending=null;var i=o=o.next;do l=e(l,i.action),i=i.next;while(i!==o);Bt(l,t.memoizedState)||(jt=!0),t.memoizedState=l,t.baseQueue===null&&(t.baseState=l),n.lastRenderedState=l}return[l,r]}function Bi(){}function Wi(e,t){var n=Ze,r=$t(),o=t(),l=!Bt(r.memoizedState,o);if(l&&(r.memoizedState=o,jt=!0),r=r.queue,_a(Yi.bind(null,n,r,e),[e]),r.getSnapshot!==t||l||it!==null&&it.memoizedState.tag&1){if(n.flags|=2048,Qr(9,Gi.bind(null,n,r,o,t),void 0,null),ut===null)throw Error(u(349));(Bn&30)!==0||Vi(n,t,o)}return o}function Vi(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ze.updateQueue,t===null?(t={lastEffect:null,stores:null},Ze.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Gi(e,t,n,r){t.value=n,t.getSnapshot=r,Ki(t)&&Qi(e)}function Yi(e,t,n){return n(function(){Ki(t)&&Qi(e)})}function Ki(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Bt(e,n)}catch{return!0}}function Qi(e){var t=sn(e,1);t!==null&&Kt(t,e,1,-1)}function Xi(e){var t=Jt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Kr,lastRenderedState:e},t.queue=e,e=e.dispatch=mf.bind(null,Ze,e),[t.memoizedState,e]}function Qr(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Ze.updateQueue,t===null?(t={lastEffect:null,stores:null},Ze.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function Zi(){return $t().memoizedState}function Go(e,t,n,r){var o=Jt();Ze.flags|=e,o.memoizedState=Qr(1|t,n,void 0,r===void 0?null:r)}function Yo(e,t,n,r){var o=$t();r=r===void 0?null:r;var l=void 0;if(at!==null){var i=at.memoizedState;if(l=i.destroy,r!==null&&ja(r,i.deps)){o.memoizedState=Qr(t,n,l,r);return}}Ze.flags|=e,o.memoizedState=Qr(1|t,n,l,r)}function qi(e,t){return Go(8390656,8,e,t)}function _a(e,t){return Yo(2048,8,e,t)}function Ji(e,t){return Yo(4,2,e,t)}function eu(e,t){return Yo(4,4,e,t)}function tu(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function nu(e,t,n){return n=n!=null?n.concat([e]):null,Yo(4,4,tu.bind(null,t,e),n)}function Ma(){}function ru(e,t){var n=$t();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&ja(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ou(e,t){var n=$t();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&ja(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function lu(e,t,n){return(Bn&21)===0?(e.baseState&&(e.baseState=!1,jt=!0),e.memoizedState=n):(Bt(n,t)||(n=Rs(),Ze.lanes|=n,Wn|=n,e.baseState=!0),t)}function ff(e,t){var n=$e;$e=n!==0&&4>n?n:4,e(!0);var r=Ca.transition;Ca.transition={};try{e(!1),t()}finally{$e=n,Ca.transition=r}}function au(){return $t().memoizedState}function pf(e,t,n){var r=Tn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},su(e))iu(t,n);else if(n=Di(e,t,n,r),n!==null){var o=wt();Kt(n,e,r,o),uu(n,t,r)}}function mf(e,t,n){var r=Tn(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(su(e))iu(t,o);else{var l=e.alternate;if(e.lanes===0&&(l===null||l.lanes===0)&&(l=t.lastRenderedReducer,l!==null))try{var i=t.lastRenderedState,h=l(i,n);if(o.hasEagerState=!0,o.eagerState=h,Bt(h,i)){var x=t.interleaved;x===null?(o.next=o,xa(t)):(o.next=x.next,x.next=o),t.interleaved=o;return}}catch{}finally{}n=Di(e,t,o,r),n!==null&&(o=wt(),Kt(n,e,r,o),uu(n,t,r))}}function su(e){var t=e.alternate;return e===Ze||t!==null&&t===Ze}function iu(e,t){Gr=Vo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function uu(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,zl(e,n)}}var Ko={readContext:Dt,useCallback:gt,useContext:gt,useEffect:gt,useImperativeHandle:gt,useInsertionEffect:gt,useLayoutEffect:gt,useMemo:gt,useReducer:gt,useRef:gt,useState:gt,useDebugValue:gt,useDeferredValue:gt,useTransition:gt,useMutableSource:gt,useSyncExternalStore:gt,useId:gt,unstable_isNewReconciler:!1},hf={readContext:Dt,useCallback:function(e,t){return Jt().memoizedState=[e,t===void 0?null:t],e},useContext:Dt,useEffect:qi,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Go(4194308,4,tu.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Go(4194308,4,e,t)},useInsertionEffect:function(e,t){return Go(4,2,e,t)},useMemo:function(e,t){var n=Jt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Jt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=pf.bind(null,Ze,e),[r.memoizedState,e]},useRef:function(e){var t=Jt();return e={current:e},t.memoizedState=e},useState:Xi,useDebugValue:Ma,useDeferredValue:function(e){return Jt().memoizedState=e},useTransition:function(){var e=Xi(!1),t=e[0];return e=ff.bind(null,e[1]),Jt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ze,o=Jt();if(Qe){if(n===void 0)throw Error(u(407));n=n()}else{if(n=t(),ut===null)throw Error(u(349));(Bn&30)!==0||Vi(r,t,n)}o.memoizedState=n;var l={value:n,getSnapshot:t};return o.queue=l,qi(Yi.bind(null,r,l,e),[e]),r.flags|=2048,Qr(9,Gi.bind(null,r,l,n,t),void 0,null),n},useId:function(){var e=Jt(),t=ut.identifierPrefix;if(Qe){var n=an,r=ln;n=(r&~(1<<32-Ht(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Yr++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=df++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},gf={readContext:Dt,useCallback:ru,useContext:Dt,useEffect:_a,useImperativeHandle:nu,useInsertionEffect:Ji,useLayoutEffect:eu,useMemo:ou,useReducer:Ea,useRef:Zi,useState:function(){return Ea(Kr)},useDebugValue:Ma,useDeferredValue:function(e){var t=$t();return lu(t,at.memoizedState,e)},useTransition:function(){var e=Ea(Kr)[0],t=$t().memoizedState;return[e,t]},useMutableSource:Bi,useSyncExternalStore:Wi,useId:au,unstable_isNewReconciler:!1},xf={readContext:Dt,useCallback:ru,useContext:Dt,useEffect:_a,useImperativeHandle:nu,useInsertionEffect:Ji,useLayoutEffect:eu,useMemo:ou,useReducer:Ta,useRef:Zi,useState:function(){return Ta(Kr)},useDebugValue:Ma,useDeferredValue:function(e){var t=$t();return at===null?t.memoizedState=e:lu(t,at.memoizedState,e)},useTransition:function(){var e=Ta(Kr)[0],t=$t().memoizedState;return[e,t]},useMutableSource:Bi,useSyncExternalStore:Wi,useId:au,unstable_isNewReconciler:!1};function Vt(e,t){if(e&&e.defaultProps){t=K({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Pa(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:K({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Qo={isMounted:function(e){return(e=e._reactInternals)?On(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=wt(),o=Tn(e),l=un(r,o);l.payload=t,n!=null&&(l.callback=n),t=jn(e,l,o),t!==null&&(Kt(t,e,o,r),Uo(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=wt(),o=Tn(e),l=un(r,o);l.tag=1,l.payload=t,n!=null&&(l.callback=n),t=jn(e,l,o),t!==null&&(Kt(t,e,o,r),Uo(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=wt(),r=Tn(e),o=un(n,r);o.tag=2,t!=null&&(o.callback=t),t=jn(e,o,r),t!==null&&(Kt(t,e,r,n),Uo(t,e,r))}};function cu(e,t,n,r,o,l,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,l,i):t.prototype&&t.prototype.isPureReactComponent?!Rr(n,r)||!Rr(o,l):!0}function du(e,t,n){var r=!1,o=wn,l=t.contextType;return typeof l=="object"&&l!==null?l=Dt(l):(o=Ct(t)?Dn:ht.current,r=t.contextTypes,l=(r=r!=null)?sr(e,o):wn),t=new t(n,l),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Qo,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=l),t}function fu(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Qo.enqueueReplaceState(t,t.state,null)}function za(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},va(e);var l=t.contextType;typeof l=="object"&&l!==null?o.context=Dt(l):(l=Ct(t)?Dn:ht.current,o.context=sr(e,l)),o.state=e.memoizedState,l=t.getDerivedStateFromProps,typeof l=="function"&&(Pa(e,t,l,n),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&Qo.enqueueReplaceState(o,o.state,null),Ho(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function hr(e,t){try{var n="",r=t;do n+=me(r),r=r.return;while(r);var o=n}catch(l){o=`
39
+ Error generating stack: `+l.message+`
40
+ `+l.stack}return{value:e,source:t,stack:o,digest:null}}function Aa(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function La(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var vf=typeof WeakMap=="function"?WeakMap:Map;function pu(e,t,n){n=un(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){nl||(nl=!0,Qa=r),La(e,t)},n}function mu(e,t,n){n=un(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){La(e,t)}}var l=e.stateNode;return l!==null&&typeof l.componentDidCatch=="function"&&(n.callback=function(){La(e,t),typeof r!="function"&&(Nn===null?Nn=new Set([this]):Nn.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),n}function hu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new vf;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=zf.bind(null,e,t,n),t.then(e,e))}function gu(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function xu(e,t,n,r,o){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=un(-1,1),t.tag=2,jn(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=o,e)}var yf=Q.ReactCurrentOwner,jt=!1;function kt(e,t,n,r){t.child=e===null?Ii(t,null,n,r):dr(t,e.child,n,r)}function vu(e,t,n,r,o){n=n.render;var l=t.ref;return pr(t,o),r=ba(e,t,n,r,l,o),n=Na(),e!==null&&!jt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,cn(e,t,o)):(Qe&&n&&ia(t),t.flags|=1,kt(e,t,r,o),t.child)}function yu(e,t,n,r,o){if(e===null){var l=n.type;return typeof l=="function"&&!ns(l)&&l.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=l,ku(e,t,l,r,o)):(e=il(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(l=e.child,(e.lanes&o)===0){var i=l.memoizedProps;if(n=n.compare,n=n!==null?n:Rr,n(i,r)&&e.ref===t.ref)return cn(e,t,o)}return t.flags|=1,e=Mn(l,r),e.ref=t.ref,e.return=t,t.child=e}function ku(e,t,n,r,o){if(e!==null){var l=e.memoizedProps;if(Rr(l,r)&&e.ref===t.ref)if(jt=!1,t.pendingProps=r=l,(e.lanes&o)!==0)(e.flags&131072)!==0&&(jt=!0);else return t.lanes=e.lanes,cn(e,t,o)}return Ra(e,t,n,r,o)}function wu(e,t,n){var r=t.pendingProps,o=r.children,l=e!==null?e.memoizedState:null;if(r.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Be(xr,Pt),Pt|=n;else{if((n&1073741824)===0)return e=l!==null?l.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Be(xr,Pt),Pt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=l!==null?l.baseLanes:n,Be(xr,Pt),Pt|=r}else l!==null?(r=l.baseLanes|n,t.memoizedState=null):r=n,Be(xr,Pt),Pt|=r;return kt(e,t,o,n),t.child}function Su(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ra(e,t,n,r,o){var l=Ct(n)?Dn:ht.current;return l=sr(t,l),pr(t,o),n=ba(e,t,n,r,l,o),r=Na(),e!==null&&!jt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,cn(e,t,o)):(Qe&&r&&ia(t),t.flags|=1,kt(e,t,n,o),t.child)}function Cu(e,t,n,r,o){if(Ct(n)){var l=!0;Ao(t)}else l=!1;if(pr(t,o),t.stateNode===null)Zo(e,t),du(t,n,r),za(t,n,r,o),r=!0;else if(e===null){var i=t.stateNode,h=t.memoizedProps;i.props=h;var x=i.context,N=n.contextType;typeof N=="object"&&N!==null?N=Dt(N):(N=Ct(n)?Dn:ht.current,N=sr(t,N));var R=n.getDerivedStateFromProps,$=typeof R=="function"||typeof i.getSnapshotBeforeUpdate=="function";$||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(h!==r||x!==N)&&fu(t,i,r,N),Cn=!1;var L=t.memoizedState;i.state=L,Ho(t,r,i,o),x=t.memoizedState,h!==r||L!==x||St.current||Cn?(typeof R=="function"&&(Pa(t,n,R,r),x=t.memoizedState),(h=Cn||cu(t,n,h,r,L,x,N))?($||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=r,t.memoizedState=x),i.props=r,i.state=x,i.context=N,r=h):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,$i(e,t),h=t.memoizedProps,N=t.type===t.elementType?h:Vt(t.type,h),i.props=N,$=t.pendingProps,L=i.context,x=n.contextType,typeof x=="object"&&x!==null?x=Dt(x):(x=Ct(n)?Dn:ht.current,x=sr(t,x));var q=n.getDerivedStateFromProps;(R=typeof q=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(h!==$||L!==x)&&fu(t,i,r,x),Cn=!1,L=t.memoizedState,i.state=L,Ho(t,r,i,o);var re=t.memoizedState;h!==$||L!==re||St.current||Cn?(typeof q=="function"&&(Pa(t,n,q,r),re=t.memoizedState),(N=Cn||cu(t,n,N,r,L,re,x)||!1)?(R||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,re,x),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,re,x)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||h===e.memoizedProps&&L===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&L===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=re),i.props=r,i.state=re,i.context=x,r=N):(typeof i.componentDidUpdate!="function"||h===e.memoizedProps&&L===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&L===e.memoizedState||(t.flags|=1024),r=!1)}return Oa(e,t,n,r,l,o)}function Oa(e,t,n,r,o,l){Su(e,t);var i=(t.flags&128)!==0;if(!r&&!i)return o&&Ti(t,n,!1),cn(e,t,l);r=t.stateNode,yf.current=t;var h=i&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&i?(t.child=dr(t,e.child,null,l),t.child=dr(t,null,h,l)):kt(e,t,h,l),t.memoizedState=r.state,o&&Ti(t,n,!0),t.child}function ju(e){var t=e.stateNode;t.pendingContext?Ni(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Ni(e,t.context,!1),ya(e,t.containerInfo)}function bu(e,t,n,r,o){return cr(),fa(o),t.flags|=256,kt(e,t,n,r),t.child}var Ia={dehydrated:null,treeContext:null,retryLane:0};function Da(e){return{baseLanes:e,cachePool:null,transitions:null}}function Nu(e,t,n){var r=t.pendingProps,o=Xe.current,l=!1,i=(t.flags&128)!==0,h;if((h=i)||(h=e!==null&&e.memoizedState===null?!1:(o&2)!==0),h?(l=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),Be(Xe,o&1),e===null)return da(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(i=r.children,e=r.fallback,l?(r=t.mode,l=t.child,i={mode:"hidden",children:i},(r&1)===0&&l!==null?(l.childLanes=0,l.pendingProps=i):l=ul(i,r,0,null),e=Kn(e,r,n,null),l.return=t,e.return=t,l.sibling=e,t.child=l,t.child.memoizedState=Da(n),t.memoizedState=Ia,e):$a(t,i));if(o=e.memoizedState,o!==null&&(h=o.dehydrated,h!==null))return kf(e,t,i,r,h,o,n);if(l){l=r.fallback,i=t.mode,o=e.child,h=o.sibling;var x={mode:"hidden",children:r.children};return(i&1)===0&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=x,t.deletions=null):(r=Mn(o,x),r.subtreeFlags=o.subtreeFlags&14680064),h!==null?l=Mn(h,l):(l=Kn(l,i,n,null),l.flags|=2),l.return=t,r.return=t,r.sibling=l,t.child=r,r=l,l=t.child,i=e.child.memoizedState,i=i===null?Da(n):{baseLanes:i.baseLanes|n,cachePool:null,transitions:i.transitions},l.memoizedState=i,l.childLanes=e.childLanes&~n,t.memoizedState=Ia,r}return l=e.child,e=l.sibling,r=Mn(l,{mode:"visible",children:r.children}),(t.mode&1)===0&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function $a(e,t){return t=ul({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Xo(e,t,n,r){return r!==null&&fa(r),dr(t,e.child,null,n),e=$a(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function kf(e,t,n,r,o,l,i){if(n)return t.flags&256?(t.flags&=-257,r=Aa(Error(u(422))),Xo(e,t,i,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(l=r.fallback,o=t.mode,r=ul({mode:"visible",children:r.children},o,0,null),l=Kn(l,o,i,null),l.flags|=2,r.return=t,l.return=t,r.sibling=l,t.child=r,(t.mode&1)!==0&&dr(t,e.child,null,i),t.child.memoizedState=Da(i),t.memoizedState=Ia,l);if((t.mode&1)===0)return Xo(e,t,i,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var h=r.dgst;return r=h,l=Error(u(419)),r=Aa(l,r,void 0),Xo(e,t,i,r)}if(h=(i&e.childLanes)!==0,jt||h){if(r=ut,r!==null){switch(i&-i){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=(o&(r.suspendedLanes|i))!==0?0:o,o!==0&&o!==l.retryLane&&(l.retryLane=o,sn(e,o),Kt(r,e,o,-1))}return ts(),r=Aa(Error(u(421))),Xo(e,t,i,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=Af.bind(null,e),o._reactRetry=t,null):(e=l.treeContext,Mt=yn(o.nextSibling),_t=t,Qe=!0,Wt=null,e!==null&&(Ot[It++]=ln,Ot[It++]=an,Ot[It++]=$n,ln=e.id,an=e.overflow,$n=t),t=$a(t,r.children),t.flags|=4096,t)}function Eu(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ga(e.return,t,n)}function Fa(e,t,n,r,o){var l=e.memoizedState;l===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(l.isBackwards=t,l.rendering=null,l.renderingStartTime=0,l.last=r,l.tail=n,l.tailMode=o)}function Tu(e,t,n){var r=t.pendingProps,o=r.revealOrder,l=r.tail;if(kt(e,t,r.children,n),r=Xe.current,(r&2)!==0)r=r&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Eu(e,n,t);else if(e.tag===19)Eu(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Be(Xe,r),(t.mode&1)===0)t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&Bo(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Fa(t,!1,o,n,l);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&Bo(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Fa(t,!0,n,null,l);break;case"together":Fa(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Zo(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function cn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Wn|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(u(153));if(t.child!==null){for(e=t.child,n=Mn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Mn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function wf(e,t,n){switch(t.tag){case 3:ju(t),cr();break;case 5:Hi(t);break;case 1:Ct(t.type)&&Ao(t);break;case 4:ya(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;Be($o,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Be(Xe,Xe.current&1),t.flags|=128,null):(n&t.child.childLanes)!==0?Nu(e,t,n):(Be(Xe,Xe.current&1),e=cn(e,t,n),e!==null?e.sibling:null);Be(Xe,Xe.current&1);break;case 19:if(r=(n&t.childLanes)!==0,(e.flags&128)!==0){if(r)return Tu(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),Be(Xe,Xe.current),r)break;return null;case 22:case 23:return t.lanes=0,wu(e,t,n)}return cn(e,t,n)}var _u,Ua,Mu,Pu;_u=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Ua=function(){},Mu=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Hn(qt.current);var l=null;switch(n){case"input":o=Z(e,o),r=Z(e,r),l=[];break;case"select":o=K({},o,{value:void 0}),r=K({},r,{value:void 0}),l=[];break;case"textarea":o=Ye(e,o),r=Ye(e,r),l=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Mo)}pt(n,r);var i;n=null;for(N in o)if(!r.hasOwnProperty(N)&&o.hasOwnProperty(N)&&o[N]!=null)if(N==="style"){var h=o[N];for(i in h)h.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else N!=="dangerouslySetInnerHTML"&&N!=="children"&&N!=="suppressContentEditableWarning"&&N!=="suppressHydrationWarning"&&N!=="autoFocus"&&(f.hasOwnProperty(N)?l||(l=[]):(l=l||[]).push(N,null));for(N in r){var x=r[N];if(h=o!=null?o[N]:void 0,r.hasOwnProperty(N)&&x!==h&&(x!=null||h!=null))if(N==="style")if(h){for(i in h)!h.hasOwnProperty(i)||x&&x.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in x)x.hasOwnProperty(i)&&h[i]!==x[i]&&(n||(n={}),n[i]=x[i])}else n||(l||(l=[]),l.push(N,n)),n=x;else N==="dangerouslySetInnerHTML"?(x=x?x.__html:void 0,h=h?h.__html:void 0,x!=null&&h!==x&&(l=l||[]).push(N,x)):N==="children"?typeof x!="string"&&typeof x!="number"||(l=l||[]).push(N,""+x):N!=="suppressContentEditableWarning"&&N!=="suppressHydrationWarning"&&(f.hasOwnProperty(N)?(x!=null&&N==="onScroll"&&Ve("scroll",e),l||h===x||(l=[])):(l=l||[]).push(N,x))}n&&(l=l||[]).push("style",n);var N=l;(t.updateQueue=N)&&(t.flags|=4)}},Pu=function(e,t,n,r){n!==r&&(t.flags|=4)};function Xr(e,t){if(!Qe)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function xt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Sf(e,t,n){var r=t.pendingProps;switch(ua(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return xt(t),null;case 1:return Ct(t.type)&&zo(),xt(t),null;case 3:return r=t.stateNode,mr(),Ge(St),Ge(ht),Sa(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Io(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Wt!==null&&(qa(Wt),Wt=null))),Ua(e,t),xt(t),null;case 5:ka(t);var o=Hn(Vr.current);if(n=t.type,e!==null&&t.stateNode!=null)Mu(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(u(166));return xt(t),null}if(e=Hn(qt.current),Io(t)){r=t.stateNode,n=t.type;var l=t.memoizedProps;switch(r[Zt]=t,r[Fr]=l,e=(t.mode&1)!==0,n){case"dialog":Ve("cancel",r),Ve("close",r);break;case"iframe":case"object":case"embed":Ve("load",r);break;case"video":case"audio":for(o=0;o<Ir.length;o++)Ve(Ir[o],r);break;case"source":Ve("error",r);break;case"img":case"image":case"link":Ve("error",r),Ve("load",r);break;case"details":Ve("toggle",r);break;case"input":J(r,l),Ve("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!l.multiple},Ve("invalid",r);break;case"textarea":Re(r,l),Ve("invalid",r)}pt(n,l),o=null;for(var i in l)if(l.hasOwnProperty(i)){var h=l[i];i==="children"?typeof h=="string"?r.textContent!==h&&(l.suppressHydrationWarning!==!0&&_o(r.textContent,h,e),o=["children",h]):typeof h=="number"&&r.textContent!==""+h&&(l.suppressHydrationWarning!==!0&&_o(r.textContent,h,e),o=["children",""+h]):f.hasOwnProperty(i)&&h!=null&&i==="onScroll"&&Ve("scroll",r)}switch(n){case"input":nn(r),Te(r,l,!0);break;case"textarea":nn(r),D(r);break;case"select":case"option":break;default:typeof l.onClick=="function"&&(r.onclick=Mo)}r=o,t.updateQueue=r,r!==null&&(t.flags|=4)}else{i=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=V(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=i.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[Zt]=t,e[Fr]=r,_u(e,t,!1,!1),t.stateNode=e;e:{switch(i=rt(n,r),n){case"dialog":Ve("cancel",e),Ve("close",e),o=r;break;case"iframe":case"object":case"embed":Ve("load",e),o=r;break;case"video":case"audio":for(o=0;o<Ir.length;o++)Ve(Ir[o],e);o=r;break;case"source":Ve("error",e),o=r;break;case"img":case"image":case"link":Ve("error",e),Ve("load",e),o=r;break;case"details":Ve("toggle",e),o=r;break;case"input":J(e,r),o=Z(e,r),Ve("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=K({},r,{value:void 0}),Ve("invalid",e);break;case"textarea":Re(e,r),o=Ye(e,r),Ve("invalid",e);break;default:o=r}pt(n,o),h=o;for(l in h)if(h.hasOwnProperty(l)){var x=h[l];l==="style"?qe(e,x):l==="dangerouslySetInnerHTML"?(x=x?x.__html:void 0,x!=null&&de(e,x)):l==="children"?typeof x=="string"?(n!=="textarea"||x!=="")&&ve(e,x):typeof x=="number"&&ve(e,""+x):l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&l!=="autoFocus"&&(f.hasOwnProperty(l)?x!=null&&l==="onScroll"&&Ve("scroll",e):x!=null&&F(e,l,x,i))}switch(n){case"input":nn(e),Te(e,r,!1);break;case"textarea":nn(e),D(e);break;case"option":r.value!=null&&e.setAttribute("value",""+fe(r.value));break;case"select":e.multiple=!!r.multiple,l=r.value,l!=null?be(e,!!r.multiple,l,!1):r.defaultValue!=null&&be(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=Mo)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return xt(t),null;case 6:if(e&&t.stateNode!=null)Pu(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(u(166));if(n=Hn(Vr.current),Hn(qt.current),Io(t)){if(r=t.stateNode,n=t.memoizedProps,r[Zt]=t,(l=r.nodeValue!==n)&&(e=_t,e!==null))switch(e.tag){case 3:_o(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&_o(r.nodeValue,n,(e.mode&1)!==0)}l&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Zt]=t,t.stateNode=r}return xt(t),null;case 13:if(Ge(Xe),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Qe&&Mt!==null&&(t.mode&1)!==0&&(t.flags&128)===0)Li(),cr(),t.flags|=98560,l=!1;else if(l=Io(t),r!==null&&r.dehydrated!==null){if(e===null){if(!l)throw Error(u(318));if(l=t.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(u(317));l[Zt]=t}else cr(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;xt(t),l=!1}else Wt!==null&&(qa(Wt),Wt=null),l=!0;if(!l)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(Xe.current&1)!==0?st===0&&(st=3):ts())),t.updateQueue!==null&&(t.flags|=4),xt(t),null);case 4:return mr(),Ua(e,t),e===null&&Dr(t.stateNode.containerInfo),xt(t),null;case 10:return ha(t.type._context),xt(t),null;case 17:return Ct(t.type)&&zo(),xt(t),null;case 19:if(Ge(Xe),l=t.memoizedState,l===null)return xt(t),null;if(r=(t.flags&128)!==0,i=l.rendering,i===null)if(r)Xr(l,!1);else{if(st!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=Bo(e),i!==null){for(t.flags|=128,Xr(l,!1),r=i.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)l=n,e=r,l.flags&=14680066,i=l.alternate,i===null?(l.childLanes=0,l.lanes=e,l.child=null,l.subtreeFlags=0,l.memoizedProps=null,l.memoizedState=null,l.updateQueue=null,l.dependencies=null,l.stateNode=null):(l.childLanes=i.childLanes,l.lanes=i.lanes,l.child=i.child,l.subtreeFlags=0,l.deletions=null,l.memoizedProps=i.memoizedProps,l.memoizedState=i.memoizedState,l.updateQueue=i.updateQueue,l.type=i.type,e=i.dependencies,l.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Be(Xe,Xe.current&1|2),t.child}e=e.sibling}l.tail!==null&&et()>vr&&(t.flags|=128,r=!0,Xr(l,!1),t.lanes=4194304)}else{if(!r)if(e=Bo(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Xr(l,!0),l.tail===null&&l.tailMode==="hidden"&&!i.alternate&&!Qe)return xt(t),null}else 2*et()-l.renderingStartTime>vr&&n!==1073741824&&(t.flags|=128,r=!0,Xr(l,!1),t.lanes=4194304);l.isBackwards?(i.sibling=t.child,t.child=i):(n=l.last,n!==null?n.sibling=i:t.child=i,l.last=i)}return l.tail!==null?(t=l.tail,l.rendering=t,l.tail=t.sibling,l.renderingStartTime=et(),t.sibling=null,n=Xe.current,Be(Xe,r?n&1|2:n&1),t):(xt(t),null);case 22:case 23:return es(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(Pt&1073741824)!==0&&(xt(t),t.subtreeFlags&6&&(t.flags|=8192)):xt(t),null;case 24:return null;case 25:return null}throw Error(u(156,t.tag))}function Cf(e,t){switch(ua(t),t.tag){case 1:return Ct(t.type)&&zo(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return mr(),Ge(St),Ge(ht),Sa(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return ka(t),null;case 13:if(Ge(Xe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(u(340));cr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ge(Xe),null;case 4:return mr(),null;case 10:return ha(t.type._context),null;case 22:case 23:return es(),null;case 24:return null;default:return null}}var qo=!1,vt=!1,jf=typeof WeakSet=="function"?WeakSet:Set,ne=null;function gr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Je(e,t,r)}else n.current=null}function Ha(e,t,n){try{n()}catch(r){Je(e,t,r)}}var zu=!1;function bf(e,t){if(ea=vo,e=ci(),Gl(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,l=r.focusNode;r=r.focusOffset;try{n.nodeType,l.nodeType}catch{n=null;break e}var i=0,h=-1,x=-1,N=0,R=0,$=e,L=null;t:for(;;){for(var q;$!==n||o!==0&&$.nodeType!==3||(h=i+o),$!==l||r!==0&&$.nodeType!==3||(x=i+r),$.nodeType===3&&(i+=$.nodeValue.length),(q=$.firstChild)!==null;)L=$,$=q;for(;;){if($===e)break t;if(L===n&&++N===o&&(h=i),L===l&&++R===r&&(x=i),(q=$.nextSibling)!==null)break;$=L,L=$.parentNode}$=q}n=h===-1||x===-1?null:{start:h,end:x}}else n=null}n=n||{start:0,end:0}}else n=null;for(ta={focusedElem:e,selectionRange:n},vo=!1,ne=t;ne!==null;)if(t=ne,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ne=e;else for(;ne!==null;){t=ne;try{var re=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(re!==null){var le=re.memoizedProps,tt=re.memoizedState,j=t.stateNode,k=j.getSnapshotBeforeUpdate(t.elementType===t.type?le:Vt(t.type,le),tt);j.__reactInternalSnapshotBeforeUpdate=k}break;case 3:var b=t.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(u(163))}}catch(B){Je(t,t.return,B)}if(e=t.sibling,e!==null){e.return=t.return,ne=e;break}ne=t.return}return re=zu,zu=!1,re}function Zr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var l=o.destroy;o.destroy=void 0,l!==void 0&&Ha(t,n,l)}o=o.next}while(o!==r)}}function Jo(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Ba(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Au(e){var t=e.alternate;t!==null&&(e.alternate=null,Au(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Zt],delete t[Fr],delete t[la],delete t[af],delete t[sf])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Lu(e){return e.tag===5||e.tag===3||e.tag===4}function Ru(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Lu(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Wa(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Mo));else if(r!==4&&(e=e.child,e!==null))for(Wa(e,t,n),e=e.sibling;e!==null;)Wa(e,t,n),e=e.sibling}function Va(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Va(e,t,n),e=e.sibling;e!==null;)Va(e,t,n),e=e.sibling}var dt=null,Gt=!1;function bn(e,t,n){for(n=n.child;n!==null;)Ou(e,t,n),n=n.sibling}function Ou(e,t,n){if(Xt&&typeof Xt.onCommitFiberUnmount=="function")try{Xt.onCommitFiberUnmount(fo,n)}catch{}switch(n.tag){case 5:vt||gr(n,t);case 6:var r=dt,o=Gt;dt=null,bn(e,t,n),dt=r,Gt=o,dt!==null&&(Gt?(e=dt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):dt.removeChild(n.stateNode));break;case 18:dt!==null&&(Gt?(e=dt,n=n.stateNode,e.nodeType===8?oa(e.parentNode,n):e.nodeType===1&&oa(e,n),_r(e)):oa(dt,n.stateNode));break;case 4:r=dt,o=Gt,dt=n.stateNode.containerInfo,Gt=!0,bn(e,t,n),dt=r,Gt=o;break;case 0:case 11:case 14:case 15:if(!vt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var l=o,i=l.destroy;l=l.tag,i!==void 0&&((l&2)!==0||(l&4)!==0)&&Ha(n,t,i),o=o.next}while(o!==r)}bn(e,t,n);break;case 1:if(!vt&&(gr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(h){Je(n,t,h)}bn(e,t,n);break;case 21:bn(e,t,n);break;case 22:n.mode&1?(vt=(r=vt)||n.memoizedState!==null,bn(e,t,n),vt=r):bn(e,t,n);break;default:bn(e,t,n)}}function Iu(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new jf),t.forEach(function(r){var o=Lf.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Yt(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];try{var l=e,i=t,h=i;e:for(;h!==null;){switch(h.tag){case 5:dt=h.stateNode,Gt=!1;break e;case 3:dt=h.stateNode.containerInfo,Gt=!0;break e;case 4:dt=h.stateNode.containerInfo,Gt=!0;break e}h=h.return}if(dt===null)throw Error(u(160));Ou(l,i,o),dt=null,Gt=!1;var x=o.alternate;x!==null&&(x.return=null),o.return=null}catch(N){Je(o,t,N)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Du(t,e),t=t.sibling}function Du(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Yt(t,e),en(e),r&4){try{Zr(3,e,e.return),Jo(3,e)}catch(le){Je(e,e.return,le)}try{Zr(5,e,e.return)}catch(le){Je(e,e.return,le)}}break;case 1:Yt(t,e),en(e),r&512&&n!==null&&gr(n,n.return);break;case 5:if(Yt(t,e),en(e),r&512&&n!==null&&gr(n,n.return),e.flags&32){var o=e.stateNode;try{ve(o,"")}catch(le){Je(e,e.return,le)}}if(r&4&&(o=e.stateNode,o!=null)){var l=e.memoizedProps,i=n!==null?n.memoizedProps:l,h=e.type,x=e.updateQueue;if(e.updateQueue=null,x!==null)try{h==="input"&&l.type==="radio"&&l.name!=null&&ke(o,l),rt(h,i);var N=rt(h,l);for(i=0;i<x.length;i+=2){var R=x[i],$=x[i+1];R==="style"?qe(o,$):R==="dangerouslySetInnerHTML"?de(o,$):R==="children"?ve(o,$):F(o,R,$,N)}switch(h){case"input":pe(o,l);break;case"textarea":Ue(o,l);break;case"select":var L=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!l.multiple;var q=l.value;q!=null?be(o,!!l.multiple,q,!1):L!==!!l.multiple&&(l.defaultValue!=null?be(o,!!l.multiple,l.defaultValue,!0):be(o,!!l.multiple,l.multiple?[]:"",!1))}o[Fr]=l}catch(le){Je(e,e.return,le)}}break;case 6:if(Yt(t,e),en(e),r&4){if(e.stateNode===null)throw Error(u(162));o=e.stateNode,l=e.memoizedProps;try{o.nodeValue=l}catch(le){Je(e,e.return,le)}}break;case 3:if(Yt(t,e),en(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{_r(t.containerInfo)}catch(le){Je(e,e.return,le)}break;case 4:Yt(t,e),en(e);break;case 13:Yt(t,e),en(e),o=e.child,o.flags&8192&&(l=o.memoizedState!==null,o.stateNode.isHidden=l,!l||o.alternate!==null&&o.alternate.memoizedState!==null||(Ka=et())),r&4&&Iu(e);break;case 22:if(R=n!==null&&n.memoizedState!==null,e.mode&1?(vt=(N=vt)||R,Yt(t,e),vt=N):Yt(t,e),en(e),r&8192){if(N=e.memoizedState!==null,(e.stateNode.isHidden=N)&&!R&&(e.mode&1)!==0)for(ne=e,R=e.child;R!==null;){for($=ne=R;ne!==null;){switch(L=ne,q=L.child,L.tag){case 0:case 11:case 14:case 15:Zr(4,L,L.return);break;case 1:gr(L,L.return);var re=L.stateNode;if(typeof re.componentWillUnmount=="function"){r=L,n=L.return;try{t=r,re.props=t.memoizedProps,re.state=t.memoizedState,re.componentWillUnmount()}catch(le){Je(r,n,le)}}break;case 5:gr(L,L.return);break;case 22:if(L.memoizedState!==null){Uu($);continue}}q!==null?(q.return=L,ne=q):Uu($)}R=R.sibling}e:for(R=null,$=e;;){if($.tag===5){if(R===null){R=$;try{o=$.stateNode,N?(l=o.style,typeof l.setProperty=="function"?l.setProperty("display","none","important"):l.display="none"):(h=$.stateNode,x=$.memoizedProps.style,i=x!=null&&x.hasOwnProperty("display")?x.display:null,h.style.display=He("display",i))}catch(le){Je(e,e.return,le)}}}else if($.tag===6){if(R===null)try{$.stateNode.nodeValue=N?"":$.memoizedProps}catch(le){Je(e,e.return,le)}}else if(($.tag!==22&&$.tag!==23||$.memoizedState===null||$===e)&&$.child!==null){$.child.return=$,$=$.child;continue}if($===e)break e;for(;$.sibling===null;){if($.return===null||$.return===e)break e;R===$&&(R=null),$=$.return}R===$&&(R=null),$.sibling.return=$.return,$=$.sibling}}break;case 19:Yt(t,e),en(e),r&4&&Iu(e);break;case 21:break;default:Yt(t,e),en(e)}}function en(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Lu(n)){var r=n;break e}n=n.return}throw Error(u(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(ve(o,""),r.flags&=-33);var l=Ru(e);Va(e,l,o);break;case 3:case 4:var i=r.stateNode.containerInfo,h=Ru(e);Wa(e,h,i);break;default:throw Error(u(161))}}catch(x){Je(e,e.return,x)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Nf(e,t,n){ne=e,$u(e)}function $u(e,t,n){for(var r=(e.mode&1)!==0;ne!==null;){var o=ne,l=o.child;if(o.tag===22&&r){var i=o.memoizedState!==null||qo;if(!i){var h=o.alternate,x=h!==null&&h.memoizedState!==null||vt;h=qo;var N=vt;if(qo=i,(vt=x)&&!N)for(ne=o;ne!==null;)i=ne,x=i.child,i.tag===22&&i.memoizedState!==null?Hu(o):x!==null?(x.return=i,ne=x):Hu(o);for(;l!==null;)ne=l,$u(l),l=l.sibling;ne=o,qo=h,vt=N}Fu(e)}else(o.subtreeFlags&8772)!==0&&l!==null?(l.return=o,ne=l):Fu(e)}}function Fu(e){for(;ne!==null;){var t=ne;if((t.flags&8772)!==0){var n=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:vt||Jo(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!vt)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:Vt(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var l=t.updateQueue;l!==null&&Ui(t,l,r);break;case 3:var i=t.updateQueue;if(i!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Ui(t,i,n)}break;case 5:var h=t.stateNode;if(n===null&&t.flags&4){n=h;var x=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":x.autoFocus&&n.focus();break;case"img":x.src&&(n.src=x.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var N=t.alternate;if(N!==null){var R=N.memoizedState;if(R!==null){var $=R.dehydrated;$!==null&&_r($)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(u(163))}vt||t.flags&512&&Ba(t)}catch(L){Je(t,t.return,L)}}if(t===e){ne=null;break}if(n=t.sibling,n!==null){n.return=t.return,ne=n;break}ne=t.return}}function Uu(e){for(;ne!==null;){var t=ne;if(t===e){ne=null;break}var n=t.sibling;if(n!==null){n.return=t.return,ne=n;break}ne=t.return}}function Hu(e){for(;ne!==null;){var t=ne;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Jo(4,t)}catch(x){Je(t,n,x)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(x){Je(t,o,x)}}var l=t.return;try{Ba(t)}catch(x){Je(t,l,x)}break;case 5:var i=t.return;try{Ba(t)}catch(x){Je(t,i,x)}}}catch(x){Je(t,t.return,x)}if(t===e){ne=null;break}var h=t.sibling;if(h!==null){h.return=t.return,ne=h;break}ne=t.return}}var Ef=Math.ceil,el=Q.ReactCurrentDispatcher,Ga=Q.ReactCurrentOwner,Ft=Q.ReactCurrentBatchConfig,Oe=0,ut=null,ot=null,ft=0,Pt=0,xr=kn(0),st=0,qr=null,Wn=0,tl=0,Ya=0,Jr=null,bt=null,Ka=0,vr=1/0,dn=null,nl=!1,Qa=null,Nn=null,rl=!1,En=null,ol=0,eo=0,Xa=null,ll=-1,al=0;function wt(){return(Oe&6)!==0?et():ll!==-1?ll:ll=et()}function Tn(e){return(e.mode&1)===0?1:(Oe&2)!==0&&ft!==0?ft&-ft:cf.transition!==null?(al===0&&(al=Rs()),al):(e=$e,e!==0||(e=window.event,e=e===void 0?16:Ws(e.type)),e)}function Kt(e,t,n,r){if(50<eo)throw eo=0,Xa=null,Error(u(185));jr(e,n,r),((Oe&2)===0||e!==ut)&&(e===ut&&((Oe&2)===0&&(tl|=n),st===4&&_n(e,ft)),Nt(e,r),n===1&&Oe===0&&(t.mode&1)===0&&(vr=et()+500,Lo&&Sn()))}function Nt(e,t){var n=e.callbackNode;ud(e,t);var r=ho(e,e===ut?ft:0);if(r===0)n!==null&&zs(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&zs(n),t===1)e.tag===0?uf(Wu.bind(null,e)):_i(Wu.bind(null,e)),of(function(){(Oe&6)===0&&Sn()}),n=null;else{switch(Os(r)){case 1:n=_l;break;case 4:n=As;break;case 16:n=co;break;case 536870912:n=Ls;break;default:n=co}n=qu(n,Bu.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Bu(e,t){if(ll=-1,al=0,(Oe&6)!==0)throw Error(u(327));var n=e.callbackNode;if(yr()&&e.callbackNode!==n)return null;var r=ho(e,e===ut?ft:0);if(r===0)return null;if((r&30)!==0||(r&e.expiredLanes)!==0||t)t=sl(e,r);else{t=r;var o=Oe;Oe|=2;var l=Gu();(ut!==e||ft!==t)&&(dn=null,vr=et()+500,Gn(e,t));do try{Mf();break}catch(h){Vu(e,h)}while(!0);ma(),el.current=l,Oe=o,ot!==null?t=0:(ut=null,ft=0,t=st)}if(t!==0){if(t===2&&(o=Ml(e),o!==0&&(r=o,t=Za(e,o))),t===1)throw n=qr,Gn(e,0),_n(e,r),Nt(e,et()),n;if(t===6)_n(e,r);else{if(o=e.current.alternate,(r&30)===0&&!Tf(o)&&(t=sl(e,r),t===2&&(l=Ml(e),l!==0&&(r=l,t=Za(e,l))),t===1))throw n=qr,Gn(e,0),_n(e,r),Nt(e,et()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(u(345));case 2:Yn(e,bt,dn);break;case 3:if(_n(e,r),(r&130023424)===r&&(t=Ka+500-et(),10<t)){if(ho(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){wt(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=ra(Yn.bind(null,e,bt,dn),t);break}Yn(e,bt,dn);break;case 4:if(_n(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var i=31-Ht(r);l=1<<i,i=t[i],i>o&&(o=i),r&=~l}if(r=o,r=et()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Ef(r/1960))-r,10<r){e.timeoutHandle=ra(Yn.bind(null,e,bt,dn),r);break}Yn(e,bt,dn);break;case 5:Yn(e,bt,dn);break;default:throw Error(u(329))}}}return Nt(e,et()),e.callbackNode===n?Bu.bind(null,e):null}function Za(e,t){var n=Jr;return e.current.memoizedState.isDehydrated&&(Gn(e,t).flags|=256),e=sl(e,t),e!==2&&(t=bt,bt=n,t!==null&&qa(t)),e}function qa(e){bt===null?bt=e:bt.push.apply(bt,e)}function Tf(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var o=n[r],l=o.getSnapshot;o=o.value;try{if(!Bt(l(),o))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function _n(e,t){for(t&=~Ya,t&=~tl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Ht(t),r=1<<n;e[n]=-1,t&=~r}}function Wu(e){if((Oe&6)!==0)throw Error(u(327));yr();var t=ho(e,0);if((t&1)===0)return Nt(e,et()),null;var n=sl(e,t);if(e.tag!==0&&n===2){var r=Ml(e);r!==0&&(t=r,n=Za(e,r))}if(n===1)throw n=qr,Gn(e,0),_n(e,t),Nt(e,et()),n;if(n===6)throw Error(u(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Yn(e,bt,dn),Nt(e,et()),null}function Ja(e,t){var n=Oe;Oe|=1;try{return e(t)}finally{Oe=n,Oe===0&&(vr=et()+500,Lo&&Sn())}}function Vn(e){En!==null&&En.tag===0&&(Oe&6)===0&&yr();var t=Oe;Oe|=1;var n=Ft.transition,r=$e;try{if(Ft.transition=null,$e=1,e)return e()}finally{$e=r,Ft.transition=n,Oe=t,(Oe&6)===0&&Sn()}}function es(){Pt=xr.current,Ge(xr)}function Gn(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,rf(n)),ot!==null)for(n=ot.return;n!==null;){var r=n;switch(ua(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&zo();break;case 3:mr(),Ge(St),Ge(ht),Sa();break;case 5:ka(r);break;case 4:mr();break;case 13:Ge(Xe);break;case 19:Ge(Xe);break;case 10:ha(r.type._context);break;case 22:case 23:es()}n=n.return}if(ut=e,ot=e=Mn(e.current,null),ft=Pt=t,st=0,qr=null,Ya=tl=Wn=0,bt=Jr=null,Un!==null){for(t=0;t<Un.length;t++)if(n=Un[t],r=n.interleaved,r!==null){n.interleaved=null;var o=r.next,l=n.pending;if(l!==null){var i=l.next;l.next=o,r.next=i}n.pending=r}Un=null}return e}function Vu(e,t){do{var n=ot;try{if(ma(),Wo.current=Ko,Vo){for(var r=Ze.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}Vo=!1}if(Bn=0,it=at=Ze=null,Gr=!1,Yr=0,Ga.current=null,n===null||n.return===null){st=1,qr=t,ot=null;break}e:{var l=e,i=n.return,h=n,x=t;if(t=ft,h.flags|=32768,x!==null&&typeof x=="object"&&typeof x.then=="function"){var N=x,R=h,$=R.tag;if((R.mode&1)===0&&($===0||$===11||$===15)){var L=R.alternate;L?(R.updateQueue=L.updateQueue,R.memoizedState=L.memoizedState,R.lanes=L.lanes):(R.updateQueue=null,R.memoizedState=null)}var q=gu(i);if(q!==null){q.flags&=-257,xu(q,i,h,l,t),q.mode&1&&hu(l,N,t),t=q,x=N;var re=t.updateQueue;if(re===null){var le=new Set;le.add(x),t.updateQueue=le}else re.add(x);break e}else{if((t&1)===0){hu(l,N,t),ts();break e}x=Error(u(426))}}else if(Qe&&h.mode&1){var tt=gu(i);if(tt!==null){(tt.flags&65536)===0&&(tt.flags|=256),xu(tt,i,h,l,t),fa(hr(x,h));break e}}l=x=hr(x,h),st!==4&&(st=2),Jr===null?Jr=[l]:Jr.push(l),l=i;do{switch(l.tag){case 3:l.flags|=65536,t&=-t,l.lanes|=t;var j=pu(l,x,t);Fi(l,j);break e;case 1:h=x;var k=l.type,b=l.stateNode;if((l.flags&128)===0&&(typeof k.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(Nn===null||!Nn.has(b)))){l.flags|=65536,t&=-t,l.lanes|=t;var B=mu(l,h,t);Fi(l,B);break e}}l=l.return}while(l!==null)}Ku(n)}catch(se){t=se,ot===n&&n!==null&&(ot=n=n.return);continue}break}while(!0)}function Gu(){var e=el.current;return el.current=Ko,e===null?Ko:e}function ts(){(st===0||st===3||st===2)&&(st=4),ut===null||(Wn&268435455)===0&&(tl&268435455)===0||_n(ut,ft)}function sl(e,t){var n=Oe;Oe|=2;var r=Gu();(ut!==e||ft!==t)&&(dn=null,Gn(e,t));do try{_f();break}catch(o){Vu(e,o)}while(!0);if(ma(),Oe=n,el.current=r,ot!==null)throw Error(u(261));return ut=null,ft=0,st}function _f(){for(;ot!==null;)Yu(ot)}function Mf(){for(;ot!==null&&!ed();)Yu(ot)}function Yu(e){var t=Zu(e.alternate,e,Pt);e.memoizedProps=e.pendingProps,t===null?Ku(e):ot=t,Ga.current=null}function Ku(e){var t=e;do{var n=t.alternate;if(e=t.return,(t.flags&32768)===0){if(n=Sf(n,t,Pt),n!==null){ot=n;return}}else{if(n=Cf(n,t),n!==null){n.flags&=32767,ot=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{st=6,ot=null;return}}if(t=t.sibling,t!==null){ot=t;return}ot=t=e}while(t!==null);st===0&&(st=5)}function Yn(e,t,n){var r=$e,o=Ft.transition;try{Ft.transition=null,$e=1,Pf(e,t,n,r)}finally{Ft.transition=o,$e=r}return null}function Pf(e,t,n,r){do yr();while(En!==null);if((Oe&6)!==0)throw Error(u(327));n=e.finishedWork;var o=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(u(177));e.callbackNode=null,e.callbackPriority=0;var l=n.lanes|n.childLanes;if(cd(e,l),e===ut&&(ot=ut=null,ft=0),(n.subtreeFlags&2064)===0&&(n.flags&2064)===0||rl||(rl=!0,qu(co,function(){return yr(),null})),l=(n.flags&15990)!==0,(n.subtreeFlags&15990)!==0||l){l=Ft.transition,Ft.transition=null;var i=$e;$e=1;var h=Oe;Oe|=4,Ga.current=null,bf(e,n),Du(n,e),Xd(ta),vo=!!ea,ta=ea=null,e.current=n,Nf(n),td(),Oe=h,$e=i,Ft.transition=l}else e.current=n;if(rl&&(rl=!1,En=e,ol=o),l=e.pendingLanes,l===0&&(Nn=null),od(n.stateNode),Nt(e,et()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(nl)throw nl=!1,e=Qa,Qa=null,e;return(ol&1)!==0&&e.tag!==0&&yr(),l=e.pendingLanes,(l&1)!==0?e===Xa?eo++:(eo=0,Xa=e):eo=0,Sn(),null}function yr(){if(En!==null){var e=Os(ol),t=Ft.transition,n=$e;try{if(Ft.transition=null,$e=16>e?16:e,En===null)var r=!1;else{if(e=En,En=null,ol=0,(Oe&6)!==0)throw Error(u(331));var o=Oe;for(Oe|=4,ne=e.current;ne!==null;){var l=ne,i=l.child;if((ne.flags&16)!==0){var h=l.deletions;if(h!==null){for(var x=0;x<h.length;x++){var N=h[x];for(ne=N;ne!==null;){var R=ne;switch(R.tag){case 0:case 11:case 15:Zr(8,R,l)}var $=R.child;if($!==null)$.return=R,ne=$;else for(;ne!==null;){R=ne;var L=R.sibling,q=R.return;if(Au(R),R===N){ne=null;break}if(L!==null){L.return=q,ne=L;break}ne=q}}}var re=l.alternate;if(re!==null){var le=re.child;if(le!==null){re.child=null;do{var tt=le.sibling;le.sibling=null,le=tt}while(le!==null)}}ne=l}}if((l.subtreeFlags&2064)!==0&&i!==null)i.return=l,ne=i;else e:for(;ne!==null;){if(l=ne,(l.flags&2048)!==0)switch(l.tag){case 0:case 11:case 15:Zr(9,l,l.return)}var j=l.sibling;if(j!==null){j.return=l.return,ne=j;break e}ne=l.return}}var k=e.current;for(ne=k;ne!==null;){i=ne;var b=i.child;if((i.subtreeFlags&2064)!==0&&b!==null)b.return=i,ne=b;else e:for(i=k;ne!==null;){if(h=ne,(h.flags&2048)!==0)try{switch(h.tag){case 0:case 11:case 15:Jo(9,h)}}catch(se){Je(h,h.return,se)}if(h===i){ne=null;break e}var B=h.sibling;if(B!==null){B.return=h.return,ne=B;break e}ne=h.return}}if(Oe=o,Sn(),Xt&&typeof Xt.onPostCommitFiberRoot=="function")try{Xt.onPostCommitFiberRoot(fo,e)}catch{}r=!0}return r}finally{$e=n,Ft.transition=t}}return!1}function Qu(e,t,n){t=hr(n,t),t=pu(e,t,1),e=jn(e,t,1),t=wt(),e!==null&&(jr(e,1,t),Nt(e,t))}function Je(e,t,n){if(e.tag===3)Qu(e,e,n);else for(;t!==null;){if(t.tag===3){Qu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Nn===null||!Nn.has(r))){e=hr(n,e),e=mu(t,e,1),t=jn(t,e,1),e=wt(),t!==null&&(jr(t,1,e),Nt(t,e));break}}t=t.return}}function zf(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=wt(),e.pingedLanes|=e.suspendedLanes&n,ut===e&&(ft&n)===n&&(st===4||st===3&&(ft&130023424)===ft&&500>et()-Ka?Gn(e,0):Ya|=n),Nt(e,t)}function Xu(e,t){t===0&&((e.mode&1)===0?t=1:(t=mo,mo<<=1,(mo&130023424)===0&&(mo=4194304)));var n=wt();e=sn(e,t),e!==null&&(jr(e,t,n),Nt(e,n))}function Af(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Xu(e,n)}function Lf(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(u(314))}r!==null&&r.delete(t),Xu(e,n)}var Zu;Zu=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||St.current)jt=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return jt=!1,wf(e,t,n);jt=(e.flags&131072)!==0}else jt=!1,Qe&&(t.flags&1048576)!==0&&Mi(t,Oo,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Zo(e,t),e=t.pendingProps;var o=sr(t,ht.current);pr(t,n),o=ba(null,t,r,e,o,n);var l=Na();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ct(r)?(l=!0,Ao(t)):l=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,va(t),o.updater=Qo,t.stateNode=o,o._reactInternals=t,za(t,r,e,n),t=Oa(null,t,r,!0,l,n)):(t.tag=0,Qe&&l&&ia(t),kt(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Zo(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=Of(r),e=Vt(r,e),o){case 0:t=Ra(null,t,r,e,n);break e;case 1:t=Cu(null,t,r,e,n);break e;case 11:t=vu(null,t,r,e,n);break e;case 14:t=yu(null,t,r,Vt(r.type,e),n);break e}throw Error(u(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Vt(r,o),Ra(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Vt(r,o),Cu(e,t,r,o,n);case 3:e:{if(ju(t),e===null)throw Error(u(387));r=t.pendingProps,l=t.memoizedState,o=l.element,$i(e,t),Ho(t,r,null,n);var i=t.memoizedState;if(r=i.element,l.isDehydrated)if(l={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=l,t.memoizedState=l,t.flags&256){o=hr(Error(u(423)),t),t=bu(e,t,r,n,o);break e}else if(r!==o){o=hr(Error(u(424)),t),t=bu(e,t,r,n,o);break e}else for(Mt=yn(t.stateNode.containerInfo.firstChild),_t=t,Qe=!0,Wt=null,n=Ii(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(cr(),r===o){t=cn(e,t,n);break e}kt(e,t,r,n)}t=t.child}return t;case 5:return Hi(t),e===null&&da(t),r=t.type,o=t.pendingProps,l=e!==null?e.memoizedProps:null,i=o.children,na(r,o)?i=null:l!==null&&na(r,l)&&(t.flags|=32),Su(e,t),kt(e,t,i,n),t.child;case 6:return e===null&&da(t),null;case 13:return Nu(e,t,n);case 4:return ya(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=dr(t,null,r,n):kt(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Vt(r,o),vu(e,t,r,o,n);case 7:return kt(e,t,t.pendingProps,n),t.child;case 8:return kt(e,t,t.pendingProps.children,n),t.child;case 12:return kt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,l=t.memoizedProps,i=o.value,Be($o,r._currentValue),r._currentValue=i,l!==null)if(Bt(l.value,i)){if(l.children===o.children&&!St.current){t=cn(e,t,n);break e}}else for(l=t.child,l!==null&&(l.return=t);l!==null;){var h=l.dependencies;if(h!==null){i=l.child;for(var x=h.firstContext;x!==null;){if(x.context===r){if(l.tag===1){x=un(-1,n&-n),x.tag=2;var N=l.updateQueue;if(N!==null){N=N.shared;var R=N.pending;R===null?x.next=x:(x.next=R.next,R.next=x),N.pending=x}}l.lanes|=n,x=l.alternate,x!==null&&(x.lanes|=n),ga(l.return,n,t),h.lanes|=n;break}x=x.next}}else if(l.tag===10)i=l.type===t.type?null:l.child;else if(l.tag===18){if(i=l.return,i===null)throw Error(u(341));i.lanes|=n,h=i.alternate,h!==null&&(h.lanes|=n),ga(i,n,t),i=l.sibling}else i=l.child;if(i!==null)i.return=l;else for(i=l;i!==null;){if(i===t){i=null;break}if(l=i.sibling,l!==null){l.return=i.return,i=l;break}i=i.return}l=i}kt(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,pr(t,n),o=Dt(o),r=r(o),t.flags|=1,kt(e,t,r,n),t.child;case 14:return r=t.type,o=Vt(r,t.pendingProps),o=Vt(r.type,o),yu(e,t,r,o,n);case 15:return ku(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Vt(r,o),Zo(e,t),t.tag=1,Ct(r)?(e=!0,Ao(t)):e=!1,pr(t,n),du(t,r,o),za(t,r,o,n),Oa(null,t,r,!0,e,n);case 19:return Tu(e,t,n);case 22:return wu(e,t,n)}throw Error(u(156,t.tag))};function qu(e,t){return Ps(e,t)}function Rf(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ut(e,t,n,r){return new Rf(e,t,n,r)}function ns(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Of(e){if(typeof e=="function")return ns(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ee)return 11;if(e===ye)return 14}return 2}function Mn(e,t){var n=e.alternate;return n===null?(n=Ut(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function il(e,t,n,r,o,l){var i=2;if(r=e,typeof e=="function")ns(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case he:return Kn(n.children,o,l,t);case Se:i=8,o|=8;break;case ce:return e=Ut(12,n,t,o|2),e.elementType=ce,e.lanes=l,e;case je:return e=Ut(13,n,t,o),e.elementType=je,e.lanes=l,e;case te:return e=Ut(19,n,t,o),e.elementType=te,e.lanes=l,e;case Ne:return ul(n,o,l,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Me:i=10;break e;case Fe:i=9;break e;case ee:i=11;break e;case ye:i=14;break e;case Pe:i=16,r=null;break e}throw Error(u(130,e==null?e:typeof e,""))}return t=Ut(i,n,t,o),t.elementType=e,t.type=r,t.lanes=l,t}function Kn(e,t,n,r){return e=Ut(7,e,r,t),e.lanes=n,e}function ul(e,t,n,r){return e=Ut(22,e,r,t),e.elementType=Ne,e.lanes=n,e.stateNode={isHidden:!1},e}function rs(e,t,n){return e=Ut(6,e,null,t),e.lanes=n,e}function os(e,t,n){return t=Ut(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function If(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Pl(0),this.expirationTimes=Pl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Pl(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function ls(e,t,n,r,o,l,i,h,x){return e=new If(e,t,n,h,x),t===1?(t=1,l===!0&&(t|=8)):t=0,l=Ut(3,null,null,t),e.current=l,l.stateNode=e,l.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},va(l),e}function Df(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:I,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Ju(e){if(!e)return wn;e=e._reactInternals;e:{if(On(e)!==e||e.tag!==1)throw Error(u(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ct(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(u(171))}if(e.tag===1){var n=e.type;if(Ct(n))return Ei(e,n,t)}return t}function ec(e,t,n,r,o,l,i,h,x){return e=ls(n,r,!0,e,o,l,i,h,x),e.context=Ju(null),n=e.current,r=wt(),o=Tn(n),l=un(r,o),l.callback=t??null,jn(n,l,o),e.current.lanes=o,jr(e,o,r),Nt(e,r),e}function cl(e,t,n,r){var o=t.current,l=wt(),i=Tn(o);return n=Ju(n),t.context===null?t.context=n:t.pendingContext=n,t=un(l,i),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=jn(o,t,i),e!==null&&(Kt(e,o,i,l),Uo(e,o,i)),i}function dl(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function tc(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function as(e,t){tc(e,t),(e=e.alternate)&&tc(e,t)}function $f(){return null}var nc=typeof reportError=="function"?reportError:function(e){console.error(e)};function ss(e){this._internalRoot=e}fl.prototype.render=ss.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(u(409));cl(e,t,null,null)},fl.prototype.unmount=ss.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Vn(function(){cl(null,e,null,null)}),t[rn]=null}};function fl(e){this._internalRoot=e}fl.prototype.unstable_scheduleHydration=function(e){if(e){var t=$s();e={blockedOn:null,target:e,priority:t};for(var n=0;n<gn.length&&t!==0&&t<gn[n].priority;n++);gn.splice(n,0,e),n===0&&Hs(e)}};function is(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function pl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function rc(){}function Ff(e,t,n,r,o){if(o){if(typeof r=="function"){var l=r;r=function(){var N=dl(i);l.call(N)}}var i=ec(t,r,e,0,null,!1,!1,"",rc);return e._reactRootContainer=i,e[rn]=i.current,Dr(e.nodeType===8?e.parentNode:e),Vn(),i}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var h=r;r=function(){var N=dl(x);h.call(N)}}var x=ls(e,0,!1,null,null,!1,!1,"",rc);return e._reactRootContainer=x,e[rn]=x.current,Dr(e.nodeType===8?e.parentNode:e),Vn(function(){cl(t,x,n,r)}),x}function ml(e,t,n,r,o){var l=n._reactRootContainer;if(l){var i=l;if(typeof o=="function"){var h=o;o=function(){var x=dl(i);h.call(x)}}cl(t,i,e,o)}else i=Ff(n,t,e,o,r);return dl(i)}Is=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Cr(t.pendingLanes);n!==0&&(zl(t,n|1),Nt(t,et()),(Oe&6)===0&&(vr=et()+500,Sn()))}break;case 13:Vn(function(){var r=sn(e,1);if(r!==null){var o=wt();Kt(r,e,1,o)}}),as(e,1)}},Al=function(e){if(e.tag===13){var t=sn(e,134217728);if(t!==null){var n=wt();Kt(t,e,134217728,n)}as(e,134217728)}},Ds=function(e){if(e.tag===13){var t=Tn(e),n=sn(e,t);if(n!==null){var r=wt();Kt(n,e,t,r)}as(e,t)}},$s=function(){return $e},Fs=function(e,t){var n=$e;try{return $e=e,t()}finally{$e=n}},yt=function(e,t,n){switch(t){case"input":if(pe(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=Po(r);if(!o)throw Error(u(90));_e(r),pe(r,o)}}}break;case"textarea":Ue(e,n);break;case"select":t=n.value,t!=null&&be(e,!!n.multiple,t,!1)}},An=Ja,kr=Vn;var Uf={usingClientEntryPoint:!1,Events:[Ur,lr,Po,so,mt,Ja]},to={findFiberByHostInstance:In,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Hf={bundleType:to.bundleType,version:to.version,rendererPackageName:to.rendererPackageName,rendererConfig:to.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Q.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=_s(e),e===null?null:e.stateNode},findFiberByHostInstance:to.findFiberByHostInstance||$f,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var hl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!hl.isDisabled&&hl.supportsFiber)try{fo=hl.inject(Hf),Xt=hl}catch{}}return Et.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Uf,Et.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!is(t))throw Error(u(200));return Df(e,t,null,n)},Et.createRoot=function(e,t){if(!is(e))throw Error(u(299));var n=!1,r="",o=nc;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=ls(e,1,!1,null,null,n,!1,r,o),e[rn]=t.current,Dr(e.nodeType===8?e.parentNode:e),new ss(t)},Et.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(u(188)):(e=Object.keys(e).join(","),Error(u(268,e)));return e=_s(t),e=e===null?null:e.stateNode,e},Et.flushSync=function(e){return Vn(e)},Et.hydrate=function(e,t,n){if(!pl(t))throw Error(u(200));return ml(null,e,t,!0,n)},Et.hydrateRoot=function(e,t,n){if(!is(e))throw Error(u(405));var r=n!=null&&n.hydratedSources||null,o=!1,l="",i=nc;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(l=n.identifierPrefix),n.onRecoverableError!==void 0&&(i=n.onRecoverableError)),t=ec(t,null,e,1,n??null,o,!1,l,i),e[rn]=t.current,Dr(e),r)for(e=0;e<r.length;e++)n=r[e],o=n._getVersion,o=o(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new fl(t)},Et.render=function(e,t,n){if(!pl(t))throw Error(u(200));return ml(null,e,t,!1,n)},Et.unmountComponentAtNode=function(e){if(!pl(e))throw Error(u(40));return e._reactRootContainer?(Vn(function(){ml(null,null,e,!1,function(){e._reactRootContainer=null,e[rn]=null})}),!0):!1},Et.unstable_batchedUpdates=Ja,Et.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!pl(n))throw Error(u(200));if(e==null||e._reactInternals===void 0)throw Error(u(38));return ml(e,t,n,!1,r)},Et.version="18.3.1-next-f1338f8080-20240426",Et}var dc;function Rc(){if(dc)return ds.exports;dc=1;function a(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(a)}catch(c){console.error(c)}}return a(),ds.exports=Xf(),ds.exports}var fc;function Zf(){if(fc)return gl;fc=1;var a=Rc();return gl.createRoot=a.createRoot,gl.hydrateRoot=a.hydrateRoot,gl}var qf=Zf();const Jf=ws(qf),Oc=M.createContext();function ep({children:a}){const[c,u]=M.useState(()=>{try{const m=localStorage.getItem("vibe-theme");return["light","dark","system"].includes(m)?m:"system"}catch{return"system"}}),[d,f]=M.useState(()=>typeof matchMedia=="function"&&matchMedia("(prefers-color-scheme: dark)").matches);M.useEffect(()=>{const m=document.documentElement,g=c==="dark"||c==="system"&&d;m.classList.toggle("dark",g),m.style.colorScheme=g?"dark":"light";try{localStorage.setItem("vibe-theme",c)}catch{}},[c,d]),M.useEffect(()=>{const m=matchMedia("(prefers-color-scheme: dark)"),g=p=>f(p.matches);return m.addEventListener("change",g),()=>m.removeEventListener("change",g)},[]);const v=()=>u(m=>m==="light"?"dark":m==="dark"?"system":"light");return s.jsx(Oc.Provider,{value:{theme:c,setTheme:u,cycle:v,resolvedTheme:c==="system"?d?"dark":"light":c},children:a})}function Ic(){return M.useContext(Oc)}const tp=["en","zh"],pc={en:{"app.language":"中文","app.languageTitle":"Language","app.brand":"Vibe Roaster","app.github":"GitHub","app.loading":"Loading roast…","roastAccess.kicker":"Your roast profile","roastAccess.title":"Make it personal.","roastAccess.subtitle":"Save a stable roast with GitHub, use your own model, or keep the entire result local.","roastAccess.githubChoice":"Save with GitHub","roastAccess.githubDescription":"Generate once, restore anywhere, and refresh only when your coding profile meaningfully changes.","roastAccess.githubSignedInDescription":"Your saved roast profile is ready.","roastAccess.freeTier":"Saved profile","roastAccess.ownKey":"Your provider","roastAccess.apiChoice":"Use an API key","roastAccess.apiDescription":"Connect DeepSeek, OpenAI, Anthropic, Gemini, Groq, or OpenRouter.","roastAccess.privacy":"Only aggregate profile signals are shared. Raw prompts stay on this device.","roastAccess.local":"Skip AI · use the local roast","roastAccess.back":"Back","roastAccess.apiTitle":"Use your own model.","roastAccess.apiSubtitle":"Choose a provider and generate without linking a profile.","roastAccess.keyRequired":"Enter an API key to continue.","roastAccess.sessionOnly":"This session only","roastAccess.keyPlaceholder":"{provider} API key","roastAccess.model":"Model","roastAccess.advanced":"Advanced endpoint","roastAccess.generate":"Generate my roast","roastAccess.generating":"Sharpening the roast…","roastAccess.githubTitle":"One profile. One roast.","roastAccess.githubSubtitle":"Sign in to create or restore the roast attached to your coding profile.","roastAccess.githubUnavailable":"GitHub sign-in could not be checked, but you can still try connecting.","roastAccess.githubOneClick":"Sign in to create or restore your roast profile.","roastAccess.continueGithub":"Continue with GitHub","roastAccess.githubRetry":"Try GitHub again","roastAccess.githubFailed":"GitHub authorization failed.","roastAccess.openGithub":"Open GitHub","roastAccess.waiting":"Waiting for approval in GitHub…","roastAccess.githubConnected":"Your roast is linked to this GitHub account.","roastAccess.generateFree":"Open my roast","roastAccess.chooseProvider":"Choose an AI provider","roastAccess.signOut":"Sign out of GitHub","roastAccess.popupBlocked":"The GitHub window was blocked. Allow pop-ups and try again.","roastAccess.githubPrivacy":"Only aggregate profile signals are used and saved. Raw prompts stay on this device.","profile.empty":"No vibe profile yet — inspect some local sessions first.","profile.radar":"Behavior radar","profile.radarAria":"Behavior radar","profile.sixAxis":"Six signals / 100","profile.axes":"Type axes","profile.roast":"The roast","profile.tldr":"TL;DR","profile.agentsFound":"{count} AGENTS FOUND","profile.detectedAgents":"Detected agents","profile.cloudKicker":"Your lexicon","profile.cloud":"Word cloud","profile.activityKicker":"Your rhythm","profile.activity":"Activity Heatmap","profile.activityHint":"Each column is a day. Expand to inspect the full timeline.","profile.activityHintTokens":"Green columns = daily tokens from TokenTracker. Switch views or expand for details.","profile.stat.totalTokens":"Total tokens","profile.stat.totalPrompts":"Total prompts","profile.stat.estCost":"Est. cost","profile.stat.activeDays":"Active days","profile.stat.streak":"Longest streak","profile.stat.peakDay":"Peak day","profile.stat.modelCount":"{count} models","profile.posterShare":"Share poster","profile.posterBusy":"Preparing…","profile.posterTitle":"Share your roast","profile.posterDownload":"Download PNG","profile.posterClose":"Close","profile.posterKicker":"Your share card","profile.posterHint":"Your coding personality, compressed into one editorial card. Share the image or keep the PNG and caption.","profile.posterNativeShare":"Share image","profile.posterFormat":"PNG · 1080 × 1440 · 3:4","profile.posterCopyCaption":"Copy caption","profile.posterFootnote":"The exported card contains aggregate profile results only — never raw prompts.","profile.posterSaved":"The PNG is saved and ready to post.","profile.posterShared":"Your roast card was shared.","profile.posterShareFailed":"The image could not be shared. Download it instead.","profile.posterCaptionCopied":"Caption copied to your clipboard.","heatmap.open":"Expand activity","heatmap.openTitle":"Open expanded activity view","heatmap.close":"Close","heatmap.insight":"Activity summary","heatmap.tokenTitle":"Token Activity","heatmap.promptTitle":"Activity terrain","heatmap.tokenDesc":"Drag with left mouse button to rotate. Hover to inspect daily activity and model metrics.","heatmap.promptDesc":"Each column is one day. Height and color both rise with prompt volume.","heatmap.totalTokens":"Annual total tokens","heatmap.totalPrompts":"Total prompts","heatmap.activeRateDays":"Active rate / days","heatmap.activeDays":"Active days","heatmap.activeDayCount":"{count} active days","heatmap.longestStreak":"Longest active streak","heatmap.maxStreak":"Max streak","heatmap.peakDay":"Peak day","heatmap.activityLevels":"Activity levels","heatmap.legend":"Legend","heatmap.footerTip":"Pinch or scroll to zoom / Drag to rotate","heatmap.viewGrid":"Grid","heatmap.viewTerrain":"Terrain","heatmap.viewLabel":"Heatmap view","heatmap.less":"Less","heatmap.more":"More","theme.light":"Light","theme.dark":"Dark","theme.system":"System","usage.trend":"Usage Trend","usage.period":"Time period","usage.agentFilter":"Agent filter","usage.allAgents":"All agents","usage.all":"All","usage.from":"From date","usage.to":"To date","usage.cloudKicker":"Your coding language","usage.cloud":"Recurring themes","usage.cloudPromptCount":"{count} prompts","usage.cloudEmpty":"No coding themes in this time range.","usage.modelKicker":"Model footprint","usage.models":"Usage by model","usage.showAllModels":"Show all {count} models","usage.showLessModels":"Show fewer models","usage.contextKicker":"Context composition","usage.contextTitle":"{agent} token composition","usage.cacheHit":"Cache hit rate {percent}%","usage.contextEvents":"{count} measured turns","usage.toolCallCount":"{count} tool calls","usage.context.messages":"Messages","usage.context.tool_calls":"Tool calls","usage.context.reasoning":"Reasoning","usage.context.system_prompt":"System prompt","usage.context.custom_agents":"Custom agents","usage.contextCodexNote":"Estimated from non-overlapping turn token deltas; turns with tools are attributed to the tools observed in that turn.","usage.contextClaudeNote":"Approximate: output tokens are distributed by the relative size of text, thinking, and tool-use content blocks.","usage.methodology":"Methodology","heatmap.reset":"Reset view","heatmap.days":"days","heatmap.tokens":"Tokens","heatmap.prompts":"Prompts","heatmap.noData":"No data"},zh:{"app.language":"EN","app.languageTitle":"语言","app.brand":"Vibe Roaster","app.github":"GitHub","app.loading":"正在加载 roast…","roastAccess.kicker":"你的 Roast 档案","roastAccess.title":"让 Roast 真正属于你。","roastAccess.subtitle":"使用 GitHub 保存稳定档案,使用自己的模型,或让整个结果留在本地。","roastAccess.githubChoice":"使用 GitHub 保存","roastAccess.githubDescription":"生成一次,随处恢复;只有编码画像明显变化时才会更新。","roastAccess.githubSignedInDescription":"你保存的 Roast 档案已就绪。","roastAccess.freeTier":"保存档案","roastAccess.ownKey":"你的 Provider","roastAccess.apiChoice":"使用 API Key","roastAccess.apiDescription":"支持 DeepSeek、OpenAI、Anthropic、Gemini、Groq 和 OpenRouter。","roastAccess.privacy":"只共享聚合画像信号,原始 Prompt 始终留在本机。","roastAccess.local":"跳过 AI · 使用本地 Roast","roastAccess.back":"返回","roastAccess.apiTitle":"使用你自己的模型。","roastAccess.apiSubtitle":"选择 Provider 直接生成,无需绑定用户档案。","roastAccess.keyRequired":"请输入 API Key 后继续。","roastAccess.sessionOnly":"仅本次会话","roastAccess.keyPlaceholder":"{provider} API Key","roastAccess.model":"模型","roastAccess.advanced":"高级 Endpoint","roastAccess.generate":"生成我的 Roast","roastAccess.generating":"正在磨尖吐槽…","roastAccess.githubTitle":"一个账号,一份 Roast。","roastAccess.githubSubtitle":"登录后创建或恢复与你的编码画像绑定的 Roast。","roastAccess.githubUnavailable":"暂时无法检查 GitHub 登录服务,但你仍然可以尝试连接。","roastAccess.githubOneClick":"登录以创建或恢复你的 Roast 档案。","roastAccess.continueGithub":"使用 GitHub 继续","roastAccess.githubRetry":"重试 GitHub","roastAccess.githubFailed":"GitHub 授权失败。","roastAccess.openGithub":"打开 GitHub","roastAccess.waiting":"正在等待你在 GitHub 中确认…","roastAccess.githubConnected":"你的 Roast 已绑定到这个 GitHub 账号。","roastAccess.generateFree":"打开我的 Roast","roastAccess.chooseProvider":"选择 AI Provider","roastAccess.signOut":"退出 GitHub 登录","roastAccess.popupBlocked":"GitHub 窗口被浏览器拦截了,请允许弹窗后重试。","roastAccess.githubPrivacy":"只会使用并保存聚合画像信号,原始 Prompt 始终留在本机。","profile.empty":"还没有 vibe 画像——先 inspect 一些本地会话。","profile.radar":"行为雷达","profile.radarAria":"行为雷达","profile.sixAxis":"六项信号 / 100","profile.axes":"类型轴","profile.roast":"Roast 正文","profile.tldr":"TL;DR","profile.agentsFound":"找到 {count} 个 Agent","profile.detectedAgents":"检测到的 Agent","profile.cloudKicker":"你的词汇","profile.cloud":"词云","profile.activityKicker":"你的节奏","profile.activity":"活动热力图","profile.activityHint":"每一列代表一天;展开查看完整时间线。","profile.activityHintTokens":"绿色柱体代表 TokenTracker 每日 token;可切换视图或展开查看详情。","profile.stat.totalTokens":"总 Tokens","profile.stat.totalPrompts":"总提示数","profile.stat.estCost":"估算费用","profile.stat.activeDays":"活跃天数","profile.stat.streak":"最长连续","profile.stat.peakDay":"峰值日","profile.stat.modelCount":"{count} 个模型","profile.posterShare":"分享海报","profile.posterBusy":"准备中…","profile.posterTitle":"分享你的 Roast","profile.posterDownload":"下载 PNG","profile.posterClose":"关闭","profile.posterKicker":"你的分享卡片","profile.posterHint":"把你的编码人格压缩成一张编辑封面。可以直接分享,也可以保存 PNG 与配文。","profile.posterNativeShare":"分享图片","profile.posterFormat":"PNG · 1080 × 1440 · 3:4","profile.posterCopyCaption":"复制配文","profile.posterFootnote":"导出的卡片只包含聚合画像结果,不会包含原始 Prompt。","profile.posterSaved":"PNG 已保存,可以直接发布。","profile.posterShared":"Roast 卡片已分享。","profile.posterShareFailed":"暂时无法直接分享图片,请下载后发布。","profile.posterCaptionCopied":"配文已复制到剪贴板。","heatmap.open":"展开活动","heatmap.openTitle":"打开完整活动视图","heatmap.close":"关闭","heatmap.insight":"活动摘要","heatmap.tokenTitle":"Token 活动","heatmap.promptTitle":"活动地形图","heatmap.tokenDesc":"按住鼠标左键拖拽旋转;悬停查看每天的活动和模型指标。","heatmap.promptDesc":"每一列代表一天,高度和颜色都会随提示量上升。","heatmap.totalTokens":"年度总 tokens","heatmap.totalPrompts":"总提示数","heatmap.activeRateDays":"活跃率 / 天数","heatmap.activeDays":"活跃天数","heatmap.activeDayCount":"{count} 个活跃日","heatmap.longestStreak":"最长连续活跃","heatmap.maxStreak":"最长连续","heatmap.peakDay":"峰值日","heatmap.activityLevels":"活动等级","heatmap.legend":"图例","heatmap.footerTip":"捏合或滚动缩放 / 拖拽旋转","heatmap.viewGrid":"方格","heatmap.viewTerrain":"地形","heatmap.viewLabel":"热力图视图","heatmap.less":"少","heatmap.more":"多","theme.light":"浅色","theme.dark":"深色","theme.system":"跟随系统","usage.trend":"使用趋势","usage.period":"时间范围","usage.agentFilter":"Agent 筛选","usage.allAgents":"全部 Agent","usage.all":"全部","usage.from":"开始日期","usage.to":"结束日期","usage.cloudKicker":"你的编码语言","usage.cloud":"高频主题","usage.cloudPromptCount":"{count} 条 Prompt","usage.cloudEmpty":"这个时间范围内还没有可展示的编码主题。","usage.modelKicker":"模型足迹","usage.models":"各模型用量","usage.showAllModels":"显示全部 {count} 个模型","usage.showLessModels":"收起模型列表","usage.contextKicker":"上下文构成","usage.contextTitle":"{agent} Token 构成","usage.cacheHit":"缓存命中率 {percent}%","usage.contextEvents":"{count} 个计量轮次","usage.toolCallCount":"{count} 次工具调用","usage.context.messages":"Messages","usage.context.tool_calls":"Tool calls","usage.context.reasoning":"Reasoning","usage.context.system_prompt":"System prompt","usage.context.custom_agents":"Custom agents","usage.contextCodexNote":"启发式估算:使用互不重叠的逐轮 token 增量;出现工具的轮次归因到该轮观察到的工具。","usage.contextClaudeNote":"近似估算:按 text、thinking 与 tool-use 内容块的相对长度分配输出 token。","usage.methodology":"计算方法","heatmap.reset":"重置视角","heatmap.days":"天","heatmap.tokens":"Tokens","heatmap.prompts":"提示","heatmap.noData":"无数据"}};function vs(a){return tp.includes(a)?a:"en"}function np(a,c="en",u={}){var v;const d=vs(c);return(((v=pc[d])==null?void 0:v[a])??pc.en[a]??a).replace(/\{(\w+)\}/g,(m,g)=>String(u[g]??`{${g}}`))}const Dc=M.createContext({locale:"en",setLocale:()=>{},toggleLocale:()=>{},t:a=>a});function rp({children:a}){const[c,u]=M.useState(()=>{try{return vs(localStorage.getItem("vibe-locale")||"en")}catch{return"en"}}),d=v=>{const m=vs(v);u(m);try{localStorage.setItem("vibe-locale",m)}catch{}},f=M.useMemo(()=>({locale:c,setLocale:d,toggleLocale:()=>d(c==="en"?"zh":"en"),t:(v,m)=>np(v,c,m)}),[c]);return s.jsx(Dc.Provider,{value:f,children:a})}function Xn(){return M.useContext(Dc)}/**
41
+ * @license lucide-react v0.468.0 - ISC
42
+ *
43
+ * This source code is licensed under the ISC license.
44
+ * See the LICENSE file in the root directory of this source tree.
45
+ */const op=a=>a.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),$c=(...a)=>a.filter((c,u,d)=>!!c&&c.trim()!==""&&d.indexOf(c)===u).join(" ").trim();/**
46
+ * @license lucide-react v0.468.0 - ISC
47
+ *
48
+ * This source code is licensed under the ISC license.
49
+ * See the LICENSE file in the root directory of this source tree.
50
+ */var lp={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
51
+ * @license lucide-react v0.468.0 - ISC
52
+ *
53
+ * This source code is licensed under the ISC license.
54
+ * See the LICENSE file in the root directory of this source tree.
55
+ */const ap=M.forwardRef(({color:a="currentColor",size:c=24,strokeWidth:u=2,absoluteStrokeWidth:d,className:f="",children:v,iconNode:m,...g},p)=>M.createElement("svg",{ref:p,...lp,width:c,height:c,stroke:a,strokeWidth:d?Number(u)*24/Number(c):u,className:$c("lucide",f),...g},[...m.map(([y,C])=>M.createElement(y,C)),...Array.isArray(v)?v:[v]]));/**
56
+ * @license lucide-react v0.468.0 - ISC
57
+ *
58
+ * This source code is licensed under the ISC license.
59
+ * See the LICENSE file in the root directory of this source tree.
60
+ */const lt=(a,c)=>{const u=M.forwardRef(({className:d,...f},v)=>M.createElement(ap,{ref:v,iconNode:c,className:$c(`lucide-${op(a)}`,d),...f}));return u.displayName=`${a}`,u};/**
61
+ * @license lucide-react v0.468.0 - ISC
62
+ *
63
+ * This source code is licensed under the ISC license.
64
+ * See the LICENSE file in the root directory of this source tree.
65
+ */const sp=lt("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
66
+ * @license lucide-react v0.468.0 - ISC
67
+ *
68
+ * This source code is licensed under the ISC license.
69
+ * See the LICENSE file in the root directory of this source tree.
70
+ */const Fc=lt("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
71
+ * @license lucide-react v0.468.0 - ISC
72
+ *
73
+ * This source code is licensed under the ISC license.
74
+ * See the LICENSE file in the root directory of this source tree.
75
+ */const Uc=lt("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
76
+ * @license lucide-react v0.468.0 - ISC
77
+ *
78
+ * This source code is licensed under the ISC license.
79
+ * See the LICENSE file in the root directory of this source tree.
80
+ */const Hc=lt("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
81
+ * @license lucide-react v0.468.0 - ISC
82
+ *
83
+ * This source code is licensed under the ISC license.
84
+ * See the LICENSE file in the root directory of this source tree.
85
+ */const ip=lt("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
86
+ * @license lucide-react v0.468.0 - ISC
87
+ *
88
+ * This source code is licensed under the ISC license.
89
+ * See the LICENSE file in the root directory of this source tree.
90
+ */const up=lt("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
91
+ * @license lucide-react v0.468.0 - ISC
92
+ *
93
+ * This source code is licensed under the ISC license.
94
+ * See the LICENSE file in the root directory of this source tree.
95
+ */const mc=lt("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
96
+ * @license lucide-react v0.468.0 - ISC
97
+ *
98
+ * This source code is licensed under the ISC license.
99
+ * See the LICENSE file in the root directory of this source tree.
100
+ */const xl=lt("Github",[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]]);/**
101
+ * @license lucide-react v0.468.0 - ISC
102
+ *
103
+ * This source code is licensed under the ISC license.
104
+ * See the LICENSE file in the root directory of this source tree.
105
+ */const cp=lt("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
106
+ * @license lucide-react v0.468.0 - ISC
107
+ *
108
+ * This source code is licensed under the ISC license.
109
+ * See the LICENSE file in the root directory of this source tree.
110
+ */const dp=lt("KeyRound",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);/**
111
+ * @license lucide-react v0.468.0 - ISC
112
+ *
113
+ * This source code is licensed under the ISC license.
114
+ * See the LICENSE file in the root directory of this source tree.
115
+ */const fp=lt("LockKeyhole",[["circle",{cx:"12",cy:"16",r:"1",key:"1au0dj"}],["rect",{x:"3",y:"10",width:"18",height:"12",rx:"2",key:"6s8ecr"}],["path",{d:"M7 10V7a5 5 0 0 1 10 0v3",key:"1pqi11"}]]);/**
116
+ * @license lucide-react v0.468.0 - ISC
117
+ *
118
+ * This source code is licensed under the ISC license.
119
+ * See the LICENSE file in the root directory of this source tree.
120
+ */const pp=lt("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
121
+ * @license lucide-react v0.468.0 - ISC
122
+ *
123
+ * This source code is licensed under the ISC license.
124
+ * See the LICENSE file in the root directory of this source tree.
125
+ */const mp=lt("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/**
126
+ * @license lucide-react v0.468.0 - ISC
127
+ *
128
+ * This source code is licensed under the ISC license.
129
+ * See the LICENSE file in the root directory of this source tree.
130
+ */const hp=lt("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
131
+ * @license lucide-react v0.468.0 - ISC
132
+ *
133
+ * This source code is licensed under the ISC license.
134
+ * See the LICENSE file in the root directory of this source tree.
135
+ */const gp=lt("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
136
+ * @license lucide-react v0.468.0 - ISC
137
+ *
138
+ * This source code is licensed under the ISC license.
139
+ * See the LICENSE file in the root directory of this source tree.
140
+ */const xp=lt("Share2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]);/**
141
+ * @license lucide-react v0.468.0 - ISC
142
+ *
143
+ * This source code is licensed under the ISC license.
144
+ * See the LICENSE file in the root directory of this source tree.
145
+ */const hc=lt("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
146
+ * @license lucide-react v0.468.0 - ISC
147
+ *
148
+ * This source code is licensed under the ISC license.
149
+ * See the LICENSE file in the root directory of this source tree.
150
+ */const gc=lt("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
151
+ * @license lucide-react v0.468.0 - ISC
152
+ *
153
+ * This source code is licensed under the ISC license.
154
+ * See the LICENSE file in the root directory of this source tree.
155
+ */const vp=lt("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
156
+ * @license lucide-react v0.468.0 - ISC
157
+ *
158
+ * This source code is licensed under the ISC license.
159
+ * See the LICENSE file in the root directory of this source tree.
160
+ */const Bc=lt("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);var Wc=Rc();function vl(a){const c=a.getUTCFullYear(),u=String(a.getUTCMonth()+1).padStart(2,"0"),d=String(a.getUTCDate()).padStart(2,"0");return`${c}-${u}-${d}`}function yl(a,c){return new Date(Date.UTC(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate()+c))}function yp(a,c){return Math.floor((Date.UTC(c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate())-Date.UTC(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate()))/864e5)}function ms(a,c){if(!Array.isArray(a)||a.length===0)return 0;const u=a.length,d=(u-1)*c,f=Math.floor(d),v=d-f,m=a[f]??a[u-1],g=a[Math.min(u-1,f+1)]??a[u-1];return Math.round(m+(g-m)*v)}function kp(a){return a<=0?0:a>=4?4:a}function Cs({prompts:a=[],dailyRows:c=null,weeks:u=52}){var ue;const d=new Date,f=new Date(Date.UTC(d.getFullYear(),d.getMonth(),d.getDate())),v=yl(f,-(u*7-1)),m=v.getUTCDay(),g=yl(v,-m),p=new Map;if(Array.isArray(c)&&c.length>0)for(const F of c){if(!(F!=null&&F.day))continue;const Q=Cl(F.billable_total_tokens??F.total_tokens??F.value),U=p.get(F.day)||{value:0,models:{},sources:{},conversation_count:0};U.value+=Q,U.total_tokens=(U.total_tokens||0)+Cl(F.total_tokens??Q),U.billable_total_tokens=(U.billable_total_tokens||0)+Q,U.conversation_count+=Cl(F.conversation_count),xc(U.models,F.models),xc(U.sources,F.sources),p.set(F.day,U)}else for(const F of a||[]){if(!F.timestamp)continue;const Q=String(F.timestamp).slice(0,10),U=p.get(Q)||{value:0,models:{}};U.value++;const I=F.source||"unknown";U.models[I]=(U.models[I]||0)+1,p.set(Q,U)}const y=yp(g,f)+1,C=Math.ceil(y/7),E=[];for(let F=0;F<y;F++){const Q=yl(g,F),U=vl(Q),I=((ue=p.get(U))==null?void 0:ue.value)||0;I>0&&E.push(I)}E.sort((F,Q)=>F-Q);const w=ms(E,.5),G=ms(E,.75),O=ms(E,.9);function T(F){return!F||F<=0?0:F<=w?1:F<=G?2:F<=O?3:4}const P=[];for(let F=0;F<C;F++){const Q=[];for(let U=0;U<7;U++){const I=F*7+U,he=yl(g,I);if(he.getTime()>f.getTime()){Q.push(null);continue}const Se=vl(he),ce=p.get(Se),Me=ce?ce.value:0;Q.push({day:Se,value:Me,total_tokens:ce==null?void 0:ce.total_tokens,billable_total_tokens:ce==null?void 0:ce.billable_total_tokens,conversation_count:ce==null?void 0:ce.conversation_count,level:kp(T(Me)),models:(ce==null?void 0:ce.models)||null,sources:(ce==null?void 0:ce.sources)||null})}P.push(Q)}const ie=P.length>u?P.slice(P.length-u):P;return{from:vl(g),to:vl(f),weeks:ie,thresholds:{t1:w,t2:G,t3:O}}}function xc(a,c){if(!(!c||typeof c!="object"))for(const[u,d]of Object.entries(c))a[u]=(a[u]||0)+Cl(d)}function Cl(a){const c=Number(a||0);return Number.isFinite(c)&&c>0?Math.floor(c):0}const lo={emerald:{light:["#ebedf0","#a7f3d0","#6ee7b7","#34d399","#10b981"],dark:["#2d333b","#065f46","#059669","#10b981","#34d399"],gridColor:{light:"rgba(16, 185, 129, 0.12)",dark:"rgba(52, 211, 153, 0.08)"}},ocean:{light:["#f1f5f9","#93c5fd","#60a5fa","#3b82f6","#1d4ed8"],dark:["#1e293b","#1e3a8a","#2563eb","#3b82f6","#60a5fa"],gridColor:{light:"rgba(59, 130, 246, 0.12)",dark:"rgba(96, 165, 250, 0.08)"}},neon:{light:["#faf5ff","#ebd5ff","#c084fc","#a855f7","#7e22ce"],dark:["#2e1065","#581c87","#8b5cf6","#a855f7","#c084fc"],gridColor:{light:"rgba(168, 85, 247, 0.12)",dark:"rgba(192, 132, 252, 0.08)"}},amber:{light:["#fffbeb","#fde68a","#f59e0b","#d97706","#b45309"],dark:["#451a03","#78350f","#b45309","#d97706","#f59e0b"],gridColor:{light:"rgba(245, 158, 11, 0.12)",dark:"rgba(245, 158, 11, 0.08)"}}};function wp(a,c){const u=/^#([0-9a-f]{6})$/i.exec(a);if(!u)return a;const d=parseInt(u[1],16),f=d>>16&255,v=d>>8&255,m=d&255,g=p=>Math.max(0,Math.min(255,Math.round(p*c)));return`rgb(${g(f)}, ${g(v)}, ${g(m)})`}function tn(a,c,u,d,f){const v=Math.cos(d),m=Math.sin(d),g=a*v-c*m,p=a*m+c*v,y=u,C=Math.cos(f),E=Math.sin(f);return{x:g,y:p*C-y*E,z:p*E+y*C}}function Sp(a,c,u,d,f){return tn(a,c,u,d,f)}function Cp(a,c){const u=Number(c).toLocaleString();return a>=4?`${u} prompts — an epic day of coding!`:a===3?`${u} prompts — you were in the zone.`:a===2?`${u} prompts — a solid session.`:a===1?`${u} prompts — dipping your toes in.`:"No activity this day."}function vc({prompts:a=[],dailyRows:c=null,weeks:u=26,palette:d="emerald",isDark:f=!0,interactive:v=!0,autoRotateInit:m=!0,onResetViewRef:g=null,unitLabel:p="Prompts"}){const C=M.useMemo(()=>Cs({prompts:a,dailyRows:c,weeks:u}),[a,c,u]).weeks,E=lo[d]||lo.emerald,w=f?E.dark:E.light,G=f?E.gridColor.dark:E.gridColor.light,O=-.2,T=.88,[P,ie]=M.useState({yaw:O,pitch:T}),[ue,F]=M.useState(m),[Q,U]=M.useState(1),I=v?13:10.5;M.useEffect(()=>{g&&(g.current={reset:()=>{ie({yaw:O,pitch:T}),F(!1),U(1),K()},toggleAutoRotate:D=>{F(D)}})},[g]);const he=M.useMemo(()=>{const D=[],V=C.length;if(V===0||!v)return[];for(let ae=0;ae<=7;ae++){const Y=(ae-3.5)*I,de=tn(-V/2*I,Y,0,P.yaw,P.pitch),ve=tn(V/2*I,Y,0,P.yaw,P.pitch);D.push({d:`M${de.x},${de.y} L${ve.x},${ve.y}`,key:`h-${ae}`})}for(let ae=0;ae<=V;ae+=4){const Y=(ae-V/2)*I,de=tn(Y,-3.5*I,0,P.yaw,P.pitch),ve=tn(Y,3.5*I,0,P.yaw,P.pitch);D.push({d:`M${de.x},${de.y} L${ve.x},${ve.y}`,key:`v-${ae}`})}if(V%4!==0){const ae=(V-V/2)*I,Y=tn(ae,-3.5*I,0,P.yaw,P.pitch),de=tn(ae,3.5*I,0,P.yaw,P.pitch);D.push({d:`M${Y.x},${Y.y} L${de.x},${de.y}`,key:"v-last"})}return D},[C.length,P,I,v]),Se=M.useRef(null),ce=M.useRef(null),Me=M.useRef(!1),Fe=M.useRef({x:0,y:0}),ee=M.useRef({yaw:O,pitch:T}),je=M.useRef({x:0,y:0}),te=M.useRef({x:0,y:0,time:0}),ye=M.useRef(null),[Pe,Ne]=M.useState(v?0:1),H=M.useRef(null),oe=M.useRef(!0);M.useEffect(()=>(oe.current=!0,()=>{oe.current=!1}),[]);const K=()=>{H.current&&cancelAnimationFrame(H.current),Ne(0);const D=performance.now(),V=ae=>{if(!oe.current)return;const Y=Math.min(1,(ae-D)/1200);Ne(1-Math.pow(1-Y,3)),Y<1&&(H.current=requestAnimationFrame(V))};H.current=requestAnimationFrame(V)};M.useEffect(()=>(K(),()=>{H.current&&cancelAnimationFrame(H.current)}),[v]),M.useEffect(()=>{var ae;if(!ue||Me.current||typeof window<"u"&&((ae=window.matchMedia)!=null&&ae.call(window,"(prefers-reduced-motion: reduce)").matches))return;let D;const V=()=>{if(typeof document<"u"&&document.visibilityState==="hidden"){D=requestAnimationFrame(V);return}ie(Y=>({yaw:Y.yaw+.002,pitch:Y.pitch})),D=requestAnimationFrame(V)};return D=requestAnimationFrame(V),()=>cancelAnimationFrame(D)},[ue]);const S=(D,V)=>{v&&(Me.current=!0,Fe.current={x:D,y:V},ee.current={yaw:P.yaw,pitch:P.pitch},je.current={x:0,y:0},te.current={x:D,y:V,time:performance.now()},ye.current&&cancelAnimationFrame(ye.current))},_=(D,V)=>{if(!Me.current)return;const ae=D-Fe.current.x,Y=V-Fe.current.y,de=performance.now(),ve=de-te.current.time;ve>0&&(je.current={x:(D-te.current.x)/ve,y:(V-te.current.y)/ve}),te.current={x:D,y:V,time:de};const De=.005,Ke=ee.current.yaw-ae*De,He=Math.PI/2.3,qe=Math.max(-He,Math.min(He,ee.current.pitch-Y*De));ie({yaw:Ke,pitch:qe})},z=()=>{if(!Me.current)return;Me.current=!1;let D=-je.current.x*12,V=-je.current.y*12;const ae=()=>{Me.current||(D*=.95,V*=.95,!(Math.abs(D)<.01&&Math.abs(V)<.01)&&(ie(Y=>{const de=Math.PI/2.3;return{yaw:Y.yaw+D*.005,pitch:Math.max(-de,Math.min(de,Y.pitch+V*.005))}}),ye.current=requestAnimationFrame(ae)))};ye.current=requestAnimationFrame(ae)},[W,me]=M.useState(null),[X,Ce]=M.useState({x:0,y:0,shiftX:0}),fe=M.useRef(null);M.useEffect(()=>()=>{fe.current&&clearTimeout(fe.current)},[]),M.useEffect(()=>{if(!v||!ce.current)return;const D=V=>{V.preventDefault(),U(ae=>Math.max(.5,Math.min(3,ae-V.deltaY*.0025)))};return ce.current.addEventListener("wheel",D,{passive:!1}),()=>{var V;return(V=ce.current)==null?void 0:V.removeEventListener("wheel",D)}},[v]);const Ee=M.useMemo(()=>{const D=[];return C.forEach((V,ae)=>{(Array.isArray(V)?V:[]).forEach((Y,de)=>{Y&&D.push({key:Y.day||`${ae}-${de}`,col:ae,row:de,level:Y.level||0,value:Y.value||0,day:Y.day,models:Y.models||null})})}),D},[C]),nn=I-(v?1.8:1.5),_e=v?38:28,A=D=>Math.max(1.8,Number(D)/4*_e),Z=M.useMemo(()=>{if(Ee.length===0)return[];const D=C.length;return Ee.map(V=>{const ae=A(V.level),Y=Math.sqrt(Math.pow(V.col-D/2,2)+Math.pow(V.row-3.5,2)),de=Math.sqrt(Math.pow(D/2,2)+Math.pow(3.5,2)),ve=Y/de*.4,De=Math.min(1,Math.max(0,(Pe-ve)*(1/.6))),Ke=ae*De,He=(V.col-D/2)*I,qe=(V.row-3.5)*I,We=nn/2,rt=[{x:He-We,y:qe-We,z:0},{x:He+We,y:qe-We,z:0},{x:He+We,y:qe+We,z:0},{x:He-We,y:qe+We,z:0},{x:He-We,y:qe-We,z:Ke},{x:He+We,y:qe-We,z:Ke},{x:He+We,y:qe+We,z:Ke},{x:He-We,y:qe+We,z:Ke}].map(mt=>tn(mt.x,mt.y,mt.z,P.yaw,P.pitch)),At=tn(He,qe,Ke/2,P.yaw,P.pitch),Lt=[{name:"top",indices:[4,5,6,7],scale:1,normal:[0,0,1]},{name:"bottom",indices:[3,2,1,0],scale:.4,normal:[0,0,-1]},{name:"left",indices:[3,0,4,7],scale:.55,normal:[-1,0,0]},{name:"right",indices:[1,2,6,5],scale:.75,normal:[1,0,0]},{name:"front",indices:[0,1,5,4],scale:.85,normal:[0,-1,0]},{name:"back",indices:[2,3,7,6],scale:.65,normal:[0,1,0]}],yt=w[Math.min(4,Math.max(0,Number(V.level)||0))],Qt=[],Rt=.35,ao=-.4,so=.83;return Lt.forEach(mt=>{const An=Sp(mt.normal[0],mt.normal[1],mt.normal[2],P.yaw,P.pitch);if(An.z>.001){const kr=rt[mt.indices[0]],Zn=rt[mt.indices[1]],wr=rt[mt.indices[2]],fn=rt[mt.indices[3]],Sr=`M${kr.x},${kr.y} L${Zn.x},${Zn.y} L${wr.x},${wr.y} L${fn.x},${fn.y} Z`,Ln=An.x*Rt+An.y*ao+An.z*so,El=f?.18:0,Rn=mt.scale*(.82+.28*Math.max(0,Ln))+El;Qt.push({name:mt.name,d:Sr,fill:wp(yt,Rn)})}}),{...V,centerProj:At,renderedFaces:Qt}})},[Ee,P,w,C.length,Pe,I,nn,_e,f]),J=M.useMemo(()=>[...Z].sort((D,V)=>D.centerProj.z-V.centerProj.z),[Z]),ke=M.useMemo(()=>{if(J.length===0)return{minX:-100,minY:-100,maxX:100,maxY:100};let D=1/0,V=1/0,ae=-1/0,Y=-1/0;return J.forEach(de=>{const ve=I*2;de.centerProj.x-ve<D&&(D=de.centerProj.x-ve),de.centerProj.x+ve>ae&&(ae=de.centerProj.x+ve),de.centerProj.y-ve<V&&(V=de.centerProj.y-ve),de.centerProj.y+ve>Y&&(Y=de.centerProj.y+ve)}),{minX:D,minY:V,maxX:ae,maxY:Y}},[J,I]),pe=12,Te=ke.maxX-ke.minX+pe*2,Ae=ke.maxY-ke.minY+pe*2,Le=Te/Q,be=Ae/Q,Ye=ke.minX-pe+(Te-Le)/2,Re=ke.minY-pe+(Ae-be)/2,Ue=`${Ye} ${Re} ${Le} ${be}`;return Ee.length===0?s.jsx("div",{className:"py-8 text-center text-sm text-oai-gray-500",children:"No activity data yet."}):s.jsxs("div",{ref:ce,className:`relative select-none outline-none ${v?"cursor-grab active:cursor-grabbing w-full h-full flex items-center justify-center":"w-full h-full min-h-[220px] overflow-hidden flex items-center justify-center"}`,onMouseDown:D=>{if(!v)return;S(D.clientX,D.clientY);const V=Y=>_(Y.clientX,Y.clientY),ae=()=>{z(),window.removeEventListener("mousemove",V),window.removeEventListener("mouseup",ae)};window.addEventListener("mousemove",V),window.addEventListener("mouseup",ae)},onTouchStart:D=>{v&&D.touches.length&&S(D.touches[0].clientX,D.touches[0].clientY)},onTouchMove:D=>{v&&D.touches.length&&_(D.touches[0].clientX,D.touches[0].clientY)},onTouchEnd:()=>{v&&z()},children:[s.jsxs("svg",{ref:Se,viewBox:Ue,width:"100%",height:"100%",preserveAspectRatio:"xMidYMid meet",role:"img","aria-label":"Interactive activity heatmap",style:{display:"block",width:"100%",height:"100%",maxHeight:v?"78vh":"100%"},className:"transition-transform duration-300 ease-out",children:[v&&he.map(D=>s.jsx("path",{d:D.d,fill:"none",stroke:G,strokeWidth:.25,strokeDasharray:"1.5 2.5",strokeLinecap:"round"},D.key)),J.map(D=>{const V=W&&W.key===D.key;return s.jsxs("g",{onMouseEnter:ae=>{var Y;if(fe.current&&(clearTimeout(fe.current),fe.current=null),me(D),v&&Se.current){const de=tn((D.col-C.length/2)*I,(D.row-3.5)*I,A(D.level),P.yaw,P.pitch);let ve=0,De=0;const Ke=Se.current;if(ce.current&&typeof Ke.createSVGPoint=="function"&&typeof Ke.getScreenCTM=="function")try{const pt=Ke.createSVGPoint();pt.x=de.x,pt.y=de.y;const rt=Ke.getScreenCTM();if(rt){const At=pt.matrixTransform(rt),Lt=ce.current.getBoundingClientRect();ve=At.x-Lt.left,De=At.y-Lt.top}}catch{}const He=140,qe=((Y=ce.current)==null?void 0:Y.getBoundingClientRect().width)||Ke.getBoundingClientRect().width;let We=0;ve<He?We=He-ve:ve>qe-He&&(We=qe-He-ve),Ce({x:ve,y:De,shiftX:We})}},onMouseLeave:()=>{fe.current&&clearTimeout(fe.current),fe.current=setTimeout(()=>me(null),150)},className:"transition-all duration-200",style:{filter:V?"brightness(1.15) drop-shadow(0 4px 6px rgba(0,0,0,0.15))":"none",cursor:v?"pointer":"default"},children:[!v&&D.day&&s.jsx("title",{children:`${D.day}: ${Number(D.value).toLocaleString()} ${p.toLowerCase()}`}),D.renderedFaces.map((ae,Y)=>s.jsx("path",{d:ae.d,fill:ae.fill,stroke:ae.fill,strokeWidth:.25,strokeLinejoin:"round"},Y))]},D.key)})]}),v&&W&&s.jsxs("div",{onMouseEnter:()=>{fe.current&&(clearTimeout(fe.current),fe.current=null)},onMouseLeave:()=>{fe.current&&clearTimeout(fe.current),fe.current=setTimeout(()=>me(null),150)},className:"absolute z-[9999] w-0 h-0 transition-all duration-100 ease-out",style:{left:`${X.x}px`,top:`${X.y}px`},children:[s.jsxs("div",{className:"absolute left-0 bottom-[10px] backdrop-blur-md bg-white/90 dark:bg-oai-gray-900/90 border border-oai-gray-200/50 dark:border-oai-gray-800/50 shadow-xl rounded-xl p-3.5 max-w-[280px] min-w-[200px] flex flex-col gap-2 animate-in fade-in zoom-in-95 duration-100",style:{transform:`translateX(calc(-50% + ${X.shiftX}px))`},children:[s.jsxs("div",{className:"flex items-center justify-between border-b border-oai-gray-100 dark:border-oai-gray-800/80 pb-1.5",children:[s.jsx("span",{className:"text-[11px] font-semibold text-oai-gray-500 dark:text-oai-gray-400",children:W.day}),s.jsxs("span",{className:"text-[10px] px-2 py-0.5 rounded-full font-medium",style:{backgroundColor:(W.level===0?f?"#9ca3af":"#6b7280":w[W.level])+"22",color:W.level===0?f?"#9ca3af":"#6b7280":w[W.level],border:`1px solid ${W.level===0?f?"#9ca3af":"#6b7280":w[W.level]}44`},children:["Level ",W.level]})]}),s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsxs("div",{className:"flex items-baseline gap-1",children:[s.jsx("span",{className:"text-lg font-bold text-oai-gray-900 dark:text-white leading-none",children:Number(W.value).toLocaleString()}),s.jsx("span",{className:"text-[10px] text-oai-gray-400 uppercase tracking-wider font-semibold",children:p})]}),W.models&&Object.keys(W.models).length>0?s.jsxs("div",{className:"mt-1.5 border-t border-oai-gray-100 dark:border-oai-gray-800/60 pt-2 flex flex-col gap-1.5",children:[s.jsx("div",{className:"text-[10px] font-semibold text-oai-gray-400 dark:text-oai-gray-500 uppercase tracking-wider",children:"Source Breakdown"}),s.jsx("div",{className:"flex flex-col gap-2 max-h-[150px] overflow-y-auto pr-1.5",children:Object.entries(W.models).map(([D,V])=>({name:D,val:Number(V)||0})).sort((D,V)=>V.val-D.val).map(({name:D,val:V})=>{const ae=Number(W.value)||1,Y=Math.round(V/ae*100);return s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsxs("div",{className:"flex items-center justify-between text-[11px] gap-3",children:[s.jsx("span",{className:"font-medium text-oai-gray-700 dark:text-oai-gray-200 truncate max-w-[120px]",title:D,children:D}),s.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[s.jsx("span",{className:"font-mono text-oai-gray-900 dark:text-oai-gray-100 font-semibold",children:V.toLocaleString()}),s.jsxs("span",{className:"text-[9px] text-oai-gray-400 dark:text-oai-gray-500 min-w-[28px] text-right font-medium",children:[Y,"%"]})]})]}),s.jsx("div",{className:"w-full h-1 bg-oai-gray-100 dark:bg-oai-gray-800/85 rounded-full overflow-hidden",children:s.jsx("div",{className:"h-full rounded-full transition-all duration-300",style:{width:`${Y}%`,backgroundColor:w[4],boxShadow:`0 0 4px ${w[4]}55`}})})]},D)})})]}):s.jsx("p",{className:"text-[11px] text-oai-gray-600 dark:text-oai-gray-300 leading-relaxed font-normal mt-1 border-t border-dashed border-oai-gray-100 dark:border-oai-gray-800/60 pt-1.5",children:Cp(W.level,W.value)})]})]}),s.jsx("div",{className:"absolute bottom-[6px] left-0 -translate-x-1/2 w-2.5 h-2.5 rotate-45 bg-white dark:bg-oai-gray-900 border-r border-b border-oai-gray-200/50 dark:border-oai-gray-800/50 shadow-sm",style:{marginBottom:"1px"}})]})]})}const jp=["#ebedf0","#a7f3d0","#6ee7b7","#34d399","#10b981"],bp=["#121212","#065f46","#059669","#10b981","#34d399"],zn=11,ro=2,hs=26;function Np({prompts:a=[],dailyRows:c=null,weeks:u=26,dark:d=!1,compact:f=!1,dense:v=!1}){const{locale:m,t:g}=Xn(),p=M.useMemo(()=>Cs({prompts:a,dailyRows:c,weeks:u}),[a,c,u]),y=d?bp:jp,C=p.weeks||[],E=Math.max(C.length*(zn+ro)+hs,120),w=m==="zh"?["日","一","二","三","四","五","六"]:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],G=M.useMemo(()=>{const O=[];return C.forEach((T,P)=>{var F;const ie=(F=(T||[]).find(Q=>{var U;return(U=Q==null?void 0:Q.day)==null?void 0:U.endsWith("-01")}))==null?void 0:F.day;if(!ie)return;const ue=new Date(`${ie}T00:00:00Z`);O.push({index:P,text:new Intl.DateTimeFormat(m==="zh"?"zh-CN":"en-US",{month:"short",timeZone:"UTC"}).format(ue)})}),O},[C,m]);return s.jsxs("div",{className:"w-full",children:[s.jsx("div",{className:"activity-scroll overflow-x-auto overflow-y-hidden pb-1",children:s.jsxs("div",{style:{width:E},children:[s.jsx("div",{className:"relative mb-1 h-3 text-[10px] uppercase text-[#8b8680] dark:text-[#8f8f8f]",children:G.map(O=>s.jsx("span",{className:"absolute whitespace-nowrap",style:{left:hs+O.index*(zn+ro)},children:O.text},`${O.text}-${O.index}`))}),s.jsxs("div",{className:"flex",style:{gap:ro},children:[s.jsx("div",{className:"grid shrink-0 text-[10px] text-[#8b8680] dark:text-[#8f8f8f]",style:{width:hs,gridTemplateRows:`repeat(7, ${zn}px)`,rowGap:ro},children:w.map(O=>s.jsx("span",{className:"leading-none",children:O},O))}),s.jsx("div",{className:"grid",style:{gridAutoFlow:"column",gridTemplateRows:`repeat(7, ${zn}px)`,gap:ro},children:C.map((O,T)=>(O||[]).map((P,ie)=>P?s.jsx("span",{className:"activity-cell cursor-pointer rounded-[2px] transition-transform hover:z-10 hover:scale-125",style:{width:zn,height:zn,background:y[P.level]||y[0],"--motion-delay":`${Math.min(420,T*7+ie*5)}ms`},title:`${P.day}: ${Number(P.value||0).toLocaleString()}`},P.day||`${T}-${ie}`):s.jsx("span",{style:{width:zn,height:zn}},`${T}-${ie}`)))})]})]})}),s.jsxs("div",{className:"mt-3 flex items-center justify-center gap-2",children:[s.jsx("span",{className:"text-[10px] text-[#8b8680] dark:text-[#8f8f8f]",children:g("heatmap.less")}),s.jsx("span",{className:"flex gap-0.5",children:y.map((O,T)=>s.jsx("span",{className:"rounded-[1px]",style:{width:10,height:10,background:O},title:`Level ${T}`},O))}),s.jsx("span",{className:"text-[10px] text-[#8b8680] dark:text-[#8f8f8f]",children:g("heatmap.more")})]})]})}const yc={emerald:{rawColor:"#10b981"},ocean:{rawColor:"#3b82f6"},neon:{rawColor:"#a855f7"},amber:{rawColor:"#f59e0b"}};function kc(a){const c=Number(a)||0;return c<1e3?c.toLocaleString():c<1e6?`${(c/1e3).toFixed(c>=1e4?0:1)}K`:c<1e9?`${(c/1e6).toFixed(c>=1e7?0:2)}M`:`${(c/1e9).toFixed(c>=1e10?0:2)}B`}function Ep(a){const c=[];for(const p of a)for(const y of Array.isArray(p)?p:[])y!=null&&y.day&&c.push(y);c.sort((p,y)=>p.day.localeCompare(y.day));let u=0,d=0,f=0,v=0,m={day:"—",value:0};for(const p of c){const y=Number(p.value)||0;u+=y,y>0?(d+=1,v+=1,f=Math.max(f,v)):v=0,y>m.value&&(m={day:p.day,value:y})}const g=c.length?(d/c.length*100).toFixed(1):"0.0";return{totalValue:u,activeDays:d,activeRate:g,maxStreak:f,peakDay:m}}function Tp({prompts:a=[],activity:c=null,weeks:u=20,className:d="",forceLight:f=!1,defaultPalette:v="emerald",roastStyle:m=!1,showViewToggle:g=!1,defaultViewMode:p}){var me;const{theme:y}=Ic(),{t:C}=Xn(),E=f?!1:y==="dark"||y==="system"&&typeof window<"u"&&((me=window.matchMedia)==null?void 0:me.call(window,"(prefers-color-scheme: dark)").matches),w=Array.isArray(c==null?void 0:c.daily_rows)&&c.daily_rows.length>0,G=w?c.metric||"tokens":"prompts",O=w?c.daily_rows:null,T=G==="tokens"?Math.max(u,52):u,P=C(G==="tokens"?"heatmap.tokens":"heatmap.prompts"),ie=M.useMemo(()=>Cs({prompts:a,dailyRows:O,weeks:T}),[a,O,T]),ue=M.useMemo(()=>Ep(ie.weeks||[]),[ie.weeks]),[F,Q]=M.useState(!1),[U,I]=M.useState(!1),he=lo[v]?v:"emerald",[Se,ce]=M.useState(p??(g||m?"2d":"3d")),[Me,Fe]=M.useState(0),[ee,je]=M.useState("in"),te=M.useRef(null),ye=M.useRef(null),Pe=m||g,Ne=Pe?"min-h-[190px]":"min-h-[240px]",H=Pe?"max-h-[320px]":"",oe=yc[he]||yc.emerald,K=E?lo[he].dark:lo[he].light,S=M.useMemo(()=>{const X=-new Date().getTimezoneOffset(),Ce=X>=0?"+":"-",fe=String(Math.floor(Math.abs(X)/60)).padStart(2,"0"),Ee=String(Math.abs(X)%60).padStart(2,"0");return`UTC${Ce}${fe}:${Ee}`},[]),_=()=>I(!0),z=X=>{X!==Se&&(ye.current&&clearTimeout(ye.current),je("out"),ye.current=setTimeout(()=>{ce(X),Fe(Ce=>Ce+1),je("in")},160))};M.useEffect(()=>()=>{ye.current&&clearTimeout(ye.current)},[]),M.useEffect(()=>{if(!F||U)return;const X=Ce=>{Ce.key==="Escape"&&_()};return window.addEventListener("keydown",X),()=>window.removeEventListener("keydown",X)},[F,U]);const W=F&&typeof document<"u"?Wc.createPortal(s.jsx("div",{onAnimationEnd:X=>{X.target===X.currentTarget&&U&&(Q(!1),I(!1))},onClick:X=>{X.target===X.currentTarget&&_()},className:`fixed inset-0 z-50 flex items-center justify-center p-3 md:p-6 backdrop-blur-md bg-black/40 ${U?"animate-tt-fade-out":"animate-tt-fade-in"}`,children:s.jsxs("div",{className:`relative flex h-[88vh] w-full max-w-6xl flex-col overflow-hidden rounded-[22px] border border-black/[0.07] bg-[#fffcf7] shadow-[0_24px_70px_rgba(45,30,18,0.22)] dark:border-white/[0.08] dark:bg-[#171717] md:flex-row ${U?"animate-tt-modal-exit":"animate-tt-modal"}`,children:[s.jsxs("div",{className:"absolute right-4 top-4 z-50 flex items-center gap-1",children:[s.jsx("button",{type:"button",onClick:()=>{var X;return(X=te.current)==null?void 0:X.reset()},className:"inline-flex h-9 w-9 items-center justify-center rounded-full border border-black/[0.07] bg-[#fffcf7] text-[#8b8680] hover:text-[#1a1a1a] dark:border-white/[0.08] dark:bg-[#171717] dark:text-[#8f8f8f] dark:hover:text-white",title:C("heatmap.reset"),children:s.jsx(gp,{size:14})}),s.jsx("button",{type:"button",onClick:_,className:"inline-flex h-9 w-9 items-center justify-center rounded-full border border-black/[0.07] bg-[#fffcf7] text-[#8b8680] hover:text-[#1a1a1a] dark:border-white/[0.08] dark:bg-[#171717] dark:text-[#8f8f8f] dark:hover:text-white",title:C("heatmap.close"),children:s.jsx(Bc,{size:15})})]}),s.jsxs("aside",{className:"flex w-full flex-col gap-6 overflow-y-auto border-b border-black/[0.06] bg-[#f7f4ef] p-5 dark:border-white/[0.07] dark:bg-[#121212] md:w-[320px] md:border-b-0 md:border-r md:p-6",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-1.5 select-none",children:[s.jsx("span",{className:"h-1.5 w-1.5 rounded-full",style:{backgroundColor:oe.rawColor}}),s.jsx("span",{className:"text-[10px] font-bold uppercase tracking-[0.16em] text-[#8b8680] dark:text-[#8f8f8f]",children:C("heatmap.insight")})]}),s.jsx("h4",{className:"mt-2 text-xl font-extrabold leading-none tracking-tight text-[#1a1a1a] dark:text-[#fafafa]",children:C(G==="tokens"?"heatmap.tokenTitle":"heatmap.promptTitle")}),s.jsx("p",{className:"mt-2 text-xs leading-5 text-[#716b65] dark:text-[#aaa49e]",children:C(G==="tokens"?"heatmap.tokenDesc":"heatmap.promptDesc")})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-x-5 gap-y-5 border-y border-black/[0.07] py-5 dark:border-white/[0.08]",children:[s.jsx(kl,{label:C(G==="tokens"?"heatmap.totalTokens":"heatmap.totalPrompts"),value:kc(ue.totalValue),exact:`${ue.totalValue.toLocaleString()} ${P.toLowerCase()}`}),s.jsx(kl,{label:C(G==="tokens"?"heatmap.activeRateDays":"heatmap.activeDays"),value:`${ue.activeRate}%`,suffix:G==="tokens"?`(${ue.activeDays}D)`:void 0,exact:C("heatmap.activeDayCount",{count:ue.activeDays})}),s.jsx(kl,{label:C(G==="tokens"?"heatmap.longestStreak":"heatmap.maxStreak"),value:ue.maxStreak,suffix:C("heatmap.days")}),s.jsx(kl,{label:C("heatmap.peakDay"),value:ue.peakDay.value>0?kc(ue.peakDay.value):C("heatmap.noData"),suffix:ue.peakDay.day,exact:`${ue.peakDay.value.toLocaleString()} ${P.toLowerCase()}`})]}),s.jsx("div",{className:"mt-auto border-t border-black/[0.07] pt-4 dark:border-white/[0.08]",children:s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx("span",{className:"text-[10px] font-bold uppercase tracking-[0.16em] text-[#8b8680] dark:text-[#8f8f8f]",children:C(G==="tokens"?"heatmap.activityLevels":"heatmap.legend")}),s.jsx("div",{className:"flex gap-1",children:K.map((X,Ce)=>s.jsx("div",{className:"flex-1 h-1 rounded-[2px]",style:{backgroundColor:X},title:`Level ${Ce}`},Ce))})]})})]}),s.jsxs("section",{className:"relative flex h-full flex-1 items-center justify-center overflow-hidden p-4",children:[s.jsx("div",{className:"absolute inset-0 pointer-events-none transition-colors duration-500",style:{background:`linear-gradient(135deg, ${oe.rawColor}0f, transparent 42%)`}}),s.jsx(vc,{prompts:a,dailyRows:O,weeks:T,isDark:E,interactive:!0,palette:he,autoRotateInit:!1,onResetViewRef:te,unitLabel:P}),s.jsxs("div",{className:"absolute bottom-4 right-4 flex items-center gap-1.5 text-[9px] font-bold text-oai-gray-400 bg-white/80 dark:bg-oai-gray-900/80 border border-oai-gray-200/50 dark:border-oai-gray-800/80 rounded-md px-2.5 py-1.5 select-none pointer-events-none backdrop-blur-md shadow-sm",children:[s.jsx(cp,{size:10,style:{color:oe.rawColor}}),s.jsx("span",{children:C("heatmap.footerTip")})]})]})]})}),document.body):null;return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:`relative w-full h-full ${Ne} ${H} ${d}`,children:[s.jsxs("div",{className:"mb-4 flex min-h-7 items-center justify-between gap-3",children:[s.jsx("h2",{className:"m-0 text-sm font-semibold uppercase tracking-[0.03em] text-[#393633] dark:text-[#d4d4d4]",children:C("profile.activity")}),s.jsxs("div",{className:"flex items-center gap-2",children:[g&&s.jsx("div",{role:"tablist","aria-label":C("heatmap.viewLabel"),className:"flex items-center rounded-lg border border-black/[0.07] bg-black/[0.02] p-0.5 text-[10px] font-medium text-[#8b8680] dark:border-white/[0.08] dark:bg-white/[0.02] dark:text-[#8f8f8f]",children:["2d","3d"].map(X=>s.jsx("button",{type:"button",role:"tab","aria-selected":Se===X,onClick:()=>z(X),className:`rounded-md px-2 py-0.5 uppercase transition-colors ${Se===X?"bg-white text-[#1a1a1a] shadow-sm dark:bg-[#2a2a2a] dark:text-white":"hover:text-[#1a1a1a] dark:hover:text-white"}`,children:C(X==="2d"?"heatmap.viewGrid":"heatmap.viewTerrain")},X))}),s.jsx("span",{className:"text-xs text-[#8b8680] dark:text-[#8f8f8f]",children:S})]})]}),s.jsx("div",{className:`h-full w-full ${Ne} ${H} ${ee==="out"?"heatmap-view-exit":"heatmap-view-enter"}`,children:Se==="2d"?s.jsx("div",{className:"flex w-full items-center justify-center overflow-hidden",children:s.jsx(Np,{prompts:a,dailyRows:O,weeks:T,dark:E,compact:!1,dense:!1})}):s.jsxs("button",{type:"button",onClick:()=>{I(!1),Q(!0)},className:`group relative w-full h-[170px] overflow-hidden rounded-lg border transition-all cursor-pointer ${m?"border-black/[0.04] bg-[#f7f4ef] hover:border-emerald-500/30 dark:border-white/[0.06] dark:bg-[#121212]":"border-transparent hover:border-oai-gray-700"}`,title:C("heatmap.openTitle"),children:[s.jsx(vc,{prompts:a,dailyRows:O,weeks:T,interactive:!1,autoRotateInit:!1,isDark:E,palette:he,unitLabel:P}),s.jsx("div",{className:`absolute inset-0 pointer-events-none opacity-0 group-hover:opacity-100 transition-opacity flex items-end justify-center pb-2 ${m?"bg-gradient-to-t from-[#f3f1ec]/70 to-transparent":"bg-gradient-to-t from-oai-gray-950/20 to-transparent"}`,children:s.jsxs("span",{className:`text-[10px] shadow px-2.5 py-1 rounded-full font-medium flex items-center gap-1 transform translate-y-2 group-hover:translate-y-0 transition-transform duration-200 ${m?"bg-[#fffcf7]/95 border border-black/5 text-[#6b6560]":"bg-white/95 dark:bg-oai-gray-900/95 border border-oai-gray-200/60 dark:border-oai-gray-800/80 text-oai-gray-500 dark:text-oai-gray-400"}`,children:[s.jsx(pp,{size:9}),C("heatmap.open")]})})]})},`${Se}-${Me}`)]}),W]})}function kl({label:a,value:c,suffix:u,exact:d}){return s.jsxs("div",{className:"flex flex-col gap-1 relative group cursor-default",children:[d&&s.jsx("div",{className:"absolute left-0 bottom-full mb-2 pointer-events-none opacity-0 translate-y-1 group-hover:opacity-100 group-hover:translate-y-0 transition-all duration-200 z-50",children:s.jsx("div",{className:"bg-white dark:bg-zinc-950 text-zinc-900 dark:text-zinc-50 text-[10px] font-semibold font-mono rounded-lg px-2.5 py-1.5 shadow-xl border border-zinc-200 dark:border-zinc-800/80 whitespace-nowrap",children:d})}),s.jsx("span",{className:"text-[10px] font-bold uppercase tracking-[0.12em] text-[#8b8680] dark:text-[#8f8f8f]",children:a}),s.jsxs("div",{className:"flex items-baseline gap-1.5",children:[s.jsx("span",{className:"font-[JetBrains_Mono,ui-monospace,monospace] text-xl font-bold tracking-tight text-[#1a1a1a] transition-transform duration-200 group-hover:-translate-y-[1px] dark:text-[#fafafa]",children:c}),u&&s.jsx("span",{className:"text-[10px] font-bold text-[#8b8680] dark:text-[#8f8f8f]",children:u})]})]})}const Vc={cursor:{label:"Cursor",glyph:"cursor",color:"#ffffff",background:"#171717"},codex:{label:"Codex",glyph:"codex",color:"#ffffff",background:"#111827"},claude:{label:"Claude Code",glyph:"claude",color:"#fff8f0",background:"#d97757"},gemini:{label:"Gemini CLI",glyph:"gemini",color:"#ffffff",background:"#4285f4"},copilot:{label:"GitHub Copilot",glyph:"copilot",color:"#ffffff",background:"#24292f"},antigravity:{label:"Antigravity",glyph:"antigravity",color:"#ffffff",background:"#1769ff"},cline:{label:"Cline",mark:"C",color:"#ffffff",background:"#2563eb"},roo:{label:"Roo Code",mark:"R",color:"#ffffff",background:"#ea580c"},continue:{label:"Continue",mark:"▶",color:"#ffffff",background:"#7c3aed"},aider:{label:"Aider",mark:"A",color:"#ffffff",background:"#15803d"},windsurf:{label:"Windsurf",mark:"≋",color:"#062a2e",background:"#5eead4"},amazonq:{label:"Amazon Q",mark:"Q",color:"#ffffff",background:"#ff9900"},opencode:{label:"OpenCode",glyph:"code",color:"#ffffff",background:"#334155"}};function js(a){const c=String(a||"").trim().toLowerCase().replace(/[\s_]+/g,"-");return{"claude-code":"claude","github-copilot":"copilot","amazon-q":"amazonq","gemini-cli":"gemini","roo-code":"roo"}[c]||c}function Nl(a){var u;const c=js(a);return((u=Vc[c])==null?void 0:u.label)||String(a||"Agent")}function _p({glyph:a,mark:c}){if(!a)return c;const u={width:"72%",height:"72%",viewBox:"0 0 24 24",fill:"none","aria-hidden":!0};return a==="cursor"?s.jsx("svg",{...u,children:s.jsx("path",{d:"M5.5 3.5 19 12l-6.1 1.35 3.25 5.7-2.6 1.45-3.2-5.7L6 19Z",fill:"currentColor"})}):a==="codex"?s.jsxs("svg",{...u,children:[s.jsx("path",{d:"M12 3.2 16 5.5l4 6.5-4 6.5-4 2.3-4-2.3L4 12l4-6.5Z",stroke:"currentColor",strokeWidth:"1.75"}),s.jsx("circle",{cx:"12",cy:"12",r:"3.25",stroke:"currentColor",strokeWidth:"1.75"})]}):a==="claude"?s.jsx("svg",{...u,children:s.jsx("path",{d:"M12 3v18M3 12h18M5.6 5.6l12.8 12.8M18.4 5.6 5.6 18.4M7.2 3.9l9.6 16.2M20.1 7.2 3.9 16.8",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})}):a==="gemini"?s.jsx("svg",{...u,children:s.jsx("path",{d:"M12 2.8c.5 5.55 3.65 8.7 9.2 9.2-5.55.5-8.7 3.65-9.2 9.2-.5-5.55-3.65-8.7-9.2-9.2 5.55-.5 8.7-3.65 9.2-9.2Z",fill:"currentColor"})}):a==="copilot"?s.jsxs("svg",{...u,children:[s.jsx("path",{d:"M5 10.5 7.2 6h9.6l2.2 4.5v6L16 19H8l-3-2.5Z",stroke:"currentColor",strokeWidth:"1.6",strokeLinejoin:"round"}),s.jsx("circle",{cx:"9",cy:"12",r:"1.25",fill:"currentColor"}),s.jsx("circle",{cx:"15",cy:"12",r:"1.25",fill:"currentColor"})]}):a==="antigravity"?s.jsxs("svg",{...u,children:[s.jsx("path",{d:"M5 17 17 5M9 5h8v8",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M5 8v9h9",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",opacity:".7"})]}):a==="code"?s.jsx("svg",{...u,children:s.jsx("path",{d:"m9 5-4 7 4 7M15 5l4 7-4 7",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}):c}function bs({agent:a,size:c=22,className:u=""}){const d=js(a),f=Vc[d]||{label:Nl(a),mark:String(d||"?").slice(0,1).toUpperCase(),color:"#ffffff",background:"#6b7280"};return s.jsx("span",{className:`inline-flex shrink-0 items-center justify-center rounded-[28%] font-black leading-none shadow-[inset_0_0_0_1px_rgba(255,255,255,0.18)] ${u}`,style:{width:c,height:c,color:f.color,background:f.background,fontSize:Math.max(9,Math.round(c*.48))},role:"img","aria-label":f.label,title:f.label,children:s.jsx(_p,{glyph:f.glyph,mark:f.mark})})}function Mp({open:a,previewUrl:c,accent:u,busy:d,nativeShareSupported:f,notice:v,onClose:m,onDownload:g,onNativeShare:p,onCopyCaption:y,t:C}){return M.useEffect(()=>{if(!a)return;const E=G=>{G.key==="Escape"&&m()};window.addEventListener("keydown",E);const w=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{window.removeEventListener("keydown",E),document.body.style.overflow=w}},[a,m]),!a||typeof document>"u"?null:Wc.createPortal(s.jsx("div",{className:"fixed inset-0 z-[80] flex items-end justify-center bg-black/50 backdrop-blur-[3px] sm:items-center sm:p-5",onClick:E=>{E.target===E.currentTarget&&m()},role:"presentation",children:s.jsxs("div",{role:"dialog","aria-modal":"true","aria-label":C("profile.posterTitle"),className:"flex max-h-[96vh] w-full max-w-[820px] flex-col overflow-hidden rounded-t-[26px] bg-[#fffcf7] text-[#1a1a1a] shadow-[0_-16px_50px_rgba(20,14,8,0.2)] dark:bg-[#171717] dark:text-[#fafafa] sm:max-h-[92vh] sm:rounded-[26px] sm:shadow-[0_30px_80px_rgba(20,14,8,0.28)]",children:[s.jsxs("div",{className:"flex items-center justify-between border-b border-black/[0.06] px-5 py-3.5 dark:border-white/[0.08]",children:[s.jsx("div",{className:"text-[10px] font-extrabold uppercase tracking-[0.18em]",style:{color:u},children:C("profile.posterKicker")}),s.jsx("button",{type:"button",onClick:m,className:"motion-button inline-flex h-10 w-10 items-center justify-center rounded-xl text-[#6b6560] hover:bg-black/[0.05] hover:text-[#1a1a1a] dark:text-[#a3a3a3] dark:hover:bg-white/[0.06] dark:hover:text-white","aria-label":C("profile.posterClose"),children:s.jsx(Bc,{size:18})})]}),s.jsxs("div",{className:"grid min-h-0 flex-1 overflow-auto md:grid-cols-[minmax(280px,0.9fr)_minmax(320px,1.1fr)]",children:[s.jsx("div",{className:"flex items-center justify-center bg-[#ece8df] px-5 py-5 dark:bg-[#101010] sm:px-8 sm:py-7",children:s.jsx("div",{className:"aspect-[3/4] w-full max-w-[250px] overflow-hidden rounded-[16px] border border-black/[0.08] bg-[#f3f1ec] shadow-[0_20px_45px_rgba(40,28,12,0.18)] dark:border-white/[0.1] dark:bg-[#202020] sm:max-w-[320px]",children:c?s.jsx("img",{src:c,alt:C("profile.posterTitle"),className:"h-full w-full object-cover"}):s.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-3 text-sm font-semibold text-[#8b8680]",children:[s.jsx("span",{className:"h-8 w-8 animate-spin rounded-full border-2 border-current border-t-transparent"}),d?C("profile.posterBusy"):"…"]})})}),s.jsxs("div",{className:"flex min-h-0 flex-col px-5 py-6 sm:px-8 sm:py-8",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"m-0 max-w-sm text-[30px] font-extrabold leading-[1.02] tracking-tight sm:text-[36px]",children:C("profile.posterTitle")}),s.jsx("p",{className:"mb-0 mt-3 max-w-sm text-[13px] leading-relaxed text-[#6b6560] dark:text-[#b0b0b0]",children:C("profile.posterHint")}),s.jsx("div",{className:"mt-4 inline-flex items-center rounded-full border border-black/[0.07] px-3 py-1.5 text-[10px] font-bold uppercase tracking-[0.12em] text-[#8b8680] dark:border-white/[0.09]",children:C("profile.posterFormat")})]}),s.jsxs("button",{type:"button",onClick:f?p:g,disabled:!c||d,className:"motion-button mt-7 inline-flex min-h-[54px] w-full items-center justify-center gap-2 rounded-2xl px-4 text-sm font-extrabold text-white shadow-[0_12px_26px_rgba(0,0,0,0.12)] disabled:opacity-50",style:{background:u},children:[f?s.jsx(xp,{size:18}):s.jsx(mc,{size:18}),C(f?"profile.posterNativeShare":"profile.posterDownload")]}),s.jsxs("div",{className:"mt-3 grid grid-cols-2 gap-2",children:[s.jsxs("button",{type:"button",onClick:y,disabled:!c||d,className:"motion-button inline-flex h-12 items-center justify-center gap-2 rounded-xl border border-black/[0.08] bg-white text-[13px] font-bold text-[#1a1a1a] disabled:opacity-50 dark:border-white/[0.08] dark:bg-[#242424] dark:text-white",children:[s.jsx(up,{size:16}),C("profile.posterCopyCaption")]}),s.jsxs("button",{type:"button",onClick:g,disabled:!c||d,className:"motion-button inline-flex h-12 items-center justify-center gap-2 rounded-xl border border-black/[0.08] bg-white text-[13px] font-bold text-[#1a1a1a] disabled:opacity-50 dark:border-white/[0.08] dark:bg-[#242424] dark:text-white",children:[s.jsx(mc,{size:16}),C("profile.posterDownload")]})]}),v&&s.jsxs("div",{className:"mt-4 flex items-start gap-2 rounded-xl bg-black/[0.035] px-3 py-2.5 text-[11px] font-semibold leading-relaxed text-[#6b6560] dark:bg-white/[0.05] dark:text-[#b0b0b0]",children:[s.jsx(Uc,{size:15,className:"mt-0.5 shrink-0",style:{color:u}}),s.jsx("span",{children:v})]}),s.jsx("p",{className:"mb-0 mt-auto pt-8 text-[10px] font-medium leading-relaxed text-[#8b8680] dark:text-[#8f8f8f]",children:C("profile.posterFootnote")})]})]})]})}),document.body)}var jl={exports:{}};/*!
161
+ * wordcloud2.js
162
+ * http://timdream.org/wordcloud2.js/
163
+ *
164
+ * Copyright 2011 - 2019 Tim Guan-tin Chien and contributors.
165
+ * Released under the MIT license
166
+ */var Pp=jl.exports,wc;function zp(){return wc||(wc=1,(function(a){window.setImmediate||(window.setImmediate=(function(){return window.msSetImmediate||window.webkitSetImmediate||window.mozSetImmediate||window.oSetImmediate||(function(){if(!window.postMessage||!window.addEventListener)return null;var d=[void 0],f="zero-timeout-message",v=function(g){var p=d.length;return d.push(g),window.postMessage(f+p.toString(36),"*"),p};return window.addEventListener("message",function(g){if(!(typeof g.data!="string"||g.data.substr(0,f.length)!==f)){g.stopImmediatePropagation();var p=parseInt(g.data.substr(f.length),36);d[p]&&(d[p](),d[p]=void 0)}},!0),window.clearImmediate=function(g){d[g]&&(d[g]=void 0)},v})()||function(d){window.setTimeout(d,0)}})()),window.clearImmediate||(window.clearImmediate=(function(){return window.msClearImmediate||window.webkitClearImmediate||window.mozClearImmediate||window.oClearImmediate||function(d){window.clearTimeout(d)}})()),(function(c){var u=(function(){var y=document.createElement("canvas");if(!y||!y.getContext)return!1;var C=y.getContext("2d");return!(!C||!C.getImageData||!C.fillText||!Array.prototype.some||!Array.prototype.push)})(),d=(function(){if(u){for(var y=document.createElement("canvas").getContext("2d"),C=20,E,w;C;){if(y.font=C.toString(10)+"px sans-serif",y.measureText("W").width===E&&y.measureText("m").width===w)return C+1;E=y.measureText("W").width,w=y.measureText("m").width,C--}return 0}})(),f=function(p){if(Array.isArray(p)){var y=p.slice();return y.splice(0,2),y}else return[]},v=function(y){for(var C,E,w=y.length;w;)C=Math.floor(Math.random()*w),E=y[--w],y[w]=y[C],y[C]=E;return y},m={},g=function(y,C){if(!u)return;var E=Math.floor(Math.random()*Date.now());Array.isArray(y)||(y=[y]),y.forEach(function(_e,A){if(typeof _e=="string"){if(y[A]=document.getElementById(_e),!y[A])throw new Error("The element id specified is not found.")}else if(!_e.tagName&&!_e.appendChild)throw new Error("You must pass valid HTML elements, or ID of the element.")});var w={list:[],fontFamily:'"Trebuchet MS", "Heiti TC", "微軟正黑體", "Arial Unicode MS", "Droid Fallback Sans", sans-serif',fontWeight:"normal",color:"random-dark",minSize:0,weightFactor:1,clearCanvas:!0,backgroundColor:"#fff",gridSize:8,drawOutOfBound:!1,shrinkToFit:!1,origin:null,drawMask:!1,maskColor:"rgba(255,0,0,0.3)",maskGapWidth:.3,wait:0,abortThreshold:0,abort:function(){},minRotation:-Math.PI/2,maxRotation:Math.PI/2,rotationSteps:0,shuffle:!0,rotateRatio:.1,shape:"circle",ellipticity:.65,classes:null,hover:null,click:null};if(C)for(var G in C)G in w&&(w[G]=C[G]);if(typeof w.weightFactor!="function"){var O=w.weightFactor;w.weightFactor=function(A){return A*O}}if(typeof w.shape!="function")switch(w.shape){case"circle":default:w.shape="circle";break;case"cardioid":w.shape=function(A){return 1-Math.sin(A)};break;case"diamond":w.shape=function(A){var Z=A%(2*Math.PI/4);return 1/(Math.cos(Z)+Math.sin(Z))};break;case"square":w.shape=function(A){return Math.min(1/Math.abs(Math.cos(A)),1/Math.abs(Math.sin(A)))};break;case"triangle-forward":w.shape=function(A){var Z=A%(2*Math.PI/3);return 1/(Math.cos(Z)+Math.sqrt(3)*Math.sin(Z))};break;case"triangle":case"triangle-upright":w.shape=function(A){var Z=(A+Math.PI*3/2)%(2*Math.PI/3);return 1/(Math.cos(Z)+Math.sqrt(3)*Math.sin(Z))};break;case"pentagon":w.shape=function(A){var Z=(A+.955)%(2*Math.PI/5);return 1/(Math.cos(Z)+.726543*Math.sin(Z))};break;case"star":w.shape=function(A){var Z=(A+.955)%(2*Math.PI/10);return(A+.955)%(2*Math.PI/5)-2*Math.PI/10>=0?1/(Math.cos(2*Math.PI/10-Z)+3.07768*Math.sin(2*Math.PI/10-Z)):1/(Math.cos(Z)+3.07768*Math.sin(Z))};break}w.gridSize=Math.max(Math.floor(w.gridSize),4);var T=w.gridSize,P=T-w.maskGapWidth,ie=Math.abs(w.maxRotation-w.minRotation),ue=Math.abs(Math.floor(w.rotationSteps)),F=Math.min(w.maxRotation,w.minRotation),Q,U,I,he,Se,ce,Me;function Fe(_e,A){return"hsl("+(Math.random()*360).toFixed()+","+(Math.random()*30+70).toFixed()+"%,"+(Math.random()*(A-_e)+_e).toFixed()+"%)"}switch(w.color){case"random-dark":Me=function(){return Fe(10,50)};break;case"random-light":Me=function(){return Fe(50,90)};break;default:typeof w.color=="function"&&(Me=w.color);break}var ee;typeof w.fontWeight=="function"&&(ee=w.fontWeight);var je=null;typeof w.classes=="function"&&(je=w.classes);var te=!1,ye=[],Pe,Ne=function(A){var Z=A.currentTarget,J=Z.getBoundingClientRect(),ke,pe;A.touches?(ke=A.touches[0].clientX,pe=A.touches[0].clientY):(ke=A.clientX,pe=A.clientY);var Te=ke-J.left,Ae=Te<0?0:Te,Le=pe-J.top,be=Math.floor(Ae*(Z.width/J.width||1)/T),Ye=Math.floor(Le*(Z.height/J.height||1)/T);return ye[be]?ye[be][Ye]:null},H=function(A){var Z=Ne(A);if(Pe!==Z){if(Pe=Z,!Z){w.hover(void 0,void 0,A);return}w.hover(Z.item,Z.dimension,A)}},oe=function(A){var Z=Ne(A);Z&&(w.click(Z.item,Z.dimension,A),A.preventDefault())},K=[],S=function(A){if(K[A])return K[A];var Z=A*8,J=Z,ke=[];for(A===0&&ke.push([he[0],he[1],0]);J--;){var pe=1;w.shape!=="circle"&&(pe=w.shape(J/Z*2*Math.PI)),ke.push([he[0]+A*pe*Math.cos(-J/Z*2*Math.PI),he[1]+A*pe*Math.sin(-J/Z*2*Math.PI)*w.ellipticity,J/Z*2*Math.PI])}return K[A]=ke,ke},_=function(){return w.abortThreshold>0&&new Date().getTime()-ce>w.abortThreshold},z=function(){return w.rotateRatio===0||Math.random()>w.rotateRatio?0:ie===0?F:ue>0?F+Math.floor(Math.random()*ue)*ie/(ue-1):F+Math.random()*ie},W=function(A,Z,J,ke){var pe=w.weightFactor(Z);if(pe<=w.minSize)return!1;var Te=1;pe<d&&(Te=(function(){for(var Rt=2;Rt*pe<d;)Rt+=2;return Rt})());var Ae;ee?Ae=ee(A,Z,pe,ke):Ae=w.fontWeight;var Le=document.createElement("canvas"),be=Le.getContext("2d",{willReadFrequently:!0});be.font=Ae+" "+(pe*Te).toString(10)+"px "+w.fontFamily;var Ye=be.measureText(A).width/Te,Re=Math.max(pe*Te,be.measureText("m").width,be.measureText("W").width)/Te,Ue=Ye+Re*2,D=Re*3,V=Math.ceil(Ue/T),ae=Math.ceil(D/T);Ue=V*T,D=ae*T;var Y=-Ye/2,de=-Re*.4,ve=Math.ceil((Ue*Math.abs(Math.sin(J))+D*Math.abs(Math.cos(J)))/T),De=Math.ceil((Ue*Math.abs(Math.cos(J))+D*Math.abs(Math.sin(J)))/T),Ke=De*T,He=ve*T;Le.setAttribute("width",Ke),Le.setAttribute("height",He),be.scale(1/Te,1/Te),be.translate(Ke*Te/2,He*Te/2),be.rotate(-J),be.font=Ae+" "+(pe*Te).toString(10)+"px "+w.fontFamily,be.fillStyle="#000",be.textBaseline="middle",be.fillText(A,Y*Te,(de+pe*.5)*Te);var qe=be.getImageData(0,0,Ke,He).data;if(_())return!1;for(var We=[],pt=De,rt,At,Lt,yt=[ve/2,De/2,ve/2,De/2];pt--;)for(rt=ve;rt--;){Lt=T;e:for(;Lt--;)for(At=T;At--;)if(qe[((rt*T+Lt)*Ke+(pt*T+At))*4+3]){We.push([pt,rt]),pt<yt[3]&&(yt[3]=pt),pt>yt[1]&&(yt[1]=pt),rt<yt[0]&&(yt[0]=rt),rt>yt[2]&&(yt[2]=rt);break e}}return{mu:Te,occupied:We,bounds:yt,gw:De,gh:ve,fillTextOffsetX:Y,fillTextOffsetY:de,fillTextWidth:Ye,fillTextHeight:Re,fontSize:pe}},me=function(A,Z,J,ke,pe){for(var Te=pe.length;Te--;){var Ae=A+pe[Te][0],Le=Z+pe[Te][1];if(Ae>=U||Le>=I||Ae<0||Le<0){if(!w.drawOutOfBound)return!1;continue}if(!Q[Ae][Le])return!1}return!0},X=function(A,Z,J,ke,pe,Te,Ae,Le,be,Ye){var Re=J.fontSize,Ue;Me?Ue=Me(ke,pe,Re,Te,Ae,Ye):Ue=w.color;var D;ee?D=ee(ke,pe,Re,Ye):D=w.fontWeight;var V;je?V=je(ke,pe,Re,Ye):V=w.classes,y.forEach(function(ae){if(ae.getContext){var Y=ae.getContext("2d"),de=J.mu;Y.save(),Y.scale(1/de,1/de),Y.font=D+" "+(Re*de).toString(10)+"px "+w.fontFamily,Y.fillStyle=Ue,Y.translate((A+J.gw/2)*T*de,(Z+J.gh/2)*T*de),Le!==0&&Y.rotate(-Le),Y.textBaseline="middle",Y.fillText(ke,J.fillTextOffsetX*de,(J.fillTextOffsetY+Re*.5)*de),Y.restore()}else{var ve=document.createElement("span"),De="";De="rotate("+-Le/Math.PI*180+"deg) ",J.mu!==1&&(De+="translateX(-"+J.fillTextWidth/4+"px) scale("+1/J.mu+")");var Ke={position:"absolute",display:"block",font:D+" "+Re*J.mu+"px "+w.fontFamily,left:(A+J.gw/2)*T+J.fillTextOffsetX+"px",top:(Z+J.gh/2)*T+J.fillTextOffsetY+"px",width:J.fillTextWidth+"px",height:J.fillTextHeight+"px",lineHeight:Re+"px",whiteSpace:"nowrap",transform:De,webkitTransform:De,msTransform:De,transformOrigin:"50% 40%",webkitTransformOrigin:"50% 40%",msTransformOrigin:"50% 40%"};Ue&&(Ke.color=Ue),ve.textContent=ke;for(var He in Ke)ve.style[He]=Ke[He];if(be)for(var qe in be)ve.setAttribute(qe,be[qe]);V&&(ve.className+=V),ae.appendChild(ve)}})},Ce=function(A,Z,J,ke,pe){if(!(A>=U||Z>=I||A<0||Z<0)){if(Q[A][Z]=!1,J){var Te=y[0].getContext("2d");Te.fillRect(A*T,Z*T,P,P)}te&&(ye[A][Z]={item:pe,dimension:ke})}},fe=function(A,Z,J,ke,pe,Te){var Ae=pe.occupied,Le=w.drawMask,be;Le&&(be=y[0].getContext("2d"),be.save(),be.fillStyle=w.maskColor);var Ye;if(te){var Re=pe.bounds;Ye={x:(A+Re[3])*T,y:(Z+Re[0])*T,w:(Re[1]-Re[3]+1)*T,h:(Re[2]-Re[0]+1)*T}}for(var Ue=Ae.length;Ue--;){var D=A+Ae[Ue][0],V=Z+Ae[Ue][1];D>=U||V>=I||D<0||V<0||Ce(D,V,Le,Ye,Te)}Le&&be.restore()},Ee=function _e(A){var Z,J,ke;Array.isArray(A)?(Z=A[0],J=A[1]):(Z=A.word,J=A.weight,ke=A.attributes);var pe=z(),Te=f(A),Ae=W(Z,J,pe,Te);if(!Ae||_())return!1;if(!w.drawOutOfBound&&!w.shrinkToFit){var Le=Ae.bounds;if(Le[1]-Le[3]+1>U||Le[2]-Le[0]+1>I)return!1}for(var be=Se+1,Ye=function(D){var V=Math.floor(D[0]-Ae.gw/2),ae=Math.floor(D[1]-Ae.gh/2),Y=Ae.gw,de=Ae.gh;return me(V,ae,Y,de,Ae.occupied)?(X(V,ae,Ae,Z,J,Se-be,D[2],pe,ke,Te),fe(V,ae,Y,de,Ae,A),!0):!1};be--;){var Re=S(Se-be);w.shuffle&&(Re=[].concat(Re),v(Re));var Ue=Re.some(Ye);if(Ue)return!0}return w.shrinkToFit?(Array.isArray(A)?A[1]=A[1]*3/4:A.weight=A.weight*3/4,_e(A)):!1},nt=function(A,Z,J){if(Z)return!y.some(function(ke){var pe=new CustomEvent(A,{detail:J||{}});return!ke.dispatchEvent(pe)},this);y.forEach(function(ke){var pe=new CustomEvent(A,{detail:J||{}});ke.dispatchEvent(pe)},this)},nn=function(){var A=y[0];if(A.getContext)U=Math.ceil(A.width/T),I=Math.ceil(A.height/T);else{var Z=A.getBoundingClientRect();U=Math.ceil(Z.width/T),I=Math.ceil(Z.height/T)}if(nt("wordcloudstart",!0)){he=w.origin?[w.origin[0]/T,w.origin[1]/T]:[U/2,I/2],Se=Math.floor(Math.sqrt(U*U+I*I)),Q=[];var J,ke,pe;if(!A.getContext||w.clearCanvas)for(y.forEach(function(Y){if(Y.getContext){var de=Y.getContext("2d");de.fillStyle=w.backgroundColor,de.clearRect(0,0,U*(T+1),I*(T+1)),de.fillRect(0,0,U*(T+1),I*(T+1))}else Y.textContent="",Y.style.backgroundColor=w.backgroundColor,Y.style.position="relative"}),J=U;J--;)for(Q[J]=[],ke=I;ke--;)Q[J][ke]=!0;else{var Te=document.createElement("canvas").getContext("2d");Te.fillStyle=w.backgroundColor,Te.fillRect(0,0,1,1);var Ae=Te.getImageData(0,0,1,1).data,Le=A.getContext("2d").getImageData(0,0,U*T,I*T).data;J=U;for(var be,Ye;J--;)for(Q[J]=[],ke=I;ke--;){Ye=T;e:for(;Ye--;)for(be=T;be--;)for(pe=4;pe--;)if(Le[((ke*T+Ye)*U*T+(J*T+be))*4+pe]!==Ae[pe]){Q[J][ke]=!1;break e}Q[J][ke]!==!1&&(Q[J][ke]=!0)}Le=Te=Ae=void 0}if(w.hover||w.click){for(te=!0,J=U+1;J--;)ye[J]=[];w.hover&&A.addEventListener("mousemove",H),w.click&&(A.addEventListener("click",oe),A.style.webkitTapHighlightColor="rgba(0, 0, 0, 0)"),A.addEventListener("wordcloudstart",function Y(){A.removeEventListener("wordcloudstart",Y),A.removeEventListener("mousemove",H),A.removeEventListener("click",oe),Pe=void 0})}pe=0;var Re,Ue;w.wait!==0?(Re=window.setTimeout,Ue=window.clearTimeout):(Re=window.setImmediate,Ue=window.clearImmediate);var D=function(de,ve){y.forEach(function(De){De.addEventListener(de,ve)},this)},V=function(de,ve){y.forEach(function(De){De.removeEventListener(de,ve)},this)},ae=function Y(){V("wordcloudstart",Y),Ue(m[E])};D("wordcloudstart",ae),m[E]=Re(function Y(){if(pe>=w.list.length){Ue(m[E]),nt("wordcloudstop",!1),V("wordcloudstart",ae),delete m[E];return}ce=new Date().getTime();var de=Ee(w.list[pe]),ve=!nt("wordclouddrawn",!0,{item:w.list[pe],drawn:de});if(_()||ve){Ue(m[E]),w.abort(),nt("wordcloudabort",!1),nt("wordcloudstop",!1),V("wordcloudstart",ae),delete m[E];return}pe++,m[E]=Re(Y,w.wait)},w.wait)}};nn()};g.isSupported=u,g.minFontSize=d,g.stop=function(){if(m)for(var y in m)window.clearImmediate(m[y])},a.exports?a.exports=g:c.WordCloud=g})(Pp)})(jl)),jl.exports}var Ap=zp();const wl=ws(Ap),Lp=["#c45c26","#d97706","#b45309","#8b5a2b","#6b6560","#5b8cff","#23d6a5","#e07a3a","#f0c14a","#ff5a1f"];function Rp(a,c){let u=0;for(const d of String(a||""))u=(u<<5)-u+d.codePointAt(0)|0;return c[Math.abs(u)%c.length]}function Op({words:a,width:c=600,height:u=400,className:d="",gridSize:f=null,weightDivisor:v=5.5,rotateRatio:m=.18,minRotation:g=-.35,maxRotation:p=.35,shape:y="circle",ellipticity:C=.72,minSize:E=9,colors:w=null,fontFamily:G="Outfit, system-ui, sans-serif",fillContainer:O=!0}){const T=M.useRef(null),P=M.useRef(null),[ie,ue]=M.useState({width:c,height:u});return M.useEffect(()=>{if(!O){ue({width:c,height:u});return}const F=T.current;if(!F)return;const Q=()=>{const I=F.getBoundingClientRect(),he=Math.max(180,Math.floor(I.width)||c),Se=Math.max(120,Math.floor(I.height)||u);ue(ce=>ce.width===he&&ce.height===Se?ce:{width:he,height:Se})};Q();const U=typeof ResizeObserver<"u"?new ResizeObserver(Q):null;return U==null||U.observe(F),window.addEventListener("resize",Q),()=>{U==null||U.disconnect(),window.removeEventListener("resize",Q)}},[c,u,O]),M.useEffect(()=>{const F=P.current,Q=(wl==null?void 0:wl.default)||wl||window.WordCloud;if(!F||!(a!=null&&a.length)||typeof Q!="function")return;const{width:U,height:I}=ie;if(U<2||I<2)return;const he=a.map(({term:te,weight:ye,count:Pe})=>[String(te||"").trim(),Math.max(1,Number(ye??Pe)||1)]).filter(([te])=>te.length>0);if(!he.length)return;const Se=Math.max(...he.map(([,te])=>te),1),ce=Math.min(window.devicePixelRatio||1,2.5);F.width=Math.floor(U*ce),F.height=Math.floor(I*ce),F.style.width=`${U}px`,F.style.height=`${I}px`;const Me=w!=null&&w.length?w:Lp,Fe=f??Math.max(5,Math.round(Math.min(U,I)/48)),ee=Math.min(U,I),je=te=>{const ye=te/Se;return(10+Math.pow(ye,.62)*(ee/v))*ce};return Q(F,{list:he,gridSize:Math.max(3,Math.round(Fe*ce)),weightFactor:je,fontFamily:G,fontWeight:"700",color:te=>Rp(te,Me),rotateRatio:m,minRotation:g,maxRotation:p,rotationSteps:2,backgroundColor:"transparent",shuffle:!1,shape:y,ellipticity:C,minSize:Math.max(1,E*ce),drawOutOfBound:!1,shrinkToFit:!1,clearCanvas:!0}),()=>{typeof Q.stop=="function"&&Q.stop()}},[a,ie,f,v,m,g,p,y,C,E,w,G]),!a||a.length===0?s.jsx("p",{className:"text-body-sm text-oai-gray-500",children:"No terms to display"}):s.jsxs("div",{ref:T,className:`relative flex h-full w-full min-h-[120px] items-center justify-center overflow-hidden ${d}`,children:[s.jsx("canvas",{ref:P,className:"block max-w-full","aria-hidden":"true"}),s.jsx("ul",{className:"sr-only",children:a.map(({term:F,prompt_count:Q,count:U})=>s.jsxs("li",{children:[F,": ",Q??U]},F))})]})}function zt(a){const c=Number(a||0);return Number.isFinite(c)&&c>0?c:0}function Gc(a){return zt((a==null?void 0:a.billable_total_tokens)??(a==null?void 0:a.total_tokens)??(a==null?void 0:a.value))}function Ip(a=[],c="total",u={}){const d=(a||[]).filter(p=>/^\d{4}-\d{2}-\d{2}$/.test(String((p==null?void 0:p.day)||""))).slice().sort((p,y)=>p.day.localeCompare(y.day));if(d.length===0||c==="total")return d;if(c==="custom")return d.filter(p=>(!u.from||p.day>=u.from)&&(!u.to||p.day<=u.to));const f=d[d.length-1].day;if(c==="day")return d.filter(p=>p.day===f);if(c==="month")return d.filter(p=>p.day.slice(0,7)===f.slice(0,7));const v=new Date(`${f}T00:00:00Z`),m=new Date(v);m.setUTCDate(m.getUTCDate()-6);const g=m.toISOString().slice(0,10);return d.filter(p=>p.day>=g&&p.day<=f)}function gs(a=[]){const c=new Map,u=new Map,d=new Set;let f=0;for(const m of a||[]){f+=Gc(m);for(const[g,p]of Object.entries((m==null?void 0:m.sources)||{})){const y=zt(p);y>0&&c.set(g,(c.get(g)||0)+y)}for(const g of Object.keys((m==null?void 0:m.models)||{})){d.add(g);const[p="unknown"]=String(g).split("/");u.has(p)||u.set(p,new Set),u.get(p).add(g)}}const v=[...c.entries()].map(([m,g])=>{var p;return{source:m,tokens:g,percent:f>0?g/f*100:0,modelCount:((p=u.get(m))==null?void 0:p.size)||0}}).sort((m,g)=>g.tokens-m.tokens);return{totalTokens:f,modelCount:d.size,sources:v}}function Dp(a=[]){const c=(a||[]).slice().sort((g,p)=>String(g.day).localeCompare(String(p.day)));if(c.length===0)return[];const u=new Date(`${c[0].day}T00:00:00Z`),d=new Date(`${c[c.length-1].day}T00:00:00Z`),v=Math.round((d-u)/864e5)+1>45,m=new Map;for(const g of c){const p=v?g.day.slice(0,7):g.day,y=m.get(p)||{key:p,total:0,sources:{}};y.total+=Gc(g);for(const[C,E]of Object.entries((g==null?void 0:g.sources)||{}))y.sources[C]=(y.sources[C]||0)+zt(E);m.set(p,y)}return[...m.values()]}function $p(a=[],c="all"){return c==="all"?a:a.map(u=>{var v,m;const d=zt((v=u==null?void 0:u.sources)==null?void 0:v[c]),f=Object.fromEntries(Object.entries((u==null?void 0:u.models)||{}).filter(([g])=>String(g).split("/")[0]===c));return{...u,value:d,total_tokens:d,billable_total_tokens:d,sources:d>0?{[c]:d}:{},models:f,context_breakdown:(m=u==null?void 0:u.context_breakdown)!=null&&m[c]?{[c]:u.context_breakdown[c]}:{}}})}function Fp(a=[],{estimatedCostUsd:c=0}={}){const u=new Map;let d=0;for(const v of a||[])for(const[m,g]of Object.entries((v==null?void 0:v.models)||{})){const p=zt(g);if(p===0)continue;const[y="unknown",...C]=String(m).split("/"),E=C.join("/")||y,w=E.toLowerCase(),G=u.get(w)||{model:E,tokens:0,sources:{}};G.tokens+=p,G.sources[y]=(G.sources[y]||0)+p,u.set(w,G),d+=p}const f=zt(c);return{totalTokens:d,models:[...u.values()].map(v=>{var p;const m=((p=Object.entries(v.sources).sort((y,C)=>C[1]-y[1])[0])==null?void 0:p[0])||"unknown",g=d>0?v.tokens/d*100:0;return{...v,dominantSource:m,percent:g,estimatedCostUsd:f>0?f*(v.tokens/d):0}}).sort((v,m)=>m.tokens-v.tokens||v.model.localeCompare(m.model))}}function Up(a=[]){var u,d;const c=new Map;for(const f of a||[])for(const[v,m]of Object.entries((f==null?void 0:f.context_breakdown)||{})){const g=c.get(v)||{source:v,categories:{messages:0,tool_calls:0,reasoning:0,system_prompt:0,custom_agents:0},rawTotalTokens:0,referenceTokens:0,inputTokens:0,cachedInputTokens:0,toolCallCount:0,eventCount:0,methods:new Set};for(const p of Object.keys(g.categories))g.categories[p]+=zt((u=m==null?void 0:m.categories)==null?void 0:u[p]);g.rawTotalTokens+=zt(m==null?void 0:m.total_tokens),g.referenceTokens+=zt((d=f==null?void 0:f.sources)==null?void 0:d[v]),g.inputTokens+=zt(m==null?void 0:m.input_tokens),g.cachedInputTokens+=zt(m==null?void 0:m.cached_input_tokens),g.toolCallCount+=zt(m==null?void 0:m.tool_call_count),g.eventCount+=zt(m==null?void 0:m.event_count),m!=null&&m.method&&g.methods.add(m.method),c.set(v,g)}return[...c.values()].filter(f=>f.rawTotalTokens>0&&f.referenceTokens>0).map(f=>{const v=f.rawTotalTokens>0?f.referenceTokens/f.rawTotalTokens:1,m=Object.entries(f.categories).map(([g,p])=>({key:g,tokens:p*v,percent:f.referenceTokens>0?p*v/f.referenceTokens*100:0})).filter(g=>g.tokens>0).sort((g,p)=>p.tokens-g.tokens);return{...f,methods:[...f.methods],totalTokens:f.referenceTokens,cacheHitRate:f.inputTokens>0?f.cachedInputTokens/f.inputTokens*100:0,categories:m}}).sort((f,v)=>v.totalTokens-f.totalTokens)}const Hp={planning:{en:"Planning",zh:"方案设计"},debugging:{en:"Debugging",zh:"调试修复"},implementation:{en:"Building",zh:"功能实现"},refactor:{en:"Refactoring",zh:"代码重构"},testing:{en:"Testing",zh:"测试验证"},packaging:{en:"Shipping",zh:"构建发布"},explanation:{en:"Explaining",zh:"原理解释"},research:{en:"Research",zh:"技术调研"},ui_design:{en:"UI Design",zh:"UI 设计"},workflow:{en:"Agent Workflow",zh:"Agent 工作流"}},Bp=new Map([["concept:testing","category:testing"],["concept:refactor","category:refactor"],["concept:debugging","category:debugging"],["concept:design","category:ui_design"],["concept:workflow","category:workflow"]]);function Yc(a){var c;return((c=[...a.entries()].sort((u,d)=>d[1].promptCount-u[1].promptCount||d[1].count-u[1].count||u[0].length-d[0].length||u[0].localeCompare(d[0]))[0])==null?void 0:c[0])||""}function Wp(a=[],c=[],u="total",d={},f="all"){var g,p;let v="",m="";if(u==="custom")v=d.from||"",m=d.to||"";else if(u!=="total"&&(v=((g=c[0])==null?void 0:g.day)||"",m=((p=c[c.length-1])==null?void 0:p.day)||"",!v||!m))return[];return a.filter(y=>{if(f!=="all"&&y.source!==f)return!1;if(u==="total"&&!v&&!m)return!0;const C=String(y.timestamp||"").slice(0,10);return/^\d{4}-\d{2}-\d{2}$/.test(C)?(!v||C>=v)&&(!m||C<=m):!1})}function Sc(a=[],{locale:c="en",limit:u=36,domainWeights:d={}}={}){const f=new Map,v=new Set(a.map(m=>String(m.timestamp||"").slice(0,7)).filter(m=>/^\d{4}-\d{2}$/.test(m))).size;for(const m of a){const g=String(m.timestamp||"").slice(0,7);for(const p of m.concepts||[]){const y=f.get(p.key)||{key:p.key,kind:p.kind||"term",vibe:!!p.vibe,acronym:!!p.acronym,count:0,promptCount:0,months:new Map,variants:new Map};y.vibe=y.vibe||!!p.vibe,y.acronym=y.acronym||!!p.acronym;let C=0;for(const[E,w]of Object.entries(p.variants||{})){const G=Math.max(0,Number(w)||0);if(G===0)continue;const O=y.variants.get(E)||{count:0,promptCount:0};O.count+=G,O.promptCount+=1,y.variants.set(E,O),C+=G}C!==0&&(y.count+=C,y.promptCount+=1,/^\d{4}-\d{2}$/.test(g)&&y.months.set(g,(y.months.get(g)||0)+1),f.set(p.key,y))}}return[...f.values()].filter(m=>{const g=Bp.get(m.key);return g&&f.has(g)?!1:Vp(m,a.length,v,Number(d[m.key]||0))}).map(m=>{var P;const g=m.key.startsWith("category:")?m.key.slice(9):"",p=m.kind!=="category"&&!m.vibe,y=g?((P=Hp[g])==null?void 0:P[c==="zh"?"zh":"en"])||g:Yc(m.variants),C=Math.max(0,m.count-m.promptCount),E=m.kind==="category"?1.12:1,w=(m.promptCount+Math.log2(1+C)*.35)*E,G=m.count/Math.max(1,m.promptCount),O=Math.log2(1+m.promptCount)*Math.pow(Math.min(3,G),2)*10*(m.acronym?1.2:1),T=Number(d[m.key]||0)*.85;return{key:m.key,kind:p?"domain":m.kind,term:y,count:m.count,prompt_count:m.promptCount,weight:Number((p?Math.max(O,T):w).toFixed(3))}}).filter(m=>m.term).sort((m,g)=>g.weight-m.weight||g.prompt_count-m.prompt_count||g.count-m.count||m.term.localeCompare(g.term)).slice(0,u)}function Vp(a,c,u,d=0){if(a.kind==="category"||a.vibe||d>0)return!0;const f=Math.min(12,Math.max(3,Math.ceil(c*.006)));if(a.promptCount<f)return!1;if(a.acronym)return!0;const v=Yc(a.variants);if(!(/^[\p{Script=Han}]{2,}$/u.test(v)||/^[a-z][a-z0-9-]{3,}$/i.test(v))||a.months.size===0)return!1;if(u<=3)return!0;const p=Math.max(0,...a.months.values())/a.promptCount;return a.months.size<=2||p>=.45}const Gp=["day","week","month","total","custom"],Yp={cursor:"#18b981",codex:"#3b82f6",claude:"#df7854",opencode:"#8b5cf6",gemini:"#22d3ee",copilot:"#facc15"},Cc=["#f59e0b","#ec4899","#14b8a6","#6366f1"],Kp=["#ff5a1f","#f0c14a","#e07a3a","#c45c26","#8b5a2b","#23d6a5","#5b8cff","#6b6560","#d97706","#b45309"];function bl(a,c=0){return Yp[js(a)]||Cc[c%Cc.length]}function Ns(a){const c=Number(a)||0;return c<1e3?c.toLocaleString():c<1e6?`${(c/1e3).toFixed(c>=1e4?0:1)}K`:c<1e9?`${(c/1e6).toFixed(c>=1e8?0:1)}M`:`${(c/1e9).toFixed(c>=1e10?1:2)}B`}function Qp(a,c){return(c?{day:"日",week:"周",month:"月",total:"全部",custom:"自定义"}:{day:"Day",week:"Week",month:"Month",total:"Total",custom:"Custom"})[a]}function Xp({value:a}){const[c,u]=M.useState(0);return M.useEffect(()=>{var p;if((p=window.matchMedia)==null?void 0:p.call(window,"(prefers-reduced-motion: reduce)").matches){u(a);return}u(0);let f;const v=performance.now(),m=850,g=y=>{const C=Math.min(1,(y-v)/m),E=1-Math.pow(1-C,4);u(a*E),C<1&&(f=requestAnimationFrame(g))};return f=requestAnimationFrame(g),()=>cancelAnimationFrame(f)},[a]),Ns(c)}function Zp({activity:a,wordCloudRecords:c=[]}){const{locale:u,t:d}=Xn(),f=u==="zh",[v,m]=M.useState("total"),[g,p]=M.useState("all"),[y,C]=M.useState({from:"",to:""}),[E,w]=M.useState(!1),G=(a==null?void 0:a.daily_rows)||[],O=M.useMemo(()=>Ip(G,v,y),[G,v,y]),T=M.useMemo(()=>gs(O),[O]),P=M.useMemo(()=>gs(G),[G]),ie=M.useMemo(()=>$p(O,g),[O,g]),ue=M.useMemo(()=>gs(ie),[ie]),F=M.useMemo(()=>Dp(ie),[ie]),Q=M.useMemo(()=>Wp(c,O,v,y,g),[c,O,v,y,g]),U=M.useMemo(()=>Object.fromEntries(Sc(c,{locale:u,limit:500}).filter(ee=>ee.kind==="domain").map(ee=>[ee.key,ee.weight])),[c,u]),I=M.useMemo(()=>Sc(Q,{locale:u,limit:36,domainWeights:U}),[Q,u,U]),he=Number((a==null?void 0:a.estimated_cost_usd)||0)*(P.totalTokens>0?ue.totalTokens/P.totalTokens:0),Se=M.useMemo(()=>Fp(ie,{estimatedCostUsd:he}),[ie,he]),ce=M.useMemo(()=>Up(ie),[ie]),Me=g==="codex"||g==="claude"?ce.find(ee=>ee.source===g):null,Fe=T.sources;return s.jsxs("div",{className:"space-y-4",children:[s.jsxs("section",{className:"motion-reveal motion-surface rounded-[18px] border border-black/[0.06] bg-[#fffcf7] p-5 shadow-[0_10px_30px_rgba(40,28,12,0.06)] dark:border-white/[0.08]",children:[s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[s.jsx("div",{className:"flex flex-wrap items-center gap-1",role:"tablist","aria-label":d("usage.period"),children:Gp.map(ee=>s.jsx("button",{type:"button",role:"tab","aria-selected":v===ee,onClick:()=>m(ee),className:`motion-button rounded-lg px-3 py-2 text-xs font-medium transition-colors ${v===ee?"bg-black/[0.07] text-[#1a1a1a] dark:bg-white/[0.09] dark:text-white":"text-[#6b6560] hover:bg-black/[0.04] dark:text-[#b0b0b0] dark:hover:bg-white/[0.05]"}`,children:Qp(ee,f)},ee))}),s.jsxs("select",{value:g,onChange:ee=>p(ee.target.value),className:"h-9 rounded-lg border border-black/[0.1] bg-transparent px-3 text-xs font-medium text-[#1a1a1a] outline-none dark:border-white/[0.12] dark:text-white","aria-label":d("usage.agentFilter"),children:[s.jsx("option",{value:"all",children:d("usage.allAgents")}),Fe.map(ee=>s.jsx("option",{value:ee.source,children:Nl(ee.source)},ee.source))]})]}),v==="custom"&&s.jsxs("div",{className:"mt-3 flex flex-wrap justify-end gap-2",children:[s.jsx("input",{type:"date",value:y.from,onChange:ee=>C(je=>({...je,from:ee.target.value})),className:"rounded-lg border border-black/[0.1] bg-transparent px-2 py-1.5 text-xs dark:border-white/[0.12]","aria-label":d("usage.from")}),s.jsx("span",{className:"self-center text-xs text-[#8b8680] dark:text-[#8f8f8f]",children:"→"}),s.jsx("input",{type:"date",value:y.to,onChange:ee=>C(je=>({...je,to:ee.target.value})),className:"rounded-lg border border-black/[0.1] bg-transparent px-2 py-1.5 text-xs dark:border-white/[0.12]","aria-label":d("usage.to")})]}),s.jsxs("div",{className:"py-7 text-center",children:[s.jsx("div",{className:"text-xs font-medium uppercase tracking-[0.08em] text-[#6b6560] dark:text-[#b0b0b0]",children:(a==null?void 0:a.metric)==="tokens"?d("profile.stat.totalTokens"):d("profile.stat.totalPrompts")}),s.jsx("div",{className:"mt-2 font-[JetBrains_Mono,ui-monospace,monospace] text-[58px] font-bold leading-none tracking-[-0.05em]",children:s.jsx(Xp,{value:ue.totalTokens})}),he>0&&s.jsxs("div",{className:"mt-5 flex items-baseline justify-center gap-2",children:[s.jsx("span",{className:"text-[10px] font-bold uppercase tracking-[0.12em] text-[#8b8680] dark:text-[#8f8f8f]",children:d("profile.stat.estCost")}),s.jsxs("span",{className:"text-xl font-bold text-emerald-500",children:["$",he.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2})]})]})]}),s.jsx("div",{className:"mb-5 flex h-1.5 overflow-hidden rounded-full bg-black/[0.06] dark:bg-white/[0.06]",children:(g==="all"?ue.sources:ue.sources.slice(0,1)).map((ee,je)=>s.jsx("span",{className:"usage-segment",style:{width:g==="all"?`${ee.percent}%`:"100%",background:bl(ee.source,je),"--motion-delay":`${je*70}ms`}},ee.source))}),s.jsxs("div",{className:"grid grid-cols-2 gap-2.5 sm:grid-cols-3 xl:grid-cols-5",children:[s.jsx(bc,{source:"all",selected:g==="all",percent:T.totalTokens>0?100:0,modelCount:T.modelCount,onClick:()=>p("all"),t:d}),Fe.map((ee,je)=>s.jsx(bc,{...ee,selected:g===ee.source,color:bl(ee.source,je),onClick:()=>p(ee.source),t:d},ee.source))]}),s.jsxs("div",{className:"mt-5 border-t border-black/[0.07] pt-4 dark:border-white/[0.08]",children:[s.jsxs("div",{className:"mb-2 flex flex-wrap items-end justify-between gap-2",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-[10px] font-bold uppercase tracking-[0.18em] text-[#8b8680] dark:text-[#8f8f8f]",children:d("usage.cloudKicker")}),s.jsx("h2",{className:"m-0 mt-0.5 text-sm font-semibold uppercase tracking-[0.03em] text-[#393633] dark:text-[#d4d4d4]",children:d("usage.cloud")})]}),s.jsx("span",{className:"text-[11px] text-[#8b8680] dark:text-[#8f8f8f]",children:d("usage.cloudPromptCount",{count:Q.length})})]}),s.jsx("div",{className:"h-[170px] w-full overflow-hidden rounded-xl bg-[#f7f4ef] dark:bg-black/20",children:I.length>0?s.jsx(Op,{words:I,width:860,height:170,gridSize:3,weightDivisor:4.2,rotateRatio:.06,minRotation:-.16,maxRotation:.16,ellipticity:.92,minSize:7,colors:Kp,fontFamily:"Outfit, system-ui, sans-serif"}):s.jsx("div",{className:"flex h-full items-center justify-center px-4 text-center text-sm text-[#8b8680] dark:text-[#8f8f8f]",children:d("usage.cloudEmpty")})})]}),s.jsx(Jp,{breakdown:Me,source:g,t:d}),s.jsx(qp,{usage:Se,showAll:E,onToggle:()=>w(ee=>!ee),zh:f,t:d})]}),s.jsx(tm,{trend:F,sources:Fe,zh:f,t:d})]})}function qp({usage:a,showAll:c,onToggle:u,zh:d,t:f}){const v=(a==null?void 0:a.models)||[];if(v.length===0)return null;const m=c?v:v.slice(0,6),g=v.length>m.length||c,p=m.some(y=>y.estimatedCostUsd>0);return s.jsxs("div",{className:"mt-4 border-t border-black/[0.07] pt-3 dark:border-white/[0.08]",children:[s.jsxs("div",{className:"mb-0.5 flex items-end justify-between gap-3",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-[10px] font-bold uppercase tracking-[0.18em] text-[#8b8680] dark:text-[#8f8f8f]",children:f("usage.modelKicker")}),s.jsx("h2",{className:"m-0 mt-0.5 text-sm font-semibold uppercase tracking-[0.03em] text-[#393633] dark:text-[#d4d4d4]",children:f("usage.models")})]}),s.jsx("span",{className:"text-[11px] text-[#8b8680] dark:text-[#8f8f8f]",children:f("profile.stat.modelCount",{count:v.length})})]}),s.jsx("div",{children:m.map(y=>s.jsxs("div",{className:"border-b border-black/[0.055] py-1.5 last:border-b-0 dark:border-white/[0.065]",children:[s.jsxs("div",{className:`grid items-baseline gap-x-3 text-xs ${p?"grid-cols-[minmax(0,1fr)_auto_auto_auto]":"grid-cols-[minmax(0,1fr)_auto_auto]"}`,children:[s.jsx("span",{className:"truncate font-medium text-[#393633] dark:text-[#d4d4d4]",title:y.model,children:em(y.model,d)}),s.jsx("span",{className:"font-[JetBrains_Mono,ui-monospace,monospace] tabular-nums text-[#6b6560] dark:text-[#b0b0b0]",children:Ns(y.tokens)}),p&&s.jsx("span",{className:"min-w-[56px] text-right tabular-nums text-[#8b8680] dark:text-[#8f8f8f]",children:y.estimatedCostUsd>0?`$${y.estimatedCostUsd.toLocaleString(void 0,{maximumFractionDigits:2})}`:"—"}),s.jsxs("span",{className:"w-[46px] text-right font-[JetBrains_Mono,ui-monospace,monospace] tabular-nums text-[#393633] dark:text-[#d4d4d4]",children:[y.percent<.1&&y.percent>0?"<0.1":y.percent.toFixed(1),"%"]})]}),s.jsx("div",{className:"mt-1 h-[2px] overflow-hidden rounded-full bg-black/[0.06] dark:bg-white/[0.07]",children:s.jsx("span",{className:"block h-full origin-left rounded-full",style:{width:`${Math.max(.5,y.percent)}%`,background:bl(y.dominantSource)}})})]},y.model))}),g&&s.jsxs("button",{type:"button",onClick:u,className:"motion-button mt-2 inline-flex items-center gap-1 rounded-lg px-2 py-1.5 text-xs font-medium text-[#6b6560] hover:bg-black/[0.04] dark:text-[#b0b0b0] dark:hover:bg-white/[0.05]",children:[c?s.jsx(ip,{size:13}):s.jsx(Hc,{size:13}),c?f("usage.showLessModels"):f("usage.showAllModels",{count:v.length})]})]})}const jc={messages:"#2997dc",tool_calls:"#3f8bc5",reasoning:"#78a9cf",system_prompt:"#8a9cab",custom_agents:"#5f7890"};function Jp({breakdown:a,source:c,t:u}){return a?s.jsxs("div",{className:"mt-4 border-t border-black/[0.07] pt-3 dark:border-white/[0.08]",children:[s.jsx("div",{className:"mb-2 flex flex-wrap items-center justify-between gap-2",children:s.jsxs("div",{children:[s.jsx("div",{className:"text-[10px] font-bold uppercase tracking-[0.18em] text-[#8b8680] dark:text-[#8f8f8f]",children:u("usage.contextKicker")}),s.jsxs("h2",{className:"m-0 mt-0.5 flex items-center gap-1.5 text-sm font-semibold text-[#393633] dark:text-[#d4d4d4]",children:[s.jsx(bs,{agent:c,size:16}),u("usage.contextTitle",{agent:Nl(c)})]})]})}),s.jsxs("div",{className:"mb-2 flex flex-wrap gap-x-3 gap-y-1 text-[10px] text-[#8b8680] dark:text-[#8f8f8f]",children:[a.cacheHitRate>0&&s.jsx("span",{children:u("usage.cacheHit",{percent:Math.round(a.cacheHitRate)})}),s.jsx("span",{children:u("usage.contextEvents",{count:a.eventCount})}),a.toolCallCount>0&&s.jsx("span",{children:u("usage.toolCallCount",{count:a.toolCallCount})})]}),s.jsx("div",{className:"space-y-0.5",children:a.categories.map(d=>s.jsxs("div",{className:"relative grid min-h-6 grid-cols-[minmax(0,1fr)_auto_auto] items-center gap-3 overflow-hidden rounded px-1.5 text-[11px]",children:[s.jsx("span",{className:"absolute inset-y-0 left-0 opacity-[0.14]",style:{width:`${Math.max(1,d.percent)}%`,background:jc[d.key]}}),s.jsxs("span",{className:"relative flex items-center gap-1.5 text-[#4b4743] dark:text-[#c8c8c8]",children:[s.jsx("span",{className:"h-1.5 w-1.5 rounded-full",style:{background:jc[d.key]}}),u(`usage.context.${d.key}`)]}),s.jsx("span",{className:"relative font-[JetBrains_Mono,ui-monospace,monospace] tabular-nums text-[#6b6560] dark:text-[#b0b0b0]",children:Ns(d.tokens)}),s.jsxs("span",{className:"relative w-[44px] text-right tabular-nums text-[#8b8680] dark:text-[#8f8f8f]",children:[d.percent<.1?"<0.1":d.percent.toFixed(1),"%"]})]},d.key))}),s.jsxs("details",{className:"mt-2 text-[10px] text-[#99938d] dark:text-[#777]",children:[s.jsx("summary",{className:"w-fit cursor-pointer select-none font-medium underline-offset-2 hover:underline",children:u("usage.methodology")}),s.jsx("p",{className:"mb-0 mt-1.5 max-w-2xl leading-relaxed",children:u(c==="codex"?"usage.contextCodexNote":"usage.contextClaudeNote")})]})]}):null}function em(a,c){return a==="auto"?c?"自动路由":"Auto routing":a==="unknown"?c?"未知模型":"Unknown model":a}function bc({source:a,percent:c,modelCount:u,selected:d,color:f,onClick:v,t:m}){const g=a==="all";return s.jsxs("button",{type:"button",onClick:v,className:`motion-button motion-source-card min-w-0 rounded-xl border p-3 text-left transition-colors ${d?"border-emerald-500/45 bg-emerald-500/[0.05]":"border-black/[0.12] hover:border-black/[0.22] dark:border-white/[0.14] dark:hover:border-white/[0.24]"}`,children:[s.jsxs("div",{className:"flex items-center gap-2 text-xs font-semibold uppercase",children:[g?s.jsx("span",{className:"inline-flex h-[18px] w-[18px] items-center justify-center",children:"◈"}):s.jsx(bs,{agent:a,size:18}),s.jsx("span",{className:"truncate",children:g?m("usage.all"):Nl(a)})]}),s.jsxs("div",{className:"mt-2 text-xl font-bold tabular-nums",style:g?void 0:{color:f},children:[c<.01&&c>0?"<0.01":c.toFixed(2),"%"]}),s.jsx("div",{className:"mt-1 text-[11px] text-[#8b8680] dark:text-[#8f8f8f]",children:m("profile.stat.modelCount",{count:u})})]})}function tm({trend:a,sources:c,zh:u,t:d}){var p,y;const f=Math.max(1,...a.map(C=>C.total)),v=c.map(C=>C.source),m=((p=a[0])==null?void 0:p.key)||"—",g=((y=a[a.length-1])==null?void 0:y.key)||"—";return s.jsxs("section",{className:"motion-reveal motion-surface rounded-[18px] border border-black/[0.06] bg-[#fffcf7] p-5 shadow-[0_10px_30px_rgba(40,28,12,0.06)] dark:border-white/[0.08]",children:[s.jsx("div",{className:"mb-4 flex items-center justify-between",children:s.jsx("h2",{className:"m-0 text-sm font-semibold uppercase tracking-[0.03em] text-[#393633] dark:text-[#d4d4d4]",children:d("usage.trend")})}),s.jsxs("div",{className:"relative h-[175px] border-y border-black/[0.07] dark:border-white/[0.08]",children:[[.25,.5,.75].map(C=>s.jsx("span",{className:"pointer-events-none absolute inset-x-0 border-t border-black/[0.06] dark:border-white/[0.07]",style:{top:`${C*100}%`}},C)),s.jsx("div",{className:"absolute inset-0 flex items-end gap-[2px] pt-2",children:a.map((C,E)=>s.jsx("div",{className:"flex h-full min-w-0 flex-1 flex-col justify-end",title:`${C.key}: ${C.total.toLocaleString()}`,children:s.jsx("div",{className:"usage-trend-bar flex w-full flex-col-reverse",style:{height:`${Math.max(2,C.total/f*100)}%`,"--motion-delay":`${Math.min(360,E*32)}ms`},children:v.map((w,G)=>{const O=Number(C.sources[w]||0);return O<=0?null:s.jsx("span",{style:{height:`${O/C.total*100}%`,background:bl(w,G)}},w)})})},`${C.key}-${C.total}`))})]}),s.jsxs("div",{className:"mt-2 flex justify-between text-xs text-[#6b6560] dark:text-[#b0b0b0]",children:[s.jsx("span",{children:Nc(m,u)}),s.jsx("span",{children:Nc(g,u)})]})]})}function Nc(a,c){if(!/^\d{4}-\d{2}(-\d{2})?$/.test(a))return a;const u=new Date(`${a}${a.length===7?"-01":""}T00:00:00Z`);return new Intl.DateTimeFormat(c?"zh-CN":"en-US",{year:"numeric",month:"short",...a.length===10?{day:"numeric"}:{},timeZone:"UTC"}).format(u)}const Ec={"01-builder":{en:"Builder",zh:"构建侠"},"02-debugger":{en:"Debugger",zh:"调试猎手"},"03-architect":{en:"Architect",zh:"架构师"},"04-codex-believer":{en:"CodexBeliever",zh:"Codex信徒"},"05-prompt-priest":{en:"PromptPriest",zh:"提示祭司"},"06-tab-hoarder":{en:"TabHoarder",zh:"标签囤积癖"},"07-context-maxxer":{en:"ContextMaxxer",zh:"上下文极限党"},"08-yolo-shipper":{en:"YoloShipper",zh:"YOLO上线狂"}},Tc={SHIP:{en:"ShipIt",zh:"直接上线"},HUNT:{en:"BugHunt",zh:"猎虫"},DRAW:{en:"Blueprint",zh:"蓝图先行"},FAITH:{en:"CodexFaith",zh:"Codex信仰"},SPELL:{en:"SpellCraft",zh:"法术工艺"},TABS:{en:"TabHoard",zh:"标签囤积"},METER:{en:"CtxMeter",zh:"上下文表"},YOLO:{en:"YoloShip",zh:"YOLO发车"}},_c={planning:{en:"Planning",zh:"规划"},debugging:{en:"Debugging",zh:"调试"},implementation:{en:"Implementation",zh:"实现"},refactor:{en:"Refactor",zh:"重构"},testing:{en:"Testing",zh:"测试"},packaging:{en:"Packaging",zh:"打包"},explanation:{en:"Explanation",zh:"讲解"},research:{en:"Research",zh:"调研"},ui_design:{en:"UIDesign",zh:"UI设计"},workflow:{en:"Workflow",zh:"工作流"}},Mc={GOD:{en:"GOD",zh:"神级"},ELITE:{en:"ELITE",zh:"精英"},SOLID:{en:"SOLID",zh:"扎实"},NPC:{en:"NPC",zh:"路人甲"},TRASH:{en:"TRASH",zh:"垃分"}};function Sl(a,c){return a?typeof a=="string"?a:c?a.zh||a.en:a.en||a.zh:""}function xs(a){return String(a||"").replace(/[_-]+/g," ").replace(/\s+/g," ").trim().split(" ").filter(Boolean).map(c=>c.charAt(0).toUpperCase()+c.slice(1).toLowerCase()).join("")}function nm(a,c){const u=a==null?void 0:a[c];if(u==null)return 0;if(typeof u=="number")return Number.isFinite(u)?u:0;const d=Number(u.count);return Number.isFinite(d)?d:0}function rm(a,c={},u={}){var G;const d=u.limit??8,f=u.locale==="zh",v=[],m=new Set;function g(O){const T=String(O||"").replace(/^#+/,"").replace(/[^A-Za-z0-9\u4e00-\u9fff]/g,"");if(!T)return;const P=`#${T}`,ie=P.toLowerCase();m.has(ie)||(m.add(ie),v.push(P))}const p=(a==null?void 0:a.archetype)||{},y=p.id||"";Ec[y]?g(Sl(Ec[y],f)):p.title&&g(f?p.title:xs(p.title)),p.code&&Tc[p.code]?g(Sl(Tc[p.code],f)):p.code&&g(/^[MA][OP][VS][FX]$/.test(p.code)?p.code:xs(p.code));const C=(G=a==null?void 0:a.tier)==null?void 0:G.id;!(a!=null&&a.type_code)&&C&&Mc[C]?g(Sl(Mc[C],f)):!(a!=null&&a.type_code)&&C&&g(C);const E=Object.keys(_c).map(O=>[O,nm(c,O)]).filter(([,O])=>O>0).sort((O,T)=>T[1]-O[1]);for(const[O]of E)if(g(Sl(_c[O],f)),v.length>=d)break;const w=f&&p.hookZh||p.hook;if(w){const O=String(w).split(/[\s·•\-–—,/,、]+/)[0];O&&O.length>1&&g(f?O:xs(O))}return v.slice(0,d)}function om(a=[],c=8){const u=[],d=new Set;for(const f of a||[]){const v=String(f||"").replace(/^#+/,"").replace(/[^A-Za-z0-9\u4e00-\u9fff]/g,"");if(!v)continue;const m=v.toLowerCase();d.has(m)||(d.add(m),u.push(`#${v}`))}return u.slice(0,c)}const Qn="#171717",Kc="#f4f0e8",Qc="#706a63";function Pc(a){return new Promise((c,u)=>{const d=new Image;d.crossOrigin="anonymous",d.onload=()=>c(d),d.onerror=()=>u(new Error(`Failed to load image: ${a}`)),d.src=a})}function ys(a,c){const u=String(a||"").replace("#","");if(/^[0-9a-f]{6}$/i.test(u)){const d=Number.parseInt(u,16);return`rgba(${d>>16&255}, ${d>>8&255}, ${d&255}, ${c})`}return a}function lm(a,c=.8){const u=String(a).replace("#","");if(!/^[0-9a-f]{6}$/i.test(u))return Kc;const d=Number.parseInt(u,16),f=[d>>16&255,d>>8&255,d&255],v=[244,240,232],m=f.map((g,p)=>Math.round(g*(1-c)+v[p]*c));return`rgb(${m[0]}, ${m[1]}, ${m[2]})`}function am(a,c,u){const d=String(c||"").trim();if(!d)return[];const f=(d.match(/[\u3400-\u9fff]/g)||[]).length>d.length*.2,v=f?[...d]:d.split(/\s+/),m=f?"":" ",g=[];let p="";for(const y of v){const C=p?`${p}${m}${y}`:y;a.measureText(C).width<=u||!p?p=C:(g.push(p),p=y)}return p&&g.push(p),g}function ks(a,c,u,d,f,v,m){const g=am(a,c,f),p=g.slice(0,m);if(g.length>m&&p.length){let y=p[p.length-1];for(;y&&a.measureText(`${y}…`).width>f;)y=y.slice(0,-1);p[p.length-1]=`${y}…`}return p.forEach((y,C)=>a.fillText(y,u,d+C*v)),p.length}function sm(a,c,{maxWidth:u,start:d,min:f,family:v,weight:m=800}){let g=d;do{if(a.font=`${m} ${g}px ${v}`,a.measureText(c).width<=u)return g;g-=2}while(g>f);return f}function im(a={}){var c,u;return a.letter===((c=a.left)==null?void 0:c.code)?a.left:a.letter===((u=a.right)==null?void 0:u.code)?a.right:{code:a.letter||"?",label:a.label,labelZh:a.labelZh,percent:50}}function um(a,c){const u=c?(a==null?void 0:a.roastZh)||(a==null?void 0:a.roast):(a==null?void 0:a.roast)||(a==null?void 0:a.roastZh),d=c?(a==null?void 0:a.tldrZh)||(a==null?void 0:a.tldr):(a==null?void 0:a.tldr)||(a==null?void 0:a.tldrZh);return(String(u||d||"").replace(/^🔥\s*/,"").replace(/\s+/g," ").trim().match(/[^。!?.!?]+[。!?.!?]+|[^。!?.!?]+$/g)||[]).slice(0,2).join(c?"":" ").trim()||d||""}function cm(a,c,u,d){const f=(c||[]).slice(0,4);if(!f.length)return;const v=62,m=1214,g=18,p=(1080-v*2-g*3)/4;a.strokeStyle="rgba(23,23,23,0.18)",a.lineWidth=2,a.beginPath(),a.moveTo(v,m-26),a.lineTo(1080-v,m-26),a.stroke(),f.forEach((y,C)=>{const E=im(y),w=v+C*(p+g),G=(d?E.labelZh:E.label)||E.label||"";C>0&&(a.strokeStyle="rgba(23,23,23,0.14)",a.beginPath(),a.moveTo(w-g/2,m),a.lineTo(w-g/2,m+82),a.stroke()),a.textAlign="left",a.fillStyle=u,a.font="900 34px 'JetBrains Mono', ui-monospace, monospace",a.fillText(E.code||y.letter||"?",w,m+34),a.textAlign="right",a.fillStyle=Qc,a.font="700 14px Outfit, system-ui, sans-serif",a.fillText(`${Number(E.percent||0)}%`,w+p,m+30),a.textAlign="left",a.fillStyle=Qn,a.font="700 16px Outfit, system-ui, sans-serif",ks(a,G,w,m+64,p,18,2)})}function zc(a,c,u,d){a.font=`800 ${u}px Outfit, system-ui, sans-serif`;const f=u+18,v=[];let m=58,g=370;for(const p of c){const y=Math.ceil(a.measureText(p).width)+28;m>58&&m+y>58+d&&(m=58,g+=f+8),v.push({tag:p,x:m,y:g,width:y,height:f}),m+=y+8}return{items:v,bottom:v.length?g+f:370}}function dm(a,c,u){const d=(c||[]).filter(Boolean);if(!d.length)return;let f=18,v=zc(a,d,f,442);for(;v.bottom>596&&f>13;)f-=1,v=zc(a,d,f,442);v.items.forEach((m,g)=>{a.fillStyle=g===0?u:ys(u,.09),a.strokeStyle=g===0?u:ys(u,.3),a.lineWidth=1.5,a.beginPath(),a.roundRect(m.x,m.y,m.width,m.height,m.height/2),a.fill(),a.stroke(),a.textAlign="left",a.fillStyle=g===0?"#ffffff":Qn,a.font=`800 ${f}px Outfit, system-ui, sans-serif`,a.fillText(m.tag,m.x+14,m.y+f+7)})}function fm(a,c){a.fillStyle=Qn,a.fillRect(0,1334,1080,106),a.textAlign="left",a.fillStyle="rgba(255,255,255,0.58)",a.font="800 12px Outfit, system-ui, sans-serif",a.fillText(c?"测测你的编码人格":"ROAST YOUR CODING VIBE",58,1367),a.fillStyle="#ffffff",a.font="800 20px Outfit, system-ui, sans-serif",a.fillText("github.com/PinkR1ver/vibe-roast",58,1402),a.textAlign="right",a.fillStyle="rgba(255,255,255,0.58)",a.font="800 12px Outfit, system-ui, sans-serif",a.fillText(c?"本地运行 · 开源":"RUN LOCAL · OPEN SOURCE",1022,1367),a.fillStyle="#ffffff",a.font="800 20px 'JetBrains Mono', ui-monospace, monospace",a.fillText("npx vibe-roast",1022,1402)}async function pm({vibe:a,hashtags:c=[],locale:u="en",width:d=1080}={}){var O,T,P,ie,ue,F,Q;const f=u==="zh",v=Math.round(d*4/3),m=d/1080,g=document.createElement("canvas");g.width=d,g.height=v;const p=g.getContext("2d");p.scale(m,m),(O=document.fonts)!=null&&O.ready&&await document.fonts.ready;const y=((T=a==null?void 0:a.archetype)==null?void 0:T.accent)||"#ff5a1f",C=(a==null?void 0:a.type_code)||((P=a==null?void 0:a.archetype)==null?void 0:P.code)||"????",E=(f?(ie=a==null?void 0:a.archetype)==null?void 0:ie.titleZh:(ue=a==null?void 0:a.archetype)==null?void 0:ue.title)||"Vibe Coder",w=(f?(F=a==null?void 0:a.archetype)==null?void 0:F.hookZh:(Q=a==null?void 0:a.archetype)==null?void 0:Q.hook)||"",G=um(a,f)||w;p.fillStyle=Kc,p.fillRect(0,0,1080,1440),p.fillStyle=Qn,p.fillRect(0,0,1080,96),p.textAlign="left",p.fillStyle="#ffffff",p.font="900 24px Outfit, system-ui, sans-serif",p.fillText("VIBE ROASTER",58,59),p.textAlign="right",p.fillStyle="rgba(255,255,255,0.62)",p.font="700 15px Outfit, system-ui, sans-serif",p.fillText(f?"编码人格档案":"CODING PERSONALITY FILE",1022,57),p.fillStyle=lm(y,.78),p.fillRect(0,96,1080,704),p.fillStyle=ys(y,.18),p.beginPath(),p.arc(900,270,270,0,Math.PI*2),p.fill(),p.save(),p.globalAlpha=.1,p.textAlign="left",p.fillStyle=y,p.font="900 190px 'JetBrains Mono', ui-monospace, monospace",p.fillText(C,36,412),p.restore(),p.textAlign="left",p.fillStyle=y,p.font="800 15px Outfit, system-ui, sans-serif",p.fillText(f?"你的类型":"YOUR TYPE",58,158),sm(p,E,{maxWidth:470,start:f?68:76,min:48,family:"Outfit, system-ui, sans-serif",weight:900}),p.fillStyle=Qn,p.fillText(E,58,226),p.fillStyle=Qc,p.font=`700 ${f?24:22}px Outfit, system-ui, sans-serif`,ks(p,w,58,274,430,31,3),dm(p,c,y);try{let U;try{U=await Pc(a.figure)}catch(je){if(!a.figure_fallback)throw je;U=await Pc(a.figure_fallback)}const I=620,he=660,Se=Math.min(I/U.width,he/U.height),ce=U.width*Se,Me=U.height*Se,Fe=1080-ce-36,ee=118+(he-Me);p.save(),p.shadowColor="rgba(35,25,18,0.14)",p.shadowBlur=24,p.shadowOffsetY=16,p.drawImage(U,Fe,ee,ce,Me),p.restore()}catch{}return p.textAlign="left",p.fillStyle=Qn,p.font="900 120px 'JetBrains Mono', ui-monospace, monospace",p.fillText(C,52,752),p.fillStyle=y,p.fillRect(58,842,7,302),p.textAlign="left",p.fillStyle=y,p.font="900 15px Outfit, system-ui, sans-serif",p.fillText(f?"ROAST 摘要":"THE ROAST",88,874),p.fillStyle=Qn,p.font=`800 ${f?42:39}px Outfit, system-ui, sans-serif`,ks(p,G,88,932,910,f?57:53,5),cm(p,(a==null?void 0:a.type_axes)||[],y,f),fm(p,f),g}function mm(a,c="vibe-roast-card.png"){const u=a.toDataURL("image/png"),d=document.createElement("a");d.href=u,d.download=c,d.click()}function hm(a,c="vibe-roast-card.png"){return new Promise((u,d)=>{a.toBlob(f=>{if(!f){d(new Error("Could not create the share image."));return}u(new File([f],c,{type:"image/png"}))},"image/png")})}function gm(a,c){return!(a!=null&&a.from)&&!(a!=null&&a.to)?c?"全部时间":"ALL TIME":`${(a==null?void 0:a.from)||"…"} → ${(a==null?void 0:a.to)||"…"}`}function xm({size:a=18}){return s.jsxs("svg",{width:a,height:a,viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[s.jsx("path",{d:"M15 8a3 3 0 1 0-2.83-4H12a3 3 0 0 0 3 4Zm-6 12a3 3 0 1 0 0-6 3 3 0 0 0 0 6Zm10 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z",stroke:"currentColor",strokeWidth:"1.8"}),s.jsx("path",{d:"M8.6 11.4 15 8.6M8.6 12.6 15.4 15.4",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"})]})}function Ac({accent:a,onShare:c,posterBusy:u,t:d}){const{toggleLocale:f}=Xn(),{theme:v,setTheme:m}=Ic(),g=[{key:"light",Icon:vp},{key:"dark",Icon:hp},{key:"system",Icon:mp}];return s.jsxs("div",{className:"motion-chrome mb-7 flex flex-wrap items-end justify-between gap-4",children:[s.jsx("h1",{className:"roast-brand m-0 text-[44px] sm:text-[52px] leading-[0.95] text-[#1a1a1a] dark:text-[#fafafa]",children:d("app.brand")}),s.jsxs("div",{className:"flex items-center gap-1 pb-1",children:[s.jsx("div",{className:"mr-1 inline-flex items-center rounded-xl border border-black/[0.06] bg-white/45 p-1 dark:border-white/[0.08] dark:bg-white/[0.04]",role:"group","aria-label":d("theme.system"),children:g.map(({key:p,Icon:y})=>s.jsx("button",{type:"button",onClick:()=>m(p),className:`motion-button inline-flex h-8 w-8 items-center justify-center rounded-lg transition-colors ${v===p?"bg-white text-[#1a1a1a] shadow-sm dark:bg-[#2a2a2a] dark:text-white":"text-[#8b8680] hover:text-[#1a1a1a] dark:text-[#8f8f8f] dark:hover:text-white"}`,title:d(`theme.${p}`),"aria-label":d(`theme.${p}`),"aria-pressed":v===p,children:s.jsx(y,{size:14})},p))}),s.jsx("button",{type:"button",onClick:f,className:"motion-button h-10 min-w-[2.5rem] px-2.5 rounded-xl text-[11px] font-semibold text-[#6b6560] hover:text-[#1a1a1a] hover:bg-black/[0.04] transition-colors dark:text-[#a3a3a3] dark:hover:bg-white/[0.06] dark:hover:text-white",title:d("app.languageTitle"),"aria-label":d("app.languageTitle"),children:d("app.language")}),s.jsx("a",{href:"https://github.com/PinkR1ver/vibe-roast",target:"_blank",rel:"noopener noreferrer",className:"motion-button inline-flex h-10 w-10 items-center justify-center rounded-xl text-[#6b6560] hover:text-[#1a1a1a] hover:bg-black/[0.04] transition-colors dark:text-[#a3a3a3] dark:hover:bg-white/[0.06] dark:hover:text-white","aria-label":d("app.github"),title:d("app.github"),children:s.jsx("svg",{width:"16",height:"16",viewBox:"0 0 15 15",fill:"currentColor",children:s.jsx("path",{d:"M7.5.5a7 7 0 0 0-2.21 13.64c.35.06.48-.15.48-.33v-1.16c-1.97.42-2.38-.94-2.38-.94-.33-.82-.8-1.04-.8-1.04-.64-.44.05-.43.05-.43.71.05 1.09.72 1.09.72.64 1.08 1.67.77 2.07.59.06-.46.25-.77.45-.95-1.58-.18-3.24-.78-3.24-3.5 0-.77.28-1.4.73-1.9-.07-.18-.32-.9.07-1.87 0 0 .6-.19 1.95.73A6.8 6.8 0 0 1 7.5 3.9a6.8 6.8 0 0 1 1.78.24c1.35-.92 1.95-.73 1.95-.73.39.97.14 1.69.07 1.87.45.5.73 1.13.73 1.9 0 2.73-1.66 3.32-3.25 3.5.26.22.48.65.48 1.3v1.93c0 .18.13.4.49.33A7 7 0 0 0 7.5.5Z"})})}),c&&s.jsx("button",{type:"button",onClick:c,disabled:u,className:"motion-button motion-share ml-1 inline-flex h-11 w-11 items-center justify-center rounded-xl text-white shadow-[0_10px_20px_rgba(255,90,31,0.25)] disabled:opacity-60",style:{background:a},"aria-label":d(u?"profile.posterBusy":"profile.posterShare"),title:d(u?"profile.posterBusy":"profile.posterShare"),children:u?s.jsx("span",{className:"text-[10px] font-bold tracking-wide",children:"…"}):s.jsx(xm,{})})]})]})}function vm({data:a}){var oe,K,S,_;const{locale:c,t:u}=Xn(),d=c==="zh",f=a==null?void 0:a.vibe_profile,v=(a==null?void 0:a.summary)||{},m=(a==null?void 0:a.activity)||null,[g,p]=M.useState(!1),[y,C]=M.useState(""),[E,w]=M.useState(!1),[G,O]=M.useState(""),[T,P]=M.useState(null),[ie,ue]=M.useState(""),F=M.useRef(null),Q=((K=(oe=a==null?void 0:a.profile_signals)==null?void 0:oe.prompt_analysis)==null?void 0:K.categories)||{},U=M.useMemo(()=>{const z=d?f==null?void 0:f.hashtagsZh:f==null?void 0:f.hashtags;return Array.isArray(z)&&z.length>=3?om(z):rm(f,Q,{locale:d?"zh":"en"})},[f,Q,d]),I=((S=f==null?void 0:f.archetype)==null?void 0:S.accent)||"#ff5a1f",he=M.useMemo(()=>{if(!T||typeof navigator>"u"||typeof File>"u"||!navigator.share||!navigator.canShare)return!1;try{const z=new File([""],"vibe-roast-card.png",{type:"image/png"});return navigator.canShare({files:[z]})}catch{return!1}},[T]);if(M.useEffect(()=>{var Ce;const z=F.current;if(!z)return;const W=[...z.querySelectorAll(".motion-reveal")];if(((Ce=window.matchMedia)==null?void 0:Ce.call(window,"(prefers-reduced-motion: reduce)").matches)||typeof IntersectionObserver>"u"){W.forEach(fe=>fe.classList.add("is-visible"));return}const X=new IntersectionObserver(fe=>{for(const Ee of fe)Ee.isIntersecting&&(Ee.target.classList.add("is-visible"),X.unobserve(Ee.target))},{threshold:.12,rootMargin:"0px 0px -7% 0px"});return W.forEach(fe=>X.observe(fe)),()=>X.disconnect()},[f==null?void 0:f.type_code]),!f)return s.jsx("div",{className:"min-h-screen bg-[#f3f1ec] text-[#1a1a1a] px-4 py-8 dark:bg-[#0a0a0a] dark:text-[#fafafa]",children:s.jsxs("div",{className:"mx-auto w-full max-w-[1120px]",children:[s.jsx(Ac,{accent:I,t:u}),s.jsx("p",{className:"text-[#6b6560]",children:u("profile.empty")})]})});const Se=d?f.roastZh:f.roast,ce=d?f.tldrZh:f.tldr,Me=d?f.tier.blurbZh:f.tier.blurb,Fe=d?f.archetype.hookZh:f.archetype.hook,ee=d&&f.archetype.titleZh||f.archetype.title;async function je(){p(!0),C(""),w(!0),O(""),P(null),ue("");try{const z=await pm({vibe:f,hashtags:U,locale:c});P(z),O(z.toDataURL("image/png"))}catch(z){C((z==null?void 0:z.message)||String(z)),w(!1)}finally{p(!1)}}function te(){var W;if(!T)return;const z=(((W=f.archetype)==null?void 0:W.code)||"vibe").toLowerCase();mm(T,`vibe-roast-${z}-card.png`),ue(u("profile.posterSaved"))}function ye(){w(!1)}function Pe(){var Ce,fe,Ee;const z=f.type_code||((Ce=f.archetype)==null?void 0:Ce.code)||"",W=d?(fe=f.archetype)==null?void 0:fe.titleZh:(Ee=f.archetype)==null?void 0:Ee.title,me=d?f.tldrZh||f.tldr:f.tldr||f.tldrZh,X=d?"测测你的编码人格":"Roast your coding vibe";return[`${W||"Vibe Coder"} · ${z}`,me,U.slice(0,4).join(" "),`${X}: https://github.com/PinkR1ver/vibe-roast`].filter(Boolean).join(`
167
+
168
+ `)}async function Ne(){var W;if(!T||!navigator.share)return;const z=(((W=f.archetype)==null?void 0:W.code)||"vibe").toLowerCase();try{const me=await hm(T,`vibe-roast-${z}-card.png`);await navigator.share({title:u("profile.posterTitle"),text:Pe(),files:[me]}),ue(u("profile.posterShared"))}catch(me){(me==null?void 0:me.name)!=="AbortError"&&ue((me==null?void 0:me.message)||u("profile.posterShareFailed"))}}async function H(){const z=Pe();try{await navigator.clipboard.writeText(z),ue(u("profile.posterCaptionCopied"))}catch{const W=document.createElement("textarea");W.value=z,W.style.position="fixed",W.style.opacity="0",document.body.appendChild(W),W.select(),document.execCommand("copy"),W.remove(),ue(u("profile.posterCaptionCopied"))}}return s.jsxs("div",{ref:F,className:"roast-page min-h-screen bg-[radial-gradient(1200px_600px_at_10%_-10%,#ffe7d6_0%,transparent_55%),radial-gradient(900px_500px_at_100%_0%,#d9fff3_0%,transparent_50%),linear-gradient(180deg,#f3f1ec_0%,#e8e4db_100%)] text-[#1a1a1a] transition-colors dark:text-[#fafafa]",style:{"--roast-accent":I},children:[s.jsxs("div",{className:"mx-auto w-full max-w-[1120px] px-4 pt-7 pb-20",children:[s.jsx(Ac,{accent:I,onShare:je,posterBusy:g,t:u}),y&&s.jsx("p",{className:"mb-4 text-sm text-[#e24b4b]",children:y}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-[minmax(260px,300px)_minmax(0,1fr)] gap-5 items-start min-w-0",children:[s.jsxs("aside",{className:"motion-hero min-w-0 text-center",children:[s.jsxs("div",{className:"relative mx-auto mb-2 overflow-hidden px-2 pt-3 isolate",children:[s.jsx("div",{className:"pointer-events-none absolute left-1/2 top-[8%] z-0 h-[78%] w-full -translate-x-1/2 rounded-[46%_54%_42%_58%/48%_44%_56%_52%]",style:{background:`radial-gradient(circle at 35% 30%, color-mix(in srgb, ${I} 28%, var(--roast-card)), transparent 58%), radial-gradient(circle at 70% 65%, color-mix(in srgb, ${I} 16%, var(--roast-page)), transparent 62%)`}}),s.jsx("img",{src:f.figure,alt:ee,onError:z=>{f.figure_fallback&&z.currentTarget.src!==new URL(f.figure_fallback,window.location.href).href&&(z.currentTarget.src=f.figure_fallback)},width:384,height:512,className:"motion-character relative z-[1] mx-auto h-auto w-[88%] max-w-[280px] object-contain drop-shadow-[0_18px_28px_rgba(40,28,12,0.12)]"})]}),s.jsxs("p",{className:"m-0 text-[13px] font-bold tracking-wide text-[#6b6560]",children:["@",f.archetype.code.toLowerCase()]}),s.jsx("h1",{className:"mt-1 mb-1 text-[28px] font-extrabold tracking-tight",style:{color:I},children:ee}),s.jsx("p",{className:"m-0 text-sm font-semibold text-[#6b6560]",children:Fe}),s.jsx("div",{className:"mt-4 flex flex-wrap justify-center gap-1.5",children:U.map(z=>s.jsx("span",{className:"motion-chip rounded-full px-2.5 py-1 text-[12px] font-bold",style:{background:`color-mix(in srgb, ${I} 14%, var(--roast-card))`,color:`color-mix(in srgb, ${I} 72%, var(--roast-text))`},children:z},z))})]}),s.jsxs("section",{className:"space-y-4",children:[s.jsxs("div",{className:"motion-reveal motion-surface rounded-[18px] border border-black/[0.04] bg-[#fffcf7] p-5 shadow-[0_10px_30px_rgba(40,28,12,0.06)]",children:[s.jsxs("div",{className:"flex flex-wrap items-end justify-between gap-3",children:[s.jsxs("div",{children:[s.jsx("div",{className:"font-[JetBrains_Mono,ui-monospace,monospace] text-[42px] font-bold leading-none tracking-[0.08em]",children:f.type_code||f.archetype.code}),s.jsxs("div",{className:"mt-2 flex items-baseline gap-1.5 font-bold",style:{color:f.tier.color},children:[s.jsx("span",{className:"text-[12px]","aria-hidden":"true",children:f.tier.emoji}),s.jsxs("span",{className:"text-[17px] tabular-nums",children:[f.confidence,"%"]}),s.jsx("span",{className:"text-[11px] uppercase tracking-[0.06em]",children:d?"类型置信度":"TYPE CONFIDENCE"})]}),s.jsx("p",{className:"mt-1 mb-0 text-[13px] text-[#6b6560]",children:Me})]}),s.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 xl:grid-cols-5 gap-2 text-center",children:f.signals.map((z,W)=>s.jsxs("div",{className:"motion-stat min-w-0 rounded-xl bg-[#f3f1ec] px-2.5 py-2",style:{"--motion-delay":`${120+W*55}ms`},children:[s.jsx("div",{className:"text-[11px] font-semibold uppercase tracking-wide text-[#6b6560]",children:d?z.labelZh:z.label}),s.jsx("div",{className:"mt-1 break-words text-sm font-bold leading-tight tabular-nums",title:z.value,children:z.value})]},z.label))})]}),s.jsxs("div",{className:"mt-4 flex flex-wrap items-center gap-x-2 gap-y-1.5 text-xs font-semibold uppercase tracking-[0.08em] text-[#6b6560]",children:[s.jsxs("span",{children:[gm(a==null?void 0:a.range,d)," · ",u("profile.agentsFound",{count:v.active_source_count??((_=v.active_sources)==null?void 0:_.length)??0})]}),(v.active_sources||[]).length>0&&s.jsx("span",{className:"inline-flex items-center gap-1","aria-label":u("profile.detectedAgents"),children:v.active_sources.map(z=>s.jsx(bs,{agent:z,size:22,className:"ring-2 ring-[#fffcf7]"},z))})]})]}),s.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-[minmax(0,1.1fr)_minmax(0,0.9fr)] gap-4 min-w-0",children:[s.jsxs("div",{className:"motion-reveal motion-surface min-w-0 rounded-[18px] border border-black/[0.04] bg-[#fffcf7] p-4 shadow-[0_10px_30px_rgba(40,28,12,0.06)]",children:[s.jsxs("div",{className:"mb-2 flex items-center justify-between gap-2",children:[s.jsx("h2",{className:"m-0 text-sm font-extrabold tracking-wide uppercase text-[#6b6560]",children:u("profile.radar")}),s.jsx("span",{className:"text-[10px] font-bold uppercase tracking-[0.16em] text-[#8b8680]",children:u("profile.sixAxis")})]}),s.jsx(ym,{dimensions:f.dimensions,accent:I,zh:d,ariaLabel:u("profile.radarAria")})]}),s.jsxs("div",{className:"motion-reveal motion-surface min-w-0 rounded-[18px] border border-black/[0.04] bg-[#fffcf7] p-4 shadow-[0_10px_30px_rgba(40,28,12,0.06)]",style:{"--motion-delay":"70ms"},children:[s.jsx("h2",{className:"m-0 mb-3 text-sm font-extrabold tracking-wide uppercase text-[#6b6560]",children:u("profile.axes")}),s.jsx("div",{className:"space-y-2.5",children:(f.type_axes||[]).map((z,W)=>s.jsxs("div",{className:"min-w-0",children:[s.jsxs("div",{className:"mb-1 flex justify-between gap-2 text-xs font-bold",children:[s.jsxs("span",{style:{color:z.letter===z.left.code?I:void 0},children:[z.left.code," · ",d?z.left.labelZh:z.left.label," ",z.left.percent,"%"]}),s.jsxs("span",{style:{color:z.letter===z.right.code?I:void 0},children:[z.right.percent,"% ",z.right.code," · ",d?z.right.labelZh:z.right.label]})]}),s.jsxs("div",{className:"flex h-2 overflow-hidden rounded-full bg-[#e8e4db]",children:[s.jsx("div",{className:"motion-progress",style:{width:`${z.left.percent}%`,background:I,"--motion-delay":`${100+W*75}ms`}}),s.jsx("div",{className:"motion-progress bg-[#d6d0c6]",style:{width:`${z.right.percent}%`,"--motion-delay":`${140+W*75}ms`}})]})]},z.key))})]})]}),s.jsxs("div",{className:"motion-reveal motion-surface rounded-[18px] border border-black/[0.04] bg-[#fffcf7] p-5 shadow-[0_10px_30px_rgba(40,28,12,0.06)]",children:[s.jsx("h2",{className:"m-0 mb-3 text-sm font-extrabold tracking-wide uppercase text-[#6b6560]",children:u("profile.roast")}),s.jsx("p",{className:"m-0 text-[15px] leading-relaxed whitespace-pre-wrap",children:Se}),s.jsxs("p",{className:"mt-4 mb-0 rounded-xl bg-[#fff0e8] px-3 py-2 text-sm",children:[s.jsx("b",{children:u("profile.tldr")})," · ",ce]})]}),s.jsx("div",{className:"motion-reveal motion-surface rounded-[18px] border border-black/[0.06] bg-[#fffcf7] p-5 shadow-[0_10px_30px_rgba(40,28,12,0.06)] dark:border-white/[0.08]",children:s.jsx("div",{children:s.jsx(Tp,{prompts:(a==null?void 0:a.prompts)||[],activity:m,weeks:52,defaultPalette:"emerald",roastStyle:!0,showViewToggle:!0,defaultViewMode:"2d"})})}),s.jsx(Zp,{activity:m,wordCloudRecords:(a==null?void 0:a.word_cloud_records)||[]})]})]})]}),s.jsx(Mp,{open:E,previewUrl:G,accent:I,busy:g,nativeShareSupported:he,notice:ie,onClose:ye,onDownload:te,onNativeShare:Ne,onCopyCaption:H,t:u})]})}function ym({dimensions:a,accent:c,zh:u,ariaLabel:d}){const p=[.33,.66,1],y=a.map((E,w)=>{const G=-Math.PI/2+w*Math.PI*2/a.length,T=20+Math.min(1,Number(E.score||0))*72,P=122;return{...E,x:150+Math.cos(G)*T,y:150+Math.sin(G)*T,labelX:150+Math.cos(G)*P,labelY:150+Math.sin(G)*P,axisX:150+Math.cos(G)*92,axisY:150+Math.sin(G)*92}}),C=y.map(E=>`${E.x},${E.y}`).join(" ");return s.jsx("div",{className:"flex min-w-0 items-center justify-center overflow-visible py-2",children:s.jsxs("svg",{viewBox:"-28 -28 356 356",className:"h-auto w-full max-w-[340px] overflow-visible",role:"img","aria-label":d,children:[p.map(E=>{const w=a.map((G,O)=>{const T=-Math.PI/2+O*Math.PI*2/a.length;return`${150+Math.cos(T)*92*E},${150+Math.sin(T)*92*E}`}).join(" ");return s.jsx("polygon",{className:"radar-grid",points:w,fill:"none",stroke:"var(--radar-grid)",strokeWidth:"1"},E)}),y.map(E=>s.jsx("line",{className:"radar-grid",x1:150,y1:150,x2:E.axisX,y2:E.axisY,stroke:"var(--radar-grid)",strokeWidth:"1"},E.key)),s.jsx("polygon",{className:"radar-shape",points:C,fill:`${c}33`,stroke:c,strokeWidth:"2.5"}),y.map(E=>s.jsx("circle",{className:"radar-dot",cx:E.x,cy:E.y,r:"3.5",fill:c,stroke:"var(--roast-card)",strokeWidth:"1.5"},`${E.key}-dot`)),y.map(E=>{const w=E.labelX<144?"end":E.labelX>156?"start":"middle";return s.jsx("text",{x:E.labelX,y:E.labelY,textAnchor:w,dominantBaseline:"middle",fill:"var(--roast-muted)",fontSize:"10",fontWeight:"700",children:u?E.labelZh:E.label},`${E.key}-label`)})]})})}const oo=[{id:"deepseek",name:"DeepSeek",mark:"D",color:"#4d6bfe",model:"deepseek-v4-flash",baseUrl:"https://api.deepseek.com"},{id:"openai",name:"OpenAI",mark:"O",color:"#10a37f",model:"gpt-4.1-mini",baseUrl:"https://api.openai.com/v1"},{id:"anthropic",name:"Anthropic",mark:"A",color:"#d97757",model:"claude-haiku-4-5-20251001",baseUrl:"https://api.anthropic.com/v1"},{id:"gemini",name:"Gemini",mark:"G",color:"#4285f4",model:"gemini-2.5-flash",baseUrl:"https://generativelanguage.googleapis.com/v1beta"},{id:"groq",name:"Groq",mark:"Q",color:"#f55036",model:"llama-3.3-70b-versatile",baseUrl:"https://api.groq.com/openai/v1"},{id:"openrouter",name:"OpenRouter",mark:"R",color:"#7c3aed",model:"openai/gpt-4.1-mini",baseUrl:"https://openrouter.ai/api/v1"}];function km({provider:a,size:c="md"}){const u=c==="sm"?"h-7 w-7 text-[10px]":"h-9 w-9 text-xs";return s.jsx("span",{className:`${u} inline-flex shrink-0 items-center justify-center rounded-xl font-black text-white shadow-sm`,style:{background:a.color},"aria-hidden":"true",children:a.mark})}function Lc({icon:a,eyebrow:c,title:u,description:d,onClick:f,accent:v="#171717"}){return s.jsxs("button",{type:"button",onClick:f,className:"roast-access-choice motion-button group relative min-h-[148px] overflow-hidden rounded-[16px] border border-black/[0.07] bg-[#f7f4ef] p-4 text-left hover:border-black/[0.16] dark:border-white/[0.08] dark:bg-white/[0.035] dark:hover:border-white/[0.18]",children:[s.jsx("span",{className:"mb-5 inline-flex h-9 w-9 items-center justify-center rounded-[11px] text-white",style:{background:v},children:a}),s.jsx("span",{className:"block text-[10px] font-bold uppercase tracking-[0.14em] text-[#8b8680] dark:text-[#8f8f8f]",children:c}),s.jsxs("span",{className:"mt-1 flex items-center justify-between gap-4 text-[16px] font-extrabold text-[#1a1a1a] dark:text-white",children:[u,s.jsx(Fc,{size:16,className:"opacity-35 transition-transform group-hover:translate-x-1 group-hover:opacity-80"})]}),s.jsx("span",{className:"mt-1.5 block max-w-[310px] text-[13px] leading-5 text-[#716b65] dark:text-[#aaa49e]",children:d})]})}function wm({open:a,onGenerate:c,onLocal:u}){const{t:d}=Xn(),[f,v]=M.useState("choose"),[m,g]=M.useState("deepseek"),[p,y]=M.useState(""),[C,E]=M.useState(oo[0].model),[w,G]=M.useState(oo[0].baseUrl),[O,T]=M.useState(!1),[P,ie]=M.useState(!1),[ue,F]=M.useState(""),[Q,U]=M.useState(!1),[I,he]=M.useState(null),Se=M.useMemo(()=>oo.find(te=>te.id===m)||oo[0],[m]);if(M.useEffect(()=>{if(!a)return;Promise.all([fetch("/api/ai/providers").then(ye=>ye.json()),fetch("/api/auth/github/session").then(ye=>ye.json())]).then(([ye,Pe])=>{var Ne;U(!!((Ne=ye==null?void 0:ye.github)!=null&&Ne.configured)),(Pe==null?void 0:Pe.status)==="connected"&&he(Pe.user)}).catch(()=>U(!1));const te=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=te}},[a]),M.useEffect(()=>{if(!a)return;async function te(ye){var Pe;if(!(ye.origin!==window.location.origin||((Pe=ye.data)==null?void 0:Pe.type)!=="vibe-wrapper:github-auth")){if(ye.data.status!=="connected"){F(ye.data.error||d("roastAccess.githubFailed")),ie(!1);return}try{const Ne=await fetch("/api/auth/github/session"),H=await Ne.json();if(!Ne.ok||H.status!=="connected")throw new Error(H.error||d("roastAccess.githubFailed"));he(H.user||{login:"GitHub"}),F("")}catch(Ne){F(Ne.message)}finally{ie(!1)}}}return window.addEventListener("message",te),()=>window.removeEventListener("message",te)},[a,d]),!a)return null;function ce(te){g(te.id),E(te.model),G(te.baseUrl),F("")}async function Me(te){if(te.preventDefault(),!p.trim()){F(d("roastAccess.keyRequired"));return}ie(!0),F("");try{await c({provider:Se.id,apiKey:p.trim(),model:C.trim(),baseUrl:w.trim()})}catch(ye){F(ye.message)}finally{ie(!1)}}function Fe(){if(v("github"),F(""),I)return;if(!window.open("/api/auth/github/start","vibe-wrapper-github-auth","popup,width=720,height=760")){F(d("roastAccess.popupBlocked"));return}ie(!0)}async function ee(){await fetch("/api/auth/github/session",{method:"DELETE"}),he(null),F("")}async function je(){ie(!0),F("");try{await c({mode:"hosted",provider:"cloudflare"})}catch(te){F(te.message)}finally{ie(!1)}}return s.jsx("div",{className:"fixed inset-0 z-[100] flex items-end justify-center bg-[#201b17]/30 p-0 sm:items-center sm:p-5 dark:bg-black/55",children:s.jsx("section",{role:"dialog","aria-modal":"true","aria-labelledby":"roast-access-title",className:"roast-access-modal animate-tt-modal relative max-h-[96vh] w-full max-w-[720px] overflow-x-hidden overflow-y-auto rounded-t-[22px] border border-black/[0.07] bg-[#fffcf7] text-[#1a1a1a] shadow-[0_24px_70px_rgba(45,30,18,0.22)] dark:border-white/[0.08] dark:bg-[#171717] dark:text-white sm:max-h-[92vh] sm:rounded-[22px]",children:s.jsxs("div",{className:"relative px-5 pb-5 pt-6 sm:px-7 sm:pb-7 sm:pt-7",children:[f!=="choose"&&s.jsxs("button",{type:"button",onClick:()=>{v("choose"),F(""),ie(!1)},className:"motion-button mb-5 inline-flex items-center gap-1.5 rounded-lg px-2 py-1 text-[11px] font-bold text-[#77716b] hover:bg-black/[0.05] dark:text-[#aaa49e] dark:hover:bg-white/[0.06]",children:[s.jsx(sp,{size:13}),d("roastAccess.back")]}),s.jsxs("header",{className:f==="choose"?"mb-6":"mb-5",children:[s.jsxs("div",{className:"mb-2.5 flex items-center gap-2 text-[10px] font-bold uppercase tracking-[0.16em] text-[#ff5a1f]",children:[s.jsx(gc,{size:13}),d("roastAccess.kicker")]}),s.jsxs("h2",{id:"roast-access-title",className:"max-w-[590px] text-[27px] font-extrabold leading-[1.08] tracking-[-0.025em] sm:text-[32px]",children:[f==="choose"&&d("roastAccess.title"),f==="api"&&d("roastAccess.apiTitle"),f==="github"&&d("roastAccess.githubTitle")]}),s.jsxs("p",{className:"mt-2.5 max-w-[590px] text-[13px] leading-5 text-[#716b65] dark:text-[#aaa49e]",children:[f==="choose"&&d("roastAccess.subtitle"),f==="api"&&d("roastAccess.apiSubtitle"),f==="github"&&d("roastAccess.githubSubtitle")]})]}),f==="choose"&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[s.jsx(Lc,{icon:s.jsx(dp,{size:18}),eyebrow:d("roastAccess.ownKey"),title:d("roastAccess.apiChoice"),description:d("roastAccess.apiDescription"),accent:"#ff5a1f",onClick:()=>v("api")}),s.jsx(Lc,{icon:s.jsx(xl,{size:19}),eyebrow:d("roastAccess.freeTier"),title:I?`@${I.login}`:d("roastAccess.githubChoice"),description:d(I?"roastAccess.githubSignedInDescription":"roastAccess.githubDescription"),accent:"#171717",onClick:()=>{v("github"),F("")}})]}),s.jsxs("div",{className:"mt-5 flex flex-col items-center justify-between gap-3 border-t border-black/[0.07] pt-5 sm:flex-row dark:border-white/[0.08]",children:[s.jsxs("div",{className:"flex items-center gap-2 text-[11px] text-[#807a74] dark:text-[#99938d]",children:[s.jsx(hc,{size:14,className:"text-[#0ba875]"}),d("roastAccess.privacy")]}),s.jsx("button",{type:"button",onClick:u,className:"motion-button rounded-lg px-3 py-2 text-[11px] font-bold text-[#77716b] hover:bg-black/[0.05] dark:text-[#aaa49e] dark:hover:bg-white/[0.06]",children:d("roastAccess.local")})]})]}),f==="api"&&s.jsxs("form",{onSubmit:Me,children:[s.jsx("div",{className:"grid grid-cols-2 gap-2 sm:grid-cols-3",children:oo.map(te=>{const ye=te.id===Se.id;return s.jsxs("button",{type:"button",onClick:()=>ce(te),className:`motion-button flex min-w-0 items-center gap-2 rounded-[15px] border p-2.5 text-left ${ye?"border-black/[0.16] bg-white shadow-sm dark:border-white/[0.2] dark:bg-white/[0.08]":"border-black/[0.06] bg-white/40 hover:bg-white dark:border-white/[0.07] dark:bg-white/[0.025] dark:hover:bg-white/[0.05]"}`,children:[s.jsx(km,{provider:te,size:"sm"}),s.jsx("span",{className:"min-w-0 truncate text-[11px] font-black",children:te.name}),ye&&s.jsx(Uc,{size:12,className:"ml-auto shrink-0 text-[#0ba875]"})]},te.id)})}),s.jsxs("label",{className:"mt-5 block",children:[s.jsxs("span",{className:"mb-2 flex items-center justify-between text-[10px] font-black uppercase tracking-[0.14em] text-[#77716b] dark:text-[#aaa49e]",children:["API Key",s.jsx("span",{className:"normal-case tracking-normal text-[#aaa49e]",children:d("roastAccess.sessionOnly")})]}),s.jsxs("div",{className:"flex items-center rounded-[15px] border border-black/[0.09] bg-white px-3 dark:border-white/[0.1] dark:bg-black/20",children:[s.jsx(fp,{size:14,className:"shrink-0 text-[#aaa49e]"}),s.jsx("input",{type:"password",value:p,onChange:te=>y(te.target.value),placeholder:d("roastAccess.keyPlaceholder",{provider:Se.name}),autoComplete:"off",spellCheck:"false",className:"h-12 min-w-0 flex-1 bg-transparent px-3 text-sm font-medium outline-none placeholder:text-[#bbb5ae] dark:placeholder:text-[#686868]"})]})]}),s.jsxs("label",{className:"mt-3 block",children:[s.jsx("span",{className:"mb-2 block text-[10px] font-black uppercase tracking-[0.14em] text-[#77716b] dark:text-[#aaa49e]",children:d("roastAccess.model")}),s.jsx("input",{type:"text",value:C,onChange:te=>E(te.target.value),className:"h-12 w-full rounded-[15px] border border-black/[0.09] bg-white px-4 text-sm font-semibold outline-none focus:border-black/[0.22] dark:border-white/[0.1] dark:bg-black/20 dark:focus:border-white/[0.25]"})]}),s.jsxs("button",{type:"button",onClick:()=>T(te=>!te),className:"mt-3 inline-flex items-center gap-1.5 text-[11px] font-bold text-[#817b75] dark:text-[#99938d]",children:[s.jsx(Hc,{size:13,className:`transition-transform ${O?"rotate-180":""}`}),d("roastAccess.advanced")]}),O&&s.jsxs("label",{className:"mt-2 block",children:[s.jsx("span",{className:"mb-2 block text-[10px] font-black uppercase tracking-[0.14em] text-[#77716b] dark:text-[#aaa49e]",children:"Base URL"}),s.jsx("input",{type:"url",value:w,onChange:te=>G(te.target.value),className:"h-11 w-full rounded-[14px] border border-black/[0.09] bg-white px-4 text-xs outline-none dark:border-white/[0.1] dark:bg-black/20"})]}),ue&&s.jsx("p",{className:"mt-3 rounded-xl bg-red-500/[0.08] px-3 py-2 text-xs font-semibold text-red-600 dark:text-red-400",children:ue}),s.jsxs("button",{type:"submit",disabled:P,className:"motion-button mt-5 inline-flex h-12 w-full items-center justify-center gap-2 rounded-[15px] bg-[#ff5a1f] text-sm font-black text-white shadow-[0_12px_25px_rgba(255,90,31,0.22)] disabled:opacity-55",children:[d(P?"roastAccess.generating":"roastAccess.generate"),!P&&s.jsx(Fc,{size:15})]})]}),f==="github"&&s.jsxs("div",{children:[s.jsx("div",{className:"rounded-[20px] border border-black/[0.07] bg-white/70 p-5 dark:border-white/[0.08] dark:bg-white/[0.035]",children:I?s.jsxs("div",{className:"flex flex-col items-center text-center",children:[I.avatarUrl?s.jsx("img",{src:I.avatarUrl,alt:"",className:"h-12 w-12 rounded-full"}):s.jsx("span",{className:"flex h-12 w-12 items-center justify-center rounded-full bg-[#171717] text-white",children:s.jsx(xl,{size:20})}),s.jsxs("p",{className:"mt-3 text-sm font-black",children:["@",I.login]}),s.jsx("p",{className:"mt-1 text-xs text-[#817b75] dark:text-[#99938d]",children:d("roastAccess.githubConnected")}),ue&&s.jsx("p",{className:"mt-3 w-full rounded-xl bg-red-500/[0.08] px-3 py-2 text-left text-xs font-semibold leading-5 text-red-600 dark:text-red-400",children:ue}),s.jsxs("button",{type:"button",onClick:je,disabled:P,className:"motion-button mt-5 inline-flex h-12 w-full items-center justify-center gap-2 rounded-[15px] bg-[#171717] text-sm font-black text-white disabled:opacity-55 dark:bg-white dark:text-[#171717]",children:[d(P?"roastAccess.generating":"roastAccess.generateFree"),!P&&s.jsx(gc,{size:15})]}),s.jsx("button",{type:"button",onClick:()=>v("api"),disabled:P,className:"mt-3 text-[11px] font-bold text-[#817b75] underline-offset-4 hover:underline disabled:opacity-50 dark:text-[#99938d]",children:d("roastAccess.chooseProvider")}),s.jsx("button",{type:"button",onClick:ee,className:"mt-3 text-[11px] font-bold text-[#817b75] underline-offset-4 hover:underline dark:text-[#99938d]",children:d("roastAccess.signOut")})]}):s.jsxs("div",{className:"flex min-h-[130px] flex-col items-center justify-center text-center",children:[s.jsx(xl,{size:28,className:"mb-3"}),s.jsx("p",{className:"max-w-sm text-sm font-bold",children:d(Q?"roastAccess.githubOneClick":"roastAccess.githubUnavailable")}),ue&&s.jsx("p",{className:"mt-2 max-w-md text-xs leading-5 text-red-600 dark:text-red-400",children:ue}),!P&&s.jsxs("button",{type:"button",onClick:Fe,className:"motion-button mt-4 inline-flex h-12 min-w-[230px] items-center justify-center gap-2 rounded-[14px] bg-[#171717] px-5 text-sm font-black text-white shadow-[0_12px_25px_rgba(0,0,0,0.14)] dark:bg-white dark:text-[#171717]",children:[s.jsx(xl,{size:17}),d("roastAccess.continueGithub")]}),P&&s.jsx("p",{className:"mt-4 text-xs text-[#817b75] dark:text-[#99938d]",children:d("roastAccess.waiting")})]})}),s.jsxs("div",{className:"mt-4 flex items-start gap-2 text-[11px] leading-5 text-[#817b75] dark:text-[#99938d]",children:[s.jsx(hc,{size:14,className:"mt-0.5 shrink-0 text-[#0ba875]"}),d("roastAccess.githubPrivacy")]})]})]})})})}function Sm(a={}){const[c,u]=M.useState(null),[d,f]=M.useState(!0),[v,m]=M.useState(null);return M.useEffect(()=>{let g=!1;async function p(){f(!0),m(null);try{const y=new URLSearchParams;a.from&&y.set("from",a.from),a.to&&y.set("to",a.to);const C=y.toString(),E=await fetch(`/api/inspect${C?`?${C}`:""}`);if(!E.ok)throw new Error(`HTTP ${E.status}`);const w=await E.json();g||u(w)}catch(y){g||m(y.message)}finally{g||f(!1)}}return p(),()=>{g=!0}},[a.from,a.to]),{data:c,loading:d,error:v}}function Cm(a,c={},u=new Date){return{label:"All time"}}function jm(){const{t:a}=Xn(),[c,u]=M.useState(null),[d,f]=M.useState(!0),v=M.useRef(!1),m=Cm("total",{}),{data:g,loading:p,error:y}=Sm(m);M.useEffect(()=>{g&&u(g)},[g]);async function C(E){const w=new AbortController,G=window.setTimeout(()=>w.abort(),45e3);try{const O=await fetch("/api/roast",{method:"POST",headers:{"Content-Type":"application/json"},signal:w.signal,body:JSON.stringify({...E,evidence:c==null?void 0:c.roast_evidence})}),T=await O.json().catch(()=>({}));if(!O.ok){const P=(T==null?void 0:T.error)||`HTTP ${O.status}`;throw new Error(P)}if(!(T!=null&&T.generated))throw new Error("The roast writer returned no result.");u(P=>({...P,vibe_profile:{...P==null?void 0:P.vibe_profile,...T.generated,roast_source:"ai"}})),f(!1)}catch(O){throw(O==null?void 0:O.name)==="AbortError"?new Error("Roast generation timed out. Try again or use the local roast."):O}finally{window.clearTimeout(G)}}return M.useEffect(()=>{if(!(c!=null&&c.roast_evidence)||v.current)return;v.current=!0;let E=!0;return fetch("/api/auth/github/session").then(w=>w.json()).then(w=>E&&(w==null?void 0:w.status)==="connected"?C({mode:"hosted",provider:"cloudflare"}):null).catch(()=>{}),()=>{E=!1}},[c==null?void 0:c.roast_evidence]),s.jsx("div",{className:"min-h-screen bg-[#f3f1ec] text-[#171717] transition-colors dark:bg-[#0a0a0a] dark:text-[#fafafa]",children:s.jsx("main",{children:p&&!c?s.jsxs("div",{className:"min-h-screen flex flex-col items-center justify-center gap-3 px-6",children:[s.jsx("p",{className:"roast-brand text-[44px] leading-none text-[#1a1a1a] dark:text-[#fafafa]",children:a("app.brand")}),s.jsx("p",{className:"text-[#6b6560] text-sm font-medium dark:text-[#a3a3a3]",children:a("app.loading")})]}):y&&!c?s.jsxs("div",{className:"min-h-screen flex flex-col items-center justify-center gap-3 px-6 text-center",children:[s.jsx("p",{className:"roast-brand text-[44px] leading-none text-[#1a1a1a] dark:text-[#fafafa]",children:a("app.brand")}),s.jsx("p",{className:"text-[#e24b4b] text-sm font-medium max-w-md",children:y})]}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:d?"pointer-events-none select-none blur-[3px]":"","aria-hidden":d,children:s.jsx(vm,{data:c})}),s.jsx(wm,{open:d,onGenerate:C,onLocal:()=>f(!1)})]})})})}function bm(){return s.jsx(ep,{children:s.jsx(rp,{children:s.jsx(jm,{})})})}Jf.createRoot(document.getElementById("root")).render(s.jsx(Yf.StrictMode,{children:s.jsx(bm,{})}));