@faithfulalabi/agent-lens 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +124 -0
  3. package/bin/agent-lens.js +40 -0
  4. package/bin/package.json +4 -0
  5. package/dist/src/archive/cron-log.js +41 -0
  6. package/dist/src/archive/discover.js +89 -0
  7. package/dist/src/archive/index.js +7 -0
  8. package/dist/src/archive/lock.js +119 -0
  9. package/dist/src/archive/log.js +15 -0
  10. package/dist/src/archive/mirror.js +366 -0
  11. package/dist/src/archive/paths.js +159 -0
  12. package/dist/src/archive/read.js +133 -0
  13. package/dist/src/archive/report.js +272 -0
  14. package/dist/src/archive/seal.js +76 -0
  15. package/dist/src/archive/sidecar.js +39 -0
  16. package/dist/src/cli/args.js +47 -0
  17. package/dist/src/cli/commands/archive.js +65 -0
  18. package/dist/src/cli/commands/doctor.js +191 -0
  19. package/dist/src/cli/commands/prune.js +159 -0
  20. package/dist/src/cli/commands/rebuild.js +98 -0
  21. package/dist/src/cli/commands/schedule.js +325 -0
  22. package/dist/src/cli/commands/start.js +83 -0
  23. package/dist/src/cli/commands/warm.js +96 -0
  24. package/dist/src/cli/index.js +102 -0
  25. package/dist/src/content/resolve.js +163 -0
  26. package/dist/src/corpus/env.js +32 -0
  27. package/dist/src/corpus/paths.js +70 -0
  28. package/dist/src/corpus/scan.js +85 -0
  29. package/dist/src/corpus/watch.js +189 -0
  30. package/dist/src/db/freshness.js +82 -0
  31. package/dist/src/db/open.js +74 -0
  32. package/dist/src/db/read.js +266 -0
  33. package/dist/src/db/schema.js +312 -0
  34. package/dist/src/db/sidecars.js +216 -0
  35. package/dist/src/db/spill-index.js +68 -0
  36. package/dist/src/db/write.js +279 -0
  37. package/dist/src/project/pipeline.js +307 -0
  38. package/dist/src/project/subagents.js +41 -0
  39. package/dist/src/project/tools.js +94 -0
  40. package/dist/src/server/api.js +249 -0
  41. package/dist/src/server/app.js +28 -0
  42. package/dist/src/server/config.js +24 -0
  43. package/dist/src/server/drift-report.js +35 -0
  44. package/dist/src/server/index.js +1 -0
  45. package/dist/src/server/live.js +109 -0
  46. package/dist/src/server/middleware/host-guard.js +42 -0
  47. package/dist/src/server/middleware/token-auth.js +19 -0
  48. package/dist/src/server/start.js +150 -0
  49. package/dist/src/server/static-ui.js +97 -0
  50. package/dist/src/server/stream.js +50 -0
  51. package/dist/src/server/warm.js +48 -0
  52. package/dist/src/shared/api.js +1 -0
  53. package/dist/src/shared/entities.js +1 -0
  54. package/dist/src/shared/index.js +2 -0
  55. package/dist/src/shared/pricing.js +68 -0
  56. package/dist/src/shared/token.js +39 -0
  57. package/dist/src/transcript/accessors.js +28 -0
  58. package/dist/src/transcript/agents.js +44 -0
  59. package/dist/src/transcript/blocks.js +75 -0
  60. package/dist/src/transcript/drift.js +42 -0
  61. package/dist/src/transcript/human.js +65 -0
  62. package/dist/src/transcript/line.js +251 -0
  63. package/dist/src/transcript/raw-types.js +1 -0
  64. package/dist/src/transcript/spill.js +122 -0
  65. package/dist/src/transcript/usage.js +63 -0
  66. package/dist/src/transcript/version.js +1 -0
  67. package/package.json +70 -0
  68. package/ui/dist/assets/index-CKKoKUCq.js +254 -0
  69. package/ui/dist/assets/index-Chza4fL6.css +1 -0
  70. package/ui/dist/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2 +0 -0
  71. package/ui/dist/assets/inter-latin-wght-normal-Dx4kXJAl.woff2 +0 -0
  72. package/ui/dist/assets/jetbrains-mono-latin-400-normal-V6pRDFza.woff2 +0 -0
  73. package/ui/dist/assets/jetbrains-mono-latin-500-normal-BWZEU5yA.woff2 +0 -0
  74. package/ui/dist/assets/jetbrains-mono-latin-ext-400-normal-Bc8Ftmh3.woff2 +0 -0
  75. package/ui/dist/assets/jetbrains-mono-latin-ext-500-normal-Cut-4mMH.woff2 +0 -0
  76. package/ui/dist/index.html +21 -0
@@ -0,0 +1,254 @@
1
+ var mx=Object.defineProperty;var gx=(e,t,n)=>t in e?mx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var qi=(e,t,n)=>gx(e,typeof t!="symbol"?t+"":t,n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const l of i)if(l.type==="childList")for(const o of l.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const l={};return i.integrity&&(l.integrity=i.integrity),i.referrerPolicy&&(l.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?l.credentials="include":i.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(i){if(i.ep)return;i.ep=!0;const l=n(i);fetch(i.href,l)}})();var jl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Gf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Yf={exports:{}},ao={},Xf={exports:{}},ee={};/**
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 Di=Symbol.for("react.element"),xx=Symbol.for("react.portal"),yx=Symbol.for("react.fragment"),kx=Symbol.for("react.strict_mode"),vx=Symbol.for("react.profiler"),wx=Symbol.for("react.provider"),Sx=Symbol.for("react.context"),bx=Symbol.for("react.forward_ref"),Cx=Symbol.for("react.suspense"),Ex=Symbol.for("react.memo"),_x=Symbol.for("react.lazy"),cc=Symbol.iterator;function Ix(e){return e===null||typeof e!="object"?null:(e=cc&&e[cc]||e["@@iterator"],typeof e=="function"?e:null)}var Jf={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Zf=Object.assign,ep={};function jr(e,t,n){this.props=e,this.context=t,this.refs=ep,this.updater=n||Jf}jr.prototype.isReactComponent={};jr.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};jr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function tp(){}tp.prototype=jr.prototype;function $a(e,t,n){this.props=e,this.context=t,this.refs=ep,this.updater=n||Jf}var Va=$a.prototype=new tp;Va.constructor=$a;Zf(Va,jr.prototype);Va.isPureReactComponent=!0;var dc=Array.isArray,np=Object.prototype.hasOwnProperty,Ba={current:null},rp={key:!0,ref:!0,__self:!0,__source:!0};function ip(e,t,n){var r,i={},l=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(l=""+t.key),t)np.call(t,r)&&!rp.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1<s){for(var a=Array(s),u=0;u<s;u++)a[u]=arguments[u+2];i.children=a}if(e&&e.defaultProps)for(r in s=e.defaultProps,s)i[r]===void 0&&(i[r]=s[r]);return{$$typeof:Di,type:e,key:l,ref:o,props:i,_owner:Ba.current}}function Nx(e,t){return{$$typeof:Di,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Ua(e){return typeof e=="object"&&e!==null&&e.$$typeof===Di}function Tx(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var fc=/\/+/g;function Lo(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Tx(""+e.key):t.toString(36)}function gl(e,t,n,r,i){var l=typeof e;(l==="undefined"||l==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(l){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case Di:case xx:o=!0}}if(o)return o=e,i=i(o),e=r===""?"."+Lo(o,0):r,dc(i)?(n="",e!=null&&(n=e.replace(fc,"$&/")+"/"),gl(i,t,n,"",function(u){return u})):i!=null&&(Ua(i)&&(i=Nx(i,n+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(fc,"$&/")+"/")+e)),t.push(i)),1;if(o=0,r=r===""?".":r+":",dc(e))for(var s=0;s<e.length;s++){l=e[s];var a=r+Lo(l,s);o+=gl(l,t,n,a,i)}else if(a=Ix(e),typeof a=="function")for(e=a.call(e),s=0;!(l=e.next()).done;)l=l.value,a=r+Lo(l,s++),o+=gl(l,t,n,a,i);else if(l==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function Ki(e,t,n){if(e==null)return e;var r=[],i=0;return gl(e,r,"","",function(l){return t.call(n,l,i++)}),r}function zx(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Ke={current:null},xl={transition:null},jx={ReactCurrentDispatcher:Ke,ReactCurrentBatchConfig:xl,ReactCurrentOwner:Ba};function lp(){throw Error("act(...) is not supported in production builds of React.")}ee.Children={map:Ki,forEach:function(e,t,n){Ki(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Ki(e,function(){t++}),t},toArray:function(e){return Ki(e,function(t){return t})||[]},only:function(e){if(!Ua(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ee.Component=jr;ee.Fragment=yx;ee.Profiler=vx;ee.PureComponent=$a;ee.StrictMode=kx;ee.Suspense=Cx;ee.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=jx;ee.act=lp;ee.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Zf({},e.props),i=e.key,l=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(l=t.ref,o=Ba.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(a in t)np.call(t,a)&&!rp.hasOwnProperty(a)&&(r[a]=t[a]===void 0&&s!==void 0?s[a]:t[a])}var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){s=Array(a);for(var u=0;u<a;u++)s[u]=arguments[u+2];r.children=s}return{$$typeof:Di,type:e.type,key:i,ref:l,props:r,_owner:o}};ee.createContext=function(e){return e={$$typeof:Sx,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:wx,_context:e},e.Consumer=e};ee.createElement=ip;ee.createFactory=function(e){var t=ip.bind(null,e);return t.type=e,t};ee.createRef=function(){return{current:null}};ee.forwardRef=function(e){return{$$typeof:bx,render:e}};ee.isValidElement=Ua;ee.lazy=function(e){return{$$typeof:_x,_payload:{_status:-1,_result:e},_init:zx}};ee.memo=function(e,t){return{$$typeof:Ex,type:e,compare:t===void 0?null:t}};ee.startTransition=function(e){var t=xl.transition;xl.transition={};try{e()}finally{xl.transition=t}};ee.unstable_act=lp;ee.useCallback=function(e,t){return Ke.current.useCallback(e,t)};ee.useContext=function(e){return Ke.current.useContext(e)};ee.useDebugValue=function(){};ee.useDeferredValue=function(e){return Ke.current.useDeferredValue(e)};ee.useEffect=function(e,t){return Ke.current.useEffect(e,t)};ee.useId=function(){return Ke.current.useId()};ee.useImperativeHandle=function(e,t,n){return Ke.current.useImperativeHandle(e,t,n)};ee.useInsertionEffect=function(e,t){return Ke.current.useInsertionEffect(e,t)};ee.useLayoutEffect=function(e,t){return Ke.current.useLayoutEffect(e,t)};ee.useMemo=function(e,t){return Ke.current.useMemo(e,t)};ee.useReducer=function(e,t,n){return Ke.current.useReducer(e,t,n)};ee.useRef=function(e){return Ke.current.useRef(e)};ee.useState=function(e){return Ke.current.useState(e)};ee.useSyncExternalStore=function(e,t,n){return Ke.current.useSyncExternalStore(e,t,n)};ee.useTransition=function(){return Ke.current.useTransition()};ee.version="18.3.1";Xf.exports=ee;var M=Xf.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 Px=M,Ax=Symbol.for("react.element"),Lx=Symbol.for("react.fragment"),Mx=Object.prototype.hasOwnProperty,Rx=Px.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Ox={key:!0,ref:!0,__self:!0,__source:!0};function op(e,t,n){var r,i={},l=null,o=null;n!==void 0&&(l=""+n),t.key!==void 0&&(l=""+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)Mx.call(t,r)&&!Ox.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:Ax,type:e,key:l,ref:o,props:i,_owner:Rx.current}}ao.Fragment=Lx;ao.jsx=op;ao.jsxs=op;Yf.exports=ao;var m=Yf.exports,sp={exports:{}},ct={},ap={exports:{}},up={};/**
18
+ * @license React
19
+ * scheduler.production.min.js
20
+ *
21
+ * Copyright (c) Facebook, Inc. and its affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */(function(e){function t(L,V){var y=L.length;L.push(V);e:for(;0<y;){var J=y-1>>>1,ie=L[J];if(0<i(ie,V))L[J]=V,L[y]=ie,y=J;else break e}}function n(L){return L.length===0?null:L[0]}function r(L){if(L.length===0)return null;var V=L[0],y=L.pop();if(y!==V){L[0]=y;e:for(var J=0,ie=L.length,w=ie>>>1;J<w;){var pe=2*(J+1)-1,oe=L[pe],K=pe+1,Ae=L[K];if(0>i(oe,y))K<ie&&0>i(Ae,oe)?(L[J]=Ae,L[K]=y,J=K):(L[J]=oe,L[pe]=y,J=pe);else if(K<ie&&0>i(Ae,y))L[J]=Ae,L[K]=y,J=K;else break e}}return V}function i(L,V){var y=L.sortIndex-V.sortIndex;return y!==0?y:L.id-V.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var a=[],u=[],d=1,c=null,f=3,p=!1,x=!1,v=!1,E=typeof setTimeout=="function"?setTimeout:null,h=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function k(L){for(var V=n(u);V!==null;){if(V.callback===null)r(u);else if(V.startTime<=L)r(u),V.sortIndex=V.expirationTime,t(a,V);else break;V=n(u)}}function C(L){if(v=!1,k(L),!x)if(n(a)!==null)x=!0,X(N);else{var V=n(u);V!==null&&re(C,V.startTime-L)}}function N(L,V){x=!1,v&&(v=!1,h(_),_=-1),p=!0;var y=f;try{for(k(V),c=n(a);c!==null&&(!(c.expirationTime>V)||L&&!j());){var J=c.callback;if(typeof J=="function"){c.callback=null,f=c.priorityLevel;var ie=J(c.expirationTime<=V);V=e.unstable_now(),typeof ie=="function"?c.callback=ie:c===n(a)&&r(a),k(V)}else r(a);c=n(a)}if(c!==null)var w=!0;else{var pe=n(u);pe!==null&&re(C,pe.startTime-V),w=!1}return w}finally{c=null,f=y,p=!1}}var b=!1,I=null,_=-1,z=5,S=-1;function j(){return!(e.unstable_now()-S<z)}function O(){if(I!==null){var L=e.unstable_now();S=L;var V=!0;try{V=I(!0,L)}finally{V?U():(b=!1,I=null)}}else b=!1}var U;if(typeof g=="function")U=function(){g(O)};else if(typeof MessageChannel<"u"){var G=new MessageChannel,W=G.port2;G.port1.onmessage=O,U=function(){W.postMessage(null)}}else U=function(){E(O,0)};function X(L){I=L,b||(b=!0,U())}function re(L,V){_=E(function(){L(e.unstable_now())},V)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(L){L.callback=null},e.unstable_continueExecution=function(){x||p||(x=!0,X(N))},e.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):z=0<L?Math.floor(1e3/L):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(a)},e.unstable_next=function(L){switch(f){case 1:case 2:case 3:var V=3;break;default:V=f}var y=f;f=V;try{return L()}finally{f=y}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(L,V){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var y=f;f=L;try{return V()}finally{f=y}},e.unstable_scheduleCallback=function(L,V,y){var J=e.unstable_now();switch(typeof y=="object"&&y!==null?(y=y.delay,y=typeof y=="number"&&0<y?J+y:J):y=J,L){case 1:var ie=-1;break;case 2:ie=250;break;case 5:ie=1073741823;break;case 4:ie=1e4;break;default:ie=5e3}return ie=y+ie,L={id:d++,callback:V,priorityLevel:L,startTime:y,expirationTime:ie,sortIndex:-1},y>J?(L.sortIndex=y,t(u,L),n(a)===null&&L===n(u)&&(v?(h(_),_=-1):v=!0,re(C,y-J))):(L.sortIndex=ie,t(a,L),x||p||(x=!0,X(N))),L},e.unstable_shouldYield=j,e.unstable_wrapCallback=function(L){var V=f;return function(){var y=f;f=V;try{return L.apply(this,arguments)}finally{f=y}}}})(up);ap.exports=up;var Dx=ap.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 Fx=M,ut=Dx;function P(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 cp=new Set,gi={};function Xn(e,t){br(e,t),br(e+"Capture",t)}function br(e,t){for(gi[e]=t,e=0;e<t.length;e++)cp.add(t[e])}var Gt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),As=Object.prototype.hasOwnProperty,$x=/^[: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]*$/,pc={},hc={};function Vx(e){return As.call(hc,e)?!0:As.call(pc,e)?!1:$x.test(e)?hc[e]=!0:(pc[e]=!0,!1)}function Bx(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 Ux(e,t,n,r){if(t===null||typeof t>"u"||Bx(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 Qe(e,t,n,r,i,l,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=l,this.removeEmptyString=o}var Oe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Oe[e]=new Qe(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Oe[t]=new Qe(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Oe[e]=new Qe(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Oe[e]=new Qe(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){Oe[e]=new Qe(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Oe[e]=new Qe(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Oe[e]=new Qe(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Oe[e]=new Qe(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Oe[e]=new Qe(e,5,!1,e.toLowerCase(),null,!1,!1)});var Ha=/[\-:]([a-z])/g;function Wa(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(Ha,Wa);Oe[t]=new Qe(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(Ha,Wa);Oe[t]=new Qe(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(Ha,Wa);Oe[t]=new Qe(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Oe[e]=new Qe(e,1,!1,e.toLowerCase(),null,!1,!1)});Oe.xlinkHref=new Qe("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Oe[e]=new Qe(e,1,!1,e.toLowerCase(),null,!0,!0)});function qa(e,t,n,r){var i=Oe.hasOwnProperty(t)?Oe[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Ux(t,n,i,r)&&(n=null),r||i===null?Vx(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Zt=Fx.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Qi=Symbol.for("react.element"),lr=Symbol.for("react.portal"),or=Symbol.for("react.fragment"),Ka=Symbol.for("react.strict_mode"),Ls=Symbol.for("react.profiler"),dp=Symbol.for("react.provider"),fp=Symbol.for("react.context"),Qa=Symbol.for("react.forward_ref"),Ms=Symbol.for("react.suspense"),Rs=Symbol.for("react.suspense_list"),Ga=Symbol.for("react.memo"),sn=Symbol.for("react.lazy"),pp=Symbol.for("react.offscreen"),mc=Symbol.iterator;function $r(e){return e===null||typeof e!="object"?null:(e=mc&&e[mc]||e["@@iterator"],typeof e=="function"?e:null)}var we=Object.assign,Mo;function Zr(e){if(Mo===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Mo=t&&t[1]||""}return`
34
+ `+Mo+e}var Ro=!1;function Oo(e,t){if(!e||Ro)return"";Ro=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var i=u.stack.split(`
35
+ `),l=r.stack.split(`
36
+ `),o=i.length-1,s=l.length-1;1<=o&&0<=s&&i[o]!==l[s];)s--;for(;1<=o&&0<=s;o--,s--)if(i[o]!==l[s]){if(o!==1||s!==1)do if(o--,s--,0>s||i[o]!==l[s]){var a=`
37
+ `+i[o].replace(" at new "," at ");return e.displayName&&a.includes("<anonymous>")&&(a=a.replace("<anonymous>",e.displayName)),a}while(1<=o&&0<=s);break}}}finally{Ro=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Zr(e):""}function Hx(e){switch(e.tag){case 5:return Zr(e.type);case 16:return Zr("Lazy");case 13:return Zr("Suspense");case 19:return Zr("SuspenseList");case 0:case 2:case 15:return e=Oo(e.type,!1),e;case 11:return e=Oo(e.type.render,!1),e;case 1:return e=Oo(e.type,!0),e;default:return""}}function Os(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 or:return"Fragment";case lr:return"Portal";case Ls:return"Profiler";case Ka:return"StrictMode";case Ms:return"Suspense";case Rs:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case fp:return(e.displayName||"Context")+".Consumer";case dp:return(e._context.displayName||"Context")+".Provider";case Qa:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ga:return t=e.displayName||null,t!==null?t:Os(e.type)||"Memo";case sn:t=e._payload,e=e._init;try{return Os(e(t))}catch{}}return null}function Wx(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 Os(t);case 8:return t===Ka?"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 wn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function hp(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function qx(e){var t=hp(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 i=n.get,l=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,l.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Gi(e){e._valueTracker||(e._valueTracker=qx(e))}function mp(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=hp(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Pl(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 Ds(e,t){var n=t.checked;return we({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function gc(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=wn(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 gp(e,t){t=t.checked,t!=null&&qa(e,"checked",t,!1)}function Fs(e,t){gp(e,t);var n=wn(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")?$s(e,t.type,n):t.hasOwnProperty("defaultValue")&&$s(e,t.type,wn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function xc(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 $s(e,t,n){(t!=="number"||Pl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ei=Array.isArray;function xr(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+wn(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Vs(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(P(91));return we({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function yc(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(P(92));if(ei(n)){if(1<n.length)throw Error(P(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:wn(n)}}function xp(e,t){var n=wn(t.value),r=wn(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 kc(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function yp(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 Bs(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?yp(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Yi,kp=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Yi=Yi||document.createElement("div"),Yi.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Yi.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function xi(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ii={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},Kx=["Webkit","ms","Moz","O"];Object.keys(ii).forEach(function(e){Kx.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ii[t]=ii[e]})});function vp(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||ii.hasOwnProperty(e)&&ii[e]?(""+t).trim():t+"px"}function wp(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=vp(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var Qx=we({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 Us(e,t){if(t){if(Qx[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(P(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(P(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(P(61))}if(t.style!=null&&typeof t.style!="object")throw Error(P(62))}}function Hs(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 Ws=null;function Ya(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var qs=null,yr=null,kr=null;function vc(e){if(e=Vi(e)){if(typeof qs!="function")throw Error(P(280));var t=e.stateNode;t&&(t=ho(t),qs(e.stateNode,e.type,t))}}function Sp(e){yr?kr?kr.push(e):kr=[e]:yr=e}function bp(){if(yr){var e=yr,t=kr;if(kr=yr=null,vc(e),t)for(e=0;e<t.length;e++)vc(t[e])}}function Cp(e,t){return e(t)}function Ep(){}var Do=!1;function _p(e,t,n){if(Do)return e(t,n);Do=!0;try{return Cp(e,t,n)}finally{Do=!1,(yr!==null||kr!==null)&&(Ep(),bp())}}function yi(e,t){var n=e.stateNode;if(n===null)return null;var r=ho(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(P(231,t,typeof n));return n}var Ks=!1;if(Gt)try{var Vr={};Object.defineProperty(Vr,"passive",{get:function(){Ks=!0}}),window.addEventListener("test",Vr,Vr),window.removeEventListener("test",Vr,Vr)}catch{Ks=!1}function Gx(e,t,n,r,i,l,o,s,a){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(d){this.onError(d)}}var li=!1,Al=null,Ll=!1,Qs=null,Yx={onError:function(e){li=!0,Al=e}};function Xx(e,t,n,r,i,l,o,s,a){li=!1,Al=null,Gx.apply(Yx,arguments)}function Jx(e,t,n,r,i,l,o,s,a){if(Xx.apply(this,arguments),li){if(li){var u=Al;li=!1,Al=null}else throw Error(P(198));Ll||(Ll=!0,Qs=u)}}function Jn(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Ip(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 wc(e){if(Jn(e)!==e)throw Error(P(188))}function Zx(e){var t=e.alternate;if(!t){if(t=Jn(e),t===null)throw Error(P(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var l=i.alternate;if(l===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===l.child){for(l=i.child;l;){if(l===n)return wc(i),e;if(l===r)return wc(i),t;l=l.sibling}throw Error(P(188))}if(n.return!==r.return)n=i,r=l;else{for(var o=!1,s=i.child;s;){if(s===n){o=!0,n=i,r=l;break}if(s===r){o=!0,r=i,n=l;break}s=s.sibling}if(!o){for(s=l.child;s;){if(s===n){o=!0,n=l,r=i;break}if(s===r){o=!0,r=l,n=i;break}s=s.sibling}if(!o)throw Error(P(189))}}if(n.alternate!==r)throw Error(P(190))}if(n.tag!==3)throw Error(P(188));return n.stateNode.current===n?e:t}function Np(e){return e=Zx(e),e!==null?Tp(e):null}function Tp(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Tp(e);if(t!==null)return t;e=e.sibling}return null}var zp=ut.unstable_scheduleCallback,Sc=ut.unstable_cancelCallback,ey=ut.unstable_shouldYield,ty=ut.unstable_requestPaint,Ce=ut.unstable_now,ny=ut.unstable_getCurrentPriorityLevel,Xa=ut.unstable_ImmediatePriority,jp=ut.unstable_UserBlockingPriority,Ml=ut.unstable_NormalPriority,ry=ut.unstable_LowPriority,Pp=ut.unstable_IdlePriority,uo=null,Ot=null;function iy(e){if(Ot&&typeof Ot.onCommitFiberRoot=="function")try{Ot.onCommitFiberRoot(uo,e,void 0,(e.current.flags&128)===128)}catch{}}var It=Math.clz32?Math.clz32:sy,ly=Math.log,oy=Math.LN2;function sy(e){return e>>>=0,e===0?32:31-(ly(e)/oy|0)|0}var Xi=64,Ji=4194304;function ti(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 Rl(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,l=e.pingedLanes,o=n&268435455;if(o!==0){var s=o&~i;s!==0?r=ti(s):(l&=o,l!==0&&(r=ti(l)))}else o=n&~i,o!==0?r=ti(o):l!==0&&(r=ti(l));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,l=t&-t,i>=l||i===16&&(l&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-It(t),i=1<<n,r|=e[n],t&=~i;return r}function ay(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 uy(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,l=e.pendingLanes;0<l;){var o=31-It(l),s=1<<o,a=i[o];a===-1?(!(s&n)||s&r)&&(i[o]=ay(s,t)):a<=t&&(e.expiredLanes|=s),l&=~s}}function Gs(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Ap(){var e=Xi;return Xi<<=1,!(Xi&4194240)&&(Xi=64),e}function Fo(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Fi(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-It(t),e[t]=n}function cy(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 i=31-It(n),l=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~l}}function Ja(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-It(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var se=0;function Lp(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Mp,Za,Rp,Op,Dp,Ys=!1,Zi=[],pn=null,hn=null,mn=null,ki=new Map,vi=new Map,un=[],dy="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 bc(e,t){switch(e){case"focusin":case"focusout":pn=null;break;case"dragenter":case"dragleave":hn=null;break;case"mouseover":case"mouseout":mn=null;break;case"pointerover":case"pointerout":ki.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":vi.delete(t.pointerId)}}function Br(e,t,n,r,i,l){return e===null||e.nativeEvent!==l?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:l,targetContainers:[i]},t!==null&&(t=Vi(t),t!==null&&Za(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function fy(e,t,n,r,i){switch(t){case"focusin":return pn=Br(pn,e,t,n,r,i),!0;case"dragenter":return hn=Br(hn,e,t,n,r,i),!0;case"mouseover":return mn=Br(mn,e,t,n,r,i),!0;case"pointerover":var l=i.pointerId;return ki.set(l,Br(ki.get(l)||null,e,t,n,r,i)),!0;case"gotpointercapture":return l=i.pointerId,vi.set(l,Br(vi.get(l)||null,e,t,n,r,i)),!0}return!1}function Fp(e){var t=On(e.target);if(t!==null){var n=Jn(t);if(n!==null){if(t=n.tag,t===13){if(t=Ip(n),t!==null){e.blockedOn=t,Dp(e.priority,function(){Rp(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 yl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Xs(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Ws=r,n.target.dispatchEvent(r),Ws=null}else return t=Vi(n),t!==null&&Za(t),e.blockedOn=n,!1;t.shift()}return!0}function Cc(e,t,n){yl(e)&&n.delete(t)}function py(){Ys=!1,pn!==null&&yl(pn)&&(pn=null),hn!==null&&yl(hn)&&(hn=null),mn!==null&&yl(mn)&&(mn=null),ki.forEach(Cc),vi.forEach(Cc)}function Ur(e,t){e.blockedOn===t&&(e.blockedOn=null,Ys||(Ys=!0,ut.unstable_scheduleCallback(ut.unstable_NormalPriority,py)))}function wi(e){function t(i){return Ur(i,e)}if(0<Zi.length){Ur(Zi[0],e);for(var n=1;n<Zi.length;n++){var r=Zi[n];r.blockedOn===e&&(r.blockedOn=null)}}for(pn!==null&&Ur(pn,e),hn!==null&&Ur(hn,e),mn!==null&&Ur(mn,e),ki.forEach(t),vi.forEach(t),n=0;n<un.length;n++)r=un[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<un.length&&(n=un[0],n.blockedOn===null);)Fp(n),n.blockedOn===null&&un.shift()}var vr=Zt.ReactCurrentBatchConfig,Ol=!0;function hy(e,t,n,r){var i=se,l=vr.transition;vr.transition=null;try{se=1,eu(e,t,n,r)}finally{se=i,vr.transition=l}}function my(e,t,n,r){var i=se,l=vr.transition;vr.transition=null;try{se=4,eu(e,t,n,r)}finally{se=i,vr.transition=l}}function eu(e,t,n,r){if(Ol){var i=Xs(e,t,n,r);if(i===null)Go(e,t,r,Dl,n),bc(e,r);else if(fy(i,e,t,n,r))r.stopPropagation();else if(bc(e,r),t&4&&-1<dy.indexOf(e)){for(;i!==null;){var l=Vi(i);if(l!==null&&Mp(l),l=Xs(e,t,n,r),l===null&&Go(e,t,r,Dl,n),l===i)break;i=l}i!==null&&r.stopPropagation()}else Go(e,t,r,null,n)}}var Dl=null;function Xs(e,t,n,r){if(Dl=null,e=Ya(r),e=On(e),e!==null)if(t=Jn(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Ip(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 Dl=e,null}function $p(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(ny()){case Xa:return 1;case jp:return 4;case Ml:case ry:return 16;case Pp:return 536870912;default:return 16}default:return 16}}var dn=null,tu=null,kl=null;function Vp(){if(kl)return kl;var e,t=tu,n=t.length,r,i="value"in dn?dn.value:dn.textContent,l=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[l-r];r++);return kl=i.slice(e,1<r?1-r:void 0)}function vl(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 el(){return!0}function Ec(){return!1}function dt(e){function t(n,r,i,l,o){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=l,this.target=o,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(n=e[s],this[s]=n?n(l):l[s]);return this.isDefaultPrevented=(l.defaultPrevented!=null?l.defaultPrevented:l.returnValue===!1)?el:Ec,this.isPropagationStopped=Ec,this}return we(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=el)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=el)},persist:function(){},isPersistent:el}),t}var Pr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},nu=dt(Pr),$i=we({},Pr,{view:0,detail:0}),gy=dt($i),$o,Vo,Hr,co=we({},$i,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ru,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!==Hr&&(Hr&&e.type==="mousemove"?($o=e.screenX-Hr.screenX,Vo=e.screenY-Hr.screenY):Vo=$o=0,Hr=e),$o)},movementY:function(e){return"movementY"in e?e.movementY:Vo}}),_c=dt(co),xy=we({},co,{dataTransfer:0}),yy=dt(xy),ky=we({},$i,{relatedTarget:0}),Bo=dt(ky),vy=we({},Pr,{animationName:0,elapsedTime:0,pseudoElement:0}),wy=dt(vy),Sy=we({},Pr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),by=dt(Sy),Cy=we({},Pr,{data:0}),Ic=dt(Cy),Ey={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},_y={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"},Iy={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ny(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Iy[e])?!!t[e]:!1}function ru(){return Ny}var Ty=we({},$i,{key:function(e){if(e.key){var t=Ey[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=vl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?_y[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ru,charCode:function(e){return e.type==="keypress"?vl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?vl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),zy=dt(Ty),jy=we({},co,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Nc=dt(jy),Py=we({},$i,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ru}),Ay=dt(Py),Ly=we({},Pr,{propertyName:0,elapsedTime:0,pseudoElement:0}),My=dt(Ly),Ry=we({},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}),Oy=dt(Ry),Dy=[9,13,27,32],iu=Gt&&"CompositionEvent"in window,oi=null;Gt&&"documentMode"in document&&(oi=document.documentMode);var Fy=Gt&&"TextEvent"in window&&!oi,Bp=Gt&&(!iu||oi&&8<oi&&11>=oi),Tc=" ",zc=!1;function Up(e,t){switch(e){case"keyup":return Dy.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Hp(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var sr=!1;function $y(e,t){switch(e){case"compositionend":return Hp(t);case"keypress":return t.which!==32?null:(zc=!0,Tc);case"textInput":return e=t.data,e===Tc&&zc?null:e;default:return null}}function Vy(e,t){if(sr)return e==="compositionend"||!iu&&Up(e,t)?(e=Vp(),kl=tu=dn=null,sr=!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 Bp&&t.locale!=="ko"?null:t.data;default:return null}}var By={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 jc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!By[e.type]:t==="textarea"}function Wp(e,t,n,r){Sp(r),t=Fl(t,"onChange"),0<t.length&&(n=new nu("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var si=null,Si=null;function Uy(e){nh(e,0)}function fo(e){var t=cr(e);if(mp(t))return e}function Hy(e,t){if(e==="change")return t}var qp=!1;if(Gt){var Uo;if(Gt){var Ho="oninput"in document;if(!Ho){var Pc=document.createElement("div");Pc.setAttribute("oninput","return;"),Ho=typeof Pc.oninput=="function"}Uo=Ho}else Uo=!1;qp=Uo&&(!document.documentMode||9<document.documentMode)}function Ac(){si&&(si.detachEvent("onpropertychange",Kp),Si=si=null)}function Kp(e){if(e.propertyName==="value"&&fo(Si)){var t=[];Wp(t,Si,e,Ya(e)),_p(Uy,t)}}function Wy(e,t,n){e==="focusin"?(Ac(),si=t,Si=n,si.attachEvent("onpropertychange",Kp)):e==="focusout"&&Ac()}function qy(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return fo(Si)}function Ky(e,t){if(e==="click")return fo(t)}function Qy(e,t){if(e==="input"||e==="change")return fo(t)}function Gy(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var zt=typeof Object.is=="function"?Object.is:Gy;function bi(e,t){if(zt(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 i=n[r];if(!As.call(t,i)||!zt(e[i],t[i]))return!1}return!0}function Lc(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Mc(e,t){var n=Lc(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=Lc(n)}}function Qp(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Qp(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Gp(){for(var e=window,t=Pl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Pl(e.document)}return t}function lu(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 Yy(e){var t=Gp(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Qp(n.ownerDocument.documentElement,n)){if(r!==null&&lu(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 i=n.textContent.length,l=Math.min(r.start,i);r=r.end===void 0?l:Math.min(r.end,i),!e.extend&&l>r&&(i=r,r=l,l=i),i=Mc(n,l);var o=Mc(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),l>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.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 Xy=Gt&&"documentMode"in document&&11>=document.documentMode,ar=null,Js=null,ai=null,Zs=!1;function Rc(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Zs||ar==null||ar!==Pl(r)||(r=ar,"selectionStart"in r&&lu(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}),ai&&bi(ai,r)||(ai=r,r=Fl(Js,"onSelect"),0<r.length&&(t=new nu("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ar)))}function tl(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var ur={animationend:tl("Animation","AnimationEnd"),animationiteration:tl("Animation","AnimationIteration"),animationstart:tl("Animation","AnimationStart"),transitionend:tl("Transition","TransitionEnd")},Wo={},Yp={};Gt&&(Yp=document.createElement("div").style,"AnimationEvent"in window||(delete ur.animationend.animation,delete ur.animationiteration.animation,delete ur.animationstart.animation),"TransitionEvent"in window||delete ur.transitionend.transition);function po(e){if(Wo[e])return Wo[e];if(!ur[e])return e;var t=ur[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Yp)return Wo[e]=t[n];return e}var Xp=po("animationend"),Jp=po("animationiteration"),Zp=po("animationstart"),eh=po("transitionend"),th=new Map,Oc="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 bn(e,t){th.set(e,t),Xn(t,[e])}for(var qo=0;qo<Oc.length;qo++){var Ko=Oc[qo],Jy=Ko.toLowerCase(),Zy=Ko[0].toUpperCase()+Ko.slice(1);bn(Jy,"on"+Zy)}bn(Xp,"onAnimationEnd");bn(Jp,"onAnimationIteration");bn(Zp,"onAnimationStart");bn("dblclick","onDoubleClick");bn("focusin","onFocus");bn("focusout","onBlur");bn(eh,"onTransitionEnd");br("onMouseEnter",["mouseout","mouseover"]);br("onMouseLeave",["mouseout","mouseover"]);br("onPointerEnter",["pointerout","pointerover"]);br("onPointerLeave",["pointerout","pointerover"]);Xn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Xn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Xn("onBeforeInput",["compositionend","keypress","textInput","paste"]);Xn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Xn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Xn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ni="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(" "),e1=new Set("cancel close invalid load scroll toggle".split(" ").concat(ni));function Dc(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Jx(r,t,void 0,e),e.currentTarget=null}function nh(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var l=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],a=s.instance,u=s.currentTarget;if(s=s.listener,a!==l&&i.isPropagationStopped())break e;Dc(i,s,u),l=a}else for(o=0;o<r.length;o++){if(s=r[o],a=s.instance,u=s.currentTarget,s=s.listener,a!==l&&i.isPropagationStopped())break e;Dc(i,s,u),l=a}}}if(Ll)throw e=Qs,Ll=!1,Qs=null,e}function ge(e,t){var n=t[ia];n===void 0&&(n=t[ia]=new Set);var r=e+"__bubble";n.has(r)||(rh(t,e,2,!1),n.add(r))}function Qo(e,t,n){var r=0;t&&(r|=4),rh(n,e,r,t)}var nl="_reactListening"+Math.random().toString(36).slice(2);function Ci(e){if(!e[nl]){e[nl]=!0,cp.forEach(function(n){n!=="selectionchange"&&(e1.has(n)||Qo(n,!1,e),Qo(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[nl]||(t[nl]=!0,Qo("selectionchange",!1,t))}}function rh(e,t,n,r){switch($p(t)){case 1:var i=hy;break;case 4:i=my;break;default:i=eu}n=i.bind(null,t,n,e),i=void 0,!Ks||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Go(e,t,n,r,i){var l=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var s=r.stateNode.containerInfo;if(s===i||s.nodeType===8&&s.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var a=o.tag;if((a===3||a===4)&&(a=o.stateNode.containerInfo,a===i||a.nodeType===8&&a.parentNode===i))return;o=o.return}for(;s!==null;){if(o=On(s),o===null)return;if(a=o.tag,a===5||a===6){r=l=o;continue e}s=s.parentNode}}r=r.return}_p(function(){var u=l,d=Ya(n),c=[];e:{var f=th.get(e);if(f!==void 0){var p=nu,x=e;switch(e){case"keypress":if(vl(n)===0)break e;case"keydown":case"keyup":p=zy;break;case"focusin":x="focus",p=Bo;break;case"focusout":x="blur",p=Bo;break;case"beforeblur":case"afterblur":p=Bo;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":p=_c;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=yy;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=Ay;break;case Xp:case Jp:case Zp:p=wy;break;case eh:p=My;break;case"scroll":p=gy;break;case"wheel":p=Oy;break;case"copy":case"cut":case"paste":p=by;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=Nc}var v=(t&4)!==0,E=!v&&e==="scroll",h=v?f!==null?f+"Capture":null:f;v=[];for(var g=u,k;g!==null;){k=g;var C=k.stateNode;if(k.tag===5&&C!==null&&(k=C,h!==null&&(C=yi(g,h),C!=null&&v.push(Ei(g,C,k)))),E)break;g=g.return}0<v.length&&(f=new p(f,x,null,n,d),c.push({event:f,listeners:v}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",f&&n!==Ws&&(x=n.relatedTarget||n.fromElement)&&(On(x)||x[Yt]))break e;if((p||f)&&(f=d.window===d?d:(f=d.ownerDocument)?f.defaultView||f.parentWindow:window,p?(x=n.relatedTarget||n.toElement,p=u,x=x?On(x):null,x!==null&&(E=Jn(x),x!==E||x.tag!==5&&x.tag!==6)&&(x=null)):(p=null,x=u),p!==x)){if(v=_c,C="onMouseLeave",h="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(v=Nc,C="onPointerLeave",h="onPointerEnter",g="pointer"),E=p==null?f:cr(p),k=x==null?f:cr(x),f=new v(C,g+"leave",p,n,d),f.target=E,f.relatedTarget=k,C=null,On(d)===u&&(v=new v(h,g+"enter",x,n,d),v.target=k,v.relatedTarget=E,C=v),E=C,p&&x)t:{for(v=p,h=x,g=0,k=v;k;k=nr(k))g++;for(k=0,C=h;C;C=nr(C))k++;for(;0<g-k;)v=nr(v),g--;for(;0<k-g;)h=nr(h),k--;for(;g--;){if(v===h||h!==null&&v===h.alternate)break t;v=nr(v),h=nr(h)}v=null}else v=null;p!==null&&Fc(c,f,p,v,!1),x!==null&&E!==null&&Fc(c,E,x,v,!0)}}e:{if(f=u?cr(u):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var N=Hy;else if(jc(f))if(qp)N=Qy;else{N=qy;var b=Wy}else(p=f.nodeName)&&p.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(N=Ky);if(N&&(N=N(e,u))){Wp(c,N,n,d);break e}b&&b(e,f,u),e==="focusout"&&(b=f._wrapperState)&&b.controlled&&f.type==="number"&&$s(f,"number",f.value)}switch(b=u?cr(u):window,e){case"focusin":(jc(b)||b.contentEditable==="true")&&(ar=b,Js=u,ai=null);break;case"focusout":ai=Js=ar=null;break;case"mousedown":Zs=!0;break;case"contextmenu":case"mouseup":case"dragend":Zs=!1,Rc(c,n,d);break;case"selectionchange":if(Xy)break;case"keydown":case"keyup":Rc(c,n,d)}var I;if(iu)e:{switch(e){case"compositionstart":var _="onCompositionStart";break e;case"compositionend":_="onCompositionEnd";break e;case"compositionupdate":_="onCompositionUpdate";break e}_=void 0}else sr?Up(e,n)&&(_="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(_="onCompositionStart");_&&(Bp&&n.locale!=="ko"&&(sr||_!=="onCompositionStart"?_==="onCompositionEnd"&&sr&&(I=Vp()):(dn=d,tu="value"in dn?dn.value:dn.textContent,sr=!0)),b=Fl(u,_),0<b.length&&(_=new Ic(_,e,null,n,d),c.push({event:_,listeners:b}),I?_.data=I:(I=Hp(n),I!==null&&(_.data=I)))),(I=Fy?$y(e,n):Vy(e,n))&&(u=Fl(u,"onBeforeInput"),0<u.length&&(d=new Ic("onBeforeInput","beforeinput",null,n,d),c.push({event:d,listeners:u}),d.data=I))}nh(c,t)})}function Ei(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Fl(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,l=i.stateNode;i.tag===5&&l!==null&&(i=l,l=yi(e,n),l!=null&&r.unshift(Ei(e,l,i)),l=yi(e,t),l!=null&&r.push(Ei(e,l,i))),e=e.return}return r}function nr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Fc(e,t,n,r,i){for(var l=t._reactName,o=[];n!==null&&n!==r;){var s=n,a=s.alternate,u=s.stateNode;if(a!==null&&a===r)break;s.tag===5&&u!==null&&(s=u,i?(a=yi(n,l),a!=null&&o.unshift(Ei(n,a,s))):i||(a=yi(n,l),a!=null&&o.push(Ei(n,a,s)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var t1=/\r\n?/g,n1=/\u0000|\uFFFD/g;function $c(e){return(typeof e=="string"?e:""+e).replace(t1,`
38
+ `).replace(n1,"")}function rl(e,t,n){if(t=$c(t),$c(e)!==t&&n)throw Error(P(425))}function $l(){}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,r1=typeof clearTimeout=="function"?clearTimeout:void 0,Vc=typeof Promise=="function"?Promise:void 0,i1=typeof queueMicrotask=="function"?queueMicrotask:typeof Vc<"u"?function(e){return Vc.resolve(null).then(e).catch(l1)}:ra;function l1(e){setTimeout(function(){throw e})}function Yo(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),wi(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);wi(t)}function gn(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 Bc(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 Ar=Math.random().toString(36).slice(2),Rt="__reactFiber$"+Ar,_i="__reactProps$"+Ar,Yt="__reactContainer$"+Ar,ia="__reactEvents$"+Ar,o1="__reactListeners$"+Ar,s1="__reactHandles$"+Ar;function On(e){var t=e[Rt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Yt]||n[Rt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Bc(e);e!==null;){if(n=e[Rt])return n;e=Bc(e)}return t}e=n,n=e.parentNode}return null}function Vi(e){return e=e[Rt]||e[Yt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function cr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(P(33))}function ho(e){return e[_i]||null}var la=[],dr=-1;function Cn(e){return{current:e}}function xe(e){0>dr||(e.current=la[dr],la[dr]=null,dr--)}function me(e,t){dr++,la[dr]=e.current,e.current=t}var Sn={},Be=Cn(Sn),Je=Cn(!1),Hn=Sn;function Cr(e,t){var n=e.type.contextTypes;if(!n)return Sn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},l;for(l in n)i[l]=t[l];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Ze(e){return e=e.childContextTypes,e!=null}function Vl(){xe(Je),xe(Be)}function Uc(e,t,n){if(Be.current!==Sn)throw Error(P(168));me(Be,t),me(Je,n)}function ih(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(P(108,Wx(e)||"Unknown",i));return we({},n,r)}function Bl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Sn,Hn=Be.current,me(Be,e),me(Je,Je.current),!0}function Hc(e,t,n){var r=e.stateNode;if(!r)throw Error(P(169));n?(e=ih(e,t,Hn),r.__reactInternalMemoizedMergedChildContext=e,xe(Je),xe(Be),me(Be,e)):xe(Je),me(Je,n)}var Ht=null,mo=!1,Xo=!1;function lh(e){Ht===null?Ht=[e]:Ht.push(e)}function a1(e){mo=!0,lh(e)}function En(){if(!Xo&&Ht!==null){Xo=!0;var e=0,t=se;try{var n=Ht;for(se=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Ht=null,mo=!1}catch(i){throw Ht!==null&&(Ht=Ht.slice(e+1)),zp(Xa,En),i}finally{se=t,Xo=!1}}return null}var fr=[],pr=0,Ul=null,Hl=0,ft=[],pt=0,Wn=null,qt=1,Kt="";function An(e,t){fr[pr++]=Hl,fr[pr++]=Ul,Ul=e,Hl=t}function oh(e,t,n){ft[pt++]=qt,ft[pt++]=Kt,ft[pt++]=Wn,Wn=e;var r=qt;e=Kt;var i=32-It(r)-1;r&=~(1<<i),n+=1;var l=32-It(t)+i;if(30<l){var o=i-i%5;l=(r&(1<<o)-1).toString(32),r>>=o,i-=o,qt=1<<32-It(t)+i|n<<i|r,Kt=l+e}else qt=1<<l|n<<i|r,Kt=e}function ou(e){e.return!==null&&(An(e,1),oh(e,1,0))}function su(e){for(;e===Ul;)Ul=fr[--pr],fr[pr]=null,Hl=fr[--pr],fr[pr]=null;for(;e===Wn;)Wn=ft[--pt],ft[pt]=null,Kt=ft[--pt],ft[pt]=null,qt=ft[--pt],ft[pt]=null}var st=null,ot=null,ye=!1,_t=null;function sh(e,t){var n=mt(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 Wc(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,st=e,ot=gn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,st=e,ot=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Wn!==null?{id:qt,overflow:Kt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=mt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,st=e,ot=null,!0):!1;default:return!1}}function oa(e){return(e.mode&1)!==0&&(e.flags&128)===0}function sa(e){if(ye){var t=ot;if(t){var n=t;if(!Wc(e,t)){if(oa(e))throw Error(P(418));t=gn(n.nextSibling);var r=st;t&&Wc(e,t)?sh(r,n):(e.flags=e.flags&-4097|2,ye=!1,st=e)}}else{if(oa(e))throw Error(P(418));e.flags=e.flags&-4097|2,ye=!1,st=e}}}function qc(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;st=e}function il(e){if(e!==st)return!1;if(!ye)return qc(e),ye=!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=ot)){if(oa(e))throw ah(),Error(P(418));for(;t;)sh(e,t),t=gn(t.nextSibling)}if(qc(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(P(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){ot=gn(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}ot=null}}else ot=st?gn(e.stateNode.nextSibling):null;return!0}function ah(){for(var e=ot;e;)e=gn(e.nextSibling)}function Er(){ot=st=null,ye=!1}function au(e){_t===null?_t=[e]:_t.push(e)}var u1=Zt.ReactCurrentBatchConfig;function Wr(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(P(309));var r=n.stateNode}if(!r)throw Error(P(147,e));var i=r,l=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===l?t.ref:(t=function(o){var s=i.refs;o===null?delete s[l]:s[l]=o},t._stringRef=l,t)}if(typeof e!="string")throw Error(P(284));if(!n._owner)throw Error(P(290,e))}return e}function ll(e,t){throw e=Object.prototype.toString.call(t),Error(P(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Kc(e){var t=e._init;return t(e._payload)}function uh(e){function t(h,g){if(e){var k=h.deletions;k===null?(h.deletions=[g],h.flags|=16):k.push(g)}}function n(h,g){if(!e)return null;for(;g!==null;)t(h,g),g=g.sibling;return null}function r(h,g){for(h=new Map;g!==null;)g.key!==null?h.set(g.key,g):h.set(g.index,g),g=g.sibling;return h}function i(h,g){return h=vn(h,g),h.index=0,h.sibling=null,h}function l(h,g,k){return h.index=k,e?(k=h.alternate,k!==null?(k=k.index,k<g?(h.flags|=2,g):k):(h.flags|=2,g)):(h.flags|=1048576,g)}function o(h){return e&&h.alternate===null&&(h.flags|=2),h}function s(h,g,k,C){return g===null||g.tag!==6?(g=is(k,h.mode,C),g.return=h,g):(g=i(g,k),g.return=h,g)}function a(h,g,k,C){var N=k.type;return N===or?d(h,g,k.props.children,C,k.key):g!==null&&(g.elementType===N||typeof N=="object"&&N!==null&&N.$$typeof===sn&&Kc(N)===g.type)?(C=i(g,k.props),C.ref=Wr(h,g,k),C.return=h,C):(C=Il(k.type,k.key,k.props,null,h.mode,C),C.ref=Wr(h,g,k),C.return=h,C)}function u(h,g,k,C){return g===null||g.tag!==4||g.stateNode.containerInfo!==k.containerInfo||g.stateNode.implementation!==k.implementation?(g=ls(k,h.mode,C),g.return=h,g):(g=i(g,k.children||[]),g.return=h,g)}function d(h,g,k,C,N){return g===null||g.tag!==7?(g=Vn(k,h.mode,C,N),g.return=h,g):(g=i(g,k),g.return=h,g)}function c(h,g,k){if(typeof g=="string"&&g!==""||typeof g=="number")return g=is(""+g,h.mode,k),g.return=h,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case Qi:return k=Il(g.type,g.key,g.props,null,h.mode,k),k.ref=Wr(h,null,g),k.return=h,k;case lr:return g=ls(g,h.mode,k),g.return=h,g;case sn:var C=g._init;return c(h,C(g._payload),k)}if(ei(g)||$r(g))return g=Vn(g,h.mode,k,null),g.return=h,g;ll(h,g)}return null}function f(h,g,k,C){var N=g!==null?g.key:null;if(typeof k=="string"&&k!==""||typeof k=="number")return N!==null?null:s(h,g,""+k,C);if(typeof k=="object"&&k!==null){switch(k.$$typeof){case Qi:return k.key===N?a(h,g,k,C):null;case lr:return k.key===N?u(h,g,k,C):null;case sn:return N=k._init,f(h,g,N(k._payload),C)}if(ei(k)||$r(k))return N!==null?null:d(h,g,k,C,null);ll(h,k)}return null}function p(h,g,k,C,N){if(typeof C=="string"&&C!==""||typeof C=="number")return h=h.get(k)||null,s(g,h,""+C,N);if(typeof C=="object"&&C!==null){switch(C.$$typeof){case Qi:return h=h.get(C.key===null?k:C.key)||null,a(g,h,C,N);case lr:return h=h.get(C.key===null?k:C.key)||null,u(g,h,C,N);case sn:var b=C._init;return p(h,g,k,b(C._payload),N)}if(ei(C)||$r(C))return h=h.get(k)||null,d(g,h,C,N,null);ll(g,C)}return null}function x(h,g,k,C){for(var N=null,b=null,I=g,_=g=0,z=null;I!==null&&_<k.length;_++){I.index>_?(z=I,I=null):z=I.sibling;var S=f(h,I,k[_],C);if(S===null){I===null&&(I=z);break}e&&I&&S.alternate===null&&t(h,I),g=l(S,g,_),b===null?N=S:b.sibling=S,b=S,I=z}if(_===k.length)return n(h,I),ye&&An(h,_),N;if(I===null){for(;_<k.length;_++)I=c(h,k[_],C),I!==null&&(g=l(I,g,_),b===null?N=I:b.sibling=I,b=I);return ye&&An(h,_),N}for(I=r(h,I);_<k.length;_++)z=p(I,h,_,k[_],C),z!==null&&(e&&z.alternate!==null&&I.delete(z.key===null?_:z.key),g=l(z,g,_),b===null?N=z:b.sibling=z,b=z);return e&&I.forEach(function(j){return t(h,j)}),ye&&An(h,_),N}function v(h,g,k,C){var N=$r(k);if(typeof N!="function")throw Error(P(150));if(k=N.call(k),k==null)throw Error(P(151));for(var b=N=null,I=g,_=g=0,z=null,S=k.next();I!==null&&!S.done;_++,S=k.next()){I.index>_?(z=I,I=null):z=I.sibling;var j=f(h,I,S.value,C);if(j===null){I===null&&(I=z);break}e&&I&&j.alternate===null&&t(h,I),g=l(j,g,_),b===null?N=j:b.sibling=j,b=j,I=z}if(S.done)return n(h,I),ye&&An(h,_),N;if(I===null){for(;!S.done;_++,S=k.next())S=c(h,S.value,C),S!==null&&(g=l(S,g,_),b===null?N=S:b.sibling=S,b=S);return ye&&An(h,_),N}for(I=r(h,I);!S.done;_++,S=k.next())S=p(I,h,_,S.value,C),S!==null&&(e&&S.alternate!==null&&I.delete(S.key===null?_:S.key),g=l(S,g,_),b===null?N=S:b.sibling=S,b=S);return e&&I.forEach(function(O){return t(h,O)}),ye&&An(h,_),N}function E(h,g,k,C){if(typeof k=="object"&&k!==null&&k.type===or&&k.key===null&&(k=k.props.children),typeof k=="object"&&k!==null){switch(k.$$typeof){case Qi:e:{for(var N=k.key,b=g;b!==null;){if(b.key===N){if(N=k.type,N===or){if(b.tag===7){n(h,b.sibling),g=i(b,k.props.children),g.return=h,h=g;break e}}else if(b.elementType===N||typeof N=="object"&&N!==null&&N.$$typeof===sn&&Kc(N)===b.type){n(h,b.sibling),g=i(b,k.props),g.ref=Wr(h,b,k),g.return=h,h=g;break e}n(h,b);break}else t(h,b);b=b.sibling}k.type===or?(g=Vn(k.props.children,h.mode,C,k.key),g.return=h,h=g):(C=Il(k.type,k.key,k.props,null,h.mode,C),C.ref=Wr(h,g,k),C.return=h,h=C)}return o(h);case lr:e:{for(b=k.key;g!==null;){if(g.key===b)if(g.tag===4&&g.stateNode.containerInfo===k.containerInfo&&g.stateNode.implementation===k.implementation){n(h,g.sibling),g=i(g,k.children||[]),g.return=h,h=g;break e}else{n(h,g);break}else t(h,g);g=g.sibling}g=ls(k,h.mode,C),g.return=h,h=g}return o(h);case sn:return b=k._init,E(h,g,b(k._payload),C)}if(ei(k))return x(h,g,k,C);if($r(k))return v(h,g,k,C);ll(h,k)}return typeof k=="string"&&k!==""||typeof k=="number"?(k=""+k,g!==null&&g.tag===6?(n(h,g.sibling),g=i(g,k),g.return=h,h=g):(n(h,g),g=is(k,h.mode,C),g.return=h,h=g),o(h)):n(h,g)}return E}var _r=uh(!0),ch=uh(!1),Wl=Cn(null),ql=null,hr=null,uu=null;function cu(){uu=hr=ql=null}function du(e){var t=Wl.current;xe(Wl),e._currentValue=t}function aa(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 wr(e,t){ql=e,uu=hr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Xe=!0),e.firstContext=null)}function xt(e){var t=e._currentValue;if(uu!==e)if(e={context:e,memoizedValue:t,next:null},hr===null){if(ql===null)throw Error(P(308));hr=e,ql.dependencies={lanes:0,firstContext:e}}else hr=hr.next=e;return t}var Dn=null;function fu(e){Dn===null?Dn=[e]:Dn.push(e)}function dh(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,fu(t)):(n.next=i.next,i.next=n),t.interleaved=n,Xt(e,r)}function Xt(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 an=!1;function pu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function fh(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 Qt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function xn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,le&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Xt(e,n)}return i=r.interleaved,i===null?(t.next=t,fu(r)):(t.next=i.next,i.next=t),r.interleaved=t,Xt(e,n)}function wl(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,Ja(e,n)}}function Qc(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,l=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};l===null?i=l=o:l=l.next=o,n=n.next}while(n!==null);l===null?i=l=t:l=l.next=t}else i=l=t;n={baseState:r.baseState,firstBaseUpdate:i,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 Kl(e,t,n,r){var i=e.updateQueue;an=!1;var l=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var a=s,u=a.next;a.next=null,o===null?l=u:o.next=u,o=a;var d=e.alternate;d!==null&&(d=d.updateQueue,s=d.lastBaseUpdate,s!==o&&(s===null?d.firstBaseUpdate=u:s.next=u,d.lastBaseUpdate=a))}if(l!==null){var c=i.baseState;o=0,d=u=a=null,s=l;do{var f=s.lane,p=s.eventTime;if((r&f)===f){d!==null&&(d=d.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var x=e,v=s;switch(f=t,p=n,v.tag){case 1:if(x=v.payload,typeof x=="function"){c=x.call(p,c,f);break e}c=x;break e;case 3:x.flags=x.flags&-65537|128;case 0:if(x=v.payload,f=typeof x=="function"?x.call(p,c,f):x,f==null)break e;c=we({},c,f);break e;case 2:an=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[s]:f.push(s))}else p={eventTime:p,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},d===null?(u=d=p,a=c):d=d.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;f=s,s=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(!0);if(d===null&&(a=c),i.baseState=a,i.firstBaseUpdate=u,i.lastBaseUpdate=d,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else l===null&&(i.shared.lanes=0);Kn|=o,e.lanes=o,e.memoizedState=c}}function Gc(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(P(191,i));i.call(r)}}}var Bi={},Dt=Cn(Bi),Ii=Cn(Bi),Ni=Cn(Bi);function Fn(e){if(e===Bi)throw Error(P(174));return e}function hu(e,t){switch(me(Ni,t),me(Ii,e),me(Dt,Bi),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Bs(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Bs(t,e)}xe(Dt),me(Dt,t)}function Ir(){xe(Dt),xe(Ii),xe(Ni)}function ph(e){Fn(Ni.current);var t=Fn(Dt.current),n=Bs(t,e.type);t!==n&&(me(Ii,e),me(Dt,n))}function mu(e){Ii.current===e&&(xe(Dt),xe(Ii))}var ke=Cn(0);function Ql(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Jo=[];function gu(){for(var e=0;e<Jo.length;e++)Jo[e]._workInProgressVersionPrimary=null;Jo.length=0}var Sl=Zt.ReactCurrentDispatcher,Zo=Zt.ReactCurrentBatchConfig,qn=0,ve=null,Ne=null,ze=null,Gl=!1,ui=!1,Ti=0,c1=0;function De(){throw Error(P(321))}function xu(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!zt(e[n],t[n]))return!1;return!0}function yu(e,t,n,r,i,l){if(qn=l,ve=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Sl.current=e===null||e.memoizedState===null?h1:m1,e=n(r,i),ui){l=0;do{if(ui=!1,Ti=0,25<=l)throw Error(P(301));l+=1,ze=Ne=null,t.updateQueue=null,Sl.current=g1,e=n(r,i)}while(ui)}if(Sl.current=Yl,t=Ne!==null&&Ne.next!==null,qn=0,ze=Ne=ve=null,Gl=!1,t)throw Error(P(300));return e}function ku(){var e=Ti!==0;return Ti=0,e}function Lt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ze===null?ve.memoizedState=ze=e:ze=ze.next=e,ze}function yt(){if(Ne===null){var e=ve.alternate;e=e!==null?e.memoizedState:null}else e=Ne.next;var t=ze===null?ve.memoizedState:ze.next;if(t!==null)ze=t,Ne=e;else{if(e===null)throw Error(P(310));Ne=e,e={memoizedState:Ne.memoizedState,baseState:Ne.baseState,baseQueue:Ne.baseQueue,queue:Ne.queue,next:null},ze===null?ve.memoizedState=ze=e:ze=ze.next=e}return ze}function zi(e,t){return typeof t=="function"?t(e):t}function es(e){var t=yt(),n=t.queue;if(n===null)throw Error(P(311));n.lastRenderedReducer=e;var r=Ne,i=r.baseQueue,l=n.pending;if(l!==null){if(i!==null){var o=i.next;i.next=l.next,l.next=o}r.baseQueue=i=l,n.pending=null}if(i!==null){l=i.next,r=r.baseState;var s=o=null,a=null,u=l;do{var d=u.lane;if((qn&d)===d)a!==null&&(a=a.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var c={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};a===null?(s=a=c,o=r):a=a.next=c,ve.lanes|=d,Kn|=d}u=u.next}while(u!==null&&u!==l);a===null?o=r:a.next=s,zt(r,t.memoizedState)||(Xe=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=a,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do l=i.lane,ve.lanes|=l,Kn|=l,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function ts(e){var t=yt(),n=t.queue;if(n===null)throw Error(P(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,l=t.memoizedState;if(i!==null){n.pending=null;var o=i=i.next;do l=e(l,o.action),o=o.next;while(o!==i);zt(l,t.memoizedState)||(Xe=!0),t.memoizedState=l,t.baseQueue===null&&(t.baseState=l),n.lastRenderedState=l}return[l,r]}function hh(){}function mh(e,t){var n=ve,r=yt(),i=t(),l=!zt(r.memoizedState,i);if(l&&(r.memoizedState=i,Xe=!0),r=r.queue,vu(yh.bind(null,n,r,e),[e]),r.getSnapshot!==t||l||ze!==null&&ze.memoizedState.tag&1){if(n.flags|=2048,ji(9,xh.bind(null,n,r,i,t),void 0,null),Pe===null)throw Error(P(349));qn&30||gh(n,t,i)}return i}function gh(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ve.updateQueue,t===null?(t={lastEffect:null,stores:null},ve.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function xh(e,t,n,r){t.value=n,t.getSnapshot=r,kh(t)&&vh(e)}function yh(e,t,n){return n(function(){kh(t)&&vh(e)})}function kh(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!zt(e,n)}catch{return!0}}function vh(e){var t=Xt(e,1);t!==null&&Nt(t,e,1,-1)}function Yc(e){var t=Lt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:zi,lastRenderedState:e},t.queue=e,e=e.dispatch=p1.bind(null,ve,e),[t.memoizedState,e]}function ji(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=ve.updateQueue,t===null?(t={lastEffect:null,stores:null},ve.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 wh(){return yt().memoizedState}function bl(e,t,n,r){var i=Lt();ve.flags|=e,i.memoizedState=ji(1|t,n,void 0,r===void 0?null:r)}function go(e,t,n,r){var i=yt();r=r===void 0?null:r;var l=void 0;if(Ne!==null){var o=Ne.memoizedState;if(l=o.destroy,r!==null&&xu(r,o.deps)){i.memoizedState=ji(t,n,l,r);return}}ve.flags|=e,i.memoizedState=ji(1|t,n,l,r)}function Xc(e,t){return bl(8390656,8,e,t)}function vu(e,t){return go(2048,8,e,t)}function Sh(e,t){return go(4,2,e,t)}function bh(e,t){return go(4,4,e,t)}function Ch(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 Eh(e,t,n){return n=n!=null?n.concat([e]):null,go(4,4,Ch.bind(null,t,e),n)}function wu(){}function _h(e,t){var n=yt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&xu(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ih(e,t){var n=yt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&xu(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Nh(e,t,n){return qn&21?(zt(n,t)||(n=Ap(),ve.lanes|=n,Kn|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Xe=!0),e.memoizedState=n)}function d1(e,t){var n=se;se=n!==0&&4>n?n:4,e(!0);var r=Zo.transition;Zo.transition={};try{e(!1),t()}finally{se=n,Zo.transition=r}}function Th(){return yt().memoizedState}function f1(e,t,n){var r=kn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},zh(e))jh(t,n);else if(n=dh(e,t,n,r),n!==null){var i=qe();Nt(n,e,r,i),Ph(n,t,r)}}function p1(e,t,n){var r=kn(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(zh(e))jh(t,i);else{var l=e.alternate;if(e.lanes===0&&(l===null||l.lanes===0)&&(l=t.lastRenderedReducer,l!==null))try{var o=t.lastRenderedState,s=l(o,n);if(i.hasEagerState=!0,i.eagerState=s,zt(s,o)){var a=t.interleaved;a===null?(i.next=i,fu(t)):(i.next=a.next,a.next=i),t.interleaved=i;return}}catch{}finally{}n=dh(e,t,i,r),n!==null&&(i=qe(),Nt(n,e,r,i),Ph(n,t,r))}}function zh(e){var t=e.alternate;return e===ve||t!==null&&t===ve}function jh(e,t){ui=Gl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ph(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ja(e,n)}}var Yl={readContext:xt,useCallback:De,useContext:De,useEffect:De,useImperativeHandle:De,useInsertionEffect:De,useLayoutEffect:De,useMemo:De,useReducer:De,useRef:De,useState:De,useDebugValue:De,useDeferredValue:De,useTransition:De,useMutableSource:De,useSyncExternalStore:De,useId:De,unstable_isNewReconciler:!1},h1={readContext:xt,useCallback:function(e,t){return Lt().memoizedState=[e,t===void 0?null:t],e},useContext:xt,useEffect:Xc,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,bl(4194308,4,Ch.bind(null,t,e),n)},useLayoutEffect:function(e,t){return bl(4194308,4,e,t)},useInsertionEffect:function(e,t){return bl(4,2,e,t)},useMemo:function(e,t){var n=Lt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Lt();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=f1.bind(null,ve,e),[r.memoizedState,e]},useRef:function(e){var t=Lt();return e={current:e},t.memoizedState=e},useState:Yc,useDebugValue:wu,useDeferredValue:function(e){return Lt().memoizedState=e},useTransition:function(){var e=Yc(!1),t=e[0];return e=d1.bind(null,e[1]),Lt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ve,i=Lt();if(ye){if(n===void 0)throw Error(P(407));n=n()}else{if(n=t(),Pe===null)throw Error(P(349));qn&30||gh(r,t,n)}i.memoizedState=n;var l={value:n,getSnapshot:t};return i.queue=l,Xc(yh.bind(null,r,l,e),[e]),r.flags|=2048,ji(9,xh.bind(null,r,l,n,t),void 0,null),n},useId:function(){var e=Lt(),t=Pe.identifierPrefix;if(ye){var n=Kt,r=qt;n=(r&~(1<<32-It(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Ti++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=c1++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},m1={readContext:xt,useCallback:_h,useContext:xt,useEffect:vu,useImperativeHandle:Eh,useInsertionEffect:Sh,useLayoutEffect:bh,useMemo:Ih,useReducer:es,useRef:wh,useState:function(){return es(zi)},useDebugValue:wu,useDeferredValue:function(e){var t=yt();return Nh(t,Ne.memoizedState,e)},useTransition:function(){var e=es(zi)[0],t=yt().memoizedState;return[e,t]},useMutableSource:hh,useSyncExternalStore:mh,useId:Th,unstable_isNewReconciler:!1},g1={readContext:xt,useCallback:_h,useContext:xt,useEffect:vu,useImperativeHandle:Eh,useInsertionEffect:Sh,useLayoutEffect:bh,useMemo:Ih,useReducer:ts,useRef:wh,useState:function(){return ts(zi)},useDebugValue:wu,useDeferredValue:function(e){var t=yt();return Ne===null?t.memoizedState=e:Nh(t,Ne.memoizedState,e)},useTransition:function(){var e=ts(zi)[0],t=yt().memoizedState;return[e,t]},useMutableSource:hh,useSyncExternalStore:mh,useId:Th,unstable_isNewReconciler:!1};function Ct(e,t){if(e&&e.defaultProps){t=we({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function ua(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:we({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var xo={isMounted:function(e){return(e=e._reactInternals)?Jn(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=qe(),i=kn(e),l=Qt(r,i);l.payload=t,n!=null&&(l.callback=n),t=xn(e,l,i),t!==null&&(Nt(t,e,i,r),wl(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=qe(),i=kn(e),l=Qt(r,i);l.tag=1,l.payload=t,n!=null&&(l.callback=n),t=xn(e,l,i),t!==null&&(Nt(t,e,i,r),wl(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=qe(),r=kn(e),i=Qt(n,r);i.tag=2,t!=null&&(i.callback=t),t=xn(e,i,r),t!==null&&(Nt(t,e,r,n),wl(t,e,r))}};function Jc(e,t,n,r,i,l,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,l,o):t.prototype&&t.prototype.isPureReactComponent?!bi(n,r)||!bi(i,l):!0}function Ah(e,t,n){var r=!1,i=Sn,l=t.contextType;return typeof l=="object"&&l!==null?l=xt(l):(i=Ze(t)?Hn:Be.current,r=t.contextTypes,l=(r=r!=null)?Cr(e,i):Sn),t=new t(n,l),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=xo,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=l),t}function Zc(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&&xo.enqueueReplaceState(t,t.state,null)}function ca(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},pu(e);var l=t.contextType;typeof l=="object"&&l!==null?i.context=xt(l):(l=Ze(t)?Hn:Be.current,i.context=Cr(e,l)),i.state=e.memoizedState,l=t.getDerivedStateFromProps,typeof l=="function"&&(ua(e,t,l,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&xo.enqueueReplaceState(i,i.state,null),Kl(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Nr(e,t){try{var n="",r=t;do n+=Hx(r),r=r.return;while(r);var i=n}catch(l){i=`
39
+ Error generating stack: `+l.message+`
40
+ `+l.stack}return{value:e,source:t,stack:i,digest:null}}function ns(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function da(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var x1=typeof WeakMap=="function"?WeakMap:Map;function Lh(e,t,n){n=Qt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Jl||(Jl=!0,wa=r),da(e,t)},n}function Mh(e,t,n){n=Qt(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){da(e,t)}}var l=e.stateNode;return l!==null&&typeof l.componentDidCatch=="function"&&(n.callback=function(){da(e,t),typeof r!="function"&&(yn===null?yn=new Set([this]):yn.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function ed(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new x1;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=j1.bind(null,e,t,n),t.then(e,e))}function td(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 nd(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Qt(-1,1),t.tag=2,xn(n,t,1))),n.lanes|=1),e)}var y1=Zt.ReactCurrentOwner,Xe=!1;function He(e,t,n,r){t.child=e===null?ch(t,null,n,r):_r(t,e.child,n,r)}function rd(e,t,n,r,i){n=n.render;var l=t.ref;return wr(t,i),r=yu(e,t,n,r,l,i),n=ku(),e!==null&&!Xe?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Jt(e,t,i)):(ye&&n&&ou(t),t.flags|=1,He(e,t,r,i),t.child)}function id(e,t,n,r,i){if(e===null){var l=n.type;return typeof l=="function"&&!Tu(l)&&l.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=l,Rh(e,t,l,r,i)):(e=Il(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(l=e.child,!(e.lanes&i)){var o=l.memoizedProps;if(n=n.compare,n=n!==null?n:bi,n(o,r)&&e.ref===t.ref)return Jt(e,t,i)}return t.flags|=1,e=vn(l,r),e.ref=t.ref,e.return=t,t.child=e}function Rh(e,t,n,r,i){if(e!==null){var l=e.memoizedProps;if(bi(l,r)&&e.ref===t.ref)if(Xe=!1,t.pendingProps=r=l,(e.lanes&i)!==0)e.flags&131072&&(Xe=!0);else return t.lanes=e.lanes,Jt(e,t,i)}return fa(e,t,n,r,i)}function Oh(e,t,n){var r=t.pendingProps,i=r.children,l=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},me(gr,lt),lt|=n;else{if(!(n&1073741824))return e=l!==null?l.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,me(gr,lt),lt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=l!==null?l.baseLanes:n,me(gr,lt),lt|=r}else l!==null?(r=l.baseLanes|n,t.memoizedState=null):r=n,me(gr,lt),lt|=r;return He(e,t,i,n),t.child}function Dh(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function fa(e,t,n,r,i){var l=Ze(n)?Hn:Be.current;return l=Cr(t,l),wr(t,i),n=yu(e,t,n,r,l,i),r=ku(),e!==null&&!Xe?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Jt(e,t,i)):(ye&&r&&ou(t),t.flags|=1,He(e,t,n,i),t.child)}function ld(e,t,n,r,i){if(Ze(n)){var l=!0;Bl(t)}else l=!1;if(wr(t,i),t.stateNode===null)Cl(e,t),Ah(t,n,r),ca(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,s=t.memoizedProps;o.props=s;var a=o.context,u=n.contextType;typeof u=="object"&&u!==null?u=xt(u):(u=Ze(n)?Hn:Be.current,u=Cr(t,u));var d=n.getDerivedStateFromProps,c=typeof d=="function"||typeof o.getSnapshotBeforeUpdate=="function";c||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(s!==r||a!==u)&&Zc(t,o,r,u),an=!1;var f=t.memoizedState;o.state=f,Kl(t,r,o,i),a=t.memoizedState,s!==r||f!==a||Je.current||an?(typeof d=="function"&&(ua(t,n,d,r),a=t.memoizedState),(s=an||Jc(t,n,s,r,f,a,u))?(c||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=a),o.props=r,o.state=a,o.context=u,r=s):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,fh(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:Ct(t.type,s),o.props=u,c=t.pendingProps,f=o.context,a=n.contextType,typeof a=="object"&&a!==null?a=xt(a):(a=Ze(n)?Hn:Be.current,a=Cr(t,a));var p=n.getDerivedStateFromProps;(d=typeof p=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(s!==c||f!==a)&&Zc(t,o,r,a),an=!1,f=t.memoizedState,o.state=f,Kl(t,r,o,i);var x=t.memoizedState;s!==c||f!==x||Je.current||an?(typeof p=="function"&&(ua(t,n,p,r),x=t.memoizedState),(u=an||Jc(t,n,u,r,f,x,a)||!1)?(d||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,x,a),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,x,a)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=x),o.props=r,o.state=x,o.context=a,r=u):(typeof o.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return pa(e,t,n,r,l,i)}function pa(e,t,n,r,i,l){Dh(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return i&&Hc(t,n,!1),Jt(e,t,l);r=t.stateNode,y1.current=t;var s=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=_r(t,e.child,null,l),t.child=_r(t,null,s,l)):He(e,t,s,l),t.memoizedState=r.state,i&&Hc(t,n,!0),t.child}function Fh(e){var t=e.stateNode;t.pendingContext?Uc(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Uc(e,t.context,!1),hu(e,t.containerInfo)}function od(e,t,n,r,i){return Er(),au(i),t.flags|=256,He(e,t,n,r),t.child}var ha={dehydrated:null,treeContext:null,retryLane:0};function ma(e){return{baseLanes:e,cachePool:null,transitions:null}}function $h(e,t,n){var r=t.pendingProps,i=ke.current,l=!1,o=(t.flags&128)!==0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(i&2)!==0),s?(l=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),me(ke,i&1),e===null)return sa(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,l?(r=t.mode,l=t.child,o={mode:"hidden",children:o},!(r&1)&&l!==null?(l.childLanes=0,l.pendingProps=o):l=vo(o,r,0,null),e=Vn(e,r,n,null),l.return=t,e.return=t,l.sibling=e,t.child=l,t.child.memoizedState=ma(n),t.memoizedState=ha,e):Su(t,o));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return k1(e,t,o,r,s,i,n);if(l){l=r.fallback,o=t.mode,i=e.child,s=i.sibling;var a={mode:"hidden",children:r.children};return!(o&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=a,t.deletions=null):(r=vn(i,a),r.subtreeFlags=i.subtreeFlags&14680064),s!==null?l=vn(s,l):(l=Vn(l,o,n,null),l.flags|=2),l.return=t,r.return=t,r.sibling=l,t.child=r,r=l,l=t.child,o=e.child.memoizedState,o=o===null?ma(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},l.memoizedState=o,l.childLanes=e.childLanes&~n,t.memoizedState=ha,r}return l=e.child,e=l.sibling,r=vn(l,{mode:"visible",children:r.children}),!(t.mode&1)&&(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 Su(e,t){return t=vo({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function ol(e,t,n,r){return r!==null&&au(r),_r(t,e.child,null,n),e=Su(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function k1(e,t,n,r,i,l,o){if(n)return t.flags&256?(t.flags&=-257,r=ns(Error(P(422))),ol(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(l=r.fallback,i=t.mode,r=vo({mode:"visible",children:r.children},i,0,null),l=Vn(l,i,o,null),l.flags|=2,r.return=t,l.return=t,r.sibling=l,t.child=r,t.mode&1&&_r(t,e.child,null,o),t.child.memoizedState=ma(o),t.memoizedState=ha,l);if(!(t.mode&1))return ol(e,t,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var s=r.dgst;return r=s,l=Error(P(419)),r=ns(l,r,void 0),ol(e,t,o,r)}if(s=(o&e.childLanes)!==0,Xe||s){if(r=Pe,r!==null){switch(o&-o){case 4:i=2;break;case 16:i=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:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|o)?0:i,i!==0&&i!==l.retryLane&&(l.retryLane=i,Xt(e,i),Nt(r,e,i,-1))}return Nu(),r=ns(Error(P(421))),ol(e,t,o,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=P1.bind(null,e),i._reactRetry=t,null):(e=l.treeContext,ot=gn(i.nextSibling),st=t,ye=!0,_t=null,e!==null&&(ft[pt++]=qt,ft[pt++]=Kt,ft[pt++]=Wn,qt=e.id,Kt=e.overflow,Wn=t),t=Su(t,r.children),t.flags|=4096,t)}function sd(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),aa(e.return,t,n)}function rs(e,t,n,r,i){var l=e.memoizedState;l===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(l.isBackwards=t,l.rendering=null,l.renderingStartTime=0,l.last=r,l.tail=n,l.tailMode=i)}function Vh(e,t,n){var r=t.pendingProps,i=r.revealOrder,l=r.tail;if(He(e,t,r.children,n),r=ke.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&sd(e,n,t);else if(e.tag===19)sd(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(me(ke,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Ql(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),rs(t,!1,i,n,l);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Ql(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}rs(t,!0,n,null,l);break;case"together":rs(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Cl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Jt(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Kn|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(P(153));if(t.child!==null){for(e=t.child,n=vn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=vn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function v1(e,t,n){switch(t.tag){case 3:Fh(t),Er();break;case 5:ph(t);break;case 1:Ze(t.type)&&Bl(t);break;case 4:hu(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;me(Wl,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(me(ke,ke.current&1),t.flags|=128,null):n&t.child.childLanes?$h(e,t,n):(me(ke,ke.current&1),e=Jt(e,t,n),e!==null?e.sibling:null);me(ke,ke.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Vh(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),me(ke,ke.current),r)break;return null;case 22:case 23:return t.lanes=0,Oh(e,t,n)}return Jt(e,t,n)}var Bh,ga,Uh,Hh;Bh=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}};ga=function(){};Uh=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Fn(Dt.current);var l=null;switch(n){case"input":i=Ds(e,i),r=Ds(e,r),l=[];break;case"select":i=we({},i,{value:void 0}),r=we({},r,{value:void 0}),l=[];break;case"textarea":i=Vs(e,i),r=Vs(e,r),l=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=$l)}Us(n,r);var o;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var s=i[u];for(o in s)s.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(gi.hasOwnProperty(u)?l||(l=[]):(l=l||[]).push(u,null));for(u in r){var a=r[u];if(s=i!=null?i[u]:void 0,r.hasOwnProperty(u)&&a!==s&&(a!=null||s!=null))if(u==="style")if(s){for(o in s)!s.hasOwnProperty(o)||a&&a.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in a)a.hasOwnProperty(o)&&s[o]!==a[o]&&(n||(n={}),n[o]=a[o])}else n||(l||(l=[]),l.push(u,n)),n=a;else u==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,s=s?s.__html:void 0,a!=null&&s!==a&&(l=l||[]).push(u,a)):u==="children"?typeof a!="string"&&typeof a!="number"||(l=l||[]).push(u,""+a):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(gi.hasOwnProperty(u)?(a!=null&&u==="onScroll"&&ge("scroll",e),l||s===a||(l=[])):(l=l||[]).push(u,a))}n&&(l=l||[]).push("style",n);var u=l;(t.updateQueue=u)&&(t.flags|=4)}};Hh=function(e,t,n,r){n!==r&&(t.flags|=4)};function qr(e,t){if(!ye)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 Fe(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function w1(e,t,n){var r=t.pendingProps;switch(su(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Fe(t),null;case 1:return Ze(t.type)&&Vl(),Fe(t),null;case 3:return r=t.stateNode,Ir(),xe(Je),xe(Be),gu(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(il(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,_t!==null&&(Ca(_t),_t=null))),ga(e,t),Fe(t),null;case 5:mu(t);var i=Fn(Ni.current);if(n=t.type,e!==null&&t.stateNode!=null)Uh(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(P(166));return Fe(t),null}if(e=Fn(Dt.current),il(t)){r=t.stateNode,n=t.type;var l=t.memoizedProps;switch(r[Rt]=t,r[_i]=l,e=(t.mode&1)!==0,n){case"dialog":ge("cancel",r),ge("close",r);break;case"iframe":case"object":case"embed":ge("load",r);break;case"video":case"audio":for(i=0;i<ni.length;i++)ge(ni[i],r);break;case"source":ge("error",r);break;case"img":case"image":case"link":ge("error",r),ge("load",r);break;case"details":ge("toggle",r);break;case"input":gc(r,l),ge("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!l.multiple},ge("invalid",r);break;case"textarea":yc(r,l),ge("invalid",r)}Us(n,l),i=null;for(var o in l)if(l.hasOwnProperty(o)){var s=l[o];o==="children"?typeof s=="string"?r.textContent!==s&&(l.suppressHydrationWarning!==!0&&rl(r.textContent,s,e),i=["children",s]):typeof s=="number"&&r.textContent!==""+s&&(l.suppressHydrationWarning!==!0&&rl(r.textContent,s,e),i=["children",""+s]):gi.hasOwnProperty(o)&&s!=null&&o==="onScroll"&&ge("scroll",r)}switch(n){case"input":Gi(r),xc(r,l,!0);break;case"textarea":Gi(r),kc(r);break;case"select":case"option":break;default:typeof l.onClick=="function"&&(r.onclick=$l)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=yp(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[Rt]=t,e[_i]=r,Bh(e,t,!1,!1),t.stateNode=e;e:{switch(o=Hs(n,r),n){case"dialog":ge("cancel",e),ge("close",e),i=r;break;case"iframe":case"object":case"embed":ge("load",e),i=r;break;case"video":case"audio":for(i=0;i<ni.length;i++)ge(ni[i],e);i=r;break;case"source":ge("error",e),i=r;break;case"img":case"image":case"link":ge("error",e),ge("load",e),i=r;break;case"details":ge("toggle",e),i=r;break;case"input":gc(e,r),i=Ds(e,r),ge("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=we({},r,{value:void 0}),ge("invalid",e);break;case"textarea":yc(e,r),i=Vs(e,r),ge("invalid",e);break;default:i=r}Us(n,i),s=i;for(l in s)if(s.hasOwnProperty(l)){var a=s[l];l==="style"?wp(e,a):l==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,a!=null&&kp(e,a)):l==="children"?typeof a=="string"?(n!=="textarea"||a!=="")&&xi(e,a):typeof a=="number"&&xi(e,""+a):l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&l!=="autoFocus"&&(gi.hasOwnProperty(l)?a!=null&&l==="onScroll"&&ge("scroll",e):a!=null&&qa(e,l,a,o))}switch(n){case"input":Gi(e),xc(e,r,!1);break;case"textarea":Gi(e),kc(e);break;case"option":r.value!=null&&e.setAttribute("value",""+wn(r.value));break;case"select":e.multiple=!!r.multiple,l=r.value,l!=null?xr(e,!!r.multiple,l,!1):r.defaultValue!=null&&xr(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=$l)}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 Fe(t),null;case 6:if(e&&t.stateNode!=null)Hh(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(P(166));if(n=Fn(Ni.current),Fn(Dt.current),il(t)){if(r=t.stateNode,n=t.memoizedProps,r[Rt]=t,(l=r.nodeValue!==n)&&(e=st,e!==null))switch(e.tag){case 3:rl(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&rl(r.nodeValue,n,(e.mode&1)!==0)}l&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Rt]=t,t.stateNode=r}return Fe(t),null;case 13:if(xe(ke),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ye&&ot!==null&&t.mode&1&&!(t.flags&128))ah(),Er(),t.flags|=98560,l=!1;else if(l=il(t),r!==null&&r.dehydrated!==null){if(e===null){if(!l)throw Error(P(318));if(l=t.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(P(317));l[Rt]=t}else Er(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Fe(t),l=!1}else _t!==null&&(Ca(_t),_t=null),l=!0;if(!l)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||ke.current&1?Te===0&&(Te=3):Nu())),t.updateQueue!==null&&(t.flags|=4),Fe(t),null);case 4:return Ir(),ga(e,t),e===null&&Ci(t.stateNode.containerInfo),Fe(t),null;case 10:return du(t.type._context),Fe(t),null;case 17:return Ze(t.type)&&Vl(),Fe(t),null;case 19:if(xe(ke),l=t.memoizedState,l===null)return Fe(t),null;if(r=(t.flags&128)!==0,o=l.rendering,o===null)if(r)qr(l,!1);else{if(Te!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Ql(e),o!==null){for(t.flags|=128,qr(l,!1),r=o.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,o=l.alternate,o===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=o.childLanes,l.lanes=o.lanes,l.child=o.child,l.subtreeFlags=0,l.deletions=null,l.memoizedProps=o.memoizedProps,l.memoizedState=o.memoizedState,l.updateQueue=o.updateQueue,l.type=o.type,e=o.dependencies,l.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return me(ke,ke.current&1|2),t.child}e=e.sibling}l.tail!==null&&Ce()>Tr&&(t.flags|=128,r=!0,qr(l,!1),t.lanes=4194304)}else{if(!r)if(e=Ql(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),qr(l,!0),l.tail===null&&l.tailMode==="hidden"&&!o.alternate&&!ye)return Fe(t),null}else 2*Ce()-l.renderingStartTime>Tr&&n!==1073741824&&(t.flags|=128,r=!0,qr(l,!1),t.lanes=4194304);l.isBackwards?(o.sibling=t.child,t.child=o):(n=l.last,n!==null?n.sibling=o:t.child=o,l.last=o)}return l.tail!==null?(t=l.tail,l.rendering=t,l.tail=t.sibling,l.renderingStartTime=Ce(),t.sibling=null,n=ke.current,me(ke,r?n&1|2:n&1),t):(Fe(t),null);case 22:case 23:return Iu(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?lt&1073741824&&(Fe(t),t.subtreeFlags&6&&(t.flags|=8192)):Fe(t),null;case 24:return null;case 25:return null}throw Error(P(156,t.tag))}function S1(e,t){switch(su(t),t.tag){case 1:return Ze(t.type)&&Vl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ir(),xe(Je),xe(Be),gu(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return mu(t),null;case 13:if(xe(ke),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(P(340));Er()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return xe(ke),null;case 4:return Ir(),null;case 10:return du(t.type._context),null;case 22:case 23:return Iu(),null;case 24:return null;default:return null}}var sl=!1,$e=!1,b1=typeof WeakSet=="function"?WeakSet:Set,$=null;function mr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){be(e,t,r)}else n.current=null}function xa(e,t,n){try{n()}catch(r){be(e,t,r)}}var ad=!1;function C1(e,t){if(ea=Ol,e=Gp(),lu(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 i=r.anchorOffset,l=r.focusNode;r=r.focusOffset;try{n.nodeType,l.nodeType}catch{n=null;break e}var o=0,s=-1,a=-1,u=0,d=0,c=e,f=null;t:for(;;){for(var p;c!==n||i!==0&&c.nodeType!==3||(s=o+i),c!==l||r!==0&&c.nodeType!==3||(a=o+r),c.nodeType===3&&(o+=c.nodeValue.length),(p=c.firstChild)!==null;)f=c,c=p;for(;;){if(c===e)break t;if(f===n&&++u===i&&(s=o),f===l&&++d===r&&(a=o),(p=c.nextSibling)!==null)break;c=f,f=c.parentNode}c=p}n=s===-1||a===-1?null:{start:s,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(ta={focusedElem:e,selectionRange:n},Ol=!1,$=t;$!==null;)if(t=$,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,$=e;else for(;$!==null;){t=$;try{var x=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(x!==null){var v=x.memoizedProps,E=x.memoizedState,h=t.stateNode,g=h.getSnapshotBeforeUpdate(t.elementType===t.type?v:Ct(t.type,v),E);h.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var k=t.stateNode.containerInfo;k.nodeType===1?k.textContent="":k.nodeType===9&&k.documentElement&&k.removeChild(k.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(P(163))}}catch(C){be(t,t.return,C)}if(e=t.sibling,e!==null){e.return=t.return,$=e;break}$=t.return}return x=ad,ad=!1,x}function ci(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var l=i.destroy;i.destroy=void 0,l!==void 0&&xa(t,n,l)}i=i.next}while(i!==r)}}function yo(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 ya(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 Wh(e){var t=e.alternate;t!==null&&(e.alternate=null,Wh(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Rt],delete t[_i],delete t[ia],delete t[o1],delete t[s1])),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 qh(e){return e.tag===5||e.tag===3||e.tag===4}function ud(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||qh(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 ka(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=$l));else if(r!==4&&(e=e.child,e!==null))for(ka(e,t,n),e=e.sibling;e!==null;)ka(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 Me=null,Et=!1;function nn(e,t,n){for(n=n.child;n!==null;)Kh(e,t,n),n=n.sibling}function Kh(e,t,n){if(Ot&&typeof Ot.onCommitFiberUnmount=="function")try{Ot.onCommitFiberUnmount(uo,n)}catch{}switch(n.tag){case 5:$e||mr(n,t);case 6:var r=Me,i=Et;Me=null,nn(e,t,n),Me=r,Et=i,Me!==null&&(Et?(e=Me,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Me.removeChild(n.stateNode));break;case 18:Me!==null&&(Et?(e=Me,n=n.stateNode,e.nodeType===8?Yo(e.parentNode,n):e.nodeType===1&&Yo(e,n),wi(e)):Yo(Me,n.stateNode));break;case 4:r=Me,i=Et,Me=n.stateNode.containerInfo,Et=!0,nn(e,t,n),Me=r,Et=i;break;case 0:case 11:case 14:case 15:if(!$e&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var l=i,o=l.destroy;l=l.tag,o!==void 0&&(l&2||l&4)&&xa(n,t,o),i=i.next}while(i!==r)}nn(e,t,n);break;case 1:if(!$e&&(mr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){be(n,t,s)}nn(e,t,n);break;case 21:nn(e,t,n);break;case 22:n.mode&1?($e=(r=$e)||n.memoizedState!==null,nn(e,t,n),$e=r):nn(e,t,n);break;default:nn(e,t,n)}}function cd(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new b1),t.forEach(function(r){var i=A1.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function bt(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var l=e,o=t,s=o;e:for(;s!==null;){switch(s.tag){case 5:Me=s.stateNode,Et=!1;break e;case 3:Me=s.stateNode.containerInfo,Et=!0;break e;case 4:Me=s.stateNode.containerInfo,Et=!0;break e}s=s.return}if(Me===null)throw Error(P(160));Kh(l,o,i),Me=null,Et=!1;var a=i.alternate;a!==null&&(a.return=null),i.return=null}catch(u){be(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Qh(t,e),t=t.sibling}function Qh(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(bt(t,e),jt(e),r&4){try{ci(3,e,e.return),yo(3,e)}catch(v){be(e,e.return,v)}try{ci(5,e,e.return)}catch(v){be(e,e.return,v)}}break;case 1:bt(t,e),jt(e),r&512&&n!==null&&mr(n,n.return);break;case 5:if(bt(t,e),jt(e),r&512&&n!==null&&mr(n,n.return),e.flags&32){var i=e.stateNode;try{xi(i,"")}catch(v){be(e,e.return,v)}}if(r&4&&(i=e.stateNode,i!=null)){var l=e.memoizedProps,o=n!==null?n.memoizedProps:l,s=e.type,a=e.updateQueue;if(e.updateQueue=null,a!==null)try{s==="input"&&l.type==="radio"&&l.name!=null&&gp(i,l),Hs(s,o);var u=Hs(s,l);for(o=0;o<a.length;o+=2){var d=a[o],c=a[o+1];d==="style"?wp(i,c):d==="dangerouslySetInnerHTML"?kp(i,c):d==="children"?xi(i,c):qa(i,d,c,u)}switch(s){case"input":Fs(i,l);break;case"textarea":xp(i,l);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!l.multiple;var p=l.value;p!=null?xr(i,!!l.multiple,p,!1):f!==!!l.multiple&&(l.defaultValue!=null?xr(i,!!l.multiple,l.defaultValue,!0):xr(i,!!l.multiple,l.multiple?[]:"",!1))}i[_i]=l}catch(v){be(e,e.return,v)}}break;case 6:if(bt(t,e),jt(e),r&4){if(e.stateNode===null)throw Error(P(162));i=e.stateNode,l=e.memoizedProps;try{i.nodeValue=l}catch(v){be(e,e.return,v)}}break;case 3:if(bt(t,e),jt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{wi(t.containerInfo)}catch(v){be(e,e.return,v)}break;case 4:bt(t,e),jt(e);break;case 13:bt(t,e),jt(e),i=e.child,i.flags&8192&&(l=i.memoizedState!==null,i.stateNode.isHidden=l,!l||i.alternate!==null&&i.alternate.memoizedState!==null||(Eu=Ce())),r&4&&cd(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?($e=(u=$e)||d,bt(t,e),$e=u):bt(t,e),jt(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for($=e,d=e.child;d!==null;){for(c=$=d;$!==null;){switch(f=$,p=f.child,f.tag){case 0:case 11:case 14:case 15:ci(4,f,f.return);break;case 1:mr(f,f.return);var x=f.stateNode;if(typeof x.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,x.props=t.memoizedProps,x.state=t.memoizedState,x.componentWillUnmount()}catch(v){be(r,n,v)}}break;case 5:mr(f,f.return);break;case 22:if(f.memoizedState!==null){fd(c);continue}}p!==null?(p.return=f,$=p):fd(c)}d=d.sibling}e:for(d=null,c=e;;){if(c.tag===5){if(d===null){d=c;try{i=c.stateNode,u?(l=i.style,typeof l.setProperty=="function"?l.setProperty("display","none","important"):l.display="none"):(s=c.stateNode,a=c.memoizedProps.style,o=a!=null&&a.hasOwnProperty("display")?a.display:null,s.style.display=vp("display",o))}catch(v){be(e,e.return,v)}}}else if(c.tag===6){if(d===null)try{c.stateNode.nodeValue=u?"":c.memoizedProps}catch(v){be(e,e.return,v)}}else if((c.tag!==22&&c.tag!==23||c.memoizedState===null||c===e)&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===e)break e;for(;c.sibling===null;){if(c.return===null||c.return===e)break e;d===c&&(d=null),c=c.return}d===c&&(d=null),c.sibling.return=c.return,c=c.sibling}}break;case 19:bt(t,e),jt(e),r&4&&cd(e);break;case 21:break;default:bt(t,e),jt(e)}}function jt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(qh(n)){var r=n;break e}n=n.return}throw Error(P(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(xi(i,""),r.flags&=-33);var l=ud(e);va(e,l,i);break;case 3:case 4:var o=r.stateNode.containerInfo,s=ud(e);ka(e,s,o);break;default:throw Error(P(161))}}catch(a){be(e,e.return,a)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function E1(e,t,n){$=e,Gh(e)}function Gh(e,t,n){for(var r=(e.mode&1)!==0;$!==null;){var i=$,l=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||sl;if(!o){var s=i.alternate,a=s!==null&&s.memoizedState!==null||$e;s=sl;var u=$e;if(sl=o,($e=a)&&!u)for($=i;$!==null;)o=$,a=o.child,o.tag===22&&o.memoizedState!==null?pd(i):a!==null?(a.return=o,$=a):pd(i);for(;l!==null;)$=l,Gh(l),l=l.sibling;$=i,sl=s,$e=u}dd(e)}else i.subtreeFlags&8772&&l!==null?(l.return=i,$=l):dd(e)}}function dd(e){for(;$!==null;){var t=$;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:$e||yo(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!$e)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:Ct(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var l=t.updateQueue;l!==null&&Gc(t,l,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Gc(t,o,n)}break;case 5:var s=t.stateNode;if(n===null&&t.flags&4){n=s;var a=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":a.autoFocus&&n.focus();break;case"img":a.src&&(n.src=a.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var c=d.dehydrated;c!==null&&wi(c)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(P(163))}$e||t.flags&512&&ya(t)}catch(f){be(t,t.return,f)}}if(t===e){$=null;break}if(n=t.sibling,n!==null){n.return=t.return,$=n;break}$=t.return}}function fd(e){for(;$!==null;){var t=$;if(t===e){$=null;break}var n=t.sibling;if(n!==null){n.return=t.return,$=n;break}$=t.return}}function pd(e){for(;$!==null;){var t=$;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{yo(4,t)}catch(a){be(t,n,a)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(a){be(t,i,a)}}var l=t.return;try{ya(t)}catch(a){be(t,l,a)}break;case 5:var o=t.return;try{ya(t)}catch(a){be(t,o,a)}}}catch(a){be(t,t.return,a)}if(t===e){$=null;break}var s=t.sibling;if(s!==null){s.return=t.return,$=s;break}$=t.return}}var _1=Math.ceil,Xl=Zt.ReactCurrentDispatcher,bu=Zt.ReactCurrentOwner,gt=Zt.ReactCurrentBatchConfig,le=0,Pe=null,_e=null,Re=0,lt=0,gr=Cn(0),Te=0,Pi=null,Kn=0,ko=0,Cu=0,di=null,Ye=null,Eu=0,Tr=1/0,Ut=null,Jl=!1,wa=null,yn=null,al=!1,fn=null,Zl=0,fi=0,Sa=null,El=-1,_l=0;function qe(){return le&6?Ce():El!==-1?El:El=Ce()}function kn(e){return e.mode&1?le&2&&Re!==0?Re&-Re:u1.transition!==null?(_l===0&&(_l=Ap()),_l):(e=se,e!==0||(e=window.event,e=e===void 0?16:$p(e.type)),e):1}function Nt(e,t,n,r){if(50<fi)throw fi=0,Sa=null,Error(P(185));Fi(e,n,r),(!(le&2)||e!==Pe)&&(e===Pe&&(!(le&2)&&(ko|=n),Te===4&&cn(e,Re)),et(e,r),n===1&&le===0&&!(t.mode&1)&&(Tr=Ce()+500,mo&&En()))}function et(e,t){var n=e.callbackNode;uy(e,t);var r=Rl(e,e===Pe?Re:0);if(r===0)n!==null&&Sc(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Sc(n),t===1)e.tag===0?a1(hd.bind(null,e)):lh(hd.bind(null,e)),i1(function(){!(le&6)&&En()}),n=null;else{switch(Lp(r)){case 1:n=Xa;break;case 4:n=jp;break;case 16:n=Ml;break;case 536870912:n=Pp;break;default:n=Ml}n=rm(n,Yh.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Yh(e,t){if(El=-1,_l=0,le&6)throw Error(P(327));var n=e.callbackNode;if(Sr()&&e.callbackNode!==n)return null;var r=Rl(e,e===Pe?Re:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=eo(e,r);else{t=r;var i=le;le|=2;var l=Jh();(Pe!==e||Re!==t)&&(Ut=null,Tr=Ce()+500,$n(e,t));do try{T1();break}catch(s){Xh(e,s)}while(!0);cu(),Xl.current=l,le=i,_e!==null?t=0:(Pe=null,Re=0,t=Te)}if(t!==0){if(t===2&&(i=Gs(e),i!==0&&(r=i,t=ba(e,i))),t===1)throw n=Pi,$n(e,0),cn(e,r),et(e,Ce()),n;if(t===6)cn(e,r);else{if(i=e.current.alternate,!(r&30)&&!I1(i)&&(t=eo(e,r),t===2&&(l=Gs(e),l!==0&&(r=l,t=ba(e,l))),t===1))throw n=Pi,$n(e,0),cn(e,r),et(e,Ce()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(P(345));case 2:Ln(e,Ye,Ut);break;case 3:if(cn(e,r),(r&130023424)===r&&(t=Eu+500-Ce(),10<t)){if(Rl(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){qe(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=ra(Ln.bind(null,e,Ye,Ut),t);break}Ln(e,Ye,Ut);break;case 4:if(cn(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-It(r);l=1<<o,o=t[o],o>i&&(i=o),r&=~l}if(r=i,r=Ce()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*_1(r/1960))-r,10<r){e.timeoutHandle=ra(Ln.bind(null,e,Ye,Ut),r);break}Ln(e,Ye,Ut);break;case 5:Ln(e,Ye,Ut);break;default:throw Error(P(329))}}}return et(e,Ce()),e.callbackNode===n?Yh.bind(null,e):null}function ba(e,t){var n=di;return e.current.memoizedState.isDehydrated&&($n(e,t).flags|=256),e=eo(e,t),e!==2&&(t=Ye,Ye=n,t!==null&&Ca(t)),e}function Ca(e){Ye===null?Ye=e:Ye.push.apply(Ye,e)}function I1(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 i=n[r],l=i.getSnapshot;i=i.value;try{if(!zt(l(),i))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 cn(e,t){for(t&=~Cu,t&=~ko,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-It(t),r=1<<n;e[n]=-1,t&=~r}}function hd(e){if(le&6)throw Error(P(327));Sr();var t=Rl(e,0);if(!(t&1))return et(e,Ce()),null;var n=eo(e,t);if(e.tag!==0&&n===2){var r=Gs(e);r!==0&&(t=r,n=ba(e,r))}if(n===1)throw n=Pi,$n(e,0),cn(e,t),et(e,Ce()),n;if(n===6)throw Error(P(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ln(e,Ye,Ut),et(e,Ce()),null}function _u(e,t){var n=le;le|=1;try{return e(t)}finally{le=n,le===0&&(Tr=Ce()+500,mo&&En())}}function Qn(e){fn!==null&&fn.tag===0&&!(le&6)&&Sr();var t=le;le|=1;var n=gt.transition,r=se;try{if(gt.transition=null,se=1,e)return e()}finally{se=r,gt.transition=n,le=t,!(le&6)&&En()}}function Iu(){lt=gr.current,xe(gr)}function $n(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,r1(n)),_e!==null)for(n=_e.return;n!==null;){var r=n;switch(su(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Vl();break;case 3:Ir(),xe(Je),xe(Be),gu();break;case 5:mu(r);break;case 4:Ir();break;case 13:xe(ke);break;case 19:xe(ke);break;case 10:du(r.type._context);break;case 22:case 23:Iu()}n=n.return}if(Pe=e,_e=e=vn(e.current,null),Re=lt=t,Te=0,Pi=null,Cu=ko=Kn=0,Ye=di=null,Dn!==null){for(t=0;t<Dn.length;t++)if(n=Dn[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,l=n.pending;if(l!==null){var o=l.next;l.next=i,r.next=o}n.pending=r}Dn=null}return e}function Xh(e,t){do{var n=_e;try{if(cu(),Sl.current=Yl,Gl){for(var r=ve.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}Gl=!1}if(qn=0,ze=Ne=ve=null,ui=!1,Ti=0,bu.current=null,n===null||n.return===null){Te=1,Pi=t,_e=null;break}e:{var l=e,o=n.return,s=n,a=t;if(t=Re,s.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){var u=a,d=s,c=d.tag;if(!(d.mode&1)&&(c===0||c===11||c===15)){var f=d.alternate;f?(d.updateQueue=f.updateQueue,d.memoizedState=f.memoizedState,d.lanes=f.lanes):(d.updateQueue=null,d.memoizedState=null)}var p=td(o);if(p!==null){p.flags&=-257,nd(p,o,s,l,t),p.mode&1&&ed(l,u,t),t=p,a=u;var x=t.updateQueue;if(x===null){var v=new Set;v.add(a),t.updateQueue=v}else x.add(a);break e}else{if(!(t&1)){ed(l,u,t),Nu();break e}a=Error(P(426))}}else if(ye&&s.mode&1){var E=td(o);if(E!==null){!(E.flags&65536)&&(E.flags|=256),nd(E,o,s,l,t),au(Nr(a,s));break e}}l=a=Nr(a,s),Te!==4&&(Te=2),di===null?di=[l]:di.push(l),l=o;do{switch(l.tag){case 3:l.flags|=65536,t&=-t,l.lanes|=t;var h=Lh(l,a,t);Qc(l,h);break e;case 1:s=a;var g=l.type,k=l.stateNode;if(!(l.flags&128)&&(typeof g.getDerivedStateFromError=="function"||k!==null&&typeof k.componentDidCatch=="function"&&(yn===null||!yn.has(k)))){l.flags|=65536,t&=-t,l.lanes|=t;var C=Mh(l,s,t);Qc(l,C);break e}}l=l.return}while(l!==null)}em(n)}catch(N){t=N,_e===n&&n!==null&&(_e=n=n.return);continue}break}while(!0)}function Jh(){var e=Xl.current;return Xl.current=Yl,e===null?Yl:e}function Nu(){(Te===0||Te===3||Te===2)&&(Te=4),Pe===null||!(Kn&268435455)&&!(ko&268435455)||cn(Pe,Re)}function eo(e,t){var n=le;le|=2;var r=Jh();(Pe!==e||Re!==t)&&(Ut=null,$n(e,t));do try{N1();break}catch(i){Xh(e,i)}while(!0);if(cu(),le=n,Xl.current=r,_e!==null)throw Error(P(261));return Pe=null,Re=0,Te}function N1(){for(;_e!==null;)Zh(_e)}function T1(){for(;_e!==null&&!ey();)Zh(_e)}function Zh(e){var t=nm(e.alternate,e,lt);e.memoizedProps=e.pendingProps,t===null?em(e):_e=t,bu.current=null}function em(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=S1(n,t),n!==null){n.flags&=32767,_e=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Te=6,_e=null;return}}else if(n=w1(n,t,lt),n!==null){_e=n;return}if(t=t.sibling,t!==null){_e=t;return}_e=t=e}while(t!==null);Te===0&&(Te=5)}function Ln(e,t,n){var r=se,i=gt.transition;try{gt.transition=null,se=1,z1(e,t,n,r)}finally{gt.transition=i,se=r}return null}function z1(e,t,n,r){do Sr();while(fn!==null);if(le&6)throw Error(P(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(P(177));e.callbackNode=null,e.callbackPriority=0;var l=n.lanes|n.childLanes;if(cy(e,l),e===Pe&&(_e=Pe=null,Re=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||al||(al=!0,rm(Ml,function(){return Sr(),null})),l=(n.flags&15990)!==0,n.subtreeFlags&15990||l){l=gt.transition,gt.transition=null;var o=se;se=1;var s=le;le|=4,bu.current=null,C1(e,n),Qh(n,e),Yy(ta),Ol=!!ea,ta=ea=null,e.current=n,E1(n),ty(),le=s,se=o,gt.transition=l}else e.current=n;if(al&&(al=!1,fn=e,Zl=i),l=e.pendingLanes,l===0&&(yn=null),iy(n.stateNode),et(e,Ce()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(Jl)throw Jl=!1,e=wa,wa=null,e;return Zl&1&&e.tag!==0&&Sr(),l=e.pendingLanes,l&1?e===Sa?fi++:(fi=0,Sa=e):fi=0,En(),null}function Sr(){if(fn!==null){var e=Lp(Zl),t=gt.transition,n=se;try{if(gt.transition=null,se=16>e?16:e,fn===null)var r=!1;else{if(e=fn,fn=null,Zl=0,le&6)throw Error(P(331));var i=le;for(le|=4,$=e.current;$!==null;){var l=$,o=l.child;if($.flags&16){var s=l.deletions;if(s!==null){for(var a=0;a<s.length;a++){var u=s[a];for($=u;$!==null;){var d=$;switch(d.tag){case 0:case 11:case 15:ci(8,d,l)}var c=d.child;if(c!==null)c.return=d,$=c;else for(;$!==null;){d=$;var f=d.sibling,p=d.return;if(Wh(d),d===u){$=null;break}if(f!==null){f.return=p,$=f;break}$=p}}}var x=l.alternate;if(x!==null){var v=x.child;if(v!==null){x.child=null;do{var E=v.sibling;v.sibling=null,v=E}while(v!==null)}}$=l}}if(l.subtreeFlags&2064&&o!==null)o.return=l,$=o;else e:for(;$!==null;){if(l=$,l.flags&2048)switch(l.tag){case 0:case 11:case 15:ci(9,l,l.return)}var h=l.sibling;if(h!==null){h.return=l.return,$=h;break e}$=l.return}}var g=e.current;for($=g;$!==null;){o=$;var k=o.child;if(o.subtreeFlags&2064&&k!==null)k.return=o,$=k;else e:for(o=g;$!==null;){if(s=$,s.flags&2048)try{switch(s.tag){case 0:case 11:case 15:yo(9,s)}}catch(N){be(s,s.return,N)}if(s===o){$=null;break e}var C=s.sibling;if(C!==null){C.return=s.return,$=C;break e}$=s.return}}if(le=i,En(),Ot&&typeof Ot.onPostCommitFiberRoot=="function")try{Ot.onPostCommitFiberRoot(uo,e)}catch{}r=!0}return r}finally{se=n,gt.transition=t}}return!1}function md(e,t,n){t=Nr(n,t),t=Lh(e,t,1),e=xn(e,t,1),t=qe(),e!==null&&(Fi(e,1,t),et(e,t))}function be(e,t,n){if(e.tag===3)md(e,e,n);else for(;t!==null;){if(t.tag===3){md(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(yn===null||!yn.has(r))){e=Nr(n,e),e=Mh(t,e,1),t=xn(t,e,1),e=qe(),t!==null&&(Fi(t,1,e),et(t,e));break}}t=t.return}}function j1(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=qe(),e.pingedLanes|=e.suspendedLanes&n,Pe===e&&(Re&n)===n&&(Te===4||Te===3&&(Re&130023424)===Re&&500>Ce()-Eu?$n(e,0):Cu|=n),et(e,t)}function tm(e,t){t===0&&(e.mode&1?(t=Ji,Ji<<=1,!(Ji&130023424)&&(Ji=4194304)):t=1);var n=qe();e=Xt(e,t),e!==null&&(Fi(e,t,n),et(e,n))}function P1(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),tm(e,n)}function A1(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(P(314))}r!==null&&r.delete(t),tm(e,n)}var nm;nm=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Je.current)Xe=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Xe=!1,v1(e,t,n);Xe=!!(e.flags&131072)}else Xe=!1,ye&&t.flags&1048576&&oh(t,Hl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Cl(e,t),e=t.pendingProps;var i=Cr(t,Be.current);wr(t,n),i=yu(null,t,r,e,i,n);var l=ku();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ze(r)?(l=!0,Bl(t)):l=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,pu(t),i.updater=xo,t.stateNode=i,i._reactInternals=t,ca(t,r,e,n),t=pa(null,t,r,!0,l,n)):(t.tag=0,ye&&l&&ou(t),He(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Cl(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=M1(r),e=Ct(r,e),i){case 0:t=fa(null,t,r,e,n);break e;case 1:t=ld(null,t,r,e,n);break e;case 11:t=rd(null,t,r,e,n);break e;case 14:t=id(null,t,r,Ct(r.type,e),n);break e}throw Error(P(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ct(r,i),fa(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ct(r,i),ld(e,t,r,i,n);case 3:e:{if(Fh(t),e===null)throw Error(P(387));r=t.pendingProps,l=t.memoizedState,i=l.element,fh(e,t),Kl(t,r,null,n);var o=t.memoizedState;if(r=o.element,l.isDehydrated)if(l={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=l,t.memoizedState=l,t.flags&256){i=Nr(Error(P(423)),t),t=od(e,t,r,n,i);break e}else if(r!==i){i=Nr(Error(P(424)),t),t=od(e,t,r,n,i);break e}else for(ot=gn(t.stateNode.containerInfo.firstChild),st=t,ye=!0,_t=null,n=ch(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Er(),r===i){t=Jt(e,t,n);break e}He(e,t,r,n)}t=t.child}return t;case 5:return ph(t),e===null&&sa(t),r=t.type,i=t.pendingProps,l=e!==null?e.memoizedProps:null,o=i.children,na(r,i)?o=null:l!==null&&na(r,l)&&(t.flags|=32),Dh(e,t),He(e,t,o,n),t.child;case 6:return e===null&&sa(t),null;case 13:return $h(e,t,n);case 4:return hu(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=_r(t,null,r,n):He(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ct(r,i),rd(e,t,r,i,n);case 7:return He(e,t,t.pendingProps,n),t.child;case 8:return He(e,t,t.pendingProps.children,n),t.child;case 12:return He(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,l=t.memoizedProps,o=i.value,me(Wl,r._currentValue),r._currentValue=o,l!==null)if(zt(l.value,o)){if(l.children===i.children&&!Je.current){t=Jt(e,t,n);break e}}else for(l=t.child,l!==null&&(l.return=t);l!==null;){var s=l.dependencies;if(s!==null){o=l.child;for(var a=s.firstContext;a!==null;){if(a.context===r){if(l.tag===1){a=Qt(-1,n&-n),a.tag=2;var u=l.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?a.next=a:(a.next=d.next,d.next=a),u.pending=a}}l.lanes|=n,a=l.alternate,a!==null&&(a.lanes|=n),aa(l.return,n,t),s.lanes|=n;break}a=a.next}}else if(l.tag===10)o=l.type===t.type?null:l.child;else if(l.tag===18){if(o=l.return,o===null)throw Error(P(341));o.lanes|=n,s=o.alternate,s!==null&&(s.lanes|=n),aa(o,n,t),o=l.sibling}else o=l.child;if(o!==null)o.return=l;else for(o=l;o!==null;){if(o===t){o=null;break}if(l=o.sibling,l!==null){l.return=o.return,o=l;break}o=o.return}l=o}He(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,wr(t,n),i=xt(i),r=r(i),t.flags|=1,He(e,t,r,n),t.child;case 14:return r=t.type,i=Ct(r,t.pendingProps),i=Ct(r.type,i),id(e,t,r,i,n);case 15:return Rh(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ct(r,i),Cl(e,t),t.tag=1,Ze(r)?(e=!0,Bl(t)):e=!1,wr(t,n),Ah(t,r,i),ca(t,r,i,n),pa(null,t,r,!0,e,n);case 19:return Vh(e,t,n);case 22:return Oh(e,t,n)}throw Error(P(156,t.tag))};function rm(e,t){return zp(e,t)}function L1(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 mt(e,t,n,r){return new L1(e,t,n,r)}function Tu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function M1(e){if(typeof e=="function")return Tu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Qa)return 11;if(e===Ga)return 14}return 2}function vn(e,t){var n=e.alternate;return n===null?(n=mt(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,i,l){var o=2;if(r=e,typeof e=="function")Tu(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case or:return Vn(n.children,i,l,t);case Ka:o=8,i|=8;break;case Ls:return e=mt(12,n,t,i|2),e.elementType=Ls,e.lanes=l,e;case Ms:return e=mt(13,n,t,i),e.elementType=Ms,e.lanes=l,e;case Rs:return e=mt(19,n,t,i),e.elementType=Rs,e.lanes=l,e;case pp:return vo(n,i,l,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case dp:o=10;break e;case fp:o=9;break e;case Qa:o=11;break e;case Ga:o=14;break e;case sn:o=16,r=null;break e}throw Error(P(130,e==null?e:typeof e,""))}return t=mt(o,n,t,i),t.elementType=e,t.type=r,t.lanes=l,t}function Vn(e,t,n,r){return e=mt(7,e,r,t),e.lanes=n,e}function vo(e,t,n,r){return e=mt(22,e,r,t),e.elementType=pp,e.lanes=n,e.stateNode={isHidden:!1},e}function is(e,t,n){return e=mt(6,e,null,t),e.lanes=n,e}function ls(e,t,n){return t=mt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function R1(e,t,n,r,i){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=Fo(0),this.expirationTimes=Fo(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Fo(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function zu(e,t,n,r,i,l,o,s,a){return e=new R1(e,t,n,s,a),t===1?(t=1,l===!0&&(t|=8)):t=0,l=mt(3,null,null,t),e.current=l,l.stateNode=e,l.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},pu(l),e}function O1(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:lr,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function im(e){if(!e)return Sn;e=e._reactInternals;e:{if(Jn(e)!==e||e.tag!==1)throw Error(P(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ze(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(P(171))}if(e.tag===1){var n=e.type;if(Ze(n))return ih(e,n,t)}return t}function lm(e,t,n,r,i,l,o,s,a){return e=zu(n,r,!0,e,i,l,o,s,a),e.context=im(null),n=e.current,r=qe(),i=kn(n),l=Qt(r,i),l.callback=t??null,xn(n,l,i),e.current.lanes=i,Fi(e,i,r),et(e,r),e}function wo(e,t,n,r){var i=t.current,l=qe(),o=kn(i);return n=im(n),t.context===null?t.context=n:t.pendingContext=n,t=Qt(l,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=xn(i,t,o),e!==null&&(Nt(e,i,o,l),wl(e,i,o)),o}function to(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 gd(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ju(e,t){gd(e,t),(e=e.alternate)&&gd(e,t)}function D1(){return null}var om=typeof reportError=="function"?reportError:function(e){console.error(e)};function Pu(e){this._internalRoot=e}So.prototype.render=Pu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(P(409));wo(e,t,null,null)};So.prototype.unmount=Pu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Qn(function(){wo(null,e,null,null)}),t[Yt]=null}};function So(e){this._internalRoot=e}So.prototype.unstable_scheduleHydration=function(e){if(e){var t=Op();e={blockedOn:null,target:e,priority:t};for(var n=0;n<un.length&&t!==0&&t<un[n].priority;n++);un.splice(n,0,e),n===0&&Fp(e)}};function Au(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function bo(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function xd(){}function F1(e,t,n,r,i){if(i){if(typeof r=="function"){var l=r;r=function(){var u=to(o);l.call(u)}}var o=lm(t,r,e,0,null,!1,!1,"",xd);return e._reactRootContainer=o,e[Yt]=o.current,Ci(e.nodeType===8?e.parentNode:e),Qn(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var s=r;r=function(){var u=to(a);s.call(u)}}var a=zu(e,0,!1,null,null,!1,!1,"",xd);return e._reactRootContainer=a,e[Yt]=a.current,Ci(e.nodeType===8?e.parentNode:e),Qn(function(){wo(t,a,n,r)}),a}function Co(e,t,n,r,i){var l=n._reactRootContainer;if(l){var o=l;if(typeof i=="function"){var s=i;i=function(){var a=to(o);s.call(a)}}wo(t,o,e,i)}else o=F1(n,t,e,i,r);return to(o)}Mp=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=ti(t.pendingLanes);n!==0&&(Ja(t,n|1),et(t,Ce()),!(le&6)&&(Tr=Ce()+500,En()))}break;case 13:Qn(function(){var r=Xt(e,1);if(r!==null){var i=qe();Nt(r,e,1,i)}}),ju(e,1)}};Za=function(e){if(e.tag===13){var t=Xt(e,134217728);if(t!==null){var n=qe();Nt(t,e,134217728,n)}ju(e,134217728)}};Rp=function(e){if(e.tag===13){var t=kn(e),n=Xt(e,t);if(n!==null){var r=qe();Nt(n,e,t,r)}ju(e,t)}};Op=function(){return se};Dp=function(e,t){var n=se;try{return se=e,t()}finally{se=n}};qs=function(e,t,n){switch(t){case"input":if(Fs(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 i=ho(r);if(!i)throw Error(P(90));mp(r),Fs(r,i)}}}break;case"textarea":xp(e,n);break;case"select":t=n.value,t!=null&&xr(e,!!n.multiple,t,!1)}};Cp=_u;Ep=Qn;var $1={usingClientEntryPoint:!1,Events:[Vi,cr,ho,Sp,bp,_u]},Kr={findFiberByHostInstance:On,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},V1={bundleType:Kr.bundleType,version:Kr.version,rendererPackageName:Kr.rendererPackageName,rendererConfig:Kr.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Zt.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Np(e),e===null?null:e.stateNode},findFiberByHostInstance:Kr.findFiberByHostInstance||D1,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 ul=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ul.isDisabled&&ul.supportsFiber)try{uo=ul.inject(V1),Ot=ul}catch{}}ct.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=$1;ct.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Au(t))throw Error(P(200));return O1(e,t,null,n)};ct.createRoot=function(e,t){if(!Au(e))throw Error(P(299));var n=!1,r="",i=om;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=zu(e,1,!1,null,null,n,!1,r,i),e[Yt]=t.current,Ci(e.nodeType===8?e.parentNode:e),new Pu(t)};ct.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(P(188)):(e=Object.keys(e).join(","),Error(P(268,e)));return e=Np(t),e=e===null?null:e.stateNode,e};ct.flushSync=function(e){return Qn(e)};ct.hydrate=function(e,t,n){if(!bo(t))throw Error(P(200));return Co(null,e,t,!0,n)};ct.hydrateRoot=function(e,t,n){if(!Au(e))throw Error(P(405));var r=n!=null&&n.hydratedSources||null,i=!1,l="",o=om;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(l=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=lm(t,null,e,1,n??null,i,!1,l,o),e[Yt]=t.current,Ci(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new So(t)};ct.render=function(e,t,n){if(!bo(t))throw Error(P(200));return Co(null,e,t,!1,n)};ct.unmountComponentAtNode=function(e){if(!bo(e))throw Error(P(40));return e._reactRootContainer?(Qn(function(){Co(null,null,e,!1,function(){e._reactRootContainer=null,e[Yt]=null})}),!0):!1};ct.unstable_batchedUpdates=_u;ct.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!bo(n))throw Error(P(200));if(e==null||e._reactInternals===void 0)throw Error(P(38));return Co(e,t,n,!1,r)};ct.version="18.3.1-next-f1338f8080-20240426";function sm(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(sm)}catch(e){console.error(e)}}sm(),sp.exports=ct;var am=sp.exports,um,yd=am;um=yd.createRoot,yd.hydrateRoot;/**
41
+ * @license lucide-react v1.27.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 cm=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
46
+ * @license lucide-react v1.27.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
+ */const B1=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
51
+ * @license lucide-react v1.27.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 U1=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());/**
56
+ * @license lucide-react v1.27.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 kd=e=>{const t=U1(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
61
+ * @license lucide-react v1.27.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
+ */var os={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"};/**
66
+ * @license lucide-react v1.27.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 H1=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},W1=M.createContext({}),q1=()=>M.useContext(W1),K1=M.forwardRef(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i="",children:l,iconNode:o,...s},a)=>{const{size:u=24,strokeWidth:d=2,absoluteStrokeWidth:c=!1,color:f="currentColor",className:p=""}=q1()??{},x=r??c?Number(n??d)*24/Number(t??u):n??d;return M.createElement("svg",{ref:a,...os,width:t??u??os.width,height:t??u??os.height,stroke:e??f,strokeWidth:x,className:cm("lucide",p,i),...!l&&!H1(s)&&{"aria-hidden":"true"},...s},[...o.map(([v,E])=>M.createElement(v,E)),...Array.isArray(l)?l:[l]])});/**
71
+ * @license lucide-react v1.27.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 ae=(e,t)=>{const n=M.forwardRef(({className:r,...i},l)=>M.createElement(K1,{ref:l,iconNode:t,className:cm(`lucide-${B1(kd(e))}`,`lucide-${e}`,r),...i}));return n.displayName=kd(e),n};/**
76
+ * @license lucide-react v1.27.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 Q1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m14.31 8 5.74 9.94",key:"1y6ab4"}],["path",{d:"M9.69 8h11.48",key:"1wxppr"}],["path",{d:"m7.38 12 5.74-9.94",key:"1grp0k"}],["path",{d:"M9.69 16 3.95 6.06",key:"libnyf"}],["path",{d:"M14.31 16H2.83",key:"x5fava"}],["path",{d:"m16.62 12-5.74 9.94",key:"1vwawt"}]],G1=ae("aperture",Q1);/**
81
+ * @license lucide-react v1.27.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 Y1=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],X1=ae("arrow-down",Y1);/**
86
+ * @license lucide-react v1.27.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 J1=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],Z1=ae("arrow-up-right",J1);/**
91
+ * @license lucide-react v1.27.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 ek=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}]],tk=ae("ban",ek);/**
96
+ * @license lucide-react v1.27.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 nk=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],Lu=ae("bot",nk);/**
101
+ * @license lucide-react v1.27.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 rk=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],ik=ae("box",rk);/**
106
+ * @license lucide-react v1.27.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 lk=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],ok=ae("brain",lk);/**
111
+ * @license lucide-react v1.27.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 sk=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Eo=ae("chevron-down",sk);/**
116
+ * @license lucide-react v1.27.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 ak=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],uk=ae("chevron-left",ak);/**
121
+ * @license lucide-react v1.27.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 ck=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Ai=ae("chevron-right",ck);/**
126
+ * @license lucide-react v1.27.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 dk=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],fk=ae("chevron-up",dk);/**
131
+ * @license lucide-react v1.27.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 pk=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],hk=ae("circle-check",pk);/**
136
+ * @license lucide-react v1.27.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 mk=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],gk=ae("circle-x",mk);/**
141
+ * @license lucide-react v1.27.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 xk=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],yk=ae("clock",xk);/**
146
+ * @license lucide-react v1.27.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 kk=[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]],vk=ae("git-branch",kk);/**
151
+ * @license lucide-react v1.27.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 wk=[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]],Sk=ae("inbox",wk);/**
156
+ * @license lucide-react v1.27.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 bk=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],dm=ae("info",bk);/**
161
+ * @license lucide-react v1.27.0 - ISC
162
+ *
163
+ * This source code is licensed under the ISC license.
164
+ * See the LICENSE file in the root directory of this source tree.
165
+ */const Ck=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]],Ek=ae("list",Ck);/**
166
+ * @license lucide-react v1.27.0 - ISC
167
+ *
168
+ * This source code is licensed under the ISC license.
169
+ * See the LICENSE file in the root directory of this source tree.
170
+ */const _k=[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]],Ik=ae("loader",_k);/**
171
+ * @license lucide-react v1.27.0 - ISC
172
+ *
173
+ * This source code is licensed under the ISC license.
174
+ * See the LICENSE file in the root directory of this source tree.
175
+ */const Nk=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],fm=ae("message-square",Nk);/**
176
+ * @license lucide-react v1.27.0 - ISC
177
+ *
178
+ * This source code is licensed under the ISC license.
179
+ * See the LICENSE file in the root directory of this source tree.
180
+ */const Tk=[["path",{d:"M5 12h14",key:"1ays0h"}]],zk=ae("minus",Tk);/**
181
+ * @license lucide-react v1.27.0 - ISC
182
+ *
183
+ * This source code is licensed under the ISC license.
184
+ * See the LICENSE file in the root directory of this source tree.
185
+ */const jk=[["path",{d:"m13.5 8.5-5 5",key:"1cs55j"}],["path",{d:"m8.5 8.5 5 5",key:"a8mexj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],Pk=ae("search-x",jk);/**
186
+ * @license lucide-react v1.27.0 - ISC
187
+ *
188
+ * This source code is licensed under the ISC license.
189
+ * See the LICENSE file in the root directory of this source tree.
190
+ */const Ak=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],pm=ae("search",Ak);/**
191
+ * @license lucide-react v1.27.0 - ISC
192
+ *
193
+ * This source code is licensed under the ISC license.
194
+ * See the LICENSE file in the root directory of this source tree.
195
+ */const Lk=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],Mk=ae("sparkles",Lk);/**
196
+ * @license lucide-react v1.27.0 - ISC
197
+ *
198
+ * This source code is licensed under the ISC license.
199
+ * See the LICENSE file in the root directory of this source tree.
200
+ */const Rk=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Ok=ae("terminal",Rk);/**
201
+ * @license lucide-react v1.27.0 - ISC
202
+ *
203
+ * This source code is licensed under the ISC license.
204
+ * See the LICENSE file in the root directory of this source tree.
205
+ */const Dk=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Fk=ae("triangle-alert",Dk);/**
206
+ * @license lucide-react v1.27.0 - ISC
207
+ *
208
+ * This source code is licensed under the ISC license.
209
+ * See the LICENSE file in the root directory of this source tree.
210
+ */const $k=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],Vk=ae("user",$k);/**
211
+ * @license lucide-react v1.27.0 - ISC
212
+ *
213
+ * This source code is licensed under the ISC license.
214
+ * See the LICENSE file in the root directory of this source tree.
215
+ */const Bk=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],Uk=ae("wrench",Bk);/**
216
+ * @license lucide-react v1.27.0 - ISC
217
+ *
218
+ * This source code is licensed under the ISC license.
219
+ * See the LICENSE file in the root directory of this source tree.
220
+ */const Hk=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],hm=ae("x",Hk);function mm(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=mm(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Wk(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=mm(e))&&(r&&(r+=" "),r+=t);return r}const qk=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Kk=(e,t)=>({classGroupId:e,validator:t}),gm=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),no="-",vd=[],Qk="arbitrary..",Gk=e=>{const t=Xk(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return Yk(o);const s=o.split(no),a=s[0]===""&&s.length>1?1:0;return xm(s,a,t)},getConflictingClassGroupIds:(o,s)=>{if(s){const a=r[o],u=n[o];return a?u?qk(u,a):a:u||vd}return n[o]||vd}}},xm=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const i=e[t],l=n.nextPart.get(i);if(l){const u=xm(e,t+1,l);if(u)return u}const o=n.validators;if(o===null)return;const s=t===0?e.join(no):e.slice(t).join(no),a=o.length;for(let u=0;u<a;u++){const d=o[u];if(d.validator(s))return d.classGroupId}},Yk=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?Qk+r:void 0})(),Xk=e=>{const{theme:t,classGroups:n}=e;return Jk(n,t)},Jk=(e,t)=>{const n=gm();for(const r in e){const i=e[r];Mu(i,n,r,t)}return n},Mu=(e,t,n,r)=>{const i=e.length;for(let l=0;l<i;l++){const o=e[l];Zk(o,t,n,r)}},Zk=(e,t,n,r)=>{if(typeof e=="string"){ev(e,t,n);return}if(typeof e=="function"){tv(e,t,n,r);return}nv(e,t,n,r)},ev=(e,t,n)=>{const r=e===""?t:ym(t,e);r.classGroupId=n},tv=(e,t,n,r)=>{if(rv(e)){Mu(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Kk(n,e))},nv=(e,t,n,r)=>{const i=Object.entries(e),l=i.length;for(let o=0;o<l;o++){const[s,a]=i[o];Mu(a,ym(t,s),n,r)}},ym=(e,t)=>{let n=e;const r=t.split(no),i=r.length;for(let l=0;l<i;l++){const o=r[l];let s=n.nextPart.get(o);s||(s=gm(),n.nextPart.set(o,s)),n=s}return n},rv=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,iv=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const i=(l,o)=>{n[l]=o,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(l){let o=n[l];if(o!==void 0)return o;if((o=r[l])!==void 0)return i(l,o),o},set(l,o){l in n?n[l]=o:i(l,o)}}},Ea="!",wd=":",lv=[],Sd=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),ov=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=i=>{const l=[];let o=0,s=0,a=0,u;const d=i.length;for(let v=0;v<d;v++){const E=i[v];if(o===0&&s===0){if(E===wd){l.push(i.slice(a,v)),a=v+1;continue}if(E==="/"){u=v;continue}}E==="["?o++:E==="]"?o--:E==="("?s++:E===")"&&s--}const c=l.length===0?i:i.slice(a);let f=c,p=!1;c.endsWith(Ea)?(f=c.slice(0,-1),p=!0):c.startsWith(Ea)&&(f=c.slice(1),p=!0);const x=u&&u>a?u-a:void 0;return Sd(l,p,f,x)};if(t){const i=t+wd,l=r;r=o=>o.startsWith(i)?l(o.slice(i.length)):Sd(lv,!1,o,void 0,!0)}if(n){const i=r;r=l=>n({className:l,parseClassName:i})}return r},sv=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let i=[];for(let l=0;l<n.length;l++){const o=n[l],s=o[0]==="[",a=t.has(o);s||a?(i.length>0&&(i.sort(),r.push(...i),i=[]),r.push(o)):i.push(o)}return i.length>0&&(i.sort(),r.push(...i)),r}},av=e=>({cache:iv(e.cacheSize),parseClassName:ov(e),sortModifiers:sv(e),postfixLookupClassGroupIds:uv(e),...Gk(e)}),uv=e=>{const t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let r=0;r<n.length;r++)t[n[r]]=!0;return t},cv=/\s+/,dv=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:l,postfixLookupClassGroupIds:o}=t,s=[],a=e.trim().split(cv);let u="";for(let d=a.length-1;d>=0;d-=1){const c=a[d],{isExternal:f,modifiers:p,hasImportantModifier:x,baseClassName:v,maybePostfixModifierPosition:E}=n(c);if(f){u=c+(u.length>0?" "+u:u);continue}let h=!!E,g;if(h){const I=v.substring(0,E);g=r(I);const _=g&&o[g]?r(v):void 0;_&&_!==g&&(g=_,h=!1)}else g=r(v);if(!g){if(!h){u=c+(u.length>0?" "+u:u);continue}if(g=r(v),!g){u=c+(u.length>0?" "+u:u);continue}h=!1}const k=p.length===0?"":p.length===1?p[0]:l(p).join(":"),C=x?k+Ea:k,N=C+g;if(s.indexOf(N)>-1)continue;s.push(N);const b=i(g,h);for(let I=0;I<b.length;++I){const _=b[I];s.push(C+_)}u=c+(u.length>0?" "+u:u)}return u},fv=(...e)=>{let t=0,n,r,i="";for(;t<e.length;)(n=e[t++])&&(r=km(n))&&(i&&(i+=" "),i+=r);return i},km=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=km(e[r]))&&(n&&(n+=" "),n+=t);return n},pv=(e,...t)=>{let n,r,i,l;const o=a=>{const u=t.reduce((d,c)=>c(d),e());return n=av(u),r=n.cache.get,i=n.cache.set,l=s,s(a)},s=a=>{const u=r(a);if(u)return u;const d=dv(a,n);return i(a,d),d};return l=o,(...a)=>l(fv(...a))},hv=[],Ie=e=>{const t=n=>n[e]||hv;return t.isThemeGetter=!0,t},vm=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,wm=/^\((?:(\w[\w-]*):)?(.+)\)$/i,mv=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,gv=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,xv=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,yv=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,kv=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,vv=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,rn=e=>mv.test(e),Y=e=>!!e&&!Number.isNaN(Number(e)),Pt=e=>!!e&&Number.isInteger(Number(e)),ss=e=>e.endsWith("%")&&Y(e.slice(0,-1)),Bt=e=>gv.test(e),Sm=()=>!0,wv=e=>xv.test(e)&&!yv.test(e),Ru=()=>!1,Sv=e=>kv.test(e),bv=e=>vv.test(e),Cv=e=>!D(e)&&!F(e),Ev=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),_v=e=>_n(e,Em,Ru),D=e=>vm.test(e),jn=e=>_n(e,_m,wv),bd=e=>_n(e,Lv,Y),Iv=e=>_n(e,Nm,Sm),Nv=e=>_n(e,Im,Ru),Cd=e=>_n(e,bm,Ru),Tv=e=>_n(e,Cm,bv),cl=e=>_n(e,Tm,Sv),F=e=>wm.test(e),Qr=e=>Zn(e,_m),zv=e=>Zn(e,Im),Ed=e=>Zn(e,bm),jv=e=>Zn(e,Em),Pv=e=>Zn(e,Cm),dl=e=>Zn(e,Tm,!0),Av=e=>Zn(e,Nm,!0),_n=(e,t,n)=>{const r=vm.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Zn=(e,t,n=!1)=>{const r=wm.exec(e);return r?r[1]?t(r[1]):n:!1},bm=e=>e==="position"||e==="percentage",Cm=e=>e==="image"||e==="url",Em=e=>e==="length"||e==="size"||e==="bg-size",_m=e=>e==="length",Lv=e=>e==="number",Im=e=>e==="family-name",Nm=e=>e==="number"||e==="weight",Tm=e=>e==="shadow",Mv=()=>{const e=Ie("color"),t=Ie("font"),n=Ie("text"),r=Ie("font-weight"),i=Ie("tracking"),l=Ie("leading"),o=Ie("breakpoint"),s=Ie("container"),a=Ie("spacing"),u=Ie("radius"),d=Ie("shadow"),c=Ie("inset-shadow"),f=Ie("text-shadow"),p=Ie("drop-shadow"),x=Ie("blur"),v=Ie("perspective"),E=Ie("aspect"),h=Ie("ease"),g=Ie("animate"),k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],N=()=>[...C(),F,D],b=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto","contain","none"],_=()=>[F,D,a],z=()=>[rn,"full","auto",..._()],S=()=>[Pt,"none","subgrid",F,D],j=()=>["auto",{span:["full",Pt,F,D]},Pt,F,D],O=()=>[Pt,"auto",F,D],U=()=>["auto","min","max","fr",F,D],G=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],W=()=>["start","end","center","stretch","center-safe","end-safe"],X=()=>["auto",..._()],re=()=>[rn,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",..._()],L=()=>[rn,"screen","full","dvw","lvw","svw","min","max","fit",..._()],V=()=>[rn,"screen","full","lh","dvh","lvh","svh","min","max","fit",..._()],y=()=>[e,F,D],J=()=>[...C(),Ed,Cd,{position:[F,D]}],ie=()=>["no-repeat",{repeat:["","x","y","space","round"]}],w=()=>["auto","cover","contain",jv,_v,{size:[F,D]}],pe=()=>[ss,Qr,jn],oe=()=>["","none","full",u,F,D],K=()=>["",Y,Qr,jn],Ae=()=>["solid","dashed","dotted","double"],nt=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ue=()=>[Y,ss,Ed,Cd],kt=()=>["","none",x,F,D],vt=()=>["none",Y,F,D],tn=()=>["none",Y,F,D],Nn=()=>[Y,F,D],H=()=>[rn,"full",..._()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Bt],breakpoint:[Bt],color:[Sm],container:[Bt],"drop-shadow":[Bt],ease:["in","out","in-out"],font:[Cv],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Bt],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Bt],shadow:[Bt],spacing:["px",Y],text:[Bt],"text-shadow":[Bt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",rn,D,F,E]}],container:["container"],"container-type":[{"@container":["","normal","size",F,D]}],"container-named":[Ev],columns:[{columns:[Y,D,F,s]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:N()}],overflow:[{overflow:b()}],"overflow-x":[{"overflow-x":b()}],"overflow-y":[{"overflow-y":b()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:z()}],"inset-x":[{"inset-x":z()}],"inset-y":[{"inset-y":z()}],start:[{"inset-s":z(),start:z()}],end:[{"inset-e":z(),end:z()}],"inset-bs":[{"inset-bs":z()}],"inset-be":[{"inset-be":z()}],top:[{top:z()}],right:[{right:z()}],bottom:[{bottom:z()}],left:[{left:z()}],visibility:["visible","invisible","collapse"],z:[{z:[Pt,"auto",F,D]}],basis:[{basis:[rn,"full","auto",s,..._()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Y,rn,"auto","initial","none",D]}],grow:[{grow:["",Y,F,D]}],shrink:[{shrink:["",Y,F,D]}],order:[{order:[Pt,"first","last","none",F,D]}],"grid-cols":[{"grid-cols":S()}],"col-start-end":[{col:j()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":S()}],"row-start-end":[{row:j()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":U()}],"auto-rows":[{"auto-rows":U()}],gap:[{gap:_()}],"gap-x":[{"gap-x":_()}],"gap-y":[{"gap-y":_()}],"justify-content":[{justify:[...G(),"normal"]}],"justify-items":[{"justify-items":[...W(),"normal"]}],"justify-self":[{"justify-self":["auto",...W()]}],"align-content":[{content:["normal",...G()]}],"align-items":[{items:[...W(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...W(),{baseline:["","last"]}]}],"place-content":[{"place-content":G()}],"place-items":[{"place-items":[...W(),"baseline"]}],"place-self":[{"place-self":["auto",...W()]}],p:[{p:_()}],px:[{px:_()}],py:[{py:_()}],ps:[{ps:_()}],pe:[{pe:_()}],pbs:[{pbs:_()}],pbe:[{pbe:_()}],pt:[{pt:_()}],pr:[{pr:_()}],pb:[{pb:_()}],pl:[{pl:_()}],m:[{m:X()}],mx:[{mx:X()}],my:[{my:X()}],ms:[{ms:X()}],me:[{me:X()}],mbs:[{mbs:X()}],mbe:[{mbe:X()}],mt:[{mt:X()}],mr:[{mr:X()}],mb:[{mb:X()}],ml:[{ml:X()}],"space-x":[{"space-x":_()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":_()}],"space-y-reverse":["space-y-reverse"],size:[{size:re()}],"inline-size":[{inline:["auto",...L()]}],"min-inline-size":[{"min-inline":["auto",...L()]}],"max-inline-size":[{"max-inline":["none",...L()]}],"block-size":[{block:["auto",...V()]}],"min-block-size":[{"min-block":["auto",...V()]}],"max-block-size":[{"max-block":["none",...V()]}],w:[{w:[s,"screen",...re()]}],"min-w":[{"min-w":[s,"screen","none",...re()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[o]},...re()]}],h:[{h:["screen","lh",...re()]}],"min-h":[{"min-h":["screen","lh","none",...re()]}],"max-h":[{"max-h":["screen","lh",...re()]}],"font-size":[{text:["base",n,Qr,jn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Av,Iv]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ss,D]}],"font-family":[{font:[zv,Nv,t]}],"font-features":[{"font-features":[D]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,F,D]}],"line-clamp":[{"line-clamp":[Y,"none",F,bd]}],leading:[{leading:[l,..._()]}],"list-image":[{"list-image":["none",F,D]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",F,D]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:y()}],"text-color":[{text:y()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ae(),"wavy"]}],"text-decoration-thickness":[{decoration:[Y,"from-font","auto",F,jn]}],"text-decoration-color":[{decoration:y()}],"underline-offset":[{"underline-offset":[Y,"auto",F,D]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:_()}],"tab-size":[{tab:[Pt,F,D]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",F,D]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",F,D]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:J()}],"bg-repeat":[{bg:ie()}],"bg-size":[{bg:w()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Pt,F,D],radial:["",F,D],conic:[Pt,F,D]},Pv,Tv]}],"bg-color":[{bg:y()}],"gradient-from-pos":[{from:pe()}],"gradient-via-pos":[{via:pe()}],"gradient-to-pos":[{to:pe()}],"gradient-from":[{from:y()}],"gradient-via":[{via:y()}],"gradient-to":[{to:y()}],rounded:[{rounded:oe()}],"rounded-s":[{"rounded-s":oe()}],"rounded-e":[{"rounded-e":oe()}],"rounded-t":[{"rounded-t":oe()}],"rounded-r":[{"rounded-r":oe()}],"rounded-b":[{"rounded-b":oe()}],"rounded-l":[{"rounded-l":oe()}],"rounded-ss":[{"rounded-ss":oe()}],"rounded-se":[{"rounded-se":oe()}],"rounded-ee":[{"rounded-ee":oe()}],"rounded-es":[{"rounded-es":oe()}],"rounded-tl":[{"rounded-tl":oe()}],"rounded-tr":[{"rounded-tr":oe()}],"rounded-br":[{"rounded-br":oe()}],"rounded-bl":[{"rounded-bl":oe()}],"border-w":[{border:K()}],"border-w-x":[{"border-x":K()}],"border-w-y":[{"border-y":K()}],"border-w-s":[{"border-s":K()}],"border-w-e":[{"border-e":K()}],"border-w-bs":[{"border-bs":K()}],"border-w-be":[{"border-be":K()}],"border-w-t":[{"border-t":K()}],"border-w-r":[{"border-r":K()}],"border-w-b":[{"border-b":K()}],"border-w-l":[{"border-l":K()}],"divide-x":[{"divide-x":K()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":K()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Ae(),"hidden","none"]}],"divide-style":[{divide:[...Ae(),"hidden","none"]}],"border-color":[{border:y()}],"border-color-x":[{"border-x":y()}],"border-color-y":[{"border-y":y()}],"border-color-s":[{"border-s":y()}],"border-color-e":[{"border-e":y()}],"border-color-bs":[{"border-bs":y()}],"border-color-be":[{"border-be":y()}],"border-color-t":[{"border-t":y()}],"border-color-r":[{"border-r":y()}],"border-color-b":[{"border-b":y()}],"border-color-l":[{"border-l":y()}],"divide-color":[{divide:y()}],"outline-style":[{outline:[...Ae(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Y,F,D]}],"outline-w":[{outline:["",Y,Qr,jn]}],"outline-color":[{outline:y()}],shadow:[{shadow:["","none",d,dl,cl]}],"shadow-color":[{shadow:y()}],"inset-shadow":[{"inset-shadow":["none",c,dl,cl]}],"inset-shadow-color":[{"inset-shadow":y()}],"ring-w":[{ring:K()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:y()}],"ring-offset-w":[{"ring-offset":[Y,jn]}],"ring-offset-color":[{"ring-offset":y()}],"inset-ring-w":[{"inset-ring":K()}],"inset-ring-color":[{"inset-ring":y()}],"text-shadow":[{"text-shadow":["none",f,dl,cl]}],"text-shadow-color":[{"text-shadow":y()}],opacity:[{opacity:[Y,F,D]}],"mix-blend":[{"mix-blend":[...nt(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":nt()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Y]}],"mask-image-linear-from-pos":[{"mask-linear-from":ue()}],"mask-image-linear-to-pos":[{"mask-linear-to":ue()}],"mask-image-linear-from-color":[{"mask-linear-from":y()}],"mask-image-linear-to-color":[{"mask-linear-to":y()}],"mask-image-t-from-pos":[{"mask-t-from":ue()}],"mask-image-t-to-pos":[{"mask-t-to":ue()}],"mask-image-t-from-color":[{"mask-t-from":y()}],"mask-image-t-to-color":[{"mask-t-to":y()}],"mask-image-r-from-pos":[{"mask-r-from":ue()}],"mask-image-r-to-pos":[{"mask-r-to":ue()}],"mask-image-r-from-color":[{"mask-r-from":y()}],"mask-image-r-to-color":[{"mask-r-to":y()}],"mask-image-b-from-pos":[{"mask-b-from":ue()}],"mask-image-b-to-pos":[{"mask-b-to":ue()}],"mask-image-b-from-color":[{"mask-b-from":y()}],"mask-image-b-to-color":[{"mask-b-to":y()}],"mask-image-l-from-pos":[{"mask-l-from":ue()}],"mask-image-l-to-pos":[{"mask-l-to":ue()}],"mask-image-l-from-color":[{"mask-l-from":y()}],"mask-image-l-to-color":[{"mask-l-to":y()}],"mask-image-x-from-pos":[{"mask-x-from":ue()}],"mask-image-x-to-pos":[{"mask-x-to":ue()}],"mask-image-x-from-color":[{"mask-x-from":y()}],"mask-image-x-to-color":[{"mask-x-to":y()}],"mask-image-y-from-pos":[{"mask-y-from":ue()}],"mask-image-y-to-pos":[{"mask-y-to":ue()}],"mask-image-y-from-color":[{"mask-y-from":y()}],"mask-image-y-to-color":[{"mask-y-to":y()}],"mask-image-radial":[{"mask-radial":[F,D]}],"mask-image-radial-from-pos":[{"mask-radial-from":ue()}],"mask-image-radial-to-pos":[{"mask-radial-to":ue()}],"mask-image-radial-from-color":[{"mask-radial-from":y()}],"mask-image-radial-to-color":[{"mask-radial-to":y()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":C()}],"mask-image-conic-pos":[{"mask-conic":[Y]}],"mask-image-conic-from-pos":[{"mask-conic-from":ue()}],"mask-image-conic-to-pos":[{"mask-conic-to":ue()}],"mask-image-conic-from-color":[{"mask-conic-from":y()}],"mask-image-conic-to-color":[{"mask-conic-to":y()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:J()}],"mask-repeat":[{mask:ie()}],"mask-size":[{mask:w()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",F,D]}],filter:[{filter:["","none",F,D]}],blur:[{blur:kt()}],brightness:[{brightness:[Y,F,D]}],contrast:[{contrast:[Y,F,D]}],"drop-shadow":[{"drop-shadow":["","none",p,dl,cl]}],"drop-shadow-color":[{"drop-shadow":y()}],grayscale:[{grayscale:["",Y,F,D]}],"hue-rotate":[{"hue-rotate":[Y,F,D]}],invert:[{invert:["",Y,F,D]}],saturate:[{saturate:[Y,F,D]}],sepia:[{sepia:["",Y,F,D]}],"backdrop-filter":[{"backdrop-filter":["","none",F,D]}],"backdrop-blur":[{"backdrop-blur":kt()}],"backdrop-brightness":[{"backdrop-brightness":[Y,F,D]}],"backdrop-contrast":[{"backdrop-contrast":[Y,F,D]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Y,F,D]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Y,F,D]}],"backdrop-invert":[{"backdrop-invert":["",Y,F,D]}],"backdrop-opacity":[{"backdrop-opacity":[Y,F,D]}],"backdrop-saturate":[{"backdrop-saturate":[Y,F,D]}],"backdrop-sepia":[{"backdrop-sepia":["",Y,F,D]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":_()}],"border-spacing-x":[{"border-spacing-x":_()}],"border-spacing-y":[{"border-spacing-y":_()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",F,D]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Y,"initial",F,D]}],ease:[{ease:["linear","initial",h,F,D]}],delay:[{delay:[Y,F,D]}],animate:[{animate:["none",g,F,D]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,F,D]}],"perspective-origin":[{"perspective-origin":N()}],rotate:[{rotate:vt()}],"rotate-x":[{"rotate-x":vt()}],"rotate-y":[{"rotate-y":vt()}],"rotate-z":[{"rotate-z":vt()}],scale:[{scale:tn()}],"scale-x":[{"scale-x":tn()}],"scale-y":[{"scale-y":tn()}],"scale-z":[{"scale-z":tn()}],"scale-3d":["scale-3d"],skew:[{skew:Nn()}],"skew-x":[{"skew-x":Nn()}],"skew-y":[{"skew-y":Nn()}],transform:[{transform:[F,D,"","none","gpu","cpu"]}],"transform-origin":[{origin:N()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:H()}],"translate-x":[{"translate-x":H()}],"translate-y":[{"translate-y":H()}],"translate-z":[{"translate-z":H()}],"translate-none":["translate-none"],zoom:[{zoom:[Pt,F,D]}],accent:[{accent:y()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:y()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",F,D]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":y()}],"scrollbar-track-color":[{"scrollbar-track":y()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":_()}],"scroll-mx":[{"scroll-mx":_()}],"scroll-my":[{"scroll-my":_()}],"scroll-ms":[{"scroll-ms":_()}],"scroll-me":[{"scroll-me":_()}],"scroll-mbs":[{"scroll-mbs":_()}],"scroll-mbe":[{"scroll-mbe":_()}],"scroll-mt":[{"scroll-mt":_()}],"scroll-mr":[{"scroll-mr":_()}],"scroll-mb":[{"scroll-mb":_()}],"scroll-ml":[{"scroll-ml":_()}],"scroll-p":[{"scroll-p":_()}],"scroll-px":[{"scroll-px":_()}],"scroll-py":[{"scroll-py":_()}],"scroll-ps":[{"scroll-ps":_()}],"scroll-pe":[{"scroll-pe":_()}],"scroll-pbs":[{"scroll-pbs":_()}],"scroll-pbe":[{"scroll-pbe":_()}],"scroll-pt":[{"scroll-pt":_()}],"scroll-pr":[{"scroll-pr":_()}],"scroll-pb":[{"scroll-pb":_()}],"scroll-pl":[{"scroll-pl":_()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",F,D]}],fill:[{fill:["none",...y()]}],"stroke-w":[{stroke:[Y,Qr,jn,bd]}],stroke:[{stroke:["none",...y()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Rv=pv(Mv);function he(...e){return Rv(Wk(e))}function Ov({banner:e,children:t,className:n}){return m.jsxs("div",{"data-slot":"app-shell",className:he("flex h-dvh min-h-0 flex-col overflow-hidden bg-background",n),children:[e?m.jsx("div",{"data-slot":"banner",className:"w-full",children:e}):null,m.jsxs("header",{className:"flex h-14 shrink-0 items-center gap-3 border-b border-border px-5",children:[m.jsxs("a",{href:"/",className:"flex shrink-0 items-center gap-2.5 whitespace-nowrap text-sm font-semibold text-foreground",children:[m.jsx(G1,{size:20,className:"text-accent","aria-hidden":"true"}),"agent-lens"]}),m.jsx("span",{className:"hidden border-l border-border pl-3 text-xs text-muted sm:block",children:"Session explorer"}),m.jsxs("a",{href:"/search",className:"ml-auto flex shrink-0 items-center gap-2 whitespace-nowrap rounded-md px-3 py-1.5 text-xs text-muted hover:bg-surface hover:text-foreground",children:[m.jsx(pm,{size:14,"aria-hidden":"true"})," Search sessions"]}),m.jsxs("span",{className:"hidden items-center gap-1.5 text-2xs text-muted sm:flex",children:[m.jsx("span",{className:"size-1.5 rounded-md bg-success"}),"Local"]})]}),m.jsx("div",{"data-slot":"content",className:"min-h-0 flex-1 overflow-auto",children:t})]})}const Gn="—",_d=.001,Dv=.01,Fv=24*60*60*1e3,$v=new Intl.NumberFormat("en-US",{minimumFractionDigits:2,maximumFractionDigits:2}),Vv=new Intl.NumberFormat("en-US",{minimumFractionDigits:3,maximumFractionDigits:3}),Bv=new Intl.NumberFormat("en-US"),Uv=new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1}),Hv=new Intl.DateTimeFormat("en-US",{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}),Wv=new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric"}),Id=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"2-digit",day:"2-digit"});function _o(e){return typeof e=="number"&&Number.isFinite(e)}function zm(e){return typeof e=="number"?e:e.getTime()}function Li(e){if(!_o(e)||e===0)return Gn;const t=Math.abs(e);return t<_d?`<$${_d}`:t<Dv?`$${Vv.format(e)}`:`$${$v.format(e)}`}function Lr(e,t){if(!_o(e))return t===null?"cost unknown — no model recorded":`cost unknown — no rate for ${t}`}function Wt(e){return _o(e)?Bv.format(e):Gn}function jm(e){if(e<1e3)return`${Math.round(e)}ms`;if(e<6e4)return`${(e/1e3).toFixed(2)}s`;const t=Math.round(e/1e3),n=Math.floor(t/60);return n<60?`${n}m ${t%60}s`:`${Math.floor(n/60)}h ${n%60}m`}function Pm(e,t,n){const r=Date.parse(e),i=t===void 0?n===void 0?Number.NaN:zm(n):Date.parse(t);if(!Number.isFinite(r)||!Number.isFinite(i))return Gn;const l=i-r;return l<0?Gn:jm(l)}function qv(e){return!_o(e)||e<0?Gn:jm(e)}function Kv(e,t){const n=Date.parse(e);if(!Number.isFinite(n))return Gn;const r=zm(t)-n;if(r<0||r>=Fv)return Uv.format(n);if(r<6e4)return"just now";const i=Math.floor(r/6e4);return i<60?`${i}m ago`:`${Math.floor(i/60)}h ago`}function Qv(e,t){const n=Date.parse(e);if(!Number.isFinite(n))return Gn;const r=Hv.format(n);if(t===void 0)return r;const i=Date.parse(t);return!Number.isFinite(i)||Id.format(i)===Id.format(n)?r:`${Wv.format(n)} ${r}`}const Am=96;function Mi(e,t=Am){if(e===null)return null;const n=e.replace(/\s+/g," ").trim();return n===""?null:n.length>t?`${n.slice(0,t)}…`:n}const Lm=new Intl.NumberFormat("en-US");function Mm(e,t){const n=e===1&&!t?"session":"sessions";return`${Lm.format(e)}${t?"+":""} ${n}`}function Gv(e,t){const n=e.filter(l=>Lr(l.est_cost,l.model)!==void 0);if(n.length===0)return null;const r=[...new Set(n.map(l=>l.model).filter(l=>l!==null))].sort(),i=r.length===0?"no model recorded":`no rate for ${r.join(", ")}`;return`Cost unknown on ${Lm.format(n.length)} of ${Mm(e.length,t)} shown — ${i}. Token counts are exact; only the price multiplication is missing.`}const Yv=["3d","7d","30d","all"],Rm={"3d":3,"7d":7,"30d":30},Nl=24*60*60*1e3,Nd=1e3;function Xv(e,t){if(e==="all")return{};const n=typeof t=="number"?t:t.getTime();return{from:new Date(n-Rm[e]*Nl).toISOString()}}function Td(e,t,n){const{from:r}=Xv(t,n);if(r===void 0)return[...e];const i=Date.parse(r);return e.filter(l=>{const o=Date.parse(l.last_activity_at);return!Number.isFinite(o)||o>=i})}async function Jv(e,{range:t,now:n,project:r,signal:i}){const l=i===void 0?void 0:{signal:i},o=await e.listSessions({limit:Nd},l),s=Td(o.items,t,n),a={sessions:s,truncated:o.has_more,outsideRangeCount:o.items.length-s.length,outsideRangeTruncated:o.has_more,projectSessions:null};if(Zv(s,o.has_more,r)){const u=await e.listSessions({project:r,limit:Nd},l);a.projectSessions=Td(u.items,t,n)}return a}function Zv(e,t,n){return n===void 0||n===""||!t?!1:!e.some(r=>r.project_path===n)}const e0=["project_path","last_activity_at"],zd={project_path:"Project",last_activity_at:"Last active"};function t0(e,t){const n=e.projectSessions??e.sessions,r=t.project===void 0||t.project===""?n:n.filter(l=>l.project_path===t.project),i=t.direction==="asc"?1:-1;return[...r].sort((l,o)=>{const s=l[t.sort].localeCompare(o[t.sort]);return s!==0?i*s:l.id.localeCompare(o.id)})}function n0(e){return[...new Set(e.map(t=>t.project_path))].sort((t,n)=>t.localeCompare(n))}function Om(e){for(const t of[e.title,e.preview]){const n=(t==null?void 0:t.trim())??"";if(n!==""&&!n.startsWith("<"))return n}return e.project_path}function r0(e){return e.kind==="task_notification"&&e.parent_event_id!==null}function i0(e,{range:t,now:n,bucketCount:r}){const i=typeof n=="number"?n:n.getTime(),l=l0(e,t,i),o=Math.max(1,(i-l)/r),s=Array.from({length:r},(a,u)=>({start:l+u*o,end:u===r-1?i:l+(u+1)*o,count:0}));for(const a of e){const u=Date.parse(a.last_activity_at);if(!Number.isFinite(u)||u<l||u>i)continue;const d=Math.min(r-1,Math.floor((u-l)/o)),c=s[d];c!==void 0&&(c.count+=1)}return s}function l0(e,t,n){if(t!=="all")return n-Rm[t]*Nl;const r=e.map(l=>Date.parse(l.last_activity_at)).filter(Number.isFinite),i=r.length===0?n-Nl:Math.min(...r);return i<n?i:n-Nl}function o0(e,t,{project:n}){return t.length>0?{kind:"none"}:n!==void 0&&n!==""&&e.sessions.length>0?{kind:"no_match_for_project",project:n,count:e.sessions.length,truncated:e.truncated}:e.outsideRangeCount>0?{kind:"outside_range",count:e.outsideRangeCount,truncated:e.outsideRangeTruncated}:{kind:"never_captured"}}function s0(e){return e.kind==="never_captured"?{sentence:"No sessions yet — start a Claude Code session and it will appear here live",hint:"Not seeing one? agent-lens doctor reports what the archive holds."}:e.kind==="outside_range"?{sentence:`${jd(e.count,e.truncated)} ${e.count===1&&!e.truncated?"session":"sessions"} outside range`,hint:"Widen the time range to bring them into view."}:{sentence:`No sessions in ${e.project} in this range — ${jd(e.count,e.truncated)} in this range across all projects.`,hint:"Show all projects."}}function jd(e,t){return t?`${e}+`:String(e)}function a0(e,{index:t,rowCount:n,inEditable:r}){if(n===0||r)return{kind:"ignore"};const i=Math.min(Math.max(t,0),n-1);return e==="j"?{kind:"move",index:Math.min(i+1,n-1)}:e==="k"?{kind:"move",index:Math.max(i-1,0)}:e==="Enter"?{kind:"open",index:i}:{kind:"ignore"}}function u0(e,t,n){if(e.kind==="move")return e.index;if(e.kind==="ignore")return null;const r=t[e.index];return r===void 0?null:(n.navigate({name:"session",sessionId:r.id}),e.index)}const as=0,c0=["prompt","text","thinking","tool_call","error","compaction","unknown"],d0=["running","ok","error","denied","unknown"],f0=["elapsed","sidecar_span","reported","none"];function Dm(e){return c0.find(t=>t===e)??"unknown"}function Ou(e){return d0.find(t=>t===e)??"unknown"}function p0(e){return f0.find(t=>t===e)??"none"}function Fm(e,t){const n=new Set(e.map(h=>h.id)),r=new Map,i=new Set;for(const h of e){const g=[...t.get(h.id)??[]].sort((k,C)=>k.seq-C.seq);r.set(h.id,g);for(const k of g)i.add(k.id)}const l=h=>r.get(h.id)??[],o=new Map,s=h=>{const g=h.parent_event_id;return g===null||!r0(h)||!i.has(g)?null:g};for(const h of e){const g=s(h);if(g===null)continue;const k=o.get(g);k===void 0?o.set(g,[h]):k.push(h)}const a=[],u=new Set;let d=0;const c=(h,g)=>{u.has(h.id)||(u.add(h.id),a.push({turn:h,depth:g}))},f=()=>{for(;d<a.length;d+=1){const h=a[d];if(h!==void 0)for(const g of l(h.turn))for(const k of o.get(g.id)??[])c(k,h.depth+2)}};for(const h of e)s(h)===null&&c(h,as);f();for(const h of e)u.has(h.id)||(c(h,as),f());const p=new Set,x=new Map;for(let h=a.length-1;h>=0;h-=1){const g=a[h];if(g===void 0)continue;p.add(g.turn.id);const k=l(g.turn).map(C=>{p.add(C.id);const N=[];for(const b of o.get(C.id)??[]){const I=x.get(b.id);I!==void 0&&N.push(I)}return{event:C,kind:Dm(C.kind),status:Ou(C.status),depth:g.depth+1,children:N}});x.set(g.turn.id,{turn:g.turn,depth:g.depth,events:k})}const v=[];for(const h of a){if(h.depth!==as)continue;const g=x.get(h.turn.id);g!==void 0&&v.push(g)}let E=0;for(const[h,g]of t)n.has(h)||(E+=g.length);return{groups:v,rowIds:p,unmatchedEventCount:E}}function Pd(e,t){for(let n=t.length-1;n>=0;n-=1){const r=t[n];r!==void 0&&e.push({...r,on:"turn",setSize:t.length,posInSet:n+1})}}function h0(e,t,n){for(let r=n.length-1;r>=0;r-=1){const i=n[r];i!==void 0&&e.push({...i,on:"event",turn:t,setSize:n.length,posInSet:r+1})}}function m0(e,t,n,r){const i=(r==null?void 0:r.rootSessionId)??"",l=r==null?void 0:r.subtrees,o=[],s=[];for(Pd(s,e.groups.map(a=>({node:a,depthOffset:0,sessionId:i})));s.length>0;){const a=s.pop();if(a===void 0)break;if(a.on==="turn"){const{node:p}=a,x={kind:"turn",id:p.turn.id,depth:p.depth+a.depthOffset,sessionId:a.sessionId,turn:p.turn,node:p,hasChildren:p.events.length>0,expanded:t.has(p.turn.id),setSize:a.setSize,posInSet:a.posInSet,...a.subagent===void 0?{}:{subagent:a.subagent}};o.push(x),x.expanded&&h0(s,p.turn,p.events.map(v=>({node:v,depthOffset:a.depthOffset,sessionId:a.sessionId})));continue}const{node:u}=a,d=u.event.child_session_id,c=d===null||l==null?void 0:l.get(d),f={kind:"event",id:u.event.id,depth:u.depth+a.depthOffset,sessionId:a.sessionId,turn:a.turn,node:u,hasChildren:u.children.length>0||d!==null,expanded:t.has(u.event.id),setSize:a.setSize,posInSet:a.posInSet};o.push(f),f.expanded&&Pd(s,[...u.children.map(p=>({node:p,depthOffset:a.depthOffset,sessionId:a.sessionId})),...c===void 0?[]:c.model.groups.map(p=>({node:p,depthOffset:f.depth+1,sessionId:c.sessionId,subagent:{header:c.header}}))])}return o}function g0(e){const t=e.tokens_in+e.tokens_out+e.tokens_cache_read+e.tokens_cache_write;return{durationMs:e.duration_ms??void 0,tokens:e.tokens_in+e.tokens_out,cost:e.est_cost,costUnknown:t>0?Lr(e.est_cost,null):void 0,errorCount:e.error_count}}function x0(e,t){const n=`<${t}>`,r=e.indexOf(n);if(r===-1)return null;const i=r+n.length,l=e.indexOf(`</${t}>`,i);return l===-1?null:e.slice(i,l)}function y0(e){var t;if(e.kind!=="slash_command")return e.title;for(const n of["command-name","command-message"]){const r=(t=x0(e.title,n))==null?void 0:t.trim();if(r!==void 0&&r!=="")return r}return e.title}function $m(e){const t=Ou(e.status),n=(e.tokens_in??0)+(e.tokens_out??0);return{durationMs:e.duration_ms??void 0,tokens:n,cost:e.est_cost,costUnknown:n>0?Lr(e.est_cost,e.model):void 0,errorCount:t==="error"||t==="denied"?1:0}}const k0=["completed","failed","killed","running","unknown"];function v0(e){return k0.find(t=>t===e)??"unknown"}const Vm={loaded:new Map,pending:new Set,failed:new Set};function Ad(e,t){if(e.has(t))return e;const n=new Set(e);return n.add(t),n}function us(e,t){if(!e.has(t))return e;const n=new Set(e);return n.delete(t),n}function w0(e,t){switch(t.type){case"requested":return{...e,pending:Ad(e.pending,t.childId)};case"loaded":{const{child:n}=t,r=new Map(e.loaded);return r.set(t.childId,{header:n.session,model:Fm(n.turns,n.eventsByTurn)}),{loaded:r,pending:us(e.pending,t.childId),failed:us(e.failed,t.childId)}}case"failed":return{...e,pending:us(e.pending,t.childId),failed:Ad(e.failed,t.childId)};case"reset":return Vm}}function S0(e,t,n){const r=[],i=new Set;for(const l of e){if(l.kind!=="event")continue;const o=l.node.event.child_session_id;o===null||!t.has(l.id)||i.has(o)||(i.add(o),!(n.loaded.has(o)||n.pending.has(o)||n.failed.has(o))&&r.push(o))}return r}function b0(e,t){if(t.loaded.size===0)return e.rowIds;const n=new Set(e.rowIds);for(const r of t.loaded.values())for(const i of r.model.rowIds)n.add(i);return n}function C0(e){const t=new Map;for(const[n,r]of e.loaded)t.set(n,{sessionId:n,model:r.model,header:r.header});return t}function E0(e){return e.turns.map(t=>t.id)}const _a=1e4;async function Ld(e,t,{limit:n=_a,signal:r}={}){const i=r===void 0?void 0:{signal:r},l=await e.getSession(t,{limit:n},i);return{session:l.session,turns:l.turns,eventsByTurn:Bm(l.events),events:l.events,hasMore:l.has_more,shown:l.events.length,fingerprint:l.fingerprint}}function Bm(e){const t=new Map;for(const n of e){const r=t.get(n.turn_id);r===void 0?t.set(n.turn_id,[n]):r.push(n)}return t}const Md=new Intl.NumberFormat("en-US");function _0({shown:e,hasMore:t,unmatchedEventCount:n}){const r=[];return t&&r.push(`Showing the first ${Md.format(e)} events of this session — more were captured than this view loads.`),n>0&&r.push(`${Md.format(n)} more events belong to turns outside this page.`),r}function I0({hasDrift:e,harnessVersion:t}){return e?`Unrecognized records in this session. ${t===null?"The harness":`Claude Code ${t}`} writes a transcript shape this build does not know.`:null}function N0(e){const t=e[e.length-1];return t===void 0?new Set:new Set([t.id])}function T0(e,t){if(e===null||t===void 0)return null;const n=e.events.find(r=>r.seq===t);return n===void 0?null:{turnId:n.turn_id,eventId:n.id}}function z0(e,t){return e!==null&&e.session.id!==t}function j0(e,t,n){return{type:"rows-changed",rows:t,modelIds:b0(e,n)}}function Rd(e){const t=e.split(":");if(t.length!==3)return;const[n,r,i]=t.map(l=>l===""?Number.NaN:Number(l));if(!(n===void 0||r===void 0||i===void 0)&&!(!Number.isFinite(n)||!Number.isFinite(r)||!Number.isFinite(i)))return{mtime_ms:n,size:r,sidecar_count:i}}function P0(e,t){const n=Rd(e),r=Rd(t);return n===void 0||r===void 0?!0:r.mtime_ms<n.mtime_ms||r.size<n.size}function A0(e,t,n,r){const i=[...e.filter(o=>o.seq<t),...n];if(r.length===0)return i;const l=new Map(r.map(o=>[o.id,o]));return i.map(o=>l.get(o.id)??o)}function L0(e,t,n){const r=A0(e.events,t.from_seq,n.events,t.patched);return{session:n.session,turns:n.turns,eventsByTurn:Bm(r),events:r,hasMore:n.has_more,shown:r.length,fingerprint:n.fingerprint}}function M0(e,t){return e===null||e.session.id!==t.session_id?{kind:"ignore"}:P0(e.fingerprint,t.fingerprint)?{kind:"refetch"}:{kind:"splice",from_seq:t.from_seq}}const R0=6e4;function O0(e,t){const n=Date.parse(e);return!Number.isNaN(n)&&t-n<R0}function D0(e,t,n,r){return e.sessions.some(i=>i.id===t)?{...e,sessions:e.sessions.map(i=>i.id===t?{...i,...n,live:O0(n.last_activity_at,r)}:i)}:e}function Um(e,t,n){return e===null||e.key!==t?n:n===null||n===e.base?e.data:n}const F0=4;function $0({scrollTop:e,scrollHeight:t,clientHeight:n}){return t-e-n<=F0}const Hm={following:!0,pending:0};function V0(e,t){switch(t.type){case"appended":return{following:e.following,pending:e.following?0:e.pending+Math.max(0,t.count)};case"selected":return{following:!1,pending:e.pending};case"scrolled":return t.atBottom?{following:!0,pending:0}:{following:!1,pending:e.pending};case"resumed":return{following:!0,pending:0};case"reset":return Hm}}function B0(e){return e.following||e.pending===0?null:`${e.pending} new event${e.pending===1?"":"s"}`}function U0(){const e=new Set;return{subscribe(t){return e.add(t),()=>{e.delete(t)}},publish(t){for(const n of[...e])n(t)}}}class cs extends Error{constructor(t){super(`agent-lens: window.__AGENT_LENS__ ${t}. The page must be served by the agent-lens server, which injects it (see src/server/static-ui.ts).`),this.name="BootstrapMissingError"}}let Od;function Wm(e){return Od??(Od=H0(globalThis.__AGENT_LENS__)),Od}function H0(e){if(e==null)throw new cs("is not defined");if(typeof e.token!="string"||e.token==="")throw new cs("carries no token");if(typeof e.tokenHeader!="string"||e.tokenHeader==="")throw new cs("carries no tokenHeader");return e}class Du extends Error{}class qm extends Du{constructor(n,r){super(r);qi(this,"kind","auth");this.status=n,this.name="AuthError"}}class Km extends Du{constructor(n,r){super(r);qi(this,"kind","http");this.status=n,this.name="HttpError"}}class W0 extends Du{constructor(n){super(`agent-lens: the request did not reach the server (${J0(n)})`);qi(this,"kind","network");this.cause=n,this.name="NetworkError"}}function Fu(e={}){const t=e.fetchImpl??globalThis.fetch,n=e.bootstrap??Wm();async function r(i,l,o,s="GET"){const a=K0(i,l);let u;try{u=await t(a,{method:s,headers:{[n.tokenHeader]:n.token},...(o==null?void 0:o.signal)===void 0?{}:{signal:o.signal}})}catch(f){throw new W0(f)}const d=await Q0(u);if(!u.ok)throw G0(u,d);const c=Qm(d);if(!c.ok)throw new Km(u.status,`agent-lens: ${i} returned a body that is not JSON`);return c.value}return{listSessions:(i={},l)=>r("/api/sessions",{...i},l),getSession:(i,l={},o)=>r(`/api/sessions/${encodeURIComponent(i)}`,{...l},o),getEventContent:(i,l,o)=>r(`/api/events/${encodeURIComponent(i)}/content`,{field:l},o),search:(i,l={},o)=>r("/api/search",{q:i,...l,limit:q0},o),warm:i=>r("/api/warm",{},i,"POST")}}const q0=200;function K0(e,t){const n=new URLSearchParams;for(const[i,l]of Object.entries(t))l===void 0||l===""||n.set(i,String(l));const r=n.toString();return r===""?e:`${e}?${r}`}async function Q0(e){try{return await e.text()}catch{return""}}function G0(e,t){const n=Y0(e,t);return e.status===401||e.status===403?new qm(e.status,n):new Km(e.status,n)}function Y0(e,t){const n=t.trim();if(n!==""){const r=Qm(n);if(r.ok&&X0(r.value)){const{error:i}=r.value;if(typeof i=="string"&&i!=="")return i}return n}return e.statusText===""?`HTTP ${e.status}`:e.statusText}function Qm(e){try{return{ok:!0,value:JSON.parse(e)}}catch{return{ok:!1}}}function X0(e){return typeof e=="object"&&e!==null}function J0(e){return e instanceof Error?e.message:String(e)}const Z0="/api/stream",ew=15e3,tw=2.5,nw=ew*tw,rw=500,iw=3e4,lw=new Set(["session_changed","session_indexed","warm_progress"]);function ow(){let e="",t=!1;return{push(n){if(n==="")return[];const r=t&&n.startsWith(`
221
+ `)?n.slice(1):n;t=r.endsWith("\r"),e+=r.replace(/\r\n|\r/g,`
222
+ `);const i=e.split(`
223
+
224
+ `);e=i.pop()??"";const l=[];for(const o of i){const s=sw(o);s!==void 0&&l.push(s)}return l}}}function sw(e){const t=[];let n,r,i,l=!1;for(const s of e.split(`
225
+ `)){if(s===""||s.startsWith(":"))continue;const a=s.indexOf(":"),u=a===-1?s:s.slice(0,a),d=a===-1?"":s.slice(a+1),c=d.startsWith(" ")?d.slice(1):d;switch(u){case"event":n=c,l=!0;break;case"data":t.push(c),l=!0;break;case"id":r=c,l=!0;break;case"retry":/^\d+$/.test(c)&&(i=Number(c)),l=!0;break}}if(!l)return;const o={event:n??"message",data:t.join(`
226
+ `)};return r!==void 0&&(o.id=r),i!==void 0&&(o.retry=i),o}function aw(e={}){const t=e.path??Z0,n=e.fetchImpl??globalThis.fetch,r=e.sleepImpl??pw,i=e.now??(()=>Date.now()),l=e.random??(()=>Math.random()),o=e.watchdogMs??nw,s=e.bootstrap??Wm(),a=new AbortController;let u=!1,d,c={kind:"connecting"},f,p=0,x=0;function v(I){var _;c.kind==="closed"||c.kind==="auth_error"||(c=I,(_=e.onState)==null||_.call(e,I))}function E(I){var _;(_=e.onError)==null||_.call(e,I)}function h(I){if(!Number.isFinite(o))return;const _=++p;x=i()+o,(async()=>{for(;_===p&&!I.signal.aborted;){const z=x-i();if(z<=0){I.abort(new DOMException("agent-lens: stream went silent","AbortError"));return}await r(z,I.signal)}})()}function g(){Number.isFinite(o)&&(x=i()+o)}function k(){p+=1}function C(I){var z;if(g(),I.event==="heartbeat")return;if(I.event==="error"){E(new Error(`agent-lens: the stream reported an error (${I.data})`));return}if(!lw.has(I.event))return;let _;try{_=JSON.parse(I.data)}catch(S){E(new Error(`agent-lens: could not decode a "${I.event}" payload (${S instanceof Error?S.message:String(S)})`));return}(z=e.onEvent)==null||z.call(e,{event:I.event,data:_,...I.id===void 0?{}:{id:I.id}})}async function N(){const I=new AbortController;d=I;let _=!1,z,S;try{const j=await n(t,{method:"GET",headers:{[s.tokenHeader]:s.token},signal:I.signal});if(j.status===401||j.status===403)z=new qm(j.status,await cw(j));else if(!j.ok)S=new Error(`agent-lens: the stream returned HTTP ${j.status}`);else if(j.body===null)S=new Error("agent-lens: the stream response carried no body");else{_=!0,v({kind:"open"}),h(I);const O=j.body.getReader(),U=new TextDecoder,G=ow();for(;;){const{done:W,value:X}=await O.read();if(W)break;for(const re of G.push(U.decode(X,{stream:!0})))C(re)}}}catch(j){S=j}finally{k(),d=void 0}return u?{kind:"closed"}:z!==void 0?{kind:"auth",error:z}:(S!==void 0&&!dw(S)&&E(fw(S)),{kind:"retry",reachedOpen:_})}async function b(){let I=0;for(;!u;){v({kind:"connecting"});const _=await N();if(_.kind==="closed")break;if(_.kind==="auth"){v({kind:"auth_error",error:_.error});return}_.reachedOpen&&(I=0);const z=uw(I,l);I+=1,v({kind:"reconnecting",attempt:I,nextRetryAt:i()+z}),await r(z,a.signal)}v({kind:"closed"})}return{start(){return f??(f=b()),f},close(){u||(u=!0,v({kind:"closed"}),k(),a.abort(),d==null||d.abort(new DOMException("agent-lens: stream closed","AbortError")))},get state(){return c}}}function uw(e,t){return t()*Math.min(iw,rw*2**e)}async function cw(e){try{const t=(await e.text()).trim();return t===""?`HTTP ${e.status}`:t}catch{return`HTTP ${e.status}`}}function dw(e){return typeof e=="object"&&e!==null&&e.name==="AbortError"}function fw(e){return e instanceof Error?e:new Error(String(e))}function pw(e,t){return new Promise(n=>{if((t==null?void 0:t.aborted)===!0){n();return}const r=()=>{clearTimeout(i),t==null||t.removeEventListener("abort",r),n()},i=setTimeout(r,e);t==null||t.addEventListener("abort",r,{once:!0})})}function hw(e,t={}){const n=M.useRef(e);n.current=e;const r=M.useRef(t);r.current=t,M.useEffect(()=>{const l=(r.current.create??aw)({onEvent:({event:o,data:s})=>{o==="session_changed"?n.current.publish({event:o,data:s}):o==="session_indexed"?n.current.publish({event:o,data:s}):o==="warm_progress"&&n.current.publish({event:o,data:s})},onState:o=>{var s,a;return(a=(s=r.current).onState)==null?void 0:a.call(s,o)}});return l.start(),()=>l.close()},[])}const mw=/^\d+$/;function Dd(e){const t=gw(e);if(t==="/")return{name:"sessions"};if(t==="/showcase")return{name:"showcase"};if(t==="/search")return{name:"search"};const n=t.slice(1).split("/");if(n[0]==="search"&&n.length===3&&n[1]==="session"){const r=Fd(n[2]);if(r!==void 0&&r!=="")return{name:"search",sessionId:r}}if(n[0]==="session"){const r=Fd(n[1]);if(r!==void 0&&r!==""){if(n.length===2)return{name:"session",sessionId:r};if(n.length===4&&mw.test(n[3]??"")){if(n[2]==="trace")return{name:"trace",sessionId:r,turnSeq:Number(n[3])};if(n[2]==="event")return{name:"event",sessionId:r,seq:Number(n[3])}}}}return{name:"not_found",path:e}}function Bn(e){switch(e.name){case"sessions":return"/";case"showcase":return"/showcase";case"session":return`/session/${encodeURIComponent(e.sessionId)}`;case"trace":return`/session/${encodeURIComponent(e.sessionId)}/trace/${e.turnSeq}`;case"search":return e.sessionId===void 0?"/search":`/search/session/${encodeURIComponent(e.sessionId)}`;case"event":return`/session/${encodeURIComponent(e.sessionId)}/event/${e.seq}`;case"not_found":return e.path}}function gw(e){var r;const t=((r=e.split("?")[0])==null?void 0:r.split("#")[0])??"",n=t.startsWith("/")?t:`/${t}`;return n.length>1&&n.endsWith("/")?n.slice(0,-1):n}function Fd(e){if(e!==void 0)try{return decodeURIComponent(e)}catch{return e}}function xw(){return{path:()=>window.location.pathname,push:e=>{window.history.pushState(null,"",e)},replace:e=>{window.history.replaceState(null,"",e)},onPopState:e=>(window.addEventListener("popstate",e),()=>{window.removeEventListener("popstate",e)})}}function yw(e=xw()){const t=new Set;let n=e.path(),r=Dd(n);function i(){const l=e.path();if(l!==n){n=l,r=Dd(l);for(const o of[...t])o()}}return e.onPopState(i),{getRoute:()=>r,navigate(l,o={}){const s=Bn(l);o.replace===!0?e.replace(s):e.push(s),i()},subscribe(l){return t.add(l),()=>{t.delete(l)}}}}let $d;function Gm(){return $d??($d=yw()),$d}function kw(e=Gm()){return M.useSyncExternalStore(e.subscribe,e.getRoute,e.getRoute)}const Ym={kind:"loading"};function vw(){return{requestId:0,state:Ym}}function ww(e,t){return t.type==="start"?{requestId:t.requestId,state:Ym}:t.requestId!==e.requestId?e:{requestId:e.requestId,state:t.type==="resolve"?{kind:"ok",value:t.value}:{kind:"error",error:t.error}}}function $u(e,t,n=0){const[r,i]=M.useReducer(ww,vw()),l=M.useRef(0),o=M.useRef(t);return o.current=t,M.useEffect(()=>{const s=++l.current,a=new AbortController;return i({type:"start",requestId:s}),o.current(a.signal).then(u=>i({type:"resolve",requestId:s,value:u}),u=>i({type:"reject",requestId:s,error:u})),()=>a.abort()},[e,n]),r.state}const ds="<mark>",Vd="</mark>";function Sw(e){if(e==null||e==="")return[];const t=[];let n=e;for(;n!=="";){const r=n.indexOf(ds);if(r===-1)break;const i=n.indexOf(Vd,r+ds.length);if(i===-1)break;r>0&&t.push({text:n.slice(0,r),matched:!1});const l=n.slice(r+ds.length,i);l!==""&&t.push({text:l,matched:!0}),n=n.slice(i+Vd.length)}return n!==""&&t.push({text:n,matched:!1}),t}function bw(e){const t=e.trim();return t===""?{kind:"idle"}:{kind:"search",q:t}}function Cw(e){return e==="session"?"Searching this session.":"Searching all projected transcripts, including sub-agent transcripts the session list does not show."}function Ew(e,t,n){if(e.kind==="idle"||t>0)return null;const r=`No matches for ${JSON.stringify(e.q)}.`;return n>0?`${r} ${n} transcripts are not indexed yet, so this answer covers part of the corpus.`:r}function _w(e){const t=new Map;for(const n of e){const r=t.get(n.session_id);if(r===void 0){t.set(n.session_id,{sessionId:n.session_id,title:n.session_title,projectPath:n.project_path,hits:[n]});continue}r.hits.push(n)}return[...t.values()]}function Iw(e,t){return t===null?`Warm the remaining ${e}`:t.done>=t.total?`Warmed ${t.total} transcripts`:`Warming ${t.done} of ${t.total}`}function Nw(e,t){if(e===null)return{latch:null,revealIndex:void 0};const n=t.findIndex(r=>r.id===e.eventId);return n===-1?{latch:e,revealIndex:void 0}:{latch:null,revealIndex:n,selectedId:e.eventId,focusedIndex:n}}function Tw({hit:e}){const t=Sw(e.snippet);return m.jsxs("a",{href:Bn({name:"event",sessionId:e.session_id,seq:e.seq}),"data-slot":"search-hit","data-event-id":e.event_id,className:"flex flex-col gap-0.5 rounded-md px-2 py-1.5 text-xs text-foreground transition-colors hover:bg-surface",children:[m.jsxs("span",{className:"flex items-center gap-2 text-2xs uppercase tracking-widest text-muted",children:[m.jsx("span",{children:e.kind}),e.name===null?null:m.jsx("span",{className:"truncate",children:e.name}),m.jsxs("span",{className:"ml-auto font-mono",children:["#",e.seq]})]}),m.jsx("span",{className:"min-w-0 font-mono text-2xs leading-relaxed text-muted",children:t.map((n,r)=>n.matched?m.jsx("mark",{className:"bg-surface-raised text-foreground",children:n.text},r):m.jsx("span",{children:n.text},r))})]})}function zw({scope:e,unprojectedCount:t,warm:n=null,onWarm:r}){return e==null?null:m.jsxs("div",{"data-slot":"search-scope",role:"status",className:"flex items-center gap-2 border-b border-border px-3 py-1.5 text-2xs text-muted",children:[m.jsx("span",{className:"min-w-0",children:Cw(e)}),t>0?m.jsx("button",{type:"button","data-slot":"search-warm",onClick:r,className:"ml-auto shrink-0 rounded-md bg-surface px-2 py-0.5 uppercase tracking-widest transition-colors hover:text-foreground",children:Iw(t,n)}):null]})}function jw({sessionId:e,api:t}={}){const n=M.useMemo(()=>t??Fu(),[t]),[r,i]=M.useState(""),l=bw(r),o=$u(`${l.kind==="idle"?"":l.q}|${e??""}`,p=>l.kind==="idle"?Promise.resolve(null):n.search(l.q,e===void 0?{}:{session:e},{signal:p})),s=o.kind==="ok"?o.value:null,[a,u]=M.useState(null),d=(s==null?void 0:s.unprojected_count)??0,c=_w((s==null?void 0:s.items)??[]),f=o.kind==="ok"?Ew(l,(s==null?void 0:s.items.length)??0,d):null;return m.jsxs("main",{"data-slot":"search-view",className:"flex h-full min-h-0 flex-col",children:[m.jsx("div",{className:"flex h-12 shrink-0 items-center gap-3 border-b border-border px-3",children:m.jsx("input",{"data-slot":"search-input",type:"search",value:r,onChange:p=>{i(p.target.value)},placeholder:"Search transcripts","aria-label":"Search transcripts",className:"min-w-0 flex-1 bg-transparent text-sm text-foreground outline-none placeholder:text-muted"})}),m.jsx(zw,{scope:(s==null?void 0:s.scope)??null,unprojectedCount:d,warm:a,onWarm:()=>{n.warm().then(({queued:p})=>{u({done:0,total:p})}).catch(()=>{})}}),m.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto px-3 py-2",children:o.kind==="error"?m.jsx("p",{className:"text-sm text-error",children:o.error.message}):f!==null?m.jsx("p",{"data-slot":"search-empty",className:"text-xs text-muted",children:f}):c.map(p=>m.jsxs("section",{className:"mb-3 flex flex-col gap-0.5",children:[m.jsx("h2",{className:"truncate px-2 text-2xs uppercase tracking-widest text-muted",children:p.title??p.projectPath}),p.hits.map(x=>m.jsx(Tw,{hit:x},x.event_id))]},p.sessionId))})]})}function Bd(e=new Set){return{selectedId:void 0,expandedIds:e,focusedIndex:0}}function Vu(e,t){return t<=0?0:Math.min(Math.max(e,0),t-1)}function Pw(e,t){const n=new Set(e);return n.add(t),n}function Aw(e,t){const n=new Set(e);return n.delete(t),n}function Ud(e,t){const n=e[t];if(n===void 0)return t;for(let r=t-1;r>=0;r-=1){const i=e[r];if(i!==void 0&&i.depth<n.depth)return r}return t}function At(e,t,n){const r=Vu(t,n.length);return r===e.focusedIndex?e:{...e,focusedIndex:r}}function Lw(e,t,n){const r=Vu(e.focusedIndex,t.length),i=e.selectedId!==void 0&&n.has(e.selectedId)?e.selectedId:void 0;return r===e.focusedIndex&&i===e.selectedId?e:{...e,focusedIndex:r,selectedId:i}}function Hd(e,t){const n=new Set(e.expandedIds);for(const r of t)n.add(r);return n.size===e.expandedIds.size?e:{...e,expandedIds:n}}function Mw(e,t,n){const r=Vu(e.focusedIndex,n.length),i=n[r];switch(t){case"j":case"ArrowDown":return At(e,r+1,n);case"k":case"ArrowUp":return At(e,r-1,n);case"Home":return At(e,0,n);case"End":return At(e,n.length-1,n);case"Enter":return i===void 0||i.id===e.selectedId?At(e,r,n):{...e,focusedIndex:r,selectedId:i.id};case"Escape":return At(e,Ud(n,r),n);case"ArrowRight":return i===void 0||!i.hasChildren?At(e,r,n):i.expanded?At(e,r+1,n):{...e,focusedIndex:r,expandedIds:Pw(e.expandedIds,i.id)};case"ArrowLeft":return i!==void 0&&i.hasChildren&&i.expanded?{...e,focusedIndex:r,expandedIds:Aw(e.expandedIds,i.id)}:At(e,Ud(n,r),n);default:return At(e,r,n)}}function Rw(e,t){return t.type==="rows-changed"?Lw(e,t.rows,t.modelIds):Mw(e,t.key,t.rows)}const Ow=["thread","tree"],Wd="reasoning not recorded (signature only)",qd=Am*5;function Dw(e){return[...e].sort((t,n)=>t.seq-n.seq).map(Fw)}function Fw(e){const t=Dm(e.kind);switch(t){case"tool_call":return{kind:"tool",event:e,name:e.name??e.kind,status:Ou(e.status),input:Mi(e.input,qd),output:Mi(e.text,qd)};case"thinking":return $w(e);case"unknown":return{kind:"unknown",event:e,label:`unrecognized record (type=${Vw(e)})`,record:JSON.stringify(Bw(e),null,2)};default:return{kind:"message",event:e,eventKind:t,text:Uw(e.text)}}}function $w(e){const t=Mi(e.text);return t===null||t===Wd?{kind:"thinking",event:e,text:Wd,recorded:!1}:{kind:"thinking",event:e,text:t,recorded:!0}}function Vw(e){const t=e.raw_subtype;return t===null||t===""?e.raw_type:`${e.raw_type}/${t}`}function Bw(e){return{id:e.id,seq:e.seq,ts:e.ts,turn_id:e.turn_id,kind:e.kind,raw_type:e.raw_type,raw_subtype:e.raw_subtype}}function Uw(e){return e===null||e.trim()===""?null:e}function Hw(e){const t=[];for(const n of e)if(n.kind==="message")t.push({kind:"message",id:n.event.id,row:n});else{const r=t.at(-1);(r==null?void 0:r.kind)==="activity"?r.rows.push(n):t.push({kind:"activity",id:n.event.id,rows:[n]})}return t}function Ww(e){const t=e.filter(l=>l.kind==="tool"),n=t.filter(l=>l.event.child_session_id!==null).length,r=e.filter(l=>l.kind==="thinking").length,i=e.filter(l=>l.kind==="unknown").length;return[t.length>0?`${t.length} tool ${t.length===1?"call":"calls"}`:"",n>0?`${n} ${n===1?"subagent":"subagents"}`:"",r>0?"reasoning":"",i>0?`${i} ${i===1?"record":"records"}`:""].filter(Boolean).join(" · ")}function qw(){const e=new Set,t=new Set;return{isDismissed:n=>e.has(n),dismiss(n){if(!e.has(n)){e.add(n);for(const r of t)r()}},subscribe(n){return t.add(n),()=>{t.delete(n)}}}}const fs=qw();function Xm(e){return{dismissed:M.useSyncExternalStore(fs.subscribe,()=>fs.isDismissed(e),()=>!1),dismiss:()=>fs.dismiss(e)}}function Kw(e){const t=I0(e),{dismissed:n,dismiss:r}=Xm(`drift:${e.sessionId}`);return t===null||n?null:m.jsxs("div",{"data-slot":"drift-banner",role:"alert",className:"flex items-center gap-2 border-b border-border bg-surface px-3 py-1.5 text-2xs text-error",children:[m.jsx(Fk,{size:12,"aria-hidden":"true",className:"shrink-0"}),m.jsx("span",{className:"min-w-0",children:t}),m.jsx("a",{href:"/api/drift",className:"ml-auto shrink-0 uppercase tracking-widest text-muted transition-colors hover:text-foreground",children:"Drift report"}),m.jsx("button",{type:"button","aria-label":"Dismiss unrecognized records notice",title:"Dismiss until reload",onClick:r,className:"flex size-6 shrink-0 items-center justify-center rounded-md text-muted hover:bg-surface-raised hover:text-foreground",children:m.jsx(hm,{size:14,"aria-hidden":"true"})})]})}const Qw=["inline","line_ref","spill","missing"];function Gw(e){return Qw.find(t=>t===e)??"unclassified"}const Yw="Nothing was recorded for this half.",Xw="Full output no longer on disk.",Jw="Showing the stored head of a larger body.",Zw="The body was written to a file beside the transcript.";function Jm(e,t,n){const r=eS(e,t,n),i=r===null?tS(e,t):r.content,l=Gw(r===null?nS(e,t):r.storage),o=i!==null&&i!=="";switch(l){case"missing":return Gr("missing",Xw,o?i:null,!1,!1);case"spill":return Gr("spill",o?null:Zw,o?i:null,!1,!o);case"line_ref":{const s=r===null||r.truncated;return Gr("line_ref",s?Jw:null,i,s,s)}default:return o?Gr(l,null,i,!1,!1):Gr("empty",Yw,null,!1,!1)}}function Gr(e,t,n,r,i){return{kind:e,note:t,body:n,truncated:r,canRefetch:i}}function eS(e,t,n){return n===null?null:n.id===e.id&&n.field===t?n:null}function tS(e,t){return t==="input"?e.input:e.text}function nS(e,t){return t==="input"?e.input_storage:e.output_storage}const rS="No event is selected.";function iS({event:e,fetched:t,onShowFull:n}){return m.jsx("aside",{"data-slot":"span-detail",...e===null?{}:{"data-event-id":e.id},className:"w-96 shrink-0 overflow-y-auto p-3 text-xs text-foreground",children:e===null?m.jsx("p",{className:"text-faint",children:rS}):m.jsxs(m.Fragment,{children:[m.jsx(lS,{event:e}),m.jsx(Kd,{event:e,field:"input",title:"INPUT",fetched:t,onShowFull:n}),m.jsx(Kd,{event:e,field:"text",title:"OUTPUT",fetched:t,onShowFull:n}),m.jsx(aS,{event:e})]})})}function lS({event:e}){return m.jsxs("header",{"data-slot":"detail-heading",className:"border-b border-border pb-2",children:[m.jsx("p",{className:"truncate font-mono text-sm",children:e.name??e.kind}),m.jsx("p",{className:"truncate font-mono text-2xs text-faint",children:e.ts})]})}function Kd({event:e,field:t,title:n,fetched:r,onShowFull:i}){const l=Jm(e,t,r);return m.jsxs("section",{"data-slot":`detail-${t}`,"data-content-state":l.kind,className:"pt-3",children:[m.jsxs("div",{className:"flex items-baseline gap-2",children:[m.jsx("h2",{className:"text-2xs tracking-widest text-muted",children:n}),m.jsx(oS,{content:l})]}),m.jsx(sS,{content:l}),l.canRefetch&&i!==void 0?m.jsx("button",{type:"button","data-slot":"detail-show-full",onClick:()=>i(e.id,t),className:"mt-1 font-mono text-2xs text-accent",children:"Show full"}):null]})}function oS({content:e}){return m.jsx("span",{"data-slot":"detail-storage",className:"rounded-md bg-surface-raised px-1.5 py-0.5 font-mono text-2xs text-muted",children:e.kind})}function sS({content:e}){return m.jsxs(m.Fragment,{children:[e.note===null?null:m.jsx("p",{"data-slot":"detail-note",className:"pt-1 text-2xs text-faint",children:e.note}),e.body===null?null:m.jsx("pre",{"data-slot":"detail-body",className:"mt-1 whitespace-pre-wrap break-words font-mono text-2xs text-foreground",children:e.body})]})}function aS({event:e}){return m.jsxs("details",{"data-slot":"detail-raw",className:"mt-3 border-t border-border pt-2",children:[m.jsx("summary",{className:"cursor-pointer text-2xs text-muted",children:"Raw record"}),m.jsx("pre",{className:"mt-1 whitespace-pre-wrap break-words font-mono text-2xs text-muted",children:JSON.stringify(e,null,2)})]})}function uS({label:e,onResume:t}){return e===null?null:m.jsxs("button",{type:"button","data-slot":"follow-pill",onClick:t,className:"flex items-center gap-1.5 rounded-full border border-border bg-surface px-3 py-1 text-2xs text-fg shadow-sm",children:[m.jsxs("span",{children:["Following paused — ",e]}),m.jsx(Eo,{size:12,"aria-hidden":"true",className:"shrink-0"})]})}function Bu({duration:e,tokens:t,cost:n,costUnknown:r,className:i}){return m.jsxs("span",{"data-slot":"metric-chips",className:he("inline-flex items-center gap-1",i),children:[m.jsx(ps,{slot:"metric-duration",children:e}),m.jsx(ps,{slot:"metric-tokens",children:t}),m.jsx(ps,{slot:"metric-cost",unknown:r,children:n})]})}function ps({slot:e,unknown:t,children:n}){return n===void 0?null:m.jsx("span",{"data-slot":e,title:t,"aria-label":t,className:he("rounded-md bg-surface-raised px-1.5 py-0.5 font-mono text-2xs",t===void 0?"text-muted":"text-faint"),children:n})}const Zm={live:{badge:"text-running",dot:"bg-running animate-live-pulse",label:"live"},complete:{badge:"text-muted",dot:"bg-success",label:"complete"},interrupted:{badge:"text-warning",dot:"bg-warning",label:"interrupted"}},je={type:{llm_call:{tint:"text-span-llm",Icon:Mk,label:"model call"},tool_call:{tint:"text-span-tool",Icon:Uk,label:"tool call"},thinking:{tint:"text-span-thinking",Icon:ok,label:"thinking"},subagent:{tint:"text-span-subagent",Icon:Lu,label:"sub-agent"},generic:{tint:"text-span-generic",Icon:ik,label:"activity"}},status:{running:{row:"",tint:"text-running animate-live-pulse",Icon:Ik,label:"running"},ok:{row:"",tint:"text-success",Icon:hk,label:"ok"},error:{row:"bg-error/8",tint:"text-error",Icon:gk,label:"error"},denied:{row:"bg-error/8",tint:"text-error",Icon:tk,label:"denied"},unknown:{row:"",tint:"text-faint",Icon:zk,label:"unknown"}},trace:{tint:"text-span-turn",Icon:fm,label:"turn"},triggerBadge:"rounded-md bg-surface-raised px-1.5 py-0.5 font-mono text-2xs text-muted",payloadChip:"rounded-md bg-surface-raised px-1.5 py-0.5 font-mono text-2xs text-muted",errorChip:"font-mono text-2xs text-error"},cS={tool_call:je.type.tool_call,thinking:je.type.thinking,text:je.type.llm_call,prompt:je.type.generic,error:je.type.generic,compaction:je.type.generic,unknown:je.type.generic};function dS({session:e,now:t,view:n,onViewChange:r,parentSessionId:i}){var d;const l=((d=e.agent_description)==null?void 0:d.trim())||Om(e),o=Zm[e.live?"live":"complete"],s=e.tokens_in+e.tokens_out,a=e.live?void 0:e.last_activity_at,u=e.est_cost;return m.jsxs("header",{"data-slot":"session-header",className:"flex shrink-0 flex-wrap items-center gap-x-5 gap-y-3 border-b border-border bg-surface/50 px-5 py-4 text-sm text-foreground",children:[m.jsxs("a",{href:Bn(i?{name:"session",sessionId:i}:{name:"sessions"}),"data-slot":"back-to-sessions","aria-label":i?"Back to parent session":"Back to sessions",className:"flex shrink-0 items-center gap-1 text-2xs uppercase tracking-widest text-muted transition-colors hover:text-foreground",children:[m.jsx(uk,{size:12,"aria-hidden":"true"}),i?"Parent session":"Sessions"]}),m.jsxs("div",{className:"min-w-0 flex-1 basis-60",children:[m.jsx("h1",{className:"truncate text-lg font-semibold",title:l,children:l}),m.jsx("p",{"data-slot":"session-project",className:"mt-1 truncate font-mono text-2xs text-muted",title:e.project_path,children:e.project_path})]}),m.jsxs("a",{href:Bn({name:"search",sessionId:e.id}),"data-slot":"in-session-search",className:"shrink-0 text-2xs uppercase tracking-widest text-muted transition-colors hover:text-foreground",children:[m.jsx(pm,{size:14,className:"mr-1 inline-block","aria-hidden":"true"})," Search"]}),n===void 0||r===void 0?null:m.jsx(fS,{view:n,onViewChange:r}),m.jsxs("span",{className:he("flex shrink-0 items-center gap-1 text-xs",o.badge),children:[m.jsx("span",{"aria-hidden":"true",className:he("size-1.5 rounded-md",o.dot)}),o.label]}),m.jsxs("span",{"data-slot":"session-turns",className:"shrink-0 font-mono text-2xs text-muted",children:[Wt(e.turn_count)," turns"]}),e.error_count>0?m.jsxs("span",{"data-slot":"session-errors",className:je.errorChip,children:[e.error_count," err"]}):null,m.jsx(Bu,{className:"shrink-0",duration:Pm(e.started_at,a,t),tokens:`${Wt(s)} tok`,cost:Li(u),costUnknown:Lr(u,e.model)})]})}function fS({view:e,onViewChange:t}){return m.jsx("div",{role:"group","aria-label":"Session view",className:"inline-flex shrink-0 items-center gap-0.5 rounded-md bg-surface p-0.5",children:Ow.map(n=>m.jsxs("button",{type:"button",...n==="thread"?{"data-slot":"thread-toggle"}:{},"aria-pressed":n===e,onClick:()=>{t(n)},className:he("flex items-center gap-1.5 rounded-md px-3 py-2 text-xs transition-colors",n===e?"bg-surface-raised text-foreground":"text-muted"),children:[n==="thread"?m.jsx(fm,{size:13,"aria-hidden":"true"}):m.jsx(vk,{size:13,"aria-hidden":"true"}),n==="thread"?"Thread":"Tree"]},n))})}function pS(e,t,n){const r=new Array(e);return new Proxy(r,{get(i,l,o){if(typeof l=="string"){const s=l.charCodeAt(0);if(s>=48&&s<=57){const a=+l;if(Number.isInteger(a)&&a>=0&&a<e){let u=i[a];if(!u){const d=t[a*2];u=i[a]={index:a,key:n(a),start:d,size:t[a*2+1],end:d+t[a*2+1],lane:0}}return u}}if(l==="length")return e}return Reflect.get(i,l,o)}})}function rr(e,t,n){let r=n.initialDeps??[],i,l=!0;function o(){const s=e();return(s.length!==r.length||s.some((u,d)=>r[d]!==u))&&(r=s,i=t(...s),n!=null&&n.onChange&&!(l&&n.skipInitialOnChange)&&n.onChange(i),l=!1),i}return o.updateDeps=s=>{r=s},o}function Qd(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const hS=(e,t)=>Math.abs(e-t)<1.01,mS=(e,t,n)=>{let r;return function(...i){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,i),n)}};let Yr;const hs=()=>{if(Yr!==void 0)return Yr;if(typeof navigator>"u")return Yr=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return Yr=!0;const e=navigator.maxTouchPoints;return Yr=navigator.platform==="MacIntel"&&e!==void 0&&e>0},Gd=e=>{const{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},gS=e=>e,xS=e=>{const t=Math.max(e.startIndex-e.overscan,0),r=Math.min(e.endIndex+e.overscan,e.count-1)-t+1,i=new Array(r);for(let l=0;l<r;l++)i[l]=t+l;return i},yS=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;const i=o=>{const{width:s,height:a}=o;t({width:Math.round(s),height:Math.round(a)})};if(i(Gd(n)),!r.ResizeObserver)return()=>{};const l=new r.ResizeObserver(o=>{const s=()=>{const a=o[0];if(a!=null&&a.borderBoxSize){const u=a.borderBoxSize[0];if(u){i({width:u.inlineSize,height:u.blockSize});return}}i(Gd(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(s):s()});return l.observe(n,{box:"border-box"}),()=>{l.unobserve(n)}},ro={passive:!0},kS=typeof window>"u"?!0:"onscrollend"in window,vS=(e,t,n)=>{const r=e.scrollElement;if(!r)return;const i=e.targetWindow;if(!i)return;const l=e.options.useScrollendEvent&&kS;let o=0;const s=l?null:mS(i,()=>t(o,!1),e.options.isScrollingResetDelay),a=c=>()=>{o=n(r),s==null||s(),t(o,c)},u=a(!0),d=a(!1);return r.addEventListener("scroll",u,ro),l&&r.addEventListener("scrollend",d,ro),()=>{r.removeEventListener("scroll",u),l&&r.removeEventListener("scrollend",d)}},wS=(e,t)=>vS(e,t,n=>{const{horizontal:r,isRtl:i}=e.options;return r?n.scrollLeft*(i&&-1||1):n.scrollTop}),SS=(e,t,n)=>{if(n.options.useCachedMeasurements){const r=n.indexFromElement(e),i=n.options.getItemKey(r);return n.itemSizeCache.get(i)??n.options.estimateSize(r)}if(t!=null&&t.borderBoxSize){const r=t.borderBoxSize[0];if(r)return Math.round(r[n.options.horizontal?"inlineSize":"blockSize"])}if(!t){const r=n.indexFromElement(e),i=n.options.getItemKey(r),l=n.itemSizeCache.get(i);if(l!==void 0)return l}return e[n.options.horizontal?"offsetWidth":"offsetHeight"]},bS=(e,{adjustments:t=0,behavior:n},r)=>{var i,l;(l=(i=r.scrollElement)==null?void 0:i.scrollTo)==null||l.call(i,{[r.options.horizontal?"left":"top"]:e+t,behavior:n})},CS=bS;class ES{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._flatMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this.elementsCache=new Map,this.now=()=>{var n,r,i;return((i=(r=(n=this.targetWindow)==null?void 0:n.performance)==null?void 0:r.now)==null?void 0:i.call(r))??Date.now()},this.observer=(()=>{let n=null;const r=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(i=>{i.forEach(l=>{const o=()=>{const s=l.target,a=this.indexFromElement(s);if(!s.isConnected){this.observer.unobserve(s);for(const[u,d]of this.elementsCache)if(d===s){this.elementsCache.delete(u);break}return}this.shouldMeasureDuringScroll(a)&&this.resizeItem(a,this.options.measureElement(s,l,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(o):o()})}));return{disconnect:()=>{var i;(i=r())==null||i.disconnect(),n=null},observe:i=>{var l;return(l=r())==null?void 0:l.observe(i,{box:"border-box"})},unobserve:i=>{var l;return(l=r())==null?void 0:l.unobserve(i)}}})(),this.range=null,this.setOptions=n=>{var r,i;const l={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:gS,rangeExtractor:xS,onChange:()=>{},measureElement:SS,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,anchorTo:"start",followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:"estimate",useCachedMeasurements:!1};for(const f in n){const p=n[f];p!==void 0&&(l[f]=p)}const o=this.options;let s=null,a=null,u=!1;if(o!==void 0&&o.enabled&&l.enabled&&l.anchorTo==="end"&&this.scrollElement!==null){const f=o.count,p=l.count,x=this.getMeasurements(),v=f>0?((r=x[0])==null?void 0:r.key)??o.getItemKey(0):null,E=f>0?((i=x[f-1])==null?void 0:i.key)??o.getItemKey(f-1):null;if(p!==f||f>0&&p>0&&(l.getItemKey(0)!==v||l.getItemKey(p-1)!==E)){u=!0;const k=f>0?this.getVirtualItemForOffset(this.getScrollOffset())??x[0]:null;k&&(s=[k.key,this.getScrollOffset()-k.start]);const C=l.followOnAppend===!0?"auto":l.followOnAppend||null;C&&p>f&&this.isAtEnd(o.scrollEndThreshold)&&(f===0||l.getItemKey(p-1)!==E)&&(a=C)}}this.options=l,u&&(this.pendingMin=0,this.itemSizeCacheVersion++);let d=!1,c=0;if(s&&this.scrollOffset!==null){const[f,p]=s,x=this.getMeasurements(),{count:v,getItemKey:E}=this.options;let h=0;for(;h<v&&E(h)!==f;)h++;if(h<v){const g=x[h];if(g){const k=Math.max(0,g.start+p);k!==this.scrollOffset&&(c=k-this.scrollOffset,this.scrollOffset=k,d=!0)}}}(d||a)&&(this.pendingScrollAnchor=[d?s[0]:null,d?s[1]:0,a,c])},this.notify=n=>{var r,i;(i=(r=this.options).onChange)==null||i.call(r,this,n)},this.maybeNotify=rr(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const r=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r){if(this.cleanup(),!r){this.maybeNotify();return}if(this.scrollElement=r,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this.elementsCache.forEach(l=>{this.observer.observe(l)}),this.unsubs.push(this.options.observeElementRect(this,l=>{this.scrollRect=l,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(l,o)=>{if(o&&this._intendedScrollOffset===null&&l===this.scrollOffset)return;this._intendedScrollOffset!==null&&Math.abs(l-this._intendedScrollOffset)<1.5&&(l=this._intendedScrollOffset),this._intendedScrollOffset=null,this.scrollAdjustments=0;const s=this.getScrollOffset();this.scrollDirection=o?s===l?this.scrollDirection:s<l?"forward":"backward":null,this.scrollOffset=l,this.isScrolling=o,this._flushIosDeferredIfReady(),this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),"addEventListener"in this.scrollElement){const l=this.scrollElement,o=()=>{this._iosTouching=!0,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},s=()=>{this._iosTouching=!1,!(!hs()||this.targetWindow==null)&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};l.addEventListener("touchstart",o,ro),l.addEventListener("touchend",s,ro),this.unsubs.push(()=>{l.removeEventListener("touchstart",o),l.removeEventListener("touchend",s),this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}const i=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,i&&this.scrollElement&&this.options.enabled){const[l,o,s,a]=i;l!==null&&!s&&(hs()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?a!==0&&(this._iosDeferredAdjustment+=a):this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})),s&&this.scrollToEnd({behavior:s})}},this._flushIosDeferredIfReady=()=>{if(this._iosDeferredAdjustment===0||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;const n=this.getScrollOffset(),r=this.getMaxScrollOffset();if(n<0||n>r)return;if(this._iosDeferredAdjustment<0&&n>=r-1){this._iosDeferredAdjustment=0;return}const i=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(n,{adjustments:this.scrollAdjustments+=i,behavior:void 0})},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getMeasurementOptions=rr(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode,this.options.gap],(n,r,i,l,o,s,a,u)=>(this.prevLanes!==void 0&&this.prevLanes!==s&&(this.lanesChangedFlag=!0),this.prevLanes=s,this.pendingMin=null,{count:n,paddingStart:r,scrollMargin:i,getItemKey:l,enabled:o,lanes:s,laneAssignmentMode:a,gap:u}),{key:!1}),this.getMeasurements=rr(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:n,paddingStart:r,scrollMargin:i,getItemKey:l,enabled:o,lanes:s,laneAssignmentMode:a,gap:u},d)=>{const c=this.itemSizeCache;if(!o)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>n)for(const h of this.laneAssignments.keys())h>=n&&this.laneAssignments.delete(h);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(h=>{this.itemSizeCache.set(h.key,h.size)}));const f=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===n&&(this.lanesSettling=!1),s===1){const h=n*2;let g=this._flatMeasurements;if(!g||g.length<h){const N=new Float64Array(h);g&&f>0&&N.set(g.subarray(0,f*2)),g=N,this._flatMeasurements=g}let k;if(f===0)k=r+i;else{const N=f-1;k=g[N*2]+g[N*2+1]+u}for(let N=f;N<n;N++){const b=l(N),I=c.get(b),_=typeof I=="number"?I:this.options.estimateSize(N);g[N*2]=k,g[N*2+1]=_,k+=_+u}const C=pS(n,g,l);return this.measurementsCache=C,C}const p=this.measurementsCache.slice(0,f),x=new Array(s).fill(void 0),v=new Float64Array(s);let E=0;for(let h=0;h<f;h++){const g=p[h];g&&(x[g.lane]===void 0&&E++,x[g.lane]=h,v[g.lane]=g.end)}for(let h=f;h<n;h++){const g=l(h),k=this.laneAssignments.get(h);let C,N;const b=a==="estimate"||c.has(g);if(k!==void 0&&this.options.lanes>1){C=k;const S=x[C],j=S!==void 0?p[S]:void 0;N=j?j.end+u:r+i}else if(E===s){let S=0,j=v[0],O=x[0];for(let U=1;U<s;U++){const G=v[U];(G<j||G===j&&x[U]<O)&&(S=U,j=G,O=x[U])}C=S,N=j+u,b&&this.laneAssignments.set(h,C)}else C=h%this.options.lanes,N=r+i,b&&this.laneAssignments.set(h,C);const I=c.get(g),_=typeof I=="number"?I:this.options.estimateSize(h),z=N+_;p[h]={index:h,start:N,size:_,end:z,key:g,lane:C},x[C]===void 0&&E++,x[C]=h,v[C]=z}return this.measurementsCache=p,p},{key:!1,debug:()=>this.options.debug}),this.calculateRange=rr(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,r,i,l)=>n.length===0||r===0?(this.range=null,null):(this.range=IS(n,r,i,l,l===1&&this._flatMeasurements!=null?this._flatMeasurements:null),this.range),{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=rr(()=>{let n=null,r=null;const i=this.calculateRange();return i&&(n=i.startIndex,r=i.endIndex),this.maybeNotify.updateDeps([this.isScrolling,n,r]),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,r]},(n,r,i,l,o)=>l===null||o===null?[]:n({startIndex:l,endIndex:o,overscan:r,count:i}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=n=>{const r=this.options.indexAttribute,i=n.getAttribute(r);return i?parseInt(i,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=n=>{var r;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;const i=this.scrollState.index??((r=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:r.index);if(i!==void 0&&this.range){const l=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),o=Math.max(0,i-l),s=Math.min(this.options.count-1,i+l);return n>=o&&n<=s}return!0},this.measureElement=n=>{if(!n){this.elementsCache.forEach((o,s)=>{o.isConnected||(this.observer.unobserve(o),this.elementsCache.delete(s))});return}const r=this.indexFromElement(n),i=this.options.getItemKey(r),l=this.elementsCache.get(i);l!==n&&(l&&this.observer.unobserve(l),this.observer.observe(n),this.elementsCache.set(i,n)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(r)&&this.resizeItem(r,this.options.measureElement(n,void 0,this))},this.resizeItem=(n,r)=>{var i,l;if(n<0||n>=this.options.count)return;let o,s,a;const u=this._flatMeasurements;if(this.options.lanes===1&&u!==null)a=this.options.getItemKey(n),s=u[n*2],o=u[n*2+1];else{const f=this.measurementsCache[n];if(!f)return;a=f.key,s=f.start,o=f.size}const d=this.itemSizeCache.get(a)??o,c=r-d;if(c!==0){const f=this.options.anchorTo==="end"&&((i=this.scrollState)==null?void 0:i.behavior)!=="smooth"&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,p=f?this.getTotalSize():0,x=this.getScrollOffset()+this.scrollAdjustments,E=!this.itemSizeCache.has(a)?s<x:s+d<=x&&this.scrollDirection!=="backward",h=((l=this.scrollState)==null?void 0:l.behavior)!=="smooth"&&(this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[n]??{index:n,key:a,start:s,size:o,end:s+o,lane:0},c,this):E);(this.pendingMin===null||n<this.pendingMin)&&(this.pendingMin=n),this.itemSizeCache.set(a,r),this.itemSizeCacheVersion++;let g=!1;f?g=this.applyScrollAdjustment(this.getTotalSize()-p):h&&(g=this.applyScrollAdjustment(c)),this.notify(g)}},this.getVirtualItems=rr(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,r)=>{const i=[];for(let l=0,o=n.length;l<o;l++){const s=n[l],a=r[s];i.push(a)}return i},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const r=this.getMeasurements();if(r.length===0)return;const i=this._flatMeasurements,l=this.options.lanes===1&&i!=null,o=eg(0,r.length-1,l?s=>i[s*2]:s=>Qd(r[s]).start,n);return Qd(r[o])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const n=this.scrollElement.document.documentElement;return this.options.horizontal?n.scrollWidth-this.scrollElement.innerWidth:n.scrollHeight-this.scrollElement.innerHeight}},this.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(n=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=n,this.getOffsetForAlignment=(n,r,i=0)=>{if(!this.scrollElement)return 0;const l=this.getSize(),o=this.getScrollOffset();r==="auto"&&(r=n>=o+l?"end":"start"),r==="center"?n+=(i-l)/2:r==="end"&&(n-=l);const s=this.getMaxScrollOffset();return Math.max(Math.min(s,n),0)},this.getOffsetForIndex=(n,r="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const i=this.getSize(),l=this.getScrollOffset(),o=this.measurementsCache[n];if(!o)return;if(r==="auto")if(o.end>=l+i-this.options.scrollPaddingEnd)r="end";else if(o.start<=l+this.options.scrollPaddingStart)r="start";else return[l,r];if(r==="end"&&n===this.options.count-1)return[this.getMaxScrollOffset(),r];const s=r==="end"?o.end+this.options.scrollPaddingEnd:o.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(s,r,o.size),r]},this.scrollToOffset=(n,{align:r="start",behavior:i="auto"}={})=>{this._iosDeferredAdjustment=0;const l=this.getOffsetForAlignment(n,r),o=this.now();this.scrollState={index:null,align:r,behavior:i,startedAt:o,lastTargetOffset:l,stableFrames:0},this._scrollToOffset(l,{adjustments:void 0,behavior:i}),this.scheduleScrollReconcile()},this.scrollToIndex=(n,{align:r="auto",behavior:i="auto"}={})=>{this._iosDeferredAdjustment=0,n=Math.max(0,Math.min(n,this.options.count-1));const l=this.getOffsetForIndex(n,r);if(!l)return;const[o,s]=l,a=this.now();this.scrollState={index:n,align:s,behavior:i,startedAt:a,lastTargetOffset:o,stableFrames:0},this._scrollToOffset(o,{adjustments:void 0,behavior:i}),this.scheduleScrollReconcile()},this.scrollBy=(n,{behavior:r="auto"}={})=>{const i=this.getScrollOffset()+n,l=this.now();this.scrollState={index:null,align:"start",behavior:r,startedAt:l,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:r}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:n="auto"}={})=>{if(this.options.count>0){this.scrollToIndex(this.options.count-1,{align:"end",behavior:n});return}this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:n})},this.getTotalSize=()=>{var n;const r=this.getMeasurements();let i;if(r.length===0)i=this.options.paddingStart;else if(this.options.lanes===1){const l=r.length-1,o=this._flatMeasurements;o!=null?i=o[l*2]+o[l*2+1]:i=((n=r[l])==null?void 0:n.end)??0}else{const l=Array(this.options.lanes).fill(null);let o=r.length-1;for(;o>=0&&l.some(s=>s===null);){const s=r[o];l[s.lane]===null&&(l[s.lane]=s.end),o--}i=Math.max(...l.filter(s=>s!==null))}return Math.max(i-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{const n=[];if(this.itemSizeCache.size===0)return n;const r=this.getMeasurements();for(const i of r)i&&this.itemSizeCache.has(i.key)&&n.push({index:i.index,key:i.key,start:i.start,size:i.size,end:i.end,lane:i.lane});return n},this._scrollToOffset=(n,{adjustments:r,behavior:i})=>{this._intendedScrollOffset=n+(r??0),this.options.scrollToFn(n,{behavior:i,adjustments:r},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(t)}applyScrollAdjustment(t,n){return t===0?!1:hs()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?(this._iosDeferredAdjustment+=t,!1):(this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=t,behavior:n}),this.scrollOffset!==null&&(this.scrollOffset+=this.scrollAdjustments,this.scrollOffset<0&&(this.scrollOffset=0),this.scrollAdjustments=0),!0)}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId==null&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}const r=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,i=r?r[0]:this.scrollState.lastTargetOffset,l=1,o=i!==this.scrollState.lastTargetOffset;if(!o&&hS(i,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=l){this.getScrollOffset()!==i&&this._scrollToOffset(i,{adjustments:void 0,behavior:"auto"}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,o){const s=this.getSize()||600,a=Math.abs(i-this.getScrollOffset()),u=this.scrollState.behavior==="smooth"&&a>s;this.scrollState.lastTargetOffset=i,u||(this.scrollState.behavior="auto"),this._scrollToOffset(i,{adjustments:void 0,behavior:u?"smooth":"auto"})}this.scheduleScrollReconcile()}}const eg=(e,t,n,r)=>{for(;e<=t;){const i=(e+t)/2|0,l=n(i);if(l<r)e=i+1;else if(l>r)t=i-1;else return i}return e>0?e-1:0};function _S(e,t,n){let r=0;for(;r<=t;){const i=(r+t)/2|0,l=e[i*2];if(l<n)r=i+1;else if(l>n)t=i-1;else return i}return r>0?r-1:0}function IS(e,t,n,r,i){const l=e.length-1;if(e.length<=r)return{startIndex:0,endIndex:l};if(r===1&&i!==null){const u=_S(i,l,n);let d=u;const c=n+t;for(;d<l&&i[d*2]+i[d*2+1]<c;)d++;return{startIndex:u,endIndex:d}}let s=eg(0,l,u=>e[u].start,n),a=s;if(r===1)for(;a<l&&e[a].end<n+t;)a++;else if(r>1){const u=Array(r).fill(0);for(;a<l&&u.some(c=>c<n+t);){const c=e[a];u[c.lane]=c.end,a++}const d=Array(r).fill(n+t);for(;s>=0&&d.some(c=>c>=n);){const c=e[s];d[c.lane]=c.start,s--}s=Math.max(0,s-s%r),a=Math.min(l,a+(r-1-a%r))}return{startIndex:s,endIndex:a}}const ms=typeof document<"u"?M.useLayoutEffect:M.useEffect;function NS({useFlushSync:e=!0,directDomUpdates:t=!1,directDomUpdatesMode:n="transform",...r}){const i=M.useReducer(d=>d+1,0)[1],l=M.useRef({enabled:t,mode:n,container:null,lastSize:null,lastPositions:new WeakMap,prevRange:null});l.current.enabled=t,l.current.mode=n;const o=d=>{const c=l.current;if(!c.enabled||!c.container)return;const f=d.getTotalSize();if(f!==c.lastSize){c.lastSize=f;const p=d.options.horizontal?"width":"height";c.container.style[p]=`${f}px`}},s=d=>{const c=l.current;if(!c.enabled||!c.container)return;o(d);const f=!!d.options.horizontal,p=c.mode==="transform",x=f?"left":"top",v=d.options.scrollMargin,E=d.getVirtualItems();for(const h of E){const g=h.start-v,k=d.elementsCache.get(h.key);k&&c.lastPositions.get(k)!==g&&(c.lastPositions.set(k,g),p?k.style.transform=f?`translate3d(${g}px, 0, 0)`:`translate3d(0, ${g}px, 0)`:k.style[x]=`${g}px`)}},a={...r,onChange:(d,c)=>{var f;const p=l.current;let x=!0;if(p.enabled){s(d);const v=d.range,E=p.prevRange;x=!E||E.isScrolling!==d.isScrolling||E.startIndex!==(v==null?void 0:v.startIndex)||E.endIndex!==(v==null?void 0:v.endIndex),x&&(p.prevRange=v?{startIndex:v.startIndex,endIndex:v.endIndex,isScrolling:d.isScrolling}:null)}x&&(e&&c?am.flushSync(i):i()),(f=r.onChange)==null||f.call(r,d,c)}},[u]=M.useState(()=>{const d=new ES(a);return Object.assign(d,{containerRef:c=>{const f=l.current;if(f.container=c,f.lastSize=null,c&&f.enabled){const p=d.getTotalSize();f.lastSize=p;const x=d.options.horizontal?"width":"height";c.style[x]=`${p}px`}}})});return u.setOptions(a),ms(()=>u._didMount(),[]),ms(()=>(o(u),u._willUpdate())),ms(()=>{s(u)}),u}function TS(e){return NS({observeElementRect:yS,observeElementOffset:wS,scrollToFn:CS,...e})}const tg=14,Yd=je.type.subagent,zS={elapsed:"elapsed, approval wait included",sidecar_span:"measured by the sub-agent span",reported:"reported by the harness",none:"not measured"};function jS({row:e,selected:t,focused:n,onSelect:r,onToggle:i}){const{event:l,kind:o,status:s}=e.node,a=cS[o],u=je.status[s],d=l.name??l.kind,c=p0(l.duration_source),f=zS[c],p=Mi(l.input),x=Mi(l.text),v=l.child_session_id,E=v===null?null:{type:l.agent_type??je.type.subagent.label,status:v0(l.agent_status)};return m.jsxs("div",{role:"treeitem","data-slot":"span-row","data-span-status":s,"data-event-kind":o,"data-event-id":l.id,"data-session-id":e.sessionId,...v===null?{}:{"data-child-session-id":v},"aria-level":e.depth+1,"aria-setsize":e.setSize,"aria-posinset":e.posInSet,"aria-selected":t,...e.hasChildren?{"aria-expanded":e.expanded}:{},"aria-label":[`${a.label} ${d}`,...E===null?[]:[`sub-agent ${E.type}, ${E.status}`],u.label,f].join(", "),tabIndex:n?0:-1,onClick:()=>r==null?void 0:r(e.id),className:he("border-l-2 text-xs text-foreground",u.row,t?"border-l-accent bg-accent-muted":"border-l-background"),style:{paddingLeft:e.depth*tg},children:[m.jsxs("div",{className:"flex h-7 items-center gap-2 pr-2",children:[m.jsx(PS,{row:e,name:d,onToggle:i}),m.jsx("span",{"data-slot":"span-type",className:he("shrink-0",a.tint),children:m.jsx(a.Icon,{size:12,"aria-hidden":"true"})}),m.jsx("span",{"data-slot":"span-name",className:"min-w-0 flex-1 truncate",children:d}),E===null?null:m.jsxs("span",{"data-slot":"span-subagent",className:he("flex shrink-0 items-center gap-1",Yd.tint),children:[m.jsx(Yd.Icon,{size:12,"aria-hidden":"true"}),m.jsx("span",{className:"font-mono text-2xs",children:E.type}),m.jsx("span",{className:je.triggerBadge,children:E.status})]}),m.jsx("span",{"data-slot":"span-status",role:"img",title:u.label,"aria-label":u.label,className:he("shrink-0",u.tint),children:m.jsx(u.Icon,{size:12,"aria-hidden":"true"})}),m.jsx("span",{"data-slot":"span-metrics","data-duration-source":c,title:f,className:"shrink-0",children:m.jsx(Uu,{values:$m(l),showErrors:!1})})]}),p===null&&x===null?null:m.jsxs("div",{"data-slot":"span-payload",className:"flex items-center gap-2 pb-1 pl-6 pr-2",children:[p===null?null:m.jsx("span",{"data-slot":"span-input",className:he("min-w-0 truncate",je.payloadChip),children:p}),x===null?null:m.jsx("span",{"data-slot":"span-output",className:he("min-w-0 truncate",je.payloadChip),children:x})]})]})}function PS({row:e,name:t,onToggle:n}){if(!e.hasChildren)return m.jsx("span",{"data-slot":"span-expand-space","aria-hidden":"true",className:"w-3.5 shrink-0"});const r=e.expanded?Eo:Ai;return m.jsx("button",{type:"button","data-slot":"span-expand",tabIndex:-1,"aria-label":e.expanded?`collapse ${t}`:`expand ${t}`,onClick:i=>{i.stopPropagation(),n==null||n(e.id)},className:"shrink-0 text-faint",children:m.jsx(r,{size:14,"aria-hidden":"true"})})}function Uu({values:e,showErrors:t}){return m.jsxs(m.Fragment,{children:[t&&e.errorCount>0?m.jsxs("span",{"data-slot":"row-errors",className:je.errorChip,children:[e.errorCount," err"]}):null,m.jsx(Bu,{className:"shrink-0",duration:qv(e.durationMs),...e.tokens>0?{tokens:`${Wt(e.tokens)} tok`}:{},...e.costUnknown!==void 0?{cost:Li(e.cost),costUnknown:e.costUnknown}:e.cost!==null&&e.cost>0?{cost:Li(e.cost)}:{}})]})}function AS({row:e,selected:t,focused:n,onSelect:r,onToggle:i}){const{turn:l}=e,{Icon:o,tint:s,label:a}=je.trace,u=e.expanded?Eo:Ai,d=y0(l);return m.jsxs("div",{role:"treeitem","data-slot":"trace-group","data-turn-kind":l.kind,"data-session-id":e.sessionId,"aria-level":e.depth+1,"aria-setsize":e.setSize,"aria-posinset":e.posInSet,"aria-selected":t,...e.hasChildren?{"aria-expanded":e.expanded}:{},"aria-label":`${a} ${l.seq}: ${d}`,tabIndex:n?0:-1,onClick:()=>r==null?void 0:r(e.id),className:he("flex h-9 items-center gap-2 border-l-2 border-b border-b-border bg-surface pr-2 text-xs text-foreground",t?"border-l-accent bg-accent-muted":"border-l-background"),style:{paddingLeft:e.depth*tg},children:[m.jsx("button",{type:"button","data-slot":"trace-expand",tabIndex:-1,"aria-label":e.expanded?`collapse turn ${l.seq}`:`expand turn ${l.seq}`,onClick:c=>{c.stopPropagation(),i==null||i(e.id)},className:"shrink-0 pl-1 text-faint",children:m.jsx(u,{size:14,"aria-hidden":"true"})}),m.jsx("span",{"data-slot":"trace-icon",className:he("shrink-0",s),children:m.jsx(o,{size:12,"aria-hidden":"true"})}),m.jsx("span",{"data-slot":"trace-preview",className:"min-w-0 flex-1 truncate font-medium",children:d}),e.subagent===void 0?null:m.jsxs("span",{"data-slot":"trace-subagent",className:"flex min-w-0 items-center gap-2",children:[m.jsx("span",{"data-slot":"trace-agent-description",className:"min-w-0 truncate font-mono text-2xs text-muted",children:e.subagent.header.agent_description??""}),m.jsx(Bu,{className:"shrink-0",tokens:`${Wt(e.subagent.header.tokens_in+e.subagent.header.tokens_out)} tok`,cost:Li(e.subagent.header.est_cost),costUnknown:Lr(e.subagent.header.est_cost,e.subagent.header.model)})]}),l.kind==="human"?null:m.jsx("span",{"data-slot":"trace-trigger",title:`started by ${l.kind}`,"aria-label":`started by ${l.kind}`,className:je.triggerBadge,children:l.kind}),m.jsx(Uu,{values:g0(l),showErrors:!0})]})}const LS=28,MS=8;function RS({rows:e,selectedId:t,focusedIndex:n,initialRect:r,estimateSize:i=LS,overscan:l=MS,followIndex:o,revealIndex:s,onScrollMetrics:a,onKeyDown:u,onSelect:d,onToggle:c}){const f=M.useRef(null),p=M.useRef(!1),x=TS({count:e.length,getScrollElement:()=>f.current,estimateSize:()=>i,overscan:l,getItemKey:E=>{var h;return((h=e[E])==null?void 0:h.id)??E},...r===void 0?{}:{initialRect:r}});M.useEffect(()=>{o!==void 0&&(p.current=!0,x.scrollToIndex(o,{align:"end"}))},[o,x]),M.useEffect(()=>{s!==void 0&&(p.current=!0,x.scrollToIndex(s,{align:"center"}))},[s,x]);const v=E=>{if(p.current){p.current=!1;return}const h=E.currentTarget;a==null||a({scrollTop:h.scrollTop,scrollHeight:h.scrollHeight,clientHeight:h.clientHeight})};return m.jsx("div",{ref:f,"data-slot":"span-tree-scroller",className:"h-full overflow-y-auto",onKeyDown:u,onScroll:v,children:m.jsx("div",{role:"tree","aria-label":"span tree","data-slot":"span-tree",className:"relative w-full",style:{height:x.getTotalSize()},children:x.getVirtualItems().map(E=>{const h=e[E.index];return h===void 0?null:m.jsx("div",{role:"presentation","data-index":E.index,ref:x.measureElement,className:"absolute left-0 w-full",style:{top:E.start},children:h.kind==="turn"?m.jsx(AS,{row:h,selected:h.id===t,focused:E.index===n,...d===void 0?{}:{onSelect:d},...c===void 0?{}:{onToggle:c}}):m.jsx(jS,{row:h,selected:h.id===t,focused:E.index===n,...d===void 0?{}:{onSelect:d},...c===void 0?{}:{onToggle:c}})},E.key)})})})}function OS(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const DS=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,FS=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,$S={};function Xd(e,t){return($S.jsx?FS:DS).test(e)}const VS=/[ \t\n\f\r]/g;function BS(e){return typeof e=="object"?e.type==="text"?Jd(e.value):!1:Jd(e)}function Jd(e){return e.replace(VS,"")===""}class Ui{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Ui.prototype.normal={};Ui.prototype.property={};Ui.prototype.space=void 0;function ng(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Ui(n,r,t)}function Ia(e){return e.toLowerCase()}class tt{constructor(t,n){this.attribute=n,this.property=t}}tt.prototype.attribute="";tt.prototype.booleanish=!1;tt.prototype.boolean=!1;tt.prototype.commaOrSpaceSeparated=!1;tt.prototype.commaSeparated=!1;tt.prototype.defined=!1;tt.prototype.mustUseProperty=!1;tt.prototype.number=!1;tt.prototype.overloadedBoolean=!1;tt.prototype.property="";tt.prototype.spaceSeparated=!1;tt.prototype.space=void 0;let US=0;const q=er(),Ee=er(),Na=er(),A=er(),de=er(),Un=er(),it=er();function er(){return 2**++US}const Ta=Object.freeze(Object.defineProperty({__proto__:null,boolean:q,booleanish:Ee,commaOrSpaceSeparated:it,commaSeparated:Un,number:A,overloadedBoolean:Na,spaceSeparated:de},Symbol.toStringTag,{value:"Module"})),gs=Object.keys(Ta);class Hu extends tt{constructor(t,n,r,i){let l=-1;if(super(t,n),Zd(this,"space",i),typeof r=="number")for(;++l<gs.length;){const o=gs[l];Zd(this,gs[l],(r&Ta[o])===Ta[o])}}}Hu.prototype.defined=!0;function Zd(e,t,n){n&&(e[t]=n)}function Mr(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const l=new Hu(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(l.mustUseProperty=!0),t[r]=l,n[Ia(r)]=r,n[Ia(l.attribute)]=r}return new Ui(t,n,e.space)}const rg=Mr({properties:{ariaActiveDescendant:null,ariaAtomic:Ee,ariaAutoComplete:null,ariaBusy:Ee,ariaChecked:Ee,ariaColCount:A,ariaColIndex:A,ariaColSpan:A,ariaControls:de,ariaCurrent:null,ariaDescribedBy:de,ariaDetails:null,ariaDisabled:Ee,ariaDropEffect:de,ariaErrorMessage:null,ariaExpanded:Ee,ariaFlowTo:de,ariaGrabbed:Ee,ariaHasPopup:null,ariaHidden:Ee,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:de,ariaLevel:A,ariaLive:null,ariaModal:Ee,ariaMultiLine:Ee,ariaMultiSelectable:Ee,ariaOrientation:null,ariaOwns:de,ariaPlaceholder:null,ariaPosInSet:A,ariaPressed:Ee,ariaReadOnly:Ee,ariaRelevant:null,ariaRequired:Ee,ariaRoleDescription:de,ariaRowCount:A,ariaRowIndex:A,ariaRowSpan:A,ariaSelected:Ee,ariaSetSize:A,ariaSort:null,ariaValueMax:A,ariaValueMin:A,ariaValueNow:A,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function ig(e,t){return t in e?e[t]:t}function lg(e,t){return ig(e,t.toLowerCase())}const HS=Mr({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Un,acceptCharset:de,accessKey:de,action:null,allow:null,allowFullScreen:q,allowPaymentRequest:q,allowUserMedia:q,alpha:q,alt:null,as:null,async:q,autoCapitalize:null,autoComplete:de,autoFocus:q,autoPlay:q,blocking:de,capture:null,charSet:null,checked:q,cite:null,className:de,closedBy:null,colorSpace:null,cols:A,colSpan:A,command:null,commandFor:null,content:null,contentEditable:Ee,controls:q,controlsList:de,coords:A|Un,crossOrigin:null,data:null,dateTime:null,decoding:null,default:q,defer:q,dir:null,dirName:null,disabled:q,download:Na,draggable:Ee,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:q,formTarget:null,headers:de,height:A,hidden:Na,high:A,href:null,hrefLang:null,htmlFor:de,httpEquiv:de,id:null,imageSizes:null,imageSrcSet:null,inert:q,inputMode:null,integrity:null,is:null,isMap:q,itemId:null,itemProp:de,itemRef:de,itemScope:q,itemType:de,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:q,low:A,manifest:null,max:null,maxLength:A,media:null,method:null,min:null,minLength:A,multiple:q,muted:q,name:null,nonce:null,noModule:q,noValidate:q,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:q,optimum:A,pattern:null,ping:de,placeholder:null,playsInline:q,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:q,referrerPolicy:null,rel:de,required:q,reversed:q,rows:A,rowSpan:A,sandbox:de,scope:null,scoped:q,seamless:q,selected:q,shadowRootClonable:q,shadowRootCustomElementRegistry:q,shadowRootDelegatesFocus:q,shadowRootMode:null,shadowRootSerializable:q,shape:null,size:A,sizes:null,slot:null,span:A,spellCheck:Ee,src:null,srcDoc:null,srcLang:null,srcSet:null,start:A,step:null,style:null,tabIndex:A,target:null,title:null,translate:null,type:null,typeMustMatch:q,useMap:null,value:Ee,width:A,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:de,axis:null,background:null,bgColor:null,border:A,borderColor:null,bottomMargin:A,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:q,declare:q,event:null,face:null,frame:null,frameBorder:null,hSpace:A,leftMargin:A,link:null,longDesc:null,lowSrc:null,marginHeight:A,marginWidth:A,noResize:q,noHref:q,noShade:q,noWrap:q,object:null,profile:null,prompt:null,rev:null,rightMargin:A,rules:null,scheme:null,scrolling:Ee,standby:null,summary:null,text:null,topMargin:A,valueType:null,version:null,vAlign:null,vLink:null,vSpace:A,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:q,disablePictureInPicture:q,disableRemotePlayback:q,exportParts:Un,part:de,prefix:null,property:null,results:A,security:null,unselectable:null},space:"html",transform:lg}),WS=Mr({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:it,accentHeight:A,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:A,amplitude:A,arabicForm:null,ascent:A,attributeName:null,attributeType:null,azimuth:A,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:A,by:null,calcMode:null,capHeight:A,className:de,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:A,diffuseConstant:A,direction:null,display:null,dur:null,divisor:A,dominantBaseline:null,download:q,dx:null,dy:null,edgeMode:null,editable:null,elevation:A,enableBackground:null,end:null,event:null,exponent:A,externalResourcesRequired:null,fill:null,fillOpacity:A,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Un,g2:Un,glyphName:Un,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:A,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:A,horizOriginX:A,horizOriginY:A,id:null,ideographic:A,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:A,k:A,k1:A,k2:A,k3:A,k4:A,kernelMatrix:it,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:A,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:A,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:A,overlineThickness:A,paintOrder:null,panose1:null,path:null,pathLength:A,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:de,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:A,pointsAtY:A,pointsAtZ:A,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:it,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:it,rev:it,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:it,requiredFeatures:it,requiredFonts:it,requiredFormats:it,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:A,specularExponent:A,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:A,strikethroughThickness:A,string:null,stroke:null,strokeDashArray:it,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:A,strokeOpacity:A,strokeWidth:null,style:null,surfaceScale:A,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:it,tabIndex:A,tableValues:null,target:null,targetX:A,targetY:A,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:it,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:A,underlineThickness:A,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:A,values:null,vAlphabetic:A,vMathematical:A,vectorEffect:null,vHanging:A,vIdeographic:A,version:null,vertAdvY:A,vertOriginX:A,vertOriginY:A,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:A,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:ig}),og=Mr({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),sg=Mr({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:lg}),ag=Mr({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),qS={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},KS=/[A-Z]/g,ef=/-[a-z]/g,QS=/^data[-\w.:]+$/i;function GS(e,t){const n=Ia(t);let r=t,i=tt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&QS.test(t)){if(t.charAt(4)==="-"){const l=t.slice(5).replace(ef,XS);r="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=t.slice(4);if(!ef.test(l)){let o=l.replace(KS,YS);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=Hu}return new i(r,t)}function YS(e){return"-"+e.toLowerCase()}function XS(e){return e.charAt(1).toUpperCase()}const JS=ng([rg,HS,og,sg,ag],"html"),Wu=ng([rg,WS,og,sg,ag],"svg");function ZS(e){return e.join(" ").trim()}var qu={},tf=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,eb=/\n/g,tb=/^\s*/,nb=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,rb=/^:\s*/,ib=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,lb=/^[;\s]*/,ob=/^\s+|\s+$/g,sb=`
227
+ `,nf="/",rf="*",Rn="",ab="comment",ub="declaration";function cb(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(x){var v=x.match(eb);v&&(n+=v.length);var E=x.lastIndexOf(sb);r=~E?x.length-E:r+x.length}function l(){var x={line:n,column:r};return function(v){return v.position=new o(x),u(),v}}function o(x){this.start=x,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function s(x){var v=new Error(t.source+":"+n+":"+r+": "+x);if(v.reason=x,v.filename=t.source,v.line=n,v.column=r,v.source=e,!t.silent)throw v}function a(x){var v=x.exec(e);if(v){var E=v[0];return i(E),e=e.slice(E.length),v}}function u(){a(tb)}function d(x){var v;for(x=x||[];v=c();)v!==!1&&x.push(v);return x}function c(){var x=l();if(!(nf!=e.charAt(0)||rf!=e.charAt(1))){for(var v=2;Rn!=e.charAt(v)&&(rf!=e.charAt(v)||nf!=e.charAt(v+1));)++v;if(v+=2,Rn===e.charAt(v-1))return s("End of comment missing");var E=e.slice(2,v-2);return r+=2,i(E),e=e.slice(v),r+=2,x({type:ab,comment:E})}}function f(){var x=l(),v=a(nb);if(v){if(c(),!a(rb))return s("property missing ':'");var E=a(ib),h=x({type:ub,property:lf(v[0].replace(tf,Rn)),value:E?lf(E[0].replace(tf,Rn)):Rn});return a(lb),h}}function p(){var x=[];d(x);for(var v;v=f();)v!==!1&&(x.push(v),d(x));return x}return u(),p()}function lf(e){return e?e.replace(ob,Rn):Rn}var db=cb,fb=jl&&jl.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(qu,"__esModule",{value:!0});qu.default=hb;const pb=fb(db);function hb(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,pb.default)(e),i=typeof t=="function";return r.forEach(l=>{if(l.type!=="declaration")return;const{property:o,value:s}=l;i?t(o,s,l):s&&(n=n||{},n[o]=s)}),n}var Io={};Object.defineProperty(Io,"__esModule",{value:!0});Io.camelCase=void 0;var mb=/^--[a-zA-Z0-9_-]+$/,gb=/-([a-z])/g,xb=/^[^-]+$/,yb=/^-(webkit|moz|ms|o|khtml)-/,kb=/^-(ms)-/,vb=function(e){return!e||xb.test(e)||mb.test(e)},wb=function(e,t){return t.toUpperCase()},of=function(e,t){return"".concat(t,"-")},Sb=function(e,t){return t===void 0&&(t={}),vb(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(kb,of):e=e.replace(yb,of),e.replace(gb,wb))};Io.camelCase=Sb;var bb=jl&&jl.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Cb=bb(qu),Eb=Io;function za(e,t){var n={};return!e||typeof e!="string"||(0,Cb.default)(e,function(r,i){r&&i&&(n[(0,Eb.camelCase)(r,t)]=i)}),n}za.default=za;var _b=za;const Ib=Gf(_b),ug=cg("end"),Ku=cg("start");function cg(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Nb(e){const t=Ku(e),n=ug(e);if(t&&n)return{start:t,end:n}}function pi(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?sf(e.position):"start"in e||"end"in e?sf(e):"line"in e||"column"in e?ja(e):""}function ja(e){return af(e&&e.line)+":"+af(e&&e.column)}function sf(e){return ja(e&&e.start)+"-"+ja(e&&e.end)}function af(e){return e&&typeof e=="number"?e:1}class Ue extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",l={},o=!1;if(n&&("line"in n&&"column"in n?l={place:n}:"start"in n&&"end"in n?l={place:n}:"type"in n?l={ancestors:[n],place:n.position}:l={...n}),typeof t=="string"?i=t:!l.cause&&t&&(o=!0,i=t.message,l.cause=t),!l.ruleId&&!l.source&&typeof r=="string"){const a=r.indexOf(":");a===-1?l.ruleId=r:(l.source=r.slice(0,a),l.ruleId=r.slice(a+1))}if(!l.place&&l.ancestors&&l.ancestors){const a=l.ancestors[l.ancestors.length-1];a&&(l.place=a.position)}const s=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=s?s.line:void 0,this.name=pi(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=o&&l.cause&&typeof l.cause.stack=="string"?l.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Ue.prototype.file="";Ue.prototype.name="";Ue.prototype.reason="";Ue.prototype.message="";Ue.prototype.stack="";Ue.prototype.column=void 0;Ue.prototype.line=void 0;Ue.prototype.ancestors=void 0;Ue.prototype.cause=void 0;Ue.prototype.fatal=void 0;Ue.prototype.place=void 0;Ue.prototype.ruleId=void 0;Ue.prototype.source=void 0;const Qu={}.hasOwnProperty,Tb=new Map,zb=/[A-Z]/g,jb=new Set(["table","tbody","thead","tfoot","tr"]),Pb=new Set(["td","th"]),dg="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Ab(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Vb(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=$b(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Wu:JS,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},l=fg(i,e,void 0);return l&&typeof l!="string"?l:i.create(e,i.Fragment,{children:l||void 0},void 0)}function fg(e,t,n){if(t.type==="element")return Lb(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Mb(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Ob(e,t,n);if(t.type==="mdxjsEsm")return Rb(e,t);if(t.type==="root")return Db(e,t,n);if(t.type==="text")return Fb(e,t)}function Lb(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Wu,e.schema=i),e.ancestors.push(t);const l=hg(e,t.tagName,!1),o=Bb(e,t);let s=Yu(e,t);return jb.has(t.tagName)&&(s=s.filter(function(a){return typeof a=="string"?!BS(a):!0})),pg(e,o,l,t),Gu(o,s),e.ancestors.pop(),e.schema=r,e.create(t,l,o,n)}function Mb(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Ri(e,t.position)}function Rb(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Ri(e,t.position)}function Ob(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Wu,e.schema=i),e.ancestors.push(t);const l=t.name===null?e.Fragment:hg(e,t.name,!0),o=Ub(e,t),s=Yu(e,t);return pg(e,o,l,t),Gu(o,s),e.ancestors.pop(),e.schema=r,e.create(t,l,o,n)}function Db(e,t,n){const r={};return Gu(r,Yu(e,t)),e.create(t,e.Fragment,r,n)}function Fb(e,t){return t.value}function pg(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Gu(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function $b(e,t,n){return r;function r(i,l,o,s){const u=Array.isArray(o.children)?n:t;return s?u(l,o,s):u(l,o)}}function Vb(e,t){return n;function n(r,i,l,o){const s=Array.isArray(l.children),a=Ku(r);return t(i,l,o,s,{columnNumber:a?a.column-1:void 0,fileName:e,lineNumber:a?a.line:void 0},void 0)}}function Bb(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Qu.call(t.properties,i)){const l=Hb(e,i,t.properties[i]);if(l){const[o,s]=l;e.tableCellAlignToStyle&&o==="align"&&typeof s=="string"&&Pb.has(t.tagName)?r=s:n[o]=s}}if(r){const l=n.style||(n.style={});l[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Ub(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const l=r.data.estree.body[0];l.type;const o=l.expression;o.type;const s=o.properties[0];s.type,Object.assign(n,e.evaluater.evaluateExpression(s.argument))}else Ri(e,t.position);else{const i=r.name;let l;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const s=r.value.data.estree.body[0];s.type,l=e.evaluater.evaluateExpression(s.expression)}else Ri(e,t.position);else l=r.value===null?!0:r.value;n[i]=l}return n}function Yu(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:Tb;for(;++r<t.children.length;){const l=t.children[r];let o;if(e.passKeys){const a=l.type==="element"?l.tagName:l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement"?l.name:void 0;if(a){const u=i.get(a)||0;o=a+"-"+u,i.set(a,u+1)}}const s=fg(e,l,o);s!==void 0&&n.push(s)}return n}function Hb(e,t,n){const r=GS(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?OS(n):ZS(n)),r.property==="style"){let i=typeof n=="object"?n:Wb(e,String(n));return e.stylePropertyNameCase==="css"&&(i=qb(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?qS[r.property]||r.property:r.attribute,n]}}function Wb(e,t){try{return Ib(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new Ue("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=dg+"#cannot-parse-style-attribute",i}}function hg(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let l=-1,o;for(;++l<i.length;){const s=Xd(i[l])?{type:"Identifier",name:i[l]}:{type:"Literal",value:i[l]};o=o?{type:"MemberExpression",object:o,property:s,computed:!!(l&&s.type==="Literal"),optional:!1}:s}r=o}else r=Xd(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Qu.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Ri(e)}function Ri(e,t){const n=new Ue("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=dg+"#cannot-handle-mdx-estrees-without-createevaluater",n}function qb(e){const t={};let n;for(n in e)Qu.call(e,n)&&(t[Kb(n)]=e[n]);return t}function Kb(e){let t=e.replace(zb,Qb);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Qb(e){return"-"+e.toLowerCase()}const xs={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},Gb={};function Xu(e,t){const n=Gb,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return mg(e,r,i)}function mg(e,t,n){if(Yb(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return uf(e.children,t,n)}return Array.isArray(e)?uf(e,t,n):""}function uf(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=mg(e[i],t,n);return r.join("")}function Yb(e){return!!(e&&typeof e=="object")}const cf=document.createElement("i");function Ju(e){const t="&"+e+";";cf.innerHTML=t;const n=cf.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function at(e,t,n,r){const i=e.length;let l=0,o;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);l<r.length;)o=r.slice(l,l+1e4),o.unshift(t,0),e.splice(...o),l+=1e4,t+=1e4}function ht(e,t){return e.length>0?(at(e,e.length,0,t),e):t}const df={}.hasOwnProperty;function gg(e){const t={};let n=-1;for(;++n<e.length;)Xb(t,e[n]);return t}function Xb(e,t){let n;for(n in t){const i=(df.call(e,n)?e[n]:void 0)||(e[n]={}),l=t[n];let o;if(l)for(o in l){df.call(i,o)||(i[o]=[]);const s=l[o];Jb(i[o],Array.isArray(s)?s:s?[s]:[])}}}function Jb(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);at(e,0,0,r)}function xg(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Tt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const We=In(/[A-Za-z]/),Ve=In(/[\dA-Za-z]/),Zb=In(/[#-'*+\--9=?A-Z^-~]/);function io(e){return e!==null&&(e<32||e===127)}const Pa=In(/\d/),eC=In(/[\dA-Fa-f]/),tC=In(/[!-/:-@[-`{-~]/);function B(e){return e!==null&&e<-2}function fe(e){return e!==null&&(e<0||e===32)}function Z(e){return e===-2||e===-1||e===32}const No=In(new RegExp("\\p{P}|\\p{S}","u")),Yn=In(/\s/);function In(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Rr(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const l=e.charCodeAt(n);let o="";if(l===37&&Ve(e.charCodeAt(n+1))&&Ve(e.charCodeAt(n+2)))i=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(o=String.fromCharCode(l));else if(l>55295&&l<57344){const s=e.charCodeAt(n+1);l<56320&&s>56319&&s<57344?(o=String.fromCharCode(l,s),i=1):o="�"}else o=String.fromCharCode(l);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,o=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function ne(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let l=0;return o;function o(a){return Z(a)?(e.enter(n),s(a)):t(a)}function s(a){return Z(a)&&l++<i?(e.consume(a),s):(e.exit(n),t(a))}}const nC={tokenize:rC};function rC(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),ne(e,t,"linePrefix")}function i(s){return e.enter("paragraph"),l(s)}function l(s){const a=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=a),n=a,o(s)}function o(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return B(s)?(e.consume(s),e.exit("chunkText"),l):(e.consume(s),o)}}const iC={tokenize:lC},ff={tokenize:oC};function lC(e){const t=this,n=[];let r=0,i,l,o;return s;function s(k){if(r<n.length){const C=n[r];return t.containerState=C[1],e.attempt(C[0].continuation,a,u)(k)}return u(k)}function a(k){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&g();const C=t.events.length;let N=C,b;for(;N--;)if(t.events[N][0]==="exit"&&t.events[N][1].type==="chunkFlow"){b=t.events[N][1].end;break}h(r);let I=C;for(;I<t.events.length;)t.events[I][1].end={...b},I++;return at(t.events,N+1,0,t.events.slice(C)),t.events.length=I,u(k)}return s(k)}function u(k){if(r===n.length){if(!i)return f(k);if(i.currentConstruct&&i.currentConstruct.concrete)return x(k);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(ff,d,c)(k)}function d(k){return i&&g(),h(r),f(k)}function c(k){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,x(k)}function f(k){return t.containerState={},e.attempt(ff,p,x)(k)}function p(k){return r++,n.push([t.currentConstruct,t.containerState]),f(k)}function x(k){if(k===null){i&&g(),h(0),e.consume(k);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:l}),v(k)}function v(k){if(k===null){E(e.exit("chunkFlow"),!0),h(0),e.consume(k);return}return B(k)?(e.consume(k),E(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(k),v)}function E(k,C){const N=t.sliceStream(k);if(C&&N.push(null),k.previous=l,l&&(l.next=k),l=k,i.defineSkip(k.start),i.write(N),t.parser.lazy[k.start.line]){let b=i.events.length;for(;b--;)if(i.events[b][1].start.offset<o&&(!i.events[b][1].end||i.events[b][1].end.offset>o))return;const I=t.events.length;let _=I,z,S;for(;_--;)if(t.events[_][0]==="exit"&&t.events[_][1].type==="chunkFlow"){if(z){S=t.events[_][1].end;break}z=!0}for(h(r),b=I;b<t.events.length;)t.events[b][1].end={...S},b++;at(t.events,_+1,0,t.events.slice(I)),t.events.length=b}}function h(k){let C=n.length;for(;C-- >k;){const N=n[C];t.containerState=N[1],N[0].exit.call(t,e)}n.length=k}function g(){i.write([null]),l=void 0,i=void 0,t.containerState._closeFlow=void 0}}function oC(e,t,n){return ne(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function zr(e){if(e===null||fe(e)||Yn(e))return 1;if(No(e))return 2}function To(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const l=e[i].resolveAll;l&&!r.includes(l)&&(t=l(t,n),r.push(l))}return t}const Aa={name:"attention",resolveAll:sC,tokenize:aC};function sC(e,t){let n=-1,r,i,l,o,s,a,u,d;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;a=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const c={...e[r][1].end},f={...e[n][1].start};pf(c,-a),pf(f,a),o={type:a>1?"strongSequence":"emphasisSequence",start:c,end:{...e[r][1].end}},s={type:a>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:f},l={type:a>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:a>1?"strong":"emphasis",start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=ht(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=ht(u,[["enter",i,t],["enter",o,t],["exit",o,t],["enter",l,t]]),u=ht(u,To(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=ht(u,[["exit",l,t],["enter",s,t],["exit",s,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(d=2,u=ht(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):d=0,at(e,r-1,n-r+3,u),n=r+u.length-d-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function aC(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=zr(r);let l;return o;function o(a){return l=a,e.enter("attentionSequence"),s(a)}function s(a){if(a===l)return e.consume(a),s;const u=e.exit("attentionSequence"),d=zr(a),c=!d||d===2&&i||n.includes(a),f=!i||i===2&&d||n.includes(r);return u._open=!!(l===42?c:c&&(i||!f)),u._close=!!(l===42?f:f&&(d||!c)),t(a)}}function pf(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const uC={name:"autolink",tokenize:cC};function cC(e,t,n){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),l}function l(p){return We(p)?(e.consume(p),o):p===64?n(p):u(p)}function o(p){return p===43||p===45||p===46||Ve(p)?(r=1,s(p)):u(p)}function s(p){return p===58?(e.consume(p),r=0,a):(p===43||p===45||p===46||Ve(p))&&r++<32?(e.consume(p),s):(r=0,u(p))}function a(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||io(p)?n(p):(e.consume(p),a)}function u(p){return p===64?(e.consume(p),d):Zb(p)?(e.consume(p),u):n(p)}function d(p){return Ve(p)?c(p):n(p)}function c(p){return p===46?(e.consume(p),r=0,d):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):f(p)}function f(p){if((p===45||Ve(p))&&r++<63){const x=p===45?f:c;return e.consume(p),x}return n(p)}}const Hi={partial:!0,tokenize:dC};function dC(e,t,n){return r;function r(l){return Z(l)?ne(e,i,"linePrefix")(l):i(l)}function i(l){return l===null||B(l)?t(l):n(l)}}const yg={continuation:{tokenize:pC},exit:hC,name:"blockQuote",tokenize:fC};function fC(e,t,n){const r=this;return i;function i(o){if(o===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),l}return n(o)}function l(o){return Z(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function pC(e,t,n){const r=this;return i;function i(o){return Z(o)?ne(e,l,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):l(o)}function l(o){return e.attempt(yg,t,n)(o)}}function hC(e){e.exit("blockQuote")}const kg={name:"characterEscape",tokenize:mC};function mC(e,t,n){return r;function r(l){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(l),e.exit("escapeMarker"),i}function i(l){return tC(l)?(e.enter("characterEscapeValue"),e.consume(l),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(l)}}const vg={name:"characterReference",tokenize:gC};function gC(e,t,n){const r=this;let i=0,l,o;return s;function s(c){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),a}function a(c){return c===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(c),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),l=31,o=Ve,d(c))}function u(c){return c===88||c===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(c),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),l=6,o=eC,d):(e.enter("characterReferenceValue"),l=7,o=Pa,d(c))}function d(c){if(c===59&&i){const f=e.exit("characterReferenceValue");return o===Ve&&!Ju(r.sliceSerialize(f))?n(c):(e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(c)&&i++<l?(e.consume(c),d):n(c)}}const hf={partial:!0,tokenize:yC},mf={concrete:!0,name:"codeFenced",tokenize:xC};function xC(e,t,n){const r=this,i={partial:!0,tokenize:N};let l=0,o=0,s;return a;function a(b){return u(b)}function u(b){const I=r.events[r.events.length-1];return l=I&&I[1].type==="linePrefix"?I[2].sliceSerialize(I[1],!0).length:0,s=b,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(b)}function d(b){return b===s?(o++,e.consume(b),d):o<3?n(b):(e.exit("codeFencedFenceSequence"),Z(b)?ne(e,c,"whitespace")(b):c(b))}function c(b){return b===null||B(b)?(e.exit("codeFencedFence"),r.interrupt?t(b):e.check(hf,v,C)(b)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(b))}function f(b){return b===null||B(b)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(b)):Z(b)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ne(e,p,"whitespace")(b)):b===96&&b===s?n(b):(e.consume(b),f)}function p(b){return b===null||B(b)?c(b):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),x(b))}function x(b){return b===null||B(b)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(b)):b===96&&b===s?n(b):(e.consume(b),x)}function v(b){return e.attempt(i,C,E)(b)}function E(b){return e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),h}function h(b){return l>0&&Z(b)?ne(e,g,"linePrefix",l+1)(b):g(b)}function g(b){return b===null||B(b)?e.check(hf,v,C)(b):(e.enter("codeFlowValue"),k(b))}function k(b){return b===null||B(b)?(e.exit("codeFlowValue"),g(b)):(e.consume(b),k)}function C(b){return e.exit("codeFenced"),t(b)}function N(b,I,_){let z=0;return S;function S(W){return b.enter("lineEnding"),b.consume(W),b.exit("lineEnding"),j}function j(W){return b.enter("codeFencedFence"),Z(W)?ne(b,O,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(W):O(W)}function O(W){return W===s?(b.enter("codeFencedFenceSequence"),U(W)):_(W)}function U(W){return W===s?(z++,b.consume(W),U):z>=o?(b.exit("codeFencedFenceSequence"),Z(W)?ne(b,G,"whitespace")(W):G(W)):_(W)}function G(W){return W===null||B(W)?(b.exit("codeFencedFence"),I(W)):_(W)}}}function yC(e,t,n){const r=this;return i;function i(o){return o===null?n(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),l)}function l(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}const ys={name:"codeIndented",tokenize:vC},kC={partial:!0,tokenize:wC};function vC(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),ne(e,l,"linePrefix",5)(u)}function l(u){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?o(u):n(u)}function o(u){return u===null?a(u):B(u)?e.attempt(kC,o,a)(u):(e.enter("codeFlowValue"),s(u))}function s(u){return u===null||B(u)?(e.exit("codeFlowValue"),o(u)):(e.consume(u),s)}function a(u){return e.exit("codeIndented"),t(u)}}function wC(e,t,n){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):B(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):ne(e,l,"linePrefix",5)(o)}function l(o){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(o):B(o)?i(o):n(o)}}const SC={name:"codeText",previous:CC,resolve:bC,tokenize:EC};function bC(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function CC(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function EC(e,t,n){let r=0,i,l;return o;function o(c){return e.enter("codeText"),e.enter("codeTextSequence"),s(c)}function s(c){return c===96?(e.consume(c),r++,s):(e.exit("codeTextSequence"),a(c))}function a(c){return c===null?n(c):c===32?(e.enter("space"),e.consume(c),e.exit("space"),a):c===96?(l=e.enter("codeTextSequence"),i=0,d(c)):B(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),a):(e.enter("codeTextData"),u(c))}function u(c){return c===null||c===32||c===96||B(c)?(e.exit("codeTextData"),a(c)):(e.consume(c),u)}function d(c){return c===96?(e.consume(c),i++,d):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(c)):(l.type="codeTextData",u(c))}}class _C{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const l=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Xr(this.left,r),l.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Xr(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Xr(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Xr(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Xr(this.left,n.reverse())}}}function Xr(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function wg(e){const t={};let n=-1,r,i,l,o,s,a,u;const d=new _C(e);for(;++n<d.length;){for(;n in t;)n=t[n];if(r=d.get(n),n&&r[1].type==="chunkFlow"&&d.get(n-1)[1].type==="listItemPrefix"&&(a=r[1]._tokenizer.events,l=0,l<a.length&&a[l][1].type==="lineEndingBlank"&&(l+=2),l<a.length&&a[l][1].type==="content"))for(;++l<a.length&&a[l][1].type!=="content";)a[l][1].type==="chunkText"&&(a[l][1]._isInFirstContentOfListItem=!0,l++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,IC(d,n)),n=t[n],u=!0);else if(r[1]._container){for(l=n,i=void 0;l--;)if(o=d.get(l),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(i&&(d.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=l);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;i&&(r[1].end={...d.get(i)[1].start},s=d.slice(i,n),s.unshift(r),d.splice(i,n-i+1,s))}}return at(e,0,Number.POSITIVE_INFINITY,d.slice(0)),!u}function IC(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const l=[];let o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const s=o.events,a=[],u={};let d,c,f=-1,p=n,x=0,v=0;const E=[v];for(;p;){for(;e.get(++i)[1]!==p;);l.push(i),p._tokenizer||(d=r.sliceStream(p),p.next||d.push(null),c&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(d),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),c=p,p=p.next}for(p=n;++f<s.length;)s[f][0]==="exit"&&s[f-1][0]==="enter"&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(v=f+1,E.push(v),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):E.pop(),f=E.length;f--;){const h=s.slice(E[f],E[f+1]),g=l.pop();a.push([g,g+h.length-1]),e.splice(g,2,h)}for(a.reverse(),f=-1;++f<a.length;)u[x+a[f][0]]=x+a[f][1],x+=a[f][1]-a[f][0]-1;return u}const NC={resolve:zC,tokenize:jC},TC={partial:!0,tokenize:PC};function zC(e){return wg(e),e}function jC(e,t){let n;return r;function r(s){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(s)}function i(s){return s===null?l(s):B(s)?e.check(TC,o,l)(s):(e.consume(s),i)}function l(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function o(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function PC(e,t,n){const r=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),ne(e,l,"linePrefix")}function l(o){if(o===null||B(o))return n(o);const s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}function Sg(e,t,n,r,i,l,o,s,a){const u=a||Number.POSITIVE_INFINITY;let d=0;return c;function c(h){return h===60?(e.enter(r),e.enter(i),e.enter(l),e.consume(h),e.exit(l),f):h===null||h===32||h===41||io(h)?n(h):(e.enter(r),e.enter(o),e.enter(s),e.enter("chunkString",{contentType:"string"}),v(h))}function f(h){return h===62?(e.enter(l),e.consume(h),e.exit(l),e.exit(i),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),p(h))}function p(h){return h===62?(e.exit("chunkString"),e.exit(s),f(h)):h===null||h===60||B(h)?n(h):(e.consume(h),h===92?x:p)}function x(h){return h===60||h===62||h===92?(e.consume(h),p):p(h)}function v(h){return!d&&(h===null||h===41||fe(h))?(e.exit("chunkString"),e.exit(s),e.exit(o),e.exit(r),t(h)):d<u&&h===40?(e.consume(h),d++,v):h===41?(e.consume(h),d--,v):h===null||h===32||h===40||io(h)?n(h):(e.consume(h),h===92?E:v)}function E(h){return h===40||h===41||h===92?(e.consume(h),v):v(h)}}function bg(e,t,n,r,i,l){const o=this;let s=0,a;return u;function u(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(l),d}function d(p){return s>999||p===null||p===91||p===93&&!a||p===94&&!s&&"_hiddenFootnoteSupport"in o.parser.constructs?n(p):p===93?(e.exit(l),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):B(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),c(p))}function c(p){return p===null||p===91||p===93||B(p)||s++>999?(e.exit("chunkString"),d(p)):(e.consume(p),a||(a=!Z(p)),p===92?f:c)}function f(p){return p===91||p===92||p===93?(e.consume(p),s++,c):c(p)}}function Cg(e,t,n,r,i,l){let o;return s;function s(f){return f===34||f===39||f===40?(e.enter(r),e.enter(i),e.consume(f),e.exit(i),o=f===40?41:f,a):n(f)}function a(f){return f===o?(e.enter(i),e.consume(f),e.exit(i),e.exit(r),t):(e.enter(l),u(f))}function u(f){return f===o?(e.exit(l),a(o)):f===null?n(f):B(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),ne(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(f))}function d(f){return f===o||f===null||B(f)?(e.exit("chunkString"),u(f)):(e.consume(f),f===92?c:d)}function c(f){return f===o||f===92?(e.consume(f),d):d(f)}}function hi(e,t){let n;return r;function r(i){return B(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Z(i)?ne(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const AC={name:"definition",tokenize:MC},LC={partial:!0,tokenize:RC};function MC(e,t,n){const r=this;let i;return l;function l(p){return e.enter("definition"),o(p)}function o(p){return bg.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function s(p){return i=Tt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),a):n(p)}function a(p){return fe(p)?hi(e,u)(p):u(p)}function u(p){return Sg(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function d(p){return e.attempt(LC,c,c)(p)}function c(p){return Z(p)?ne(e,f,"whitespace")(p):f(p)}function f(p){return p===null||B(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function RC(e,t,n){return r;function r(s){return fe(s)?hi(e,i)(s):n(s)}function i(s){return Cg(e,l,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function l(s){return Z(s)?ne(e,o,"whitespace")(s):o(s)}function o(s){return s===null||B(s)?t(s):n(s)}}const OC={name:"hardBreakEscape",tokenize:DC};function DC(e,t,n){return r;function r(l){return e.enter("hardBreakEscape"),e.consume(l),i}function i(l){return B(l)?(e.exit("hardBreakEscape"),t(l)):n(l)}}const FC={name:"headingAtx",resolve:$C,tokenize:VC};function $C(e,t){let n=e.length-2,r=3,i,l;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},l={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},at(e,r,n-r+1,[["enter",i,t],["enter",l,t],["exit",l,t],["exit",i,t]])),e}function VC(e,t,n){let r=0;return i;function i(d){return e.enter("atxHeading"),l(d)}function l(d){return e.enter("atxHeadingSequence"),o(d)}function o(d){return d===35&&r++<6?(e.consume(d),o):d===null||fe(d)?(e.exit("atxHeadingSequence"),s(d)):n(d)}function s(d){return d===35?(e.enter("atxHeadingSequence"),a(d)):d===null||B(d)?(e.exit("atxHeading"),t(d)):Z(d)?ne(e,s,"whitespace")(d):(e.enter("atxHeadingText"),u(d))}function a(d){return d===35?(e.consume(d),a):(e.exit("atxHeadingSequence"),s(d))}function u(d){return d===null||d===35||fe(d)?(e.exit("atxHeadingText"),s(d)):(e.consume(d),u)}}const BC=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],gf=["pre","script","style","textarea"],UC={concrete:!0,name:"htmlFlow",resolveTo:qC,tokenize:KC},HC={partial:!0,tokenize:GC},WC={partial:!0,tokenize:QC};function qC(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function KC(e,t,n){const r=this;let i,l,o,s,a;return u;function u(w){return d(w)}function d(w){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(w),c}function c(w){return w===33?(e.consume(w),f):w===47?(e.consume(w),l=!0,v):w===63?(e.consume(w),i=3,r.interrupt?t:y):We(w)?(e.consume(w),o=String.fromCharCode(w),E):n(w)}function f(w){return w===45?(e.consume(w),i=2,p):w===91?(e.consume(w),i=5,s=0,x):We(w)?(e.consume(w),i=4,r.interrupt?t:y):n(w)}function p(w){return w===45?(e.consume(w),r.interrupt?t:y):n(w)}function x(w){const pe="CDATA[";return w===pe.charCodeAt(s++)?(e.consume(w),s===pe.length?r.interrupt?t:O:x):n(w)}function v(w){return We(w)?(e.consume(w),o=String.fromCharCode(w),E):n(w)}function E(w){if(w===null||w===47||w===62||fe(w)){const pe=w===47,oe=o.toLowerCase();return!pe&&!l&&gf.includes(oe)?(i=1,r.interrupt?t(w):O(w)):BC.includes(o.toLowerCase())?(i=6,pe?(e.consume(w),h):r.interrupt?t(w):O(w)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(w):l?g(w):k(w))}return w===45||Ve(w)?(e.consume(w),o+=String.fromCharCode(w),E):n(w)}function h(w){return w===62?(e.consume(w),r.interrupt?t:O):n(w)}function g(w){return Z(w)?(e.consume(w),g):S(w)}function k(w){return w===47?(e.consume(w),S):w===58||w===95||We(w)?(e.consume(w),C):Z(w)?(e.consume(w),k):S(w)}function C(w){return w===45||w===46||w===58||w===95||Ve(w)?(e.consume(w),C):N(w)}function N(w){return w===61?(e.consume(w),b):Z(w)?(e.consume(w),N):k(w)}function b(w){return w===null||w===60||w===61||w===62||w===96?n(w):w===34||w===39?(e.consume(w),a=w,I):Z(w)?(e.consume(w),b):_(w)}function I(w){return w===a?(e.consume(w),a=null,z):w===null||B(w)?n(w):(e.consume(w),I)}function _(w){return w===null||w===34||w===39||w===47||w===60||w===61||w===62||w===96||fe(w)?N(w):(e.consume(w),_)}function z(w){return w===47||w===62||Z(w)?k(w):n(w)}function S(w){return w===62?(e.consume(w),j):n(w)}function j(w){return w===null||B(w)?O(w):Z(w)?(e.consume(w),j):n(w)}function O(w){return w===45&&i===2?(e.consume(w),X):w===60&&i===1?(e.consume(w),re):w===62&&i===4?(e.consume(w),J):w===63&&i===3?(e.consume(w),y):w===93&&i===5?(e.consume(w),V):B(w)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(HC,ie,U)(w)):w===null||B(w)?(e.exit("htmlFlowData"),U(w)):(e.consume(w),O)}function U(w){return e.check(WC,G,ie)(w)}function G(w){return e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),W}function W(w){return w===null||B(w)?U(w):(e.enter("htmlFlowData"),O(w))}function X(w){return w===45?(e.consume(w),y):O(w)}function re(w){return w===47?(e.consume(w),o="",L):O(w)}function L(w){if(w===62){const pe=o.toLowerCase();return gf.includes(pe)?(e.consume(w),J):O(w)}return We(w)&&o.length<8?(e.consume(w),o+=String.fromCharCode(w),L):O(w)}function V(w){return w===93?(e.consume(w),y):O(w)}function y(w){return w===62?(e.consume(w),J):w===45&&i===2?(e.consume(w),y):O(w)}function J(w){return w===null||B(w)?(e.exit("htmlFlowData"),ie(w)):(e.consume(w),J)}function ie(w){return e.exit("htmlFlow"),t(w)}}function QC(e,t,n){const r=this;return i;function i(o){return B(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),l):n(o)}function l(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}function GC(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Hi,t,n)}}const YC={name:"htmlText",tokenize:XC};function XC(e,t,n){const r=this;let i,l,o;return s;function s(y){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(y),a}function a(y){return y===33?(e.consume(y),u):y===47?(e.consume(y),N):y===63?(e.consume(y),k):We(y)?(e.consume(y),_):n(y)}function u(y){return y===45?(e.consume(y),d):y===91?(e.consume(y),l=0,x):We(y)?(e.consume(y),g):n(y)}function d(y){return y===45?(e.consume(y),p):n(y)}function c(y){return y===null?n(y):y===45?(e.consume(y),f):B(y)?(o=c,re(y)):(e.consume(y),c)}function f(y){return y===45?(e.consume(y),p):c(y)}function p(y){return y===62?X(y):y===45?f(y):c(y)}function x(y){const J="CDATA[";return y===J.charCodeAt(l++)?(e.consume(y),l===J.length?v:x):n(y)}function v(y){return y===null?n(y):y===93?(e.consume(y),E):B(y)?(o=v,re(y)):(e.consume(y),v)}function E(y){return y===93?(e.consume(y),h):v(y)}function h(y){return y===62?X(y):y===93?(e.consume(y),h):v(y)}function g(y){return y===null||y===62?X(y):B(y)?(o=g,re(y)):(e.consume(y),g)}function k(y){return y===null?n(y):y===63?(e.consume(y),C):B(y)?(o=k,re(y)):(e.consume(y),k)}function C(y){return y===62?X(y):k(y)}function N(y){return We(y)?(e.consume(y),b):n(y)}function b(y){return y===45||Ve(y)?(e.consume(y),b):I(y)}function I(y){return B(y)?(o=I,re(y)):Z(y)?(e.consume(y),I):X(y)}function _(y){return y===45||Ve(y)?(e.consume(y),_):y===47||y===62||fe(y)?z(y):n(y)}function z(y){return y===47?(e.consume(y),X):y===58||y===95||We(y)?(e.consume(y),S):B(y)?(o=z,re(y)):Z(y)?(e.consume(y),z):X(y)}function S(y){return y===45||y===46||y===58||y===95||Ve(y)?(e.consume(y),S):j(y)}function j(y){return y===61?(e.consume(y),O):B(y)?(o=j,re(y)):Z(y)?(e.consume(y),j):z(y)}function O(y){return y===null||y===60||y===61||y===62||y===96?n(y):y===34||y===39?(e.consume(y),i=y,U):B(y)?(o=O,re(y)):Z(y)?(e.consume(y),O):(e.consume(y),G)}function U(y){return y===i?(e.consume(y),i=void 0,W):y===null?n(y):B(y)?(o=U,re(y)):(e.consume(y),U)}function G(y){return y===null||y===34||y===39||y===60||y===61||y===96?n(y):y===47||y===62||fe(y)?z(y):(e.consume(y),G)}function W(y){return y===47||y===62||fe(y)?z(y):n(y)}function X(y){return y===62?(e.consume(y),e.exit("htmlTextData"),e.exit("htmlText"),t):n(y)}function re(y){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),L}function L(y){return Z(y)?ne(e,V,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(y):V(y)}function V(y){return e.enter("htmlTextData"),o(y)}}const Zu={name:"labelEnd",resolveAll:tE,resolveTo:nE,tokenize:rE},JC={tokenize:iE},ZC={tokenize:lE},eE={tokenize:oE};function tE(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&at(e,0,e.length,n),e}function nE(e,t){let n=e.length,r=0,i,l,o,s;for(;n--;)if(i=e[n][1],l){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(o){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(l=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(o=n);const a={type:e[l][1].type==="labelLink"?"link":"image",start:{...e[l][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[l][1].start},end:{...e[o][1].end}},d={type:"labelText",start:{...e[l+r+2][1].end},end:{...e[o-2][1].start}};return s=[["enter",a,t],["enter",u,t]],s=ht(s,e.slice(l+1,l+r+3)),s=ht(s,[["enter",d,t]]),s=ht(s,To(t.parser.constructs.insideSpan.null,e.slice(l+r+4,o-3),t)),s=ht(s,[["exit",d,t],e[o-2],e[o-1],["exit",u,t]]),s=ht(s,e.slice(o+1)),s=ht(s,[["exit",a,t]]),at(e,l,e.length,s),e}function rE(e,t,n){const r=this;let i=r.events.length,l,o;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){l=r.events[i][1];break}return s;function s(f){return l?l._inactive?c(f):(o=r.parser.defined.includes(Tt(r.sliceSerialize({start:l.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelEnd"),a):n(f)}function a(f){return f===40?e.attempt(JC,d,o?d:c)(f):f===91?e.attempt(ZC,d,o?u:c)(f):o?d(f):c(f)}function u(f){return e.attempt(eE,d,c)(f)}function d(f){return t(f)}function c(f){return l._balanced=!0,n(f)}}function iE(e,t,n){return r;function r(c){return e.enter("resource"),e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),i}function i(c){return fe(c)?hi(e,l)(c):l(c)}function l(c){return c===41?d(c):Sg(e,o,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function o(c){return fe(c)?hi(e,a)(c):d(c)}function s(c){return n(c)}function a(c){return c===34||c===39||c===40?Cg(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):d(c)}function u(c){return fe(c)?hi(e,d)(c):d(c)}function d(c){return c===41?(e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),e.exit("resource"),t):n(c)}}function lE(e,t,n){const r=this;return i;function i(s){return bg.call(r,e,l,o,"reference","referenceMarker","referenceString")(s)}function l(s){return r.parser.defined.includes(Tt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function o(s){return n(s)}}function oE(e,t,n){return r;function r(l){return e.enter("reference"),e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),i}function i(l){return l===93?(e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),e.exit("reference"),t):n(l)}}const sE={name:"labelStartImage",resolveAll:Zu.resolveAll,tokenize:aE};function aE(e,t,n){const r=this;return i;function i(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),l}function l(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),o):n(s)}function o(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const uE={name:"labelStartLink",resolveAll:Zu.resolveAll,tokenize:cE};function cE(e,t,n){const r=this;return i;function i(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),l}function l(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const ks={name:"lineEnding",tokenize:dE};function dE(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),ne(e,t,"linePrefix")}}const Tl={name:"thematicBreak",tokenize:fE};function fE(e,t,n){let r=0,i;return l;function l(u){return e.enter("thematicBreak"),o(u)}function o(u){return i=u,s(u)}function s(u){return u===i?(e.enter("thematicBreakSequence"),a(u)):r>=3&&(u===null||B(u))?(e.exit("thematicBreak"),t(u)):n(u)}function a(u){return u===i?(e.consume(u),r++,a):(e.exit("thematicBreakSequence"),Z(u)?ne(e,s,"whitespace")(u):s(u))}}const Ge={continuation:{tokenize:gE},exit:yE,name:"list",tokenize:mE},pE={partial:!0,tokenize:kE},hE={partial:!0,tokenize:xE};function mE(e,t,n){const r=this,i=r.events[r.events.length-1];let l=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(p){const x=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(x==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:Pa(p)){if(r.containerState.type||(r.containerState.type=x,e.enter(x,{_container:!0})),x==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(Tl,n,u)(p):u(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),a(p)}return n(p)}function a(p){return Pa(p)&&++o<10?(e.consume(p),a):(!r.interrupt||o<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),u(p)):n(p)}function u(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(Hi,r.interrupt?n:d,e.attempt(pE,f,c))}function d(p){return r.containerState.initialBlankLine=!0,l++,f(p)}function c(p){return Z(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),f):n(p)}function f(p){return r.containerState.size=l+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function gE(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Hi,i,l);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ne(e,t,"listItemIndent",r.containerState.size+1)(s)}function l(s){return r.containerState.furtherBlankLines||!Z(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(hE,t,o)(s))}function o(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,ne(e,e.attempt(Ge,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function xE(e,t,n){const r=this;return ne(e,i,"listItemIndent",r.containerState.size+1);function i(l){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(l):n(l)}}function yE(e){e.exit(this.containerState.type)}function kE(e,t,n){const r=this;return ne(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(l){const o=r.events[r.events.length-1];return!Z(l)&&o&&o[1].type==="listItemPrefixWhitespace"?t(l):n(l)}}const xf={name:"setextUnderline",resolveTo:vE,tokenize:wE};function vE(e,t){let n=e.length,r,i,l;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!l&&e[n][1].type==="definition"&&(l=n);const o={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",l?(e.splice(i,0,["enter",o,t]),e.splice(l+1,0,["exit",e[r][1],t]),e[r][1].end={...e[l][1].end}):e[r][1]=o,e.push(["exit",o,t]),e}function wE(e,t,n){const r=this;let i;return l;function l(u){let d=r.events.length,c;for(;d--;)if(r.events[d][1].type!=="lineEnding"&&r.events[d][1].type!=="linePrefix"&&r.events[d][1].type!=="content"){c=r.events[d][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||c)?(e.enter("setextHeadingLine"),i=u,o(u)):n(u)}function o(u){return e.enter("setextHeadingLineSequence"),s(u)}function s(u){return u===i?(e.consume(u),s):(e.exit("setextHeadingLineSequence"),Z(u)?ne(e,a,"lineSuffix")(u):a(u))}function a(u){return u===null||B(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const SE={tokenize:bE};function bE(e){const t=this,n=e.attempt(Hi,r,e.attempt(this.parser.constructs.flowInitial,i,ne(e,e.attempt(this.parser.constructs.flow,i,e.attempt(NC,i)),"linePrefix")));return n;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const CE={resolveAll:_g()},EE=Eg("string"),_E=Eg("text");function Eg(e){return{resolveAll:_g(e==="text"?IE:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],l=n.attempt(i,o,s);return o;function o(d){return u(d)?l(d):s(d)}function s(d){if(d===null){n.consume(d);return}return n.enter("data"),n.consume(d),a}function a(d){return u(d)?(n.exit("data"),l(d)):(n.consume(d),a)}function u(d){if(d===null)return!0;const c=i[d];let f=-1;if(c)for(;++f<c.length;){const p=c[f];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function _g(e){return t;function t(n,r){let i=-1,l;for(;++i<=n.length;)l===void 0?n[i]&&n[i][1].type==="data"&&(l=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==l+2&&(n[l][1].end=n[i-1][1].end,n.splice(l+2,i-l-2),i=l+2),l=void 0);return e?e(n,r):n}}function IE(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let l=i.length,o=-1,s=0,a;for(;l--;){const u=i[l];if(typeof u=="string"){for(o=u.length;u.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(u===-2)a=!0,s++;else if(u!==-1){l++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){const u={type:n===e.length||a||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?o:r.start._bufferIndex+o,_index:r.start._index+l,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}const NE={42:Ge,43:Ge,45:Ge,48:Ge,49:Ge,50:Ge,51:Ge,52:Ge,53:Ge,54:Ge,55:Ge,56:Ge,57:Ge,62:yg},TE={91:AC},zE={[-2]:ys,[-1]:ys,32:ys},jE={35:FC,42:Tl,45:[xf,Tl],60:UC,61:xf,95:Tl,96:mf,126:mf},PE={38:vg,92:kg},AE={[-5]:ks,[-4]:ks,[-3]:ks,33:sE,38:vg,42:Aa,60:[uC,YC],91:uE,92:[OC,kg],93:Zu,95:Aa,96:SC},LE={null:[Aa,CE]},ME={null:[42,95]},RE={null:[]},OE=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:ME,contentInitial:TE,disable:RE,document:NE,flow:jE,flowInitial:zE,insideSpan:LE,string:PE,text:AE},Symbol.toStringTag,{value:"Module"}));function DE(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},l=[];let o=[],s=[];const a={attempt:I(N),check:I(b),consume:g,enter:k,exit:C,interrupt:I(b,{interrupt:!0})},u={code:null,containerState:{},defineSkip:v,events:[],now:x,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:c};let d=t.tokenize.call(u,a);return t.resolveAll&&l.push(t),u;function c(j){return o=ht(o,j),E(),o[o.length-1]!==null?[]:(_(t,0),u.events=To(l,u.events,u),u.events)}function f(j,O){return $E(p(j),O)}function p(j){return FE(o,j)}function x(){const{_bufferIndex:j,_index:O,line:U,column:G,offset:W}=r;return{_bufferIndex:j,_index:O,line:U,column:G,offset:W}}function v(j){i[j.line]=j.column,S()}function E(){let j;for(;r._index<o.length;){const O=o[r._index];if(typeof O=="string")for(j=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===j&&r._bufferIndex<O.length;)h(O.charCodeAt(r._bufferIndex));else h(O)}}function h(j){d=d(j)}function g(j){B(j)?(r.line++,r.column=1,r.offset+=j===-3?2:1,S()):j!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=j}function k(j,O){const U=O||{};return U.type=j,U.start=x(),u.events.push(["enter",U,u]),s.push(U),U}function C(j){const O=s.pop();return O.end=x(),u.events.push(["exit",O,u]),O}function N(j,O){_(j,O.from)}function b(j,O){O.restore()}function I(j,O){return U;function U(G,W,X){let re,L,V,y;return Array.isArray(G)?ie(G):"tokenize"in G?ie([G]):J(G);function J(K){return Ae;function Ae(nt){const ue=nt!==null&&K[nt],kt=nt!==null&&K.null,vt=[...Array.isArray(ue)?ue:ue?[ue]:[],...Array.isArray(kt)?kt:kt?[kt]:[]];return ie(vt)(nt)}}function ie(K){return re=K,L=0,K.length===0?X:w(K[L])}function w(K){return Ae;function Ae(nt){return y=z(),V=K,K.partial||(u.currentConstruct=K),K.name&&u.parser.constructs.disable.null.includes(K.name)?oe():K.tokenize.call(O?Object.assign(Object.create(u),O):u,a,pe,oe)(nt)}}function pe(K){return j(V,y),W}function oe(K){return y.restore(),++L<re.length?w(re[L]):X}}}function _(j,O){j.resolveAll&&!l.includes(j)&&l.push(j),j.resolve&&at(u.events,O,u.events.length-O,j.resolve(u.events.slice(O),u)),j.resolveTo&&(u.events=j.resolveTo(u.events,u))}function z(){const j=x(),O=u.previous,U=u.currentConstruct,G=u.events.length,W=Array.from(s);return{from:G,restore:X};function X(){r=j,u.previous=O,u.currentConstruct=U,u.events.length=G,s=W,S()}}function S(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function FE(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,l=t.end._bufferIndex;let o;if(n===i)o=[e[n].slice(r,l)];else{if(o=e.slice(n,i),r>-1){const s=o[0];typeof s=="string"?o[0]=s.slice(r):o.shift()}l>0&&o.push(e[i].slice(0,l))}return o}function $E(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const l=e[n];let o;if(typeof l=="string")o=l;else switch(l){case-5:{o="\r";break}case-4:{o=`
228
+ `;break}case-3:{o=`\r
229
+ `;break}case-2:{o=t?" ":" ";break}case-1:{if(!t&&i)continue;o=" ";break}default:o=String.fromCharCode(l)}i=l===-2,r.push(o)}return r.join("")}function VE(e){const r={constructs:gg([OE,...(e||{}).extensions||[]]),content:i(nC),defined:[],document:i(iC),flow:i(SE),lazy:{},string:i(EE),text:i(_E)};return r;function i(l){return o;function o(s){return DE(r,l,s)}}}function BE(e){for(;!wg(e););return e}const yf=/[\0\t\n\r]/g;function UE(){let e=1,t="",n=!0,r;return i;function i(l,o,s){const a=[];let u,d,c,f,p;for(l=t+(typeof l=="string"?l.toString():new TextDecoder(o||void 0).decode(l)),c=0,t="",n&&(l.charCodeAt(0)===65279&&c++,n=void 0);c<l.length;){if(yf.lastIndex=c,u=yf.exec(l),f=u&&u.index!==void 0?u.index:l.length,p=l.charCodeAt(f),!u){t=l.slice(c);break}if(p===10&&c===f&&r)a.push(-3),r=void 0;else switch(r&&(a.push(-5),r=void 0),c<f&&(a.push(l.slice(c,f)),e+=f-c),p){case 0:{a.push(65533),e++;break}case 9:{for(d=Math.ceil(e/4)*4,a.push(-2);e++<d;)a.push(-1);break}case 10:{a.push(-4),e=1;break}default:r=!0,e=1}c=f+1}return s&&(r&&a.push(-5),t&&a.push(t),a.push(null)),a}}const HE=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function WE(e){return e.replace(HE,qE)}function qE(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),l=i===120||i===88;return xg(n.slice(l?2:1),l?16:10)}return Ju(n)||e}const Ig={}.hasOwnProperty;function KE(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),QE(n)(BE(VE(n).document().write(UE()(e,t,!0))))}function QE(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(Or),autolinkProtocol:z,autolinkEmail:z,atxHeading:l(Se),blockQuote:l(kt),characterEscape:z,characterReference:z,codeFenced:l(vt),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:l(vt,o),codeText:l(tn,o),codeTextData:z,data:z,codeFlowValue:z,definition:l(Nn),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:l(H),hardBreakEscape:l(Le),hardBreakTrailing:l(Le),htmlFlow:l(wt,o),htmlFlowData:z,htmlText:l(wt,o),htmlTextData:z,image:l(Tn),label:o,link:l(Or),listItem:l(cx),listItemValue:f,listOrdered:l(uc,c),listUnordered:l(uc),paragraph:l(dx),reference:w,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:l(Se),strong:l(fx),thematicBreak:l(hx)},exit:{atxHeading:a(),atxHeadingSequence:N,autolink:a(),autolinkEmail:ue,autolinkProtocol:nt,blockQuote:a(),characterEscapeValue:S,characterReferenceMarkerHexadecimal:oe,characterReferenceMarkerNumeric:oe,characterReferenceValue:K,characterReference:Ae,codeFenced:a(E),codeFencedFence:v,codeFencedFenceInfo:p,codeFencedFenceMeta:x,codeFlowValue:S,codeIndented:a(h),codeText:a(W),codeTextData:S,data:S,definition:a(),definitionDestinationString:C,definitionLabelString:g,definitionTitleString:k,emphasis:a(),hardBreakEscape:a(O),hardBreakTrailing:a(O),htmlFlow:a(U),htmlFlowData:S,htmlText:a(G),htmlTextData:S,image:a(re),label:V,labelText:L,lineEnding:j,link:a(X),listItem:a(),listOrdered:a(),listUnordered:a(),paragraph:a(),referenceString:pe,resourceDestinationString:y,resourceTitleString:J,resource:ie,setextHeading:a(_),setextHeadingLineSequence:I,setextHeadingText:b,strong:a(),thematicBreak:a()}};Ng(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(T){let R={type:"root",children:[]};const Q={stack:[R],tokenStack:[],config:t,enter:s,exit:u,buffer:o,resume:d,data:n},te=[];let ce=-1;for(;++ce<T.length;)if(T[ce][1].type==="listOrdered"||T[ce][1].type==="listUnordered")if(T[ce][0]==="enter")te.push(ce);else{const St=te.pop();ce=i(T,St,ce)}for(ce=-1;++ce<T.length;){const St=t[T[ce][0]];Ig.call(St,T[ce][1].type)&&St[T[ce][1].type].call(Object.assign({sliceSerialize:T[ce][2].sliceSerialize},Q),T[ce][1])}if(Q.tokenStack.length>0){const St=Q.tokenStack[Q.tokenStack.length-1];(St[1]||kf).call(Q,void 0,St[0])}for(R.position={start:ln(T.length>0?T[0][1].start:{line:1,column:1,offset:0}),end:ln(T.length>0?T[T.length-2][1].end:{line:1,column:1,offset:0})},ce=-1;++ce<t.transforms.length;)R=t.transforms[ce](R)||R;return R}function i(T,R,Q){let te=R-1,ce=-1,St=!1,zn,$t,Dr,Fr;for(;++te<=Q;){const rt=T[te];switch(rt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{rt[0]==="enter"?ce++:ce--,Fr=void 0;break}case"lineEndingBlank":{rt[0]==="enter"&&(zn&&!Fr&&!ce&&!Dr&&(Dr=te),Fr=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Fr=void 0}if(!ce&&rt[0]==="enter"&&rt[1].type==="listItemPrefix"||ce===-1&&rt[0]==="exit"&&(rt[1].type==="listUnordered"||rt[1].type==="listOrdered")){if(zn){let tr=te;for($t=void 0;tr--;){const Vt=T[tr];if(Vt[1].type==="lineEnding"||Vt[1].type==="lineEndingBlank"){if(Vt[0]==="exit")continue;$t&&(T[$t][1].type="lineEndingBlank",St=!0),Vt[1].type="lineEnding",$t=tr}else if(!(Vt[1].type==="linePrefix"||Vt[1].type==="blockQuotePrefix"||Vt[1].type==="blockQuotePrefixWhitespace"||Vt[1].type==="blockQuoteMarker"||Vt[1].type==="listItemIndent"))break}Dr&&(!$t||Dr<$t)&&(zn._spread=!0),zn.end=Object.assign({},$t?T[$t][1].start:rt[1].end),T.splice($t||te,0,["exit",zn,rt[2]]),te++,Q++}if(rt[1].type==="listItemPrefix"){const tr={type:"listItem",_spread:!1,start:Object.assign({},rt[1].start),end:void 0};zn=tr,T.splice(te,0,["enter",tr,rt[2]]),te++,Q++,Dr=void 0,Fr=!0}}}return T[R][1]._spread=St,Q}function l(T,R){return Q;function Q(te){s.call(this,T(te),te),R&&R.call(this,te)}}function o(){this.stack.push({type:"fragment",children:[]})}function s(T,R,Q){this.stack[this.stack.length-1].children.push(T),this.stack.push(T),this.tokenStack.push([R,Q||void 0]),T.position={start:ln(R.start),end:void 0}}function a(T){return R;function R(Q){T&&T.call(this,Q),u.call(this,Q)}}function u(T,R){const Q=this.stack.pop(),te=this.tokenStack.pop();if(te)te[0].type!==T.type&&(R?R.call(this,T,te[0]):(te[1]||kf).call(this,T,te[0]));else throw new Error("Cannot close `"+T.type+"` ("+pi({start:T.start,end:T.end})+"): it’s not open");Q.position.end=ln(T.end)}function d(){return Xu(this.stack.pop())}function c(){this.data.expectingFirstListItemValue=!0}function f(T){if(this.data.expectingFirstListItemValue){const R=this.stack[this.stack.length-2];R.start=Number.parseInt(this.sliceSerialize(T),10),this.data.expectingFirstListItemValue=void 0}}function p(){const T=this.resume(),R=this.stack[this.stack.length-1];R.lang=T}function x(){const T=this.resume(),R=this.stack[this.stack.length-1];R.meta=T}function v(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function E(){const T=this.resume(),R=this.stack[this.stack.length-1];R.value=T.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function h(){const T=this.resume(),R=this.stack[this.stack.length-1];R.value=T.replace(/(\r?\n|\r)$/g,"")}function g(T){const R=this.resume(),Q=this.stack[this.stack.length-1];Q.label=R,Q.identifier=Tt(this.sliceSerialize(T)).toLowerCase()}function k(){const T=this.resume(),R=this.stack[this.stack.length-1];R.title=T}function C(){const T=this.resume(),R=this.stack[this.stack.length-1];R.url=T}function N(T){const R=this.stack[this.stack.length-1];if(!R.depth){const Q=this.sliceSerialize(T).length;R.depth=Q}}function b(){this.data.setextHeadingSlurpLineEnding=!0}function I(T){const R=this.stack[this.stack.length-1];R.depth=this.sliceSerialize(T).codePointAt(0)===61?1:2}function _(){this.data.setextHeadingSlurpLineEnding=void 0}function z(T){const Q=this.stack[this.stack.length-1].children;let te=Q[Q.length-1];(!te||te.type!=="text")&&(te=px(),te.position={start:ln(T.start),end:void 0},Q.push(te)),this.stack.push(te)}function S(T){const R=this.stack.pop();R.value+=this.sliceSerialize(T),R.position.end=ln(T.end)}function j(T){const R=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Q=R.children[R.children.length-1];Q.position.end=ln(T.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(R.type)&&(z.call(this,T),S.call(this,T))}function O(){this.data.atHardBreak=!0}function U(){const T=this.resume(),R=this.stack[this.stack.length-1];R.value=T}function G(){const T=this.resume(),R=this.stack[this.stack.length-1];R.value=T}function W(){const T=this.resume(),R=this.stack[this.stack.length-1];R.value=T}function X(){const T=this.stack[this.stack.length-1];if(this.data.inReference){const R=this.data.referenceType||"shortcut";T.type+="Reference",T.referenceType=R,delete T.url,delete T.title}else delete T.identifier,delete T.label;this.data.referenceType=void 0}function re(){const T=this.stack[this.stack.length-1];if(this.data.inReference){const R=this.data.referenceType||"shortcut";T.type+="Reference",T.referenceType=R,delete T.url,delete T.title}else delete T.identifier,delete T.label;this.data.referenceType=void 0}function L(T){const R=this.sliceSerialize(T),Q=this.stack[this.stack.length-2];Q.label=WE(R),Q.identifier=Tt(R).toLowerCase()}function V(){const T=this.stack[this.stack.length-1],R=this.resume(),Q=this.stack[this.stack.length-1];if(this.data.inReference=!0,Q.type==="link"){const te=T.children;Q.children=te}else Q.alt=R}function y(){const T=this.resume(),R=this.stack[this.stack.length-1];R.url=T}function J(){const T=this.resume(),R=this.stack[this.stack.length-1];R.title=T}function ie(){this.data.inReference=void 0}function w(){this.data.referenceType="collapsed"}function pe(T){const R=this.resume(),Q=this.stack[this.stack.length-1];Q.label=R,Q.identifier=Tt(this.sliceSerialize(T)).toLowerCase(),this.data.referenceType="full"}function oe(T){this.data.characterReferenceType=T.type}function K(T){const R=this.sliceSerialize(T),Q=this.data.characterReferenceType;let te;Q?(te=xg(R,Q==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):te=Ju(R);const ce=this.stack[this.stack.length-1];ce.value+=te}function Ae(T){const R=this.stack.pop();R.position.end=ln(T.end)}function nt(T){S.call(this,T);const R=this.stack[this.stack.length-1];R.url=this.sliceSerialize(T)}function ue(T){S.call(this,T);const R=this.stack[this.stack.length-1];R.url="mailto:"+this.sliceSerialize(T)}function kt(){return{type:"blockquote",children:[]}}function vt(){return{type:"code",lang:null,meta:null,value:""}}function tn(){return{type:"inlineCode",value:""}}function Nn(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function H(){return{type:"emphasis",children:[]}}function Se(){return{type:"heading",depth:0,children:[]}}function Le(){return{type:"break"}}function wt(){return{type:"html",value:""}}function Tn(){return{type:"image",title:null,url:"",alt:null}}function Or(){return{type:"link",title:null,url:"",children:[]}}function uc(T){return{type:"list",ordered:T.type==="listOrdered",start:null,spread:T._spread,children:[]}}function cx(T){return{type:"listItem",spread:T._spread,checked:null,children:[]}}function dx(){return{type:"paragraph",children:[]}}function fx(){return{type:"strong",children:[]}}function px(){return{type:"text",value:""}}function hx(){return{type:"thematicBreak"}}}function ln(e){return{line:e.line,column:e.column,offset:e.offset}}function Ng(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Ng(e,r):GE(e,r)}}function GE(e,t){let n;for(n in t)if(Ig.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function kf(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+pi({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+pi({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+pi({start:t.start,end:t.end})+") is still open")}function YE(e){const t=this;t.parser=n;function n(r){return KE(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function XE(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function JE(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
230
+ `}]}function ZE(e,t){const n=t.value?t.value+`
231
+ `:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let l={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(l.data={meta:t.meta}),e.patch(t,l),l=e.applyData(t,l),l={type:"element",tagName:"pre",properties:{},children:[l]},e.patch(t,l),l}function e2(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function t2(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function n2(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Rr(r.toLowerCase()),l=e.footnoteOrder.indexOf(r);let o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=l+1,s+=1,e.footnoteCounts.set(r,s);const a={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,a);const u={type:"element",tagName:"sup",properties:{},children:[a]};return e.patch(t,u),e.applyData(t,u)}function r2(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function i2(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Tg(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),l=i[0];l&&l.type==="text"?l.value="["+l.value:i.unshift({type:"text",value:"["});const o=i[i.length-1];return o&&o.type==="text"?o.value+=r:i.push({type:"text",value:r}),i}function l2(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Tg(e,t);const i={src:Rr(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const l={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,l),e.applyData(t,l)}function o2(e,t){const n={src:Rr(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function s2(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function a2(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Tg(e,t);const i={href:Rr(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const l={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,l),e.applyData(t,l)}function u2(e,t){const n={href:Rr(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function c2(e,t,n){const r=e.all(t),i=n?d2(n):zg(t),l={},o=[];if(typeof t.checked=="boolean"){const d=r[0];let c;d&&d.type==="element"&&d.tagName==="p"?c=d:(c={type:"element",tagName:"p",properties:{},children:[]},r.unshift(c)),c.children.length>0&&c.children.unshift({type:"text",value:" "}),c.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),l.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const d=r[s];(i||s!==0||d.type!=="element"||d.tagName!=="p")&&o.push({type:"text",value:`
232
+ `}),d.type==="element"&&d.tagName==="p"&&!i?o.push(...d.children):o.push(d)}const a=r[r.length-1];a&&(i||a.type!=="element"||a.tagName!=="p")&&o.push({type:"text",value:`
233
+ `});const u={type:"element",tagName:"li",properties:l,children:o};return e.patch(t,u),e.applyData(t,u)}function d2(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=zg(n[r])}return t}function zg(e){const t=e.spread;return t??e.children.length>1}function f2(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const o=r[i];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const l={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,l),e.applyData(t,l)}function p2(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function h2(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function m2(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function g2(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const o={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],o),i.push(o)}if(n.length>0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},s=Ku(t.children[1]),a=ug(t.children[t.children.length-1]);s&&a&&(o.position={start:s,end:a}),i.push(o)}const l={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,l),e.applyData(t,l)}function x2(e,t,n){const r=n?n.children:void 0,l=(r?r.indexOf(t):1)===0?"th":"td",o=n&&n.type==="table"?n.align:void 0,s=o?o.length:t.children.length;let a=-1;const u=[];for(;++a<s;){const c=t.children[a],f={},p=o?o[a]:void 0;p&&(f.align=p);let x={type:"element",tagName:l,properties:f,children:[]};c&&(x.children=e.all(c),e.patch(c,x),x=e.applyData(c,x)),u.push(x)}const d={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,d),e.applyData(t,d)}function y2(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const vf=9,wf=32;function k2(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const l=[];for(;r;)l.push(Sf(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return l.push(Sf(t.slice(i),i>0,!1)),l.join("")}function Sf(e,t,n){let r=0,i=e.length;if(t){let l=e.codePointAt(r);for(;l===vf||l===wf;)r++,l=e.codePointAt(r)}if(n){let l=e.codePointAt(i-1);for(;l===vf||l===wf;)i--,l=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function v2(e,t){const n={type:"text",value:k2(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function w2(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const S2={blockquote:XE,break:JE,code:ZE,delete:e2,emphasis:t2,footnoteReference:n2,heading:r2,html:i2,imageReference:l2,image:o2,inlineCode:s2,linkReference:a2,link:u2,listItem:c2,list:f2,paragraph:p2,root:h2,strong:m2,table:g2,tableCell:y2,tableRow:x2,text:v2,thematicBreak:w2,toml:fl,yaml:fl,definition:fl,footnoteDefinition:fl};function fl(){}const jg=-1,zo=0,mi=1,lo=2,ec=3,tc=4,nc=5,rc=6,Pg=7,Ag=8,{defineProperty:b2}=Object,Lg=typeof self=="object"?self:globalThis,bf=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new Lg[e](t)},C2=(e,t)=>{const n=(i,l)=>(e.set(l,i),i),r=i=>{if(e.has(i))return e.get(i);const[l,o]=t[i];switch(l){case zo:case jg:return n(o,i);case mi:{const s=n([],i);for(const a of o)s.push(r(a));return s}case lo:{const s=n({},i);for(const[a,u]of o){const d=r(a),c=r(u);d==="__proto__"?b2(s,d,{value:c,configurable:!0,enumerable:!0,writable:!0}):s[d]=c}return s}case ec:return n(new Date(o),i);case tc:{const{source:s,flags:a}=o;return n(new RegExp(s,a),i)}case nc:{const s=n(new Map,i);for(const[a,u]of o)s.set(r(a),r(u));return s}case rc:{const s=n(new Set,i);for(const a of o)s.add(r(a));return s}case Pg:{const{name:s,message:a}=o;return n(typeof Lg[s]=="function"?bf(s,a):new Error(a),i)}case Ag:return n(BigInt(o),i);case"BigInt":return n(Object(BigInt(o)),i);case"ArrayBuffer":return n(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:s}=new Uint8Array(o);return n(new DataView(s),o)}case"-0":return-0}return n(bf(l,o),i)};return r},Cf=e=>C2(new Map,e)(0),Mn="",{toString:E2}={},{keys:_2,is:I2}=Object,Jr=e=>{const t=typeof e;if(t!=="object"||!e)return[zo,t];const n=E2.call(e).slice(8,-1);switch(n){case"Array":return[mi,Mn];case"Object":return[lo,Mn];case"Date":return[ec,Mn];case"RegExp":return[tc,Mn];case"Map":return[nc,Mn];case"Set":return[rc,Mn];case"DataView":return[mi,n]}return n.includes("Array")?[mi,n]:e instanceof Error?[Pg,e.name||"Error"]:[lo,n]},pl=([e,t])=>e===zo&&(t==="function"||t==="symbol"),N2=(e,t,n,r)=>{const i=(o,s)=>{const a=r.push(o)-1;return n.set(s,a),a},l=o=>{if(n.has(o))return n.get(o);let[s,a]=Jr(o);switch(s){case zo:{let d=o;switch(a){case"bigint":s=Ag,d=o.toString();break;case"number":if(!o&&I2(o,-0))return r.push(["-0"])-1;break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+a);d=null;break;case"undefined":return i([jg],o)}return i([s,d],o)}case mi:{if(a){let f=o;return a==="DataView"?f=new Uint8Array(o.buffer):a==="ArrayBuffer"&&(f=new Uint8Array(o)),i([a,[...f]],o)}const d=[],c=i([s,d],o);for(const f of o)d.push(l(f));return c}case lo:{if(a)switch(a){case"BigInt":return i([a,o.toString()],o);case"Boolean":case"Number":case"String":return i([a,o.valueOf()],o)}if(t&&"toJSON"in o)return l(o.toJSON());const d=[],c=i([s,d],o);for(const f of _2(o))(e||!pl(Jr(o[f])))&&d.push([l(f),l(o[f])]);return c}case ec:return i([s,isNaN(o.getTime())?Mn:o.toISOString()],o);case tc:{const{source:d,flags:c}=o;return i([s,{source:d,flags:c}],o)}case nc:{const d=[],c=i([s,d],o);for(const[f,p]of o)(e||!(pl(Jr(f))||pl(Jr(p))))&&d.push([l(f),l(p)]);return c}case rc:{const d=[],c=i([s,d],o);for(const f of o)(e||!pl(Jr(f)))&&d.push(l(f));return c}}const{message:u}=o;return i([s,{name:a,message:u}],o)};return l},Ef=(e,{json:t,lossy:n}={})=>{const r=[];return N2(!(t||n),!!t,new Map,r)(e),r},oo=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Cf(Ef(e,t)):structuredClone(e):(e,t)=>Cf(Ef(e,t));function T2(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function z2(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function j2(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||T2,r=e.options.footnoteBackLabel||z2,i=e.options.footnoteLabel||"Footnotes",l=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let a=-1;for(;++a<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[a]);if(!u)continue;const d=e.all(u),c=String(u.identifier).toUpperCase(),f=Rr(c.toLowerCase());let p=0;const x=[],v=e.footnoteCounts.get(c);for(;v!==void 0&&++p<=v;){x.length>0&&x.push({type:"text",value:" "});let g=typeof n=="string"?n:n(a,p);typeof g=="string"&&(g={type:"text",value:g}),x.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+f+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(a,p),className:["data-footnote-backref"]},children:Array.isArray(g)?g:[g]})}const E=d[d.length-1];if(E&&E.type==="element"&&E.tagName==="p"){const g=E.children[E.children.length-1];g&&g.type==="text"?g.value+=" ":E.children.push({type:"text",value:" "}),E.children.push(...x)}else d.push(...x);const h={type:"element",tagName:"li",properties:{id:t+"fn-"+f},children:e.wrap(d,!0)};e.patch(u,h),s.push(h)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:l,properties:{...oo(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
234
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:`
235
+ `}]}}const jo=function(e){if(e==null)return M2;if(typeof e=="function")return Po(e);if(typeof e=="object")return Array.isArray(e)?P2(e):A2(e);if(typeof e=="string")return L2(e);throw new Error("Expected function, string, or object as test")};function P2(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=jo(e[n]);return Po(r);function r(...i){let l=-1;for(;++l<t.length;)if(t[l].apply(this,i))return!0;return!1}}function A2(e){const t=e;return Po(n);function n(r){const i=r;let l;for(l in e)if(i[l]!==t[l])return!1;return!0}}function L2(e){return Po(t);function t(n){return n&&n.type===e}}function Po(e){return t;function t(n,r,i){return!!(R2(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function M2(){return!0}function R2(e){return e!==null&&typeof e=="object"&&"type"in e}const Mg=[],O2=!0,La=!1,D2="skip";function Rg(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const l=jo(i),o=r?-1:1;s(e,void 0,[])();function s(a,u,d){const c=a&&typeof a=="object"?a:{};if(typeof c.type=="string"){const p=typeof c.tagName=="string"?c.tagName:typeof c.name=="string"?c.name:void 0;Object.defineProperty(f,"name",{value:"node ("+(a.type+(p?"<"+p+">":""))+")"})}return f;function f(){let p=Mg,x,v,E;if((!t||l(a,u,d[d.length-1]||void 0))&&(p=F2(n(a,d)),p[0]===La))return p;if("children"in a&&a.children){const h=a;if(h.children&&p[0]!==D2)for(v=(r?h.children.length:-1)+o,E=d.concat(h);v>-1&&v<h.children.length;){const g=h.children[v];if(x=s(g,v,E)(),x[0]===La)return x;v=typeof x[1]=="number"?x[1]:v+o}}return p}}}function F2(e){return Array.isArray(e)?e:typeof e=="number"?[O2,e]:e==null?Mg:[e]}function ic(e,t,n,r){let i,l,o;typeof t=="function"&&typeof n!="function"?(l=void 0,o=t,i=n):(l=t,o=n,i=r),Rg(e,l,s,i);function s(a,u){const d=u[u.length-1],c=d?d.children.indexOf(a):void 0;return o(a,c,d)}}const Ma={}.hasOwnProperty,$2={};function V2(e,t){const n=t||$2,r=new Map,i=new Map,l=new Map,o={...S2,...n.handlers},s={all:u,applyData:U2,definitionById:r,footnoteById:i,footnoteCounts:l,footnoteOrder:[],handlers:o,one:a,options:n,patch:B2,wrap:W2};return ic(e,function(d){if(d.type==="definition"||d.type==="footnoteDefinition"){const c=d.type==="definition"?r:i,f=String(d.identifier).toUpperCase();c.has(f)||c.set(f,d)}}),s;function a(d,c){const f=d.type,p=s.handlers[f];if(Ma.call(s.handlers,f)&&p)return p(s,d,c);if(s.options.passThrough&&s.options.passThrough.includes(f)){if("children"in d){const{children:v,...E}=d,h=oo(E);return h.children=s.all(d),h}return oo(d)}return(s.options.unknownHandler||H2)(s,d,c)}function u(d){const c=[];if("children"in d){const f=d.children;let p=-1;for(;++p<f.length;){const x=s.one(f[p],d);if(x){if(p&&f[p-1].type==="break"&&(!Array.isArray(x)&&x.type==="text"&&(x.value=_f(x.value)),!Array.isArray(x)&&x.type==="element")){const v=x.children[0];v&&v.type==="text"&&(v.value=_f(v.value))}Array.isArray(x)?c.push(...x):c.push(x)}}}return c}}function B2(e,t){e.position&&(t.position=Nb(e))}function U2(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,l=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const o="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:o}}n.type==="element"&&l&&Object.assign(n.properties,oo(l)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function H2(e,t){const n=t.data||{},r="value"in t&&!(Ma.call(n,"hProperties")||Ma.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function W2(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
236
+ `});++r<e.length;)r&&n.push({type:"text",value:`
237
+ `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
238
+ `}),n}function _f(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function If(e,t){const n=V2(e,t),r=n.one(e,void 0),i=j2(n),l=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&l.children.push({type:"text",value:`
239
+ `},i),l}function q2(e,t){return e&&"run"in e?async function(n,r){const i=If(n,{file:r,...t});await e.run(i,r)}:function(n,r){return If(n,{file:r,...e||t})}}function Nf(e){if(e)throw e}var zl=Object.prototype.hasOwnProperty,Og=Object.prototype.toString,Tf=Object.defineProperty,zf=Object.getOwnPropertyDescriptor,jf=function(t){return typeof Array.isArray=="function"?Array.isArray(t):Og.call(t)==="[object Array]"},Pf=function(t){if(!t||Og.call(t)!=="[object Object]")return!1;var n=zl.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&zl.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||zl.call(t,i)},Af=function(t,n){Tf&&n.name==="__proto__"?Tf(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},Lf=function(t,n){if(n==="__proto__")if(zl.call(t,n)){if(zf)return zf(t,n).value}else return;return t[n]},K2=function e(){var t,n,r,i,l,o,s=arguments[0],a=1,u=arguments.length,d=!1;for(typeof s=="boolean"&&(d=s,s=arguments[1]||{},a=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});a<u;++a)if(t=arguments[a],t!=null)for(n in t)r=Lf(s,n),i=Lf(t,n),s!==i&&(d&&i&&(Pf(i)||(l=jf(i)))?(l?(l=!1,o=r&&jf(r)?r:[]):o=r&&Pf(r)?r:{},Af(s,{name:n,newValue:e(d,o,i)})):typeof i<"u"&&Af(s,{name:n,newValue:i}));return s};const vs=Gf(K2);function Ra(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Q2(){const e=[],t={run:n,use:r};return t;function n(...i){let l=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);s(null,...i);function s(a,...u){const d=e[++l];let c=-1;if(a){o(a);return}for(;++c<i.length;)(u[c]===null||u[c]===void 0)&&(u[c]=i[c]);i=u,d?G2(d,s)(...u):o(null,...u)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function G2(e,t){let n;return r;function r(...o){const s=e.length>o.length;let a;s&&o.push(i);try{a=e.apply(this,o)}catch(u){const d=u;if(s&&n)throw d;return i(d)}s||(a&&a.then&&typeof a.then=="function"?a.then(l,i):a instanceof Error?i(a):l(a))}function i(o,...s){n||(n=!0,t(o,...s))}function l(o){i(null,o)}}const Mt={basename:Y2,dirname:X2,extname:J2,join:Z2,sep:"/"};function Y2(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Wi(e);let n=0,r=-1,i=e.length,l;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(l){n=i+1;break}}else r<0&&(l=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(l){n=i+1;break}}else o<0&&(l=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function X2(e){if(Wi(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function J2(e){Wi(e);let t=e.length,n=-1,r=0,i=-1,l=0,o;for(;t--;){const s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:l!==1&&(l=1):i>-1&&(l=-1)}return i<0||n<0||l===0||l===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function Z2(...e){let t=-1,n;for(;++t<e.length;)Wi(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":e_(n)}function e_(e){Wi(e);const t=e.codePointAt(0)===47;let n=t_(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function t_(e,t){let n="",r=0,i=-1,l=0,o=-1,s,a;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else{if(s===47)break;s=47}if(s===47){if(!(i===o-1||l===1))if(i!==o-1&&l===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(a=n.lastIndexOf("/"),a!==n.length-1){a<0?(n="",r=0):(n=n.slice(0,a),r=n.length-1-n.lastIndexOf("/")),i=o,l=0;continue}}else if(n.length>0){n="",r=0,i=o,l=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,l=0}else s===46&&l>-1?l++:l=-1}return n}function Wi(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const n_={cwd:r_};function r_(){return"/"}function Oa(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function i_(e){if(typeof e=="string")e=new URL(e);else if(!Oa(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return l_(e)}function l_(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const ws=["history","path","basename","stem","extname","dirname"];class Dg{constructor(t){let n;t?Oa(t)?n={path:t}:typeof t=="string"||o_(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":n_.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<ws.length;){const l=ws[r];l in n&&n[l]!==void 0&&n[l]!==null&&(this[l]=l==="history"?[...n[l]]:n[l])}let i;for(i in n)ws.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Mt.basename(this.path):void 0}set basename(t){bs(t,"basename"),Ss(t,"basename"),this.path=Mt.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Mt.dirname(this.path):void 0}set dirname(t){Mf(this.basename,"dirname"),this.path=Mt.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Mt.extname(this.path):void 0}set extname(t){if(Ss(t,"extname"),Mf(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Mt.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Oa(t)&&(t=i_(t)),bs(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Mt.basename(this.path,this.extname):void 0}set stem(t){bs(t,"stem"),Ss(t,"stem"),this.path=Mt.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new Ue(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Ss(e,t){if(e&&e.includes(Mt.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Mt.sep+"`")}function bs(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Mf(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function o_(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const s_=function(e){const r=this.constructor.prototype,i=r[e],l=function(){return i.apply(l,arguments)};return Object.setPrototypeOf(l,r),l},a_={}.hasOwnProperty;class lc extends s_{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Q2()}copy(){const t=new lc;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(vs(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(_s("data",this.frozen),this.namespace[t]=n,this):a_.call(this.namespace,t)&&this.namespace[t]||void 0:t?(_s("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=hl(t),r=this.parser||this.Parser;return Cs("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Cs("process",this.parser||this.Parser),Es("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(l,o){const s=hl(t),a=r.parse(s);r.run(a,s,function(d,c,f){if(d||!c||!f)return u(d);const p=c,x=r.stringify(p,f);d_(x)?f.value=x:f.result=x,u(d,f)});function u(d,c){d||!c?o(d):l?l(c):n(void 0,c)}}}processSync(t){let n=!1,r;return this.freeze(),Cs("processSync",this.parser||this.Parser),Es("processSync",this.compiler||this.Compiler),this.process(t,i),Of("processSync","process",n),r;function i(l,o){n=!0,Nf(l),r=o}}run(t,n,r){Rf(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?l(void 0,r):new Promise(l);function l(o,s){const a=hl(n);i.run(t,a,u);function u(d,c,f){const p=c||t;d?s(d):o?o(p):r(void 0,p,f)}}}runSync(t,n){let r=!1,i;return this.run(t,n,l),Of("runSync","run",r),i;function l(o,s){Nf(o),i=s,r=!0}}stringify(t,n){this.freeze();const r=hl(n),i=this.compiler||this.Compiler;return Es("stringify",i),Rf(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(_s("use",this.frozen),t!=null)if(typeof t=="function")a(t,n);else if(typeof t=="object")Array.isArray(t)?s(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function l(u){if(typeof u=="function")a(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[d,...c]=u;a(d,c)}else o(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function o(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(u.plugins),u.settings&&(i.settings=vs(!0,i.settings,u.settings))}function s(u){let d=-1;if(u!=null)if(Array.isArray(u))for(;++d<u.length;){const c=u[d];l(c)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function a(u,d){let c=-1,f=-1;for(;++c<r.length;)if(r[c][0]===u){f=c;break}if(f===-1)r.push([u,...d]);else if(d.length>0){let[p,...x]=d;const v=r[f][1];Ra(v)&&Ra(p)&&(p=vs(!0,v,p)),r[f]=[u,p,...x]}}}}const u_=new lc().freeze();function Cs(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Es(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function _s(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Rf(e){if(!Ra(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Of(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function hl(e){return c_(e)?e:new Dg(e)}function c_(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function d_(e){return typeof e=="string"||f_(e)}function f_(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const p_="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Df=[],Ff={allowDangerousHtml:!0},h_=/^(https?|ircs?|mailto|xmpp)$/i,m_=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function g_(e){const t=x_(e),n=y_(e);return k_(t.runSync(t.parse(n),n),e)}function x_(e){const t=e.rehypePlugins||Df,n=e.remarkPlugins||Df,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Ff}:Ff;return u_().use(YE).use(n).use(q2,r).use(t)}function y_(e){const t=e.children||"",n=new Dg;return typeof t=="string"&&(n.value=t),n}function k_(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,l=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,a=t.urlTransform||v_;for(const d of m_)Object.hasOwn(t,d.from)&&(""+d.from+(d.to?"use `"+d.to+"` instead":"remove it")+p_+d.id,void 0);return ic(e,u),Ab(e,{Fragment:m.Fragment,components:i,ignoreInvalidStyle:!0,jsx:m.jsx,jsxs:m.jsxs,passKeys:!0,passNode:!0});function u(d,c,f){if(d.type==="raw"&&f&&typeof c=="number")return o?f.children.splice(c,1):f.children[c]={type:"text",value:d.value},c;if(d.type==="element"){let p;for(p in xs)if(Object.hasOwn(xs,p)&&Object.hasOwn(d.properties,p)){const x=d.properties[p],v=xs[p];(v===null||v.includes(d.tagName))&&(d.properties[p]=a(String(x||""),p,d))}}if(d.type==="element"){let p=n?!n.includes(d.tagName):l?l.includes(d.tagName):!1;if(!p&&r&&typeof c=="number"&&(p=!r(d,c,f)),p&&f&&typeof c=="number")return s&&d.children?f.children.splice(c,1,...d.children):f.children.splice(c,1),c}}}function v_(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||h_.test(e.slice(0,t))?e:""}function $f(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function w_(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function S_(e,t,n){const i=jo((n||{}).ignore||[]),l=b_(t);let o=-1;for(;++o<l.length;)Rg(e,"text",s);function s(u,d){let c=-1,f;for(;++c<d.length;){const p=d[c],x=f?f.children:void 0;if(i(p,x?x.indexOf(p):void 0,f))return;f=p}if(f)return a(u,d)}function a(u,d){const c=d[d.length-1],f=l[o][0],p=l[o][1];let x=0;const E=c.children.indexOf(u);let h=!1,g=[];f.lastIndex=0;let k=f.exec(u.value);for(;k;){const C=k.index,N={index:k.index,input:k.input,stack:[...d,u]};let b=p(...k,N);if(typeof b=="string"&&(b=b.length>0?{type:"text",value:b}:void 0),b===!1?f.lastIndex=C+1:(x!==C&&g.push({type:"text",value:u.value.slice(x,C)}),Array.isArray(b)?g.push(...b):b&&g.push(b),x=C+k[0].length,h=!0),!f.global)break;k=f.exec(u.value)}return h?(x<u.value.length&&g.push({type:"text",value:u.value.slice(x)}),c.children.splice(E,1,...g)):g=[u],E+g.length}}function b_(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([C_(i[0]),E_(i[1])])}return t}function C_(e){return typeof e=="string"?new RegExp(w_(e),"g"):e}function E_(e){return typeof e=="function"?e:function(){return e}}const Is="phrasing",Ns=["autolink","link","image","label"];function __(){return{transforms:[A_],enter:{literalAutolink:N_,literalAutolinkEmail:Ts,literalAutolinkHttp:Ts,literalAutolinkWww:Ts},exit:{literalAutolink:P_,literalAutolinkEmail:j_,literalAutolinkHttp:T_,literalAutolinkWww:z_}}}function I_(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Is,notInConstruct:Ns},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Is,notInConstruct:Ns},{character:":",before:"[ps]",after:"\\/",inConstruct:Is,notInConstruct:Ns}]}}function N_(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Ts(e){this.config.enter.autolinkProtocol.call(this,e)}function T_(e){this.config.exit.autolinkProtocol.call(this,e)}function z_(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function j_(e){this.config.exit.autolinkEmail.call(this,e)}function P_(e){this.exit(e)}function A_(e){S_(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,L_],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),M_]],{ignore:["link","linkReference"]})}function L_(e,t,n,r,i){let l="";if(!Fg(i)||(/^w/i.test(t)&&(n=t+n,t="",l="http://"),!R_(n)))return!1;const o=O_(n+r);if(!o[0])return!1;const s={type:"link",title:null,url:l+t+o[0],children:[{type:"text",value:t+o[0]}]};return o[1]?[s,{type:"text",value:o[1]}]:s}function M_(e,t,n,r){return!Fg(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function R_(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function O_(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=$f(e,"(");let l=$f(e,")");for(;r!==-1&&i>l;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),l++;return[e,n]}function Fg(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Yn(n)||No(n))&&(!t||n!==47)}$g.peek=q_;function D_(){this.buffer()}function F_(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function $_(){this.buffer()}function V_(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function B_(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Tt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function U_(e){this.exit(e)}function H_(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Tt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function W_(e){this.exit(e)}function q_(){return"["}function $g(e,t,n,r){const i=n.createTracker(r);let l=i.move("[^");const o=n.enter("footnoteReference"),s=n.enter("reference");return l+=i.move(n.safe(n.associationId(e),{after:"]",before:l})),s(),o(),l+=i.move("]"),l}function K_(){return{enter:{gfmFootnoteCallString:D_,gfmFootnoteCall:F_,gfmFootnoteDefinitionLabelString:$_,gfmFootnoteDefinition:V_},exit:{gfmFootnoteCallString:B_,gfmFootnoteCall:U_,gfmFootnoteDefinitionLabelString:H_,gfmFootnoteDefinition:W_}}}function Q_(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:$g},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,l,o){const s=l.createTracker(o);let a=s.move("[^");const u=l.enter("footnoteDefinition"),d=l.enter("label");return a+=s.move(l.safe(l.associationId(r),{before:a,after:"]"})),d(),a+=s.move("]:"),r.children&&r.children.length>0&&(s.shift(4),a+=s.move((t?`
240
+ `:" ")+l.indentLines(l.containerFlow(r,s.current()),t?Vg:G_))),u(),a}}function G_(e,t,n){return t===0?e:Vg(e,t,n)}function Vg(e,t,n){return(n?"":" ")+e}const Y_=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Bg.peek=tI;function X_(){return{canContainEols:["delete"],enter:{strikethrough:Z_},exit:{strikethrough:eI}}}function J_(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Y_}],handlers:{delete:Bg}}}function Z_(e){this.enter({type:"delete",children:[]},e)}function eI(e){this.exit(e)}function Bg(e,t,n,r){const i=n.createTracker(r),l=n.enter("strikethrough");let o=i.move("~~");return o+=n.containerPhrasing(e,{...i.current(),before:o,after:"~"}),o+=i.move("~~"),l(),o}function tI(){return"~"}function nI(e){return e.length}function rI(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||nI,l=[],o=[],s=[],a=[];let u=0,d=-1;for(;++d<e.length;){const v=[],E=[];let h=-1;for(e[d].length>u&&(u=e[d].length);++h<e[d].length;){const g=iI(e[d][h]);if(n.alignDelimiters!==!1){const k=i(g);E[h]=k,(a[h]===void 0||k>a[h])&&(a[h]=k)}v.push(g)}o[d]=v,s[d]=E}let c=-1;if(typeof r=="object"&&"length"in r)for(;++c<u;)l[c]=Vf(r[c]);else{const v=Vf(r);for(;++c<u;)l[c]=v}c=-1;const f=[],p=[];for(;++c<u;){const v=l[c];let E="",h="";v===99?(E=":",h=":"):v===108?E=":":v===114&&(h=":");let g=n.alignDelimiters===!1?1:Math.max(1,a[c]-E.length-h.length);const k=E+"-".repeat(g)+h;n.alignDelimiters!==!1&&(g=E.length+g+h.length,g>a[c]&&(a[c]=g),p[c]=g),f[c]=k}o.splice(1,0,f),s.splice(1,0,p),d=-1;const x=[];for(;++d<o.length;){const v=o[d],E=s[d];c=-1;const h=[];for(;++c<u;){const g=v[c]||"";let k="",C="";if(n.alignDelimiters!==!1){const N=a[c]-(E[c]||0),b=l[c];b===114?k=" ".repeat(N):b===99?N%2?(k=" ".repeat(N/2+.5),C=" ".repeat(N/2-.5)):(k=" ".repeat(N/2),C=k):C=" ".repeat(N)}n.delimiterStart!==!1&&!c&&h.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&g==="")&&(n.delimiterStart!==!1||c)&&h.push(" "),n.alignDelimiters!==!1&&h.push(k),h.push(g),n.alignDelimiters!==!1&&h.push(C),n.padding!==!1&&h.push(" "),(n.delimiterEnd!==!1||c!==u-1)&&h.push("|")}x.push(n.delimiterEnd===!1?h.join("").replace(/ +$/,""):h.join(""))}return x.join(`
241
+ `)}function iI(e){return e==null?"":String(e)}function Vf(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function lI(e,t,n,r){const i=n.enter("blockquote"),l=n.createTracker(r);l.move("> "),l.shift(2);const o=n.indentLines(n.containerFlow(e,l.current()),oI);return i(),o}function oI(e,t,n){return">"+(n?"":" ")+e}function sI(e,t){return Bf(e,t.inConstruct,!0)&&!Bf(e,t.notInConstruct,!1)}function Bf(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Uf(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
242
+ `&&sI(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
243
+ `}function aI(e,t){const n=String(e);let r=n.indexOf(t),i=r,l=0,o=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++l>o&&(o=l):l=1,i=r+t.length,r=n.indexOf(t,i);return o}function uI(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function cI(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function dI(e,t,n,r){const i=cI(n),l=e.value||"",o=i==="`"?"GraveAccent":"Tilde";if(uI(e,n)){const c=n.enter("codeIndented"),f=n.indentLines(l,fI);return c(),f}const s=n.createTracker(r),a=i.repeat(Math.max(aI(l,i)+1,3)),u=n.enter("codeFenced");let d=s.move(a);if(e.lang){const c=n.enter(`codeFencedLang${o}`);d+=s.move(n.safe(e.lang,{before:d,after:" ",encode:["`"],...s.current()})),c()}if(e.lang&&e.meta){const c=n.enter(`codeFencedMeta${o}`);d+=s.move(" "),d+=s.move(n.safe(e.meta,{before:d,after:`
244
+ `,encode:["`"],...s.current()})),c()}return d+=s.move(`
245
+ `),l&&(d+=s.move(l+`
246
+ `)),d+=s.move(a),u(),d}function fI(e,t,n){return(n?"":" ")+e}function oc(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function pI(e,t,n,r){const i=oc(n),l=i==='"'?"Quote":"Apostrophe",o=n.enter("definition");let s=n.enter("label");const a=n.createTracker(r);let u=a.move("[");return u+=a.move(n.safe(n.associationId(e),{before:u,after:"]",...a.current()})),u+=a.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(n.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(s=n.enter("destinationRaw"),u+=a.move(n.safe(e.url,{before:u,after:e.title?" ":`
247
+ `,...a.current()}))),s(),e.title&&(s=n.enter(`title${l}`),u+=a.move(" "+i),u+=a.move(n.safe(e.title,{before:u,after:i,...a.current()})),u+=a.move(i),s()),o(),u}function hI(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Oi(e){return"&#x"+e.toString(16).toUpperCase()+";"}function so(e,t,n){const r=zr(e),i=zr(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Ug.peek=mI;function Ug(e,t,n,r){const i=hI(n),l=n.enter("emphasis"),o=n.createTracker(r),s=o.move(i);let a=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()}));const u=a.charCodeAt(0),d=so(r.before.charCodeAt(r.before.length-1),u,i);d.inside&&(a=Oi(u)+a.slice(1));const c=a.charCodeAt(a.length-1),f=so(r.after.charCodeAt(0),c,i);f.inside&&(a=a.slice(0,-1)+Oi(c));const p=o.move(i);return l(),n.attentionEncodeSurroundingInfo={after:f.outside,before:d.outside},s+a+p}function mI(e,t,n){return n.options.emphasis||"*"}function gI(e,t){let n=!1;return ic(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,La}),!!((!e.depth||e.depth<3)&&Xu(e)&&(t.options.setext||n))}function xI(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),l=n.createTracker(r);if(gI(e,n)){const d=n.enter("headingSetext"),c=n.enter("phrasing"),f=n.containerPhrasing(e,{...l.current(),before:`
248
+ `,after:`
249
+ `});return c(),d(),f+`
250
+ `+(i===1?"=":"-").repeat(f.length-(Math.max(f.lastIndexOf("\r"),f.lastIndexOf(`
251
+ `))+1))}const o="#".repeat(i),s=n.enter("headingAtx"),a=n.enter("phrasing");l.move(o+" ");let u=n.containerPhrasing(e,{before:"# ",after:`
252
+ `,...l.current()});return/^[\t ]/.test(u)&&(u=Oi(u.charCodeAt(0))+u.slice(1)),u=u?o+" "+u:o,n.options.closeAtx&&(u+=" "+o),a(),s(),u}Hg.peek=yI;function Hg(e){return e.value||""}function yI(){return"<"}Wg.peek=kI;function Wg(e,t,n,r){const i=oc(n),l=i==='"'?"Quote":"Apostrophe",o=n.enter("image");let s=n.enter("label");const a=n.createTracker(r);let u=a.move("![");return u+=a.move(n.safe(e.alt,{before:u,after:"]",...a.current()})),u+=a.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(n.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(s=n.enter("destinationRaw"),u+=a.move(n.safe(e.url,{before:u,after:e.title?" ":")",...a.current()}))),s(),e.title&&(s=n.enter(`title${l}`),u+=a.move(" "+i),u+=a.move(n.safe(e.title,{before:u,after:i,...a.current()})),u+=a.move(i),s()),u+=a.move(")"),o(),u}function kI(){return"!"}qg.peek=vI;function qg(e,t,n,r){const i=e.referenceType,l=n.enter("imageReference");let o=n.enter("label");const s=n.createTracker(r);let a=s.move("![");const u=n.safe(e.alt,{before:a,after:"]",...s.current()});a+=s.move(u+"]["),o();const d=n.stack;n.stack=[],o=n.enter("reference");const c=n.safe(n.associationId(e),{before:a,after:"]",...s.current()});return o(),n.stack=d,l(),i==="full"||!u||u!==c?a+=s.move(c+"]"):i==="shortcut"?a=a.slice(0,-1):a+=s.move("]"),a}function vI(){return"!"}Kg.peek=wI;function Kg(e,t,n){let r=e.value||"",i="`",l=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++l<n.unsafe.length;){const o=n.unsafe[l],s=n.compilePattern(o);let a;if(o.atBreak)for(;a=s.exec(r);){let u=a.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(a.index+1)}}return i+r+i}function wI(){return"`"}function Qg(e,t){const n=Xu(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Gg.peek=SI;function Gg(e,t,n,r){const i=oc(n),l=i==='"'?"Quote":"Apostrophe",o=n.createTracker(r);let s,a;if(Qg(e,n)){const d=n.stack;n.stack=[],s=n.enter("autolink");let c=o.move("<");return c+=o.move(n.containerPhrasing(e,{before:c,after:">",...o.current()})),c+=o.move(">"),s(),n.stack=d,c}s=n.enter("link"),a=n.enter("label");let u=o.move("[");return u+=o.move(n.containerPhrasing(e,{before:u,after:"](",...o.current()})),u+=o.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),u+=o.move("<"),u+=o.move(n.safe(e.url,{before:u,after:">",...o.current()})),u+=o.move(">")):(a=n.enter("destinationRaw"),u+=o.move(n.safe(e.url,{before:u,after:e.title?" ":")",...o.current()}))),a(),e.title&&(a=n.enter(`title${l}`),u+=o.move(" "+i),u+=o.move(n.safe(e.title,{before:u,after:i,...o.current()})),u+=o.move(i),a()),u+=o.move(")"),s(),u}function SI(e,t,n){return Qg(e,n)?"<":"["}Yg.peek=bI;function Yg(e,t,n,r){const i=e.referenceType,l=n.enter("linkReference");let o=n.enter("label");const s=n.createTracker(r);let a=s.move("[");const u=n.containerPhrasing(e,{before:a,after:"]",...s.current()});a+=s.move(u+"]["),o();const d=n.stack;n.stack=[],o=n.enter("reference");const c=n.safe(n.associationId(e),{before:a,after:"]",...s.current()});return o(),n.stack=d,l(),i==="full"||!u||u!==c?a+=s.move(c+"]"):i==="shortcut"?a=a.slice(0,-1):a+=s.move("]"),a}function bI(){return"["}function sc(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function CI(e){const t=sc(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function EI(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Xg(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function _I(e,t,n,r){const i=n.enter("list"),l=n.bulletCurrent;let o=e.ordered?EI(n):sc(n);const s=e.ordered?o==="."?")":".":CI(n);let a=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){const d=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&d&&(!d.children||!d.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(a=!0),Xg(n)===o&&d){let c=-1;for(;++c<e.children.length;){const f=e.children[c];if(f&&f.type==="listItem"&&f.children&&f.children[0]&&f.children[0].type==="thematicBreak"){a=!0;break}}}}a&&(o=s),n.bulletCurrent=o;const u=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=l,i(),u}function II(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function NI(e,t,n,r){const i=II(n);let l=n.bulletCurrent||sc(n);t&&t.type==="list"&&t.ordered&&(l=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+l);let o=l.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);const s=n.createTracker(r);s.move(l+" ".repeat(o-l.length)),s.shift(o);const a=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,s.current()),d);return a(),u;function d(c,f,p){return f?(p?"":" ".repeat(o))+c:(p?l:l+" ".repeat(o-l.length))+c}}function TI(e,t,n,r){const i=n.enter("paragraph"),l=n.enter("phrasing"),o=n.containerPhrasing(e,r);return l(),i(),o}const zI=jo(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function jI(e,t,n,r){return(e.children.some(function(o){return zI(o)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function PI(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Jg.peek=AI;function Jg(e,t,n,r){const i=PI(n),l=n.enter("strong"),o=n.createTracker(r),s=o.move(i+i);let a=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()}));const u=a.charCodeAt(0),d=so(r.before.charCodeAt(r.before.length-1),u,i);d.inside&&(a=Oi(u)+a.slice(1));const c=a.charCodeAt(a.length-1),f=so(r.after.charCodeAt(0),c,i);f.inside&&(a=a.slice(0,-1)+Oi(c));const p=o.move(i+i);return l(),n.attentionEncodeSurroundingInfo={after:f.outside,before:d.outside},s+a+p}function AI(e,t,n){return n.options.strong||"*"}function LI(e,t,n,r){return n.safe(e.value,r)}function MI(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function RI(e,t,n){const r=(Xg(n)+(n.options.ruleSpaces?" ":"")).repeat(MI(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Zg={blockquote:lI,break:Uf,code:dI,definition:pI,emphasis:Ug,hardBreak:Uf,heading:xI,html:Hg,image:Wg,imageReference:qg,inlineCode:Kg,link:Gg,linkReference:Yg,list:_I,listItem:NI,paragraph:TI,root:jI,strong:Jg,text:LI,thematicBreak:RI};function OI(){return{enter:{table:DI,tableData:Hf,tableHeader:Hf,tableRow:$I},exit:{codeText:VI,table:FI,tableData:zs,tableHeader:zs,tableRow:zs}}}function DI(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function FI(e){this.exit(e),this.data.inTable=void 0}function $I(e){this.enter({type:"tableRow",children:[]},e)}function zs(e){this.exit(e)}function Hf(e){this.enter({type:"tableCell",children:[]},e)}function VI(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,BI));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function BI(e,t){return t==="|"?t:e}function UI(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,l=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
253
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:f,table:o,tableCell:a,tableRow:s}};function o(p,x,v,E){return u(d(p,v,E),p.align)}function s(p,x,v,E){const h=c(p,v,E),g=u([h]);return g.slice(0,g.indexOf(`
254
+ `))}function a(p,x,v,E){const h=v.enter("tableCell"),g=v.enter("phrasing"),k=v.containerPhrasing(p,{...E,before:l,after:l});return g(),h(),k}function u(p,x){return rI(p,{align:x,alignDelimiters:r,padding:n,stringLength:i})}function d(p,x,v){const E=p.children;let h=-1;const g=[],k=x.enter("table");for(;++h<E.length;)g[h]=c(E[h],x,v);return k(),g}function c(p,x,v){const E=p.children;let h=-1;const g=[],k=x.enter("tableRow");for(;++h<E.length;)g[h]=a(E[h],p,x,v);return k(),g}function f(p,x,v){let E=Zg.inlineCode(p,x,v);return v.stack.includes("tableCell")&&(E=E.replace(/\|/g,"\\$&")),E}}function HI(){return{exit:{taskListCheckValueChecked:Wf,taskListCheckValueUnchecked:Wf,paragraph:qI}}}function WI(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:KI}}}function Wf(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function qI(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let l=-1,o;for(;++l<i.length;){const s=i[l];if(s.type==="paragraph"){o=s;break}}o===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function KI(e,t,n,r){const i=e.children[0],l=typeof e.checked=="boolean"&&i&&i.type==="paragraph",o="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);l&&s.move(o);let a=Zg.listItem(e,t,n,{...r,...s.current()});return l&&(a=a.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),a;function u(d){return d+o}}function QI(){return[__(),K_(),X_(),OI(),HI()]}function GI(e){return{extensions:[I_(),Q_(e),J_(),UI(e),WI()]}}const YI={tokenize:nN,partial:!0},ex={tokenize:rN,partial:!0},tx={tokenize:iN,partial:!0},nx={tokenize:lN,partial:!0},XI={tokenize:oN,partial:!0},rx={name:"wwwAutolink",tokenize:eN,previous:lx},ix={name:"protocolAutolink",tokenize:tN,previous:ox},en={name:"emailAutolink",tokenize:ZI,previous:sx},Ft={};function JI(){return{text:Ft}}let Pn=48;for(;Pn<123;)Ft[Pn]=en,Pn++,Pn===58?Pn=65:Pn===91&&(Pn=97);Ft[43]=en;Ft[45]=en;Ft[46]=en;Ft[95]=en;Ft[72]=[en,ix];Ft[104]=[en,ix];Ft[87]=[en,rx];Ft[119]=[en,rx];function ZI(e,t,n){const r=this;let i,l;return o;function o(c){return!Da(c)||!sx.call(r,r.previous)||ac(r.events)?n(c):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(c))}function s(c){return Da(c)?(e.consume(c),s):c===64?(e.consume(c),a):n(c)}function a(c){return c===46?e.check(XI,d,u)(c):c===45||c===95||Ve(c)?(l=!0,e.consume(c),a):d(c)}function u(c){return e.consume(c),i=!0,a}function d(c){return l&&i&&We(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(c)):n(c)}}function eN(e,t,n){const r=this;return i;function i(o){return o!==87&&o!==119||!lx.call(r,r.previous)||ac(r.events)?n(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(YI,e.attempt(ex,e.attempt(tx,l),n),n)(o))}function l(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function tN(e,t,n){const r=this;let i="",l=!1;return o;function o(c){return(c===72||c===104)&&ox.call(r,r.previous)&&!ac(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(c),e.consume(c),s):n(c)}function s(c){if(We(c)&&i.length<5)return i+=String.fromCodePoint(c),e.consume(c),s;if(c===58){const f=i.toLowerCase();if(f==="http"||f==="https")return e.consume(c),a}return n(c)}function a(c){return c===47?(e.consume(c),l?u:(l=!0,a)):n(c)}function u(c){return c===null||io(c)||fe(c)||Yn(c)||No(c)?n(c):e.attempt(ex,e.attempt(tx,d),n)(c)}function d(c){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(c)}}function nN(e,t,n){let r=0;return i;function i(o){return(o===87||o===119)&&r<3?(r++,e.consume(o),i):o===46&&r===3?(e.consume(o),l):n(o)}function l(o){return o===null?n(o):t(o)}}function rN(e,t,n){let r,i,l;return o;function o(u){return u===46||u===95?e.check(nx,a,s)(u):u===null||fe(u)||Yn(u)||u!==45&&No(u)?a(u):(l=!0,e.consume(u),o)}function s(u){return u===95?r=!0:(i=r,r=void 0),e.consume(u),o}function a(u){return i||r||!l?n(u):t(u)}}function iN(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?l(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(nx,t,l)(o):o===null||fe(o)||Yn(o)?t(o):(e.consume(o),i)}function l(o){return o===41&&r++,e.consume(o),i}}function lN(e,t,n){return r;function r(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),r):s===38?(e.consume(s),l):s===93?(e.consume(s),i):s===60||s===null||fe(s)||Yn(s)?t(s):n(s)}function i(s){return s===null||s===40||s===91||fe(s)||Yn(s)?t(s):r(s)}function l(s){return We(s)?o(s):n(s)}function o(s){return s===59?(e.consume(s),r):We(s)?(e.consume(s),o):n(s)}}function oN(e,t,n){return r;function r(l){return e.consume(l),i}function i(l){return Ve(l)?n(l):t(l)}}function lx(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||fe(e)}function ox(e){return!We(e)}function sx(e){return!(e===47||Da(e))}function Da(e){return e===43||e===45||e===46||e===95||Ve(e)}function ac(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const sN={tokenize:mN,partial:!0};function aN(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:fN,continuation:{tokenize:pN},exit:hN}},text:{91:{name:"gfmFootnoteCall",tokenize:dN},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:uN,resolveTo:cN}}}}function uN(e,t,n){const r=this;let i=r.events.length;const l=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;i--;){const a=r.events[i][1];if(a.type==="labelImage"){o=a;break}if(a.type==="gfmFootnoteCall"||a.type==="labelLink"||a.type==="label"||a.type==="image"||a.type==="link")break}return s;function s(a){if(!o||!o._balanced)return n(a);const u=Tt(r.sliceSerialize({start:o.end,end:r.now()}));return u.codePointAt(0)!==94||!l.includes(u.slice(1))?n(a):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(a),e.exit("gfmFootnoteCallLabelMarker"),t(a))}}function cN(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const l={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},l.start),end:Object.assign({},l.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",l,t],["enter",o,t],["exit",o,t],["exit",l,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function dN(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l=0,o;return s;function s(c){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),a}function a(c){return c!==94?n(c):(e.enter("gfmFootnoteCallMarker"),e.consume(c),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(c){if(l>999||c===93&&!o||c===null||c===91||fe(c))return n(c);if(c===93){e.exit("chunkString");const f=e.exit("gfmFootnoteCallString");return i.includes(Tt(r.sliceSerialize(f)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(c)}return fe(c)||(o=!0),l++,e.consume(c),c===92?d:u}function d(c){return c===91||c===92||c===93?(e.consume(c),l++,u):u(c)}}function fN(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l,o=0,s;return a;function a(x){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(x){return x===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",d):n(x)}function d(x){if(o>999||x===93&&!s||x===null||x===91||fe(x))return n(x);if(x===93){e.exit("chunkString");const v=e.exit("gfmFootnoteDefinitionLabelString");return l=Tt(r.sliceSerialize(v)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),f}return fe(x)||(s=!0),o++,e.consume(x),x===92?c:d}function c(x){return x===91||x===92||x===93?(e.consume(x),o++,d):d(x)}function f(x){return x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),i.includes(l)||i.push(l),ne(e,p,"gfmFootnoteDefinitionWhitespace")):n(x)}function p(x){return t(x)}}function pN(e,t,n){return e.check(Hi,t,e.attempt(sN,t,n))}function hN(e){e.exit("gfmFootnoteDefinition")}function mN(e,t,n){const r=this;return ne(e,i,"gfmFootnoteDefinitionIndent",5);function i(l){const o=r.events[r.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?t(l):n(l)}}function gN(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:l,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(o,s){let a=-1;for(;++a<o.length;)if(o[a][0]==="enter"&&o[a][1].type==="strikethroughSequenceTemporary"&&o[a][1]._close){let u=a;for(;u--;)if(o[u][0]==="exit"&&o[u][1].type==="strikethroughSequenceTemporary"&&o[u][1]._open&&o[a][1].end.offset-o[a][1].start.offset===o[u][1].end.offset-o[u][1].start.offset){o[a][1].type="strikethroughSequence",o[u][1].type="strikethroughSequence";const d={type:"strikethrough",start:Object.assign({},o[u][1].start),end:Object.assign({},o[a][1].end)},c={type:"strikethroughText",start:Object.assign({},o[u][1].end),end:Object.assign({},o[a][1].start)},f=[["enter",d,s],["enter",o[u][1],s],["exit",o[u][1],s],["enter",c,s]],p=s.parser.constructs.insideSpan.null;p&&at(f,f.length,0,To(p,o.slice(u+1,a),s)),at(f,f.length,0,[["exit",c,s],["enter",o[a][1],s],["exit",o[a][1],s],["exit",d,s]]),at(o,u-1,a-u+3,f),a=u+f.length-2;break}}for(a=-1;++a<o.length;)o[a][1].type==="strikethroughSequenceTemporary"&&(o[a][1].type="data");return o}function l(o,s,a){const u=this.previous,d=this.events;let c=0;return f;function f(x){return u===126&&d[d.length-1][1].type!=="characterEscape"?a(x):(o.enter("strikethroughSequenceTemporary"),p(x))}function p(x){const v=zr(u);if(x===126)return c>1?a(x):(o.consume(x),c++,p);if(c<2&&!n)return a(x);const E=o.exit("strikethroughSequenceTemporary"),h=zr(x);return E._open=!h||h===2&&!!v,E._close=!v||v===2&&!!h,s(x)}}}class xN{constructor(){this.map=[],this.index=new Map}add(t,n,r){yN(this,t,n,r)}consume(t){if(this.map.sort(function(l,o){return l[0]-o[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const l of i)t.push(l);i=r.pop()}this.map.length=0,this.index.clear()}}function yN(e,t,n,r){if(n===0&&r.length===0)return;const i=e.index.get(t);if(i){i[1]+=n,i[2].push(...r);return}const l=[t,n,r];e.map.push(l),e.index.set(t,l)}function kN(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const l=r.length-1;r[l]=r[l]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function vN(){return{flow:{null:{name:"table",tokenize:wN,resolveAll:SN}}}}function wN(e,t,n){const r=this;let i=0,l=0,o;return s;function s(S){let j=r.events.length-1;for(;j>-1;){const{type:G}=r.events[j][1];if(G==="lineEnding"||G==="linePrefix")j--;else break}const O=j>-1?r.events[j][1].type:null,U=O==="tableHead"||O==="tableRow"?b:a;return U===b&&r.parser.lazy[r.now().line]?n(S):U(S)}function a(S){return e.enter("tableHead"),e.enter("tableRow"),u(S)}function u(S){return S===124||(o=!0,l+=1),d(S)}function d(S){return S===null?n(S):B(S)?l>1?(l=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),p):n(S):Z(S)?ne(e,d,"whitespace")(S):(l+=1,o&&(o=!1,i+=1),S===124?(e.enter("tableCellDivider"),e.consume(S),e.exit("tableCellDivider"),o=!0,d):(e.enter("data"),c(S)))}function c(S){return S===null||S===124||fe(S)?(e.exit("data"),d(S)):(e.consume(S),S===92?f:c)}function f(S){return S===92||S===124?(e.consume(S),c):c(S)}function p(S){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(S):(e.enter("tableDelimiterRow"),o=!1,Z(S)?ne(e,x,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(S):x(S))}function x(S){return S===45||S===58?E(S):S===124?(o=!0,e.enter("tableCellDivider"),e.consume(S),e.exit("tableCellDivider"),v):N(S)}function v(S){return Z(S)?ne(e,E,"whitespace")(S):E(S)}function E(S){return S===58?(l+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(S),e.exit("tableDelimiterMarker"),h):S===45?(l+=1,h(S)):S===null||B(S)?C(S):N(S)}function h(S){return S===45?(e.enter("tableDelimiterFiller"),g(S)):N(S)}function g(S){return S===45?(e.consume(S),g):S===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(S),e.exit("tableDelimiterMarker"),k):(e.exit("tableDelimiterFiller"),k(S))}function k(S){return Z(S)?ne(e,C,"whitespace")(S):C(S)}function C(S){return S===124?x(S):S===null||B(S)?!o||i!==l?N(S):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(S)):N(S)}function N(S){return n(S)}function b(S){return e.enter("tableRow"),I(S)}function I(S){return S===124?(e.enter("tableCellDivider"),e.consume(S),e.exit("tableCellDivider"),I):S===null||B(S)?(e.exit("tableRow"),t(S)):Z(S)?ne(e,I,"whitespace")(S):(e.enter("data"),_(S))}function _(S){return S===null||S===124||fe(S)?(e.exit("data"),I(S)):(e.consume(S),S===92?z:_)}function z(S){return S===92||S===124?(e.consume(S),_):_(S)}}function SN(e,t){let n=-1,r=!0,i=0,l=[0,0,0,0],o=[0,0,0,0],s=!1,a=0,u,d,c;const f=new xN;for(;++n<e.length;){const p=e[n],x=p[1];p[0]==="enter"?x.type==="tableHead"?(s=!1,a!==0&&(qf(f,t,a,u,d),d=void 0,a=0),u={type:"table",start:Object.assign({},x.start),end:Object.assign({},x.end)},f.add(n,0,[["enter",u,t]])):x.type==="tableRow"||x.type==="tableDelimiterRow"?(r=!0,c=void 0,l=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,d={type:"tableBody",start:Object.assign({},x.start),end:Object.assign({},x.end)},f.add(n,0,[["enter",d,t]])),i=x.type==="tableDelimiterRow"?2:d?3:1):i&&(x.type==="data"||x.type==="tableDelimiterMarker"||x.type==="tableDelimiterFiller")?(r=!1,o[2]===0&&(l[1]!==0&&(o[0]=o[1],c=ml(f,t,l,i,void 0,c),l=[0,0,0,0]),o[2]=n)):x.type==="tableCellDivider"&&(r?r=!1:(l[1]!==0&&(o[0]=o[1],c=ml(f,t,l,i,void 0,c)),l=o,o=[l[1],n,0,0])):x.type==="tableHead"?(s=!0,a=n):x.type==="tableRow"||x.type==="tableDelimiterRow"?(a=n,l[1]!==0?(o[0]=o[1],c=ml(f,t,l,i,n,c)):o[1]!==0&&(c=ml(f,t,o,i,n,c)),i=0):i&&(x.type==="data"||x.type==="tableDelimiterMarker"||x.type==="tableDelimiterFiller")&&(o[3]=n)}for(a!==0&&qf(f,t,a,u,d),f.consume(t.events),n=-1;++n<t.events.length;){const p=t.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=kN(t.events,n))}return e}function ml(e,t,n,r,i,l){const o=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(l.end=Object.assign({},ir(t.events,n[0])),e.add(n[0],0,[["exit",l,t]]));const a=ir(t.events,n[1]);if(l={type:o,start:Object.assign({},a),end:Object.assign({},a)},e.add(n[1],0,[["enter",l,t]]),n[2]!==0){const u=ir(t.events,n[2]),d=ir(t.events,n[3]),c={type:s,start:Object.assign({},u),end:Object.assign({},d)};if(e.add(n[2],0,[["enter",c,t]]),r!==2){const f=t.events[n[2]],p=t.events[n[3]];if(f[1].end=Object.assign({},p[1].end),f[1].type="chunkText",f[1].contentType="text",n[3]>n[2]+1){const x=n[2]+1,v=n[3]-n[2]-1;e.add(x,v,[])}}e.add(n[3]+1,0,[["exit",c,t]])}return i!==void 0&&(l.end=Object.assign({},ir(t.events,i)),e.add(i,0,[["exit",l,t]]),l=void 0),l}function qf(e,t,n,r,i){const l=[],o=ir(t.events,n);i&&(i.end=Object.assign({},o),l.push(["exit",i,t])),r.end=Object.assign({},o),l.push(["exit",r,t]),e.add(n+1,0,l)}function ir(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const bN={name:"tasklistCheck",tokenize:EN};function CN(){return{text:{91:bN}}}function EN(e,t,n){const r=this;return i;function i(a){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(a):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(a),e.exit("taskListCheckMarker"),l)}function l(a){return fe(a)?(e.enter("taskListCheckValueUnchecked"),e.consume(a),e.exit("taskListCheckValueUnchecked"),o):a===88||a===120?(e.enter("taskListCheckValueChecked"),e.consume(a),e.exit("taskListCheckValueChecked"),o):n(a)}function o(a){return a===93?(e.enter("taskListCheckMarker"),e.consume(a),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(a)}function s(a){return B(a)?t(a):Z(a)?e.check({tokenize:_N},t,n)(a):n(a)}}function _N(e,t,n){return ne(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function IN(e){return gg([JI(),aN(),gN(e),vN(),CN()])}const NN={};function TN(e){const t=this,n=e||NN,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),l=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(IN(n)),l.push(QI()),o.push(GI(n))}function zN({text:e}){return m.jsx("div",{className:"message-markdown break-words",children:m.jsx(g_,{remarkPlugins:[TN],components:{img:({alt:t})=>m.jsxs("span",{className:"text-muted",children:["[Image: ",t||"attachment","]"]}),a:({href:t,children:n})=>m.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",children:n})},children:e})})}function jN({rows:e,startedAt:t,api:n}){const r=M.useMemo(()=>Hw(e),[e]),i=e.filter(u=>u.kind==="message"&&u.eventKind==="prompt"),l=M.useRef(null),[o,s]=M.useState(null);function a(u){const d=document.getElementById(`thread-${u}`);d==null||d.scrollIntoView({block:"start"}),d==null||d.focus({preventScroll:!0}),s(u)}return m.jsxs("div",{className:"flex min-h-0 min-w-0 flex-1",children:[m.jsx("div",{ref:l,className:"min-h-0 min-w-0 flex-1 overflow-y-auto",children:m.jsxs("div",{className:"mx-auto max-w-3xl px-5 pb-16 pt-8 sm:px-8",children:[m.jsxs("div",{className:"mb-7 flex items-center justify-between gap-4 text-xs text-muted",children:[m.jsxs("span",{children:["Conversation ",m.jsx("span",{className:"px-2 text-faint",children:"/"})," ",i.length," prompts"]}),m.jsxs("button",{type:"button",className:"flex items-center gap-1.5 hover:text-foreground",onClick:()=>{l.current&&(l.current.scrollTop=l.current.scrollHeight)},children:[m.jsx(X1,{size:13,"aria-hidden":"true"})," Latest"]})]}),e.length===0?m.jsx("p",{className:"py-12 text-center text-muted",children:"No messages recorded yet."}):null,m.jsx("ol",{"data-slot":"thread-view",className:"space-y-5 text-base text-foreground",children:r.map(u=>u.kind==="message"?m.jsx("li",{id:`thread-${u.id}`,tabIndex:-1,"data-thread-kind":"message","data-event-id":u.id,className:"scroll-mt-6",children:m.jsx(ax,{row:u.row,startedAt:t})},u.id):m.jsx("li",{children:m.jsxs("details",{"data-slot":"thread-activity",className:"rounded-md border border-dashed border-border bg-background",children:[m.jsxs("summary",{className:"flex cursor-pointer items-center gap-2.5 px-4 py-3 text-xs text-muted transition-colors hover:text-foreground",children:[m.jsx(Ai,{size:14,className:"disclosure-chevron shrink-0","aria-hidden":"true"}),m.jsx(Ok,{size:14,className:"shrink-0 text-span-tool","aria-hidden":"true"}),m.jsxs("span",{className:"min-w-0 flex-1",children:[m.jsx("span",{className:"block text-xs font-medium",children:"Activity"}),m.jsx("span",{className:"mt-1 block text-2xs text-muted",children:Ww(u.rows)})]}),u.rows.some(d=>d.kind==="tool"&&d.status==="error")?m.jsx("span",{className:"shrink-0 text-error",children:"Errors"}):null,m.jsx("span",{className:"text-2xs text-faint",children:"View activity"})]}),m.jsx("ol",{className:"border-t border-border px-4",children:u.rows.map(d=>m.jsx("li",{"data-thread-kind":d.kind,"data-event-id":d.event.id,className:"border-b border-border py-3 last:border-b-0",children:m.jsx(PN,{row:d,startedAt:t,api:n})},d.event.id))})]})},u.id))})]})}),i.length>1?m.jsxs("nav",{"aria-label":"Conversation outline",className:"hidden w-60 shrink-0 overflow-y-auto border-l border-border px-4 py-8 lg:block",children:[m.jsxs("p",{className:"mb-5 flex items-center gap-2 text-xs font-medium text-muted",children:[m.jsx(Ek,{size:14,"aria-hidden":"true"})," In this session"]}),m.jsx("ol",{className:"space-y-1",children:i.map((u,d)=>m.jsx("li",{children:m.jsxs("button",{type:"button",onClick:()=>a(u.event.id),"aria-current":o===u.event.id?"location":void 0,className:he("flex w-full items-start gap-3 rounded-md px-2 py-3 text-left text-xs transition-colors hover:bg-surface-raised hover:text-foreground",o===u.event.id?"bg-span-turn/10 text-foreground":"text-muted"),children:[m.jsx("span",{className:"font-mono text-2xs text-span-turn",children:String(d+1).padStart(2,"0")}),m.jsx("span",{className:"line-clamp-3 break-words",children:u.kind==="message"?u.text||"Empty prompt":""})]})},u.event.id))}),m.jsx("p",{className:"mt-6 border-t border-border pt-4 text-2xs leading-relaxed text-muted",children:"Tool calls and reasoning are tucked into activity groups. Open any group to inspect the details."})]}):null]})}function ri({ts:e,startedAt:t}){return m.jsx("time",{dateTime:e,className:"shrink-0 font-mono text-2xs text-muted",children:Qv(e,t)})}function ax({row:e,startedAt:t}){const n=e.eventKind==="prompt",r=e.eventKind==="error",i=e.eventKind==="text",l=n?"You":e.eventKind==="text"?"Claude":e.eventKind==="error"?"Session error":"Context compacted",o=n?Vk:Lu;return m.jsxs("article",{className:he("rounded-md border px-5 py-4",n?"border-span-turn/30 bg-span-turn/10":i?"border-accent/30 bg-accent-muted":"border-border bg-surface",r&&"border-error"),children:[m.jsxs("div",{className:"mb-3 flex items-center gap-2.5",children:[m.jsx("span",{className:he("flex size-7 items-center justify-center rounded-md",n?"bg-span-turn/15 text-span-turn":"bg-accent-muted text-accent"),children:m.jsx(o,{size:15,"aria-hidden":"true"})}),m.jsx("span",{className:he("flex-1 text-sm font-semibold",n?"text-span-turn":i?"text-accent":"text-foreground"),children:l}),n||i?m.jsx("span",{className:"text-2xs text-muted",children:n?"Prompt":"Message"}):null,m.jsx(ri,{ts:e.event.ts,startedAt:t})]}),e.text===null?m.jsx("p",{className:"text-sm text-muted",children:"No message text recorded."}):m.jsx("div",{"data-slot":"thread-message",className:"text-base leading-relaxed",children:n?m.jsx("p",{className:"whitespace-pre-wrap break-words",children:e.text}):m.jsx(zN,{text:e.text})})]})}function PN({row:e,startedAt:t,api:n}){if(e.kind==="message")return m.jsx(ax,{row:e,startedAt:t});if(e.kind==="unknown")return m.jsxs("div",{children:[m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx("span",{"data-slot":"thread-unknown",className:"min-w-0 flex-1 break-words text-xs text-muted",children:e.label}),m.jsx(ri,{ts:e.event.ts,startedAt:t})]}),m.jsxs("details",{"data-slot":"thread-raw",className:"mt-2 text-xs text-muted",children:[m.jsx("summary",{className:"cursor-pointer",children:"Raw record"}),m.jsx("pre",{className:"mt-2 whitespace-pre-wrap break-words font-mono text-2xs",children:e.record})]})]});if(e.kind==="thinking")return e.recorded?m.jsxs("details",{"data-slot":"thread-reasoning",className:"text-xs text-muted",children:[m.jsxs("summary",{className:"flex cursor-pointer items-center gap-2",children:[m.jsx(Ai,{size:13,className:"disclosure-chevron","aria-hidden":"true"}),m.jsx("span",{className:"flex-1",children:"Reasoning"}),m.jsx(ri,{ts:e.event.ts,startedAt:t})]}),m.jsx("p",{"data-slot":"thread-thinking",className:"mt-3 whitespace-pre-wrap break-words text-sm text-foreground",children:e.event.text}),m.jsx(js,{event:e.event,field:"text",api:n})]}):m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("p",{"data-slot":"thread-thinking",className:"flex-1 text-xs text-span-thinking",children:e.text}),m.jsx(ri,{ts:e.event.ts,startedAt:t})]});const r=je.status[e.status];return m.jsxs("div",{children:[m.jsxs("details",{"data-slot":"thread-tool-detail",className:"text-sm",children:[m.jsxs("summary",{className:"flex cursor-pointer flex-wrap items-center gap-2 text-muted hover:text-foreground",children:[m.jsx(Ai,{size:13,className:"disclosure-chevron shrink-0","aria-hidden":"true"}),m.jsx("span",{"data-slot":"thread-tool",className:"min-w-0 flex-1 break-words font-mono text-foreground",children:e.name}),e.event.child_session_id?m.jsx("span",{className:"text-2xs text-span-subagent",children:e.event.agent_type||"Subagent"}):null,m.jsx("span",{className:he("text-2xs",r.tint),children:r.label}),m.jsx(ri,{ts:e.event.ts,startedAt:t}),m.jsx(Uu,{values:$m(e.event),showErrors:!1}),e.input?m.jsx("span",{className:"w-full truncate pl-5 font-mono text-2xs text-muted",title:e.input,children:e.input}):null]}),m.jsx(Kf,{slot:"thread-input",title:"Input",body:e.input}),m.jsx(js,{event:e.event,field:"input",api:n}),m.jsx(Kf,{slot:"thread-output",title:"Output",body:e.output}),m.jsx(js,{event:e.event,field:"text",api:n})]}),e.event.child_session_id?m.jsxs("a",{href:Bn({name:"session",sessionId:e.event.child_session_id}),className:"mt-3 inline-flex items-center gap-1.5 rounded-md bg-accent-muted px-3 py-2 text-xs text-accent hover:text-accent-hover",children:[m.jsx(Lu,{size:14,"aria-hidden":"true"})," Open subagent thread"," ",m.jsx(Z1,{size:13,"aria-hidden":"true"})]}):null]})}function Kf({slot:e,title:t,body:n}){return n===null?null:m.jsxs("div",{"data-slot":e,className:"mt-3",children:[m.jsx("span",{className:"text-2xs font-medium uppercase tracking-widest text-muted",children:t}),m.jsx("pre",{className:"mt-2 max-h-80 overflow-auto whitespace-pre-wrap break-words rounded-md border border-border bg-background p-3 font-mono text-xs text-muted",children:n})]})}function js({event:e,field:t,api:n}){const[r,i]=M.useState(null),[l,o]=M.useState(!1),[s,a]=M.useState(!1),u=Jm(e,t,r),d=t==="input"?e.input:e.text,c=((d==null?void 0:d.length)??0)>480;return!u.canRefetch&&!c&&u.note===null||u.kind==="empty"?null:m.jsxs("div",{className:"mt-2 text-xs text-muted",children:[u.note?m.jsx("p",{children:u.note}):null,u.canRefetch&&n?m.jsx("button",{type:"button",disabled:l,className:"mt-2 text-accent disabled:opacity-50",onClick:()=>{o(!0),a(!1),n.getEventContent(e.id,t).then(i).catch(()=>a(!0)).finally(()=>o(!1))},children:l?"Loading…":s?"Retry loading full content":`Load full ${t==="input"?"input":"output"}`}):null,s?m.jsx("p",{role:"alert",className:"mt-1 text-error",children:"Could not load content. Try again."}):null,(c||r!==null)&&u.body!==null?m.jsxs("details",{className:"mt-2",children:[m.jsx("summary",{className:"cursor-pointer text-accent",children:u.truncated?"Stored preview":"Full content"}),m.jsx("pre",{className:"mt-2 max-h-96 overflow-auto whitespace-pre-wrap break-words rounded-md bg-background p-3 font-mono text-xs",children:u.body})]}):null]})}function AN(e){const t=_0(e);return t.length===0?null:m.jsxs("div",{"data-slot":"truncation-notice",role:"status",className:"flex items-center gap-2 border-b border-border bg-surface px-3 py-1.5 text-2xs text-warning",children:[m.jsx(dm,{size:12,"aria-hidden":"true",className:"shrink-0"}),m.jsx("span",{className:"min-w-0",children:t.join(" ")})]})}const LN=new Set(["j","k","ArrowDown","ArrowUp","ArrowLeft","ArrowRight","Home","End","Enter","Escape"]);function MN({sessionId:e,api:t,bus:n,revealSeq:r}){const i=M.useMemo(()=>t??Fu(),[t]),[l]=M.useState(()=>Date.now()),[o,s]=M.useState(0),a=$u(e,H=>Ld(i,e,{signal:H}),o),u=a.kind==="ok"?a.value:null,[d,c]=M.useState(null),f=Um(d,e,u),[p,x]=M.useState(()=>Bd()),v=M.useCallback(H=>{x(Se=>Rw(Se,H))},[]),[E,h]=M.useReducer(w0,Vm),[g,k]=M.useReducer(V0,Hm),[C,N]=M.useState(null);z0(f,C)&&f!==null&&(N(f.session.id),x(Bd(N0(f.turns))),h({type:"reset"}),k({type:"reset"}));const b=M.useMemo(()=>Fm((f==null?void 0:f.turns)??[],(f==null?void 0:f.eventsByTurn)??new Map),[f]),I=M.useMemo(()=>C0(E),[E]),_=(f==null?void 0:f.session.id)??e,z=M.useMemo(()=>m0(b,p.expandedIds,void 0,{rootSessionId:_,subtrees:I}),[b,p.expandedIds,_,I]),S=T0(f,r),j=S===null?null:`${_}|${String(r)}`,[O,U]=M.useState(null),[G,W]=M.useState(null);S!==null&&j!==O&&(U(j),x(H=>Hd(H,[S.turnId])),W(S));const{latch:X,revealIndex:re,selectedId:L,focusedIndex:V}=Nw(G,z);M.useEffect(()=>{X!==G&&(W(X),!(L===void 0||V===void 0)&&x(H=>({...H,focusedIndex:V,selectedId:L})))},[X,G,L,V]);const[y,J]=M.useState(r===void 0?"thread":"tree"),ie=M.useMemo(()=>Dw((f==null?void 0:f.events)??[]),[f]);M.useEffect(()=>{v(j0(b,z,E))},[v,b,z,E]);const w=M.useRef({data:null,base:null});w.current={data:f,base:u},M.useEffect(()=>{if(n!==void 0)return n.subscribe(H=>{if(H.event!=="session_changed")return;const{data:Se,base:Le}=w.current,wt=M0(Se,H.data);if(wt.kind!=="ignore"){if(wt.kind==="refetch"){s(Tn=>Tn+1);return}Se===null||Le===null||i.getSession(e,{from_seq:wt.from_seq,limit:_a}).then(Tn=>{const Or=L0(Se,H.data,Tn);c({key:e,base:Le,data:Or}),k({type:"appended",count:Or.events.length-Se.events.length})}).catch(()=>{})}})},[n,i,e]);const pe=M.useRef(null);M.useEffect(()=>{const H=new AbortController;return pe.current=H,()=>H.abort()},[e]);const oe=S0(z,p.expandedIds,E).join(",");M.useEffect(()=>{var Se;if(oe==="")return;const H=(Se=pe.current)==null?void 0:Se.signal;for(const Le of oe.split(","))h({type:"requested",childId:Le}),Ld(i,Le,{limit:_a,...H===void 0?{}:{signal:H}}).then(wt=>{h({type:"loaded",childId:Le,child:wt}),x(Tn=>Hd(Tn,E0(wt)))}).catch(()=>{(H==null?void 0:H.aborted)!==!0&&h({type:"failed",childId:Le})})},[oe,i]);const K=M.useCallback(H=>{H.metaKey||H.ctrlKey||H.altKey||LN.has(H.key)&&(H.preventDefault(),v({type:"key",key:H.key,rows:z}))},[v,z]),Ae=M.useCallback(H=>{k({type:"selected"}),x(Se=>{const Le=z.findIndex(wt=>wt.id===H);return Le===-1?Se:{...Se,focusedIndex:Le,selectedId:H}})},[z]),nt=M.useCallback(H=>{k({type:"scrolled",atBottom:$0(H)})},[]),[ue,kt]=M.useState(null),vt=M.useCallback((H,Se)=>{i.getEventContent(H,Se).then(kt).catch(()=>{})},[i]),tn=M.useMemo(()=>{const H=z.find(Se=>Se.id===p.selectedId);return H===void 0||H.kind!=="event"?null:H.node.event},[z,p.selectedId]),Nn=M.useCallback(H=>{k({type:"selected"}),x(Se=>{const Le=new Set(Se.expandedIds);return Le.delete(H)||Le.add(H),{...Se,expandedIds:Le}})},[]);return a.kind==="error"?m.jsx("main",{className:"p-6",children:m.jsx("p",{className:"text-sm text-error",children:a.error.message})}):m.jsxs("main",{"data-slot":"session-view",className:"flex h-full min-h-0 flex-col",children:[f===null?null:m.jsx(dS,{session:f.session,parentSessionId:f.session.parent_session_id,now:l,view:y,onViewChange:H=>{k({type:"selected"}),J(H)}}),f===null?null:m.jsx(AN,{shown:f.shown,hasMore:f.hasMore,unmatchedEventCount:b.unmatchedEventCount}),f===null?null:m.jsx(Kw,{sessionId:e,hasDrift:f.session.has_drift,harnessVersion:f.session.harness_version}),m.jsx("div",{className:"flex min-h-0 flex-1",children:y==="thread"&&f!==null?m.jsx(jN,{rows:ie,startedAt:f.session.started_at,api:i},e):m.jsxs(m.Fragment,{children:[m.jsxs("div",{"data-slot":"tree-pane",className:"relative min-w-0 flex-1 border-r border-border",children:[m.jsx(RS,{rows:z,selectedId:p.selectedId,focusedIndex:p.focusedIndex,followIndex:g.following&&z.length>0?z.length-1:void 0,revealIndex:re,onScrollMetrics:nt,onKeyDown:K,onSelect:Ae,onToggle:Nn}),m.jsx("div",{className:"pointer-events-none absolute inset-x-0 bottom-3 flex justify-center",children:m.jsx("div",{className:"pointer-events-auto",children:m.jsx(uS,{label:B0(g),onResume:()=>k({type:"resumed"})})})})]}),m.jsx(iS,{event:tn,fetched:ue,onShowFull:vt})]})})]})}const RN={never_captured:Sk,outside_range:yk,no_match_for_project:Pk};function ON({state:e}){const{sentence:t,hint:n}=s0(e),r=RN[e.kind];return m.jsxs("div",{"data-slot":"empty-state","data-empty-kind":e.kind,className:"flex flex-col items-center gap-2 px-8 py-16 text-center",children:[m.jsx(r,{size:24,"aria-hidden":"true",className:"text-faint"}),m.jsx("p",{className:"text-sm text-foreground",children:t}),m.jsx("p",{className:"text-xs text-muted",children:n})]})}const Ps="";function DN({range:e,onRangeChange:t,projects:n,project:r,onProjectChange:i}){return m.jsxs("div",{"data-slot":"range-control",className:"flex flex-wrap items-center justify-between gap-4",children:[m.jsxs("div",{role:"group","aria-label":"Time range",title:"Show sessions last active within this period",className:"inline-flex items-center gap-0.5 rounded-md bg-surface p-0.5",children:[m.jsx("span",{className:"px-2 text-xs text-muted",children:"Last active"}),Yv.map(l=>m.jsx("button",{type:"button","aria-pressed":l===e,title:l==="all"?"Active at any time":`Active in the last ${l.slice(0,-1)} days`,onClick:()=>{t(l)},className:he("rounded-md px-2 py-1 text-xs transition-colors",l===e?"bg-surface-raised text-foreground":"text-muted"),children:l},l))]}),m.jsxs("label",{className:"flex items-center gap-2 text-xs text-muted",children:["Project",m.jsxs("select",{value:r??Ps,onChange:l=>{const o=l.target.value;i(o===Ps?void 0:o)},className:"rounded-md border border-border bg-surface px-2 py-1 text-xs text-foreground",children:[m.jsx("option",{value:Ps,children:"All projects"}),n.map(l=>m.jsx("option",{value:l,children:l},l))]})]})]})}function FN({rows:e,sort:t,direction:n,onSortChange:r,cursor:i,now:l,pageTruncated:o=!1}){const s=Gv(e,o),{dismissed:a,dismiss:u}=Xm("cost-unknown");return m.jsxs("div",{"data-slot":"session-list",className:"overflow-hidden rounded-md border border-border",children:[s===null||a?null:m.jsxs("div",{"data-slot":"unpriced-notice",role:"status",className:"flex items-center gap-2 border-b border-border bg-surface px-3 py-1.5 text-2xs text-warning",children:[m.jsx(dm,{size:12,"aria-hidden":"true",className:"shrink-0"}),m.jsx("span",{className:"min-w-0",children:s}),m.jsx("button",{type:"button","aria-label":"Dismiss cost notice",title:"Dismiss until reload",onClick:u,className:"ml-auto flex size-6 shrink-0 items-center justify-center rounded-md text-muted hover:bg-surface-raised hover:text-foreground",children:m.jsx(hm,{size:14,"aria-hidden":"true"})})]}),m.jsxs("div",{className:"flex items-start justify-between gap-4 border-b border-border px-4 py-3",children:[m.jsxs("details",{className:"text-xs text-muted",children:[m.jsx("summary",{className:"cursor-pointer text-foreground",children:"What do these numbers mean?"}),m.jsxs("div",{className:"mt-2 max-w-2xl space-y-1 leading-relaxed",children:[m.jsx("p",{children:"Last active is the most recent event, in your local time. The day filters use this date."}),m.jsx("p",{children:"Elapsed runs from the first to the last event (or now for live sessions), including idle time."}),m.jsx("p",{children:"Turns counts your prompts. Errors, tokens, and estimated cost cover the main session. Tokens are input + output; cache counts are separate and not shown here."}),m.jsx("p",{children:"Subagents shows the number of agents and their additional input + output tokens. These tokens are separate from the main session totals. A dash means no measured cost or an unavailable estimate; unavailable estimates include an explanation."})]})]}),m.jsx("span",{"data-slot":"session-list-count",className:"shrink-0 text-2xs text-muted",children:Mm(e.length,o)})]}),m.jsx("p",{className:"px-4 py-2 text-2xs text-muted lg:hidden",children:"Scroll sideways to see all metrics."}),m.jsxs("div",{className:"overflow-x-auto",role:"region","aria-label":"Session list columns",tabIndex:0,children:[m.jsxs("div",{"data-slot":"session-list-header",className:"session-list-grid border-b border-border bg-surface px-4 py-3 text-2xs text-muted",children:[e0.map(d=>m.jsxs("button",{type:"button","aria-pressed":d===t,title:`Sort by ${zd[d].toLowerCase()}`,onClick:()=>{r(d)},className:he("text-left transition-colors",d===t?"text-foreground":"text-muted"),children:[d==="project_path"?"Session / Project":zd[d],d===t?m.jsx($N,{direction:n}):null]},d)),m.jsx("span",{children:"Status"}),m.jsx("span",{className:"text-right",children:"Turns"}),m.jsx("span",{className:"text-right",children:"Subagents"}),m.jsx("span",{className:"text-right",children:"Errors"}),m.jsx("span",{className:"text-right",children:"Elapsed"}),m.jsx("span",{className:"text-right",children:"Tokens"}),m.jsx("span",{className:"text-right",children:"Est. cost"})]}),e.map((d,c)=>m.jsx(VN,{row:d,now:l,isCursor:c===i},d.id))]})]})}function $N({direction:e}){const t=e==="asc"?fk:Eo;return m.jsx(t,{size:12,"aria-hidden":"true",className:"inline-block"})}function VN({row:e,now:t,isCursor:n}){const r=Zm[e.live?"live":"complete"],i=Om(e),l=Kv(e.last_activity_at,t),o=e.rollup_state==="own",s=Lr(e.est_cost,e.model),a=e.error_count>0;return m.jsxs("a",{href:Bn({name:"session",sessionId:e.id}),"data-slot":"session-row","aria-label":`${i}, ${e.project_path}, ${r.label}, ${e.turn_count} turns, active ${l}${o?", sub-agent totals still being summed":""}`,className:he("session-list-grid min-h-20 border-b border-border px-4 py-4 text-xs text-foreground transition-colors hover:bg-surface last:border-b-0",n&&"bg-surface-raised"),children:[m.jsxs("span",{"data-column":"session",className:"min-w-0",children:[m.jsx("span",{className:"block truncate text-sm font-medium",children:i}),m.jsx("span",{className:"mt-1.5 block truncate font-mono text-2xs text-muted",title:e.project_path,children:e.project_path})]}),m.jsx("time",{"data-column":"active",dateTime:e.last_activity_at,title:new Date(e.last_activity_at).toLocaleString(),className:"text-muted",children:l}),m.jsxs("span",{"data-column":"status",className:he("flex items-center gap-1",r.badge),children:[m.jsx("span",{"aria-hidden":"true",className:he("size-1.5 rounded-md",r.dot)}),r.label]}),m.jsx("span",{"data-column":"turns","data-slot":"session-turns",className:"text-right font-mono text-2xs text-muted",children:Wt(e.turn_count)}),m.jsxs("span",{"data-column":"subagents",className:"text-right text-2xs text-muted",children:[m.jsx("span",{className:"font-mono",children:Wt(e.agent_count)}),e.agent_count===0?null:o?m.jsx("span",{"data-slot":"session-subs-pending",className:"mt-1 block animate-pulse rounded-md bg-surface-raised motion-reduce:animate-none",children:"Counting tokens…"}):m.jsxs("span",{"data-slot":"session-subs",className:"mt-1 block font-mono",children:[Wt(e.sub_tokens_in+e.sub_tokens_out)," tok"]})]}),m.jsx("span",{"data-column":"errors","data-slot":"session-errors","aria-label":`${e.error_count} errors`,className:he("text-right font-mono text-2xs",a?"text-error":"text-muted"),children:Wt(e.error_count)}),m.jsx("span",{"data-column":"elapsed","data-slot":"metric-duration",className:"text-right font-mono text-2xs text-muted",children:Pm(e.started_at,e.live?void 0:e.last_activity_at,t)}),m.jsx("span",{"data-column":"tokens","data-slot":"metric-tokens",className:"text-right font-mono text-2xs text-muted",children:Wt(e.tokens_in+e.tokens_out)}),m.jsx("span",{"data-slot":"metric-cost",title:s,"aria-label":s,"data-column":"cost",className:he("text-right font-mono text-2xs",s===void 0?"text-muted":"text-faint"),children:Li(e.est_cost)})]})}const Fa=2;function BN({buckets:e}){const t=e.reduce((n,r)=>Math.max(n,r.count),0);return m.jsx("div",{"data-slot":"volume-histogram",role:"img","aria-label":`Session volume: ${e.reduce((n,r)=>n+r.count,0)} in range`,className:"flex h-12 items-end gap-0.5",children:e.map(n=>m.jsx("span",{"data-slot":"volume-bucket","data-count":n.count,style:{height:`${t===0?Fa:UN(n.count,t)}%`},className:"flex-1 rounded-md bg-accent-muted"},n.start))})}function UN(e,t){return e===0?Fa:Math.max(Fa,Math.round(e/t*100))}const HN=40;function WN({router:e=Gm(),api:t,bus:n}={}){const[r,i]=M.useState("3d"),[l,o]=M.useState(void 0),[s,a]=M.useState("last_activity_at"),[u,d]=M.useState("desc"),[c,f]=M.useState(-1),p=M.useMemo(()=>t??Fu(),[t]),[x]=M.useState(()=>Date.now()),v=`${r}|${l??""}`,E=$u(v,_=>Jv(p,{range:r,now:x,project:l,signal:_})),h=E.kind==="ok"?E.value:null,[g,k]=M.useState(null),C=Um(g,v,h),N=M.useRef({data:null,base:null});N.current={data:C,base:h},M.useEffect(()=>{if(n!==void 0)return n.subscribe(_=>{if(_.event!=="session_changed")return;const{data:z,base:S}=N.current;if(z===null||S===null)return;const j=D0(z,_.data.session_id,_.data.rollups,Date.now());j!==z&&k({key:v,base:S,data:j})})},[n,v]);const b=M.useMemo(()=>C===null?[]:t0(C,{project:l,sort:s,direction:u}),[C,l,s,u]);M.useEffect(()=>{const _=z=>{const S=z.target,j=(S==null?void 0:S.isContentEditable)===!0||["INPUT","TEXTAREA","SELECT"].includes((S==null?void 0:S.tagName)??""),O=a0(z.key,{index:c,rowCount:b.length,inEditable:j});if(O.kind==="ignore")return;z.preventDefault();const U=u0(O,b,e);U!==null&&f(U)};return window.addEventListener("keydown",_),()=>{window.removeEventListener("keydown",_)}},[c,b,e]);const I=C===null?null:o0(C,b,{project:l});return m.jsxs(qN,{children:[m.jsxs("div",{className:"mb-2",children:[m.jsx("p",{className:"mb-2 text-xs font-medium text-accent",children:"YOUR WORK, REVISITED"}),m.jsx("h1",{className:"text-xl font-semibold",children:"Sessions"}),m.jsx("p",{className:"mt-2 text-base text-muted",children:"Pick up the thread. Explore what you asked, what Claude answered, and how it got there."})]}),m.jsx(BN,{buckets:i0((C==null?void 0:C.sessions)??[],{range:r,now:x,bucketCount:HN})}),m.jsx(DN,{range:r,onRangeChange:i,projects:C===null?[]:n0(C.sessions),project:l,onProjectChange:o}),E.kind==="error"?m.jsx("p",{className:"text-sm text-error",children:E.error.message}):I===null?null:I.kind==="none"?m.jsx(FN,{rows:b,sort:s,direction:u,onSortChange:_=>{d(_===s&&u==="desc"?"asc":"desc"),a(_)},cursor:c,now:x,pageTruncated:(C==null?void 0:C.truncated)??!1}):m.jsx(ON,{state:I})]})}function qN({children:e}){return m.jsx("main",{className:"mx-auto flex max-w-7xl flex-col gap-4 px-5 py-8 sm:px-8",children:e})}const Ao=[{cssVar:"--color-background",specValue:"#0b0b0e",specLine:64,prosePin:"#0b0b0e",emits:"var",utilityClass:"bg-background"},{cssVar:"--color-surface",specValue:"#131318",specLine:65,prosePin:"#131318",emits:"var",utilityClass:"bg-surface"},{cssVar:"--color-surface-raised",specValue:"#1b1b22",specLine:66,prosePin:"#1b1b22",emits:"var",utilityClass:"bg-surface-raised"},{cssVar:"--color-border",specValue:"#26262e",specLine:67,prosePin:"#26262e",emits:"var",utilityClass:"bg-border"},{cssVar:"--color-foreground",specValue:"#ededf0",specLine:68,prosePin:"#ededf0",emits:"var",utilityClass:"bg-foreground"},{cssVar:"--color-muted",specValue:"#9b9ba6",specLine:69,prosePin:"#9b9ba6",emits:"var",utilityClass:"bg-muted"},{cssVar:"--color-faint",specValue:"#5c5c66",specLine:70,prosePin:"#5c5c66",emits:"var",utilityClass:"bg-faint"},{cssVar:"--color-accent",specValue:"#7c8cf8",specLine:73,prosePin:"#7c8cf8",emits:"var",utilityClass:"bg-accent"},{cssVar:"--color-accent-hover",specValue:"#97a3fa",specLine:74,prosePin:"#97a3fa",emits:"var",utilityClass:"bg-accent-hover"},{cssVar:"--color-accent-muted",specValue:"#7c8cf826",specLine:75,prosePin:"#7c8cf826",emits:"var",utilityClass:"bg-accent-muted"},{cssVar:"--color-span-turn",specValue:"#2dd4bf",specLine:78,prosePin:"#2dd4bf",emits:"var",utilityClass:"bg-span-turn"},{cssVar:"--color-span-llm",specValue:"#c084fc",specLine:79,prosePin:"#c084fc",emits:"var",utilityClass:"bg-span-llm"},{cssVar:"--color-span-tool",specValue:"#60a5fa",specLine:80,prosePin:"#60a5fa",emits:"var",utilityClass:"bg-span-tool"},{cssVar:"--color-span-subagent",specValue:"#818cf8",specLine:81,prosePin:"#818cf8",emits:"var",utilityClass:"bg-span-subagent"},{cssVar:"--color-span-thinking",specValue:"#9b9ba6",specLine:82,prosePin:"#9b9ba6",emits:"var",utilityClass:"bg-span-thinking"},{cssVar:"--color-span-generic",specValue:"#a3e635",specLine:83,prosePin:"#a3e635",emits:"var",utilityClass:"bg-span-generic"},{cssVar:"--color-success",specValue:"#4ade80",specLine:86,prosePin:"#4ade80",emits:"var",utilityClass:"bg-success"},{cssVar:"--color-warning",specValue:"#fbbf24",specLine:87,prosePin:"#fbbf24",emits:"var",utilityClass:"bg-warning"},{cssVar:"--color-error",specValue:"#f87171",specLine:88,prosePin:"#f87171",emits:"var",utilityClass:"bg-error"},{cssVar:"--color-running",specValue:"#7c8cf8",specLine:89,prosePin:"#7c8cf8",emits:"var",utilityClass:"bg-running"},{cssVar:"--text-2xs",specValue:"11px",specLine:101,prosePin:"11 (dense chips/timestamps)",emits:"var",utilityClass:"text-2xs"},{cssVar:"--text-xs",specValue:"12px",specLine:101,prosePin:"12 (tree metadata, table cells)",emits:"var",utilityClass:"text-xs"},{cssVar:"--text-sm",specValue:"13px",specLine:101,prosePin:"13 (UI base)",emits:"var",utilityClass:"text-sm"},{cssVar:"--text-base",specValue:"14px",specLine:101,prosePin:"14 (reading)",emits:"var",utilityClass:"text-base"},{cssVar:"--text-lg",specValue:"16px",specLine:101,prosePin:"16 (pane titles)",emits:"var",utilityClass:"text-lg"},{cssVar:"--text-xl",specValue:"20px",specLine:101,prosePin:"20 (page titles)",emits:"var",utilityClass:"text-xl"},{cssVar:"--text-2xs--line-height",specValue:"1.3",specLine:107,prosePin:"1.3",emits:"var-fallback",utilityClass:"text-2xs"},{cssVar:"--text-xs--line-height",specValue:"1.3",specLine:108,prosePin:"1.3",emits:"var-fallback",utilityClass:"text-xs"},{cssVar:"--text-sm--line-height",specValue:"1.3",specLine:109,prosePin:"1.3",emits:"var-fallback",utilityClass:"text-sm"},{cssVar:"--text-base--line-height",specValue:"1.45",specLine:110,prosePin:"1.45",emits:"var-fallback",utilityClass:"text-base"},{cssVar:"--text-lg--line-height",specValue:"1.45",specLine:111,prosePin:"1.45",emits:"var-fallback",utilityClass:"text-lg"},{cssVar:"--text-xl--line-height",specValue:"1.3",specLine:112,prosePin:"1.3",emits:"var-fallback",utilityClass:"text-xl"},{cssVar:"--radius-md",specValue:"6px",specLine:120,prosePin:"6px",emits:"var",utilityClass:"rounded-md"},{cssVar:"--radius-lg",specValue:"8px",specLine:120,prosePin:"8px",emits:"var",utilityClass:"rounded-lg"},{cssVar:"--shadow-float",specValue:"0 8px 24px rgb(0 0 0 / 0.5)",specLine:124,prosePin:"0 8px 24px rgb(0 0 0 / 0.5)",emits:"inline",utilityClass:"shadow-float"},{cssVar:"--font-sans",specValue:"'Inter', ui-sans-serif, system-ui, sans-serif",specLine:96,prosePin:"Inter",emits:"var",utilityClass:"font-sans"},{cssVar:"--font-mono",specValue:"'JetBrains Mono', ui-monospace, 'SF Mono', monospace",specLine:97,prosePin:"JetBrains Mono",emits:"var",utilityClass:"font-mono"},{cssVar:"--default-transition-duration",specValue:"150ms",specLine:128,prosePin:"150ms",emits:"var-fallback",utilityClass:"transition-colors"},{cssVar:"--default-transition-timing-function",specValue:"cubic-bezier(0.4, 0, 0.2, 1)",specLine:128,prosePin:"cubic-bezier(0.4, 0, 0.2, 1)",emits:"var-fallback",utilityClass:"transition-colors"},{cssVar:"--animate-live-pulse",specValue:"live-pulse 1.5s ease-in-out infinite",specLine:129,prosePin:"1.5s ease-in-out",emits:"var",utilityClass:"animate-live-pulse"},{cssVar:"--animate-row-arrive",specValue:"row-arrive 300ms ease-out 1",specLine:129,prosePin:"300ms",emits:"var",utilityClass:"animate-row-arrive"}],KN=e=>e.cssVar.endsWith("--line-height"),QN=Ao.filter(e=>e.cssVar.startsWith("--color-")),GN=Ao.filter(e=>e.cssVar.startsWith("--text-")&&!KN(e)),YN=e=>{var t;return((t=Ao.find(n=>n.cssVar===`${e}--line-height`))==null?void 0:t.specValue)??""},XN=Ao.filter(e=>e.cssVar.startsWith("--radius-"));function on({title:e,note:t,children:n}){return m.jsxs("section",{className:"border-b border-border py-8",children:[m.jsx("h2",{className:"text-lg font-semibold text-foreground",children:e}),m.jsx("p",{className:"mt-1 text-xs text-faint",children:t}),m.jsx("div",{className:"mt-4",children:n})]})}function Qf({token:e}){return m.jsxs("div",{className:"mt-2",children:[m.jsx("div",{className:"font-mono text-2xs text-muted",children:e.cssVar}),m.jsx("div",{className:"font-mono text-2xs text-faint",children:e.specValue}),e.utilityClass!==null&&m.jsxs("div",{className:"font-mono text-2xs text-accent",children:[".",e.utilityClass]})]})}function JN(){return m.jsxs("main",{className:"mx-auto max-w-5xl px-8 py-12",children:[m.jsxs("header",{children:[m.jsx("h1",{className:"text-xl font-semibold text-foreground",children:"agent-lens design tokens"}),m.jsxs("p",{className:"mt-2 text-sm text-muted",children:["Every token in ",m.jsx("span",{className:"font-mono text-2xs",children:"spec/design-system.md"}),", rendered through the utility class that emits it. This page is the reference — copy class names from here, and if a colour or size you want is missing, it is missing on purpose."]})]}),m.jsx(on,{title:"Color",note:"Neutrals carry the layout, span-type colors carry meaning, the accent only marks interactivity. Tailwind's default palette is cleared — bg-red-500 does not exist.",children:m.jsx("div",{className:"grid grid-cols-2 gap-4 sm:grid-cols-3 lg:grid-cols-4",children:QN.map(e=>m.jsxs("div",{children:[m.jsx("div",{className:`h-16 rounded-md border border-border ${e.utilityClass??""}`,"aria-hidden":"true"}),m.jsx(Qf,{token:e})]},e.cssVar))})}),m.jsx(on,{title:"Type scale",note:"Six steps, 11px to 20px, each with its own line-height. Nothing larger exists — text-3xl does not compile.",children:m.jsx("div",{className:"space-y-5",children:GN.map(e=>m.jsxs("div",{className:"flex items-baseline gap-6",children:[m.jsxs("span",{className:"w-28 shrink-0 font-mono text-2xs text-faint",children:[e.specValue," / ",YN(e.cssVar)]}),m.jsxs("div",{children:[m.jsx("p",{className:e.utilityClass??"",children:"Inspect everything your agent did in a session."}),m.jsxs("div",{className:"font-mono text-2xs text-accent",children:[".",e.utilityClass]})]})]},e.cssVar))})}),m.jsx(on,{title:"Font families",note:"Both self-hosted and bundled. Mono is ~40% of rendered text in this product — a first-class citizen, not an accent.",children:m.jsxs("div",{className:"space-y-5",children:[m.jsxs("div",{children:[m.jsx("p",{className:"font-sans text-base text-foreground",children:"Inter — the quick brown fox jumps over the lazy dog 0123456789"}),m.jsx("div",{className:"font-mono text-2xs text-accent",children:".font-sans"})]}),m.jsxs("div",{children:[m.jsx("p",{className:"font-mono text-base text-foreground",children:"JetBrains Mono — 1.02s · 185 tok · <$0.001 · sess_01J8XZ"}),m.jsx("div",{className:"font-mono text-2xs text-accent",children:".font-mono"})]})]})}),m.jsx(on,{title:"Radius",note:"rounded-md everywhere; rounded-lg for floating surfaces only.",children:m.jsx("div",{className:"flex gap-8",children:XN.map(e=>m.jsxs("div",{children:[m.jsx("div",{className:`h-20 w-20 bg-surface-raised border border-border ${e.utilityClass??""}`,"aria-hidden":"true"}),m.jsx(Qf,{token:e})]},e.cssVar))})}),m.jsxs(on,{title:"Shadow",note:"One level, floating surfaces only. In-flow surfaces separate with borders, never shadows.",children:[m.jsxs("div",{className:"w-72 rounded-lg bg-surface-raised p-4 shadow-float",children:[m.jsx("p",{className:"text-sm text-foreground",children:"Floating surface"}),m.jsx("p",{className:"mt-1 text-xs text-muted",children:"Modals, popovers, context menus."})]}),m.jsx("div",{className:"font-mono text-2xs text-accent mt-2",children:".shadow-float"})]}),m.jsx(on,{title:"Motion",note:"150ms default. The running pulse loops; row arrival washes once. Both stop under prefers-reduced-motion.",children:m.jsxs("div",{className:"flex flex-wrap items-center gap-8",children:[m.jsxs("div",{children:[m.jsxs("span",{className:"inline-flex items-center gap-2 rounded-md bg-surface-raised px-2 py-1",children:[m.jsx("span",{className:"h-2 w-2 rounded-full bg-running animate-live-pulse","aria-hidden":"true"}),m.jsx("span",{className:"font-mono text-2xs text-muted",children:"live"})]}),m.jsx("div",{className:"font-mono text-2xs text-accent mt-2",children:".animate-live-pulse"})]}),m.jsxs("div",{children:[m.jsx("div",{className:"rounded-md px-3 py-1.5 animate-row-arrive",children:m.jsx("span",{className:"font-mono text-2xs text-muted",children:"new row arrived"})}),m.jsx("div",{className:"font-mono text-2xs text-accent mt-2",children:".animate-row-arrive"})]}),m.jsxs("div",{children:[m.jsx("button",{type:"button",className:"rounded-md border border-border bg-surface px-3 py-1.5 text-sm text-foreground transition-colors hover:bg-surface-raised",children:"Hover me"}),m.jsx("div",{className:"font-mono text-2xs text-accent mt-2",children:".transition-colors"})]})]})}),m.jsx(on,{title:"Span-type vocabulary",note:"How the span palette reads in situ — the atom every tree row and thread card is built from.",children:m.jsx("div",{className:"rounded-md border border-border bg-surface",children:[{label:"turn",dot:"bg-span-turn",name:"user turn"},{label:"llm",dot:"bg-span-llm",name:"claude-opus-4 completion"},{label:"tool",dot:"bg-span-tool",name:"Read(src/server/app.ts)"},{label:"subagent",dot:"bg-span-subagent",name:"Explore subagent"},{label:"thinking",dot:"bg-span-thinking",name:"thinking"},{label:"generic",dot:"bg-span-generic",name:"foreign span"}].map(e=>m.jsxs("div",{className:"flex items-center gap-3 border-b border-border px-3 py-1.5 last:border-b-0",children:[m.jsx("span",{className:`h-2 w-2 rounded-full ${e.dot}`,"aria-hidden":"true"}),m.jsx("span",{className:"text-xs text-foreground",children:e.name}),m.jsx("span",{className:"ml-auto font-mono text-2xs text-muted",children:"1.02s · 185 tok · $0.004"})]},e.label))})}),m.jsx(on,{title:"Status",note:"Status is never conveyed by color alone — every one of these pairs with an icon or a word in the real UI.",children:m.jsx("div",{className:"flex flex-wrap gap-3",children:[{cls:"text-success",label:"complete"},{cls:"text-warning",label:"degraded"},{cls:"text-error",label:"failed"},{cls:"text-running",label:"running"}].map(e=>m.jsx("span",{className:`rounded-md bg-surface-raised px-2 py-1 font-mono text-2xs ${e.cls}`,children:e.label},e.label))})})]})}function ZN({router:e,api:t}={}){const n=kw(e),r=M.useMemo(()=>U0(),[]);return hw(r),m.jsx(Ov,{children:n.name==="showcase"?m.jsx(JN,{}):n.name==="search"?m.jsx(jw,{...n.sessionId===void 0?{}:{sessionId:n.sessionId},...t===void 0?{}:{api:t}}):n.name==="session"||n.name==="trace"||n.name==="event"?m.jsx(MN,{sessionId:n.sessionId,bus:r,...n.name==="event"?{revealSeq:n.seq}:{},...t===void 0?{}:{api:t}},`${n.sessionId}:${n.name==="event"?n.seq:"session"}`):m.jsx(WN,{bus:r,...e===void 0?{}:{router:e},...t===void 0?{}:{api:t}})})}const ux=document.getElementById("root");if(!ux)throw new Error("Root element #root not found");um(ux).render(m.jsx(M.StrictMode,{children:m.jsx(ZN,{})}));