@open-code-review/cli 2.2.0 → 2.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/dist/dashboard/client/assets/{_basePickBy-BBPb8BJA.js → _basePickBy-BAlGnwHG.js} +1 -1
  2. package/dist/dashboard/client/assets/{_baseUniq-CFHdos6T.js → _baseUniq-CoauyOeL.js} +1 -1
  3. package/dist/dashboard/client/assets/{arc-BKGGWA2F.js → arc-DtS0aHfP.js} +1 -1
  4. package/dist/dashboard/client/assets/{architectureDiagram-VXUJARFQ-B_ovNjX1.js → architectureDiagram-VXUJARFQ-CnWmtRTh.js} +1 -1
  5. package/dist/dashboard/client/assets/{blockDiagram-VD42YOAC-C2M-avVp.js → blockDiagram-VD42YOAC-DgPp4oGV.js} +1 -1
  6. package/dist/dashboard/client/assets/{c4Diagram-YG6GDRKO-BtOBpAzH.js → c4Diagram-YG6GDRKO--LV4qQaE.js} +1 -1
  7. package/dist/dashboard/client/assets/channel-BU2129fl.js +1 -0
  8. package/dist/dashboard/client/assets/{chunk-4BX2VUAB-Cz2EbHPl.js → chunk-4BX2VUAB-BRglpc7Z.js} +1 -1
  9. package/dist/dashboard/client/assets/{chunk-55IACEB6-C8xpXw9G.js → chunk-55IACEB6-Bgx06_CV.js} +1 -1
  10. package/dist/dashboard/client/assets/{chunk-B4BG7PRW-BSRfOovX.js → chunk-B4BG7PRW-D6HN3Yiy.js} +1 -1
  11. package/dist/dashboard/client/assets/{chunk-DI55MBZ5-CEUbYQWn.js → chunk-DI55MBZ5-NH9EgN9T.js} +1 -1
  12. package/dist/dashboard/client/assets/{chunk-FMBD7UC4-5xWP6GRj.js → chunk-FMBD7UC4-xriO6WNP.js} +1 -1
  13. package/dist/dashboard/client/assets/{chunk-QN33PNHL-DfNCVcy8.js → chunk-QN33PNHL-CV1h6_Zl.js} +1 -1
  14. package/dist/dashboard/client/assets/{chunk-QZHKN3VN--OdToKKu.js → chunk-QZHKN3VN-CV4VzxNq.js} +1 -1
  15. package/dist/dashboard/client/assets/{chunk-TZMSLE5B-B_0K0Qso.js → chunk-TZMSLE5B-isdklocW.js} +1 -1
  16. package/dist/dashboard/client/assets/classDiagram-2ON5EDUG-CVftFGiR.js +1 -0
  17. package/dist/dashboard/client/assets/classDiagram-v2-WZHVMYZB-CVftFGiR.js +1 -0
  18. package/dist/dashboard/client/assets/clone-DC6LEEC5.js +1 -0
  19. package/dist/dashboard/client/assets/{cose-bilkent-S5V4N54A-Cc_Dmnxz.js → cose-bilkent-S5V4N54A-CCzlFSJf.js} +1 -1
  20. package/dist/dashboard/client/assets/{dagre-6UL2VRFP-DaAfvUXU.js → dagre-6UL2VRFP-DVN3PkjZ.js} +1 -1
  21. package/dist/dashboard/client/assets/{diagram-PSM6KHXK-7idwN0rC.js → diagram-PSM6KHXK-SzJVoSsb.js} +1 -1
  22. package/dist/dashboard/client/assets/{diagram-QEK2KX5R-D9j9H13n.js → diagram-QEK2KX5R-CgGn7ts-.js} +1 -1
  23. package/dist/dashboard/client/assets/{diagram-S2PKOQOG-SMF5SB0K.js → diagram-S2PKOQOG-Bz1ukSx8.js} +1 -1
  24. package/dist/dashboard/client/assets/{erDiagram-Q2GNP2WA-EVJ4Qa2F.js → erDiagram-Q2GNP2WA-CpstUTMZ.js} +1 -1
  25. package/dist/dashboard/client/assets/{flowDiagram-NV44I4VS-tZ7SFE77.js → flowDiagram-NV44I4VS-aYVydGhp.js} +1 -1
  26. package/dist/dashboard/client/assets/{ganttDiagram-JELNMOA3-DFSqguY7.js → ganttDiagram-JELNMOA3-Cb2DUSRk.js} +1 -1
  27. package/dist/dashboard/client/assets/{gitGraphDiagram-V2S2FVAM-CqHdP3HE.js → gitGraphDiagram-V2S2FVAM-BUOnwA2w.js} +1 -1
  28. package/dist/dashboard/client/assets/{graph-C0XnkNkk.js → graph-4X5ddhLp.js} +1 -1
  29. package/dist/dashboard/client/assets/index-CKWqYAfu.js +581 -0
  30. package/dist/dashboard/client/assets/{infoDiagram-HS3SLOUP-DlXZo9U2.js → infoDiagram-HS3SLOUP-BlMqcrwm.js} +1 -1
  31. package/dist/dashboard/client/assets/{journeyDiagram-XKPGCS4Q-CgC8_7eN.js → journeyDiagram-XKPGCS4Q-DF2ew7ju.js} +1 -1
  32. package/dist/dashboard/client/assets/{kanban-definition-3W4ZIXB7-BMAw_jNp.js → kanban-definition-3W4ZIXB7-BKQMx0-n.js} +1 -1
  33. package/dist/dashboard/client/assets/{layout-XjM3Q-ka.js → layout-DNcn2g9w.js} +1 -1
  34. package/dist/dashboard/client/assets/{linear-CMUrrr1X.js → linear-Bqy9gvqb.js} +1 -1
  35. package/dist/dashboard/client/assets/{mermaid-renderer-D2jYNs7K.js → mermaid-renderer-dJ71wgld.js} +4 -4
  36. package/dist/dashboard/client/assets/{mindmap-definition-VGOIOE7T-CL4hv-vg.js → mindmap-definition-VGOIOE7T-BARc8sqJ.js} +1 -1
  37. package/dist/dashboard/client/assets/{pieDiagram-ADFJNKIX-DTqv-1h1.js → pieDiagram-ADFJNKIX-CULlNZTd.js} +1 -1
  38. package/dist/dashboard/client/assets/{quadrantDiagram-AYHSOK5B-BpFlSW9N.js → quadrantDiagram-AYHSOK5B-BJEZPVe9.js} +1 -1
  39. package/dist/dashboard/client/assets/{requirementDiagram-UZGBJVZJ-BqYqqXL4.js → requirementDiagram-UZGBJVZJ-BhMsmUIs.js} +1 -1
  40. package/dist/dashboard/client/assets/{sankeyDiagram-TZEHDZUN-kEI9kntR.js → sankeyDiagram-TZEHDZUN-BYbNgogG.js} +1 -1
  41. package/dist/dashboard/client/assets/{sequenceDiagram-WL72ISMW-Cnu_1j-N.js → sequenceDiagram-WL72ISMW-MoM_NwWk.js} +1 -1
  42. package/dist/dashboard/client/assets/{stateDiagram-FKZM4ZOC-BoC-rqoG.js → stateDiagram-FKZM4ZOC-ditrlbM3.js} +1 -1
  43. package/dist/dashboard/client/assets/stateDiagram-v2-4FDKWEC3-SqoG2LCn.js +1 -0
  44. package/dist/dashboard/client/assets/{timeline-definition-IT6M3QCI-CXMWuzDL.js → timeline-definition-IT6M3QCI-DOAJyjuz.js} +1 -1
  45. package/dist/dashboard/client/assets/{treemap-GDKQZRPO-o9ZFgpbJ.js → treemap-GDKQZRPO-BBJkjnJl.js} +1 -1
  46. package/dist/dashboard/client/assets/{xychartDiagram-PRI3JC2R-CfIuUpeA.js → xychartDiagram-PRI3JC2R-CPW4s5vm.js} +1 -1
  47. package/dist/dashboard/client/index.html +1 -1
  48. package/dist/dashboard/server.js +157 -153
  49. package/dist/index.js +144 -68
  50. package/dist/lib/models.js +125 -50
  51. package/package.json +2 -2
  52. package/dist/dashboard/client/assets/channel-rgw7C1e7.js +0 -1
  53. package/dist/dashboard/client/assets/classDiagram-2ON5EDUG-DTGi7d9X.js +0 -1
  54. package/dist/dashboard/client/assets/classDiagram-v2-WZHVMYZB-DTGi7d9X.js +0 -1
  55. package/dist/dashboard/client/assets/clone-Cz7hswqi.js +0 -1
  56. package/dist/dashboard/client/assets/index-C3NEq704.js +0 -571
  57. package/dist/dashboard/client/assets/stateDiagram-v2-4FDKWEC3-COR3QD3v.js +0 -1
@@ -0,0 +1,581 @@
1
+ function eN(e,t){for(var r=0;r<t.length;r++){const a=t[r];if(typeof a!="string"&&!Array.isArray(a)){for(const l in a)if(l!=="default"&&!(l in e)){const o=Object.getOwnPropertyDescriptor(a,l);o&&Object.defineProperty(e,l,o.get?o:{enumerable:!0,get:()=>a[l]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))a(l);new MutationObserver(l=>{for(const o of l)if(o.type==="childList")for(const c of o.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&a(c)}).observe(document,{childList:!0,subtree:!0});function r(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerPolicy&&(o.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?o.credentials="include":l.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function a(l){if(l.ep)return;l.ep=!0;const o=r(l);fetch(l.href,o)}})();function Uu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function oB(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var r=function a(){return this instanceof a?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(a){var l=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(r,a,l.get?l:{enumerable:!0,get:function(){return e[a]}})}),r}var rh={exports:{}},$l={};/**
2
+ * @license React
3
+ * react-jsx-runtime.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var Qb;function tN(){if(Qb)return $l;Qb=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(a,l,o){var c=null;if(o!==void 0&&(c=""+o),l.key!==void 0&&(c=""+l.key),"key"in l){o={};for(var f in l)f!=="key"&&(o[f]=l[f])}else o=l;return l=o.ref,{$$typeof:e,type:a,key:c,ref:l!==void 0?l:null,props:o}}return $l.Fragment=t,$l.jsx=r,$l.jsxs=r,$l}var Xb;function nN(){return Xb||(Xb=1,rh.exports=tN()),rh.exports}var d=nN(),ih={exports:{}},et={};/**
10
+ * @license React
11
+ * react.production.js
12
+ *
13
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var Zb;function rN(){if(Zb)return et;Zb=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),x=Symbol.for("react.activity"),y=Symbol.iterator;function v(D){return D===null||typeof D!="object"?null:(D=y&&D[y]||D["@@iterator"],typeof D=="function"?D:null)}var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,S={};function N(D,B,z){this.props=D,this.context=B,this.refs=S,this.updater=z||k}N.prototype.isReactComponent={},N.prototype.setState=function(D,B){if(typeof D!="object"&&typeof D!="function"&&D!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,D,B,"setState")},N.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function O(){}O.prototype=N.prototype;function T(D,B,z){this.props=D,this.context=B,this.refs=S,this.updater=z||k}var P=T.prototype=new O;P.constructor=T,E(P,N.prototype),P.isPureReactComponent=!0;var $=Array.isArray;function j(){}var G={H:null,A:null,T:null,S:null},A=Object.prototype.hasOwnProperty;function ie(D,B,z){var ue=z.ref;return{$$typeof:e,type:D,key:B,ref:ue!==void 0?ue:null,props:z}}function F(D,B){return ie(D.type,B,D.props)}function ee(D){return typeof D=="object"&&D!==null&&D.$$typeof===e}function te(D){var B={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(z){return B[z]})}var we=/\/+/g;function se(D,B){return typeof D=="object"&&D!==null&&D.key!=null?te(""+D.key):B.toString(36)}function Q(D){switch(D.status){case"fulfilled":return D.value;case"rejected":throw D.reason;default:switch(typeof D.status=="string"?D.then(j,j):(D.status="pending",D.then(function(B){D.status==="pending"&&(D.status="fulfilled",D.value=B)},function(B){D.status==="pending"&&(D.status="rejected",D.reason=B)})),D.status){case"fulfilled":return D.value;case"rejected":throw D.reason}}throw D}function M(D,B,z,ue,be){var ye=typeof D;(ye==="undefined"||ye==="boolean")&&(D=null);var le=!1;if(D===null)le=!0;else switch(ye){case"bigint":case"string":case"number":le=!0;break;case"object":switch(D.$$typeof){case e:case t:le=!0;break;case g:return le=D._init,M(le(D._payload),B,z,ue,be)}}if(le)return be=be(D),le=ue===""?"."+se(D,0):ue,$(be)?(z="",le!=null&&(z=le.replace(we,"$&/")+"/"),M(be,B,z,"",function(Ue){return Ue})):be!=null&&(ee(be)&&(be=F(be,z+(be.key==null||D&&D.key===be.key?"":(""+be.key).replace(we,"$&/")+"/")+le)),B.push(be)),1;le=0;var xe=ue===""?".":ue+":";if($(D))for(var pe=0;pe<D.length;pe++)ue=D[pe],ye=xe+se(ue,pe),le+=M(ue,B,z,ye,be);else if(pe=v(D),typeof pe=="function")for(D=pe.call(D),pe=0;!(ue=D.next()).done;)ue=ue.value,ye=xe+se(ue,pe++),le+=M(ue,B,z,ye,be);else if(ye==="object"){if(typeof D.then=="function")return M(Q(D),B,z,ue,be);throw B=String(D),Error("Objects are not valid as a React child (found: "+(B==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":B)+"). If you meant to render a collection of children, use an array instead.")}return le}function Y(D,B,z){if(D==null)return D;var ue=[],be=0;return M(D,ue,"","",function(ye){return B.call(z,ye,be++)}),ue}function V(D){if(D._status===-1){var B=D._result;B=B(),B.then(function(z){(D._status===0||D._status===-1)&&(D._status=1,D._result=z)},function(z){(D._status===0||D._status===-1)&&(D._status=2,D._result=z)}),D._status===-1&&(D._status=0,D._result=B)}if(D._status===1)return D._result.default;throw D._result}var fe=typeof reportError=="function"?reportError:function(D){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var B=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof D=="object"&&D!==null&&typeof D.message=="string"?String(D.message):String(D),error:D});if(!window.dispatchEvent(B))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",D);return}console.error(D)},R={map:Y,forEach:function(D,B,z){Y(D,function(){B.apply(this,arguments)},z)},count:function(D){var B=0;return Y(D,function(){B++}),B},toArray:function(D){return Y(D,function(B){return B})||[]},only:function(D){if(!ee(D))throw Error("React.Children.only expected to receive a single React element child.");return D}};return et.Activity=x,et.Children=R,et.Component=N,et.Fragment=r,et.Profiler=l,et.PureComponent=T,et.StrictMode=a,et.Suspense=h,et.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=G,et.__COMPILER_RUNTIME={__proto__:null,c:function(D){return G.H.useMemoCache(D)}},et.cache=function(D){return function(){return D.apply(null,arguments)}},et.cacheSignal=function(){return null},et.cloneElement=function(D,B,z){if(D==null)throw Error("The argument must be a React element, but you passed "+D+".");var ue=E({},D.props),be=D.key;if(B!=null)for(ye in B.key!==void 0&&(be=""+B.key),B)!A.call(B,ye)||ye==="key"||ye==="__self"||ye==="__source"||ye==="ref"&&B.ref===void 0||(ue[ye]=B[ye]);var ye=arguments.length-2;if(ye===1)ue.children=z;else if(1<ye){for(var le=Array(ye),xe=0;xe<ye;xe++)le[xe]=arguments[xe+2];ue.children=le}return ie(D.type,be,ue)},et.createContext=function(D){return D={$$typeof:c,_currentValue:D,_currentValue2:D,_threadCount:0,Provider:null,Consumer:null},D.Provider=D,D.Consumer={$$typeof:o,_context:D},D},et.createElement=function(D,B,z){var ue,be={},ye=null;if(B!=null)for(ue in B.key!==void 0&&(ye=""+B.key),B)A.call(B,ue)&&ue!=="key"&&ue!=="__self"&&ue!=="__source"&&(be[ue]=B[ue]);var le=arguments.length-2;if(le===1)be.children=z;else if(1<le){for(var xe=Array(le),pe=0;pe<le;pe++)xe[pe]=arguments[pe+2];be.children=xe}if(D&&D.defaultProps)for(ue in le=D.defaultProps,le)be[ue]===void 0&&(be[ue]=le[ue]);return ie(D,ye,be)},et.createRef=function(){return{current:null}},et.forwardRef=function(D){return{$$typeof:f,render:D}},et.isValidElement=ee,et.lazy=function(D){return{$$typeof:g,_payload:{_status:-1,_result:D},_init:V}},et.memo=function(D,B){return{$$typeof:m,type:D,compare:B===void 0?null:B}},et.startTransition=function(D){var B=G.T,z={};G.T=z;try{var ue=D(),be=G.S;be!==null&&be(z,ue),typeof ue=="object"&&ue!==null&&typeof ue.then=="function"&&ue.then(j,fe)}catch(ye){fe(ye)}finally{B!==null&&z.types!==null&&(B.types=z.types),G.T=B}},et.unstable_useCacheRefresh=function(){return G.H.useCacheRefresh()},et.use=function(D){return G.H.use(D)},et.useActionState=function(D,B,z){return G.H.useActionState(D,B,z)},et.useCallback=function(D,B){return G.H.useCallback(D,B)},et.useContext=function(D){return G.H.useContext(D)},et.useDebugValue=function(){},et.useDeferredValue=function(D,B){return G.H.useDeferredValue(D,B)},et.useEffect=function(D,B){return G.H.useEffect(D,B)},et.useEffectEvent=function(D){return G.H.useEffectEvent(D)},et.useId=function(){return G.H.useId()},et.useImperativeHandle=function(D,B,z){return G.H.useImperativeHandle(D,B,z)},et.useInsertionEffect=function(D,B){return G.H.useInsertionEffect(D,B)},et.useLayoutEffect=function(D,B){return G.H.useLayoutEffect(D,B)},et.useMemo=function(D,B){return G.H.useMemo(D,B)},et.useOptimistic=function(D,B){return G.H.useOptimistic(D,B)},et.useReducer=function(D,B,z){return G.H.useReducer(D,B,z)},et.useRef=function(D){return G.H.useRef(D)},et.useState=function(D){return G.H.useState(D)},et.useSyncExternalStore=function(D,B,z){return G.H.useSyncExternalStore(D,B,z)},et.useTransition=function(){return G.H.useTransition()},et.version="19.2.4",et}var Wb;function _m(){return Wb||(Wb=1,ih.exports=rN()),ih.exports}var _=_m();const iN=Uu(_),aN=eN({__proto__:null,default:iN},[_]);var ah={exports:{}},Gl={},sh={exports:{}},lh={};/**
18
+ * @license React
19
+ * scheduler.production.js
20
+ *
21
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */var Jb;function sN(){return Jb||(Jb=1,(function(e){function t(M,Y){var V=M.length;M.push(Y);e:for(;0<V;){var fe=V-1>>>1,R=M[fe];if(0<l(R,Y))M[fe]=Y,M[V]=R,V=fe;else break e}}function r(M){return M.length===0?null:M[0]}function a(M){if(M.length===0)return null;var Y=M[0],V=M.pop();if(V!==Y){M[0]=V;e:for(var fe=0,R=M.length,D=R>>>1;fe<D;){var B=2*(fe+1)-1,z=M[B],ue=B+1,be=M[ue];if(0>l(z,V))ue<R&&0>l(be,z)?(M[fe]=be,M[ue]=V,fe=ue):(M[fe]=z,M[B]=V,fe=B);else if(ue<R&&0>l(be,V))M[fe]=be,M[ue]=V,fe=ue;else break e}}return Y}function l(M,Y){var V=M.sortIndex-Y.sortIndex;return V!==0?V:M.id-Y.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var c=Date,f=c.now();e.unstable_now=function(){return c.now()-f}}var h=[],m=[],g=1,x=null,y=3,v=!1,k=!1,E=!1,S=!1,N=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function P(M){for(var Y=r(m);Y!==null;){if(Y.callback===null)a(m);else if(Y.startTime<=M)a(m),Y.sortIndex=Y.expirationTime,t(h,Y);else break;Y=r(m)}}function $(M){if(E=!1,P(M),!k)if(r(h)!==null)k=!0,j||(j=!0,te());else{var Y=r(m);Y!==null&&Q($,Y.startTime-M)}}var j=!1,G=-1,A=5,ie=-1;function F(){return S?!0:!(e.unstable_now()-ie<A)}function ee(){if(S=!1,j){var M=e.unstable_now();ie=M;var Y=!0;try{e:{k=!1,E&&(E=!1,O(G),G=-1),v=!0;var V=y;try{t:{for(P(M),x=r(h);x!==null&&!(x.expirationTime>M&&F());){var fe=x.callback;if(typeof fe=="function"){x.callback=null,y=x.priorityLevel;var R=fe(x.expirationTime<=M);if(M=e.unstable_now(),typeof R=="function"){x.callback=R,P(M),Y=!0;break t}x===r(h)&&a(h),P(M)}else a(h);x=r(h)}if(x!==null)Y=!0;else{var D=r(m);D!==null&&Q($,D.startTime-M),Y=!1}}break e}finally{x=null,y=V,v=!1}Y=void 0}}finally{Y?te():j=!1}}}var te;if(typeof T=="function")te=function(){T(ee)};else if(typeof MessageChannel<"u"){var we=new MessageChannel,se=we.port2;we.port1.onmessage=ee,te=function(){se.postMessage(null)}}else te=function(){N(ee,0)};function Q(M,Y){G=N(function(){M(e.unstable_now())},Y)}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(M){M.callback=null},e.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<M?Math.floor(1e3/M):5},e.unstable_getCurrentPriorityLevel=function(){return y},e.unstable_next=function(M){switch(y){case 1:case 2:case 3:var Y=3;break;default:Y=y}var V=y;y=Y;try{return M()}finally{y=V}},e.unstable_requestPaint=function(){S=!0},e.unstable_runWithPriority=function(M,Y){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var V=y;y=M;try{return Y()}finally{y=V}},e.unstable_scheduleCallback=function(M,Y,V){var fe=e.unstable_now();switch(typeof V=="object"&&V!==null?(V=V.delay,V=typeof V=="number"&&0<V?fe+V:fe):V=fe,M){case 1:var R=-1;break;case 2:R=250;break;case 5:R=1073741823;break;case 4:R=1e4;break;default:R=5e3}return R=V+R,M={id:g++,callback:Y,priorityLevel:M,startTime:V,expirationTime:R,sortIndex:-1},V>fe?(M.sortIndex=V,t(m,M),r(h)===null&&M===r(m)&&(E?(O(G),G=-1):E=!0,Q($,V-fe))):(M.sortIndex=R,t(h,M),k||v||(k=!0,j||(j=!0,te()))),M},e.unstable_shouldYield=F,e.unstable_wrapCallback=function(M){var Y=y;return function(){var V=y;y=Y;try{return M.apply(this,arguments)}finally{y=V}}}})(lh)),lh}var ex;function lN(){return ex||(ex=1,sh.exports=sN()),sh.exports}var oh={exports:{}},Fn={};/**
26
+ * @license React
27
+ * react-dom.production.js
28
+ *
29
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
30
+ *
31
+ * This source code is licensed under the MIT license found in the
32
+ * LICENSE file in the root directory of this source tree.
33
+ */var tx;function oN(){if(tx)return Fn;tx=1;var e=_m();function t(h){var m="https://react.dev/errors/"+h;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)m+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+h+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var a={d:{f:r,r:function(){throw Error(t(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},l=Symbol.for("react.portal");function o(h,m,g){var x=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:l,key:x==null?null:""+x,children:h,containerInfo:m,implementation:g}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(h,m){if(h==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return Fn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,Fn.createPortal=function(h,m){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(t(299));return o(h,m,null,g)},Fn.flushSync=function(h){var m=c.T,g=a.p;try{if(c.T=null,a.p=2,h)return h()}finally{c.T=m,a.p=g,a.d.f()}},Fn.preconnect=function(h,m){typeof h=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,a.d.C(h,m))},Fn.prefetchDNS=function(h){typeof h=="string"&&a.d.D(h)},Fn.preinit=function(h,m){if(typeof h=="string"&&m&&typeof m.as=="string"){var g=m.as,x=f(g,m.crossOrigin),y=typeof m.integrity=="string"?m.integrity:void 0,v=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;g==="style"?a.d.S(h,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:x,integrity:y,fetchPriority:v}):g==="script"&&a.d.X(h,{crossOrigin:x,integrity:y,fetchPriority:v,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},Fn.preinitModule=function(h,m){if(typeof h=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var g=f(m.as,m.crossOrigin);a.d.M(h,{crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&a.d.M(h)},Fn.preload=function(h,m){if(typeof h=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var g=m.as,x=f(g,m.crossOrigin);a.d.L(h,g,{crossOrigin:x,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},Fn.preloadModule=function(h,m){if(typeof h=="string")if(m){var g=f(m.as,m.crossOrigin);a.d.m(h,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else a.d.m(h)},Fn.requestFormReset=function(h){a.d.r(h)},Fn.unstable_batchedUpdates=function(h,m){return h(m)},Fn.useFormState=function(h,m,g){return c.H.useFormState(h,m,g)},Fn.useFormStatus=function(){return c.H.useHostTransitionStatus()},Fn.version="19.2.4",Fn}var nx;function zv(){if(nx)return oh.exports;nx=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),oh.exports=oN(),oh.exports}/**
34
+ * @license React
35
+ * react-dom-client.production.js
36
+ *
37
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
38
+ *
39
+ * This source code is licensed under the MIT license found in the
40
+ * LICENSE file in the root directory of this source tree.
41
+ */var rx;function cN(){if(rx)return Gl;rx=1;var e=lN(),t=_m(),r=zv();function a(n){var i="https://react.dev/errors/"+n;if(1<arguments.length){i+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)i+="&args[]="+encodeURIComponent(arguments[s])}return"Minified React error #"+n+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function o(n){var i=n,s=n;if(n.alternate)for(;i.return;)i=i.return;else{n=i;do i=n,(i.flags&4098)!==0&&(s=i.return),n=i.return;while(n)}return i.tag===3?s:null}function c(n){if(n.tag===13){var i=n.memoizedState;if(i===null&&(n=n.alternate,n!==null&&(i=n.memoizedState)),i!==null)return i.dehydrated}return null}function f(n){if(n.tag===31){var i=n.memoizedState;if(i===null&&(n=n.alternate,n!==null&&(i=n.memoizedState)),i!==null)return i.dehydrated}return null}function h(n){if(o(n)!==n)throw Error(a(188))}function m(n){var i=n.alternate;if(!i){if(i=o(n),i===null)throw Error(a(188));return i!==n?null:n}for(var s=n,u=i;;){var p=s.return;if(p===null)break;var b=p.alternate;if(b===null){if(u=p.return,u!==null){s=u;continue}break}if(p.child===b.child){for(b=p.child;b;){if(b===s)return h(p),n;if(b===u)return h(p),i;b=b.sibling}throw Error(a(188))}if(s.return!==u.return)s=p,u=b;else{for(var w=!1,C=p.child;C;){if(C===s){w=!0,s=p,u=b;break}if(C===u){w=!0,u=p,s=b;break}C=C.sibling}if(!w){for(C=b.child;C;){if(C===s){w=!0,s=b,u=p;break}if(C===u){w=!0,u=b,s=p;break}C=C.sibling}if(!w)throw Error(a(189))}}if(s.alternate!==u)throw Error(a(190))}if(s.tag!==3)throw Error(a(188));return s.stateNode.current===s?n:i}function g(n){var i=n.tag;if(i===5||i===26||i===27||i===6)return n;for(n=n.child;n!==null;){if(i=g(n),i!==null)return i;n=n.sibling}return null}var x=Object.assign,y=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),k=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),N=Symbol.for("react.profiler"),O=Symbol.for("react.consumer"),T=Symbol.for("react.context"),P=Symbol.for("react.forward_ref"),$=Symbol.for("react.suspense"),j=Symbol.for("react.suspense_list"),G=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),ie=Symbol.for("react.activity"),F=Symbol.for("react.memo_cache_sentinel"),ee=Symbol.iterator;function te(n){return n===null||typeof n!="object"?null:(n=ee&&n[ee]||n["@@iterator"],typeof n=="function"?n:null)}var we=Symbol.for("react.client.reference");function se(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===we?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case E:return"Fragment";case N:return"Profiler";case S:return"StrictMode";case $:return"Suspense";case j:return"SuspenseList";case ie:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case k:return"Portal";case T:return n.displayName||"Context";case O:return(n._context.displayName||"Context")+".Consumer";case P:var i=n.render;return n=n.displayName,n||(n=i.displayName||i.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case G:return i=n.displayName||null,i!==null?i:se(n.type)||"Memo";case A:i=n._payload,n=n._init;try{return se(n(i))}catch{}}return null}var Q=Array.isArray,M=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V={pending:!1,data:null,method:null,action:null},fe=[],R=-1;function D(n){return{current:n}}function B(n){0>R||(n.current=fe[R],fe[R]=null,R--)}function z(n,i){R++,fe[R]=n.current,n.current=i}var ue=D(null),be=D(null),ye=D(null),le=D(null);function xe(n,i){switch(z(ye,i),z(be,n),z(ue,null),i.nodeType){case 9:case 11:n=(n=i.documentElement)&&(n=n.namespaceURI)?xb(n):0;break;default:if(n=i.tagName,i=i.namespaceURI)i=xb(i),n=yb(i,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}B(ue),z(ue,n)}function pe(){B(ue),B(be),B(ye)}function Ue(n){n.memoizedState!==null&&z(le,n);var i=ue.current,s=yb(i,n.type);i!==s&&(z(be,n),z(ue,s))}function Ae(n){be.current===n&&(B(ue),B(be)),le.current===n&&(B(le),Fl._currentValue=V)}var Tt,tt;function gt(n){if(Tt===void 0)try{throw Error()}catch(s){var i=s.stack.trim().match(/\n( *(at )?)/);Tt=i&&i[1]||"",tt=-1<s.stack.indexOf(`
42
+ at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
43
+ `+Tt+n+tt}var _t=!1;function ot(n,i){if(!n||_t)return"";_t=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(i){var he=function(){throw Error()};if(Object.defineProperty(he.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(he,[])}catch(ne){var J=ne}Reflect.construct(n,[],he)}else{try{he.call()}catch(ne){J=ne}n.call(he.prototype)}}else{try{throw Error()}catch(ne){J=ne}(he=n())&&typeof he.catch=="function"&&he.catch(function(){})}}catch(ne){if(ne&&J&&typeof ne.stack=="string")return[ne.stack,J.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var b=u.DetermineComponentFrameRoot(),w=b[0],C=b[1];if(w&&C){var I=w.split(`
44
+ `),Z=C.split(`
45
+ `);for(p=u=0;u<I.length&&!I[u].includes("DetermineComponentFrameRoot");)u++;for(;p<Z.length&&!Z[p].includes("DetermineComponentFrameRoot");)p++;if(u===I.length||p===Z.length)for(u=I.length-1,p=Z.length-1;1<=u&&0<=p&&I[u]!==Z[p];)p--;for(;1<=u&&0<=p;u--,p--)if(I[u]!==Z[p]){if(u!==1||p!==1)do if(u--,p--,0>p||I[u]!==Z[p]){var oe=`
46
+ `+I[u].replace(" at new "," at ");return n.displayName&&oe.includes("<anonymous>")&&(oe=oe.replace("<anonymous>",n.displayName)),oe}while(1<=u&&0<=p);break}}}finally{_t=!1,Error.prepareStackTrace=s}return(s=n?n.displayName||n.name:"")?gt(s):""}function _n(n,i){switch(n.tag){case 26:case 27:case 5:return gt(n.type);case 16:return gt("Lazy");case 13:return n.child!==i&&i!==null?gt("Suspense Fallback"):gt("Suspense");case 19:return gt("SuspenseList");case 0:case 15:return ot(n.type,!1);case 11:return ot(n.type.render,!1);case 1:return ot(n.type,!0);case 31:return gt("Activity");default:return""}}function Yn(n){try{var i="",s=null;do i+=_n(n,s),s=n,n=n.return;while(n);return i}catch(u){return`
47
+ Error generating stack: `+u.message+`
48
+ `+u.stack}}var br=Object.prototype.hasOwnProperty,xr=e.unstable_scheduleCallback,oi=e.unstable_cancelCallback,wa=e.unstable_shouldYield,Li=e.unstable_requestPaint,Wt=e.unstable_now,Qn=e.unstable_getCurrentPriorityLevel,ae=e.unstable_ImmediatePriority,_e=e.unstable_UserBlockingPriority,$e=e.unstable_NormalPriority,We=e.unstable_LowPriority,rt=e.unstable_IdlePriority,zn=e.log,ar=e.unstable_setDisableYieldValue,cn=null,rn=null;function Qt(n){if(typeof zn=="function"&&ar(n),rn&&typeof rn.setStrictMode=="function")try{rn.setStrictMode(cn,n)}catch{}}var Rt=Math.clz32?Math.clz32:es,sr=Math.log,Cn=Math.LN2;function es(n){return n>>>=0,n===0?32:31-(sr(n)/Cn|0)|0}var Kr=256,Lr=262144,Vr=4194304;function Tn(n){var i=n&42;if(i!==0)return i;switch(n&-n){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return n&261888;case 262144:case 524288:case 1048576:case 2097152:return n&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}function U(n,i,s){var u=n.pendingLanes;if(u===0)return 0;var p=0,b=n.suspendedLanes,w=n.pingedLanes;n=n.warmLanes;var C=u&134217727;return C!==0?(u=C&~b,u!==0?p=Tn(u):(w&=C,w!==0?p=Tn(w):s||(s=C&~n,s!==0&&(p=Tn(s))))):(C=u&~b,C!==0?p=Tn(C):w!==0?p=Tn(w):s||(s=u&~n,s!==0&&(p=Tn(s)))),p===0?0:i!==0&&i!==p&&(i&b)===0&&(b=p&-p,s=i&-i,b>=s||b===32&&(s&4194048)!==0)?i:p}function ce(n,i){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&i)===0}function ze(n,i){switch(n){case 1:case 2:case 4:case 8:case 64:return i+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return i+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Qe(){var n=Vr;return Vr<<=1,(Vr&62914560)===0&&(Vr=4194304),n}function Lt(n){for(var i=[],s=0;31>s;s++)i.push(n);return i}function At(n,i){n.pendingLanes|=i,i!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function Me(n,i,s,u,p,b){var w=n.pendingLanes;n.pendingLanes=s,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=s,n.entangledLanes&=s,n.errorRecoveryDisabledLanes&=s,n.shellSuspendCounter=0;var C=n.entanglements,I=n.expirationTimes,Z=n.hiddenUpdates;for(s=w&~s;0<s;){var oe=31-Rt(s),he=1<<oe;C[oe]=0,I[oe]=-1;var J=Z[oe];if(J!==null)for(Z[oe]=null,oe=0;oe<J.length;oe++){var ne=J[oe];ne!==null&&(ne.lane&=-536870913)}s&=~he}u!==0&&Te(n,u,0),b!==0&&p===0&&n.tag!==0&&(n.suspendedLanes|=b&~(w&~i))}function Te(n,i,s){n.pendingLanes|=i,n.suspendedLanes&=~i;var u=31-Rt(i);n.entangledLanes|=i,n.entanglements[u]=n.entanglements[u]|1073741824|s&261930}function Ve(n,i){var s=n.entangledLanes|=i;for(n=n.entanglements;s;){var u=31-Rt(s),p=1<<u;p&i|n[u]&i&&(n[u]|=i),s&=~p}}function L(n,i){var s=i&-i;return s=(s&42)!==0?1:H(s),(s&(n.suspendedLanes|i))!==0?0:s}function H(n){switch(n){case 2:n=1;break;case 8:n=4;break;case 32:n=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:n=128;break;case 268435456:n=134217728;break;default:n=0}return n}function W(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function me(){var n=Y.p;return n!==0?n:(n=window.event,n===void 0?32:Hb(n.type))}function ve(n,i){var s=Y.p;try{return Y.p=n,i()}finally{Y.p=s}}var Oe=Math.random().toString(36).slice(2),Ee="__reactFiber$"+Oe,Ce="__reactProps$"+Oe,Re="__reactContainer$"+Oe,He="__reactEvents$"+Oe,qe="__reactListeners$"+Oe,Ie="__reactHandles$"+Oe,Et="__reactResources$"+Oe,lt="__reactMarker$"+Oe;function Bt(n){delete n[Ee],delete n[Ce],delete n[He],delete n[qe],delete n[Ie]}function Nt(n){var i=n[Ee];if(i)return i;for(var s=n.parentNode;s;){if(i=s[Re]||s[Ee]){if(s=i.alternate,i.child!==null||s!==null&&s.child!==null)for(n=Sb(n);n!==null;){if(s=n[Ee])return s;n=Sb(n)}return i}n=s,s=n.parentNode}return null}function Jt(n){if(n=n[Ee]||n[Re]){var i=n.tag;if(i===5||i===6||i===13||i===31||i===26||i===27||i===3)return n}return null}function ft(n){var i=n.tag;if(i===5||i===26||i===27||i===6)return n.stateNode;throw Error(a(33))}function un(n){var i=n[Et];return i||(i=n[Et]={hoistableStyles:new Map,hoistableScripts:new Map}),i}function Ht(n){n[lt]=!0}var Yr=new Set,Un={};function mn(n,i){ge(n,i),ge(n+"Capture",i)}function ge(n,i){for(Un[n]=i,n=0;n<i.length;n++)Yr.add(i[n])}var Be=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Je={},St={};function Xt(n){return br.call(St,n)?!0:br.call(Je,n)?!1:Be.test(n)?St[n]=!0:(Je[n]=!0,!1)}function Xe(n,i,s){if(Xt(i))if(s===null)n.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":n.removeAttribute(i);return;case"boolean":var u=i.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){n.removeAttribute(i);return}}n.setAttribute(i,""+s)}}function It(n,i,s){if(s===null)n.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(i);return}n.setAttribute(i,""+s)}}function dn(n,i,s,u){if(u===null)n.removeAttribute(s);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(s);return}n.setAttributeNS(i,s,""+u)}}function zt(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function bt(n){var i=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function ci(n,i,s){var u=Object.getOwnPropertyDescriptor(n.constructor.prototype,i);if(!n.hasOwnProperty(i)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var p=u.get,b=u.set;return Object.defineProperty(n,i,{configurable:!0,get:function(){return p.call(this)},set:function(w){s=""+w,b.call(this,w)}}),Object.defineProperty(n,i,{enumerable:u.enumerable}),{getValue:function(){return s},setValue:function(w){s=""+w},stopTracking:function(){n._valueTracker=null,delete n[i]}}}}function ui(n){if(!n._valueTracker){var i=bt(n)?"checked":"value";n._valueTracker=ci(n,i,""+n[i])}}function _a(n){if(!n)return!1;var i=n._valueTracker;if(!i)return!0;var s=i.getValue(),u="";return n&&(u=bt(n)?n.checked?"true":"false":n.value),n=u,n!==s?(i.setValue(n),!0):!1}function ts(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}var td=/[\n"\\]/g;function Xn(n){return n.replace(td,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function el(n,i,s,u,p,b,w,C){n.name="",w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?n.type=w:n.removeAttribute("type"),i!=null?w==="number"?(i===0&&n.value===""||n.value!=i)&&(n.value=""+zt(i)):n.value!==""+zt(i)&&(n.value=""+zt(i)):w!=="submit"&&w!=="reset"||n.removeAttribute("value"),i!=null?ns(n,w,zt(i)):s!=null?ns(n,w,zt(s)):u!=null&&n.removeAttribute("value"),p==null&&b!=null&&(n.defaultChecked=!!b),p!=null&&(n.checked=p&&typeof p!="function"&&typeof p!="symbol"),C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"?n.name=""+zt(C):n.removeAttribute("name")}function Ea(n,i,s,u,p,b,w,C){if(b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(n.type=b),i!=null||s!=null){if(!(b!=="submit"&&b!=="reset"||i!=null)){ui(n);return}s=s!=null?""+zt(s):"",i=i!=null?""+zt(i):s,C||i===n.value||(n.value=i),n.defaultValue=i}u=u??p,u=typeof u!="function"&&typeof u!="symbol"&&!!u,n.checked=C?n.checked:!!u,n.defaultChecked=!!u,w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"&&(n.name=w),ui(n)}function ns(n,i,s){i==="number"&&ts(n.ownerDocument)===n||n.defaultValue===""+s||(n.defaultValue=""+s)}function On(n,i,s,u){if(n=n.options,i){i={};for(var p=0;p<s.length;p++)i["$"+s[p]]=!0;for(s=0;s<n.length;s++)p=i.hasOwnProperty("$"+n[s].value),n[s].selected!==p&&(n[s].selected=p),p&&u&&(n[s].defaultSelected=!0)}else{for(s=""+zt(s),i=null,p=0;p<n.length;p++){if(n[p].value===s){n[p].selected=!0,u&&(n[p].defaultSelected=!0);return}i!==null||n[p].disabled||(i=n[p])}i!==null&&(i.selected=!0)}}function Uo(n,i,s){if(i!=null&&(i=""+zt(i),i!==n.value&&(n.value=i),s==null)){n.defaultValue!==i&&(n.defaultValue=i);return}n.defaultValue=s!=null?""+zt(s):""}function rs(n,i,s,u){if(i==null){if(u!=null){if(s!=null)throw Error(a(92));if(Q(u)){if(1<u.length)throw Error(a(93));u=u[0]}s=u}s==null&&(s=""),i=s}s=zt(i),n.defaultValue=s,u=n.textContent,u===s&&u!==""&&u!==null&&(n.value=u),ui(n)}function Ze(n,i){if(i){var s=n.firstChild;if(s&&s===n.lastChild&&s.nodeType===3){s.nodeValue=i;return}}n.textContent=i}var Fo=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function pn(n,i,s){var u=i.indexOf("--")===0;s==null||typeof s=="boolean"||s===""?u?n.setProperty(i,""):i==="float"?n.cssFloat="":n[i]="":u?n.setProperty(i,s):typeof s!="number"||s===0||Fo.has(i)?i==="float"?n.cssFloat=s:n[i]=(""+s).trim():n[i]=s+"px"}function Ut(n,i,s){if(i!=null&&typeof i!="object")throw Error(a(62));if(n=n.style,s!=null){for(var u in s)!s.hasOwnProperty(u)||i!=null&&i.hasOwnProperty(u)||(u.indexOf("--")===0?n.setProperty(u,""):u==="float"?n.cssFloat="":n[u]="");for(var p in i)u=i[p],i.hasOwnProperty(p)&&s[p]!==u&&pn(n,p,u)}else for(var b in i)i.hasOwnProperty(b)&&pn(n,b,i[b])}function Ii(n){if(n.indexOf("-")===-1)return!1;switch(n){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 di=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),tl=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Bi(n){return tl.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function Se(){}var Fe=null;function nt(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var xt=null,sn=null;function yr(n){var i=Jt(n);if(i&&(n=i.stateNode)){var s=n[Ce]||null;e:switch(n=i.stateNode,i.type){case"input":if(el(n,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),i=s.name,s.type==="radio"&&i!=null){for(s=n;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll('input[name="'+Xn(""+i)+'"][type="radio"]'),i=0;i<s.length;i++){var u=s[i];if(u!==n&&u.form===n.form){var p=u[Ce]||null;if(!p)throw Error(a(90));el(u,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(i=0;i<s.length;i++)u=s[i],u.form===n.form&&_a(u)}break e;case"textarea":Uo(n,s.value,s.defaultValue);break e;case"select":i=s.value,i!=null&&On(n,!!s.multiple,i,!1)}}}var nl=!1;function Po(n,i,s){if(nl)return n(i,s);nl=!0;try{var u=n(i);return u}finally{if(nl=!1,(xt!==null||sn!==null)&&(Cc(),xt&&(i=xt,n=sn,sn=xt=null,yr(i),n)))for(i=0;i<n.length;i++)yr(n[i])}}function rl(n,i){var s=n.stateNode;if(s===null)return null;var u=s[Ce]||null;if(u===null)return null;s=u[i];e:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(u=!u.disabled)||(n=n.type,u=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!u;break e;default:n=!1}if(n)return null;if(s&&typeof s!="function")throw Error(a(231,i,typeof s));return s}var fi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),nd=!1;if(fi)try{var il={};Object.defineProperty(il,"passive",{get:function(){nd=!0}}),window.addEventListener("test",il,il),window.removeEventListener("test",il,il)}catch{nd=!1}var Ui=null,rd=null,Ho=null;function yp(){if(Ho)return Ho;var n,i=rd,s=i.length,u,p="value"in Ui?Ui.value:Ui.textContent,b=p.length;for(n=0;n<s&&i[n]===p[n];n++);var w=s-n;for(u=1;u<=w&&i[s-u]===p[b-u];u++);return Ho=p.slice(n,1<u?1-u:void 0)}function qo(n){var i=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&i===13&&(n=13)):n=i,n===10&&(n=13),32<=n||n===13?n:0}function $o(){return!0}function vp(){return!1}function Zn(n){function i(s,u,p,b,w){this._reactName=s,this._targetInst=p,this.type=u,this.nativeEvent=b,this.target=w,this.currentTarget=null;for(var C in n)n.hasOwnProperty(C)&&(s=n[C],this[C]=s?s(b):b[C]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?$o:vp,this.isPropagationStopped=vp,this}return x(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=$o)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=$o)},persist:function(){},isPersistent:$o}),i}var Na={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Go=Zn(Na),al=x({},Na,{view:0,detail:0}),Ww=Zn(al),id,ad,sl,Ko=x({},al,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ld,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==sl&&(sl&&n.type==="mousemove"?(id=n.screenX-sl.screenX,ad=n.screenY-sl.screenY):ad=id=0,sl=n),id)},movementY:function(n){return"movementY"in n?n.movementY:ad}}),kp=Zn(Ko),Jw=x({},Ko,{dataTransfer:0}),e_=Zn(Jw),t_=x({},al,{relatedTarget:0}),sd=Zn(t_),n_=x({},Na,{animationName:0,elapsedTime:0,pseudoElement:0}),r_=Zn(n_),i_=x({},Na,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),a_=Zn(i_),s_=x({},Na,{data:0}),wp=Zn(s_),l_={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},o_={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"},c_={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function u_(n){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(n):(n=c_[n])?!!i[n]:!1}function ld(){return u_}var d_=x({},al,{key:function(n){if(n.key){var i=l_[n.key]||n.key;if(i!=="Unidentified")return i}return n.type==="keypress"?(n=qo(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?o_[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ld,charCode:function(n){return n.type==="keypress"?qo(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?qo(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),f_=Zn(d_),h_=x({},Ko,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),_p=Zn(h_),m_=x({},al,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ld}),p_=Zn(m_),g_=x({},Na,{propertyName:0,elapsedTime:0,pseudoElement:0}),b_=Zn(g_),x_=x({},Ko,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),y_=Zn(x_),v_=x({},Na,{newState:0,oldState:0}),k_=Zn(v_),w_=[9,13,27,32],od=fi&&"CompositionEvent"in window,ll=null;fi&&"documentMode"in document&&(ll=document.documentMode);var __=fi&&"TextEvent"in window&&!ll,Ep=fi&&(!od||ll&&8<ll&&11>=ll),Np=" ",Sp=!1;function zp(n,i){switch(n){case"keyup":return w_.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Cp(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var is=!1;function E_(n,i){switch(n){case"compositionend":return Cp(i);case"keypress":return i.which!==32?null:(Sp=!0,Np);case"textInput":return n=i.data,n===Np&&Sp?null:n;default:return null}}function N_(n,i){if(is)return n==="compositionend"||!od&&zp(n,i)?(n=yp(),Ho=rd=Ui=null,is=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return Ep&&i.locale!=="ko"?null:i.data;default:return null}}var S_={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 Tp(n){var i=n&&n.nodeName&&n.nodeName.toLowerCase();return i==="input"?!!S_[n.type]:i==="textarea"}function Rp(n,i,s,u){xt?sn?sn.push(u):sn=[u]:xt=u,i=Dc(i,"onChange"),0<i.length&&(s=new Go("onChange","change",null,s,u),n.push({event:s,listeners:i}))}var ol=null,cl=null;function z_(n){fb(n,0)}function Vo(n){var i=ft(n);if(_a(i))return n}function Ap(n,i){if(n==="change")return i}var Op=!1;if(fi){var cd;if(fi){var ud="oninput"in document;if(!ud){var Mp=document.createElement("div");Mp.setAttribute("oninput","return;"),ud=typeof Mp.oninput=="function"}cd=ud}else cd=!1;Op=cd&&(!document.documentMode||9<document.documentMode)}function jp(){ol&&(ol.detachEvent("onpropertychange",Dp),cl=ol=null)}function Dp(n){if(n.propertyName==="value"&&Vo(cl)){var i=[];Rp(i,cl,n,nt(n)),Po(z_,i)}}function C_(n,i,s){n==="focusin"?(jp(),ol=i,cl=s,ol.attachEvent("onpropertychange",Dp)):n==="focusout"&&jp()}function T_(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return Vo(cl)}function R_(n,i){if(n==="click")return Vo(i)}function A_(n,i){if(n==="input"||n==="change")return Vo(i)}function O_(n,i){return n===i&&(n!==0||1/n===1/i)||n!==n&&i!==i}var lr=typeof Object.is=="function"?Object.is:O_;function ul(n,i){if(lr(n,i))return!0;if(typeof n!="object"||n===null||typeof i!="object"||i===null)return!1;var s=Object.keys(n),u=Object.keys(i);if(s.length!==u.length)return!1;for(u=0;u<s.length;u++){var p=s[u];if(!br.call(i,p)||!lr(n[p],i[p]))return!1}return!0}function Lp(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function Ip(n,i){var s=Lp(n);n=0;for(var u;s;){if(s.nodeType===3){if(u=n+s.textContent.length,n<=i&&u>=i)return{node:s,offset:i-n};n=u}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=Lp(s)}}function Bp(n,i){return n&&i?n===i?!0:n&&n.nodeType===3?!1:i&&i.nodeType===3?Bp(n,i.parentNode):"contains"in n?n.contains(i):n.compareDocumentPosition?!!(n.compareDocumentPosition(i)&16):!1:!1}function Up(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var i=ts(n.document);i instanceof n.HTMLIFrameElement;){try{var s=typeof i.contentWindow.location.href=="string"}catch{s=!1}if(s)n=i.contentWindow;else break;i=ts(n.document)}return i}function dd(n){var i=n&&n.nodeName&&n.nodeName.toLowerCase();return i&&(i==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||i==="textarea"||n.contentEditable==="true")}var M_=fi&&"documentMode"in document&&11>=document.documentMode,as=null,fd=null,dl=null,hd=!1;function Fp(n,i,s){var u=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;hd||as==null||as!==ts(u)||(u=as,"selectionStart"in u&&dd(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),dl&&ul(dl,u)||(dl=u,u=Dc(fd,"onSelect"),0<u.length&&(i=new Go("onSelect","select",null,i,s),n.push({event:i,listeners:u}),i.target=as)))}function Sa(n,i){var s={};return s[n.toLowerCase()]=i.toLowerCase(),s["Webkit"+n]="webkit"+i,s["Moz"+n]="moz"+i,s}var ss={animationend:Sa("Animation","AnimationEnd"),animationiteration:Sa("Animation","AnimationIteration"),animationstart:Sa("Animation","AnimationStart"),transitionrun:Sa("Transition","TransitionRun"),transitionstart:Sa("Transition","TransitionStart"),transitioncancel:Sa("Transition","TransitionCancel"),transitionend:Sa("Transition","TransitionEnd")},md={},Pp={};fi&&(Pp=document.createElement("div").style,"AnimationEvent"in window||(delete ss.animationend.animation,delete ss.animationiteration.animation,delete ss.animationstart.animation),"TransitionEvent"in window||delete ss.transitionend.transition);function za(n){if(md[n])return md[n];if(!ss[n])return n;var i=ss[n],s;for(s in i)if(i.hasOwnProperty(s)&&s in Pp)return md[n]=i[s];return n}var Hp=za("animationend"),qp=za("animationiteration"),$p=za("animationstart"),j_=za("transitionrun"),D_=za("transitionstart"),L_=za("transitioncancel"),Gp=za("transitionend"),Kp=new Map,pd="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");pd.push("scrollEnd");function Ir(n,i){Kp.set(n,i),mn(i,[n])}var Yo=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var i=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof n=="object"&&n!==null&&typeof n.message=="string"?String(n.message):String(n),error:n});if(!window.dispatchEvent(i))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)},vr=[],ls=0,gd=0;function Qo(){for(var n=ls,i=gd=ls=0;i<n;){var s=vr[i];vr[i++]=null;var u=vr[i];vr[i++]=null;var p=vr[i];vr[i++]=null;var b=vr[i];if(vr[i++]=null,u!==null&&p!==null){var w=u.pending;w===null?p.next=p:(p.next=w.next,w.next=p),u.pending=p}b!==0&&Vp(s,p,b)}}function Xo(n,i,s,u){vr[ls++]=n,vr[ls++]=i,vr[ls++]=s,vr[ls++]=u,gd|=u,n.lanes|=u,n=n.alternate,n!==null&&(n.lanes|=u)}function bd(n,i,s,u){return Xo(n,i,s,u),Zo(n)}function Ca(n,i){return Xo(n,null,null,i),Zo(n)}function Vp(n,i,s){n.lanes|=s;var u=n.alternate;u!==null&&(u.lanes|=s);for(var p=!1,b=n.return;b!==null;)b.childLanes|=s,u=b.alternate,u!==null&&(u.childLanes|=s),b.tag===22&&(n=b.stateNode,n===null||n._visibility&1||(p=!0)),n=b,b=b.return;return n.tag===3?(b=n.stateNode,p&&i!==null&&(p=31-Rt(s),n=b.hiddenUpdates,u=n[p],u===null?n[p]=[i]:u.push(i),i.lane=s|536870912),b):null}function Zo(n){if(50<Ml)throw Ml=0,zf=null,Error(a(185));for(var i=n.return;i!==null;)n=i,i=n.return;return n.tag===3?n.stateNode:null}var os={};function I_(n,i,s,u){this.tag=n,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function or(n,i,s,u){return new I_(n,i,s,u)}function xd(n){return n=n.prototype,!(!n||!n.isReactComponent)}function hi(n,i){var s=n.alternate;return s===null?(s=or(n.tag,i,n.key,n.mode),s.elementType=n.elementType,s.type=n.type,s.stateNode=n.stateNode,s.alternate=n,n.alternate=s):(s.pendingProps=i,s.type=n.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=n.flags&65011712,s.childLanes=n.childLanes,s.lanes=n.lanes,s.child=n.child,s.memoizedProps=n.memoizedProps,s.memoizedState=n.memoizedState,s.updateQueue=n.updateQueue,i=n.dependencies,s.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},s.sibling=n.sibling,s.index=n.index,s.ref=n.ref,s.refCleanup=n.refCleanup,s}function Yp(n,i){n.flags&=65011714;var s=n.alternate;return s===null?(n.childLanes=0,n.lanes=i,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=s.childLanes,n.lanes=s.lanes,n.child=s.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=s.memoizedProps,n.memoizedState=s.memoizedState,n.updateQueue=s.updateQueue,n.type=s.type,i=s.dependencies,n.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),n}function Wo(n,i,s,u,p,b){var w=0;if(u=n,typeof n=="function")xd(n)&&(w=1);else if(typeof n=="string")w=HE(n,s,ue.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case ie:return n=or(31,s,i,p),n.elementType=ie,n.lanes=b,n;case E:return Ta(s.children,p,b,i);case S:w=8,p|=24;break;case N:return n=or(12,s,i,p|2),n.elementType=N,n.lanes=b,n;case $:return n=or(13,s,i,p),n.elementType=$,n.lanes=b,n;case j:return n=or(19,s,i,p),n.elementType=j,n.lanes=b,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case T:w=10;break e;case O:w=9;break e;case P:w=11;break e;case G:w=14;break e;case A:w=16,u=null;break e}w=29,s=Error(a(130,n===null?"null":typeof n,"")),u=null}return i=or(w,s,i,p),i.elementType=n,i.type=u,i.lanes=b,i}function Ta(n,i,s,u){return n=or(7,n,u,i),n.lanes=s,n}function yd(n,i,s){return n=or(6,n,null,i),n.lanes=s,n}function Qp(n){var i=or(18,null,null,0);return i.stateNode=n,i}function vd(n,i,s){return i=or(4,n.children!==null?n.children:[],n.key,i),i.lanes=s,i.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},i}var Xp=new WeakMap;function kr(n,i){if(typeof n=="object"&&n!==null){var s=Xp.get(n);return s!==void 0?s:(i={value:n,source:i,stack:Yn(i)},Xp.set(n,i),i)}return{value:n,source:i,stack:Yn(i)}}var cs=[],us=0,Jo=null,fl=0,wr=[],_r=0,Fi=null,Qr=1,Xr="";function mi(n,i){cs[us++]=fl,cs[us++]=Jo,Jo=n,fl=i}function Zp(n,i,s){wr[_r++]=Qr,wr[_r++]=Xr,wr[_r++]=Fi,Fi=n;var u=Qr;n=Xr;var p=32-Rt(u)-1;u&=~(1<<p),s+=1;var b=32-Rt(i)+p;if(30<b){var w=p-p%5;b=(u&(1<<w)-1).toString(32),u>>=w,p-=w,Qr=1<<32-Rt(i)+p|s<<p|u,Xr=b+n}else Qr=1<<b|s<<p|u,Xr=n}function kd(n){n.return!==null&&(mi(n,1),Zp(n,1,0))}function wd(n){for(;n===Jo;)Jo=cs[--us],cs[us]=null,fl=cs[--us],cs[us]=null;for(;n===Fi;)Fi=wr[--_r],wr[_r]=null,Xr=wr[--_r],wr[_r]=null,Qr=wr[--_r],wr[_r]=null}function Wp(n,i){wr[_r++]=Qr,wr[_r++]=Xr,wr[_r++]=Fi,Qr=i.id,Xr=i.overflow,Fi=n}var Mn=null,en=null,kt=!1,Pi=null,Er=!1,_d=Error(a(519));function Hi(n){var i=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw hl(kr(i,n)),_d}function Jp(n){var i=n.stateNode,s=n.type,u=n.memoizedProps;switch(i[Ee]=n,i[Ce]=u,s){case"dialog":mt("cancel",i),mt("close",i);break;case"iframe":case"object":case"embed":mt("load",i);break;case"video":case"audio":for(s=0;s<Dl.length;s++)mt(Dl[s],i);break;case"source":mt("error",i);break;case"img":case"image":case"link":mt("error",i),mt("load",i);break;case"details":mt("toggle",i);break;case"input":mt("invalid",i),Ea(i,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0);break;case"select":mt("invalid",i);break;case"textarea":mt("invalid",i),rs(i,u.value,u.defaultValue,u.children)}s=u.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||i.textContent===""+s||u.suppressHydrationWarning===!0||gb(i.textContent,s)?(u.popover!=null&&(mt("beforetoggle",i),mt("toggle",i)),u.onScroll!=null&&mt("scroll",i),u.onScrollEnd!=null&&mt("scrollend",i),u.onClick!=null&&(i.onclick=Se),i=!0):i=!1,i||Hi(n,!0)}function e0(n){for(Mn=n.return;Mn;)switch(Mn.tag){case 5:case 31:case 13:Er=!1;return;case 27:case 3:Er=!0;return;default:Mn=Mn.return}}function ds(n){if(n!==Mn)return!1;if(!kt)return e0(n),kt=!0,!1;var i=n.tag,s;if((s=i!==3&&i!==27)&&((s=i===5)&&(s=n.type,s=!(s!=="form"&&s!=="button")||Hf(n.type,n.memoizedProps)),s=!s),s&&en&&Hi(n),e0(n),i===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(317));en=Nb(n)}else if(i===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(317));en=Nb(n)}else i===27?(i=en,na(n.type)?(n=Vf,Vf=null,en=n):en=i):en=Mn?Sr(n.stateNode.nextSibling):null;return!0}function Ra(){en=Mn=null,kt=!1}function Ed(){var n=Pi;return n!==null&&(tr===null?tr=n:tr.push.apply(tr,n),Pi=null),n}function hl(n){Pi===null?Pi=[n]:Pi.push(n)}var Nd=D(null),Aa=null,pi=null;function qi(n,i,s){z(Nd,i._currentValue),i._currentValue=s}function gi(n){n._currentValue=Nd.current,B(Nd)}function Sd(n,i,s){for(;n!==null;){var u=n.alternate;if((n.childLanes&i)!==i?(n.childLanes|=i,u!==null&&(u.childLanes|=i)):u!==null&&(u.childLanes&i)!==i&&(u.childLanes|=i),n===s)break;n=n.return}}function zd(n,i,s,u){var p=n.child;for(p!==null&&(p.return=n);p!==null;){var b=p.dependencies;if(b!==null){var w=p.child;b=b.firstContext;e:for(;b!==null;){var C=b;b=p;for(var I=0;I<i.length;I++)if(C.context===i[I]){b.lanes|=s,C=b.alternate,C!==null&&(C.lanes|=s),Sd(b.return,s,n),u||(w=null);break e}b=C.next}}else if(p.tag===18){if(w=p.return,w===null)throw Error(a(341));w.lanes|=s,b=w.alternate,b!==null&&(b.lanes|=s),Sd(w,s,n),w=null}else w=p.child;if(w!==null)w.return=p;else for(w=p;w!==null;){if(w===n){w=null;break}if(p=w.sibling,p!==null){p.return=w.return,w=p;break}w=w.return}p=w}}function fs(n,i,s,u){n=null;for(var p=i,b=!1;p!==null;){if(!b){if((p.flags&524288)!==0)b=!0;else if((p.flags&262144)!==0)break}if(p.tag===10){var w=p.alternate;if(w===null)throw Error(a(387));if(w=w.memoizedProps,w!==null){var C=p.type;lr(p.pendingProps.value,w.value)||(n!==null?n.push(C):n=[C])}}else if(p===le.current){if(w=p.alternate,w===null)throw Error(a(387));w.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(n!==null?n.push(Fl):n=[Fl])}p=p.return}n!==null&&zd(i,n,s,u),i.flags|=262144}function ec(n){for(n=n.firstContext;n!==null;){if(!lr(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function Oa(n){Aa=n,pi=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function jn(n){return t0(Aa,n)}function tc(n,i){return Aa===null&&Oa(n),t0(n,i)}function t0(n,i){var s=i._currentValue;if(i={context:i,memoizedValue:s,next:null},pi===null){if(n===null)throw Error(a(308));pi=i,n.dependencies={lanes:0,firstContext:i},n.flags|=524288}else pi=pi.next=i;return s}var B_=typeof AbortController<"u"?AbortController:function(){var n=[],i=this.signal={aborted:!1,addEventListener:function(s,u){n.push(u)}};this.abort=function(){i.aborted=!0,n.forEach(function(s){return s()})}},U_=e.unstable_scheduleCallback,F_=e.unstable_NormalPriority,gn={$$typeof:T,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Cd(){return{controller:new B_,data:new Map,refCount:0}}function ml(n){n.refCount--,n.refCount===0&&U_(F_,function(){n.controller.abort()})}var pl=null,Td=0,hs=0,ms=null;function P_(n,i){if(pl===null){var s=pl=[];Td=0,hs=Mf(),ms={status:"pending",value:void 0,then:function(u){s.push(u)}}}return Td++,i.then(n0,n0),i}function n0(){if(--Td===0&&pl!==null){ms!==null&&(ms.status="fulfilled");var n=pl;pl=null,hs=0,ms=null;for(var i=0;i<n.length;i++)(0,n[i])()}}function H_(n,i){var s=[],u={status:"pending",value:null,reason:null,then:function(p){s.push(p)}};return n.then(function(){u.status="fulfilled",u.value=i;for(var p=0;p<s.length;p++)(0,s[p])(i)},function(p){for(u.status="rejected",u.reason=p,p=0;p<s.length;p++)(0,s[p])(void 0)}),u}var r0=M.S;M.S=function(n,i){Fg=Wt(),typeof i=="object"&&i!==null&&typeof i.then=="function"&&P_(n,i),r0!==null&&r0(n,i)};var Ma=D(null);function Rd(){var n=Ma.current;return n!==null?n:Vt.pooledCache}function nc(n,i){i===null?z(Ma,Ma.current):z(Ma,i.pool)}function i0(){var n=Rd();return n===null?null:{parent:gn._currentValue,pool:n}}var ps=Error(a(460)),Ad=Error(a(474)),rc=Error(a(542)),ic={then:function(){}};function a0(n){return n=n.status,n==="fulfilled"||n==="rejected"}function s0(n,i,s){switch(s=n[s],s===void 0?n.push(i):s!==i&&(i.then(Se,Se),i=s),i.status){case"fulfilled":return i.value;case"rejected":throw n=i.reason,o0(n),n;default:if(typeof i.status=="string")i.then(Se,Se);else{if(n=Vt,n!==null&&100<n.shellSuspendCounter)throw Error(a(482));n=i,n.status="pending",n.then(function(u){if(i.status==="pending"){var p=i;p.status="fulfilled",p.value=u}},function(u){if(i.status==="pending"){var p=i;p.status="rejected",p.reason=u}})}switch(i.status){case"fulfilled":return i.value;case"rejected":throw n=i.reason,o0(n),n}throw Da=i,ps}}function ja(n){try{var i=n._init;return i(n._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(Da=s,ps):s}}var Da=null;function l0(){if(Da===null)throw Error(a(459));var n=Da;return Da=null,n}function o0(n){if(n===ps||n===rc)throw Error(a(483))}var gs=null,gl=0;function ac(n){var i=gl;return gl+=1,gs===null&&(gs=[]),s0(gs,n,i)}function bl(n,i){i=i.props.ref,n.ref=i!==void 0?i:null}function sc(n,i){throw i.$$typeof===y?Error(a(525)):(n=Object.prototype.toString.call(i),Error(a(31,n==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":n)))}function c0(n){function i(K,q){if(n){var X=K.deletions;X===null?(K.deletions=[q],K.flags|=16):X.push(q)}}function s(K,q){if(!n)return null;for(;q!==null;)i(K,q),q=q.sibling;return null}function u(K){for(var q=new Map;K!==null;)K.key!==null?q.set(K.key,K):q.set(K.index,K),K=K.sibling;return q}function p(K,q){return K=hi(K,q),K.index=0,K.sibling=null,K}function b(K,q,X){return K.index=X,n?(X=K.alternate,X!==null?(X=X.index,X<q?(K.flags|=67108866,q):X):(K.flags|=67108866,q)):(K.flags|=1048576,q)}function w(K){return n&&K.alternate===null&&(K.flags|=67108866),K}function C(K,q,X,de){return q===null||q.tag!==6?(q=yd(X,K.mode,de),q.return=K,q):(q=p(q,X),q.return=K,q)}function I(K,q,X,de){var Ge=X.type;return Ge===E?oe(K,q,X.props.children,de,X.key):q!==null&&(q.elementType===Ge||typeof Ge=="object"&&Ge!==null&&Ge.$$typeof===A&&ja(Ge)===q.type)?(q=p(q,X.props),bl(q,X),q.return=K,q):(q=Wo(X.type,X.key,X.props,null,K.mode,de),bl(q,X),q.return=K,q)}function Z(K,q,X,de){return q===null||q.tag!==4||q.stateNode.containerInfo!==X.containerInfo||q.stateNode.implementation!==X.implementation?(q=vd(X,K.mode,de),q.return=K,q):(q=p(q,X.children||[]),q.return=K,q)}function oe(K,q,X,de,Ge){return q===null||q.tag!==7?(q=Ta(X,K.mode,de,Ge),q.return=K,q):(q=p(q,X),q.return=K,q)}function he(K,q,X){if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return q=yd(""+q,K.mode,X),q.return=K,q;if(typeof q=="object"&&q!==null){switch(q.$$typeof){case v:return X=Wo(q.type,q.key,q.props,null,K.mode,X),bl(X,q),X.return=K,X;case k:return q=vd(q,K.mode,X),q.return=K,q;case A:return q=ja(q),he(K,q,X)}if(Q(q)||te(q))return q=Ta(q,K.mode,X,null),q.return=K,q;if(typeof q.then=="function")return he(K,ac(q),X);if(q.$$typeof===T)return he(K,tc(K,q),X);sc(K,q)}return null}function J(K,q,X,de){var Ge=q!==null?q.key:null;if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return Ge!==null?null:C(K,q,""+X,de);if(typeof X=="object"&&X!==null){switch(X.$$typeof){case v:return X.key===Ge?I(K,q,X,de):null;case k:return X.key===Ge?Z(K,q,X,de):null;case A:return X=ja(X),J(K,q,X,de)}if(Q(X)||te(X))return Ge!==null?null:oe(K,q,X,de,null);if(typeof X.then=="function")return J(K,q,ac(X),de);if(X.$$typeof===T)return J(K,q,tc(K,X),de);sc(K,X)}return null}function ne(K,q,X,de,Ge){if(typeof de=="string"&&de!==""||typeof de=="number"||typeof de=="bigint")return K=K.get(X)||null,C(q,K,""+de,Ge);if(typeof de=="object"&&de!==null){switch(de.$$typeof){case v:return K=K.get(de.key===null?X:de.key)||null,I(q,K,de,Ge);case k:return K=K.get(de.key===null?X:de.key)||null,Z(q,K,de,Ge);case A:return de=ja(de),ne(K,q,X,de,Ge)}if(Q(de)||te(de))return K=K.get(X)||null,oe(q,K,de,Ge,null);if(typeof de.then=="function")return ne(K,q,X,ac(de),Ge);if(de.$$typeof===T)return ne(K,q,X,tc(q,de),Ge);sc(q,de)}return null}function je(K,q,X,de){for(var Ge=null,Ot=null,Pe=q,at=q=0,vt=null;Pe!==null&&at<X.length;at++){Pe.index>at?(vt=Pe,Pe=null):vt=Pe.sibling;var Mt=J(K,Pe,X[at],de);if(Mt===null){Pe===null&&(Pe=vt);break}n&&Pe&&Mt.alternate===null&&i(K,Pe),q=b(Mt,q,at),Ot===null?Ge=Mt:Ot.sibling=Mt,Ot=Mt,Pe=vt}if(at===X.length)return s(K,Pe),kt&&mi(K,at),Ge;if(Pe===null){for(;at<X.length;at++)Pe=he(K,X[at],de),Pe!==null&&(q=b(Pe,q,at),Ot===null?Ge=Pe:Ot.sibling=Pe,Ot=Pe);return kt&&mi(K,at),Ge}for(Pe=u(Pe);at<X.length;at++)vt=ne(Pe,K,at,X[at],de),vt!==null&&(n&&vt.alternate!==null&&Pe.delete(vt.key===null?at:vt.key),q=b(vt,q,at),Ot===null?Ge=vt:Ot.sibling=vt,Ot=vt);return n&&Pe.forEach(function(la){return i(K,la)}),kt&&mi(K,at),Ge}function Ye(K,q,X,de){if(X==null)throw Error(a(151));for(var Ge=null,Ot=null,Pe=q,at=q=0,vt=null,Mt=X.next();Pe!==null&&!Mt.done;at++,Mt=X.next()){Pe.index>at?(vt=Pe,Pe=null):vt=Pe.sibling;var la=J(K,Pe,Mt.value,de);if(la===null){Pe===null&&(Pe=vt);break}n&&Pe&&la.alternate===null&&i(K,Pe),q=b(la,q,at),Ot===null?Ge=la:Ot.sibling=la,Ot=la,Pe=vt}if(Mt.done)return s(K,Pe),kt&&mi(K,at),Ge;if(Pe===null){for(;!Mt.done;at++,Mt=X.next())Mt=he(K,Mt.value,de),Mt!==null&&(q=b(Mt,q,at),Ot===null?Ge=Mt:Ot.sibling=Mt,Ot=Mt);return kt&&mi(K,at),Ge}for(Pe=u(Pe);!Mt.done;at++,Mt=X.next())Mt=ne(Pe,K,at,Mt.value,de),Mt!==null&&(n&&Mt.alternate!==null&&Pe.delete(Mt.key===null?at:Mt.key),q=b(Mt,q,at),Ot===null?Ge=Mt:Ot.sibling=Mt,Ot=Mt);return n&&Pe.forEach(function(JE){return i(K,JE)}),kt&&mi(K,at),Ge}function Gt(K,q,X,de){if(typeof X=="object"&&X!==null&&X.type===E&&X.key===null&&(X=X.props.children),typeof X=="object"&&X!==null){switch(X.$$typeof){case v:e:{for(var Ge=X.key;q!==null;){if(q.key===Ge){if(Ge=X.type,Ge===E){if(q.tag===7){s(K,q.sibling),de=p(q,X.props.children),de.return=K,K=de;break e}}else if(q.elementType===Ge||typeof Ge=="object"&&Ge!==null&&Ge.$$typeof===A&&ja(Ge)===q.type){s(K,q.sibling),de=p(q,X.props),bl(de,X),de.return=K,K=de;break e}s(K,q);break}else i(K,q);q=q.sibling}X.type===E?(de=Ta(X.props.children,K.mode,de,X.key),de.return=K,K=de):(de=Wo(X.type,X.key,X.props,null,K.mode,de),bl(de,X),de.return=K,K=de)}return w(K);case k:e:{for(Ge=X.key;q!==null;){if(q.key===Ge)if(q.tag===4&&q.stateNode.containerInfo===X.containerInfo&&q.stateNode.implementation===X.implementation){s(K,q.sibling),de=p(q,X.children||[]),de.return=K,K=de;break e}else{s(K,q);break}else i(K,q);q=q.sibling}de=vd(X,K.mode,de),de.return=K,K=de}return w(K);case A:return X=ja(X),Gt(K,q,X,de)}if(Q(X))return je(K,q,X,de);if(te(X)){if(Ge=te(X),typeof Ge!="function")throw Error(a(150));return X=Ge.call(X),Ye(K,q,X,de)}if(typeof X.then=="function")return Gt(K,q,ac(X),de);if(X.$$typeof===T)return Gt(K,q,tc(K,X),de);sc(K,X)}return typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint"?(X=""+X,q!==null&&q.tag===6?(s(K,q.sibling),de=p(q,X),de.return=K,K=de):(s(K,q),de=yd(X,K.mode,de),de.return=K,K=de),w(K)):s(K,q)}return function(K,q,X,de){try{gl=0;var Ge=Gt(K,q,X,de);return gs=null,Ge}catch(Pe){if(Pe===ps||Pe===rc)throw Pe;var Ot=or(29,Pe,null,K.mode);return Ot.lanes=de,Ot.return=K,Ot}finally{}}}var La=c0(!0),u0=c0(!1),$i=!1;function Od(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Md(n,i){n=n.updateQueue,i.updateQueue===n&&(i.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function Gi(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function Ki(n,i,s){var u=n.updateQueue;if(u===null)return null;if(u=u.shared,(jt&2)!==0){var p=u.pending;return p===null?i.next=i:(i.next=p.next,p.next=i),u.pending=i,i=Zo(n),Vp(n,null,s),i}return Xo(n,u,i,s),Zo(n)}function xl(n,i,s){if(i=i.updateQueue,i!==null&&(i=i.shared,(s&4194048)!==0)){var u=i.lanes;u&=n.pendingLanes,s|=u,i.lanes=s,Ve(n,s)}}function jd(n,i){var s=n.updateQueue,u=n.alternate;if(u!==null&&(u=u.updateQueue,s===u)){var p=null,b=null;if(s=s.firstBaseUpdate,s!==null){do{var w={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};b===null?p=b=w:b=b.next=w,s=s.next}while(s!==null);b===null?p=b=i:b=b.next=i}else p=b=i;s={baseState:u.baseState,firstBaseUpdate:p,lastBaseUpdate:b,shared:u.shared,callbacks:u.callbacks},n.updateQueue=s;return}n=s.lastBaseUpdate,n===null?s.firstBaseUpdate=i:n.next=i,s.lastBaseUpdate=i}var Dd=!1;function yl(){if(Dd){var n=ms;if(n!==null)throw n}}function vl(n,i,s,u){Dd=!1;var p=n.updateQueue;$i=!1;var b=p.firstBaseUpdate,w=p.lastBaseUpdate,C=p.shared.pending;if(C!==null){p.shared.pending=null;var I=C,Z=I.next;I.next=null,w===null?b=Z:w.next=Z,w=I;var oe=n.alternate;oe!==null&&(oe=oe.updateQueue,C=oe.lastBaseUpdate,C!==w&&(C===null?oe.firstBaseUpdate=Z:C.next=Z,oe.lastBaseUpdate=I))}if(b!==null){var he=p.baseState;w=0,oe=Z=I=null,C=b;do{var J=C.lane&-536870913,ne=J!==C.lane;if(ne?(yt&J)===J:(u&J)===J){J!==0&&J===hs&&(Dd=!0),oe!==null&&(oe=oe.next={lane:0,tag:C.tag,payload:C.payload,callback:null,next:null});e:{var je=n,Ye=C;J=i;var Gt=s;switch(Ye.tag){case 1:if(je=Ye.payload,typeof je=="function"){he=je.call(Gt,he,J);break e}he=je;break e;case 3:je.flags=je.flags&-65537|128;case 0:if(je=Ye.payload,J=typeof je=="function"?je.call(Gt,he,J):je,J==null)break e;he=x({},he,J);break e;case 2:$i=!0}}J=C.callback,J!==null&&(n.flags|=64,ne&&(n.flags|=8192),ne=p.callbacks,ne===null?p.callbacks=[J]:ne.push(J))}else ne={lane:J,tag:C.tag,payload:C.payload,callback:C.callback,next:null},oe===null?(Z=oe=ne,I=he):oe=oe.next=ne,w|=J;if(C=C.next,C===null){if(C=p.shared.pending,C===null)break;ne=C,C=ne.next,ne.next=null,p.lastBaseUpdate=ne,p.shared.pending=null}}while(!0);oe===null&&(I=he),p.baseState=I,p.firstBaseUpdate=Z,p.lastBaseUpdate=oe,b===null&&(p.shared.lanes=0),Zi|=w,n.lanes=w,n.memoizedState=he}}function d0(n,i){if(typeof n!="function")throw Error(a(191,n));n.call(i)}function f0(n,i){var s=n.callbacks;if(s!==null)for(n.callbacks=null,n=0;n<s.length;n++)d0(s[n],i)}var bs=D(null),lc=D(0);function h0(n,i){n=Ni,z(lc,n),z(bs,i),Ni=n|i.baseLanes}function Ld(){z(lc,Ni),z(bs,bs.current)}function Id(){Ni=lc.current,B(bs),B(lc)}var cr=D(null),Nr=null;function Vi(n){var i=n.alternate;z(fn,fn.current&1),z(cr,n),Nr===null&&(i===null||bs.current!==null||i.memoizedState!==null)&&(Nr=n)}function Bd(n){z(fn,fn.current),z(cr,n),Nr===null&&(Nr=n)}function m0(n){n.tag===22?(z(fn,fn.current),z(cr,n),Nr===null&&(Nr=n)):Yi()}function Yi(){z(fn,fn.current),z(cr,cr.current)}function ur(n){B(cr),Nr===n&&(Nr=null),B(fn)}var fn=D(0);function oc(n){for(var i=n;i!==null;){if(i.tag===13){var s=i.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||Gf(s)||Kf(s)))return i}else if(i.tag===19&&(i.memoizedProps.revealOrder==="forwards"||i.memoizedProps.revealOrder==="backwards"||i.memoizedProps.revealOrder==="unstable_legacy-backwards"||i.memoizedProps.revealOrder==="together")){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===n)break;for(;i.sibling===null;){if(i.return===null||i.return===n)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var bi=0,it=null,qt=null,bn=null,cc=!1,xs=!1,Ia=!1,uc=0,kl=0,ys=null,q_=0;function ln(){throw Error(a(321))}function Ud(n,i){if(i===null)return!1;for(var s=0;s<i.length&&s<n.length;s++)if(!lr(n[s],i[s]))return!1;return!0}function Fd(n,i,s,u,p,b){return bi=b,it=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,M.H=n===null||n.memoizedState===null?Z0:tf,Ia=!1,b=s(u,p),Ia=!1,xs&&(b=g0(i,s,u,p)),p0(n),b}function p0(n){M.H=El;var i=qt!==null&&qt.next!==null;if(bi=0,bn=qt=it=null,cc=!1,kl=0,ys=null,i)throw Error(a(300));n===null||xn||(n=n.dependencies,n!==null&&ec(n)&&(xn=!0))}function g0(n,i,s,u){it=n;var p=0;do{if(xs&&(ys=null),kl=0,xs=!1,25<=p)throw Error(a(301));if(p+=1,bn=qt=null,n.updateQueue!=null){var b=n.updateQueue;b.lastEffect=null,b.events=null,b.stores=null,b.memoCache!=null&&(b.memoCache.index=0)}M.H=W0,b=i(s,u)}while(xs);return b}function $_(){var n=M.H,i=n.useState()[0];return i=typeof i.then=="function"?wl(i):i,n=n.useState()[0],(qt!==null?qt.memoizedState:null)!==n&&(it.flags|=1024),i}function Pd(){var n=uc!==0;return uc=0,n}function Hd(n,i,s){i.updateQueue=n.updateQueue,i.flags&=-2053,n.lanes&=~s}function qd(n){if(cc){for(n=n.memoizedState;n!==null;){var i=n.queue;i!==null&&(i.pending=null),n=n.next}cc=!1}bi=0,bn=qt=it=null,xs=!1,kl=uc=0,ys=null}function $n(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return bn===null?it.memoizedState=bn=n:bn=bn.next=n,bn}function hn(){if(qt===null){var n=it.alternate;n=n!==null?n.memoizedState:null}else n=qt.next;var i=bn===null?it.memoizedState:bn.next;if(i!==null)bn=i,qt=n;else{if(n===null)throw it.alternate===null?Error(a(467)):Error(a(310));qt=n,n={memoizedState:qt.memoizedState,baseState:qt.baseState,baseQueue:qt.baseQueue,queue:qt.queue,next:null},bn===null?it.memoizedState=bn=n:bn=bn.next=n}return bn}function dc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function wl(n){var i=kl;return kl+=1,ys===null&&(ys=[]),n=s0(ys,n,i),i=it,(bn===null?i.memoizedState:bn.next)===null&&(i=i.alternate,M.H=i===null||i.memoizedState===null?Z0:tf),n}function fc(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return wl(n);if(n.$$typeof===T)return jn(n)}throw Error(a(438,String(n)))}function $d(n){var i=null,s=it.updateQueue;if(s!==null&&(i=s.memoCache),i==null){var u=it.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(i={data:u.data.map(function(p){return p.slice()}),index:0})))}if(i==null&&(i={data:[],index:0}),s===null&&(s=dc(),it.updateQueue=s),s.memoCache=i,s=i.data[i.index],s===void 0)for(s=i.data[i.index]=Array(n),u=0;u<n;u++)s[u]=F;return i.index++,s}function xi(n,i){return typeof i=="function"?i(n):i}function hc(n){var i=hn();return Gd(i,qt,n)}function Gd(n,i,s){var u=n.queue;if(u===null)throw Error(a(311));u.lastRenderedReducer=s;var p=n.baseQueue,b=u.pending;if(b!==null){if(p!==null){var w=p.next;p.next=b.next,b.next=w}i.baseQueue=p=b,u.pending=null}if(b=n.baseState,p===null)n.memoizedState=b;else{i=p.next;var C=w=null,I=null,Z=i,oe=!1;do{var he=Z.lane&-536870913;if(he!==Z.lane?(yt&he)===he:(bi&he)===he){var J=Z.revertLane;if(J===0)I!==null&&(I=I.next={lane:0,revertLane:0,gesture:null,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null}),he===hs&&(oe=!0);else if((bi&J)===J){Z=Z.next,J===hs&&(oe=!0);continue}else he={lane:0,revertLane:Z.revertLane,gesture:null,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null},I===null?(C=I=he,w=b):I=I.next=he,it.lanes|=J,Zi|=J;he=Z.action,Ia&&s(b,he),b=Z.hasEagerState?Z.eagerState:s(b,he)}else J={lane:he,revertLane:Z.revertLane,gesture:Z.gesture,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null},I===null?(C=I=J,w=b):I=I.next=J,it.lanes|=he,Zi|=he;Z=Z.next}while(Z!==null&&Z!==i);if(I===null?w=b:I.next=C,!lr(b,n.memoizedState)&&(xn=!0,oe&&(s=ms,s!==null)))throw s;n.memoizedState=b,n.baseState=w,n.baseQueue=I,u.lastRenderedState=b}return p===null&&(u.lanes=0),[n.memoizedState,u.dispatch]}function Kd(n){var i=hn(),s=i.queue;if(s===null)throw Error(a(311));s.lastRenderedReducer=n;var u=s.dispatch,p=s.pending,b=i.memoizedState;if(p!==null){s.pending=null;var w=p=p.next;do b=n(b,w.action),w=w.next;while(w!==p);lr(b,i.memoizedState)||(xn=!0),i.memoizedState=b,i.baseQueue===null&&(i.baseState=b),s.lastRenderedState=b}return[b,u]}function b0(n,i,s){var u=it,p=hn(),b=kt;if(b){if(s===void 0)throw Error(a(407));s=s()}else s=i();var w=!lr((qt||p).memoizedState,s);if(w&&(p.memoizedState=s,xn=!0),p=p.queue,Qd(v0.bind(null,u,p,n),[n]),p.getSnapshot!==i||w||bn!==null&&bn.memoizedState.tag&1){if(u.flags|=2048,vs(9,{destroy:void 0},y0.bind(null,u,p,s,i),null),Vt===null)throw Error(a(349));b||(bi&127)!==0||x0(u,i,s)}return s}function x0(n,i,s){n.flags|=16384,n={getSnapshot:i,value:s},i=it.updateQueue,i===null?(i=dc(),it.updateQueue=i,i.stores=[n]):(s=i.stores,s===null?i.stores=[n]:s.push(n))}function y0(n,i,s,u){i.value=s,i.getSnapshot=u,k0(i)&&w0(n)}function v0(n,i,s){return s(function(){k0(i)&&w0(n)})}function k0(n){var i=n.getSnapshot;n=n.value;try{var s=i();return!lr(n,s)}catch{return!0}}function w0(n){var i=Ca(n,2);i!==null&&nr(i,n,2)}function Vd(n){var i=$n();if(typeof n=="function"){var s=n;if(n=s(),Ia){Qt(!0);try{s()}finally{Qt(!1)}}}return i.memoizedState=i.baseState=n,i.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:xi,lastRenderedState:n},i}function _0(n,i,s,u){return n.baseState=s,Gd(n,qt,typeof u=="function"?u:xi)}function G_(n,i,s,u,p){if(gc(n))throw Error(a(485));if(n=i.action,n!==null){var b={payload:p,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(w){b.listeners.push(w)}};M.T!==null?s(!0):b.isTransition=!1,u(b),s=i.pending,s===null?(b.next=i.pending=b,E0(i,b)):(b.next=s.next,i.pending=s.next=b)}}function E0(n,i){var s=i.action,u=i.payload,p=n.state;if(i.isTransition){var b=M.T,w={};M.T=w;try{var C=s(p,u),I=M.S;I!==null&&I(w,C),N0(n,i,C)}catch(Z){Yd(n,i,Z)}finally{b!==null&&w.types!==null&&(b.types=w.types),M.T=b}}else try{b=s(p,u),N0(n,i,b)}catch(Z){Yd(n,i,Z)}}function N0(n,i,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(u){S0(n,i,u)},function(u){return Yd(n,i,u)}):S0(n,i,s)}function S0(n,i,s){i.status="fulfilled",i.value=s,z0(i),n.state=s,i=n.pending,i!==null&&(s=i.next,s===i?n.pending=null:(s=s.next,i.next=s,E0(n,s)))}function Yd(n,i,s){var u=n.pending;if(n.pending=null,u!==null){u=u.next;do i.status="rejected",i.reason=s,z0(i),i=i.next;while(i!==u)}n.action=null}function z0(n){n=n.listeners;for(var i=0;i<n.length;i++)(0,n[i])()}function C0(n,i){return i}function T0(n,i){if(kt){var s=Vt.formState;if(s!==null){e:{var u=it;if(kt){if(en){t:{for(var p=en,b=Er;p.nodeType!==8;){if(!b){p=null;break t}if(p=Sr(p.nextSibling),p===null){p=null;break t}}b=p.data,p=b==="F!"||b==="F"?p:null}if(p){en=Sr(p.nextSibling),u=p.data==="F!";break e}}Hi(u)}u=!1}u&&(i=s[0])}}return s=$n(),s.memoizedState=s.baseState=i,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:C0,lastRenderedState:i},s.queue=u,s=Y0.bind(null,it,u),u.dispatch=s,u=Vd(!1),b=ef.bind(null,it,!1,u.queue),u=$n(),p={state:i,dispatch:null,action:n,pending:null},u.queue=p,s=G_.bind(null,it,p,b,s),p.dispatch=s,u.memoizedState=n,[i,s,!1]}function R0(n){var i=hn();return A0(i,qt,n)}function A0(n,i,s){if(i=Gd(n,i,C0)[0],n=hc(xi)[0],typeof i=="object"&&i!==null&&typeof i.then=="function")try{var u=wl(i)}catch(w){throw w===ps?rc:w}else u=i;i=hn();var p=i.queue,b=p.dispatch;return s!==i.memoizedState&&(it.flags|=2048,vs(9,{destroy:void 0},K_.bind(null,p,s),null)),[u,b,n]}function K_(n,i){n.action=i}function O0(n){var i=hn(),s=qt;if(s!==null)return A0(i,s,n);hn(),i=i.memoizedState,s=hn();var u=s.queue.dispatch;return s.memoizedState=n,[i,u,!1]}function vs(n,i,s,u){return n={tag:n,create:s,deps:u,inst:i,next:null},i=it.updateQueue,i===null&&(i=dc(),it.updateQueue=i),s=i.lastEffect,s===null?i.lastEffect=n.next=n:(u=s.next,s.next=n,n.next=u,i.lastEffect=n),n}function M0(){return hn().memoizedState}function mc(n,i,s,u){var p=$n();it.flags|=n,p.memoizedState=vs(1|i,{destroy:void 0},s,u===void 0?null:u)}function pc(n,i,s,u){var p=hn();u=u===void 0?null:u;var b=p.memoizedState.inst;qt!==null&&u!==null&&Ud(u,qt.memoizedState.deps)?p.memoizedState=vs(i,b,s,u):(it.flags|=n,p.memoizedState=vs(1|i,b,s,u))}function j0(n,i){mc(8390656,8,n,i)}function Qd(n,i){pc(2048,8,n,i)}function V_(n){it.flags|=4;var i=it.updateQueue;if(i===null)i=dc(),it.updateQueue=i,i.events=[n];else{var s=i.events;s===null?i.events=[n]:s.push(n)}}function D0(n){var i=hn().memoizedState;return V_({ref:i,nextImpl:n}),function(){if((jt&2)!==0)throw Error(a(440));return i.impl.apply(void 0,arguments)}}function L0(n,i){return pc(4,2,n,i)}function I0(n,i){return pc(4,4,n,i)}function B0(n,i){if(typeof i=="function"){n=n();var s=i(n);return function(){typeof s=="function"?s():i(null)}}if(i!=null)return n=n(),i.current=n,function(){i.current=null}}function U0(n,i,s){s=s!=null?s.concat([n]):null,pc(4,4,B0.bind(null,i,n),s)}function Xd(){}function F0(n,i){var s=hn();i=i===void 0?null:i;var u=s.memoizedState;return i!==null&&Ud(i,u[1])?u[0]:(s.memoizedState=[n,i],n)}function P0(n,i){var s=hn();i=i===void 0?null:i;var u=s.memoizedState;if(i!==null&&Ud(i,u[1]))return u[0];if(u=n(),Ia){Qt(!0);try{n()}finally{Qt(!1)}}return s.memoizedState=[u,i],u}function Zd(n,i,s){return s===void 0||(bi&1073741824)!==0&&(yt&261930)===0?n.memoizedState=i:(n.memoizedState=s,n=Hg(),it.lanes|=n,Zi|=n,s)}function H0(n,i,s,u){return lr(s,i)?s:bs.current!==null?(n=Zd(n,s,u),lr(n,i)||(xn=!0),n):(bi&42)===0||(bi&1073741824)!==0&&(yt&261930)===0?(xn=!0,n.memoizedState=s):(n=Hg(),it.lanes|=n,Zi|=n,i)}function q0(n,i,s,u,p){var b=Y.p;Y.p=b!==0&&8>b?b:8;var w=M.T,C={};M.T=C,ef(n,!1,i,s);try{var I=p(),Z=M.S;if(Z!==null&&Z(C,I),I!==null&&typeof I=="object"&&typeof I.then=="function"){var oe=H_(I,u);_l(n,i,oe,hr(n))}else _l(n,i,u,hr(n))}catch(he){_l(n,i,{then:function(){},status:"rejected",reason:he},hr())}finally{Y.p=b,w!==null&&C.types!==null&&(w.types=C.types),M.T=w}}function Y_(){}function Wd(n,i,s,u){if(n.tag!==5)throw Error(a(476));var p=$0(n).queue;q0(n,p,i,V,s===null?Y_:function(){return G0(n),s(u)})}function $0(n){var i=n.memoizedState;if(i!==null)return i;i={memoizedState:V,baseState:V,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:xi,lastRenderedState:V},next:null};var s={};return i.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:xi,lastRenderedState:s},next:null},n.memoizedState=i,n=n.alternate,n!==null&&(n.memoizedState=i),i}function G0(n){var i=$0(n);i.next===null&&(i=n.alternate.memoizedState),_l(n,i.next.queue,{},hr())}function Jd(){return jn(Fl)}function K0(){return hn().memoizedState}function V0(){return hn().memoizedState}function Q_(n){for(var i=n.return;i!==null;){switch(i.tag){case 24:case 3:var s=hr();n=Gi(s);var u=Ki(i,n,s);u!==null&&(nr(u,i,s),xl(u,i,s)),i={cache:Cd()},n.payload=i;return}i=i.return}}function X_(n,i,s){var u=hr();s={lane:u,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},gc(n)?Q0(i,s):(s=bd(n,i,s,u),s!==null&&(nr(s,n,u),X0(s,i,u)))}function Y0(n,i,s){var u=hr();_l(n,i,s,u)}function _l(n,i,s,u){var p={lane:u,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(gc(n))Q0(i,p);else{var b=n.alternate;if(n.lanes===0&&(b===null||b.lanes===0)&&(b=i.lastRenderedReducer,b!==null))try{var w=i.lastRenderedState,C=b(w,s);if(p.hasEagerState=!0,p.eagerState=C,lr(C,w))return Xo(n,i,p,0),Vt===null&&Qo(),!1}catch{}finally{}if(s=bd(n,i,p,u),s!==null)return nr(s,n,u),X0(s,i,u),!0}return!1}function ef(n,i,s,u){if(u={lane:2,revertLane:Mf(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},gc(n)){if(i)throw Error(a(479))}else i=bd(n,s,u,2),i!==null&&nr(i,n,2)}function gc(n){var i=n.alternate;return n===it||i!==null&&i===it}function Q0(n,i){xs=cc=!0;var s=n.pending;s===null?i.next=i:(i.next=s.next,s.next=i),n.pending=i}function X0(n,i,s){if((s&4194048)!==0){var u=i.lanes;u&=n.pendingLanes,s|=u,i.lanes=s,Ve(n,s)}}var El={readContext:jn,use:fc,useCallback:ln,useContext:ln,useEffect:ln,useImperativeHandle:ln,useLayoutEffect:ln,useInsertionEffect:ln,useMemo:ln,useReducer:ln,useRef:ln,useState:ln,useDebugValue:ln,useDeferredValue:ln,useTransition:ln,useSyncExternalStore:ln,useId:ln,useHostTransitionStatus:ln,useFormState:ln,useActionState:ln,useOptimistic:ln,useMemoCache:ln,useCacheRefresh:ln};El.useEffectEvent=ln;var Z0={readContext:jn,use:fc,useCallback:function(n,i){return $n().memoizedState=[n,i===void 0?null:i],n},useContext:jn,useEffect:j0,useImperativeHandle:function(n,i,s){s=s!=null?s.concat([n]):null,mc(4194308,4,B0.bind(null,i,n),s)},useLayoutEffect:function(n,i){return mc(4194308,4,n,i)},useInsertionEffect:function(n,i){mc(4,2,n,i)},useMemo:function(n,i){var s=$n();i=i===void 0?null:i;var u=n();if(Ia){Qt(!0);try{n()}finally{Qt(!1)}}return s.memoizedState=[u,i],u},useReducer:function(n,i,s){var u=$n();if(s!==void 0){var p=s(i);if(Ia){Qt(!0);try{s(i)}finally{Qt(!1)}}}else p=i;return u.memoizedState=u.baseState=p,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:p},u.queue=n,n=n.dispatch=X_.bind(null,it,n),[u.memoizedState,n]},useRef:function(n){var i=$n();return n={current:n},i.memoizedState=n},useState:function(n){n=Vd(n);var i=n.queue,s=Y0.bind(null,it,i);return i.dispatch=s,[n.memoizedState,s]},useDebugValue:Xd,useDeferredValue:function(n,i){var s=$n();return Zd(s,n,i)},useTransition:function(){var n=Vd(!1);return n=q0.bind(null,it,n.queue,!0,!1),$n().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,i,s){var u=it,p=$n();if(kt){if(s===void 0)throw Error(a(407));s=s()}else{if(s=i(),Vt===null)throw Error(a(349));(yt&127)!==0||x0(u,i,s)}p.memoizedState=s;var b={value:s,getSnapshot:i};return p.queue=b,j0(v0.bind(null,u,b,n),[n]),u.flags|=2048,vs(9,{destroy:void 0},y0.bind(null,u,b,s,i),null),s},useId:function(){var n=$n(),i=Vt.identifierPrefix;if(kt){var s=Xr,u=Qr;s=(u&~(1<<32-Rt(u)-1)).toString(32)+s,i="_"+i+"R_"+s,s=uc++,0<s&&(i+="H"+s.toString(32)),i+="_"}else s=q_++,i="_"+i+"r_"+s.toString(32)+"_";return n.memoizedState=i},useHostTransitionStatus:Jd,useFormState:T0,useActionState:T0,useOptimistic:function(n){var i=$n();i.memoizedState=i.baseState=n;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=s,i=ef.bind(null,it,!0,s),s.dispatch=i,[n,i]},useMemoCache:$d,useCacheRefresh:function(){return $n().memoizedState=Q_.bind(null,it)},useEffectEvent:function(n){var i=$n(),s={impl:n};return i.memoizedState=s,function(){if((jt&2)!==0)throw Error(a(440));return s.impl.apply(void 0,arguments)}}},tf={readContext:jn,use:fc,useCallback:F0,useContext:jn,useEffect:Qd,useImperativeHandle:U0,useInsertionEffect:L0,useLayoutEffect:I0,useMemo:P0,useReducer:hc,useRef:M0,useState:function(){return hc(xi)},useDebugValue:Xd,useDeferredValue:function(n,i){var s=hn();return H0(s,qt.memoizedState,n,i)},useTransition:function(){var n=hc(xi)[0],i=hn().memoizedState;return[typeof n=="boolean"?n:wl(n),i]},useSyncExternalStore:b0,useId:K0,useHostTransitionStatus:Jd,useFormState:R0,useActionState:R0,useOptimistic:function(n,i){var s=hn();return _0(s,qt,n,i)},useMemoCache:$d,useCacheRefresh:V0};tf.useEffectEvent=D0;var W0={readContext:jn,use:fc,useCallback:F0,useContext:jn,useEffect:Qd,useImperativeHandle:U0,useInsertionEffect:L0,useLayoutEffect:I0,useMemo:P0,useReducer:Kd,useRef:M0,useState:function(){return Kd(xi)},useDebugValue:Xd,useDeferredValue:function(n,i){var s=hn();return qt===null?Zd(s,n,i):H0(s,qt.memoizedState,n,i)},useTransition:function(){var n=Kd(xi)[0],i=hn().memoizedState;return[typeof n=="boolean"?n:wl(n),i]},useSyncExternalStore:b0,useId:K0,useHostTransitionStatus:Jd,useFormState:O0,useActionState:O0,useOptimistic:function(n,i){var s=hn();return qt!==null?_0(s,qt,n,i):(s.baseState=n,[n,s.queue.dispatch])},useMemoCache:$d,useCacheRefresh:V0};W0.useEffectEvent=D0;function nf(n,i,s,u){i=n.memoizedState,s=s(u,i),s=s==null?i:x({},i,s),n.memoizedState=s,n.lanes===0&&(n.updateQueue.baseState=s)}var rf={enqueueSetState:function(n,i,s){n=n._reactInternals;var u=hr(),p=Gi(u);p.payload=i,s!=null&&(p.callback=s),i=Ki(n,p,u),i!==null&&(nr(i,n,u),xl(i,n,u))},enqueueReplaceState:function(n,i,s){n=n._reactInternals;var u=hr(),p=Gi(u);p.tag=1,p.payload=i,s!=null&&(p.callback=s),i=Ki(n,p,u),i!==null&&(nr(i,n,u),xl(i,n,u))},enqueueForceUpdate:function(n,i){n=n._reactInternals;var s=hr(),u=Gi(s);u.tag=2,i!=null&&(u.callback=i),i=Ki(n,u,s),i!==null&&(nr(i,n,s),xl(i,n,s))}};function J0(n,i,s,u,p,b,w){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(u,b,w):i.prototype&&i.prototype.isPureReactComponent?!ul(s,u)||!ul(p,b):!0}function eg(n,i,s,u){n=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(s,u),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(s,u),i.state!==n&&rf.enqueueReplaceState(i,i.state,null)}function Ba(n,i){var s=i;if("ref"in i){s={};for(var u in i)u!=="ref"&&(s[u]=i[u])}if(n=n.defaultProps){s===i&&(s=x({},s));for(var p in n)s[p]===void 0&&(s[p]=n[p])}return s}function tg(n){Yo(n)}function ng(n){console.error(n)}function rg(n){Yo(n)}function bc(n,i){try{var s=n.onUncaughtError;s(i.value,{componentStack:i.stack})}catch(u){setTimeout(function(){throw u})}}function ig(n,i,s){try{var u=n.onCaughtError;u(s.value,{componentStack:s.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function af(n,i,s){return s=Gi(s),s.tag=3,s.payload={element:null},s.callback=function(){bc(n,i)},s}function ag(n){return n=Gi(n),n.tag=3,n}function sg(n,i,s,u){var p=s.type.getDerivedStateFromError;if(typeof p=="function"){var b=u.value;n.payload=function(){return p(b)},n.callback=function(){ig(i,s,u)}}var w=s.stateNode;w!==null&&typeof w.componentDidCatch=="function"&&(n.callback=function(){ig(i,s,u),typeof p!="function"&&(Wi===null?Wi=new Set([this]):Wi.add(this));var C=u.stack;this.componentDidCatch(u.value,{componentStack:C!==null?C:""})})}function Z_(n,i,s,u,p){if(s.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(i=s.alternate,i!==null&&fs(i,s,p,!0),s=cr.current,s!==null){switch(s.tag){case 31:case 13:return Nr===null?Tc():s.alternate===null&&on===0&&(on=3),s.flags&=-257,s.flags|=65536,s.lanes=p,u===ic?s.flags|=16384:(i=s.updateQueue,i===null?s.updateQueue=new Set([u]):i.add(u),Rf(n,u,p)),!1;case 22:return s.flags|=65536,u===ic?s.flags|=16384:(i=s.updateQueue,i===null?(i={transitions:null,markerInstances:null,retryQueue:new Set([u])},s.updateQueue=i):(s=i.retryQueue,s===null?i.retryQueue=new Set([u]):s.add(u)),Rf(n,u,p)),!1}throw Error(a(435,s.tag))}return Rf(n,u,p),Tc(),!1}if(kt)return i=cr.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=p,u!==_d&&(n=Error(a(422),{cause:u}),hl(kr(n,s)))):(u!==_d&&(i=Error(a(423),{cause:u}),hl(kr(i,s))),n=n.current.alternate,n.flags|=65536,p&=-p,n.lanes|=p,u=kr(u,s),p=af(n.stateNode,u,p),jd(n,p),on!==4&&(on=2)),!1;var b=Error(a(520),{cause:u});if(b=kr(b,s),Ol===null?Ol=[b]:Ol.push(b),on!==4&&(on=2),i===null)return!0;u=kr(u,s),s=i;do{switch(s.tag){case 3:return s.flags|=65536,n=p&-p,s.lanes|=n,n=af(s.stateNode,u,n),jd(s,n),!1;case 1:if(i=s.type,b=s.stateNode,(s.flags&128)===0&&(typeof i.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(Wi===null||!Wi.has(b))))return s.flags|=65536,p&=-p,s.lanes|=p,p=ag(p),sg(p,n,s,u),jd(s,p),!1}s=s.return}while(s!==null);return!1}var sf=Error(a(461)),xn=!1;function Dn(n,i,s,u){i.child=n===null?u0(i,null,s,u):La(i,n.child,s,u)}function lg(n,i,s,u,p){s=s.render;var b=i.ref;if("ref"in u){var w={};for(var C in u)C!=="ref"&&(w[C]=u[C])}else w=u;return Oa(i),u=Fd(n,i,s,w,b,p),C=Pd(),n!==null&&!xn?(Hd(n,i,p),yi(n,i,p)):(kt&&C&&kd(i),i.flags|=1,Dn(n,i,u,p),i.child)}function og(n,i,s,u,p){if(n===null){var b=s.type;return typeof b=="function"&&!xd(b)&&b.defaultProps===void 0&&s.compare===null?(i.tag=15,i.type=b,cg(n,i,b,u,p)):(n=Wo(s.type,null,u,i,i.mode,p),n.ref=i.ref,n.return=i,i.child=n)}if(b=n.child,!mf(n,p)){var w=b.memoizedProps;if(s=s.compare,s=s!==null?s:ul,s(w,u)&&n.ref===i.ref)return yi(n,i,p)}return i.flags|=1,n=hi(b,u),n.ref=i.ref,n.return=i,i.child=n}function cg(n,i,s,u,p){if(n!==null){var b=n.memoizedProps;if(ul(b,u)&&n.ref===i.ref)if(xn=!1,i.pendingProps=u=b,mf(n,p))(n.flags&131072)!==0&&(xn=!0);else return i.lanes=n.lanes,yi(n,i,p)}return lf(n,i,s,u,p)}function ug(n,i,s,u){var p=u.children,b=n!==null?n.memoizedState:null;if(n===null&&i.stateNode===null&&(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.mode==="hidden"){if((i.flags&128)!==0){if(b=b!==null?b.baseLanes|s:s,n!==null){for(u=i.child=n.child,p=0;u!==null;)p=p|u.lanes|u.childLanes,u=u.sibling;u=p&~b}else u=0,i.child=null;return dg(n,i,b,s,u)}if((s&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},n!==null&&nc(i,b!==null?b.cachePool:null),b!==null?h0(i,b):Ld(),m0(i);else return u=i.lanes=536870912,dg(n,i,b!==null?b.baseLanes|s:s,s,u)}else b!==null?(nc(i,b.cachePool),h0(i,b),Yi(),i.memoizedState=null):(n!==null&&nc(i,null),Ld(),Yi());return Dn(n,i,p,s),i.child}function Nl(n,i){return n!==null&&n.tag===22||i.stateNode!==null||(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.sibling}function dg(n,i,s,u,p){var b=Rd();return b=b===null?null:{parent:gn._currentValue,pool:b},i.memoizedState={baseLanes:s,cachePool:b},n!==null&&nc(i,null),Ld(),m0(i),n!==null&&fs(n,i,u,!0),i.childLanes=p,null}function xc(n,i){return i=vc({mode:i.mode,children:i.children},n.mode),i.ref=n.ref,n.child=i,i.return=n,i}function fg(n,i,s){return La(i,n.child,null,s),n=xc(i,i.pendingProps),n.flags|=2,ur(i),i.memoizedState=null,n}function W_(n,i,s){var u=i.pendingProps,p=(i.flags&128)!==0;if(i.flags&=-129,n===null){if(kt){if(u.mode==="hidden")return n=xc(i,u),i.lanes=536870912,Nl(null,n);if(Bd(i),(n=en)?(n=Eb(n,Er),n=n!==null&&n.data==="&"?n:null,n!==null&&(i.memoizedState={dehydrated:n,treeContext:Fi!==null?{id:Qr,overflow:Xr}:null,retryLane:536870912,hydrationErrors:null},s=Qp(n),s.return=i,i.child=s,Mn=i,en=null)):n=null,n===null)throw Hi(i);return i.lanes=536870912,null}return xc(i,u)}var b=n.memoizedState;if(b!==null){var w=b.dehydrated;if(Bd(i),p)if(i.flags&256)i.flags&=-257,i=fg(n,i,s);else if(i.memoizedState!==null)i.child=n.child,i.flags|=128,i=null;else throw Error(a(558));else if(xn||fs(n,i,s,!1),p=(s&n.childLanes)!==0,xn||p){if(u=Vt,u!==null&&(w=L(u,s),w!==0&&w!==b.retryLane))throw b.retryLane=w,Ca(n,w),nr(u,n,w),sf;Tc(),i=fg(n,i,s)}else n=b.treeContext,en=Sr(w.nextSibling),Mn=i,kt=!0,Pi=null,Er=!1,n!==null&&Wp(i,n),i=xc(i,u),i.flags|=4096;return i}return n=hi(n.child,{mode:u.mode,children:u.children}),n.ref=i.ref,i.child=n,n.return=i,n}function yc(n,i){var s=i.ref;if(s===null)n!==null&&n.ref!==null&&(i.flags|=4194816);else{if(typeof s!="function"&&typeof s!="object")throw Error(a(284));(n===null||n.ref!==s)&&(i.flags|=4194816)}}function lf(n,i,s,u,p){return Oa(i),s=Fd(n,i,s,u,void 0,p),u=Pd(),n!==null&&!xn?(Hd(n,i,p),yi(n,i,p)):(kt&&u&&kd(i),i.flags|=1,Dn(n,i,s,p),i.child)}function hg(n,i,s,u,p,b){return Oa(i),i.updateQueue=null,s=g0(i,u,s,p),p0(n),u=Pd(),n!==null&&!xn?(Hd(n,i,b),yi(n,i,b)):(kt&&u&&kd(i),i.flags|=1,Dn(n,i,s,b),i.child)}function mg(n,i,s,u,p){if(Oa(i),i.stateNode===null){var b=os,w=s.contextType;typeof w=="object"&&w!==null&&(b=jn(w)),b=new s(u,b),i.memoizedState=b.state!==null&&b.state!==void 0?b.state:null,b.updater=rf,i.stateNode=b,b._reactInternals=i,b=i.stateNode,b.props=u,b.state=i.memoizedState,b.refs={},Od(i),w=s.contextType,b.context=typeof w=="object"&&w!==null?jn(w):os,b.state=i.memoizedState,w=s.getDerivedStateFromProps,typeof w=="function"&&(nf(i,s,w,u),b.state=i.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof b.getSnapshotBeforeUpdate=="function"||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(w=b.state,typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount(),w!==b.state&&rf.enqueueReplaceState(b,b.state,null),vl(i,u,b,p),yl(),b.state=i.memoizedState),typeof b.componentDidMount=="function"&&(i.flags|=4194308),u=!0}else if(n===null){b=i.stateNode;var C=i.memoizedProps,I=Ba(s,C);b.props=I;var Z=b.context,oe=s.contextType;w=os,typeof oe=="object"&&oe!==null&&(w=jn(oe));var he=s.getDerivedStateFromProps;oe=typeof he=="function"||typeof b.getSnapshotBeforeUpdate=="function",C=i.pendingProps!==C,oe||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(C||Z!==w)&&eg(i,b,u,w),$i=!1;var J=i.memoizedState;b.state=J,vl(i,u,b,p),yl(),Z=i.memoizedState,C||J!==Z||$i?(typeof he=="function"&&(nf(i,s,he,u),Z=i.memoizedState),(I=$i||J0(i,s,I,u,J,Z,w))?(oe||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount()),typeof b.componentDidMount=="function"&&(i.flags|=4194308)):(typeof b.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=u,i.memoizedState=Z),b.props=u,b.state=Z,b.context=w,u=I):(typeof b.componentDidMount=="function"&&(i.flags|=4194308),u=!1)}else{b=i.stateNode,Md(n,i),w=i.memoizedProps,oe=Ba(s,w),b.props=oe,he=i.pendingProps,J=b.context,Z=s.contextType,I=os,typeof Z=="object"&&Z!==null&&(I=jn(Z)),C=s.getDerivedStateFromProps,(Z=typeof C=="function"||typeof b.getSnapshotBeforeUpdate=="function")||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(w!==he||J!==I)&&eg(i,b,u,I),$i=!1,J=i.memoizedState,b.state=J,vl(i,u,b,p),yl();var ne=i.memoizedState;w!==he||J!==ne||$i||n!==null&&n.dependencies!==null&&ec(n.dependencies)?(typeof C=="function"&&(nf(i,s,C,u),ne=i.memoizedState),(oe=$i||J0(i,s,oe,u,J,ne,I)||n!==null&&n.dependencies!==null&&ec(n.dependencies))?(Z||typeof b.UNSAFE_componentWillUpdate!="function"&&typeof b.componentWillUpdate!="function"||(typeof b.componentWillUpdate=="function"&&b.componentWillUpdate(u,ne,I),typeof b.UNSAFE_componentWillUpdate=="function"&&b.UNSAFE_componentWillUpdate(u,ne,I)),typeof b.componentDidUpdate=="function"&&(i.flags|=4),typeof b.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof b.componentDidUpdate!="function"||w===n.memoizedProps&&J===n.memoizedState||(i.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||w===n.memoizedProps&&J===n.memoizedState||(i.flags|=1024),i.memoizedProps=u,i.memoizedState=ne),b.props=u,b.state=ne,b.context=I,u=oe):(typeof b.componentDidUpdate!="function"||w===n.memoizedProps&&J===n.memoizedState||(i.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||w===n.memoizedProps&&J===n.memoizedState||(i.flags|=1024),u=!1)}return b=u,yc(n,i),u=(i.flags&128)!==0,b||u?(b=i.stateNode,s=u&&typeof s.getDerivedStateFromError!="function"?null:b.render(),i.flags|=1,n!==null&&u?(i.child=La(i,n.child,null,p),i.child=La(i,null,s,p)):Dn(n,i,s,p),i.memoizedState=b.state,n=i.child):n=yi(n,i,p),n}function pg(n,i,s,u){return Ra(),i.flags|=256,Dn(n,i,s,u),i.child}var of={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function cf(n){return{baseLanes:n,cachePool:i0()}}function uf(n,i,s){return n=n!==null?n.childLanes&~s:0,i&&(n|=fr),n}function gg(n,i,s){var u=i.pendingProps,p=!1,b=(i.flags&128)!==0,w;if((w=b)||(w=n!==null&&n.memoizedState===null?!1:(fn.current&2)!==0),w&&(p=!0,i.flags&=-129),w=(i.flags&32)!==0,i.flags&=-33,n===null){if(kt){if(p?Vi(i):Yi(),(n=en)?(n=Eb(n,Er),n=n!==null&&n.data!=="&"?n:null,n!==null&&(i.memoizedState={dehydrated:n,treeContext:Fi!==null?{id:Qr,overflow:Xr}:null,retryLane:536870912,hydrationErrors:null},s=Qp(n),s.return=i,i.child=s,Mn=i,en=null)):n=null,n===null)throw Hi(i);return Kf(n)?i.lanes=32:i.lanes=536870912,null}var C=u.children;return u=u.fallback,p?(Yi(),p=i.mode,C=vc({mode:"hidden",children:C},p),u=Ta(u,p,s,null),C.return=i,u.return=i,C.sibling=u,i.child=C,u=i.child,u.memoizedState=cf(s),u.childLanes=uf(n,w,s),i.memoizedState=of,Nl(null,u)):(Vi(i),df(i,C))}var I=n.memoizedState;if(I!==null&&(C=I.dehydrated,C!==null)){if(b)i.flags&256?(Vi(i),i.flags&=-257,i=ff(n,i,s)):i.memoizedState!==null?(Yi(),i.child=n.child,i.flags|=128,i=null):(Yi(),C=u.fallback,p=i.mode,u=vc({mode:"visible",children:u.children},p),C=Ta(C,p,s,null),C.flags|=2,u.return=i,C.return=i,u.sibling=C,i.child=u,La(i,n.child,null,s),u=i.child,u.memoizedState=cf(s),u.childLanes=uf(n,w,s),i.memoizedState=of,i=Nl(null,u));else if(Vi(i),Kf(C)){if(w=C.nextSibling&&C.nextSibling.dataset,w)var Z=w.dgst;w=Z,u=Error(a(419)),u.stack="",u.digest=w,hl({value:u,source:null,stack:null}),i=ff(n,i,s)}else if(xn||fs(n,i,s,!1),w=(s&n.childLanes)!==0,xn||w){if(w=Vt,w!==null&&(u=L(w,s),u!==0&&u!==I.retryLane))throw I.retryLane=u,Ca(n,u),nr(w,n,u),sf;Gf(C)||Tc(),i=ff(n,i,s)}else Gf(C)?(i.flags|=192,i.child=n.child,i=null):(n=I.treeContext,en=Sr(C.nextSibling),Mn=i,kt=!0,Pi=null,Er=!1,n!==null&&Wp(i,n),i=df(i,u.children),i.flags|=4096);return i}return p?(Yi(),C=u.fallback,p=i.mode,I=n.child,Z=I.sibling,u=hi(I,{mode:"hidden",children:u.children}),u.subtreeFlags=I.subtreeFlags&65011712,Z!==null?C=hi(Z,C):(C=Ta(C,p,s,null),C.flags|=2),C.return=i,u.return=i,u.sibling=C,i.child=u,Nl(null,u),u=i.child,C=n.child.memoizedState,C===null?C=cf(s):(p=C.cachePool,p!==null?(I=gn._currentValue,p=p.parent!==I?{parent:I,pool:I}:p):p=i0(),C={baseLanes:C.baseLanes|s,cachePool:p}),u.memoizedState=C,u.childLanes=uf(n,w,s),i.memoizedState=of,Nl(n.child,u)):(Vi(i),s=n.child,n=s.sibling,s=hi(s,{mode:"visible",children:u.children}),s.return=i,s.sibling=null,n!==null&&(w=i.deletions,w===null?(i.deletions=[n],i.flags|=16):w.push(n)),i.child=s,i.memoizedState=null,s)}function df(n,i){return i=vc({mode:"visible",children:i},n.mode),i.return=n,n.child=i}function vc(n,i){return n=or(22,n,null,i),n.lanes=0,n}function ff(n,i,s){return La(i,n.child,null,s),n=df(i,i.pendingProps.children),n.flags|=2,i.memoizedState=null,n}function bg(n,i,s){n.lanes|=i;var u=n.alternate;u!==null&&(u.lanes|=i),Sd(n.return,i,s)}function hf(n,i,s,u,p,b){var w=n.memoizedState;w===null?n.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:u,tail:s,tailMode:p,treeForkCount:b}:(w.isBackwards=i,w.rendering=null,w.renderingStartTime=0,w.last=u,w.tail=s,w.tailMode=p,w.treeForkCount=b)}function xg(n,i,s){var u=i.pendingProps,p=u.revealOrder,b=u.tail;u=u.children;var w=fn.current,C=(w&2)!==0;if(C?(w=w&1|2,i.flags|=128):w&=1,z(fn,w),Dn(n,i,u,s),u=kt?fl:0,!C&&n!==null&&(n.flags&128)!==0)e:for(n=i.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&bg(n,s,i);else if(n.tag===19)bg(n,s,i);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===i)break e;for(;n.sibling===null;){if(n.return===null||n.return===i)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}switch(p){case"forwards":for(s=i.child,p=null;s!==null;)n=s.alternate,n!==null&&oc(n)===null&&(p=s),s=s.sibling;s=p,s===null?(p=i.child,i.child=null):(p=s.sibling,s.sibling=null),hf(i,!1,p,s,b,u);break;case"backwards":case"unstable_legacy-backwards":for(s=null,p=i.child,i.child=null;p!==null;){if(n=p.alternate,n!==null&&oc(n)===null){i.child=p;break}n=p.sibling,p.sibling=s,s=p,p=n}hf(i,!0,s,null,b,u);break;case"together":hf(i,!1,null,null,void 0,u);break;default:i.memoizedState=null}return i.child}function yi(n,i,s){if(n!==null&&(i.dependencies=n.dependencies),Zi|=i.lanes,(s&i.childLanes)===0)if(n!==null){if(fs(n,i,s,!1),(s&i.childLanes)===0)return null}else return null;if(n!==null&&i.child!==n.child)throw Error(a(153));if(i.child!==null){for(n=i.child,s=hi(n,n.pendingProps),i.child=s,s.return=i;n.sibling!==null;)n=n.sibling,s=s.sibling=hi(n,n.pendingProps),s.return=i;s.sibling=null}return i.child}function mf(n,i){return(n.lanes&i)!==0?!0:(n=n.dependencies,!!(n!==null&&ec(n)))}function J_(n,i,s){switch(i.tag){case 3:xe(i,i.stateNode.containerInfo),qi(i,gn,n.memoizedState.cache),Ra();break;case 27:case 5:Ue(i);break;case 4:xe(i,i.stateNode.containerInfo);break;case 10:qi(i,i.type,i.memoizedProps.value);break;case 31:if(i.memoizedState!==null)return i.flags|=128,Bd(i),null;break;case 13:var u=i.memoizedState;if(u!==null)return u.dehydrated!==null?(Vi(i),i.flags|=128,null):(s&i.child.childLanes)!==0?gg(n,i,s):(Vi(i),n=yi(n,i,s),n!==null?n.sibling:null);Vi(i);break;case 19:var p=(n.flags&128)!==0;if(u=(s&i.childLanes)!==0,u||(fs(n,i,s,!1),u=(s&i.childLanes)!==0),p){if(u)return xg(n,i,s);i.flags|=128}if(p=i.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),z(fn,fn.current),u)break;return null;case 22:return i.lanes=0,ug(n,i,s,i.pendingProps);case 24:qi(i,gn,n.memoizedState.cache)}return yi(n,i,s)}function yg(n,i,s){if(n!==null)if(n.memoizedProps!==i.pendingProps)xn=!0;else{if(!mf(n,s)&&(i.flags&128)===0)return xn=!1,J_(n,i,s);xn=(n.flags&131072)!==0}else xn=!1,kt&&(i.flags&1048576)!==0&&Zp(i,fl,i.index);switch(i.lanes=0,i.tag){case 16:e:{var u=i.pendingProps;if(n=ja(i.elementType),i.type=n,typeof n=="function")xd(n)?(u=Ba(n,u),i.tag=1,i=mg(null,i,n,u,s)):(i.tag=0,i=lf(null,i,n,u,s));else{if(n!=null){var p=n.$$typeof;if(p===P){i.tag=11,i=lg(null,i,n,u,s);break e}else if(p===G){i.tag=14,i=og(null,i,n,u,s);break e}}throw i=se(n)||n,Error(a(306,i,""))}}return i;case 0:return lf(n,i,i.type,i.pendingProps,s);case 1:return u=i.type,p=Ba(u,i.pendingProps),mg(n,i,u,p,s);case 3:e:{if(xe(i,i.stateNode.containerInfo),n===null)throw Error(a(387));u=i.pendingProps;var b=i.memoizedState;p=b.element,Md(n,i),vl(i,u,null,s);var w=i.memoizedState;if(u=w.cache,qi(i,gn,u),u!==b.cache&&zd(i,[gn],s,!0),yl(),u=w.element,b.isDehydrated)if(b={element:u,isDehydrated:!1,cache:w.cache},i.updateQueue.baseState=b,i.memoizedState=b,i.flags&256){i=pg(n,i,u,s);break e}else if(u!==p){p=kr(Error(a(424)),i),hl(p),i=pg(n,i,u,s);break e}else{switch(n=i.stateNode.containerInfo,n.nodeType){case 9:n=n.body;break;default:n=n.nodeName==="HTML"?n.ownerDocument.body:n}for(en=Sr(n.firstChild),Mn=i,kt=!0,Pi=null,Er=!0,s=u0(i,null,u,s),i.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling}else{if(Ra(),u===p){i=yi(n,i,s);break e}Dn(n,i,u,s)}i=i.child}return i;case 26:return yc(n,i),n===null?(s=Rb(i.type,null,i.pendingProps,null))?i.memoizedState=s:kt||(s=i.type,n=i.pendingProps,u=Lc(ye.current).createElement(s),u[Ee]=i,u[Ce]=n,Ln(u,s,n),Ht(u),i.stateNode=u):i.memoizedState=Rb(i.type,n.memoizedProps,i.pendingProps,n.memoizedState),null;case 27:return Ue(i),n===null&&kt&&(u=i.stateNode=zb(i.type,i.pendingProps,ye.current),Mn=i,Er=!0,p=en,na(i.type)?(Vf=p,en=Sr(u.firstChild)):en=p),Dn(n,i,i.pendingProps.children,s),yc(n,i),n===null&&(i.flags|=4194304),i.child;case 5:return n===null&&kt&&((p=u=en)&&(u=TE(u,i.type,i.pendingProps,Er),u!==null?(i.stateNode=u,Mn=i,en=Sr(u.firstChild),Er=!1,p=!0):p=!1),p||Hi(i)),Ue(i),p=i.type,b=i.pendingProps,w=n!==null?n.memoizedProps:null,u=b.children,Hf(p,b)?u=null:w!==null&&Hf(p,w)&&(i.flags|=32),i.memoizedState!==null&&(p=Fd(n,i,$_,null,null,s),Fl._currentValue=p),yc(n,i),Dn(n,i,u,s),i.child;case 6:return n===null&&kt&&((n=s=en)&&(s=RE(s,i.pendingProps,Er),s!==null?(i.stateNode=s,Mn=i,en=null,n=!0):n=!1),n||Hi(i)),null;case 13:return gg(n,i,s);case 4:return xe(i,i.stateNode.containerInfo),u=i.pendingProps,n===null?i.child=La(i,null,u,s):Dn(n,i,u,s),i.child;case 11:return lg(n,i,i.type,i.pendingProps,s);case 7:return Dn(n,i,i.pendingProps,s),i.child;case 8:return Dn(n,i,i.pendingProps.children,s),i.child;case 12:return Dn(n,i,i.pendingProps.children,s),i.child;case 10:return u=i.pendingProps,qi(i,i.type,u.value),Dn(n,i,u.children,s),i.child;case 9:return p=i.type._context,u=i.pendingProps.children,Oa(i),p=jn(p),u=u(p),i.flags|=1,Dn(n,i,u,s),i.child;case 14:return og(n,i,i.type,i.pendingProps,s);case 15:return cg(n,i,i.type,i.pendingProps,s);case 19:return xg(n,i,s);case 31:return W_(n,i,s);case 22:return ug(n,i,s,i.pendingProps);case 24:return Oa(i),u=jn(gn),n===null?(p=Rd(),p===null&&(p=Vt,b=Cd(),p.pooledCache=b,b.refCount++,b!==null&&(p.pooledCacheLanes|=s),p=b),i.memoizedState={parent:u,cache:p},Od(i),qi(i,gn,p)):((n.lanes&s)!==0&&(Md(n,i),vl(i,null,null,s),yl()),p=n.memoizedState,b=i.memoizedState,p.parent!==u?(p={parent:u,cache:u},i.memoizedState=p,i.lanes===0&&(i.memoizedState=i.updateQueue.baseState=p),qi(i,gn,u)):(u=b.cache,qi(i,gn,u),u!==p.cache&&zd(i,[gn],s,!0))),Dn(n,i,i.pendingProps.children,s),i.child;case 29:throw i.pendingProps}throw Error(a(156,i.tag))}function vi(n){n.flags|=4}function pf(n,i,s,u,p){if((i=(n.mode&32)!==0)&&(i=!1),i){if(n.flags|=16777216,(p&335544128)===p)if(n.stateNode.complete)n.flags|=8192;else if(Kg())n.flags|=8192;else throw Da=ic,Ad}else n.flags&=-16777217}function vg(n,i){if(i.type!=="stylesheet"||(i.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!Db(i))if(Kg())n.flags|=8192;else throw Da=ic,Ad}function kc(n,i){i!==null&&(n.flags|=4),n.flags&16384&&(i=n.tag!==22?Qe():536870912,n.lanes|=i,Es|=i)}function Sl(n,i){if(!kt)switch(n.tailMode){case"hidden":i=n.tail;for(var s=null;i!==null;)i.alternate!==null&&(s=i),i=i.sibling;s===null?n.tail=null:s.sibling=null;break;case"collapsed":s=n.tail;for(var u=null;s!==null;)s.alternate!==null&&(u=s),s=s.sibling;u===null?i||n.tail===null?n.tail=null:n.tail.sibling=null:u.sibling=null}}function tn(n){var i=n.alternate!==null&&n.alternate.child===n.child,s=0,u=0;if(i)for(var p=n.child;p!==null;)s|=p.lanes|p.childLanes,u|=p.subtreeFlags&65011712,u|=p.flags&65011712,p.return=n,p=p.sibling;else for(p=n.child;p!==null;)s|=p.lanes|p.childLanes,u|=p.subtreeFlags,u|=p.flags,p.return=n,p=p.sibling;return n.subtreeFlags|=u,n.childLanes=s,i}function eE(n,i,s){var u=i.pendingProps;switch(wd(i),i.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return tn(i),null;case 1:return tn(i),null;case 3:return s=i.stateNode,u=null,n!==null&&(u=n.memoizedState.cache),i.memoizedState.cache!==u&&(i.flags|=2048),gi(gn),pe(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(n===null||n.child===null)&&(ds(i)?vi(i):n===null||n.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,Ed())),tn(i),null;case 26:var p=i.type,b=i.memoizedState;return n===null?(vi(i),b!==null?(tn(i),vg(i,b)):(tn(i),pf(i,p,null,u,s))):b?b!==n.memoizedState?(vi(i),tn(i),vg(i,b)):(tn(i),i.flags&=-16777217):(n=n.memoizedProps,n!==u&&vi(i),tn(i),pf(i,p,n,u,s)),null;case 27:if(Ae(i),s=ye.current,p=i.type,n!==null&&i.stateNode!=null)n.memoizedProps!==u&&vi(i);else{if(!u){if(i.stateNode===null)throw Error(a(166));return tn(i),null}n=ue.current,ds(i)?Jp(i):(n=zb(p,u,s),i.stateNode=n,vi(i))}return tn(i),null;case 5:if(Ae(i),p=i.type,n!==null&&i.stateNode!=null)n.memoizedProps!==u&&vi(i);else{if(!u){if(i.stateNode===null)throw Error(a(166));return tn(i),null}if(b=ue.current,ds(i))Jp(i);else{var w=Lc(ye.current);switch(b){case 1:b=w.createElementNS("http://www.w3.org/2000/svg",p);break;case 2:b=w.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;default:switch(p){case"svg":b=w.createElementNS("http://www.w3.org/2000/svg",p);break;case"math":b=w.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;case"script":b=w.createElement("div"),b.innerHTML="<script><\/script>",b=b.removeChild(b.firstChild);break;case"select":b=typeof u.is=="string"?w.createElement("select",{is:u.is}):w.createElement("select"),u.multiple?b.multiple=!0:u.size&&(b.size=u.size);break;default:b=typeof u.is=="string"?w.createElement(p,{is:u.is}):w.createElement(p)}}b[Ee]=i,b[Ce]=u;e:for(w=i.child;w!==null;){if(w.tag===5||w.tag===6)b.appendChild(w.stateNode);else if(w.tag!==4&&w.tag!==27&&w.child!==null){w.child.return=w,w=w.child;continue}if(w===i)break e;for(;w.sibling===null;){if(w.return===null||w.return===i)break e;w=w.return}w.sibling.return=w.return,w=w.sibling}i.stateNode=b;e:switch(Ln(b,p,u),p){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}u&&vi(i)}}return tn(i),pf(i,i.type,n===null?null:n.memoizedProps,i.pendingProps,s),null;case 6:if(n&&i.stateNode!=null)n.memoizedProps!==u&&vi(i);else{if(typeof u!="string"&&i.stateNode===null)throw Error(a(166));if(n=ye.current,ds(i)){if(n=i.stateNode,s=i.memoizedProps,u=null,p=Mn,p!==null)switch(p.tag){case 27:case 5:u=p.memoizedProps}n[Ee]=i,n=!!(n.nodeValue===s||u!==null&&u.suppressHydrationWarning===!0||gb(n.nodeValue,s)),n||Hi(i,!0)}else n=Lc(n).createTextNode(u),n[Ee]=i,i.stateNode=n}return tn(i),null;case 31:if(s=i.memoizedState,n===null||n.memoizedState!==null){if(u=ds(i),s!==null){if(n===null){if(!u)throw Error(a(318));if(n=i.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(557));n[Ee]=i}else Ra(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;tn(i),n=!1}else s=Ed(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=s),n=!0;if(!n)return i.flags&256?(ur(i),i):(ur(i),null);if((i.flags&128)!==0)throw Error(a(558))}return tn(i),null;case 13:if(u=i.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(p=ds(i),u!==null&&u.dehydrated!==null){if(n===null){if(!p)throw Error(a(318));if(p=i.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(a(317));p[Ee]=i}else Ra(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;tn(i),p=!1}else p=Ed(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=p),p=!0;if(!p)return i.flags&256?(ur(i),i):(ur(i),null)}return ur(i),(i.flags&128)!==0?(i.lanes=s,i):(s=u!==null,n=n!==null&&n.memoizedState!==null,s&&(u=i.child,p=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(p=u.alternate.memoizedState.cachePool.pool),b=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(b=u.memoizedState.cachePool.pool),b!==p&&(u.flags|=2048)),s!==n&&s&&(i.child.flags|=8192),kc(i,i.updateQueue),tn(i),null);case 4:return pe(),n===null&&If(i.stateNode.containerInfo),tn(i),null;case 10:return gi(i.type),tn(i),null;case 19:if(B(fn),u=i.memoizedState,u===null)return tn(i),null;if(p=(i.flags&128)!==0,b=u.rendering,b===null)if(p)Sl(u,!1);else{if(on!==0||n!==null&&(n.flags&128)!==0)for(n=i.child;n!==null;){if(b=oc(n),b!==null){for(i.flags|=128,Sl(u,!1),n=b.updateQueue,i.updateQueue=n,kc(i,n),i.subtreeFlags=0,n=s,s=i.child;s!==null;)Yp(s,n),s=s.sibling;return z(fn,fn.current&1|2),kt&&mi(i,u.treeForkCount),i.child}n=n.sibling}u.tail!==null&&Wt()>Sc&&(i.flags|=128,p=!0,Sl(u,!1),i.lanes=4194304)}else{if(!p)if(n=oc(b),n!==null){if(i.flags|=128,p=!0,n=n.updateQueue,i.updateQueue=n,kc(i,n),Sl(u,!0),u.tail===null&&u.tailMode==="hidden"&&!b.alternate&&!kt)return tn(i),null}else 2*Wt()-u.renderingStartTime>Sc&&s!==536870912&&(i.flags|=128,p=!0,Sl(u,!1),i.lanes=4194304);u.isBackwards?(b.sibling=i.child,i.child=b):(n=u.last,n!==null?n.sibling=b:i.child=b,u.last=b)}return u.tail!==null?(n=u.tail,u.rendering=n,u.tail=n.sibling,u.renderingStartTime=Wt(),n.sibling=null,s=fn.current,z(fn,p?s&1|2:s&1),kt&&mi(i,u.treeForkCount),n):(tn(i),null);case 22:case 23:return ur(i),Id(),u=i.memoizedState!==null,n!==null?n.memoizedState!==null!==u&&(i.flags|=8192):u&&(i.flags|=8192),u?(s&536870912)!==0&&(i.flags&128)===0&&(tn(i),i.subtreeFlags&6&&(i.flags|=8192)):tn(i),s=i.updateQueue,s!==null&&kc(i,s.retryQueue),s=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(s=n.memoizedState.cachePool.pool),u=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(u=i.memoizedState.cachePool.pool),u!==s&&(i.flags|=2048),n!==null&&B(Ma),null;case 24:return s=null,n!==null&&(s=n.memoizedState.cache),i.memoizedState.cache!==s&&(i.flags|=2048),gi(gn),tn(i),null;case 25:return null;case 30:return null}throw Error(a(156,i.tag))}function tE(n,i){switch(wd(i),i.tag){case 1:return n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 3:return gi(gn),pe(),n=i.flags,(n&65536)!==0&&(n&128)===0?(i.flags=n&-65537|128,i):null;case 26:case 27:case 5:return Ae(i),null;case 31:if(i.memoizedState!==null){if(ur(i),i.alternate===null)throw Error(a(340));Ra()}return n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 13:if(ur(i),n=i.memoizedState,n!==null&&n.dehydrated!==null){if(i.alternate===null)throw Error(a(340));Ra()}return n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 19:return B(fn),null;case 4:return pe(),null;case 10:return gi(i.type),null;case 22:case 23:return ur(i),Id(),n!==null&&B(Ma),n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 24:return gi(gn),null;case 25:return null;default:return null}}function kg(n,i){switch(wd(i),i.tag){case 3:gi(gn),pe();break;case 26:case 27:case 5:Ae(i);break;case 4:pe();break;case 31:i.memoizedState!==null&&ur(i);break;case 13:ur(i);break;case 19:B(fn);break;case 10:gi(i.type);break;case 22:case 23:ur(i),Id(),n!==null&&B(Ma);break;case 24:gi(gn)}}function zl(n,i){try{var s=i.updateQueue,u=s!==null?s.lastEffect:null;if(u!==null){var p=u.next;s=p;do{if((s.tag&n)===n){u=void 0;var b=s.create,w=s.inst;u=b(),w.destroy=u}s=s.next}while(s!==p)}}catch(C){Pt(i,i.return,C)}}function Qi(n,i,s){try{var u=i.updateQueue,p=u!==null?u.lastEffect:null;if(p!==null){var b=p.next;u=b;do{if((u.tag&n)===n){var w=u.inst,C=w.destroy;if(C!==void 0){w.destroy=void 0,p=i;var I=s,Z=C;try{Z()}catch(oe){Pt(p,I,oe)}}}u=u.next}while(u!==b)}}catch(oe){Pt(i,i.return,oe)}}function wg(n){var i=n.updateQueue;if(i!==null){var s=n.stateNode;try{f0(i,s)}catch(u){Pt(n,n.return,u)}}}function _g(n,i,s){s.props=Ba(n.type,n.memoizedProps),s.state=n.memoizedState;try{s.componentWillUnmount()}catch(u){Pt(n,i,u)}}function Cl(n,i){try{var s=n.ref;if(s!==null){switch(n.tag){case 26:case 27:case 5:var u=n.stateNode;break;case 30:u=n.stateNode;break;default:u=n.stateNode}typeof s=="function"?n.refCleanup=s(u):s.current=u}}catch(p){Pt(n,i,p)}}function Zr(n,i){var s=n.ref,u=n.refCleanup;if(s!==null)if(typeof u=="function")try{u()}catch(p){Pt(n,i,p)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(p){Pt(n,i,p)}else s.current=null}function Eg(n){var i=n.type,s=n.memoizedProps,u=n.stateNode;try{e:switch(i){case"button":case"input":case"select":case"textarea":s.autoFocus&&u.focus();break e;case"img":s.src?u.src=s.src:s.srcSet&&(u.srcset=s.srcSet)}}catch(p){Pt(n,n.return,p)}}function gf(n,i,s){try{var u=n.stateNode;_E(u,n.type,s,i),u[Ce]=i}catch(p){Pt(n,n.return,p)}}function Ng(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&na(n.type)||n.tag===4}function bf(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||Ng(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.tag===27&&na(n.type)||n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function xf(n,i,s){var u=n.tag;if(u===5||u===6)n=n.stateNode,i?(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(n,i):(i=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,i.appendChild(n),s=s._reactRootContainer,s!=null||i.onclick!==null||(i.onclick=Se));else if(u!==4&&(u===27&&na(n.type)&&(s=n.stateNode,i=null),n=n.child,n!==null))for(xf(n,i,s),n=n.sibling;n!==null;)xf(n,i,s),n=n.sibling}function wc(n,i,s){var u=n.tag;if(u===5||u===6)n=n.stateNode,i?s.insertBefore(n,i):s.appendChild(n);else if(u!==4&&(u===27&&na(n.type)&&(s=n.stateNode),n=n.child,n!==null))for(wc(n,i,s),n=n.sibling;n!==null;)wc(n,i,s),n=n.sibling}function Sg(n){var i=n.stateNode,s=n.memoizedProps;try{for(var u=n.type,p=i.attributes;p.length;)i.removeAttributeNode(p[0]);Ln(i,u,s),i[Ee]=n,i[Ce]=s}catch(b){Pt(n,n.return,b)}}var ki=!1,yn=!1,yf=!1,zg=typeof WeakSet=="function"?WeakSet:Set,Rn=null;function nE(n,i){if(n=n.containerInfo,Ff=qc,n=Up(n),dd(n)){if("selectionStart"in n)var s={start:n.selectionStart,end:n.selectionEnd};else e:{s=(s=n.ownerDocument)&&s.defaultView||window;var u=s.getSelection&&s.getSelection();if(u&&u.rangeCount!==0){s=u.anchorNode;var p=u.anchorOffset,b=u.focusNode;u=u.focusOffset;try{s.nodeType,b.nodeType}catch{s=null;break e}var w=0,C=-1,I=-1,Z=0,oe=0,he=n,J=null;t:for(;;){for(var ne;he!==s||p!==0&&he.nodeType!==3||(C=w+p),he!==b||u!==0&&he.nodeType!==3||(I=w+u),he.nodeType===3&&(w+=he.nodeValue.length),(ne=he.firstChild)!==null;)J=he,he=ne;for(;;){if(he===n)break t;if(J===s&&++Z===p&&(C=w),J===b&&++oe===u&&(I=w),(ne=he.nextSibling)!==null)break;he=J,J=he.parentNode}he=ne}s=C===-1||I===-1?null:{start:C,end:I}}else s=null}s=s||{start:0,end:0}}else s=null;for(Pf={focusedElem:n,selectionRange:s},qc=!1,Rn=i;Rn!==null;)if(i=Rn,n=i.child,(i.subtreeFlags&1028)!==0&&n!==null)n.return=i,Rn=n;else for(;Rn!==null;){switch(i=Rn,b=i.alternate,n=i.flags,i.tag){case 0:if((n&4)!==0&&(n=i.updateQueue,n=n!==null?n.events:null,n!==null))for(s=0;s<n.length;s++)p=n[s],p.ref.impl=p.nextImpl;break;case 11:case 15:break;case 1:if((n&1024)!==0&&b!==null){n=void 0,s=i,p=b.memoizedProps,b=b.memoizedState,u=s.stateNode;try{var je=Ba(s.type,p);n=u.getSnapshotBeforeUpdate(je,b),u.__reactInternalSnapshotBeforeUpdate=n}catch(Ye){Pt(s,s.return,Ye)}}break;case 3:if((n&1024)!==0){if(n=i.stateNode.containerInfo,s=n.nodeType,s===9)$f(n);else if(s===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":$f(n);break;default:n.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((n&1024)!==0)throw Error(a(163))}if(n=i.sibling,n!==null){n.return=i.return,Rn=n;break}Rn=i.return}}function Cg(n,i,s){var u=s.flags;switch(s.tag){case 0:case 11:case 15:_i(n,s),u&4&&zl(5,s);break;case 1:if(_i(n,s),u&4)if(n=s.stateNode,i===null)try{n.componentDidMount()}catch(w){Pt(s,s.return,w)}else{var p=Ba(s.type,i.memoizedProps);i=i.memoizedState;try{n.componentDidUpdate(p,i,n.__reactInternalSnapshotBeforeUpdate)}catch(w){Pt(s,s.return,w)}}u&64&&wg(s),u&512&&Cl(s,s.return);break;case 3:if(_i(n,s),u&64&&(n=s.updateQueue,n!==null)){if(i=null,s.child!==null)switch(s.child.tag){case 27:case 5:i=s.child.stateNode;break;case 1:i=s.child.stateNode}try{f0(n,i)}catch(w){Pt(s,s.return,w)}}break;case 27:i===null&&u&4&&Sg(s);case 26:case 5:_i(n,s),i===null&&u&4&&Eg(s),u&512&&Cl(s,s.return);break;case 12:_i(n,s);break;case 31:_i(n,s),u&4&&Ag(n,s);break;case 13:_i(n,s),u&4&&Og(n,s),u&64&&(n=s.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(s=dE.bind(null,s),AE(n,s))));break;case 22:if(u=s.memoizedState!==null||ki,!u){i=i!==null&&i.memoizedState!==null||yn,p=ki;var b=yn;ki=u,(yn=i)&&!b?Ei(n,s,(s.subtreeFlags&8772)!==0):_i(n,s),ki=p,yn=b}break;case 30:break;default:_i(n,s)}}function Tg(n){var i=n.alternate;i!==null&&(n.alternate=null,Tg(i)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(i=n.stateNode,i!==null&&Bt(i)),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}var an=null,Wn=!1;function wi(n,i,s){for(s=s.child;s!==null;)Rg(n,i,s),s=s.sibling}function Rg(n,i,s){if(rn&&typeof rn.onCommitFiberUnmount=="function")try{rn.onCommitFiberUnmount(cn,s)}catch{}switch(s.tag){case 26:yn||Zr(s,i),wi(n,i,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:yn||Zr(s,i);var u=an,p=Wn;na(s.type)&&(an=s.stateNode,Wn=!1),wi(n,i,s),Il(s.stateNode),an=u,Wn=p;break;case 5:yn||Zr(s,i);case 6:if(u=an,p=Wn,an=null,wi(n,i,s),an=u,Wn=p,an!==null)if(Wn)try{(an.nodeType===9?an.body:an.nodeName==="HTML"?an.ownerDocument.body:an).removeChild(s.stateNode)}catch(b){Pt(s,i,b)}else try{an.removeChild(s.stateNode)}catch(b){Pt(s,i,b)}break;case 18:an!==null&&(Wn?(n=an,wb(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,s.stateNode),Os(n)):wb(an,s.stateNode));break;case 4:u=an,p=Wn,an=s.stateNode.containerInfo,Wn=!0,wi(n,i,s),an=u,Wn=p;break;case 0:case 11:case 14:case 15:Qi(2,s,i),yn||Qi(4,s,i),wi(n,i,s);break;case 1:yn||(Zr(s,i),u=s.stateNode,typeof u.componentWillUnmount=="function"&&_g(s,i,u)),wi(n,i,s);break;case 21:wi(n,i,s);break;case 22:yn=(u=yn)||s.memoizedState!==null,wi(n,i,s),yn=u;break;default:wi(n,i,s)}}function Ag(n,i){if(i.memoizedState===null&&(n=i.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{Os(n)}catch(s){Pt(i,i.return,s)}}}function Og(n,i){if(i.memoizedState===null&&(n=i.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{Os(n)}catch(s){Pt(i,i.return,s)}}function rE(n){switch(n.tag){case 31:case 13:case 19:var i=n.stateNode;return i===null&&(i=n.stateNode=new zg),i;case 22:return n=n.stateNode,i=n._retryCache,i===null&&(i=n._retryCache=new zg),i;default:throw Error(a(435,n.tag))}}function _c(n,i){var s=rE(n);i.forEach(function(u){if(!s.has(u)){s.add(u);var p=fE.bind(null,n,u);u.then(p,p)}})}function Jn(n,i){var s=i.deletions;if(s!==null)for(var u=0;u<s.length;u++){var p=s[u],b=n,w=i,C=w;e:for(;C!==null;){switch(C.tag){case 27:if(na(C.type)){an=C.stateNode,Wn=!1;break e}break;case 5:an=C.stateNode,Wn=!1;break e;case 3:case 4:an=C.stateNode.containerInfo,Wn=!0;break e}C=C.return}if(an===null)throw Error(a(160));Rg(b,w,p),an=null,Wn=!1,b=p.alternate,b!==null&&(b.return=null),p.return=null}if(i.subtreeFlags&13886)for(i=i.child;i!==null;)Mg(i,n),i=i.sibling}var Br=null;function Mg(n,i){var s=n.alternate,u=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:Jn(i,n),er(n),u&4&&(Qi(3,n,n.return),zl(3,n),Qi(5,n,n.return));break;case 1:Jn(i,n),er(n),u&512&&(yn||s===null||Zr(s,s.return)),u&64&&ki&&(n=n.updateQueue,n!==null&&(u=n.callbacks,u!==null&&(s=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=s===null?u:s.concat(u))));break;case 26:var p=Br;if(Jn(i,n),er(n),u&512&&(yn||s===null||Zr(s,s.return)),u&4){var b=s!==null?s.memoizedState:null;if(u=n.memoizedState,s===null)if(u===null)if(n.stateNode===null){e:{u=n.type,s=n.memoizedProps,p=p.ownerDocument||p;t:switch(u){case"title":b=p.getElementsByTagName("title")[0],(!b||b[lt]||b[Ee]||b.namespaceURI==="http://www.w3.org/2000/svg"||b.hasAttribute("itemprop"))&&(b=p.createElement(u),p.head.insertBefore(b,p.querySelector("head > title"))),Ln(b,u,s),b[Ee]=n,Ht(b),u=b;break e;case"link":var w=Mb("link","href",p).get(u+(s.href||""));if(w){for(var C=0;C<w.length;C++)if(b=w[C],b.getAttribute("href")===(s.href==null||s.href===""?null:s.href)&&b.getAttribute("rel")===(s.rel==null?null:s.rel)&&b.getAttribute("title")===(s.title==null?null:s.title)&&b.getAttribute("crossorigin")===(s.crossOrigin==null?null:s.crossOrigin)){w.splice(C,1);break t}}b=p.createElement(u),Ln(b,u,s),p.head.appendChild(b);break;case"meta":if(w=Mb("meta","content",p).get(u+(s.content||""))){for(C=0;C<w.length;C++)if(b=w[C],b.getAttribute("content")===(s.content==null?null:""+s.content)&&b.getAttribute("name")===(s.name==null?null:s.name)&&b.getAttribute("property")===(s.property==null?null:s.property)&&b.getAttribute("http-equiv")===(s.httpEquiv==null?null:s.httpEquiv)&&b.getAttribute("charset")===(s.charSet==null?null:s.charSet)){w.splice(C,1);break t}}b=p.createElement(u),Ln(b,u,s),p.head.appendChild(b);break;default:throw Error(a(468,u))}b[Ee]=n,Ht(b),u=b}n.stateNode=u}else jb(p,n.type,n.stateNode);else n.stateNode=Ob(p,u,n.memoizedProps);else b!==u?(b===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):b.count--,u===null?jb(p,n.type,n.stateNode):Ob(p,u,n.memoizedProps)):u===null&&n.stateNode!==null&&gf(n,n.memoizedProps,s.memoizedProps)}break;case 27:Jn(i,n),er(n),u&512&&(yn||s===null||Zr(s,s.return)),s!==null&&u&4&&gf(n,n.memoizedProps,s.memoizedProps);break;case 5:if(Jn(i,n),er(n),u&512&&(yn||s===null||Zr(s,s.return)),n.flags&32){p=n.stateNode;try{Ze(p,"")}catch(je){Pt(n,n.return,je)}}u&4&&n.stateNode!=null&&(p=n.memoizedProps,gf(n,p,s!==null?s.memoizedProps:p)),u&1024&&(yf=!0);break;case 6:if(Jn(i,n),er(n),u&4){if(n.stateNode===null)throw Error(a(162));u=n.memoizedProps,s=n.stateNode;try{s.nodeValue=u}catch(je){Pt(n,n.return,je)}}break;case 3:if(Uc=null,p=Br,Br=Ic(i.containerInfo),Jn(i,n),Br=p,er(n),u&4&&s!==null&&s.memoizedState.isDehydrated)try{Os(i.containerInfo)}catch(je){Pt(n,n.return,je)}yf&&(yf=!1,jg(n));break;case 4:u=Br,Br=Ic(n.stateNode.containerInfo),Jn(i,n),er(n),Br=u;break;case 12:Jn(i,n),er(n);break;case 31:Jn(i,n),er(n),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,_c(n,u)));break;case 13:Jn(i,n),er(n),n.child.flags&8192&&n.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(Nc=Wt()),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,_c(n,u)));break;case 22:p=n.memoizedState!==null;var I=s!==null&&s.memoizedState!==null,Z=ki,oe=yn;if(ki=Z||p,yn=oe||I,Jn(i,n),yn=oe,ki=Z,er(n),u&8192)e:for(i=n.stateNode,i._visibility=p?i._visibility&-2:i._visibility|1,p&&(s===null||I||ki||yn||Ua(n)),s=null,i=n;;){if(i.tag===5||i.tag===26){if(s===null){I=s=i;try{if(b=I.stateNode,p)w=b.style,typeof w.setProperty=="function"?w.setProperty("display","none","important"):w.display="none";else{C=I.stateNode;var he=I.memoizedProps.style,J=he!=null&&he.hasOwnProperty("display")?he.display:null;C.style.display=J==null||typeof J=="boolean"?"":(""+J).trim()}}catch(je){Pt(I,I.return,je)}}}else if(i.tag===6){if(s===null){I=i;try{I.stateNode.nodeValue=p?"":I.memoizedProps}catch(je){Pt(I,I.return,je)}}}else if(i.tag===18){if(s===null){I=i;try{var ne=I.stateNode;p?_b(ne,!0):_b(I.stateNode,!1)}catch(je){Pt(I,I.return,je)}}}else if((i.tag!==22&&i.tag!==23||i.memoizedState===null||i===n)&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===n)break e;for(;i.sibling===null;){if(i.return===null||i.return===n)break e;s===i&&(s=null),i=i.return}s===i&&(s=null),i.sibling.return=i.return,i=i.sibling}u&4&&(u=n.updateQueue,u!==null&&(s=u.retryQueue,s!==null&&(u.retryQueue=null,_c(n,s))));break;case 19:Jn(i,n),er(n),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,_c(n,u)));break;case 30:break;case 21:break;default:Jn(i,n),er(n)}}function er(n){var i=n.flags;if(i&2){try{for(var s,u=n.return;u!==null;){if(Ng(u)){s=u;break}u=u.return}if(s==null)throw Error(a(160));switch(s.tag){case 27:var p=s.stateNode,b=bf(n);wc(n,b,p);break;case 5:var w=s.stateNode;s.flags&32&&(Ze(w,""),s.flags&=-33);var C=bf(n);wc(n,C,w);break;case 3:case 4:var I=s.stateNode.containerInfo,Z=bf(n);xf(n,Z,I);break;default:throw Error(a(161))}}catch(oe){Pt(n,n.return,oe)}n.flags&=-3}i&4096&&(n.flags&=-4097)}function jg(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var i=n;jg(i),i.tag===5&&i.flags&1024&&i.stateNode.reset(),n=n.sibling}}function _i(n,i){if(i.subtreeFlags&8772)for(i=i.child;i!==null;)Cg(n,i.alternate,i),i=i.sibling}function Ua(n){for(n=n.child;n!==null;){var i=n;switch(i.tag){case 0:case 11:case 14:case 15:Qi(4,i,i.return),Ua(i);break;case 1:Zr(i,i.return);var s=i.stateNode;typeof s.componentWillUnmount=="function"&&_g(i,i.return,s),Ua(i);break;case 27:Il(i.stateNode);case 26:case 5:Zr(i,i.return),Ua(i);break;case 22:i.memoizedState===null&&Ua(i);break;case 30:Ua(i);break;default:Ua(i)}n=n.sibling}}function Ei(n,i,s){for(s=s&&(i.subtreeFlags&8772)!==0,i=i.child;i!==null;){var u=i.alternate,p=n,b=i,w=b.flags;switch(b.tag){case 0:case 11:case 15:Ei(p,b,s),zl(4,b);break;case 1:if(Ei(p,b,s),u=b,p=u.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch(Z){Pt(u,u.return,Z)}if(u=b,p=u.updateQueue,p!==null){var C=u.stateNode;try{var I=p.shared.hiddenCallbacks;if(I!==null)for(p.shared.hiddenCallbacks=null,p=0;p<I.length;p++)d0(I[p],C)}catch(Z){Pt(u,u.return,Z)}}s&&w&64&&wg(b),Cl(b,b.return);break;case 27:Sg(b);case 26:case 5:Ei(p,b,s),s&&u===null&&w&4&&Eg(b),Cl(b,b.return);break;case 12:Ei(p,b,s);break;case 31:Ei(p,b,s),s&&w&4&&Ag(p,b);break;case 13:Ei(p,b,s),s&&w&4&&Og(p,b);break;case 22:b.memoizedState===null&&Ei(p,b,s),Cl(b,b.return);break;case 30:break;default:Ei(p,b,s)}i=i.sibling}}function vf(n,i){var s=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(s=n.memoizedState.cachePool.pool),n=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(n=i.memoizedState.cachePool.pool),n!==s&&(n!=null&&n.refCount++,s!=null&&ml(s))}function kf(n,i){n=null,i.alternate!==null&&(n=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==n&&(i.refCount++,n!=null&&ml(n))}function Ur(n,i,s,u){if(i.subtreeFlags&10256)for(i=i.child;i!==null;)Dg(n,i,s,u),i=i.sibling}function Dg(n,i,s,u){var p=i.flags;switch(i.tag){case 0:case 11:case 15:Ur(n,i,s,u),p&2048&&zl(9,i);break;case 1:Ur(n,i,s,u);break;case 3:Ur(n,i,s,u),p&2048&&(n=null,i.alternate!==null&&(n=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==n&&(i.refCount++,n!=null&&ml(n)));break;case 12:if(p&2048){Ur(n,i,s,u),n=i.stateNode;try{var b=i.memoizedProps,w=b.id,C=b.onPostCommit;typeof C=="function"&&C(w,i.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(I){Pt(i,i.return,I)}}else Ur(n,i,s,u);break;case 31:Ur(n,i,s,u);break;case 13:Ur(n,i,s,u);break;case 23:break;case 22:b=i.stateNode,w=i.alternate,i.memoizedState!==null?b._visibility&2?Ur(n,i,s,u):Tl(n,i):b._visibility&2?Ur(n,i,s,u):(b._visibility|=2,ks(n,i,s,u,(i.subtreeFlags&10256)!==0||!1)),p&2048&&vf(w,i);break;case 24:Ur(n,i,s,u),p&2048&&kf(i.alternate,i);break;default:Ur(n,i,s,u)}}function ks(n,i,s,u,p){for(p=p&&((i.subtreeFlags&10256)!==0||!1),i=i.child;i!==null;){var b=n,w=i,C=s,I=u,Z=w.flags;switch(w.tag){case 0:case 11:case 15:ks(b,w,C,I,p),zl(8,w);break;case 23:break;case 22:var oe=w.stateNode;w.memoizedState!==null?oe._visibility&2?ks(b,w,C,I,p):Tl(b,w):(oe._visibility|=2,ks(b,w,C,I,p)),p&&Z&2048&&vf(w.alternate,w);break;case 24:ks(b,w,C,I,p),p&&Z&2048&&kf(w.alternate,w);break;default:ks(b,w,C,I,p)}i=i.sibling}}function Tl(n,i){if(i.subtreeFlags&10256)for(i=i.child;i!==null;){var s=n,u=i,p=u.flags;switch(u.tag){case 22:Tl(s,u),p&2048&&vf(u.alternate,u);break;case 24:Tl(s,u),p&2048&&kf(u.alternate,u);break;default:Tl(s,u)}i=i.sibling}}var Rl=8192;function ws(n,i,s){if(n.subtreeFlags&Rl)for(n=n.child;n!==null;)Lg(n,i,s),n=n.sibling}function Lg(n,i,s){switch(n.tag){case 26:ws(n,i,s),n.flags&Rl&&n.memoizedState!==null&&qE(s,Br,n.memoizedState,n.memoizedProps);break;case 5:ws(n,i,s);break;case 3:case 4:var u=Br;Br=Ic(n.stateNode.containerInfo),ws(n,i,s),Br=u;break;case 22:n.memoizedState===null&&(u=n.alternate,u!==null&&u.memoizedState!==null?(u=Rl,Rl=16777216,ws(n,i,s),Rl=u):ws(n,i,s));break;default:ws(n,i,s)}}function Ig(n){var i=n.alternate;if(i!==null&&(n=i.child,n!==null)){i.child=null;do i=n.sibling,n.sibling=null,n=i;while(n!==null)}}function Al(n){var i=n.deletions;if((n.flags&16)!==0){if(i!==null)for(var s=0;s<i.length;s++){var u=i[s];Rn=u,Ug(u,n)}Ig(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)Bg(n),n=n.sibling}function Bg(n){switch(n.tag){case 0:case 11:case 15:Al(n),n.flags&2048&&Qi(9,n,n.return);break;case 3:Al(n);break;case 12:Al(n);break;case 22:var i=n.stateNode;n.memoizedState!==null&&i._visibility&2&&(n.return===null||n.return.tag!==13)?(i._visibility&=-3,Ec(n)):Al(n);break;default:Al(n)}}function Ec(n){var i=n.deletions;if((n.flags&16)!==0){if(i!==null)for(var s=0;s<i.length;s++){var u=i[s];Rn=u,Ug(u,n)}Ig(n)}for(n=n.child;n!==null;){switch(i=n,i.tag){case 0:case 11:case 15:Qi(8,i,i.return),Ec(i);break;case 22:s=i.stateNode,s._visibility&2&&(s._visibility&=-3,Ec(i));break;default:Ec(i)}n=n.sibling}}function Ug(n,i){for(;Rn!==null;){var s=Rn;switch(s.tag){case 0:case 11:case 15:Qi(8,s,i);break;case 23:case 22:if(s.memoizedState!==null&&s.memoizedState.cachePool!==null){var u=s.memoizedState.cachePool.pool;u!=null&&u.refCount++}break;case 24:ml(s.memoizedState.cache)}if(u=s.child,u!==null)u.return=s,Rn=u;else e:for(s=n;Rn!==null;){u=Rn;var p=u.sibling,b=u.return;if(Tg(u),u===s){Rn=null;break e}if(p!==null){p.return=b,Rn=p;break e}Rn=b}}}var iE={getCacheForType:function(n){var i=jn(gn),s=i.data.get(n);return s===void 0&&(s=n(),i.data.set(n,s)),s},cacheSignal:function(){return jn(gn).controller.signal}},aE=typeof WeakMap=="function"?WeakMap:Map,jt=0,Vt=null,ht=null,yt=0,Ft=0,dr=null,Xi=!1,_s=!1,wf=!1,Ni=0,on=0,Zi=0,Fa=0,_f=0,fr=0,Es=0,Ol=null,tr=null,Ef=!1,Nc=0,Fg=0,Sc=1/0,zc=null,Wi=null,En=0,Ji=null,Ns=null,Si=0,Nf=0,Sf=null,Pg=null,Ml=0,zf=null;function hr(){return(jt&2)!==0&&yt!==0?yt&-yt:M.T!==null?Mf():me()}function Hg(){if(fr===0)if((yt&536870912)===0||kt){var n=Lr;Lr<<=1,(Lr&3932160)===0&&(Lr=262144),fr=n}else fr=536870912;return n=cr.current,n!==null&&(n.flags|=32),fr}function nr(n,i,s){(n===Vt&&(Ft===2||Ft===9)||n.cancelPendingCommit!==null)&&(Ss(n,0),ea(n,yt,fr,!1)),At(n,s),((jt&2)===0||n!==Vt)&&(n===Vt&&((jt&2)===0&&(Fa|=s),on===4&&ea(n,yt,fr,!1)),Wr(n))}function qg(n,i,s){if((jt&6)!==0)throw Error(a(327));var u=!s&&(i&127)===0&&(i&n.expiredLanes)===0||ce(n,i),p=u?oE(n,i):Tf(n,i,!0),b=u;do{if(p===0){_s&&!u&&ea(n,i,0,!1);break}else{if(s=n.current.alternate,b&&!sE(s)){p=Tf(n,i,!1),b=!1;continue}if(p===2){if(b=i,n.errorRecoveryDisabledLanes&b)var w=0;else w=n.pendingLanes&-536870913,w=w!==0?w:w&536870912?536870912:0;if(w!==0){i=w;e:{var C=n;p=Ol;var I=C.current.memoizedState.isDehydrated;if(I&&(Ss(C,w).flags|=256),w=Tf(C,w,!1),w!==2){if(wf&&!I){C.errorRecoveryDisabledLanes|=b,Fa|=b,p=4;break e}b=tr,tr=p,b!==null&&(tr===null?tr=b:tr.push.apply(tr,b))}p=w}if(b=!1,p!==2)continue}}if(p===1){Ss(n,0),ea(n,i,0,!0);break}e:{switch(u=n,b=p,b){case 0:case 1:throw Error(a(345));case 4:if((i&4194048)!==i)break;case 6:ea(u,i,fr,!Xi);break e;case 2:tr=null;break;case 3:case 5:break;default:throw Error(a(329))}if((i&62914560)===i&&(p=Nc+300-Wt(),10<p)){if(ea(u,i,fr,!Xi),U(u,0,!0)!==0)break e;Si=i,u.timeoutHandle=vb($g.bind(null,u,s,tr,zc,Ef,i,fr,Fa,Es,Xi,b,"Throttled",-0,0),p);break e}$g(u,s,tr,zc,Ef,i,fr,Fa,Es,Xi,b,null,-0,0)}}break}while(!0);Wr(n)}function $g(n,i,s,u,p,b,w,C,I,Z,oe,he,J,ne){if(n.timeoutHandle=-1,he=i.subtreeFlags,he&8192||(he&16785408)===16785408){he={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Se},Lg(i,b,he);var je=(b&62914560)===b?Nc-Wt():(b&4194048)===b?Fg-Wt():0;if(je=$E(he,je),je!==null){Si=b,n.cancelPendingCommit=je(Wg.bind(null,n,i,b,s,u,p,w,C,I,oe,he,null,J,ne)),ea(n,b,w,!Z);return}}Wg(n,i,b,s,u,p,w,C,I)}function sE(n){for(var i=n;;){var s=i.tag;if((s===0||s===11||s===15)&&i.flags&16384&&(s=i.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var u=0;u<s.length;u++){var p=s[u],b=p.getSnapshot;p=p.value;try{if(!lr(b(),p))return!1}catch{return!1}}if(s=i.child,i.subtreeFlags&16384&&s!==null)s.return=i,i=s;else{if(i===n)break;for(;i.sibling===null;){if(i.return===null||i.return===n)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function ea(n,i,s,u){i&=~_f,i&=~Fa,n.suspendedLanes|=i,n.pingedLanes&=~i,u&&(n.warmLanes|=i),u=n.expirationTimes;for(var p=i;0<p;){var b=31-Rt(p),w=1<<b;u[b]=-1,p&=~w}s!==0&&Te(n,s,i)}function Cc(){return(jt&6)===0?(jl(0),!1):!0}function Cf(){if(ht!==null){if(Ft===0)var n=ht.return;else n=ht,pi=Aa=null,qd(n),gs=null,gl=0,n=ht;for(;n!==null;)kg(n.alternate,n),n=n.return;ht=null}}function Ss(n,i){var s=n.timeoutHandle;s!==-1&&(n.timeoutHandle=-1,SE(s)),s=n.cancelPendingCommit,s!==null&&(n.cancelPendingCommit=null,s()),Si=0,Cf(),Vt=n,ht=s=hi(n.current,null),yt=i,Ft=0,dr=null,Xi=!1,_s=ce(n,i),wf=!1,Es=fr=_f=Fa=Zi=on=0,tr=Ol=null,Ef=!1,(i&8)!==0&&(i|=i&32);var u=n.entangledLanes;if(u!==0)for(n=n.entanglements,u&=i;0<u;){var p=31-Rt(u),b=1<<p;i|=n[p],u&=~b}return Ni=i,Qo(),s}function Gg(n,i){it=null,M.H=El,i===ps||i===rc?(i=l0(),Ft=3):i===Ad?(i=l0(),Ft=4):Ft=i===sf?8:i!==null&&typeof i=="object"&&typeof i.then=="function"?6:1,dr=i,ht===null&&(on=1,bc(n,kr(i,n.current)))}function Kg(){var n=cr.current;return n===null?!0:(yt&4194048)===yt?Nr===null:(yt&62914560)===yt||(yt&536870912)!==0?n===Nr:!1}function Vg(){var n=M.H;return M.H=El,n===null?El:n}function Yg(){var n=M.A;return M.A=iE,n}function Tc(){on=4,Xi||(yt&4194048)!==yt&&cr.current!==null||(_s=!0),(Zi&134217727)===0&&(Fa&134217727)===0||Vt===null||ea(Vt,yt,fr,!1)}function Tf(n,i,s){var u=jt;jt|=2;var p=Vg(),b=Yg();(Vt!==n||yt!==i)&&(zc=null,Ss(n,i)),i=!1;var w=on;e:do try{if(Ft!==0&&ht!==null){var C=ht,I=dr;switch(Ft){case 8:Cf(),w=6;break e;case 3:case 2:case 9:case 6:cr.current===null&&(i=!0);var Z=Ft;if(Ft=0,dr=null,zs(n,C,I,Z),s&&_s){w=0;break e}break;default:Z=Ft,Ft=0,dr=null,zs(n,C,I,Z)}}lE(),w=on;break}catch(oe){Gg(n,oe)}while(!0);return i&&n.shellSuspendCounter++,pi=Aa=null,jt=u,M.H=p,M.A=b,ht===null&&(Vt=null,yt=0,Qo()),w}function lE(){for(;ht!==null;)Qg(ht)}function oE(n,i){var s=jt;jt|=2;var u=Vg(),p=Yg();Vt!==n||yt!==i?(zc=null,Sc=Wt()+500,Ss(n,i)):_s=ce(n,i);e:do try{if(Ft!==0&&ht!==null){i=ht;var b=dr;t:switch(Ft){case 1:Ft=0,dr=null,zs(n,i,b,1);break;case 2:case 9:if(a0(b)){Ft=0,dr=null,Xg(i);break}i=function(){Ft!==2&&Ft!==9||Vt!==n||(Ft=7),Wr(n)},b.then(i,i);break e;case 3:Ft=7;break e;case 4:Ft=5;break e;case 7:a0(b)?(Ft=0,dr=null,Xg(i)):(Ft=0,dr=null,zs(n,i,b,7));break;case 5:var w=null;switch(ht.tag){case 26:w=ht.memoizedState;case 5:case 27:var C=ht;if(w?Db(w):C.stateNode.complete){Ft=0,dr=null;var I=C.sibling;if(I!==null)ht=I;else{var Z=C.return;Z!==null?(ht=Z,Rc(Z)):ht=null}break t}}Ft=0,dr=null,zs(n,i,b,5);break;case 6:Ft=0,dr=null,zs(n,i,b,6);break;case 8:Cf(),on=6;break e;default:throw Error(a(462))}}cE();break}catch(oe){Gg(n,oe)}while(!0);return pi=Aa=null,M.H=u,M.A=p,jt=s,ht!==null?0:(Vt=null,yt=0,Qo(),on)}function cE(){for(;ht!==null&&!wa();)Qg(ht)}function Qg(n){var i=yg(n.alternate,n,Ni);n.memoizedProps=n.pendingProps,i===null?Rc(n):ht=i}function Xg(n){var i=n,s=i.alternate;switch(i.tag){case 15:case 0:i=hg(s,i,i.pendingProps,i.type,void 0,yt);break;case 11:i=hg(s,i,i.pendingProps,i.type.render,i.ref,yt);break;case 5:qd(i);default:kg(s,i),i=ht=Yp(i,Ni),i=yg(s,i,Ni)}n.memoizedProps=n.pendingProps,i===null?Rc(n):ht=i}function zs(n,i,s,u){pi=Aa=null,qd(i),gs=null,gl=0;var p=i.return;try{if(Z_(n,p,i,s,yt)){on=1,bc(n,kr(s,n.current)),ht=null;return}}catch(b){if(p!==null)throw ht=p,b;on=1,bc(n,kr(s,n.current)),ht=null;return}i.flags&32768?(kt||u===1?n=!0:_s||(yt&536870912)!==0?n=!1:(Xi=n=!0,(u===2||u===9||u===3||u===6)&&(u=cr.current,u!==null&&u.tag===13&&(u.flags|=16384))),Zg(i,n)):Rc(i)}function Rc(n){var i=n;do{if((i.flags&32768)!==0){Zg(i,Xi);return}n=i.return;var s=eE(i.alternate,i,Ni);if(s!==null){ht=s;return}if(i=i.sibling,i!==null){ht=i;return}ht=i=n}while(i!==null);on===0&&(on=5)}function Zg(n,i){do{var s=tE(n.alternate,n);if(s!==null){s.flags&=32767,ht=s;return}if(s=n.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!i&&(n=n.sibling,n!==null)){ht=n;return}ht=n=s}while(n!==null);on=6,ht=null}function Wg(n,i,s,u,p,b,w,C,I){n.cancelPendingCommit=null;do Ac();while(En!==0);if((jt&6)!==0)throw Error(a(327));if(i!==null){if(i===n.current)throw Error(a(177));if(b=i.lanes|i.childLanes,b|=gd,Me(n,s,b,w,C,I),n===Vt&&(ht=Vt=null,yt=0),Ns=i,Ji=n,Si=s,Nf=b,Sf=p,Pg=u,(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,hE($e,function(){return rb(),null})):(n.callbackNode=null,n.callbackPriority=0),u=(i.flags&13878)!==0,(i.subtreeFlags&13878)!==0||u){u=M.T,M.T=null,p=Y.p,Y.p=2,w=jt,jt|=4;try{nE(n,i,s)}finally{jt=w,Y.p=p,M.T=u}}En=1,Jg(),eb(),tb()}}function Jg(){if(En===1){En=0;var n=Ji,i=Ns,s=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||s){s=M.T,M.T=null;var u=Y.p;Y.p=2;var p=jt;jt|=4;try{Mg(i,n);var b=Pf,w=Up(n.containerInfo),C=b.focusedElem,I=b.selectionRange;if(w!==C&&C&&C.ownerDocument&&Bp(C.ownerDocument.documentElement,C)){if(I!==null&&dd(C)){var Z=I.start,oe=I.end;if(oe===void 0&&(oe=Z),"selectionStart"in C)C.selectionStart=Z,C.selectionEnd=Math.min(oe,C.value.length);else{var he=C.ownerDocument||document,J=he&&he.defaultView||window;if(J.getSelection){var ne=J.getSelection(),je=C.textContent.length,Ye=Math.min(I.start,je),Gt=I.end===void 0?Ye:Math.min(I.end,je);!ne.extend&&Ye>Gt&&(w=Gt,Gt=Ye,Ye=w);var K=Ip(C,Ye),q=Ip(C,Gt);if(K&&q&&(ne.rangeCount!==1||ne.anchorNode!==K.node||ne.anchorOffset!==K.offset||ne.focusNode!==q.node||ne.focusOffset!==q.offset)){var X=he.createRange();X.setStart(K.node,K.offset),ne.removeAllRanges(),Ye>Gt?(ne.addRange(X),ne.extend(q.node,q.offset)):(X.setEnd(q.node,q.offset),ne.addRange(X))}}}}for(he=[],ne=C;ne=ne.parentNode;)ne.nodeType===1&&he.push({element:ne,left:ne.scrollLeft,top:ne.scrollTop});for(typeof C.focus=="function"&&C.focus(),C=0;C<he.length;C++){var de=he[C];de.element.scrollLeft=de.left,de.element.scrollTop=de.top}}qc=!!Ff,Pf=Ff=null}finally{jt=p,Y.p=u,M.T=s}}n.current=i,En=2}}function eb(){if(En===2){En=0;var n=Ji,i=Ns,s=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||s){s=M.T,M.T=null;var u=Y.p;Y.p=2;var p=jt;jt|=4;try{Cg(n,i.alternate,i)}finally{jt=p,Y.p=u,M.T=s}}En=3}}function tb(){if(En===4||En===3){En=0,Li();var n=Ji,i=Ns,s=Si,u=Pg;(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?En=5:(En=0,Ns=Ji=null,nb(n,n.pendingLanes));var p=n.pendingLanes;if(p===0&&(Wi=null),W(s),i=i.stateNode,rn&&typeof rn.onCommitFiberRoot=="function")try{rn.onCommitFiberRoot(cn,i,void 0,(i.current.flags&128)===128)}catch{}if(u!==null){i=M.T,p=Y.p,Y.p=2,M.T=null;try{for(var b=n.onRecoverableError,w=0;w<u.length;w++){var C=u[w];b(C.value,{componentStack:C.stack})}}finally{M.T=i,Y.p=p}}(Si&3)!==0&&Ac(),Wr(n),p=n.pendingLanes,(s&261930)!==0&&(p&42)!==0?n===zf?Ml++:(Ml=0,zf=n):Ml=0,jl(0)}}function nb(n,i){(n.pooledCacheLanes&=i)===0&&(i=n.pooledCache,i!=null&&(n.pooledCache=null,ml(i)))}function Ac(){return Jg(),eb(),tb(),rb()}function rb(){if(En!==5)return!1;var n=Ji,i=Nf;Nf=0;var s=W(Si),u=M.T,p=Y.p;try{Y.p=32>s?32:s,M.T=null,s=Sf,Sf=null;var b=Ji,w=Si;if(En=0,Ns=Ji=null,Si=0,(jt&6)!==0)throw Error(a(331));var C=jt;if(jt|=4,Bg(b.current),Dg(b,b.current,w,s),jt=C,jl(0,!1),rn&&typeof rn.onPostCommitFiberRoot=="function")try{rn.onPostCommitFiberRoot(cn,b)}catch{}return!0}finally{Y.p=p,M.T=u,nb(n,i)}}function ib(n,i,s){i=kr(s,i),i=af(n.stateNode,i,2),n=Ki(n,i,2),n!==null&&(At(n,2),Wr(n))}function Pt(n,i,s){if(n.tag===3)ib(n,n,s);else for(;i!==null;){if(i.tag===3){ib(i,n,s);break}else if(i.tag===1){var u=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(Wi===null||!Wi.has(u))){n=kr(s,n),s=ag(2),u=Ki(i,s,2),u!==null&&(sg(s,u,i,n),At(u,2),Wr(u));break}}i=i.return}}function Rf(n,i,s){var u=n.pingCache;if(u===null){u=n.pingCache=new aE;var p=new Set;u.set(i,p)}else p=u.get(i),p===void 0&&(p=new Set,u.set(i,p));p.has(s)||(wf=!0,p.add(s),n=uE.bind(null,n,i,s),i.then(n,n))}function uE(n,i,s){var u=n.pingCache;u!==null&&u.delete(i),n.pingedLanes|=n.suspendedLanes&s,n.warmLanes&=~s,Vt===n&&(yt&s)===s&&(on===4||on===3&&(yt&62914560)===yt&&300>Wt()-Nc?(jt&2)===0&&Ss(n,0):_f|=s,Es===yt&&(Es=0)),Wr(n)}function ab(n,i){i===0&&(i=Qe()),n=Ca(n,i),n!==null&&(At(n,i),Wr(n))}function dE(n){var i=n.memoizedState,s=0;i!==null&&(s=i.retryLane),ab(n,s)}function fE(n,i){var s=0;switch(n.tag){case 31:case 13:var u=n.stateNode,p=n.memoizedState;p!==null&&(s=p.retryLane);break;case 19:u=n.stateNode;break;case 22:u=n.stateNode._retryCache;break;default:throw Error(a(314))}u!==null&&u.delete(i),ab(n,s)}function hE(n,i){return xr(n,i)}var Oc=null,Cs=null,Af=!1,Mc=!1,Of=!1,ta=0;function Wr(n){n!==Cs&&n.next===null&&(Cs===null?Oc=Cs=n:Cs=Cs.next=n),Mc=!0,Af||(Af=!0,pE())}function jl(n,i){if(!Of&&Mc){Of=!0;do for(var s=!1,u=Oc;u!==null;){if(n!==0){var p=u.pendingLanes;if(p===0)var b=0;else{var w=u.suspendedLanes,C=u.pingedLanes;b=(1<<31-Rt(42|n)+1)-1,b&=p&~(w&~C),b=b&201326741?b&201326741|1:b?b|2:0}b!==0&&(s=!0,cb(u,b))}else b=yt,b=U(u,u===Vt?b:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(b&3)===0||ce(u,b)||(s=!0,cb(u,b));u=u.next}while(s);Of=!1}}function mE(){sb()}function sb(){Mc=Af=!1;var n=0;ta!==0&&NE()&&(n=ta);for(var i=Wt(),s=null,u=Oc;u!==null;){var p=u.next,b=lb(u,i);b===0?(u.next=null,s===null?Oc=p:s.next=p,p===null&&(Cs=s)):(s=u,(n!==0||(b&3)!==0)&&(Mc=!0)),u=p}En!==0&&En!==5||jl(n),ta!==0&&(ta=0)}function lb(n,i){for(var s=n.suspendedLanes,u=n.pingedLanes,p=n.expirationTimes,b=n.pendingLanes&-62914561;0<b;){var w=31-Rt(b),C=1<<w,I=p[w];I===-1?((C&s)===0||(C&u)!==0)&&(p[w]=ze(C,i)):I<=i&&(n.expiredLanes|=C),b&=~C}if(i=Vt,s=yt,s=U(n,n===i?s:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),u=n.callbackNode,s===0||n===i&&(Ft===2||Ft===9)||n.cancelPendingCommit!==null)return u!==null&&u!==null&&oi(u),n.callbackNode=null,n.callbackPriority=0;if((s&3)===0||ce(n,s)){if(i=s&-s,i===n.callbackPriority)return i;switch(u!==null&&oi(u),W(s)){case 2:case 8:s=_e;break;case 32:s=$e;break;case 268435456:s=rt;break;default:s=$e}return u=ob.bind(null,n),s=xr(s,u),n.callbackPriority=i,n.callbackNode=s,i}return u!==null&&u!==null&&oi(u),n.callbackPriority=2,n.callbackNode=null,2}function ob(n,i){if(En!==0&&En!==5)return n.callbackNode=null,n.callbackPriority=0,null;var s=n.callbackNode;if(Ac()&&n.callbackNode!==s)return null;var u=yt;return u=U(n,n===Vt?u:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),u===0?null:(qg(n,u,i),lb(n,Wt()),n.callbackNode!=null&&n.callbackNode===s?ob.bind(null,n):null)}function cb(n,i){if(Ac())return null;qg(n,i,!0)}function pE(){zE(function(){(jt&6)!==0?xr(ae,mE):sb()})}function Mf(){if(ta===0){var n=hs;n===0&&(n=Kr,Kr<<=1,(Kr&261888)===0&&(Kr=256)),ta=n}return ta}function ub(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:Bi(""+n)}function db(n,i){var s=i.ownerDocument.createElement("input");return s.name=i.name,s.value=i.value,n.id&&s.setAttribute("form",n.id),i.parentNode.insertBefore(s,i),n=new FormData(n),s.parentNode.removeChild(s),n}function gE(n,i,s,u,p){if(i==="submit"&&s&&s.stateNode===p){var b=ub((p[Ce]||null).action),w=u.submitter;w&&(i=(i=w[Ce]||null)?ub(i.formAction):w.getAttribute("formAction"),i!==null&&(b=i,w=null));var C=new Go("action","action",null,u,p);n.push({event:C,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(ta!==0){var I=w?db(p,w):new FormData(p);Wd(s,{pending:!0,data:I,method:p.method,action:b},null,I)}}else typeof b=="function"&&(C.preventDefault(),I=w?db(p,w):new FormData(p),Wd(s,{pending:!0,data:I,method:p.method,action:b},b,I))},currentTarget:p}]})}}for(var jf=0;jf<pd.length;jf++){var Df=pd[jf],bE=Df.toLowerCase(),xE=Df[0].toUpperCase()+Df.slice(1);Ir(bE,"on"+xE)}Ir(Hp,"onAnimationEnd"),Ir(qp,"onAnimationIteration"),Ir($p,"onAnimationStart"),Ir("dblclick","onDoubleClick"),Ir("focusin","onFocus"),Ir("focusout","onBlur"),Ir(j_,"onTransitionRun"),Ir(D_,"onTransitionStart"),Ir(L_,"onTransitionCancel"),Ir(Gp,"onTransitionEnd"),ge("onMouseEnter",["mouseout","mouseover"]),ge("onMouseLeave",["mouseout","mouseover"]),ge("onPointerEnter",["pointerout","pointerover"]),ge("onPointerLeave",["pointerout","pointerover"]),mn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),mn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),mn("onBeforeInput",["compositionend","keypress","textInput","paste"]),mn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),mn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),mn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Dl="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(" "),yE=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Dl));function fb(n,i){i=(i&4)!==0;for(var s=0;s<n.length;s++){var u=n[s],p=u.event;u=u.listeners;e:{var b=void 0;if(i)for(var w=u.length-1;0<=w;w--){var C=u[w],I=C.instance,Z=C.currentTarget;if(C=C.listener,I!==b&&p.isPropagationStopped())break e;b=C,p.currentTarget=Z;try{b(p)}catch(oe){Yo(oe)}p.currentTarget=null,b=I}else for(w=0;w<u.length;w++){if(C=u[w],I=C.instance,Z=C.currentTarget,C=C.listener,I!==b&&p.isPropagationStopped())break e;b=C,p.currentTarget=Z;try{b(p)}catch(oe){Yo(oe)}p.currentTarget=null,b=I}}}}function mt(n,i){var s=i[He];s===void 0&&(s=i[He]=new Set);var u=n+"__bubble";s.has(u)||(hb(i,n,2,!1),s.add(u))}function Lf(n,i,s){var u=0;i&&(u|=4),hb(s,n,u,i)}var jc="_reactListening"+Math.random().toString(36).slice(2);function If(n){if(!n[jc]){n[jc]=!0,Yr.forEach(function(s){s!=="selectionchange"&&(yE.has(s)||Lf(s,!1,n),Lf(s,!0,n))});var i=n.nodeType===9?n:n.ownerDocument;i===null||i[jc]||(i[jc]=!0,Lf("selectionchange",!1,i))}}function hb(n,i,s,u){switch(Hb(i)){case 2:var p=VE;break;case 8:p=YE;break;default:p=Wf}s=p.bind(null,i,s,n),p=void 0,!nd||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(p=!0),u?p!==void 0?n.addEventListener(i,s,{capture:!0,passive:p}):n.addEventListener(i,s,!0):p!==void 0?n.addEventListener(i,s,{passive:p}):n.addEventListener(i,s,!1)}function Bf(n,i,s,u,p){var b=u;if((i&1)===0&&(i&2)===0&&u!==null)e:for(;;){if(u===null)return;var w=u.tag;if(w===3||w===4){var C=u.stateNode.containerInfo;if(C===p)break;if(w===4)for(w=u.return;w!==null;){var I=w.tag;if((I===3||I===4)&&w.stateNode.containerInfo===p)return;w=w.return}for(;C!==null;){if(w=Nt(C),w===null)return;if(I=w.tag,I===5||I===6||I===26||I===27){u=b=w;continue e}C=C.parentNode}}u=u.return}Po(function(){var Z=b,oe=nt(s),he=[];e:{var J=Kp.get(n);if(J!==void 0){var ne=Go,je=n;switch(n){case"keypress":if(qo(s)===0)break e;case"keydown":case"keyup":ne=f_;break;case"focusin":je="focus",ne=sd;break;case"focusout":je="blur",ne=sd;break;case"beforeblur":case"afterblur":ne=sd;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ne=kp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ne=e_;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ne=p_;break;case Hp:case qp:case $p:ne=r_;break;case Gp:ne=b_;break;case"scroll":case"scrollend":ne=Ww;break;case"wheel":ne=y_;break;case"copy":case"cut":case"paste":ne=a_;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ne=_p;break;case"toggle":case"beforetoggle":ne=k_}var Ye=(i&4)!==0,Gt=!Ye&&(n==="scroll"||n==="scrollend"),K=Ye?J!==null?J+"Capture":null:J;Ye=[];for(var q=Z,X;q!==null;){var de=q;if(X=de.stateNode,de=de.tag,de!==5&&de!==26&&de!==27||X===null||K===null||(de=rl(q,K),de!=null&&Ye.push(Ll(q,de,X))),Gt)break;q=q.return}0<Ye.length&&(J=new ne(J,je,null,s,oe),he.push({event:J,listeners:Ye}))}}if((i&7)===0){e:{if(J=n==="mouseover"||n==="pointerover",ne=n==="mouseout"||n==="pointerout",J&&s!==Fe&&(je=s.relatedTarget||s.fromElement)&&(Nt(je)||je[Re]))break e;if((ne||J)&&(J=oe.window===oe?oe:(J=oe.ownerDocument)?J.defaultView||J.parentWindow:window,ne?(je=s.relatedTarget||s.toElement,ne=Z,je=je?Nt(je):null,je!==null&&(Gt=o(je),Ye=je.tag,je!==Gt||Ye!==5&&Ye!==27&&Ye!==6)&&(je=null)):(ne=null,je=Z),ne!==je)){if(Ye=kp,de="onMouseLeave",K="onMouseEnter",q="mouse",(n==="pointerout"||n==="pointerover")&&(Ye=_p,de="onPointerLeave",K="onPointerEnter",q="pointer"),Gt=ne==null?J:ft(ne),X=je==null?J:ft(je),J=new Ye(de,q+"leave",ne,s,oe),J.target=Gt,J.relatedTarget=X,de=null,Nt(oe)===Z&&(Ye=new Ye(K,q+"enter",je,s,oe),Ye.target=X,Ye.relatedTarget=Gt,de=Ye),Gt=de,ne&&je)t:{for(Ye=vE,K=ne,q=je,X=0,de=K;de;de=Ye(de))X++;de=0;for(var Ge=q;Ge;Ge=Ye(Ge))de++;for(;0<X-de;)K=Ye(K),X--;for(;0<de-X;)q=Ye(q),de--;for(;X--;){if(K===q||q!==null&&K===q.alternate){Ye=K;break t}K=Ye(K),q=Ye(q)}Ye=null}else Ye=null;ne!==null&&mb(he,J,ne,Ye,!1),je!==null&&Gt!==null&&mb(he,Gt,je,Ye,!0)}}e:{if(J=Z?ft(Z):window,ne=J.nodeName&&J.nodeName.toLowerCase(),ne==="select"||ne==="input"&&J.type==="file")var Ot=Ap;else if(Tp(J))if(Op)Ot=A_;else{Ot=T_;var Pe=C_}else ne=J.nodeName,!ne||ne.toLowerCase()!=="input"||J.type!=="checkbox"&&J.type!=="radio"?Z&&Ii(Z.elementType)&&(Ot=Ap):Ot=R_;if(Ot&&(Ot=Ot(n,Z))){Rp(he,Ot,s,oe);break e}Pe&&Pe(n,J,Z),n==="focusout"&&Z&&J.type==="number"&&Z.memoizedProps.value!=null&&ns(J,"number",J.value)}switch(Pe=Z?ft(Z):window,n){case"focusin":(Tp(Pe)||Pe.contentEditable==="true")&&(as=Pe,fd=Z,dl=null);break;case"focusout":dl=fd=as=null;break;case"mousedown":hd=!0;break;case"contextmenu":case"mouseup":case"dragend":hd=!1,Fp(he,s,oe);break;case"selectionchange":if(M_)break;case"keydown":case"keyup":Fp(he,s,oe)}var at;if(od)e:{switch(n){case"compositionstart":var vt="onCompositionStart";break e;case"compositionend":vt="onCompositionEnd";break e;case"compositionupdate":vt="onCompositionUpdate";break e}vt=void 0}else is?zp(n,s)&&(vt="onCompositionEnd"):n==="keydown"&&s.keyCode===229&&(vt="onCompositionStart");vt&&(Ep&&s.locale!=="ko"&&(is||vt!=="onCompositionStart"?vt==="onCompositionEnd"&&is&&(at=yp()):(Ui=oe,rd="value"in Ui?Ui.value:Ui.textContent,is=!0)),Pe=Dc(Z,vt),0<Pe.length&&(vt=new wp(vt,n,null,s,oe),he.push({event:vt,listeners:Pe}),at?vt.data=at:(at=Cp(s),at!==null&&(vt.data=at)))),(at=__?E_(n,s):N_(n,s))&&(vt=Dc(Z,"onBeforeInput"),0<vt.length&&(Pe=new wp("onBeforeInput","beforeinput",null,s,oe),he.push({event:Pe,listeners:vt}),Pe.data=at)),gE(he,n,Z,s,oe)}fb(he,i)})}function Ll(n,i,s){return{instance:n,listener:i,currentTarget:s}}function Dc(n,i){for(var s=i+"Capture",u=[];n!==null;){var p=n,b=p.stateNode;if(p=p.tag,p!==5&&p!==26&&p!==27||b===null||(p=rl(n,s),p!=null&&u.unshift(Ll(n,p,b)),p=rl(n,i),p!=null&&u.push(Ll(n,p,b))),n.tag===3)return u;n=n.return}return[]}function vE(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function mb(n,i,s,u,p){for(var b=i._reactName,w=[];s!==null&&s!==u;){var C=s,I=C.alternate,Z=C.stateNode;if(C=C.tag,I!==null&&I===u)break;C!==5&&C!==26&&C!==27||Z===null||(I=Z,p?(Z=rl(s,b),Z!=null&&w.unshift(Ll(s,Z,I))):p||(Z=rl(s,b),Z!=null&&w.push(Ll(s,Z,I)))),s=s.return}w.length!==0&&n.push({event:i,listeners:w})}var kE=/\r\n?/g,wE=/\u0000|\uFFFD/g;function pb(n){return(typeof n=="string"?n:""+n).replace(kE,`
49
+ `).replace(wE,"")}function gb(n,i){return i=pb(i),pb(n)===i}function $t(n,i,s,u,p,b){switch(s){case"children":typeof u=="string"?i==="body"||i==="textarea"&&u===""||Ze(n,u):(typeof u=="number"||typeof u=="bigint")&&i!=="body"&&Ze(n,""+u);break;case"className":It(n,"class",u);break;case"tabIndex":It(n,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":It(n,s,u);break;case"style":Ut(n,u,b);break;case"data":if(i!=="object"){It(n,"data",u);break}case"src":case"href":if(u===""&&(i!=="a"||s!=="href")){n.removeAttribute(s);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){n.removeAttribute(s);break}u=Bi(""+u),n.setAttribute(s,u);break;case"action":case"formAction":if(typeof u=="function"){n.setAttribute(s,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof b=="function"&&(s==="formAction"?(i!=="input"&&$t(n,i,"name",p.name,p,null),$t(n,i,"formEncType",p.formEncType,p,null),$t(n,i,"formMethod",p.formMethod,p,null),$t(n,i,"formTarget",p.formTarget,p,null)):($t(n,i,"encType",p.encType,p,null),$t(n,i,"method",p.method,p,null),$t(n,i,"target",p.target,p,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){n.removeAttribute(s);break}u=Bi(""+u),n.setAttribute(s,u);break;case"onClick":u!=null&&(n.onclick=Se);break;case"onScroll":u!=null&&mt("scroll",n);break;case"onScrollEnd":u!=null&&mt("scrollend",n);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(a(61));if(s=u.__html,s!=null){if(p.children!=null)throw Error(a(60));n.innerHTML=s}}break;case"multiple":n.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":n.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){n.removeAttribute("xlink:href");break}s=Bi(""+u),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":u!=null&&typeof u!="function"&&typeof u!="symbol"?n.setAttribute(s,""+u):n.removeAttribute(s);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":u&&typeof u!="function"&&typeof u!="symbol"?n.setAttribute(s,""):n.removeAttribute(s);break;case"capture":case"download":u===!0?n.setAttribute(s,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?n.setAttribute(s,u):n.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?n.setAttribute(s,u):n.removeAttribute(s);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?n.removeAttribute(s):n.setAttribute(s,u);break;case"popover":mt("beforetoggle",n),mt("toggle",n),Xe(n,"popover",u);break;case"xlinkActuate":dn(n,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":dn(n,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":dn(n,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":dn(n,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":dn(n,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":dn(n,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":dn(n,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":dn(n,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":dn(n,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":Xe(n,"is",u);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=di.get(s)||s,Xe(n,s,u))}}function Uf(n,i,s,u,p,b){switch(s){case"style":Ut(n,u,b);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(a(61));if(s=u.__html,s!=null){if(p.children!=null)throw Error(a(60));n.innerHTML=s}}break;case"children":typeof u=="string"?Ze(n,u):(typeof u=="number"||typeof u=="bigint")&&Ze(n,""+u);break;case"onScroll":u!=null&&mt("scroll",n);break;case"onScrollEnd":u!=null&&mt("scrollend",n);break;case"onClick":u!=null&&(n.onclick=Se);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Un.hasOwnProperty(s))e:{if(s[0]==="o"&&s[1]==="n"&&(p=s.endsWith("Capture"),i=s.slice(2,p?s.length-7:void 0),b=n[Ce]||null,b=b!=null?b[s]:null,typeof b=="function"&&n.removeEventListener(i,b,p),typeof u=="function")){typeof b!="function"&&b!==null&&(s in n?n[s]=null:n.hasAttribute(s)&&n.removeAttribute(s)),n.addEventListener(i,u,p);break e}s in n?n[s]=u:u===!0?n.setAttribute(s,""):Xe(n,s,u)}}}function Ln(n,i,s){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":mt("error",n),mt("load",n);var u=!1,p=!1,b;for(b in s)if(s.hasOwnProperty(b)){var w=s[b];if(w!=null)switch(b){case"src":u=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,i));default:$t(n,i,b,w,s,null)}}p&&$t(n,i,"srcSet",s.srcSet,s,null),u&&$t(n,i,"src",s.src,s,null);return;case"input":mt("invalid",n);var C=b=w=p=null,I=null,Z=null;for(u in s)if(s.hasOwnProperty(u)){var oe=s[u];if(oe!=null)switch(u){case"name":p=oe;break;case"type":w=oe;break;case"checked":I=oe;break;case"defaultChecked":Z=oe;break;case"value":b=oe;break;case"defaultValue":C=oe;break;case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(a(137,i));break;default:$t(n,i,u,oe,s,null)}}Ea(n,b,C,I,Z,w,p,!1);return;case"select":mt("invalid",n),u=w=b=null;for(p in s)if(s.hasOwnProperty(p)&&(C=s[p],C!=null))switch(p){case"value":b=C;break;case"defaultValue":w=C;break;case"multiple":u=C;default:$t(n,i,p,C,s,null)}i=b,s=w,n.multiple=!!u,i!=null?On(n,!!u,i,!1):s!=null&&On(n,!!u,s,!0);return;case"textarea":mt("invalid",n),b=p=u=null;for(w in s)if(s.hasOwnProperty(w)&&(C=s[w],C!=null))switch(w){case"value":u=C;break;case"defaultValue":p=C;break;case"children":b=C;break;case"dangerouslySetInnerHTML":if(C!=null)throw Error(a(91));break;default:$t(n,i,w,C,s,null)}rs(n,u,p,b);return;case"option":for(I in s)if(s.hasOwnProperty(I)&&(u=s[I],u!=null))switch(I){case"selected":n.selected=u&&typeof u!="function"&&typeof u!="symbol";break;default:$t(n,i,I,u,s,null)}return;case"dialog":mt("beforetoggle",n),mt("toggle",n),mt("cancel",n),mt("close",n);break;case"iframe":case"object":mt("load",n);break;case"video":case"audio":for(u=0;u<Dl.length;u++)mt(Dl[u],n);break;case"image":mt("error",n),mt("load",n);break;case"details":mt("toggle",n);break;case"embed":case"source":case"link":mt("error",n),mt("load",n);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Z in s)if(s.hasOwnProperty(Z)&&(u=s[Z],u!=null))switch(Z){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,i));default:$t(n,i,Z,u,s,null)}return;default:if(Ii(i)){for(oe in s)s.hasOwnProperty(oe)&&(u=s[oe],u!==void 0&&Uf(n,i,oe,u,s,void 0));return}}for(C in s)s.hasOwnProperty(C)&&(u=s[C],u!=null&&$t(n,i,C,u,s,null))}function _E(n,i,s,u){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var p=null,b=null,w=null,C=null,I=null,Z=null,oe=null;for(ne in s){var he=s[ne];if(s.hasOwnProperty(ne)&&he!=null)switch(ne){case"checked":break;case"value":break;case"defaultValue":I=he;default:u.hasOwnProperty(ne)||$t(n,i,ne,null,u,he)}}for(var J in u){var ne=u[J];if(he=s[J],u.hasOwnProperty(J)&&(ne!=null||he!=null))switch(J){case"type":b=ne;break;case"name":p=ne;break;case"checked":Z=ne;break;case"defaultChecked":oe=ne;break;case"value":w=ne;break;case"defaultValue":C=ne;break;case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(a(137,i));break;default:ne!==he&&$t(n,i,J,ne,u,he)}}el(n,w,C,I,Z,oe,b,p);return;case"select":ne=w=C=J=null;for(b in s)if(I=s[b],s.hasOwnProperty(b)&&I!=null)switch(b){case"value":break;case"multiple":ne=I;default:u.hasOwnProperty(b)||$t(n,i,b,null,u,I)}for(p in u)if(b=u[p],I=s[p],u.hasOwnProperty(p)&&(b!=null||I!=null))switch(p){case"value":J=b;break;case"defaultValue":C=b;break;case"multiple":w=b;default:b!==I&&$t(n,i,p,b,u,I)}i=C,s=w,u=ne,J!=null?On(n,!!s,J,!1):!!u!=!!s&&(i!=null?On(n,!!s,i,!0):On(n,!!s,s?[]:"",!1));return;case"textarea":ne=J=null;for(C in s)if(p=s[C],s.hasOwnProperty(C)&&p!=null&&!u.hasOwnProperty(C))switch(C){case"value":break;case"children":break;default:$t(n,i,C,null,u,p)}for(w in u)if(p=u[w],b=s[w],u.hasOwnProperty(w)&&(p!=null||b!=null))switch(w){case"value":J=p;break;case"defaultValue":ne=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(a(91));break;default:p!==b&&$t(n,i,w,p,u,b)}Uo(n,J,ne);return;case"option":for(var je in s)if(J=s[je],s.hasOwnProperty(je)&&J!=null&&!u.hasOwnProperty(je))switch(je){case"selected":n.selected=!1;break;default:$t(n,i,je,null,u,J)}for(I in u)if(J=u[I],ne=s[I],u.hasOwnProperty(I)&&J!==ne&&(J!=null||ne!=null))switch(I){case"selected":n.selected=J&&typeof J!="function"&&typeof J!="symbol";break;default:$t(n,i,I,J,u,ne)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Ye in s)J=s[Ye],s.hasOwnProperty(Ye)&&J!=null&&!u.hasOwnProperty(Ye)&&$t(n,i,Ye,null,u,J);for(Z in u)if(J=u[Z],ne=s[Z],u.hasOwnProperty(Z)&&J!==ne&&(J!=null||ne!=null))switch(Z){case"children":case"dangerouslySetInnerHTML":if(J!=null)throw Error(a(137,i));break;default:$t(n,i,Z,J,u,ne)}return;default:if(Ii(i)){for(var Gt in s)J=s[Gt],s.hasOwnProperty(Gt)&&J!==void 0&&!u.hasOwnProperty(Gt)&&Uf(n,i,Gt,void 0,u,J);for(oe in u)J=u[oe],ne=s[oe],!u.hasOwnProperty(oe)||J===ne||J===void 0&&ne===void 0||Uf(n,i,oe,J,u,ne);return}}for(var K in s)J=s[K],s.hasOwnProperty(K)&&J!=null&&!u.hasOwnProperty(K)&&$t(n,i,K,null,u,J);for(he in u)J=u[he],ne=s[he],!u.hasOwnProperty(he)||J===ne||J==null&&ne==null||$t(n,i,he,J,u,ne)}function bb(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function EE(){if(typeof performance.getEntriesByType=="function"){for(var n=0,i=0,s=performance.getEntriesByType("resource"),u=0;u<s.length;u++){var p=s[u],b=p.transferSize,w=p.initiatorType,C=p.duration;if(b&&C&&bb(w)){for(w=0,C=p.responseEnd,u+=1;u<s.length;u++){var I=s[u],Z=I.startTime;if(Z>C)break;var oe=I.transferSize,he=I.initiatorType;oe&&bb(he)&&(I=I.responseEnd,w+=oe*(I<C?1:(C-Z)/(I-Z)))}if(--u,i+=8*(b+w)/(p.duration/1e3),n++,10<n)break}}if(0<n)return i/n/1e6}return navigator.connection&&(n=navigator.connection.downlink,typeof n=="number")?n:5}var Ff=null,Pf=null;function Lc(n){return n.nodeType===9?n:n.ownerDocument}function xb(n){switch(n){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function yb(n,i){if(n===0)switch(i){case"svg":return 1;case"math":return 2;default:return 0}return n===1&&i==="foreignObject"?0:n}function Hf(n,i){return n==="textarea"||n==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.children=="bigint"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var qf=null;function NE(){var n=window.event;return n&&n.type==="popstate"?n===qf?!1:(qf=n,!0):(qf=null,!1)}var vb=typeof setTimeout=="function"?setTimeout:void 0,SE=typeof clearTimeout=="function"?clearTimeout:void 0,kb=typeof Promise=="function"?Promise:void 0,zE=typeof queueMicrotask=="function"?queueMicrotask:typeof kb<"u"?function(n){return kb.resolve(null).then(n).catch(CE)}:vb;function CE(n){setTimeout(function(){throw n})}function na(n){return n==="head"}function wb(n,i){var s=i,u=0;do{var p=s.nextSibling;if(n.removeChild(s),p&&p.nodeType===8)if(s=p.data,s==="/$"||s==="/&"){if(u===0){n.removeChild(p),Os(i);return}u--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")u++;else if(s==="html")Il(n.ownerDocument.documentElement);else if(s==="head"){s=n.ownerDocument.head,Il(s);for(var b=s.firstChild;b;){var w=b.nextSibling,C=b.nodeName;b[lt]||C==="SCRIPT"||C==="STYLE"||C==="LINK"&&b.rel.toLowerCase()==="stylesheet"||s.removeChild(b),b=w}}else s==="body"&&Il(n.ownerDocument.body);s=p}while(s);Os(i)}function _b(n,i){var s=n;n=0;do{var u=s.nextSibling;if(s.nodeType===1?i?(s._stashedDisplay=s.style.display,s.style.display="none"):(s.style.display=s._stashedDisplay||"",s.getAttribute("style")===""&&s.removeAttribute("style")):s.nodeType===3&&(i?(s._stashedText=s.nodeValue,s.nodeValue=""):s.nodeValue=s._stashedText||""),u&&u.nodeType===8)if(s=u.data,s==="/$"){if(n===0)break;n--}else s!=="$"&&s!=="$?"&&s!=="$~"&&s!=="$!"||n++;s=u}while(s)}function $f(n){var i=n.firstChild;for(i&&i.nodeType===10&&(i=i.nextSibling);i;){var s=i;switch(i=i.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":$f(s),Bt(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}n.removeChild(s)}}function TE(n,i,s,u){for(;n.nodeType===1;){var p=s;if(n.nodeName.toLowerCase()!==i.toLowerCase()){if(!u&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(u){if(!n[lt])switch(i){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(b=n.getAttribute("rel"),b==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(b!==p.rel||n.getAttribute("href")!==(p.href==null||p.href===""?null:p.href)||n.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin)||n.getAttribute("title")!==(p.title==null?null:p.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(b=n.getAttribute("src"),(b!==(p.src==null?null:p.src)||n.getAttribute("type")!==(p.type==null?null:p.type)||n.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin))&&b&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(i==="input"&&n.type==="hidden"){var b=p.name==null?null:""+p.name;if(p.type==="hidden"&&n.getAttribute("name")===b)return n}else return n;if(n=Sr(n.nextSibling),n===null)break}return null}function RE(n,i,s){if(i==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!s||(n=Sr(n.nextSibling),n===null))return null;return n}function Eb(n,i){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!i||(n=Sr(n.nextSibling),n===null))return null;return n}function Gf(n){return n.data==="$?"||n.data==="$~"}function Kf(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function AE(n,i){var s=n.ownerDocument;if(n.data==="$~")n._reactRetry=i;else if(n.data!=="$?"||s.readyState!=="loading")i();else{var u=function(){i(),s.removeEventListener("DOMContentLoaded",u)};s.addEventListener("DOMContentLoaded",u),n._reactRetry=u}}function Sr(n){for(;n!=null;n=n.nextSibling){var i=n.nodeType;if(i===1||i===3)break;if(i===8){if(i=n.data,i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"||i==="F!"||i==="F")break;if(i==="/$"||i==="/&")return null}}return n}var Vf=null;function Nb(n){n=n.nextSibling;for(var i=0;n;){if(n.nodeType===8){var s=n.data;if(s==="/$"||s==="/&"){if(i===0)return Sr(n.nextSibling);i--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||i++}n=n.nextSibling}return null}function Sb(n){n=n.previousSibling;for(var i=0;n;){if(n.nodeType===8){var s=n.data;if(s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"){if(i===0)return n;i--}else s!=="/$"&&s!=="/&"||i++}n=n.previousSibling}return null}function zb(n,i,s){switch(i=Lc(s),n){case"html":if(n=i.documentElement,!n)throw Error(a(452));return n;case"head":if(n=i.head,!n)throw Error(a(453));return n;case"body":if(n=i.body,!n)throw Error(a(454));return n;default:throw Error(a(451))}}function Il(n){for(var i=n.attributes;i.length;)n.removeAttributeNode(i[0]);Bt(n)}var zr=new Map,Cb=new Set;function Ic(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var zi=Y.d;Y.d={f:OE,r:ME,D:jE,C:DE,L:LE,m:IE,X:UE,S:BE,M:FE};function OE(){var n=zi.f(),i=Cc();return n||i}function ME(n){var i=Jt(n);i!==null&&i.tag===5&&i.type==="form"?G0(i):zi.r(n)}var Ts=typeof document>"u"?null:document;function Tb(n,i,s){var u=Ts;if(u&&typeof i=="string"&&i){var p=Xn(i);p='link[rel="'+n+'"][href="'+p+'"]',typeof s=="string"&&(p+='[crossorigin="'+s+'"]'),Cb.has(p)||(Cb.add(p),n={rel:n,crossOrigin:s,href:i},u.querySelector(p)===null&&(i=u.createElement("link"),Ln(i,"link",n),Ht(i),u.head.appendChild(i)))}}function jE(n){zi.D(n),Tb("dns-prefetch",n,null)}function DE(n,i){zi.C(n,i),Tb("preconnect",n,i)}function LE(n,i,s){zi.L(n,i,s);var u=Ts;if(u&&n&&i){var p='link[rel="preload"][as="'+Xn(i)+'"]';i==="image"&&s&&s.imageSrcSet?(p+='[imagesrcset="'+Xn(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(p+='[imagesizes="'+Xn(s.imageSizes)+'"]')):p+='[href="'+Xn(n)+'"]';var b=p;switch(i){case"style":b=Rs(n);break;case"script":b=As(n)}zr.has(b)||(n=x({rel:"preload",href:i==="image"&&s&&s.imageSrcSet?void 0:n,as:i},s),zr.set(b,n),u.querySelector(p)!==null||i==="style"&&u.querySelector(Bl(b))||i==="script"&&u.querySelector(Ul(b))||(i=u.createElement("link"),Ln(i,"link",n),Ht(i),u.head.appendChild(i)))}}function IE(n,i){zi.m(n,i);var s=Ts;if(s&&n){var u=i&&typeof i.as=="string"?i.as:"script",p='link[rel="modulepreload"][as="'+Xn(u)+'"][href="'+Xn(n)+'"]',b=p;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":b=As(n)}if(!zr.has(b)&&(n=x({rel:"modulepreload",href:n},i),zr.set(b,n),s.querySelector(p)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(Ul(b)))return}u=s.createElement("link"),Ln(u,"link",n),Ht(u),s.head.appendChild(u)}}}function BE(n,i,s){zi.S(n,i,s);var u=Ts;if(u&&n){var p=un(u).hoistableStyles,b=Rs(n);i=i||"default";var w=p.get(b);if(!w){var C={loading:0,preload:null};if(w=u.querySelector(Bl(b)))C.loading=5;else{n=x({rel:"stylesheet",href:n,"data-precedence":i},s),(s=zr.get(b))&&Yf(n,s);var I=w=u.createElement("link");Ht(I),Ln(I,"link",n),I._p=new Promise(function(Z,oe){I.onload=Z,I.onerror=oe}),I.addEventListener("load",function(){C.loading|=1}),I.addEventListener("error",function(){C.loading|=2}),C.loading|=4,Bc(w,i,u)}w={type:"stylesheet",instance:w,count:1,state:C},p.set(b,w)}}}function UE(n,i){zi.X(n,i);var s=Ts;if(s&&n){var u=un(s).hoistableScripts,p=As(n),b=u.get(p);b||(b=s.querySelector(Ul(p)),b||(n=x({src:n,async:!0},i),(i=zr.get(p))&&Qf(n,i),b=s.createElement("script"),Ht(b),Ln(b,"link",n),s.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},u.set(p,b))}}function FE(n,i){zi.M(n,i);var s=Ts;if(s&&n){var u=un(s).hoistableScripts,p=As(n),b=u.get(p);b||(b=s.querySelector(Ul(p)),b||(n=x({src:n,async:!0,type:"module"},i),(i=zr.get(p))&&Qf(n,i),b=s.createElement("script"),Ht(b),Ln(b,"link",n),s.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},u.set(p,b))}}function Rb(n,i,s,u){var p=(p=ye.current)?Ic(p):null;if(!p)throw Error(a(446));switch(n){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(i=Rs(s.href),s=un(p).hoistableStyles,u=s.get(i),u||(u={type:"style",instance:null,count:0,state:null},s.set(i,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){n=Rs(s.href);var b=un(p).hoistableStyles,w=b.get(n);if(w||(p=p.ownerDocument||p,w={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},b.set(n,w),(b=p.querySelector(Bl(n)))&&!b._p&&(w.instance=b,w.state.loading=5),zr.has(n)||(s={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy},zr.set(n,s),b||PE(p,n,s,w.state))),i&&u===null)throw Error(a(528,""));return w}if(i&&u!==null)throw Error(a(529,""));return null;case"script":return i=s.async,s=s.src,typeof s=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(i=As(s),s=un(p).hoistableScripts,u=s.get(i),u||(u={type:"script",instance:null,count:0,state:null},s.set(i,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,n))}}function Rs(n){return'href="'+Xn(n)+'"'}function Bl(n){return'link[rel="stylesheet"]['+n+"]"}function Ab(n){return x({},n,{"data-precedence":n.precedence,precedence:null})}function PE(n,i,s,u){n.querySelector('link[rel="preload"][as="style"]['+i+"]")?u.loading=1:(i=n.createElement("link"),u.preload=i,i.addEventListener("load",function(){return u.loading|=1}),i.addEventListener("error",function(){return u.loading|=2}),Ln(i,"link",s),Ht(i),n.head.appendChild(i))}function As(n){return'[src="'+Xn(n)+'"]'}function Ul(n){return"script[async]"+n}function Ob(n,i,s){if(i.count++,i.instance===null)switch(i.type){case"style":var u=n.querySelector('style[data-href~="'+Xn(s.href)+'"]');if(u)return i.instance=u,Ht(u),u;var p=x({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return u=(n.ownerDocument||n).createElement("style"),Ht(u),Ln(u,"style",p),Bc(u,s.precedence,n),i.instance=u;case"stylesheet":p=Rs(s.href);var b=n.querySelector(Bl(p));if(b)return i.state.loading|=4,i.instance=b,Ht(b),b;u=Ab(s),(p=zr.get(p))&&Yf(u,p),b=(n.ownerDocument||n).createElement("link"),Ht(b);var w=b;return w._p=new Promise(function(C,I){w.onload=C,w.onerror=I}),Ln(b,"link",u),i.state.loading|=4,Bc(b,s.precedence,n),i.instance=b;case"script":return b=As(s.src),(p=n.querySelector(Ul(b)))?(i.instance=p,Ht(p),p):(u=s,(p=zr.get(b))&&(u=x({},s),Qf(u,p)),n=n.ownerDocument||n,p=n.createElement("script"),Ht(p),Ln(p,"link",u),n.head.appendChild(p),i.instance=p);case"void":return null;default:throw Error(a(443,i.type))}else i.type==="stylesheet"&&(i.state.loading&4)===0&&(u=i.instance,i.state.loading|=4,Bc(u,s.precedence,n));return i.instance}function Bc(n,i,s){for(var u=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=u.length?u[u.length-1]:null,b=p,w=0;w<u.length;w++){var C=u[w];if(C.dataset.precedence===i)b=C;else if(b!==p)break}b?b.parentNode.insertBefore(n,b.nextSibling):(i=s.nodeType===9?s.head:s,i.insertBefore(n,i.firstChild))}function Yf(n,i){n.crossOrigin==null&&(n.crossOrigin=i.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=i.referrerPolicy),n.title==null&&(n.title=i.title)}function Qf(n,i){n.crossOrigin==null&&(n.crossOrigin=i.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=i.referrerPolicy),n.integrity==null&&(n.integrity=i.integrity)}var Uc=null;function Mb(n,i,s){if(Uc===null){var u=new Map,p=Uc=new Map;p.set(s,u)}else p=Uc,u=p.get(s),u||(u=new Map,p.set(s,u));if(u.has(n))return u;for(u.set(n,null),s=s.getElementsByTagName(n),p=0;p<s.length;p++){var b=s[p];if(!(b[lt]||b[Ee]||n==="link"&&b.getAttribute("rel")==="stylesheet")&&b.namespaceURI!=="http://www.w3.org/2000/svg"){var w=b.getAttribute(i)||"";w=n+w;var C=u.get(w);C?C.push(b):u.set(w,[b])}}return u}function jb(n,i,s){n=n.ownerDocument||n,n.head.insertBefore(s,i==="title"?n.querySelector("head > title"):null)}function HE(n,i,s){if(s===1||i.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof i.precedence!="string"||typeof i.href!="string"||i.href==="")break;return!0;case"link":if(typeof i.rel!="string"||typeof i.href!="string"||i.href===""||i.onLoad||i.onError)break;switch(i.rel){case"stylesheet":return n=i.disabled,typeof i.precedence=="string"&&n==null;default:return!0}case"script":if(i.async&&typeof i.async!="function"&&typeof i.async!="symbol"&&!i.onLoad&&!i.onError&&i.src&&typeof i.src=="string")return!0}return!1}function Db(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function qE(n,i,s,u){if(s.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var p=Rs(u.href),b=i.querySelector(Bl(p));if(b){i=b._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(n.count++,n=Fc.bind(n),i.then(n,n)),s.state.loading|=4,s.instance=b,Ht(b);return}b=i.ownerDocument||i,u=Ab(u),(p=zr.get(p))&&Yf(u,p),b=b.createElement("link"),Ht(b);var w=b;w._p=new Promise(function(C,I){w.onload=C,w.onerror=I}),Ln(b,"link",u),s.instance=b}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(s,i),(i=s.state.preload)&&(s.state.loading&3)===0&&(n.count++,s=Fc.bind(n),i.addEventListener("load",s),i.addEventListener("error",s))}}var Xf=0;function $E(n,i){return n.stylesheets&&n.count===0&&Hc(n,n.stylesheets),0<n.count||0<n.imgCount?function(s){var u=setTimeout(function(){if(n.stylesheets&&Hc(n,n.stylesheets),n.unsuspend){var b=n.unsuspend;n.unsuspend=null,b()}},6e4+i);0<n.imgBytes&&Xf===0&&(Xf=62500*EE());var p=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&Hc(n,n.stylesheets),n.unsuspend)){var b=n.unsuspend;n.unsuspend=null,b()}},(n.imgBytes>Xf?50:800)+i);return n.unsuspend=s,function(){n.unsuspend=null,clearTimeout(u),clearTimeout(p)}}:null}function Fc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Hc(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var Pc=null;function Hc(n,i){n.stylesheets=null,n.unsuspend!==null&&(n.count++,Pc=new Map,i.forEach(GE,n),Pc=null,Fc.call(n))}function GE(n,i){if(!(i.state.loading&4)){var s=Pc.get(n);if(s)var u=s.get(null);else{s=new Map,Pc.set(n,s);for(var p=n.querySelectorAll("link[data-precedence],style[data-precedence]"),b=0;b<p.length;b++){var w=p[b];(w.nodeName==="LINK"||w.getAttribute("media")!=="not all")&&(s.set(w.dataset.precedence,w),u=w)}u&&s.set(null,u)}p=i.instance,w=p.getAttribute("data-precedence"),b=s.get(w)||u,b===u&&s.set(null,p),s.set(w,p),this.count++,u=Fc.bind(this),p.addEventListener("load",u),p.addEventListener("error",u),b?b.parentNode.insertBefore(p,b.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(p,n.firstChild)),i.state.loading|=4}}var Fl={$$typeof:T,Provider:null,Consumer:null,_currentValue:V,_currentValue2:V,_threadCount:0};function KE(n,i,s,u,p,b,w,C,I){this.tag=1,this.containerInfo=n,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Lt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Lt(0),this.hiddenUpdates=Lt(null),this.identifierPrefix=u,this.onUncaughtError=p,this.onCaughtError=b,this.onRecoverableError=w,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=I,this.incompleteTransitions=new Map}function Lb(n,i,s,u,p,b,w,C,I,Z,oe,he){return n=new KE(n,i,s,w,I,Z,oe,he,C),i=1,b===!0&&(i|=24),b=or(3,null,null,i),n.current=b,b.stateNode=n,i=Cd(),i.refCount++,n.pooledCache=i,i.refCount++,b.memoizedState={element:u,isDehydrated:s,cache:i},Od(b),n}function Ib(n){return n?(n=os,n):os}function Bb(n,i,s,u,p,b){p=Ib(p),u.context===null?u.context=p:u.pendingContext=p,u=Gi(i),u.payload={element:s},b=b===void 0?null:b,b!==null&&(u.callback=b),s=Ki(n,u,i),s!==null&&(nr(s,n,i),xl(s,n,i))}function Ub(n,i){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var s=n.retryLane;n.retryLane=s!==0&&s<i?s:i}}function Zf(n,i){Ub(n,i),(n=n.alternate)&&Ub(n,i)}function Fb(n){if(n.tag===13||n.tag===31){var i=Ca(n,67108864);i!==null&&nr(i,n,67108864),Zf(n,67108864)}}function Pb(n){if(n.tag===13||n.tag===31){var i=hr();i=H(i);var s=Ca(n,i);s!==null&&nr(s,n,i),Zf(n,i)}}var qc=!0;function VE(n,i,s,u){var p=M.T;M.T=null;var b=Y.p;try{Y.p=2,Wf(n,i,s,u)}finally{Y.p=b,M.T=p}}function YE(n,i,s,u){var p=M.T;M.T=null;var b=Y.p;try{Y.p=8,Wf(n,i,s,u)}finally{Y.p=b,M.T=p}}function Wf(n,i,s,u){if(qc){var p=Jf(u);if(p===null)Bf(n,i,u,$c,s),qb(n,u);else if(XE(p,n,i,s,u))u.stopPropagation();else if(qb(n,u),i&4&&-1<QE.indexOf(n)){for(;p!==null;){var b=Jt(p);if(b!==null)switch(b.tag){case 3:if(b=b.stateNode,b.current.memoizedState.isDehydrated){var w=Tn(b.pendingLanes);if(w!==0){var C=b;for(C.pendingLanes|=2,C.entangledLanes|=2;w;){var I=1<<31-Rt(w);C.entanglements[1]|=I,w&=~I}Wr(b),(jt&6)===0&&(Sc=Wt()+500,jl(0))}}break;case 31:case 13:C=Ca(b,2),C!==null&&nr(C,b,2),Cc(),Zf(b,2)}if(b=Jf(u),b===null&&Bf(n,i,u,$c,s),b===p)break;p=b}p!==null&&u.stopPropagation()}else Bf(n,i,u,null,s)}}function Jf(n){return n=nt(n),eh(n)}var $c=null;function eh(n){if($c=null,n=Nt(n),n!==null){var i=o(n);if(i===null)n=null;else{var s=i.tag;if(s===13){if(n=c(i),n!==null)return n;n=null}else if(s===31){if(n=f(i),n!==null)return n;n=null}else if(s===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;n=null}else i!==n&&(n=null)}}return $c=n,null}function Hb(n){switch(n){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Qn()){case ae:return 2;case _e:return 8;case $e:case We:return 32;case rt:return 268435456;default:return 32}default:return 32}}var th=!1,ra=null,ia=null,aa=null,Pl=new Map,Hl=new Map,sa=[],QE="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function qb(n,i){switch(n){case"focusin":case"focusout":ra=null;break;case"dragenter":case"dragleave":ia=null;break;case"mouseover":case"mouseout":aa=null;break;case"pointerover":case"pointerout":Pl.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":Hl.delete(i.pointerId)}}function ql(n,i,s,u,p,b){return n===null||n.nativeEvent!==b?(n={blockedOn:i,domEventName:s,eventSystemFlags:u,nativeEvent:b,targetContainers:[p]},i!==null&&(i=Jt(i),i!==null&&Fb(i)),n):(n.eventSystemFlags|=u,i=n.targetContainers,p!==null&&i.indexOf(p)===-1&&i.push(p),n)}function XE(n,i,s,u,p){switch(i){case"focusin":return ra=ql(ra,n,i,s,u,p),!0;case"dragenter":return ia=ql(ia,n,i,s,u,p),!0;case"mouseover":return aa=ql(aa,n,i,s,u,p),!0;case"pointerover":var b=p.pointerId;return Pl.set(b,ql(Pl.get(b)||null,n,i,s,u,p)),!0;case"gotpointercapture":return b=p.pointerId,Hl.set(b,ql(Hl.get(b)||null,n,i,s,u,p)),!0}return!1}function $b(n){var i=Nt(n.target);if(i!==null){var s=o(i);if(s!==null){if(i=s.tag,i===13){if(i=c(s),i!==null){n.blockedOn=i,ve(n.priority,function(){Pb(s)});return}}else if(i===31){if(i=f(s),i!==null){n.blockedOn=i,ve(n.priority,function(){Pb(s)});return}}else if(i===3&&s.stateNode.current.memoizedState.isDehydrated){n.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}n.blockedOn=null}function Gc(n){if(n.blockedOn!==null)return!1;for(var i=n.targetContainers;0<i.length;){var s=Jf(n.nativeEvent);if(s===null){s=n.nativeEvent;var u=new s.constructor(s.type,s);Fe=u,s.target.dispatchEvent(u),Fe=null}else return i=Jt(s),i!==null&&Fb(i),n.blockedOn=s,!1;i.shift()}return!0}function Gb(n,i,s){Gc(n)&&s.delete(i)}function ZE(){th=!1,ra!==null&&Gc(ra)&&(ra=null),ia!==null&&Gc(ia)&&(ia=null),aa!==null&&Gc(aa)&&(aa=null),Pl.forEach(Gb),Hl.forEach(Gb)}function Kc(n,i){n.blockedOn===i&&(n.blockedOn=null,th||(th=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,ZE)))}var Vc=null;function Kb(n){Vc!==n&&(Vc=n,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Vc===n&&(Vc=null);for(var i=0;i<n.length;i+=3){var s=n[i],u=n[i+1],p=n[i+2];if(typeof u!="function"){if(eh(u||s)===null)continue;break}var b=Jt(s);b!==null&&(n.splice(i,3),i-=3,Wd(b,{pending:!0,data:p,method:s.method,action:u},u,p))}}))}function Os(n){function i(I){return Kc(I,n)}ra!==null&&Kc(ra,n),ia!==null&&Kc(ia,n),aa!==null&&Kc(aa,n),Pl.forEach(i),Hl.forEach(i);for(var s=0;s<sa.length;s++){var u=sa[s];u.blockedOn===n&&(u.blockedOn=null)}for(;0<sa.length&&(s=sa[0],s.blockedOn===null);)$b(s),s.blockedOn===null&&sa.shift();if(s=(n.ownerDocument||n).$$reactFormReplay,s!=null)for(u=0;u<s.length;u+=3){var p=s[u],b=s[u+1],w=p[Ce]||null;if(typeof b=="function")w||Kb(s);else if(w){var C=null;if(b&&b.hasAttribute("formAction")){if(p=b,w=b[Ce]||null)C=w.formAction;else if(eh(p)!==null)continue}else C=w.action;typeof C=="function"?s[u+1]=C:(s.splice(u,3),u-=3),Kb(s)}}}function Vb(){function n(b){b.canIntercept&&b.info==="react-transition"&&b.intercept({handler:function(){return new Promise(function(w){return p=w})},focusReset:"manual",scroll:"manual"})}function i(){p!==null&&(p(),p=null),u||setTimeout(s,20)}function s(){if(!u&&!navigation.transition){var b=navigation.currentEntry;b&&b.url!=null&&navigation.navigate(b.url,{state:b.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var u=!1,p=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",i),navigation.addEventListener("navigateerror",i),setTimeout(s,100),function(){u=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",i),navigation.removeEventListener("navigateerror",i),p!==null&&(p(),p=null)}}}function nh(n){this._internalRoot=n}Yc.prototype.render=nh.prototype.render=function(n){var i=this._internalRoot;if(i===null)throw Error(a(409));var s=i.current,u=hr();Bb(s,u,n,i,null,null)},Yc.prototype.unmount=nh.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var i=n.containerInfo;Bb(n.current,2,null,n,null,null),Cc(),i[Re]=null}};function Yc(n){this._internalRoot=n}Yc.prototype.unstable_scheduleHydration=function(n){if(n){var i=me();n={blockedOn:null,target:n,priority:i};for(var s=0;s<sa.length&&i!==0&&i<sa[s].priority;s++);sa.splice(s,0,n),s===0&&$b(n)}};var Yb=t.version;if(Yb!=="19.2.4")throw Error(a(527,Yb,"19.2.4"));Y.findDOMNode=function(n){var i=n._reactInternals;if(i===void 0)throw typeof n.render=="function"?Error(a(188)):(n=Object.keys(n).join(","),Error(a(268,n)));return n=m(i),n=n!==null?g(n):null,n=n===null?null:n.stateNode,n};var WE={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:M,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Qc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Qc.isDisabled&&Qc.supportsFiber)try{cn=Qc.inject(WE),rn=Qc}catch{}}return Gl.createRoot=function(n,i){if(!l(n))throw Error(a(299));var s=!1,u="",p=tg,b=ng,w=rg;return i!=null&&(i.unstable_strictMode===!0&&(s=!0),i.identifierPrefix!==void 0&&(u=i.identifierPrefix),i.onUncaughtError!==void 0&&(p=i.onUncaughtError),i.onCaughtError!==void 0&&(b=i.onCaughtError),i.onRecoverableError!==void 0&&(w=i.onRecoverableError)),i=Lb(n,1,!1,null,null,s,u,null,p,b,w,Vb),n[Re]=i.current,If(n),new nh(i)},Gl.hydrateRoot=function(n,i,s){if(!l(n))throw Error(a(299));var u=!1,p="",b=tg,w=ng,C=rg,I=null;return s!=null&&(s.unstable_strictMode===!0&&(u=!0),s.identifierPrefix!==void 0&&(p=s.identifierPrefix),s.onUncaughtError!==void 0&&(b=s.onUncaughtError),s.onCaughtError!==void 0&&(w=s.onCaughtError),s.onRecoverableError!==void 0&&(C=s.onRecoverableError),s.formState!==void 0&&(I=s.formState)),i=Lb(n,1,!0,i,s??null,u,p,I,b,w,C,Vb),i.context=Ib(null),s=i.current,u=hr(),u=H(u),p=Gi(u),p.callback=null,Ki(s,p,u),s=u,i.current.lanes=s,At(i,s),Wr(i),n[Re]=i.current,If(n),new Yc(i)},Gl.version="19.2.4",Gl}var ix;function uN(){if(ix)return ah.exports;ix=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),ah.exports=cN(),ah.exports}var dN=uN();/**
50
+ * react-router v7.13.1
51
+ *
52
+ * Copyright (c) Remix Software Inc.
53
+ *
54
+ * This source code is licensed under the MIT license found in the
55
+ * LICENSE.md file in the root directory of this source tree.
56
+ *
57
+ * @license MIT
58
+ */var Cv=e=>{throw TypeError(e)},fN=(e,t,r)=>t.has(e)||Cv("Cannot "+r),ch=(e,t,r)=>(fN(e,t,"read from private field"),r?r.call(e):t.get(e)),hN=(e,t,r)=>t.has(e)?Cv("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),ax="popstate";function sx(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function mN(e={}){function t(a,l){let o=l.state?.masked,{pathname:c,search:f,hash:h}=o||a.location;return mo("",{pathname:c,search:f,hash:h},l.state&&l.state.usr||null,l.state&&l.state.key||"default",o?{pathname:a.location.pathname,search:a.location.search,hash:a.location.hash}:void 0)}function r(a,l){return typeof l=="string"?l:ti(l)}return gN(t,r,null,e)}function dt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function wn(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function pN(){return Math.random().toString(36).substring(2,10)}function lx(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function mo(e,t,r=null,a,l){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Mi(t):t,state:r,key:t&&t.key||a||pN(),unstable_mask:l}}function ti({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function Mi(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let a=e.indexOf("?");a>=0&&(t.search=e.substring(a),e=e.substring(0,a)),e&&(t.pathname=e)}return t}function gN(e,t,r,a={}){let{window:l=document.defaultView,v5Compat:o=!1}=a,c=l.history,f="POP",h=null,m=g();m==null&&(m=0,c.replaceState({...c.state,idx:m},""));function g(){return(c.state||{idx:null}).idx}function x(){f="POP";let S=g(),N=S==null?null:S-m;m=S,h&&h({action:f,location:E.location,delta:N})}function y(S,N){f="PUSH";let O=sx(S)?S:mo(E.location,S,N);m=g()+1;let T=lx(O,m),P=E.createHref(O.unstable_mask||O);try{c.pushState(T,"",P)}catch($){if($ instanceof DOMException&&$.name==="DataCloneError")throw $;l.location.assign(P)}o&&h&&h({action:f,location:E.location,delta:1})}function v(S,N){f="REPLACE";let O=sx(S)?S:mo(E.location,S,N);m=g();let T=lx(O,m),P=E.createHref(O.unstable_mask||O);c.replaceState(T,"",P),o&&h&&h({action:f,location:E.location,delta:0})}function k(S){return Tv(S)}let E={get action(){return f},get location(){return e(l,c)},listen(S){if(h)throw new Error("A history only accepts one active listener");return l.addEventListener(ax,x),h=S,()=>{l.removeEventListener(ax,x),h=null}},createHref(S){return t(l,S)},createURL:k,encodeLocation(S){let N=k(S);return{pathname:N.pathname,search:N.search,hash:N.hash}},push:y,replace:v,go(S){return c.go(S)}};return E}function Tv(e,t=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),dt(r,"No window.location.(origin|href) available to create URL");let a=typeof e=="string"?e:ti(e);return a=a.replace(/ $/,"%20"),!t&&a.startsWith("//")&&(a=r+a),new URL(a,r)}var no,ox=class{constructor(e){if(hN(this,no,new Map),e)for(let[t,r]of e)this.set(t,r)}get(e){if(ch(this,no).has(e))return ch(this,no).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw new Error("No value found for context")}set(e,t){ch(this,no).set(e,t)}};no=new WeakMap;var bN=new Set(["lazy","caseSensitive","path","id","index","children"]);function xN(e){return bN.has(e)}var yN=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function vN(e){return yN.has(e)}function kN(e){return e.index===!0}function po(e,t,r=[],a={},l=!1){return e.map((o,c)=>{let f=[...r,String(c)],h=typeof o.id=="string"?o.id:f.join("-");if(dt(o.index!==!0||!o.children,"Cannot specify children on an index route"),dt(l||!a[h],`Found a route id collision on id "${h}". Route id's must be globally unique within Data Router usages`),kN(o)){let m={...o,id:h};return a[h]=cx(m,t(m)),m}else{let m={...o,id:h,children:void 0};return a[h]=cx(m,t(m)),o.children&&(m.children=po(o.children,t,f,a,l)),m}})}function cx(e,t){return Object.assign(e,{...t,...typeof t.lazy=="object"&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function da(e,t,r="/"){return ro(e,t,r,!1)}function ro(e,t,r,a){let l=typeof t=="string"?Mi(t):t,o=Or(l.pathname||"/",r);if(o==null)return null;let c=Rv(e);_N(c);let f=null;for(let h=0;f==null&&h<c.length;++h){let m=jN(o);f=ON(c[h],m,a)}return f}function wN(e,t){let{route:r,pathname:a,params:l}=e;return{id:r.id,pathname:a,params:l,data:t[r.id],loaderData:t[r.id],handle:r.handle}}function Rv(e,t=[],r=[],a="",l=!1){let o=(c,f,h=l,m)=>{let g={relativePath:m===void 0?c.path||"":m,caseSensitive:c.caseSensitive===!0,childrenIndex:f,route:c};if(g.relativePath.startsWith("/")){if(!g.relativePath.startsWith(a)&&h)return;dt(g.relativePath.startsWith(a),`Absolute route path "${g.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),g.relativePath=g.relativePath.slice(a.length)}let x=Hr([a,g.relativePath]),y=r.concat(g);c.children&&c.children.length>0&&(dt(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${x}".`),Rv(c.children,t,y,x,h)),!(c.path==null&&!c.index)&&t.push({path:x,score:RN(x,c.index),routesMeta:y})};return e.forEach((c,f)=>{if(c.path===""||!c.path?.includes("?"))o(c,f);else for(let h of Av(c.path))o(c,f,!0,h)}),t}function Av(e){let t=e.split("/");if(t.length===0)return[];let[r,...a]=t,l=r.endsWith("?"),o=r.replace(/\?$/,"");if(a.length===0)return l?[o,""]:[o];let c=Av(a.join("/")),f=[];return f.push(...c.map(h=>h===""?o:[o,h].join("/"))),l&&f.push(...c),f.map(h=>e.startsWith("/")&&h===""?"/":h)}function _N(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:AN(t.routesMeta.map(a=>a.childrenIndex),r.routesMeta.map(a=>a.childrenIndex)))}var EN=/^:[\w-]+$/,NN=3,SN=2,zN=1,CN=10,TN=-2,ux=e=>e==="*";function RN(e,t){let r=e.split("/"),a=r.length;return r.some(ux)&&(a+=TN),t&&(a+=SN),r.filter(l=>!ux(l)).reduce((l,o)=>l+(EN.test(o)?NN:o===""?zN:CN),a)}function AN(e,t){return e.length===t.length&&e.slice(0,-1).every((a,l)=>a===t[l])?e[e.length-1]-t[t.length-1]:0}function ON(e,t,r=!1){let{routesMeta:a}=e,l={},o="/",c=[];for(let f=0;f<a.length;++f){let h=a[f],m=f===a.length-1,g=o==="/"?t:t.slice(o.length)||"/",x=Su({path:h.relativePath,caseSensitive:h.caseSensitive,end:m},g),y=h.route;if(!x&&m&&r&&!a[a.length-1].route.index&&(x=Su({path:h.relativePath,caseSensitive:h.caseSensitive,end:!1},g)),!x)return null;Object.assign(l,x.params),c.push({params:l,pathname:Hr([o,x.pathname]),pathnameBase:IN(Hr([o,x.pathnameBase])),route:y}),x.pathnameBase!=="/"&&(o=Hr([o,x.pathnameBase]))}return c}function Su(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,a]=MN(e.path,e.caseSensitive,e.end),l=t.match(r);if(!l)return null;let o=l[0],c=o.replace(/(.)\/+$/,"$1"),f=l.slice(1);return{params:a.reduce((m,{paramName:g,isOptional:x},y)=>{if(g==="*"){let k=f[y]||"";c=o.slice(0,o.length-k.length).replace(/(.)\/+$/,"$1")}const v=f[y];return x&&!v?m[g]=void 0:m[g]=(v||"").replace(/%2F/g,"/"),m},{}),pathname:o,pathnameBase:c,pattern:e}}function MN(e,t=!1,r=!0){wn(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let a=[],l="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,f,h,m,g)=>{if(a.push({paramName:f,isOptional:h!=null}),h){let x=g.charAt(m+c.length);return x&&x!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(a.push({paramName:"*"}),l+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?l+="\\/*$":e!==""&&e!=="/"&&(l+="(?:(?=\\/|$))"),[new RegExp(l,t?void 0:"i"),a]}function jN(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return wn(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Or(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,a=e.charAt(r);return a&&a!=="/"?null:e.slice(r)||"/"}function DN({basename:e,pathname:t}){return t==="/"?e:Hr([e,t])}var Ov=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Em=e=>Ov.test(e);function LN(e,t="/"){let{pathname:r,search:a="",hash:l=""}=typeof e=="string"?Mi(e):e,o;return r?(r=r.replace(/\/\/+/g,"/"),r.startsWith("/")?o=dx(r.substring(1),"/"):o=dx(r,t)):o=t,{pathname:o,search:BN(a),hash:UN(l)}}function dx(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(l=>{l===".."?r.length>1&&r.pop():l!=="."&&r.push(l)}),r.length>1?r.join("/"):"/"}function uh(e,t,r,a){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(a)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Mv(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function Nm(e){let t=Mv(e);return t.map((r,a)=>a===t.length-1?r.pathname:r.pathnameBase)}function Fu(e,t,r,a=!1){let l;typeof e=="string"?l=Mi(e):(l={...e},dt(!l.pathname||!l.pathname.includes("?"),uh("?","pathname","search",l)),dt(!l.pathname||!l.pathname.includes("#"),uh("#","pathname","hash",l)),dt(!l.search||!l.search.includes("#"),uh("#","search","hash",l)));let o=e===""||l.pathname==="",c=o?"/":l.pathname,f;if(c==null)f=r;else{let x=t.length-1;if(!a&&c.startsWith("..")){let y=c.split("/");for(;y[0]==="..";)y.shift(),x-=1;l.pathname=y.join("/")}f=x>=0?t[x]:"/"}let h=LN(l,f),m=c&&c!=="/"&&c.endsWith("/"),g=(o||c===".")&&r.endsWith("/");return!h.pathname.endsWith("/")&&(m||g)&&(h.pathname+="/"),h}var Hr=e=>e.join("/").replace(/\/\/+/g,"/"),IN=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),BN=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,UN=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,No=class{constructor(e,t,r,a=!1){this.status=e,this.statusText=t||"",this.internal=a,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function go(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function So(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var jv=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Dv(e,t){let r=e;if(typeof r!="string"||!Ov.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let a=r,l=!1;if(jv)try{let o=new URL(window.location.href),c=r.startsWith("//")?new URL(o.protocol+r):new URL(r),f=Or(c.pathname,t);c.origin===o.origin&&f!=null?r=f+c.search+c.hash:l=!0}catch{wn(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:a,isExternal:l,to:r}}var ma=Symbol("Uninstrumented");function FN(e,t){let r={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(l=>l({id:t.id,index:t.index,path:t.path,instrument(o){let c=Object.keys(r);for(let f of c)o[f]&&r[f].push(o[f])}}));let a={};if(typeof t.lazy=="function"&&r.lazy.length>0){let l=Fs(r.lazy,t.lazy,()=>{});l&&(a.lazy=l)}if(typeof t.lazy=="object"){let l=t.lazy;["middleware","loader","action"].forEach(o=>{let c=l[o],f=r[`lazy.${o}`];if(typeof c=="function"&&f.length>0){let h=Fs(f,c,()=>{});h&&(a.lazy=Object.assign(a.lazy||{},{[o]:h}))}})}return["loader","action"].forEach(l=>{let o=t[l];if(typeof o=="function"&&r[l].length>0){let c=o[ma]??o,f=Fs(r[l],c,(...h)=>fx(h[0]));f&&(l==="loader"&&c.hydrate===!0&&(f.hydrate=!0),f[ma]=c,a[l]=f)}}),t.middleware&&t.middleware.length>0&&r.middleware.length>0&&(a.middleware=t.middleware.map(l=>{let o=l[ma]??l,c=Fs(r.middleware,o,(...f)=>fx(f[0]));return c?(c[ma]=o,c):l})),a}function PN(e,t){let r={navigate:[],fetch:[]};if(t.forEach(a=>a({instrument(l){let o=Object.keys(l);for(let c of o)l[c]&&r[c].push(l[c])}})),r.navigate.length>0){let a=e.navigate[ma]??e.navigate,l=Fs(r.navigate,a,(...o)=>{let[c,f]=o;return{to:typeof c=="number"||typeof c=="string"?c:c?ti(c):".",...hx(e,f??{})}});l&&(l[ma]=a,e.navigate=l)}if(r.fetch.length>0){let a=e.fetch[ma]??e.fetch,l=Fs(r.fetch,a,(...o)=>{let[c,,f,h]=o;return{href:f??".",fetcherKey:c,...hx(e,h??{})}});l&&(l[ma]=a,e.fetch=l)}return e}function Fs(e,t,r){return e.length===0?null:async(...a)=>{let l=await Lv(e,r(...a),()=>t(...a),e.length-1);if(l.type==="error")throw l.value;return l.value}}async function Lv(e,t,r,a){let l=e[a],o;if(l){let c,f=async()=>(c?console.error("You cannot call instrumented handlers more than once"):c=Lv(e,t,r,a-1),o=await c,dt(o,"Expected a result"),o.type==="error"&&o.value instanceof Error?{status:"error",error:o.value}:{status:"success",error:void 0});try{await l(f,t)}catch(h){console.error("An instrumentation function threw an error:",h)}c||await f(),await c}else try{o={type:"success",value:await r()}}catch(c){o={type:"error",value:c}}return o||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function fx(e){let{request:t,context:r,params:a,unstable_pattern:l}=e;return{request:HN(t),params:{...a},unstable_pattern:l,context:qN(r)}}function hx(e,t){return{currentUrl:ti(e.state.location),..."formMethod"in t?{formMethod:t.formMethod}:{},..."formEncType"in t?{formEncType:t.formEncType}:{},..."formData"in t?{formData:t.formData}:{},..."body"in t?{body:t.body}:{}}}function HN(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function qN(e){if(GN(e)){let t={...e};return Object.freeze(t),t}else return{get:t=>e.get(t)}}var $N=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function GN(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join("\0")===$N}var Iv=["POST","PUT","PATCH","DELETE"],KN=new Set(Iv),VN=["GET",...Iv],YN=new Set(VN),Bv=new Set([301,302,303,307,308]),QN=new Set([307,308]),dh={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},XN={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Kl={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},ZN=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Uv="remix-router-transitions",Fv=Symbol("ResetLoaderData");function WN(e){const t=e.window?e.window:typeof window<"u"?window:void 0,r=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u";dt(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let a=e.hydrationRouteProperties||[],l=e.mapRouteProperties||ZN,o=l;if(e.unstable_instrumentations){let L=e.unstable_instrumentations;o=H=>({...l(H),...FN(L.map(W=>W.route).filter(Boolean),H)})}let c={},f=po(e.routes,o,void 0,c),h,m=e.basename||"/";m.startsWith("/")||(m=`/${m}`);let g=e.dataStrategy||rS,x={...e.future},y=null,v=new Set,k=null,E=null,S=null,N=e.hydrationData!=null,O=da(f,e.history.location,m),T=!1,P=null,$,j;if(O==null&&!e.patchRoutesOnNavigation){let L=Cr(404,{pathname:e.history.location.pathname}),{matches:H,route:W}=Xc(f);$=!0,j=!$,O=H,P={[W.id]:L}}else if(O&&!e.hydrationData&&Lt(O,f,e.history.location.pathname).active&&(O=null),O)if(O.some(L=>L.route.lazy))$=!1,j=!$;else if(!O.some(L=>Sm(L.route)))$=!0,j=!$;else{let L=e.hydrationData?e.hydrationData.loaderData:null,H=e.hydrationData?e.hydrationData.errors:null,W=O;if(H){let me=O.findIndex(ve=>H[ve.route.id]!==void 0);W=W.slice(0,me+1)}j=!1,$=W.every(me=>{let ve=Pv(me.route,L,H);return j=j||ve.renderFallback,!ve.shouldLoad})}else{$=!1,j=!$,O=[];let L=Lt(null,f,e.history.location.pathname);L.active&&L.matches&&(T=!0,O=L.matches)}let G,A={historyAction:e.history.action,location:e.history.location,matches:O,initialized:$,renderFallback:j,navigation:dh,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||P,fetchers:new Map,blockers:new Map},ie="POP",F=null,ee=!1,te,we=!1,se=new Map,Q=null,M=!1,Y=!1,V=new Set,fe=new Map,R=0,D=-1,B=new Map,z=new Set,ue=new Map,be=new Map,ye=new Set,le=new Map,xe,pe=null;function Ue(){if(y=e.history.listen(({action:L,location:H,delta:W})=>{if(xe){xe(),xe=void 0;return}wn(le.size===0||W!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let me=Vr({currentLocation:A.location,nextLocation:H,historyAction:L});if(me&&W!=null){let ve=new Promise(Oe=>{xe=Oe});e.history.go(W*-1),Lr(me,{state:"blocked",location:H,proceed(){Lr(me,{state:"proceeding",proceed:void 0,reset:void 0,location:H}),ve.then(()=>e.history.go(W))},reset(){let Oe=new Map(A.blockers);Oe.set(me,Kl),tt({blockers:Oe})}}),F?.resolve(),F=null;return}return _n(L,H)}),r){kS(t,se);let L=()=>wS(t,se);t.addEventListener("pagehide",L),Q=()=>t.removeEventListener("pagehide",L)}return A.initialized||_n("POP",A.location,{initialHydration:!0}),G}function Ae(){y&&y(),Q&&Q(),v.clear(),te&&te.abort(),A.fetchers.forEach((L,H)=>cn(H)),A.blockers.forEach((L,H)=>Kr(H))}function Tt(L){return v.add(L),()=>v.delete(L)}function tt(L,H={}){L.matches&&(L.matches=L.matches.map(ve=>{let Oe=c[ve.route.id],Ee=ve.route;return Ee.element!==Oe.element||Ee.errorElement!==Oe.errorElement||Ee.hydrateFallbackElement!==Oe.hydrateFallbackElement?{...ve,route:Oe}:ve})),A={...A,...L};let W=[],me=[];A.fetchers.forEach((ve,Oe)=>{ve.state==="idle"&&(ye.has(Oe)?W.push(Oe):me.push(Oe))}),ye.forEach(ve=>{!A.fetchers.has(ve)&&!fe.has(ve)&&W.push(ve)}),[...v].forEach(ve=>ve(A,{deletedFetchers:W,newErrors:L.errors??null,viewTransitionOpts:H.viewTransitionOpts,flushSync:H.flushSync===!0})),W.forEach(ve=>cn(ve)),me.forEach(ve=>A.fetchers.delete(ve))}function gt(L,H,{flushSync:W}={}){let me=A.actionData!=null&&A.navigation.formMethod!=null&&Pn(A.navigation.formMethod)&&A.navigation.state==="loading"&&L.state?._isRedirect!==!0,ve;H.actionData?Object.keys(H.actionData).length>0?ve=H.actionData:ve=null:me?ve=A.actionData:ve=null;let Oe=H.loaderData?_x(A.loaderData,H.loaderData,H.matches||[],H.errors):A.loaderData,Ee=A.blockers;Ee.size>0&&(Ee=new Map(Ee),Ee.forEach((qe,Ie)=>Ee.set(Ie,Kl)));let Ce=M?!1:Qe(L,H.matches||A.matches),Re=ee===!0||A.navigation.formMethod!=null&&Pn(A.navigation.formMethod)&&L.state?._isRedirect!==!0;h&&(f=h,h=void 0),M||ie==="POP"||(ie==="PUSH"?e.history.push(L,L.state):ie==="REPLACE"&&e.history.replace(L,L.state));let He;if(ie==="POP"){let qe=se.get(A.location.pathname);qe&&qe.has(L.pathname)?He={currentLocation:A.location,nextLocation:L}:se.has(L.pathname)&&(He={currentLocation:L,nextLocation:A.location})}else if(we){let qe=se.get(A.location.pathname);qe?qe.add(L.pathname):(qe=new Set([L.pathname]),se.set(A.location.pathname,qe)),He={currentLocation:A.location,nextLocation:L}}tt({...H,actionData:ve,loaderData:Oe,historyAction:ie,location:L,initialized:!0,renderFallback:!1,navigation:dh,revalidation:"idle",restoreScrollPosition:Ce,preventScrollReset:Re,blockers:Ee},{viewTransitionOpts:He,flushSync:W===!0}),ie="POP",ee=!1,we=!1,M=!1,Y=!1,F?.resolve(),F=null,pe?.resolve(),pe=null}async function _t(L,H){if(F?.resolve(),F=null,typeof L=="number"){F||(F=zx());let Bt=F.promise;return e.history.go(L),Bt}let W=Vh(A.location,A.matches,m,L,H?.fromRouteId,H?.relative),{path:me,submission:ve,error:Oe}=mx(!1,W,H),Ee;H?.unstable_mask&&(Ee={pathname:"",search:"",hash:"",...typeof H.unstable_mask=="string"?Mi(H.unstable_mask):{...A.location.unstable_mask,...H.unstable_mask}});let Ce=A.location,Re=mo(Ce,me,H&&H.state,void 0,Ee);Re={...Re,...e.history.encodeLocation(Re)};let He=H&&H.replace!=null?H.replace:void 0,qe="PUSH";He===!0?qe="REPLACE":He===!1||ve!=null&&Pn(ve.formMethod)&&ve.formAction===A.location.pathname+A.location.search&&(qe="REPLACE");let Ie=H&&"preventScrollReset"in H?H.preventScrollReset===!0:void 0,Et=(H&&H.flushSync)===!0,lt=Vr({currentLocation:Ce,nextLocation:Re,historyAction:qe});if(lt){Lr(lt,{state:"blocked",location:Re,proceed(){Lr(lt,{state:"proceeding",proceed:void 0,reset:void 0,location:Re}),_t(L,H)},reset(){let Bt=new Map(A.blockers);Bt.set(lt,Kl),tt({blockers:Bt})}});return}await _n(qe,Re,{submission:ve,pendingError:Oe,preventScrollReset:Ie,replace:H&&H.replace,enableViewTransition:H&&H.viewTransition,flushSync:Et,callSiteDefaultShouldRevalidate:H&&H.unstable_defaultShouldRevalidate})}function ot(){pe||(pe=zx()),$e(),tt({revalidation:"loading"});let L=pe.promise;return A.navigation.state==="submitting"?L:A.navigation.state==="idle"?(_n(A.historyAction,A.location,{startUninterruptedRevalidation:!0}),L):(_n(ie||A.historyAction,A.navigation.location,{overrideNavigation:A.navigation,enableViewTransition:we===!0}),L)}async function _n(L,H,W){te&&te.abort(),te=null,ie=L,M=(W&&W.startUninterruptedRevalidation)===!0,ze(A.location,A.matches),ee=(W&&W.preventScrollReset)===!0,we=(W&&W.enableViewTransition)===!0;let me=h||f,ve=W&&W.overrideNavigation,Oe=W?.initialHydration&&A.matches&&A.matches.length>0&&!T?A.matches:da(me,H,m),Ee=(W&&W.flushSync)===!0;if(Oe&&A.initialized&&!Y&&dS(A.location,H)&&!(W&&W.submission&&Pn(W.submission.formMethod))){gt(H,{matches:Oe},{flushSync:Ee});return}let Ce=Lt(Oe,me,H.pathname);if(Ce.active&&Ce.matches&&(Oe=Ce.matches),!Oe){let{error:Nt,notFoundMatches:Jt,route:ft}=Tn(H.pathname);gt(H,{matches:Jt,loaderData:{},errors:{[ft.id]:Nt}},{flushSync:Ee});return}te=new AbortController;let Re=Ls(e.history,H,te.signal,W&&W.submission),He=e.getContext?await e.getContext():new ox,qe;if(W&&W.pendingError)qe=[fa(Oe).route.id,{type:"error",error:W.pendingError}];else if(W&&W.submission&&Pn(W.submission.formMethod)){let Nt=await Yn(Re,H,W.submission,Oe,He,Ce.active,W&&W.initialHydration===!0,{replace:W.replace,flushSync:Ee});if(Nt.shortCircuited)return;if(Nt.pendingActionResult){let[Jt,ft]=Nt.pendingActionResult;if(pr(ft)&&go(ft.error)&&ft.error.status===404){te=null,gt(H,{matches:Nt.matches,loaderData:{},errors:{[Jt]:ft.error}});return}}Oe=Nt.matches||Oe,qe=Nt.pendingActionResult,ve=fh(H,W.submission),Ee=!1,Ce.active=!1,Re=Ls(e.history,Re.url,Re.signal)}let{shortCircuited:Ie,matches:Et,loaderData:lt,errors:Bt}=await br(Re,H,Oe,He,Ce.active,ve,W&&W.submission,W&&W.fetcherSubmission,W&&W.replace,W&&W.initialHydration===!0,Ee,qe,W&&W.callSiteDefaultShouldRevalidate);Ie||(te=null,gt(H,{matches:Et||Oe,...Ex(qe),loaderData:lt,errors:Bt}))}async function Yn(L,H,W,me,ve,Oe,Ee,Ce={}){$e();let Re=yS(H,W);if(tt({navigation:Re},{flushSync:Ce.flushSync===!0}),Oe){let Ie=await At(me,H.pathname,L.signal);if(Ie.type==="aborted")return{shortCircuited:!0};if(Ie.type==="error"){if(Ie.partialMatches.length===0){let{matches:lt,route:Bt}=Xc(f);return{matches:lt,pendingActionResult:[Bt.id,{type:"error",error:Ie.error}]}}let Et=fa(Ie.partialMatches).route.id;return{matches:Ie.partialMatches,pendingActionResult:[Et,{type:"error",error:Ie.error}]}}else if(Ie.matches)me=Ie.matches;else{let{notFoundMatches:Et,error:lt,route:Bt}=Tn(H.pathname);return{matches:Et,pendingActionResult:[Bt.id,{type:"error",error:lt}]}}}let He,qe=mu(me,H);if(!qe.route.action&&!qe.route.lazy)He={type:"error",error:Cr(405,{method:L.method,pathname:H.pathname,routeId:qe.route.id})};else{let Ie=Ps(o,c,L,me,qe,Ee?[]:a,ve),Et=await ae(L,Ie,ve,null);if(He=Et[qe.route.id],!He){for(let lt of me)if(Et[lt.route.id]){He=Et[lt.route.id];break}}if(L.signal.aborted)return{shortCircuited:!0}}if(qa(He)){let Ie;return Ce&&Ce.replace!=null?Ie=Ce.replace:Ie=vx(He.response.headers.get("Location"),new URL(L.url),m,e.history)===A.location.pathname+A.location.search,await Qn(L,He,!0,{submission:W,replace:Ie}),{shortCircuited:!0}}if(pr(He)){let Ie=fa(me,qe.route.id);return(Ce&&Ce.replace)!==!0&&(ie="PUSH"),{matches:me,pendingActionResult:[Ie.route.id,He,qe.route.id]}}return{matches:me,pendingActionResult:[qe.route.id,He]}}async function br(L,H,W,me,ve,Oe,Ee,Ce,Re,He,qe,Ie,Et){let lt=Oe||fh(H,Ee),Bt=Ee||Ce||Sx(lt),Nt=!M&&!He;if(ve){if(Nt){let It=xr(Ie);tt({navigation:lt,...It!==void 0?{actionData:It}:{}},{flushSync:qe})}let Xe=await At(W,H.pathname,L.signal);if(Xe.type==="aborted")return{shortCircuited:!0};if(Xe.type==="error"){if(Xe.partialMatches.length===0){let{matches:dn,route:zt}=Xc(f);return{matches:dn,loaderData:{},errors:{[zt.id]:Xe.error}}}let It=fa(Xe.partialMatches).route.id;return{matches:Xe.partialMatches,loaderData:{},errors:{[It]:Xe.error}}}else if(Xe.matches)W=Xe.matches;else{let{error:It,notFoundMatches:dn,route:zt}=Tn(H.pathname);return{matches:dn,loaderData:{},errors:{[zt.id]:It}}}}let Jt=h||f,{dsMatches:ft,revalidatingFetchers:un}=px(L,me,o,c,e.history,A,W,Bt,H,He?[]:a,He===!0,Y,V,ye,ue,z,Jt,m,e.patchRoutesOnNavigation!=null,Ie,Et);if(D=++R,!e.dataStrategy&&!ft.some(Xe=>Xe.shouldLoad)&&!ft.some(Xe=>Xe.route.middleware&&Xe.route.middleware.length>0)&&un.length===0){let Xe=sr();return gt(H,{matches:W,loaderData:{},errors:Ie&&pr(Ie[1])?{[Ie[0]]:Ie[1].error}:null,...Ex(Ie),...Xe?{fetchers:new Map(A.fetchers)}:{}},{flushSync:qe}),{shortCircuited:!0}}if(Nt){let Xe={};if(!ve){Xe.navigation=lt;let It=xr(Ie);It!==void 0&&(Xe.actionData=It)}un.length>0&&(Xe.fetchers=oi(un)),tt(Xe,{flushSync:qe})}un.forEach(Xe=>{Qt(Xe.key),Xe.controller&&fe.set(Xe.key,Xe.controller)});let Ht=()=>un.forEach(Xe=>Qt(Xe.key));te&&te.signal.addEventListener("abort",Ht);let{loaderResults:Yr,fetcherResults:Un}=await _e(ft,un,L,me);if(L.signal.aborted)return{shortCircuited:!0};te&&te.signal.removeEventListener("abort",Ht),un.forEach(Xe=>fe.delete(Xe.key));let mn=Zc(Yr);if(mn)return await Qn(L,mn.result,!0,{replace:Re}),{shortCircuited:!0};if(mn=Zc(Un),mn)return z.add(mn.key),await Qn(L,mn.result,!0,{replace:Re}),{shortCircuited:!0};let{loaderData:ge,errors:Be}=wx(A,W,Yr,Ie,un,Un);He&&A.errors&&(Be={...A.errors,...Be});let Je=sr(),St=Cn(D),Xt=Je||St||un.length>0;return{matches:W,loaderData:ge,errors:Be,...Xt?{fetchers:new Map(A.fetchers)}:{}}}function xr(L){if(L&&!pr(L[1]))return{[L[0]]:L[1].data};if(A.actionData)return Object.keys(A.actionData).length===0?null:A.actionData}function oi(L){return L.forEach(H=>{let W=A.fetchers.get(H.key),me=Vl(void 0,W?W.data:void 0);A.fetchers.set(H.key,me)}),new Map(A.fetchers)}async function wa(L,H,W,me){Qt(L);let ve=(me&&me.flushSync)===!0,Oe=h||f,Ee=Vh(A.location,A.matches,m,W,H,me?.relative),Ce=da(Oe,Ee,m),Re=Lt(Ce,Oe,Ee);if(Re.active&&Re.matches&&(Ce=Re.matches),!Ce){rt(L,H,Cr(404,{pathname:Ee}),{flushSync:ve});return}let{path:He,submission:qe,error:Ie}=mx(!0,Ee,me);if(Ie){rt(L,H,Ie,{flushSync:ve});return}let Et=e.getContext?await e.getContext():new ox,lt=(me&&me.preventScrollReset)===!0;if(qe&&Pn(qe.formMethod)){await Li(L,H,He,Ce,Et,Re.active,ve,lt,qe,me&&me.unstable_defaultShouldRevalidate);return}ue.set(L,{routeId:H,path:He}),await Wt(L,H,He,Ce,Et,Re.active,ve,lt,qe)}async function Li(L,H,W,me,ve,Oe,Ee,Ce,Re,He){$e(),ue.delete(L);let qe=A.fetchers.get(L);We(L,vS(Re,qe),{flushSync:Ee});let Ie=new AbortController,Et=Ls(e.history,W,Ie.signal,Re);if(Oe){let bt=await At(me,new URL(Et.url).pathname,Et.signal,L);if(bt.type==="aborted")return;if(bt.type==="error"){rt(L,H,bt.error,{flushSync:Ee});return}else if(bt.matches)me=bt.matches;else{rt(L,H,Cr(404,{pathname:W}),{flushSync:Ee});return}}let lt=mu(me,W);if(!lt.route.action&&!lt.route.lazy){let bt=Cr(405,{method:Re.formMethod,pathname:W,routeId:H});rt(L,H,bt,{flushSync:Ee});return}fe.set(L,Ie);let Bt=R,Nt=Ps(o,c,Et,me,lt,a,ve),Jt=await ae(Et,Nt,ve,L),ft=Jt[lt.route.id];if(!ft){for(let bt of Nt)if(Jt[bt.route.id]){ft=Jt[bt.route.id];break}}if(Et.signal.aborted){fe.get(L)===Ie&&fe.delete(L);return}if(ye.has(L)){if(qa(ft)||pr(ft)){We(L,Ai(void 0));return}}else{if(qa(ft))if(fe.delete(L),D>Bt){We(L,Ai(void 0));return}else return z.add(L),We(L,Vl(Re)),Qn(Et,ft,!1,{fetcherSubmission:Re,preventScrollReset:Ce});if(pr(ft)){rt(L,H,ft.error);return}}let un=A.navigation.location||A.location,Ht=Ls(e.history,un,Ie.signal),Yr=h||f,Un=A.navigation.state!=="idle"?da(Yr,A.navigation.location,m):A.matches;dt(Un,"Didn't find any matches after fetcher action");let mn=++R;B.set(L,mn);let ge=Vl(Re,ft.data);A.fetchers.set(L,ge);let{dsMatches:Be,revalidatingFetchers:Je}=px(Ht,ve,o,c,e.history,A,Un,Re,un,a,!1,Y,V,ye,ue,z,Yr,m,e.patchRoutesOnNavigation!=null,[lt.route.id,ft],He);Je.filter(bt=>bt.key!==L).forEach(bt=>{let ci=bt.key,ui=A.fetchers.get(ci),_a=Vl(void 0,ui?ui.data:void 0);A.fetchers.set(ci,_a),Qt(ci),bt.controller&&fe.set(ci,bt.controller)}),tt({fetchers:new Map(A.fetchers)});let St=()=>Je.forEach(bt=>Qt(bt.key));Ie.signal.addEventListener("abort",St);let{loaderResults:Xt,fetcherResults:Xe}=await _e(Be,Je,Ht,ve);if(Ie.signal.aborted)return;if(Ie.signal.removeEventListener("abort",St),B.delete(L),fe.delete(L),Je.forEach(bt=>fe.delete(bt.key)),A.fetchers.has(L)){let bt=Ai(ft.data);A.fetchers.set(L,bt)}let It=Zc(Xt);if(It)return Qn(Ht,It.result,!1,{preventScrollReset:Ce});if(It=Zc(Xe),It)return z.add(It.key),Qn(Ht,It.result,!1,{preventScrollReset:Ce});let{loaderData:dn,errors:zt}=wx(A,Un,Xt,void 0,Je,Xe);Cn(mn),A.navigation.state==="loading"&&mn>D?(dt(ie,"Expected pending action"),te&&te.abort(),gt(A.navigation.location,{matches:Un,loaderData:dn,errors:zt,fetchers:new Map(A.fetchers)})):(tt({errors:zt,loaderData:_x(A.loaderData,dn,Un,zt),fetchers:new Map(A.fetchers)}),Y=!1)}async function Wt(L,H,W,me,ve,Oe,Ee,Ce,Re){let He=A.fetchers.get(L);We(L,Vl(Re,He?He.data:void 0),{flushSync:Ee});let qe=new AbortController,Ie=Ls(e.history,W,qe.signal);if(Oe){let ft=await At(me,new URL(Ie.url).pathname,Ie.signal,L);if(ft.type==="aborted")return;if(ft.type==="error"){rt(L,H,ft.error,{flushSync:Ee});return}else if(ft.matches)me=ft.matches;else{rt(L,H,Cr(404,{pathname:W}),{flushSync:Ee});return}}let Et=mu(me,W);fe.set(L,qe);let lt=R,Bt=Ps(o,c,Ie,me,Et,a,ve),Jt=(await ae(Ie,Bt,ve,L))[Et.route.id];if(fe.get(L)===qe&&fe.delete(L),!Ie.signal.aborted){if(ye.has(L)){We(L,Ai(void 0));return}if(qa(Jt))if(D>lt){We(L,Ai(void 0));return}else{z.add(L),await Qn(Ie,Jt,!1,{preventScrollReset:Ce});return}if(pr(Jt)){rt(L,H,Jt.error);return}We(L,Ai(Jt.data))}}async function Qn(L,H,W,{submission:me,fetcherSubmission:ve,preventScrollReset:Oe,replace:Ee}={}){W||(F?.resolve(),F=null),H.response.headers.has("X-Remix-Revalidate")&&(Y=!0);let Ce=H.response.headers.get("Location");dt(Ce,"Expected a Location header on the redirect Response"),Ce=vx(Ce,new URL(L.url),m,e.history);let Re=mo(A.location,Ce,{_isRedirect:!0});if(r){let Bt=!1;if(H.response.headers.has("X-Remix-Reload-Document"))Bt=!0;else if(Em(Ce)){const Nt=Tv(Ce,!0);Bt=Nt.origin!==t.location.origin||Or(Nt.pathname,m)==null}if(Bt){Ee?t.location.replace(Ce):t.location.assign(Ce);return}}te=null;let He=Ee===!0||H.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:qe,formAction:Ie,formEncType:Et}=A.navigation;!me&&!ve&&qe&&Ie&&Et&&(me=Sx(A.navigation));let lt=me||ve;if(QN.has(H.response.status)&&lt&&Pn(lt.formMethod))await _n(He,Re,{submission:{...lt,formAction:Ce},preventScrollReset:Oe||ee,enableViewTransition:W?we:void 0});else{let Bt=fh(Re,me);await _n(He,Re,{overrideNavigation:Bt,fetcherSubmission:ve,preventScrollReset:Oe||ee,enableViewTransition:W?we:void 0})}}async function ae(L,H,W,me){let ve,Oe={};try{ve=await aS(g,L,H,me,W,!1)}catch(Ee){return H.filter(Ce=>Ce.shouldLoad).forEach(Ce=>{Oe[Ce.route.id]={type:"error",error:Ee}}),Oe}if(L.signal.aborted)return Oe;if(!Pn(L.method))for(let Ee of H){if(ve[Ee.route.id]?.type==="error")break;!ve.hasOwnProperty(Ee.route.id)&&!A.loaderData.hasOwnProperty(Ee.route.id)&&(!A.errors||!A.errors.hasOwnProperty(Ee.route.id))&&Ee.shouldCallHandler()&&(ve[Ee.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${Ee.route.id}`)})}for(let[Ee,Ce]of Object.entries(ve))if(pS(Ce)){let Re=Ce.result;Oe[Ee]={type:"redirect",response:cS(Re,L,Ee,H,m)}}else Oe[Ee]=await oS(Ce);return Oe}async function _e(L,H,W,me){let ve=ae(W,L,me,null),Oe=Promise.all(H.map(async Re=>{if(Re.matches&&Re.match&&Re.request&&Re.controller){let qe=(await ae(Re.request,Re.matches,me,Re.key))[Re.match.route.id];return{[Re.key]:qe}}else return Promise.resolve({[Re.key]:{type:"error",error:Cr(404,{pathname:Re.path})}})})),Ee=await ve,Ce=(await Oe).reduce((Re,He)=>Object.assign(Re,He),{});return{loaderResults:Ee,fetcherResults:Ce}}function $e(){Y=!0,ue.forEach((L,H)=>{fe.has(H)&&V.add(H),Qt(H)})}function We(L,H,W={}){A.fetchers.set(L,H),tt({fetchers:new Map(A.fetchers)},{flushSync:(W&&W.flushSync)===!0})}function rt(L,H,W,me={}){let ve=fa(A.matches,H);cn(L),tt({errors:{[ve.route.id]:W},fetchers:new Map(A.fetchers)},{flushSync:(me&&me.flushSync)===!0})}function zn(L){return be.set(L,(be.get(L)||0)+1),ye.has(L)&&ye.delete(L),A.fetchers.get(L)||XN}function ar(L,H){Qt(L,H?.reason),We(L,Ai(null))}function cn(L){let H=A.fetchers.get(L);fe.has(L)&&!(H&&H.state==="loading"&&B.has(L))&&Qt(L),ue.delete(L),B.delete(L),z.delete(L),ye.delete(L),V.delete(L),A.fetchers.delete(L)}function rn(L){let H=(be.get(L)||0)-1;H<=0?(be.delete(L),ye.add(L)):be.set(L,H),tt({fetchers:new Map(A.fetchers)})}function Qt(L,H){let W=fe.get(L);W&&(W.abort(H),fe.delete(L))}function Rt(L){for(let H of L){let W=zn(H),me=Ai(W.data);A.fetchers.set(H,me)}}function sr(){let L=[],H=!1;for(let W of z){let me=A.fetchers.get(W);dt(me,`Expected fetcher: ${W}`),me.state==="loading"&&(z.delete(W),L.push(W),H=!0)}return Rt(L),H}function Cn(L){let H=[];for(let[W,me]of B)if(me<L){let ve=A.fetchers.get(W);dt(ve,`Expected fetcher: ${W}`),ve.state==="loading"&&(Qt(W),B.delete(W),H.push(W))}return Rt(H),H.length>0}function es(L,H){let W=A.blockers.get(L)||Kl;return le.get(L)!==H&&le.set(L,H),W}function Kr(L){A.blockers.delete(L),le.delete(L)}function Lr(L,H){let W=A.blockers.get(L)||Kl;dt(W.state==="unblocked"&&H.state==="blocked"||W.state==="blocked"&&H.state==="blocked"||W.state==="blocked"&&H.state==="proceeding"||W.state==="blocked"&&H.state==="unblocked"||W.state==="proceeding"&&H.state==="unblocked",`Invalid blocker state transition: ${W.state} -> ${H.state}`);let me=new Map(A.blockers);me.set(L,H),tt({blockers:me})}function Vr({currentLocation:L,nextLocation:H,historyAction:W}){if(le.size===0)return;le.size>1&&wn(!1,"A router only supports one blocker at a time");let me=Array.from(le.entries()),[ve,Oe]=me[me.length-1],Ee=A.blockers.get(ve);if(!(Ee&&Ee.state==="proceeding")&&Oe({currentLocation:L,nextLocation:H,historyAction:W}))return ve}function Tn(L){let H=Cr(404,{pathname:L}),W=h||f,{matches:me,route:ve}=Xc(W);return{notFoundMatches:me,route:ve,error:H}}function U(L,H,W){if(k=L,S=H,E=W||null,!N&&A.navigation===dh){N=!0;let me=Qe(A.location,A.matches);me!=null&&tt({restoreScrollPosition:me})}return()=>{k=null,S=null,E=null}}function ce(L,H){return E&&E(L,H.map(me=>wN(me,A.loaderData)))||L.key}function ze(L,H){if(k&&S){let W=ce(L,H);k[W]=S()}}function Qe(L,H){if(k){let W=ce(L,H),me=k[W];if(typeof me=="number")return me}return null}function Lt(L,H,W){if(e.patchRoutesOnNavigation)if(L){if(Object.keys(L[0].params).length>0)return{active:!0,matches:ro(H,W,m,!0)}}else return{active:!0,matches:ro(H,W,m,!0)||[]};return{active:!1,matches:null}}async function At(L,H,W,me){if(!e.patchRoutesOnNavigation)return{type:"success",matches:L};let ve=L;for(;;){let Oe=h==null,Ee=h||f,Ce=c;try{await e.patchRoutesOnNavigation({signal:W,path:H,matches:ve,fetcherKey:me,patch:(qe,Ie)=>{W.aborted||gx(qe,Ie,Ee,Ce,o,!1)}})}catch(qe){return{type:"error",error:qe,partialMatches:ve}}finally{Oe&&!W.aborted&&(f=[...f])}if(W.aborted)return{type:"aborted"};let Re=da(Ee,H,m),He=null;if(Re){if(Object.keys(Re[0].params).length===0)return{type:"success",matches:Re};if(He=ro(Ee,H,m,!0),!(He&&ve.length<He.length&&Me(ve,He.slice(0,ve.length))))return{type:"success",matches:Re}}if(He||(He=ro(Ee,H,m,!0)),!He||Me(ve,He))return{type:"success",matches:null};ve=He}}function Me(L,H){return L.length===H.length&&L.every((W,me)=>W.route.id===H[me].route.id)}function Te(L){c={},h=po(L,o,void 0,c)}function Ve(L,H,W=!1){let me=h==null;gx(L,H,h||f,c,o,W),me&&(f=[...f],tt({}))}return G={get basename(){return m},get future(){return x},get state(){return A},get routes(){return f},get window(){return t},initialize:Ue,subscribe:Tt,enableScrollRestoration:U,navigate:_t,fetch:wa,revalidate:ot,createHref:L=>e.history.createHref(L),encodeLocation:L=>e.history.encodeLocation(L),getFetcher:zn,resetFetcher:ar,deleteFetcher:rn,dispose:Ae,getBlocker:es,deleteBlocker:Kr,patchRoutes:Ve,_internalFetchControllers:fe,_internalSetRoutes:Te,_internalSetStateDoNotUseOrYouWillBreakYourApp(L){tt(L)}},e.unstable_instrumentations&&(G=PN(G,e.unstable_instrumentations.map(L=>L.router).filter(Boolean))),G}function JN(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Vh(e,t,r,a,l,o){let c,f;if(l){c=[];for(let m of t)if(c.push(m),m.route.id===l){f=m;break}}else c=t,f=t[t.length-1];let h=Fu(a||".",Nm(c),Or(e.pathname,r)||e.pathname,o==="path");if(a==null&&(h.search=e.search,h.hash=e.hash),(a==null||a===""||a===".")&&f){let m=Cm(h.search);if(f.route.index&&!m)h.search=h.search?h.search.replace(/^\?/,"?index&"):"?index";else if(!f.route.index&&m){let g=new URLSearchParams(h.search),x=g.getAll("index");g.delete("index"),x.filter(v=>v).forEach(v=>g.append("index",v));let y=g.toString();h.search=y?`?${y}`:""}}return r!=="/"&&(h.pathname=DN({basename:r,pathname:h.pathname})),ti(h)}function mx(e,t,r){if(!r||!JN(r))return{path:t};if(r.formMethod&&!xS(r.formMethod))return{path:t,error:Cr(405,{method:r.formMethod})};let a=()=>({path:t,error:Cr(400,{type:"invalid-body"})}),o=(r.formMethod||"get").toUpperCase(),c=Vv(t);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!Pn(o))return a();let x=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((y,[v,k])=>`${y}${v}=${k}
59
+ `,""):String(r.body);return{path:t,submission:{formMethod:o,formAction:c,formEncType:r.formEncType,formData:void 0,json:void 0,text:x}}}else if(r.formEncType==="application/json"){if(!Pn(o))return a();try{let x=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:t,submission:{formMethod:o,formAction:c,formEncType:r.formEncType,formData:void 0,json:x,text:void 0}}}catch{return a()}}}dt(typeof FormData=="function","FormData is not available in this environment");let f,h;if(r.formData)f=Qh(r.formData),h=r.formData;else if(r.body instanceof FormData)f=Qh(r.body),h=r.body;else if(r.body instanceof URLSearchParams)f=r.body,h=kx(f);else if(r.body==null)f=new URLSearchParams,h=new FormData;else try{f=new URLSearchParams(r.body),h=kx(f)}catch{return a()}let m={formMethod:o,formAction:c,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:h,json:void 0,text:void 0};if(Pn(m.formMethod))return{path:t,submission:m};let g=Mi(t);return e&&g.search&&Cm(g.search)&&f.append("index",""),g.search=`?${f}`,{path:ti(g),submission:m}}function px(e,t,r,a,l,o,c,f,h,m,g,x,y,v,k,E,S,N,O,T,P){let $=T?pr(T[1])?T[1].error:T[1].data:void 0,j=l.createURL(o.location),G=l.createURL(h),A;if(g&&o.errors){let Q=Object.keys(o.errors)[0];A=c.findIndex(M=>M.route.id===Q)}else if(T&&pr(T[1])){let Q=T[0];A=c.findIndex(M=>M.route.id===Q)-1}let ie=T?T[1].statusCode:void 0,F=ie&&ie>=400,ee={currentUrl:j,currentParams:o.matches[0]?.params||{},nextUrl:G,nextParams:c[0].params,...f,actionResult:$,actionStatus:ie},te=So(c),we=c.map((Q,M)=>{let{route:Y}=Q,V=null;if(A!=null&&M>A)V=!1;else if(Y.lazy)V=!0;else if(!Sm(Y))V=!1;else if(g){let{shouldLoad:B}=Pv(Y,o.loaderData,o.errors);V=B}else eS(o.loaderData,o.matches[M],Q)&&(V=!0);if(V!==null)return Yh(r,a,e,te,Q,m,t,V);let fe=!1;typeof P=="boolean"?fe=P:F?fe=!1:(x||j.pathname+j.search===G.pathname+G.search||j.search!==G.search||tS(o.matches[M],Q))&&(fe=!0);let R={...ee,defaultShouldRevalidate:fe},D=oo(Q,R);return Yh(r,a,e,te,Q,m,t,D,R,P)}),se=[];return k.forEach((Q,M)=>{if(g||!c.some(ue=>ue.route.id===Q.routeId)||v.has(M))return;let Y=o.fetchers.get(M),V=Y&&Y.state!=="idle"&&Y.data===void 0,fe=da(S,Q.path,N);if(!fe){if(O&&V)return;se.push({key:M,routeId:Q.routeId,path:Q.path,matches:null,match:null,request:null,controller:null});return}if(E.has(M))return;let R=mu(fe,Q.path),D=new AbortController,B=Ls(l,Q.path,D.signal),z=null;if(y.has(M))y.delete(M),z=Ps(r,a,B,fe,R,m,t);else if(V)x&&(z=Ps(r,a,B,fe,R,m,t));else{let ue;typeof P=="boolean"?ue=P:F?ue=!1:ue=x;let be={...ee,defaultShouldRevalidate:ue};oo(R,be)&&(z=Ps(r,a,B,fe,R,m,t,be))}z&&se.push({key:M,routeId:Q.routeId,path:Q.path,matches:z,match:R,request:B,controller:D})}),{dsMatches:we,revalidatingFetchers:se}}function Sm(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function Pv(e,t,r){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!Sm(e))return{shouldLoad:!1,renderFallback:!1};let a=t!=null&&e.id in t,l=r!=null&&r[e.id]!==void 0;if(!a&&l)return{shouldLoad:!1,renderFallback:!1};if(typeof e.loader=="function"&&e.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!a};let o=!a&&!l;return{shouldLoad:o,renderFallback:o}}function eS(e,t,r){let a=!t||r.route.id!==t.route.id,l=!e.hasOwnProperty(r.route.id);return a||l}function tS(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function oo(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}function gx(e,t,r,a,l,o){let c;if(e){let m=a[e];dt(m,`No route found to patch children into: routeId = ${e}`),m.children||(m.children=[]),c=m.children}else c=r;let f=[],h=[];if(t.forEach(m=>{let g=c.find(x=>Hv(m,x));g?h.push({existingRoute:g,newRoute:m}):f.push(m)}),f.length>0){let m=po(f,l,[e||"_","patch",String(c?.length||"0")],a);c.push(...m)}if(o&&h.length>0)for(let m=0;m<h.length;m++){let{existingRoute:g,newRoute:x}=h[m],y=g,[v]=po([x],l,[],{},!0);Object.assign(y,{element:v.element?v.element:y.element,errorElement:v.errorElement?v.errorElement:y.errorElement,hydrateFallbackElement:v.hydrateFallbackElement?v.hydrateFallbackElement:y.hydrateFallbackElement})}}function Hv(e,t){return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children?.every((r,a)=>t.children?.some(l=>Hv(r,l)))??!1:!1}var bx=new WeakMap,qv=({key:e,route:t,manifest:r,mapRouteProperties:a})=>{let l=r[t.id];if(dt(l,"No route found in manifest"),!l.lazy||typeof l.lazy!="object")return;let o=l.lazy[e];if(!o)return;let c=bx.get(l);c||(c={},bx.set(l,c));let f=c[e];if(f)return f;let h=(async()=>{let m=xN(e),x=l[e]!==void 0&&e!=="hasErrorBoundary";if(m)wn(!m,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),c[e]=Promise.resolve();else if(x)wn(!1,`Route "${l.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let y=await o();y!=null&&(Object.assign(l,{[e]:y}),Object.assign(l,a(l)))}typeof l.lazy=="object"&&(l.lazy[e]=void 0,Object.values(l.lazy).every(y=>y===void 0)&&(l.lazy=void 0))})();return c[e]=h,h},xx=new WeakMap;function nS(e,t,r,a,l){let o=r[e.id];if(dt(o,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy=="function"){let g=xx.get(o);if(g)return{lazyRoutePromise:g,lazyHandlerPromise:g};let x=(async()=>{dt(typeof e.lazy=="function","No lazy route function found");let y=await e.lazy(),v={};for(let k in y){let E=y[k];if(E===void 0)continue;let S=vN(k),O=o[k]!==void 0&&k!=="hasErrorBoundary";S?wn(!S,"Route property "+k+" is not a supported property to be returned from a lazy route function. This property will be ignored."):O?wn(!O,`Route "${o.id}" has a static property "${k}" defined but its lazy function is also returning a value for this property. The lazy route property "${k}" will be ignored.`):v[k]=E}Object.assign(o,v),Object.assign(o,{...a(o),lazy:void 0})})();return xx.set(o,x),x.catch(()=>{}),{lazyRoutePromise:x,lazyHandlerPromise:x}}let c=Object.keys(e.lazy),f=[],h;for(let g of c){if(l&&l.includes(g))continue;let x=qv({key:g,route:e,manifest:r,mapRouteProperties:a});x&&(f.push(x),g===t&&(h=x))}let m=f.length>0?Promise.all(f).then(()=>{}):void 0;return m?.catch(()=>{}),h?.catch(()=>{}),{lazyRoutePromise:m,lazyHandlerPromise:h}}async function yx(e){let t=e.matches.filter(l=>l.shouldLoad),r={};return(await Promise.all(t.map(l=>l.resolve()))).forEach((l,o)=>{r[t[o].route.id]=l}),r}async function rS(e){return e.matches.some(t=>t.route.middleware)?$v(e,()=>yx(e)):yx(e)}function $v(e,t){return iS(e,t,a=>{if(bS(a))throw a;return a},hS,r);function r(a,l,o){if(o)return Promise.resolve(Object.assign(o.value,{[l]:{type:"error",result:a}}));{let{matches:c}=e,f=Math.min(Math.max(c.findIndex(m=>m.route.id===l),0),Math.max(c.findIndex(m=>m.shouldCallHandler()),0)),h=fa(c,c[f].route.id).route.id;return Promise.resolve({[h]:{type:"error",result:a}})}}}async function iS(e,t,r,a,l){let{matches:o,request:c,params:f,context:h,unstable_pattern:m}=e,g=o.flatMap(y=>y.route.middleware?y.route.middleware.map(v=>[y.route.id,v]):[]);return await Gv({request:c,params:f,context:h,unstable_pattern:m},g,t,r,a,l)}async function Gv(e,t,r,a,l,o,c=0){let{request:f}=e;if(f.signal.aborted)throw f.signal.reason??new Error(`Request aborted: ${f.method} ${f.url}`);let h=t[c];if(!h)return await r();let[m,g]=h,x,y=async()=>{if(x)throw new Error("You may only call `next()` once per middleware");try{return x={value:await Gv(e,t,r,a,l,o,c+1)},x.value}catch(v){return x={value:await o(v,m,x)},x.value}};try{let v=await g(e,y),k=v!=null?a(v):void 0;return l(k)?k:x?k??x.value:(x={value:await y()},x.value)}catch(v){return await o(v,m,x)}}function Kv(e,t,r,a,l){let o=qv({key:"middleware",route:a.route,manifest:t,mapRouteProperties:e}),c=nS(a.route,Pn(r.method)?"action":"loader",t,e,l);return{middleware:o,route:c.lazyRoutePromise,handler:c.lazyHandlerPromise}}function Yh(e,t,r,a,l,o,c,f,h=null,m){let g=!1,x=Kv(e,t,r,l,o);return{...l,_lazyPromises:x,shouldLoad:f,shouldRevalidateArgs:h,shouldCallHandler(y){return g=!0,h?typeof m=="boolean"?oo(l,{...h,defaultShouldRevalidate:m}):typeof y=="boolean"?oo(l,{...h,defaultShouldRevalidate:y}):oo(l,h):f},resolve(y){let{lazy:v,loader:k,middleware:E}=l.route,S=g||f||y&&!Pn(r.method)&&(v||k),N=E&&E.length>0&&!k&&!v;return S&&(Pn(r.method)||!N)?sS({request:r,unstable_pattern:a,match:l,lazyHandlerPromise:x?.handler,lazyRoutePromise:x?.route,handlerOverride:y,scopedContext:c}):Promise.resolve({type:"data",result:void 0})}}}function Ps(e,t,r,a,l,o,c,f=null){return a.map(h=>h.route.id!==l.route.id?{...h,shouldLoad:!1,shouldRevalidateArgs:f,shouldCallHandler:()=>!1,_lazyPromises:Kv(e,t,r,h,o),resolve:()=>Promise.resolve({type:"data",result:void 0})}:Yh(e,t,r,So(a),h,o,c,!0,f))}async function aS(e,t,r,a,l,o){r.some(m=>m._lazyPromises?.middleware)&&await Promise.all(r.map(m=>m._lazyPromises?.middleware));let c={request:t,unstable_pattern:So(r),params:r[0].params,context:l,matches:r},h=await e({...c,fetcherKey:a,runClientMiddleware:m=>{let g=c;return $v(g,()=>m({...g,fetcherKey:a,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(r.flatMap(m=>[m._lazyPromises?.handler,m._lazyPromises?.route]))}catch{}return h}async function sS({request:e,unstable_pattern:t,match:r,lazyHandlerPromise:a,lazyRoutePromise:l,handlerOverride:o,scopedContext:c}){let f,h,m=Pn(e.method),g=m?"action":"loader",x=y=>{let v,k=new Promise((N,O)=>v=O);h=()=>v(),e.signal.addEventListener("abort",h);let E=N=>typeof y!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${g}" [routeId: ${r.route.id}]`)):y({request:e,unstable_pattern:t,params:r.params,context:c},...N!==void 0?[N]:[]),S=(async()=>{try{return{type:"data",result:await(o?o(O=>E(O)):E())}}catch(N){return{type:"error",result:N}}})();return Promise.race([S,k])};try{let y=m?r.route.action:r.route.loader;if(a||l)if(y){let v,[k]=await Promise.all([x(y).catch(E=>{v=E}),a,l]);if(v!==void 0)throw v;f=k}else{await a;let v=m?r.route.action:r.route.loader;if(v)[f]=await Promise.all([x(v),l]);else if(g==="action"){let k=new URL(e.url),E=k.pathname+k.search;throw Cr(405,{method:e.method,pathname:E,routeId:r.route.id})}else return{type:"data",result:void 0}}else if(y)f=await x(y);else{let v=new URL(e.url),k=v.pathname+v.search;throw Cr(404,{pathname:k})}}catch(y){return{type:"error",result:y}}finally{h&&e.signal.removeEventListener("abort",h)}return f}async function lS(e){let t=e.headers.get("Content-Type");return t&&/\bapplication\/json\b/.test(t)?e.body==null?null:e.json():e.text()}async function oS(e){let{result:t,type:r}=e;if(zm(t)){let a;try{a=await lS(t)}catch(l){return{type:"error",error:l}}return r==="error"?{type:"error",error:new No(t.status,t.statusText,a),statusCode:t.status,headers:t.headers}:{type:"data",data:a,statusCode:t.status,headers:t.headers}}return r==="error"?Nx(t)?t.data instanceof Error?{type:"error",error:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:fS(t),statusCode:go(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:t,statusCode:go(t)?t.status:void 0}:Nx(t)?{type:"data",data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"data",data:t}}function cS(e,t,r,a,l){let o=e.headers.get("Location");if(dt(o,"Redirects returned/thrown from loaders/actions must have a Location header"),!Em(o)){let c=a.slice(0,a.findIndex(f=>f.route.id===r)+1);o=Vh(new URL(t.url),c,l,o),e.headers.set("Location",o)}return e}function vx(e,t,r,a){let l=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(Em(e)){let o=e,c=o.startsWith("//")?new URL(t.protocol+o):new URL(o);if(l.includes(c.protocol))throw new Error("Invalid redirect location");let f=Or(c.pathname,r)!=null;if(c.origin===t.origin&&f)return c.pathname+c.search+c.hash}try{let o=a.createURL(e);if(l.includes(o.protocol))throw new Error("Invalid redirect location")}catch{}return e}function Ls(e,t,r,a){let l=e.createURL(Vv(t)).toString(),o={signal:r};if(a&&Pn(a.formMethod)){let{formMethod:c,formEncType:f}=a;o.method=c.toUpperCase(),f==="application/json"?(o.headers=new Headers({"Content-Type":f}),o.body=JSON.stringify(a.json)):f==="text/plain"?o.body=a.text:f==="application/x-www-form-urlencoded"&&a.formData?o.body=Qh(a.formData):o.body=a.formData}return new Request(l,o)}function Qh(e){let t=new URLSearchParams;for(let[r,a]of e.entries())t.append(r,typeof a=="string"?a:a.name);return t}function kx(e){let t=new FormData;for(let[r,a]of e.entries())t.append(r,a);return t}function uS(e,t,r,a=!1,l=!1){let o={},c=null,f,h=!1,m={},g=r&&pr(r[1])?r[1].error:void 0;return e.forEach(x=>{if(!(x.route.id in t))return;let y=x.route.id,v=t[y];if(dt(!qa(v),"Cannot handle redirect results in processLoaderData"),pr(v)){let k=v.error;if(g!==void 0&&(k=g,g=void 0),c=c||{},l)c[y]=k;else{let E=fa(e,y);c[E.route.id]==null&&(c[E.route.id]=k)}a||(o[y]=Fv),h||(h=!0,f=go(v.error)?v.error.status:500),v.headers&&(m[y]=v.headers)}else o[y]=v.data,v.statusCode&&v.statusCode!==200&&!h&&(f=v.statusCode),v.headers&&(m[y]=v.headers)}),g!==void 0&&r&&(c={[r[0]]:g},r[2]&&(o[r[2]]=void 0)),{loaderData:o,errors:c,statusCode:f||200,loaderHeaders:m}}function wx(e,t,r,a,l,o){let{loaderData:c,errors:f}=uS(t,r,a);return l.filter(h=>!h.matches||h.matches.some(m=>m.shouldLoad)).forEach(h=>{let{key:m,match:g,controller:x}=h;if(x&&x.signal.aborted)return;let y=o[m];if(dt(y,"Did not find corresponding fetcher result"),pr(y)){let v=fa(e.matches,g?.route.id);f&&f[v.route.id]||(f={...f,[v.route.id]:y.error}),e.fetchers.delete(m)}else if(qa(y))dt(!1,"Unhandled fetcher revalidation redirect");else{let v=Ai(y.data);e.fetchers.set(m,v)}}),{loaderData:c,errors:f}}function _x(e,t,r,a){let l=Object.entries(t).filter(([,o])=>o!==Fv).reduce((o,[c,f])=>(o[c]=f,o),{});for(let o of r){let c=o.route.id;if(!t.hasOwnProperty(c)&&e.hasOwnProperty(c)&&o.route.loader&&(l[c]=e[c]),a&&a.hasOwnProperty(c))break}return l}function Ex(e){return e?pr(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function fa(e,t){return(t?e.slice(0,e.findIndex(a=>a.route.id===t)+1):[...e]).reverse().find(a=>a.route.hasErrorBoundary===!0)||e[0]}function Xc(e){let t=e.length===1?e[0]:e.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Cr(e,{pathname:t,routeId:r,method:a,type:l,message:o}={}){let c="Unknown Server Error",f="Unknown @remix-run/router error";return e===400?(c="Bad Request",a&&t&&r?f=`You made a ${a} request to "${t}" but did not provide a \`loader\` for route "${r}", so there is no way to handle the request.`:l==="invalid-body"&&(f="Unable to encode submission body")):e===403?(c="Forbidden",f=`Route "${r}" does not match URL "${t}"`):e===404?(c="Not Found",f=`No route matches URL "${t}"`):e===405&&(c="Method Not Allowed",a&&t&&r?f=`You made a ${a.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${r}", so there is no way to handle the request.`:a&&(f=`Invalid request method "${a.toUpperCase()}"`)),new No(e||500,c,new Error(f),!0)}function Zc(e){let t=Object.entries(e);for(let r=t.length-1;r>=0;r--){let[a,l]=t[r];if(qa(l))return{key:a,result:l}}}function Vv(e){let t=typeof e=="string"?Mi(e):e;return ti({...t,hash:""})}function dS(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function fS(e){return new No(e.init?.status??500,e.init?.statusText??"Internal Server Error",e.data)}function hS(e){return e!=null&&typeof e=="object"&&Object.entries(e).every(([t,r])=>typeof t=="string"&&mS(r))}function mS(e){return e!=null&&typeof e=="object"&&"type"in e&&"result"in e&&(e.type==="data"||e.type==="error")}function pS(e){return zm(e.result)&&Bv.has(e.result.status)}function pr(e){return e.type==="error"}function qa(e){return(e&&e.type)==="redirect"}function Nx(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function zm(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function gS(e){return Bv.has(e)}function bS(e){return zm(e)&&gS(e.status)&&e.headers.has("Location")}function xS(e){return YN.has(e.toUpperCase())}function Pn(e){return KN.has(e.toUpperCase())}function Cm(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function mu(e,t){let r=typeof t=="string"?Mi(t).search:t.search;if(e[e.length-1].route.index&&Cm(r||""))return e[e.length-1];let a=Mv(e);return a[a.length-1]}function Sx(e){let{formMethod:t,formAction:r,formEncType:a,text:l,formData:o,json:c}=e;if(!(!t||!r||!a)){if(l!=null)return{formMethod:t,formAction:r,formEncType:a,formData:void 0,json:void 0,text:l};if(o!=null)return{formMethod:t,formAction:r,formEncType:a,formData:o,json:void 0,text:void 0};if(c!==void 0)return{formMethod:t,formAction:r,formEncType:a,formData:void 0,json:c,text:void 0}}}function fh(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function yS(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function Vl(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function vS(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Ai(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function kS(e,t){try{let r=e.sessionStorage.getItem(Uv);if(r){let a=JSON.parse(r);for(let[l,o]of Object.entries(a||{}))o&&Array.isArray(o)&&t.set(l,new Set(o||[]))}}catch{}}function wS(e,t){if(t.size>0){let r={};for(let[a,l]of t)r[a]=[...l];try{e.sessionStorage.setItem(Uv,JSON.stringify(r))}catch(a){wn(!1,`Failed to save applied view transitions in sessionStorage (${a}).`)}}}function zx(){let e,t,r=new Promise((a,l)=>{e=async o=>{a(o);try{await r}catch{}},t=async o=>{l(o);try{await r}catch{}}});return{promise:r,resolve:e,reject:t}}var Qa=_.createContext(null);Qa.displayName="DataRouter";var zo=_.createContext(null);zo.displayName="DataRouterState";var Yv=_.createContext(!1);function _S(){return _.useContext(Yv)}var Tm=_.createContext({isTransitioning:!1});Tm.displayName="ViewTransition";var Qv=_.createContext(new Map);Qv.displayName="Fetchers";var ES=_.createContext(null);ES.displayName="Await";var Dr=_.createContext(null);Dr.displayName="Navigation";var Pu=_.createContext(null);Pu.displayName="Location";var Gr=_.createContext({outlet:null,matches:[],isDataRoute:!1});Gr.displayName="Route";var Rm=_.createContext(null);Rm.displayName="RouteError";var Xv="REACT_ROUTER_ERROR",NS="REDIRECT",SS="ROUTE_ERROR_RESPONSE";function zS(e){if(e.startsWith(`${Xv}:${NS}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function CS(e){if(e.startsWith(`${Xv}:${SS}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new No(t.status,t.statusText,t.data)}catch{}}function TS(e,{relative:t}={}){dt(Co(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:a}=_.useContext(Dr),{hash:l,pathname:o,search:c}=To(e,{relative:t}),f=o;return r!=="/"&&(f=o==="/"?r:Hr([r,o])),a.createHref({pathname:f,search:c,hash:l})}function Co(){return _.useContext(Pu)!=null}function ai(){return dt(Co(),"useLocation() may be used only in the context of a <Router> component."),_.useContext(Pu).location}var Zv="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Wv(e){_.useContext(Dr).static||_.useLayoutEffect(e)}function Hu(){let{isDataRoute:e}=_.useContext(Gr);return e?$S():RS()}function RS(){dt(Co(),"useNavigate() may be used only in the context of a <Router> component.");let e=_.useContext(Qa),{basename:t,navigator:r}=_.useContext(Dr),{matches:a}=_.useContext(Gr),{pathname:l}=ai(),o=JSON.stringify(Nm(a)),c=_.useRef(!1);return Wv(()=>{c.current=!0}),_.useCallback((h,m={})=>{if(wn(c.current,Zv),!c.current)return;if(typeof h=="number"){r.go(h);return}let g=Fu(h,JSON.parse(o),l,m.relative==="path");e==null&&t!=="/"&&(g.pathname=g.pathname==="/"?t:Hr([t,g.pathname])),(m.replace?r.replace:r.push)(g,m.state,m)},[t,r,o,l,e])}var AS=_.createContext(null);function OS(e){let t=_.useContext(Gr).outlet;return _.useMemo(()=>t&&_.createElement(AS.Provider,{value:e},t),[t,e])}function qu(){let{matches:e}=_.useContext(Gr),t=e[e.length-1];return t?t.params:{}}function To(e,{relative:t}={}){let{matches:r}=_.useContext(Gr),{pathname:a}=ai(),l=JSON.stringify(Nm(r));return _.useMemo(()=>Fu(e,JSON.parse(l),a,t==="path"),[e,l,a,t])}function MS(e,t,r){dt(Co(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=_.useContext(Dr),{matches:l}=_.useContext(Gr),o=l[l.length-1],c=o?o.params:{},f=o?o.pathname:"/",h=o?o.pathnameBase:"/",m=o&&o.route;{let S=m&&m.path||"";e1(f,!m||S.endsWith("*")||S.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${f}" (under <Route path="${S}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
60
+
61
+ Please change the parent <Route path="${S}"> to <Route path="${S==="/"?"*":`${S}/*`}">.`)}let g=ai(),x;x=g;let y=x.pathname||"/",v=y;if(h!=="/"){let S=h.replace(/^\//,"").split("/");v="/"+y.replace(/^\//,"").split("/").slice(S.length).join("/")}let k=da(e,{pathname:v});return wn(m||k!=null,`No routes matched location "${x.pathname}${x.search}${x.hash}" `),wn(k==null||k[k.length-1].route.element!==void 0||k[k.length-1].route.Component!==void 0||k[k.length-1].route.lazy!==void 0,`Matched leaf route at location "${x.pathname}${x.search}${x.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),BS(k&&k.map(S=>Object.assign({},S,{params:Object.assign({},c,S.params),pathname:Hr([h,a.encodeLocation?a.encodeLocation(S.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:S.pathname]),pathnameBase:S.pathnameBase==="/"?h:Hr([h,a.encodeLocation?a.encodeLocation(S.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:S.pathnameBase])})),l,r)}function jS(){let e=qS(),t=go(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",l={padding:"0.5rem",backgroundColor:a},o={padding:"2px 4px",backgroundColor:a},c=null;return console.error("Error handled by React Router default ErrorBoundary:",e),c=_.createElement(_.Fragment,null,_.createElement("p",null,"💿 Hey developer 👋"),_.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",_.createElement("code",{style:o},"ErrorBoundary")," or"," ",_.createElement("code",{style:o},"errorElement")," prop on your route.")),_.createElement(_.Fragment,null,_.createElement("h2",null,"Unexpected Application Error!"),_.createElement("h3",{style:{fontStyle:"italic"}},t),r?_.createElement("pre",{style:l},r):null,c)}var DS=_.createElement(jS,null),Jv=class extends _.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const r=CS(e.digest);r&&(e=r)}let t=e!==void 0?_.createElement(Gr.Provider,{value:this.props.routeContext},_.createElement(Rm.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?_.createElement(LS,{error:e},t):t}};Jv.contextType=Yv;var hh=new WeakMap;function LS({children:e,error:t}){let{basename:r}=_.useContext(Dr);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let a=zS(t.digest);if(a){let l=hh.get(t);if(l)throw l;let o=Dv(a.location,r);if(jv&&!hh.get(t))if(o.isExternal||a.reloadDocument)window.location.href=o.absoluteURL||o.to;else{const c=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:a.replace}));throw hh.set(t,c),c}return _.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return e}function IS({routeContext:e,match:t,children:r}){let a=_.useContext(Qa);return a&&a.static&&a.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=t.route.id),_.createElement(Gr.Provider,{value:e},r)}function BS(e,t=[],r){let a=r?.state;if(e==null){if(!a)return null;if(a.errors)e=a.matches;else if(t.length===0&&!a.initialized&&a.matches.length>0)e=a.matches;else return null}let l=e,o=a?.errors;if(o!=null){let g=l.findIndex(x=>x.route.id&&o?.[x.route.id]!==void 0);dt(g>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),l=l.slice(0,Math.min(l.length,g+1))}let c=!1,f=-1;if(r&&a){c=a.renderFallback;for(let g=0;g<l.length;g++){let x=l[g];if((x.route.HydrateFallback||x.route.hydrateFallbackElement)&&(f=g),x.route.id){let{loaderData:y,errors:v}=a,k=x.route.loader&&!y.hasOwnProperty(x.route.id)&&(!v||v[x.route.id]===void 0);if(x.route.lazy||k){r.isStatic&&(c=!0),f>=0?l=l.slice(0,f+1):l=[l[0]];break}}}}let h=r?.onError,m=a&&h?(g,x)=>{h(g,{location:a.location,params:a.matches?.[0]?.params??{},unstable_pattern:So(a.matches),errorInfo:x})}:void 0;return l.reduceRight((g,x,y)=>{let v,k=!1,E=null,S=null;a&&(v=o&&x.route.id?o[x.route.id]:void 0,E=x.route.errorElement||DS,c&&(f<0&&y===0?(e1("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),k=!0,S=null):f===y&&(k=!0,S=x.route.hydrateFallbackElement||null)));let N=t.concat(l.slice(0,y+1)),O=()=>{let T;return v?T=E:k?T=S:x.route.Component?T=_.createElement(x.route.Component,null):x.route.element?T=x.route.element:T=g,_.createElement(IS,{match:x,routeContext:{outlet:g,matches:N,isDataRoute:a!=null},children:T})};return a&&(x.route.ErrorBoundary||x.route.errorElement||y===0)?_.createElement(Jv,{location:a.location,revalidation:a.revalidation,component:E,error:v,children:O(),routeContext:{outlet:null,matches:N,isDataRoute:!0},onError:m}):O()},null)}function Am(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function US(e){let t=_.useContext(Qa);return dt(t,Am(e)),t}function FS(e){let t=_.useContext(zo);return dt(t,Am(e)),t}function PS(e){let t=_.useContext(Gr);return dt(t,Am(e)),t}function Om(e){let t=PS(e),r=t.matches[t.matches.length-1];return dt(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function HS(){return Om("useRouteId")}function qS(){let e=_.useContext(Rm),t=FS("useRouteError"),r=Om("useRouteError");return e!==void 0?e:t.errors?.[r]}function $S(){let{router:e}=US("useNavigate"),t=Om("useNavigate"),r=_.useRef(!1);return Wv(()=>{r.current=!0}),_.useCallback(async(l,o={})=>{wn(r.current,Zv),r.current&&(typeof l=="number"?await e.navigate(l):await e.navigate(l,{fromRouteId:t,...o}))},[e,t])}var Cx={};function e1(e,t,r){!t&&!Cx[e]&&(Cx[e]=!0,wn(!1,r))}var Tx={};function Rx(e,t){!e&&!Tx[t]&&(Tx[t]=!0,console.warn(t))}var GS="useOptimistic",Ax=aN[GS],KS=()=>{};function VS(e){return Ax?Ax(e):[e,KS]}function YS(e){let t={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&wn(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:_.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&wn(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:_.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&wn(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:_.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var QS=["HydrateFallback","hydrateFallbackElement"],XS=class{constructor(){this.status="pending",this.promise=new Promise((e,t)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",e(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",t(r))}})}};function ZS({router:e,flushSync:t,onError:r,unstable_useTransitions:a}){a=_S()||a;let[o,c]=_.useState(e.state),[f,h]=VS(o),[m,g]=_.useState(),[x,y]=_.useState({isTransitioning:!1}),[v,k]=_.useState(),[E,S]=_.useState(),[N,O]=_.useState(),T=_.useRef(new Map),P=_.useCallback((A,{deletedFetchers:ie,newErrors:F,flushSync:ee,viewTransitionOpts:te})=>{F&&r&&Object.values(F).forEach(se=>r(se,{location:A.location,params:A.matches[0]?.params??{},unstable_pattern:So(A.matches)})),A.fetchers.forEach((se,Q)=>{se.data!==void 0&&T.current.set(Q,se.data)}),ie.forEach(se=>T.current.delete(se)),Rx(ee===!1||t!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let we=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition=="function";if(Rx(te==null||we,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!te||!we){t&&ee?t(()=>c(A)):a===!1?c(A):_.startTransition(()=>{a===!0&&h(se=>Ox(se,A)),c(A)});return}if(t&&ee){t(()=>{E&&(v?.resolve(),E.skipTransition()),y({isTransitioning:!0,flushSync:!0,currentLocation:te.currentLocation,nextLocation:te.nextLocation})});let se=e.window.document.startViewTransition(()=>{t(()=>c(A))});se.finished.finally(()=>{t(()=>{k(void 0),S(void 0),g(void 0),y({isTransitioning:!1})})}),t(()=>S(se));return}E?(v?.resolve(),E.skipTransition(),O({state:A,currentLocation:te.currentLocation,nextLocation:te.nextLocation})):(g(A),y({isTransitioning:!0,flushSync:!1,currentLocation:te.currentLocation,nextLocation:te.nextLocation}))},[e.window,t,E,v,a,h,r]);_.useLayoutEffect(()=>e.subscribe(P),[e,P]),_.useEffect(()=>{x.isTransitioning&&!x.flushSync&&k(new XS)},[x]),_.useEffect(()=>{if(v&&m&&e.window){let A=m,ie=v.promise,F=e.window.document.startViewTransition(async()=>{a===!1?c(A):_.startTransition(()=>{a===!0&&h(ee=>Ox(ee,A)),c(A)}),await ie});F.finished.finally(()=>{k(void 0),S(void 0),g(void 0),y({isTransitioning:!1})}),S(F)}},[m,v,e.window,a,h]),_.useEffect(()=>{v&&m&&f.location.key===m.location.key&&v.resolve()},[v,E,f.location,m]),_.useEffect(()=>{!x.isTransitioning&&N&&(g(N.state),y({isTransitioning:!0,flushSync:!1,currentLocation:N.currentLocation,nextLocation:N.nextLocation}),O(void 0))},[x.isTransitioning,N]);let $=_.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:A=>e.navigate(A),push:(A,ie,F)=>e.navigate(A,{state:ie,preventScrollReset:F?.preventScrollReset}),replace:(A,ie,F)=>e.navigate(A,{replace:!0,state:ie,preventScrollReset:F?.preventScrollReset})}),[e]),j=e.basename||"/",G=_.useMemo(()=>({router:e,navigator:$,static:!1,basename:j,onError:r}),[e,$,j,r]);return _.createElement(_.Fragment,null,_.createElement(Qa.Provider,{value:G},_.createElement(zo.Provider,{value:f},_.createElement(Qv.Provider,{value:T.current},_.createElement(Tm.Provider,{value:x},_.createElement(tz,{basename:j,location:f.location,navigationType:f.historyAction,navigator:$,unstable_useTransitions:a},_.createElement(WS,{routes:e.routes,future:e.future,state:f,isStatic:!1,onError:r})))))),null)}function Ox(e,t){return{...e,navigation:t.navigation.state!=="idle"?t.navigation:e.navigation,revalidation:t.revalidation!=="idle"?t.revalidation:e.revalidation,actionData:t.navigation.state!=="submitting"?t.actionData:e.actionData,fetchers:t.fetchers}}var WS=_.memo(JS);function JS({routes:e,future:t,state:r,isStatic:a,onError:l}){return MS(e,void 0,{state:r,isStatic:a,onError:l})}function ez(e){return OS(e.context)}function tz({basename:e="/",children:t=null,location:r,navigationType:a="POP",navigator:l,static:o=!1,unstable_useTransitions:c}){dt(!Co(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let f=e.replace(/^\/*/,"/"),h=_.useMemo(()=>({basename:f,navigator:l,static:o,unstable_useTransitions:c,future:{}}),[f,l,o,c]);typeof r=="string"&&(r=Mi(r));let{pathname:m="/",search:g="",hash:x="",state:y=null,key:v="default",unstable_mask:k}=r,E=_.useMemo(()=>{let S=Or(m,f);return S==null?null:{location:{pathname:S,search:g,hash:x,state:y,key:v,unstable_mask:k},navigationType:a}},[f,m,g,x,y,v,a,k]);return wn(E!=null,`<Router basename="${f}"> is not able to match the URL "${m}${g}${x}" because it does not start with the basename, so the <Router> won't render anything.`),E==null?null:_.createElement(Dr.Provider,{value:h},_.createElement(Pu.Provider,{children:t,value:E}))}var pu="get",gu="application/x-www-form-urlencoded";function $u(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function nz(e){return $u(e)&&e.tagName.toLowerCase()==="button"}function rz(e){return $u(e)&&e.tagName.toLowerCase()==="form"}function iz(e){return $u(e)&&e.tagName.toLowerCase()==="input"}function az(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function sz(e,t){return e.button===0&&(!t||t==="_self")&&!az(e)}var Wc=null;function lz(){if(Wc===null)try{new FormData(document.createElement("form"),0),Wc=!1}catch{Wc=!0}return Wc}var oz=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function mh(e){return e!=null&&!oz.has(e)?(wn(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${gu}"`),null):e}function cz(e,t){let r,a,l,o,c;if(rz(e)){let f=e.getAttribute("action");a=f?Or(f,t):null,r=e.getAttribute("method")||pu,l=mh(e.getAttribute("enctype"))||gu,o=new FormData(e)}else if(nz(e)||iz(e)&&(e.type==="submit"||e.type==="image")){let f=e.form;if(f==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let h=e.getAttribute("formaction")||f.getAttribute("action");if(a=h?Or(h,t):null,r=e.getAttribute("formmethod")||f.getAttribute("method")||pu,l=mh(e.getAttribute("formenctype"))||mh(f.getAttribute("enctype"))||gu,o=new FormData(f,e),!lz()){let{name:m,type:g,value:x}=e;if(g==="image"){let y=m?`${m}.`:"";o.append(`${y}x`,"0"),o.append(`${y}y`,"0")}else m&&o.append(m,x)}}else{if($u(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=pu,a=null,l=gu,c=e}return o&&l==="text/plain"&&(c=o,o=void 0),{action:a,method:r.toLowerCase(),encType:l,formData:o,body:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Mm(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function uz(e,t,r,a){let l=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r?l.pathname.endsWith("/")?l.pathname=`${l.pathname}_.${a}`:l.pathname=`${l.pathname}.${a}`:l.pathname==="/"?l.pathname=`_root.${a}`:t&&Or(l.pathname,t)==="/"?l.pathname=`${t.replace(/\/$/,"")}/_root.${a}`:l.pathname=`${l.pathname.replace(/\/$/,"")}.${a}`,l}async function dz(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function fz(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function hz(e,t,r){let a=await Promise.all(e.map(async l=>{let o=t.routes[l.route.id];if(o){let c=await dz(o,r);return c.links?c.links():[]}return[]}));return bz(a.flat(1).filter(fz).filter(l=>l.rel==="stylesheet"||l.rel==="preload").map(l=>l.rel==="stylesheet"?{...l,rel:"prefetch",as:"style"}:{...l,rel:"prefetch"}))}function Mx(e,t,r,a,l,o){let c=(h,m)=>r[m]?h.route.id!==r[m].route.id:!0,f=(h,m)=>r[m].pathname!==h.pathname||r[m].route.path?.endsWith("*")&&r[m].params["*"]!==h.params["*"];return o==="assets"?t.filter((h,m)=>c(h,m)||f(h,m)):o==="data"?t.filter((h,m)=>{let g=a.routes[h.route.id];if(!g||!g.hasLoader)return!1;if(c(h,m)||f(h,m))return!0;if(h.route.shouldRevalidate){let x=h.route.shouldRevalidate({currentUrl:new URL(l.pathname+l.search+l.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:h.params,defaultShouldRevalidate:!0});if(typeof x=="boolean")return x}return!0}):[]}function mz(e,t,{includeHydrateFallback:r}={}){return pz(e.map(a=>{let l=t.routes[a.route.id];if(!l)return[];let o=[l.module];return l.clientActionModule&&(o=o.concat(l.clientActionModule)),l.clientLoaderModule&&(o=o.concat(l.clientLoaderModule)),r&&l.hydrateFallbackModule&&(o=o.concat(l.hydrateFallbackModule)),l.imports&&(o=o.concat(l.imports)),o}).flat(1))}function pz(e){return[...new Set(e)]}function gz(e){let t={},r=Object.keys(e).sort();for(let a of r)t[a]=e[a];return t}function bz(e,t){let r=new Set;return new Set(t),e.reduce((a,l)=>{let o=JSON.stringify(gz(l));return r.has(o)||(r.add(o),a.push({key:o,link:l})),a},[])}function t1(){let e=_.useContext(Qa);return Mm(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function xz(){let e=_.useContext(zo);return Mm(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var jm=_.createContext(void 0);jm.displayName="FrameworkContext";function n1(){let e=_.useContext(jm);return Mm(e,"You must render this element inside a <HydratedRouter> element"),e}function yz(e,t){let r=_.useContext(jm),[a,l]=_.useState(!1),[o,c]=_.useState(!1),{onFocus:f,onBlur:h,onMouseEnter:m,onMouseLeave:g,onTouchStart:x}=t,y=_.useRef(null);_.useEffect(()=>{if(e==="render"&&c(!0),e==="viewport"){let E=N=>{N.forEach(O=>{c(O.isIntersecting)})},S=new IntersectionObserver(E,{threshold:.5});return y.current&&S.observe(y.current),()=>{S.disconnect()}}},[e]),_.useEffect(()=>{if(a){let E=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(E)}}},[a]);let v=()=>{l(!0)},k=()=>{l(!1),c(!1)};return r?e!=="intent"?[o,y,{}]:[o,y,{onFocus:Yl(f,v),onBlur:Yl(h,k),onMouseEnter:Yl(m,v),onMouseLeave:Yl(g,k),onTouchStart:Yl(x,v)}]:[!1,y,{}]}function Yl(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function vz({page:e,...t}){let{router:r}=t1(),a=_.useMemo(()=>da(r.routes,e,r.basename),[r.routes,e,r.basename]);return a?_.createElement(wz,{page:e,matches:a,...t}):null}function kz(e){let{manifest:t,routeModules:r}=n1(),[a,l]=_.useState([]);return _.useEffect(()=>{let o=!1;return hz(e,t,r).then(c=>{o||l(c)}),()=>{o=!0}},[e,t,r]),a}function wz({page:e,matches:t,...r}){let a=ai(),{future:l,manifest:o,routeModules:c}=n1(),{basename:f}=t1(),{loaderData:h,matches:m}=xz(),g=_.useMemo(()=>Mx(e,t,m,o,a,"data"),[e,t,m,o,a]),x=_.useMemo(()=>Mx(e,t,m,o,a,"assets"),[e,t,m,o,a]),y=_.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let E=new Set,S=!1;if(t.forEach(O=>{let T=o.routes[O.route.id];!T||!T.hasLoader||(!g.some(P=>P.route.id===O.route.id)&&O.route.id in h&&c[O.route.id]?.shouldRevalidate||T.hasClientLoader?S=!0:E.add(O.route.id))}),E.size===0)return[];let N=uz(e,f,l.unstable_trailingSlashAwareDataRequests,"data");return S&&E.size>0&&N.searchParams.set("_routes",t.filter(O=>E.has(O.route.id)).map(O=>O.route.id).join(",")),[N.pathname+N.search]},[f,l.unstable_trailingSlashAwareDataRequests,h,a,o,g,t,e,c]),v=_.useMemo(()=>mz(x,o),[x,o]),k=kz(x);return _.createElement(_.Fragment,null,y.map(E=>_.createElement("link",{key:E,rel:"prefetch",as:"fetch",href:E,...r})),v.map(E=>_.createElement("link",{key:E,rel:"modulepreload",href:E,...r})),k.map(({key:E,link:S})=>_.createElement("link",{key:E,nonce:r.nonce,...S,crossOrigin:S.crossOrigin??r.crossOrigin})))}function _z(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var Ez=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Ez&&(window.__reactRouterVersion="7.13.1")}catch{}function Nz(e,t){return WN({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:mN({window:t?.window}),hydrationData:Sz(),routes:e,mapRouteProperties:YS,hydrationRouteProperties:QS,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window,unstable_instrumentations:t?.unstable_instrumentations}).initialize()}function Sz(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:zz(e.errors)}),e}function zz(e){if(!e)return null;let t=Object.entries(e),r={};for(let[a,l]of t)if(l&&l.__type==="RouteErrorResponse")r[a]=new No(l.status,l.statusText,l.data,l.internal===!0);else if(l&&l.__type==="Error"){if(l.__subType){let o=window[l.__subType];if(typeof o=="function")try{let c=new o(l.message);c.stack="",r[a]=c}catch{}}if(r[a]==null){let o=new Error(l.message);o.stack="",r[a]=o}}else r[a]=l;return r}var r1=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,In=_.forwardRef(function({onClick:t,discover:r="render",prefetch:a="none",relative:l,reloadDocument:o,replace:c,unstable_mask:f,state:h,target:m,to:g,preventScrollReset:x,viewTransition:y,unstable_defaultShouldRevalidate:v,...k},E){let{basename:S,navigator:N,unstable_useTransitions:O}=_.useContext(Dr),T=typeof g=="string"&&r1.test(g),P=Dv(g,S);g=P.to;let $=TS(g,{relative:l}),j=ai(),G=null;if(f){let Q=Fu(f,[],j.unstable_mask?j.unstable_mask.pathname:"/",!0);S!=="/"&&(Q.pathname=Q.pathname==="/"?S:Hr([S,Q.pathname])),G=N.createHref(Q)}let[A,ie,F]=yz(a,k),ee=Az(g,{replace:c,unstable_mask:f,state:h,target:m,preventScrollReset:x,relative:l,viewTransition:y,unstable_defaultShouldRevalidate:v,unstable_useTransitions:O});function te(Q){t&&t(Q),Q.defaultPrevented||ee(Q)}let we=!(P.isExternal||o),se=_.createElement("a",{...k,...F,href:(we?G:void 0)||P.absoluteURL||$,onClick:we?te:t,ref:_z(E,ie),target:m,"data-discover":!T&&r==="render"?"true":void 0});return A&&!T?_.createElement(_.Fragment,null,se,_.createElement(vz,{page:$})):se});In.displayName="Link";var Cz=_.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:a="",end:l=!1,style:o,to:c,viewTransition:f,children:h,...m},g){let x=To(c,{relative:m.relative}),y=ai(),v=_.useContext(zo),{navigator:k,basename:E}=_.useContext(Dr),S=v!=null&&Lz(x)&&f===!0,N=k.encodeLocation?k.encodeLocation(x).pathname:x.pathname,O=y.pathname,T=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;r||(O=O.toLowerCase(),T=T?T.toLowerCase():null,N=N.toLowerCase()),T&&E&&(T=Or(T,E)||T);const P=N!=="/"&&N.endsWith("/")?N.length-1:N.length;let $=O===N||!l&&O.startsWith(N)&&O.charAt(P)==="/",j=T!=null&&(T===N||!l&&T.startsWith(N)&&T.charAt(N.length)==="/"),G={isActive:$,isPending:j,isTransitioning:S},A=$?t:void 0,ie;typeof a=="function"?ie=a(G):ie=[a,$?"active":null,j?"pending":null,S?"transitioning":null].filter(Boolean).join(" ");let F=typeof o=="function"?o(G):o;return _.createElement(In,{...m,"aria-current":A,className:ie,ref:g,style:F,to:c,viewTransition:f},typeof h=="function"?h(G):h)});Cz.displayName="NavLink";var Tz=_.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:a,replace:l,state:o,method:c=pu,action:f,onSubmit:h,relative:m,preventScrollReset:g,viewTransition:x,unstable_defaultShouldRevalidate:y,...v},k)=>{let{unstable_useTransitions:E}=_.useContext(Dr),S=jz(),N=Dz(f,{relative:m}),O=c.toLowerCase()==="get"?"get":"post",T=typeof f=="string"&&r1.test(f),P=$=>{if(h&&h($),$.defaultPrevented)return;$.preventDefault();let j=$.nativeEvent.submitter,G=j?.getAttribute("formmethod")||c,A=()=>S(j||$.currentTarget,{fetcherKey:t,method:G,navigate:r,replace:l,state:o,relative:m,preventScrollReset:g,viewTransition:x,unstable_defaultShouldRevalidate:y});E&&r!==!1?_.startTransition(()=>A()):A()};return _.createElement("form",{ref:k,method:O,action:N,onSubmit:a?h:P,...v,"data-discover":!T&&e==="render"?"true":void 0})});Tz.displayName="Form";function Rz(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function i1(e){let t=_.useContext(Qa);return dt(t,Rz(e)),t}function Az(e,{target:t,replace:r,unstable_mask:a,state:l,preventScrollReset:o,relative:c,viewTransition:f,unstable_defaultShouldRevalidate:h,unstable_useTransitions:m}={}){let g=Hu(),x=ai(),y=To(e,{relative:c});return _.useCallback(v=>{if(sz(v,t)){v.preventDefault();let k=r!==void 0?r:ti(x)===ti(y),E=()=>g(e,{replace:k,unstable_mask:a,state:l,preventScrollReset:o,relative:c,viewTransition:f,unstable_defaultShouldRevalidate:h});m?_.startTransition(()=>E()):E()}},[x,g,y,r,a,l,t,e,o,c,f,h,m])}var Oz=0,Mz=()=>`__${String(++Oz)}__`;function jz(){let{router:e}=i1("useSubmit"),{basename:t}=_.useContext(Dr),r=HS(),a=e.fetch,l=e.navigate;return _.useCallback(async(o,c={})=>{let{action:f,method:h,encType:m,formData:g,body:x}=cz(o,t);if(c.navigate===!1){let y=c.fetcherKey||Mz();await a(y,r,c.action||f,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:g,body:x,formMethod:c.method||h,formEncType:c.encType||m,flushSync:c.flushSync})}else await l(c.action||f,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:g,body:x,formMethod:c.method||h,formEncType:c.encType||m,replace:c.replace,state:c.state,fromRouteId:r,flushSync:c.flushSync,viewTransition:c.viewTransition})},[a,l,t,r])}function Dz(e,{relative:t}={}){let{basename:r}=_.useContext(Dr),a=_.useContext(Gr);dt(a,"useFormAction must be used inside a RouteContext");let[l]=a.matches.slice(-1),o={...To(e||".",{relative:t})},c=ai();if(e==null){o.search=c.search;let f=new URLSearchParams(o.search),h=f.getAll("index");if(h.some(g=>g==="")){f.delete("index"),h.filter(x=>x).forEach(x=>f.append("index",x));let g=f.toString();o.search=g?`?${g}`:""}}return(!e||e===".")&&l.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(o.pathname=o.pathname==="/"?r:Hr([r,o.pathname])),ti(o)}function Lz(e,{relative:t}={}){let r=_.useContext(Tm);dt(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=i1("useViewTransitionState"),l=To(e,{relative:t});if(!r.isTransitioning)return!1;let o=Or(r.currentLocation.pathname,a)||r.currentLocation.pathname,c=Or(r.nextLocation.pathname,a)||r.nextLocation.pathname;return Su(l.pathname,c)!=null||Su(l.pathname,o)!=null}var a1=zv();function Iz(e){return _.createElement(ZS,{flushSync:a1.flushSync,...e})}const s1=_.createContext(null),l1="ocr-dashboard-theme",ph=["system","light","dark"];function Bz(){return typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function Uz(){try{const e=localStorage.getItem(l1);if(e==="light"||e==="dark"||e==="system")return e}catch{}return"system"}function Fz({children:e}){const[t,r]=_.useState(Uz),[a,l]=_.useState(Bz);_.useEffect(()=>{const h=window.matchMedia("(prefers-color-scheme: dark)"),m=g=>{l(g.matches?"dark":"light")};return h.addEventListener("change",m),()=>h.removeEventListener("change",m)},[]);const o=t==="system"?a:t;_.useEffect(()=>{const h=document.documentElement;h.classList.remove("light","dark"),h.classList.add(o);const m=o==="dark"?"/favicon-light.ico":"/favicon-dark.ico",g=document.querySelector("link#favicon");g&&(g.href=m)},[o]),_.useEffect(()=>{try{localStorage.setItem(l1,t)}catch{}},[t]);const c=_.useCallback(()=>{r(h=>{const m=ph.indexOf(h);return ph[(m+1)%ph.length]})},[]),f=_.useMemo(()=>({mode:t,resolved:o,cycle:c,theme:t,toggleTheme:c}),[t,o,c]);return d.jsx(s1,{value:f,children:e})}function o1(){const e=_.useContext(s1);if(!e)throw new Error("useTheme must be used within ThemeProvider");return e}const ni=Object.create(null);ni.open="0";ni.close="1";ni.ping="2";ni.pong="3";ni.message="4";ni.upgrade="5";ni.noop="6";const bu=Object.create(null);Object.keys(ni).forEach(e=>{bu[ni[e]]=e});const Xh={type:"error",data:"parser error"},c1=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",u1=typeof ArrayBuffer=="function",d1=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Dm=({type:e,data:t},r,a)=>c1&&t instanceof Blob?r?a(t):jx(t,a):u1&&(t instanceof ArrayBuffer||d1(t))?r?a(t):jx(new Blob([t]),a):a(ni[e]+(t||"")),jx=(e,t)=>{const r=new FileReader;return r.onload=function(){const a=r.result.split(",")[1];t("b"+(a||""))},r.readAsDataURL(e)};function Dx(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let gh;function Pz(e,t){if(c1&&e.data instanceof Blob)return e.data.arrayBuffer().then(Dx).then(t);if(u1&&(e.data instanceof ArrayBuffer||d1(e.data)))return t(Dx(e.data));Dm(e,!1,r=>{gh||(gh=new TextEncoder),t(gh.encode(r))})}const Lx="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",io=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<Lx.length;e++)io[Lx.charCodeAt(e)]=e;const Hz=e=>{let t=e.length*.75,r=e.length,a,l=0,o,c,f,h;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const m=new ArrayBuffer(t),g=new Uint8Array(m);for(a=0;a<r;a+=4)o=io[e.charCodeAt(a)],c=io[e.charCodeAt(a+1)],f=io[e.charCodeAt(a+2)],h=io[e.charCodeAt(a+3)],g[l++]=o<<2|c>>4,g[l++]=(c&15)<<4|f>>2,g[l++]=(f&3)<<6|h&63;return m},qz=typeof ArrayBuffer=="function",Lm=(e,t)=>{if(typeof e!="string")return{type:"message",data:f1(e,t)};const r=e.charAt(0);return r==="b"?{type:"message",data:$z(e.substring(1),t)}:bu[r]?e.length>1?{type:bu[r],data:e.substring(1)}:{type:bu[r]}:Xh},$z=(e,t)=>{if(qz){const r=Hz(e);return f1(r,t)}else return{base64:!0,data:e}},f1=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},h1="",Gz=(e,t)=>{const r=e.length,a=new Array(r);let l=0;e.forEach((o,c)=>{Dm(o,!1,f=>{a[c]=f,++l===r&&t(a.join(h1))})})},Kz=(e,t)=>{const r=e.split(h1),a=[];for(let l=0;l<r.length;l++){const o=Lm(r[l],t);if(a.push(o),o.type==="error")break}return a};function Vz(){return new TransformStream({transform(e,t){Pz(e,r=>{const a=r.length;let l;if(a<126)l=new Uint8Array(1),new DataView(l.buffer).setUint8(0,a);else if(a<65536){l=new Uint8Array(3);const o=new DataView(l.buffer);o.setUint8(0,126),o.setUint16(1,a)}else{l=new Uint8Array(9);const o=new DataView(l.buffer);o.setUint8(0,127),o.setBigUint64(1,BigInt(a))}e.data&&typeof e.data!="string"&&(l[0]|=128),t.enqueue(l),t.enqueue(r)})}})}let bh;function Jc(e){return e.reduce((t,r)=>t+r.length,0)}function eu(e,t){if(e[0].length===t)return e.shift();const r=new Uint8Array(t);let a=0;for(let l=0;l<t;l++)r[l]=e[0][a++],a===e[0].length&&(e.shift(),a=0);return e.length&&a<e[0].length&&(e[0]=e[0].slice(a)),r}function Yz(e,t){bh||(bh=new TextDecoder);const r=[];let a=0,l=-1,o=!1;return new TransformStream({transform(c,f){for(r.push(c);;){if(a===0){if(Jc(r)<1)break;const h=eu(r,1);o=(h[0]&128)===128,l=h[0]&127,l<126?a=3:l===126?a=1:a=2}else if(a===1){if(Jc(r)<2)break;const h=eu(r,2);l=new DataView(h.buffer,h.byteOffset,h.length).getUint16(0),a=3}else if(a===2){if(Jc(r)<8)break;const h=eu(r,8),m=new DataView(h.buffer,h.byteOffset,h.length),g=m.getUint32(0);if(g>Math.pow(2,21)-1){f.enqueue(Xh);break}l=g*Math.pow(2,32)+m.getUint32(4),a=3}else{if(Jc(r)<l)break;const h=eu(r,l);f.enqueue(Lm(o?h:bh.decode(h),t)),a=0}if(l===0||l>e){f.enqueue(Xh);break}}}})}const m1=4;function kn(e){if(e)return Qz(e)}function Qz(e){for(var t in kn.prototype)e[t]=kn.prototype[t];return e}kn.prototype.on=kn.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};kn.prototype.once=function(e,t){function r(){this.off(e,r),t.apply(this,arguments)}return r.fn=t,this.on(e,r),this};kn.prototype.off=kn.prototype.removeListener=kn.prototype.removeAllListeners=kn.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var r=this._callbacks["$"+e];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var a,l=0;l<r.length;l++)if(a=r[l],a===t||a.fn===t){r.splice(l,1);break}return r.length===0&&delete this._callbacks["$"+e],this};kn.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),r=this._callbacks["$"+e],a=1;a<arguments.length;a++)t[a-1]=arguments[a];if(r){r=r.slice(0);for(var a=0,l=r.length;a<l;++a)r[a].apply(this,t)}return this};kn.prototype.emitReserved=kn.prototype.emit;kn.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};kn.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Gu=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,r)=>r(t,0),Rr=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),Xz="arraybuffer";function p1(e,...t){return t.reduce((r,a)=>(e.hasOwnProperty(a)&&(r[a]=e[a]),r),{})}const Zz=Rr.setTimeout,Wz=Rr.clearTimeout;function Ku(e,t){t.useNativeTimers?(e.setTimeoutFn=Zz.bind(Rr),e.clearTimeoutFn=Wz.bind(Rr)):(e.setTimeoutFn=Rr.setTimeout.bind(Rr),e.clearTimeoutFn=Rr.clearTimeout.bind(Rr))}const Jz=1.33;function eC(e){return typeof e=="string"?tC(e):Math.ceil((e.byteLength||e.size)*Jz)}function tC(e){let t=0,r=0;for(let a=0,l=e.length;a<l;a++)t=e.charCodeAt(a),t<128?r+=1:t<2048?r+=2:t<55296||t>=57344?r+=3:(a++,r+=4);return r}function g1(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function nC(e){let t="";for(let r in e)e.hasOwnProperty(r)&&(t.length&&(t+="&"),t+=encodeURIComponent(r)+"="+encodeURIComponent(e[r]));return t}function rC(e){let t={},r=e.split("&");for(let a=0,l=r.length;a<l;a++){let o=r[a].split("=");t[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return t}class iC extends Error{constructor(t,r,a){super(t),this.description=r,this.context=a,this.type="TransportError"}}class Im extends kn{constructor(t){super(),this.writable=!1,Ku(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,r,a){return super.emitReserved("error",new iC(t,r,a)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const r=Lm(t,this.socket.binaryType);this.onPacket(r)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,r={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(r)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const r=nC(t);return r.length?"?"+r:""}}class aC extends Im{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const r=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let a=0;this._polling&&(a++,this.once("pollComplete",function(){--a||r()})),this.writable||(a++,this.once("drain",function(){--a||r()}))}else r()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const r=a=>{if(this.readyState==="opening"&&a.type==="open"&&this.onOpen(),a.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(a)};Kz(t,this.socket.binaryType).forEach(r),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,Gz(t,r=>{this.doWrite(r,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",r=this.query||{};return this.opts.timestampRequests!==!1&&(r[this.opts.timestampParam]=g1()),!this.supportsBinary&&!r.sid&&(r.b64=1),this.createUri(t,r)}}let b1=!1;try{b1=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const sC=b1;function lC(){}class oC extends aC{constructor(t){if(super(t),typeof location<"u"){const r=location.protocol==="https:";let a=location.port;a||(a=r?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||a!==t.port}}doWrite(t,r){const a=this.request({method:"POST",data:t});a.on("success",r),a.on("error",(l,o)=>{this.onError("xhr post error",l,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(r,a)=>{this.onError("xhr poll error",r,a)}),this.pollXhr=t}}let Hs=class xu extends kn{constructor(t,r,a){super(),this.createRequest=t,Ku(this,a),this._opts=a,this._method=a.method||"GET",this._uri=r,this._data=a.data!==void 0?a.data:null,this._create()}_create(){var t;const r=p1(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this._opts.xd;const a=this._xhr=this.createRequest(r);try{a.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){a.setDisableHeaderCheck&&a.setDisableHeaderCheck(!0);for(let l in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(l)&&a.setRequestHeader(l,this._opts.extraHeaders[l])}}catch{}if(this._method==="POST")try{a.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{a.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(a),"withCredentials"in a&&(a.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(a.timeout=this._opts.requestTimeout),a.onreadystatechange=()=>{var l;a.readyState===3&&((l=this._opts.cookieJar)===null||l===void 0||l.parseCookies(a.getResponseHeader("set-cookie"))),a.readyState===4&&(a.status===200||a.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof a.status=="number"?a.status:0)},0))},a.send(this._data)}catch(l){this.setTimeoutFn(()=>{this._onError(l)},0);return}typeof document<"u"&&(this._index=xu.requestsCount++,xu.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=lC,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete xu.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}};Hs.requestsCount=0;Hs.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Ix);else if(typeof addEventListener=="function"){const e="onpagehide"in Rr?"pagehide":"unload";addEventListener(e,Ix,!1)}}function Ix(){for(let e in Hs.requests)Hs.requests.hasOwnProperty(e)&&Hs.requests[e].abort()}const cC=(function(){const e=x1({xdomain:!1});return e&&e.responseType!==null})();class uC extends oC{constructor(t){super(t);const r=t&&t.forceBase64;this.supportsBinary=cC&&!r}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Hs(x1,this.uri(),t)}}function x1(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||sC))return new XMLHttpRequest}catch{}if(!t)try{return new Rr[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const y1=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class dC extends Im{get name(){return"websocket"}doOpen(){const t=this.uri(),r=this.opts.protocols,a=y1?{}:p1(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(a.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,r,a)}catch(l){return this.emitReserved("error",l)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let r=0;r<t.length;r++){const a=t[r],l=r===t.length-1;Dm(a,this.supportsBinary,o=>{try{this.doWrite(a,o)}catch{}l&&Gu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",r=this.query||{};return this.opts.timestampRequests&&(r[this.opts.timestampParam]=g1()),this.supportsBinary||(r.b64=1),this.createUri(t,r)}}const xh=Rr.WebSocket||Rr.MozWebSocket;class fC extends dC{createSocket(t,r,a){return y1?new xh(t,r,a):r?new xh(t,r):new xh(t)}doWrite(t,r){this.ws.send(r)}}class hC extends Im{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const r=Yz(Number.MAX_SAFE_INTEGER,this.socket.binaryType),a=t.readable.pipeThrough(r).getReader(),l=Vz();l.readable.pipeTo(t.writable),this._writer=l.writable.getWriter();const o=()=>{a.read().then(({done:f,value:h})=>{f||(this.onPacket(h),o())}).catch(f=>{})};o();const c={type:"open"};this.query.sid&&(c.data=`{"sid":"${this.query.sid}"}`),this._writer.write(c).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let r=0;r<t.length;r++){const a=t[r],l=r===t.length-1;this._writer.write(a).then(()=>{l&&Gu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const mC={websocket:fC,webtransport:hC,polling:uC},pC=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,gC=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Zh(e){if(e.length>8e3)throw"URI too long";const t=e,r=e.indexOf("["),a=e.indexOf("]");r!=-1&&a!=-1&&(e=e.substring(0,r)+e.substring(r,a).replace(/:/g,";")+e.substring(a,e.length));let l=pC.exec(e||""),o={},c=14;for(;c--;)o[gC[c]]=l[c]||"";return r!=-1&&a!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=bC(o,o.path),o.queryKey=xC(o,o.query),o}function bC(e,t){const r=/\/{2,9}/g,a=t.replace(r,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&a.splice(0,1),t.slice(-1)=="/"&&a.splice(a.length-1,1),a}function xC(e,t){const r={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(a,l,o){l&&(r[l]=o)}),r}const Wh=typeof addEventListener=="function"&&typeof removeEventListener=="function",yu=[];Wh&&addEventListener("offline",()=>{yu.forEach(e=>e())},!1);class ga extends kn{constructor(t,r){if(super(),this.binaryType=Xz,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(r=t,t=null),t){const a=Zh(t);r.hostname=a.host,r.secure=a.protocol==="https"||a.protocol==="wss",r.port=a.port,a.query&&(r.query=a.query)}else r.host&&(r.hostname=Zh(r.host).host);Ku(this,r),this.secure=r.secure!=null?r.secure:typeof location<"u"&&location.protocol==="https:",r.hostname&&!r.port&&(r.port=this.secure?"443":"80"),this.hostname=r.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=r.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},r.transports.forEach(a=>{const l=a.prototype.name;this.transports.push(l),this._transportsByName[l]=a}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},r),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=rC(this.opts.query)),Wh&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},yu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const r=Object.assign({},this.opts.query);r.EIO=m1,r.transport=t,this.id&&(r.sid=this.id);const a=Object.assign({},this.opts,{query:r,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](a)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&ga.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const r=this.createTransport(t);r.open(),this.setTransport(r)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",r=>this._onClose("transport close",r))}onOpen(){this.readyState="open",ga.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const r=new Error("server error");r.code=t.data,this._onError(r);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let r=1;for(let a=0;a<this.writeBuffer.length;a++){const l=this.writeBuffer[a].data;if(l&&(r+=eC(l)),a>0&&r>this._maxPayload)return this.writeBuffer.slice(0,a);r+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,Gu(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,r,a){return this._sendPacket("message",t,r,a),this}send(t,r,a){return this._sendPacket("message",t,r,a),this}_sendPacket(t,r,a,l){if(typeof r=="function"&&(l=r,r=void 0),typeof a=="function"&&(l=a,a=null),this.readyState==="closing"||this.readyState==="closed")return;a=a||{},a.compress=a.compress!==!1;const o={type:t,data:r,options:a};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),l&&this.once("flush",l),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},r=()=>{this.off("upgrade",r),this.off("upgradeError",r),t()},a=()=>{this.once("upgrade",r),this.once("upgradeError",r)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?a():t()}):this.upgrading?a():t()),this}_onError(t){if(ga.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,r){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Wh&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const a=yu.indexOf(this._offlineEventListener);a!==-1&&yu.splice(a,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,r),this.writeBuffer=[],this._prevBufferLen=0}}}ga.protocol=m1;class yC extends ga{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let r=this.createTransport(t),a=!1;ga.priorWebsocketSuccess=!1;const l=()=>{a||(r.send([{type:"ping",data:"probe"}]),r.once("packet",x=>{if(!a)if(x.type==="pong"&&x.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",r),!r)return;ga.priorWebsocketSuccess=r.name==="websocket",this.transport.pause(()=>{a||this.readyState!=="closed"&&(g(),this.setTransport(r),r.send([{type:"upgrade"}]),this.emitReserved("upgrade",r),r=null,this.upgrading=!1,this.flush())})}else{const y=new Error("probe error");y.transport=r.name,this.emitReserved("upgradeError",y)}}))};function o(){a||(a=!0,g(),r.close(),r=null)}const c=x=>{const y=new Error("probe error: "+x);y.transport=r.name,o(),this.emitReserved("upgradeError",y)};function f(){c("transport closed")}function h(){c("socket closed")}function m(x){r&&x.name!==r.name&&o()}const g=()=>{r.removeListener("open",l),r.removeListener("error",c),r.removeListener("close",f),this.off("close",h),this.off("upgrading",m)};r.once("open",l),r.once("error",c),r.once("close",f),this.once("close",h),this.once("upgrading",m),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{a||r.open()},200):r.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const r=[];for(let a=0;a<t.length;a++)~this.transports.indexOf(t[a])&&r.push(t[a]);return r}}let vC=class extends yC{constructor(t,r={}){const a=typeof t=="object"?t:r;(!a.transports||a.transports&&typeof a.transports[0]=="string")&&(a.transports=(a.transports||["polling","websocket","webtransport"]).map(l=>mC[l]).filter(l=>!!l)),super(t,a)}};function kC(e,t="",r){let a=e;r=r||typeof location<"u"&&location,e==null&&(e=r.protocol+"//"+r.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=r.protocol+e:e=r.host+e),/^(https?|wss?):\/\//.test(e)||(typeof r<"u"?e=r.protocol+"//"+e:e="https://"+e),a=Zh(e)),a.port||(/^(http|ws)$/.test(a.protocol)?a.port="80":/^(http|ws)s$/.test(a.protocol)&&(a.port="443")),a.path=a.path||"/";const o=a.host.indexOf(":")!==-1?"["+a.host+"]":a.host;return a.id=a.protocol+"://"+o+":"+a.port+t,a.href=a.protocol+"://"+o+(r&&r.port===a.port?"":":"+a.port),a}const wC=typeof ArrayBuffer=="function",_C=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,v1=Object.prototype.toString,EC=typeof Blob=="function"||typeof Blob<"u"&&v1.call(Blob)==="[object BlobConstructor]",NC=typeof File=="function"||typeof File<"u"&&v1.call(File)==="[object FileConstructor]";function Bm(e){return wC&&(e instanceof ArrayBuffer||_C(e))||EC&&e instanceof Blob||NC&&e instanceof File}function vu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let r=0,a=e.length;r<a;r++)if(vu(e[r]))return!0;return!1}if(Bm(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return vu(e.toJSON(),!0);for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&vu(e[r]))return!0;return!1}function SC(e){const t=[],r=e.data,a=e;return a.data=Jh(r,t),a.attachments=t.length,{packet:a,buffers:t}}function Jh(e,t){if(!e)return e;if(Bm(e)){const r={_placeholder:!0,num:t.length};return t.push(e),r}else if(Array.isArray(e)){const r=new Array(e.length);for(let a=0;a<e.length;a++)r[a]=Jh(e[a],t);return r}else if(typeof e=="object"&&!(e instanceof Date)){const r={};for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&(r[a]=Jh(e[a],t));return r}return e}function zC(e,t){return e.data=em(e.data,t),delete e.attachments,e}function em(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let r=0;r<e.length;r++)e[r]=em(e[r],t);else if(typeof e=="object")for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(e[r]=em(e[r],t));return e}const CC=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var wt;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(wt||(wt={}));class TC{constructor(t){this.replacer=t}encode(t){return(t.type===wt.EVENT||t.type===wt.ACK)&&vu(t)?this.encodeAsBinary({type:t.type===wt.EVENT?wt.BINARY_EVENT:wt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let r=""+t.type;return(t.type===wt.BINARY_EVENT||t.type===wt.BINARY_ACK)&&(r+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(r+=t.nsp+","),t.id!=null&&(r+=t.id),t.data!=null&&(r+=JSON.stringify(t.data,this.replacer)),r}encodeAsBinary(t){const r=SC(t),a=this.encodeAsString(r.packet),l=r.buffers;return l.unshift(a),l}}class Um extends kn{constructor(t){super(),this.reviver=t}add(t){let r;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");r=this.decodeString(t);const a=r.type===wt.BINARY_EVENT;a||r.type===wt.BINARY_ACK?(r.type=a?wt.EVENT:wt.ACK,this.reconstructor=new RC(r),r.attachments===0&&super.emitReserved("decoded",r)):super.emitReserved("decoded",r)}else if(Bm(t)||t.base64)if(this.reconstructor)r=this.reconstructor.takeBinaryData(t),r&&(this.reconstructor=null,super.emitReserved("decoded",r));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let r=0;const a={type:Number(t.charAt(0))};if(wt[a.type]===void 0)throw new Error("unknown packet type "+a.type);if(a.type===wt.BINARY_EVENT||a.type===wt.BINARY_ACK){const o=r+1;for(;t.charAt(++r)!=="-"&&r!=t.length;);const c=t.substring(o,r);if(c!=Number(c)||t.charAt(r)!=="-")throw new Error("Illegal attachments");a.attachments=Number(c)}if(t.charAt(r+1)==="/"){const o=r+1;for(;++r&&!(t.charAt(r)===","||r===t.length););a.nsp=t.substring(o,r)}else a.nsp="/";const l=t.charAt(r+1);if(l!==""&&Number(l)==l){const o=r+1;for(;++r;){const c=t.charAt(r);if(c==null||Number(c)!=c){--r;break}if(r===t.length)break}a.id=Number(t.substring(o,r+1))}if(t.charAt(++r)){const o=this.tryParse(t.substr(r));if(Um.isPayloadValid(a.type,o))a.data=o;else throw new Error("invalid payload")}return a}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,r){switch(t){case wt.CONNECT:return Bx(r);case wt.DISCONNECT:return r===void 0;case wt.CONNECT_ERROR:return typeof r=="string"||Bx(r);case wt.EVENT:case wt.BINARY_EVENT:return Array.isArray(r)&&(typeof r[0]=="number"||typeof r[0]=="string"&&CC.indexOf(r[0])===-1);case wt.ACK:case wt.BINARY_ACK:return Array.isArray(r)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class RC{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const r=zC(this.reconPack,this.buffers);return this.finishedReconstruction(),r}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function Bx(e){return Object.prototype.toString.call(e)==="[object Object]"}const AC=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Um,Encoder:TC,get PacketType(){return wt}},Symbol.toStringTag,{value:"Module"}));function Pr(e,t,r){return e.on(t,r),function(){e.off(t,r)}}const OC=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class k1 extends kn{constructor(t,r,a){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=r,a&&a.auth&&(this.auth=a.auth),this._opts=Object.assign({},a),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[Pr(t,"open",this.onopen.bind(this)),Pr(t,"packet",this.onpacket.bind(this)),Pr(t,"error",this.onerror.bind(this)),Pr(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...r){var a,l,o;if(OC.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(r.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(r),this;const c={type:wt.EVENT,data:r};if(c.options={},c.options.compress=this.flags.compress!==!1,typeof r[r.length-1]=="function"){const g=this.ids++,x=r.pop();this._registerAckCallback(g,x),c.id=g}const f=(l=(a=this.io.engine)===null||a===void 0?void 0:a.transport)===null||l===void 0?void 0:l.writable,h=this.connected&&!(!((o=this.io.engine)===null||o===void 0)&&o._hasPingExpired());return this.flags.volatile&&!f||(h?(this.notifyOutgoingListeners(c),this.packet(c)):this.sendBuffer.push(c)),this.flags={},this}_registerAckCallback(t,r){var a;const l=(a=this.flags.timeout)!==null&&a!==void 0?a:this._opts.ackTimeout;if(l===void 0){this.acks[t]=r;return}const o=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let f=0;f<this.sendBuffer.length;f++)this.sendBuffer[f].id===t&&this.sendBuffer.splice(f,1);r.call(this,new Error("operation has timed out"))},l),c=(...f)=>{this.io.clearTimeoutFn(o),r.apply(this,f)};c.withError=!0,this.acks[t]=c}emitWithAck(t,...r){return new Promise((a,l)=>{const o=(c,f)=>c?l(c):a(f);o.withError=!0,r.push(o),this.emit(t,...r)})}_addToQueue(t){let r;typeof t[t.length-1]=="function"&&(r=t.pop());const a={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((l,...o)=>(this._queue[0],l!==null?a.tryCount>this._opts.retries&&(this._queue.shift(),r&&r(l)):(this._queue.shift(),r&&r(null,...o)),a.pending=!1,this._drainQueue())),this._queue.push(a),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const r=this._queue[0];r.pending&&!t||(r.pending=!0,r.tryCount++,this.flags=r.flags,this.emit.apply(this,r.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:wt.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,r){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,r),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(a=>String(a.id)===t)){const a=this.acks[t];delete this.acks[t],a.withError&&a.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case wt.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case wt.EVENT:case wt.BINARY_EVENT:this.onevent(t);break;case wt.ACK:case wt.BINARY_ACK:this.onack(t);break;case wt.DISCONNECT:this.ondisconnect();break;case wt.CONNECT_ERROR:this.destroy();const a=new Error(t.data.message);a.data=t.data.data,this.emitReserved("connect_error",a);break}}onevent(t){const r=t.data||[];t.id!=null&&r.push(this.ack(t.id)),this.connected?this.emitEvent(r):this.receiveBuffer.push(Object.freeze(r))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const r=this._anyListeners.slice();for(const a of r)a.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const r=this;let a=!1;return function(...l){a||(a=!0,r.packet({type:wt.ACK,id:t,data:l}))}}onack(t){const r=this.acks[t.id];typeof r=="function"&&(delete this.acks[t.id],r.withError&&t.data.unshift(null),r.apply(this,t.data))}onconnect(t,r){this.id=t,this.recovered=r&&this._pid===r,this._pid=r,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:wt.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const r=this._anyListeners;for(let a=0;a<r.length;a++)if(t===r[a])return r.splice(a,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const r=this._anyOutgoingListeners;for(let a=0;a<r.length;a++)if(t===r[a])return r.splice(a,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const r=this._anyOutgoingListeners.slice();for(const a of r)a.apply(this,t.data)}}}function Ks(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Ks.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),r=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-r:e+r}return Math.min(e,this.max)|0};Ks.prototype.reset=function(){this.attempts=0};Ks.prototype.setMin=function(e){this.ms=e};Ks.prototype.setMax=function(e){this.max=e};Ks.prototype.setJitter=function(e){this.jitter=e};class tm extends kn{constructor(t,r){var a;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(r=t,t=void 0),r=r||{},r.path=r.path||"/socket.io",this.opts=r,Ku(this,r),this.reconnection(r.reconnection!==!1),this.reconnectionAttempts(r.reconnectionAttempts||1/0),this.reconnectionDelay(r.reconnectionDelay||1e3),this.reconnectionDelayMax(r.reconnectionDelayMax||5e3),this.randomizationFactor((a=r.randomizationFactor)!==null&&a!==void 0?a:.5),this.backoff=new Ks({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(r.timeout==null?2e4:r.timeout),this._readyState="closed",this.uri=t;const l=r.parser||AC;this.encoder=new l.Encoder,this.decoder=new l.Decoder,this._autoConnect=r.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var r;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(r=this.backoff)===null||r===void 0||r.setMin(t),this)}randomizationFactor(t){var r;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(r=this.backoff)===null||r===void 0||r.setJitter(t),this)}reconnectionDelayMax(t){var r;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(r=this.backoff)===null||r===void 0||r.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new vC(this.uri,this.opts);const r=this.engine,a=this;this._readyState="opening",this.skipReconnect=!1;const l=Pr(r,"open",function(){a.onopen(),t&&t()}),o=f=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",f),t?t(f):this.maybeReconnectOnOpen()},c=Pr(r,"error",o);if(this._timeout!==!1){const f=this._timeout,h=this.setTimeoutFn(()=>{l(),o(new Error("timeout")),r.close()},f);this.opts.autoUnref&&h.unref(),this.subs.push(()=>{this.clearTimeoutFn(h)})}return this.subs.push(l),this.subs.push(c),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Pr(t,"ping",this.onping.bind(this)),Pr(t,"data",this.ondata.bind(this)),Pr(t,"error",this.onerror.bind(this)),Pr(t,"close",this.onclose.bind(this)),Pr(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(r){this.onclose("parse error",r)}}ondecoded(t){Gu(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,r){let a=this.nsps[t];return a?this._autoConnect&&!a.active&&a.connect():(a=new k1(this,t,r),this.nsps[t]=a),a}_destroy(t){const r=Object.keys(this.nsps);for(const a of r)if(this.nsps[a].active)return;this._close()}_packet(t){const r=this.encoder.encode(t);for(let a=0;a<r.length;a++)this.engine.write(r[a],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,r){var a;this.cleanup(),(a=this.engine)===null||a===void 0||a.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,r),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const r=this.backoff.duration();this._reconnecting=!0;const a=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(l=>{l?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",l)):t.onreconnect()}))},r);this.opts.autoUnref&&a.unref(),this.subs.push(()=>{this.clearTimeoutFn(a)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Ql={};function ku(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const r=kC(e,t.path||"/socket.io"),a=r.source,l=r.id,o=r.path,c=Ql[l]&&o in Ql[l].nsps,f=t.forceNew||t["force new connection"]||t.multiplex===!1||c;let h;return f?h=new tm(a,t):(Ql[l]||(Ql[l]=new tm(a,t)),h=Ql[l]),r.query&&!t.query&&(t.query=r.queryKey),h.socket(r.path,t)}Object.assign(ku,{Manager:tm,Socket:k1,io:ku,connect:ku});let ao=null,yh=null;function w1(){return ao||(window.__OCR_TOKEN__?(ao=window.__OCR_TOKEN__,ao):null)}async function _1(){const e=w1();return e||(yh||(yh=fetch("/auth/token").then(t=>{if(!t.ok)throw new Error(`Failed to fetch auth token: ${t.status}`);return t.json()}).then(t=>(ao=t.token,window.__OCR_TOKEN__=t.token,t.token))),yh)}function E1(){const e=w1();return e?{Authorization:`Bearer ${e}`}:{}}const N1=_.createContext(null);function MC({children:e}){const[t,r]=_.useState("connecting"),a=_.useRef(null),l=_.useRef(new Set);_.useEffect(()=>{let h=!1;return _1().then(m=>{if(h)return;const g=ku({autoConnect:!0,reconnection:!0,reconnectionAttempts:1/0,reconnectionDelay:1e3,reconnectionDelayMax:5e3,auth:{token:m}});a.current=g,g.on("connect",()=>{r("connected");for(const x of l.current)g.emit("join:session",x)}),g.on("disconnect",()=>{r("disconnected")}),g.io.on("reconnect_attempt",()=>{r("reconnecting")})}),()=>{h=!0,a.current?.disconnect(),a.current=null}},[]);const o=_.useCallback(h=>{l.current.add(h),a.current?.emit("join:session",h)},[]),c=_.useCallback(h=>{l.current.delete(h),a.current?.emit("leave:session",h)},[]),f=_.useMemo(()=>({socket:a.current,status:t,isConnected:t==="connected",joinRoom:o,leaveRoom:c}),[t,o,c]);return d.jsx(N1,{value:f,children:e})}function si(){const e=_.useContext(N1);if(!e)throw new Error("useSocket must be used within SocketProvider");return e}function ut(e,t){const{socket:r}=si(),a=_.useRef(t);a.current=t,_.useEffect(()=>{if(!r)return;const l=o=>a.current(o);return r.on(e,l),()=>{r.off(e,l)}},[r,e])}var Vs=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},jC={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},DC=class{#e=jC;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},$a=new DC;function LC(e){setTimeout(e,0)}var Ga=typeof window>"u"||"Deno"in globalThis;function Kn(){}function IC(e,t){return typeof e=="function"?e(t):e}function nm(e){return typeof e=="number"&&e>=0&&e!==1/0}function S1(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ba(e,t){return typeof e=="function"?e(t):e}function Tr(e,t){return typeof e=="function"?e(t):e}function Ux(e,t){const{type:r="all",exact:a,fetchStatus:l,predicate:o,queryKey:c,stale:f}=e;if(c){if(a){if(t.queryHash!==Fm(c,t.options))return!1}else if(!bo(t.queryKey,c))return!1}if(r!=="all"){const h=t.isActive();if(r==="active"&&!h||r==="inactive"&&h)return!1}return!(typeof f=="boolean"&&t.isStale()!==f||l&&l!==t.state.fetchStatus||o&&!o(t))}function Fx(e,t){const{exact:r,status:a,predicate:l,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(r){if(Ka(t.options.mutationKey)!==Ka(o))return!1}else if(!bo(t.options.mutationKey,o))return!1}return!(a&&t.state.status!==a||l&&!l(t))}function Fm(e,t){return(t?.queryKeyHashFn||Ka)(e)}function Ka(e){return JSON.stringify(e,(t,r)=>rm(r)?Object.keys(r).sort().reduce((a,l)=>(a[l]=r[l],a),{}):r)}function bo(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>bo(e[r],t[r])):!1}var BC=Object.prototype.hasOwnProperty;function z1(e,t,r=0){if(e===t)return e;if(r>500)return t;const a=Px(e)&&Px(t);if(!a&&!(rm(e)&&rm(t)))return t;const o=(a?e:Object.keys(e)).length,c=a?t:Object.keys(t),f=c.length,h=a?new Array(f):{};let m=0;for(let g=0;g<f;g++){const x=a?g:c[g],y=e[x],v=t[x];if(y===v){h[x]=y,(a?g<o:BC.call(e,x))&&m++;continue}if(y===null||v===null||typeof y!="object"||typeof v!="object"){h[x]=v;continue}const k=z1(y,v,r+1);h[x]=k,k===y&&m++}return o===f&&m===o?e:h}function zu(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function Px(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function rm(e){if(!Hx(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!Hx(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Hx(e){return Object.prototype.toString.call(e)==="[object Object]"}function UC(e){return new Promise(t=>{$a.setTimeout(t,e)})}function im(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?z1(e,t):t}function FC(e,t,r=0){const a=[...e,t];return r&&a.length>r?a.slice(1):a}function PC(e,t,r=0){const a=[t,...e];return r&&a.length>r?a.slice(0,-1):a}var Pm=Symbol();function C1(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Pm?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Hm(e,t){return typeof e=="function"?e(...t):!!e}function HC(e,t,r){let a=!1,l;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(l??=t(),a||(a=!0,l.aborted?r():l.addEventListener("abort",r,{once:!0})),l)}),e}var qC=class extends Vs{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!Ga&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},qm=new qC;function am(){let e,t;const r=new Promise((l,o)=>{e=l,t=o});r.status="pending",r.catch(()=>{});function a(l){Object.assign(r,l),delete r.resolve,delete r.reject}return r.resolve=l=>{a({status:"fulfilled",value:l}),e(l)},r.reject=l=>{a({status:"rejected",reason:l}),t(l)},r}var $C=LC;function GC(){let e=[],t=0,r=f=>{f()},a=f=>{f()},l=$C;const o=f=>{t?e.push(f):l(()=>{r(f)})},c=()=>{const f=e;e=[],f.length&&l(()=>{a(()=>{f.forEach(h=>{r(h)})})})};return{batch:f=>{let h;t++;try{h=f()}finally{t--,t||c()}return h},batchCalls:f=>(...h)=>{o(()=>{f(...h)})},schedule:o,setNotifyFunction:f=>{r=f},setBatchNotifyFunction:f=>{a=f},setScheduler:f=>{l=f}}}var Sn=GC(),KC=class extends Vs{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!Ga&&window.addEventListener){const t=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(r=>{r(e)}))}isOnline(){return this.#e}},Cu=new KC;function VC(e){return Math.min(1e3*2**e,3e4)}function T1(e){return(e??"online")==="online"?Cu.isOnline():!0}var sm=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function R1(e){let t=!1,r=0,a;const l=am(),o=()=>l.status!=="pending",c=E=>{if(!o()){const S=new sm(E);y(S),e.onCancel?.(S)}},f=()=>{t=!0},h=()=>{t=!1},m=()=>qm.isFocused()&&(e.networkMode==="always"||Cu.isOnline())&&e.canRun(),g=()=>T1(e.networkMode)&&e.canRun(),x=E=>{o()||(a?.(),l.resolve(E))},y=E=>{o()||(a?.(),l.reject(E))},v=()=>new Promise(E=>{a=S=>{(o()||m())&&E(S)},e.onPause?.()}).then(()=>{a=void 0,o()||e.onContinue?.()}),k=()=>{if(o())return;let E;const S=r===0?e.initialPromise:void 0;try{E=S??e.fn()}catch(N){E=Promise.reject(N)}Promise.resolve(E).then(x).catch(N=>{if(o())return;const O=e.retry??(Ga?0:3),T=e.retryDelay??VC,P=typeof T=="function"?T(r,N):T,$=O===!0||typeof O=="number"&&r<O||typeof O=="function"&&O(r,N);if(t||!$){y(N);return}r++,e.onFail?.(r,N),UC(P).then(()=>m()?void 0:v()).then(()=>{t?y(N):k()})})};return{promise:l,status:()=>l.status,cancel:c,continue:()=>(a?.(),l),cancelRetry:f,continueRetry:h,canStart:g,start:()=>(g()?k():v().then(k),l)}}var A1=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),nm(this.gcTime)&&(this.#e=$a.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ga?1/0:300*1e3))}clearGcTimeout(){this.#e&&($a.clearTimeout(this.#e),this.#e=void 0)}},YC=class extends A1{#e;#t;#n;#i;#r;#s;#l;constructor(e){super(),this.#l=!1,this.#s=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#n=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=$x(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#s,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=$x(this.options);t.data!==void 0&&(this.setState(qx(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const r=im(this.state.data,e,this.options);return this.#a({data:r,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),r}setState(e,t){this.#a({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(Kn).catch(Kn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>Tr(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Pm||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>ba(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!S1(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#r&&(this.#l?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#a({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const f=this.observers.find(h=>h.options.queryFn);f&&this.setOptions(f.options)}const r=new AbortController,a=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(this.#l=!0,r.signal)})},l=()=>{const f=C1(this.options,t),m=(()=>{const g={client:this.#i,queryKey:this.queryKey,meta:this.meta};return a(g),g})();return this.#l=!1,this.options.persister?this.options.persister(f,m,this):f(m)},c=(()=>{const f={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:l};return a(f),f})();this.options.behavior?.onFetch(c,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==c.fetchOptions?.meta)&&this.#a({type:"fetch",meta:c.fetchOptions?.meta}),this.#r=R1({initialPromise:t?.initialPromise,fn:c.fetchFn,onCancel:f=>{f instanceof sm&&f.revert&&this.setState({...this.#t,fetchStatus:"idle"}),r.abort()},onFail:(f,h)=>{this.#a({type:"failed",failureCount:f,error:h})},onPause:()=>{this.#a({type:"pause"})},onContinue:()=>{this.#a({type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0});try{const f=await this.#r.start();if(f===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(f),this.#n.config.onSuccess?.(f,this),this.#n.config.onSettled?.(f,this.state.error,this),f}catch(f){if(f instanceof sm){if(f.silent)return this.#r.promise;if(f.revert){if(this.state.data===void 0)throw f;return this.state.data}}throw this.#a({type:"error",error:f}),this.#n.config.onError?.(f,this),this.#n.config.onSettled?.(this.state.data,f,this),f}finally{this.scheduleGc()}}#a(e){const t=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...O1(r.data,this.options),fetchMeta:e.meta??null};case"success":const a={...r,...qx(e.data,e.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?a:void 0,a;case"error":const l=e.error;return{...r,error:l,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:l,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=t(this.state),Sn.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function O1(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:T1(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function qx(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function $x(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,a=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?a??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var QC=class extends Vs{constructor(e,t){super(),this.options=t,this.#e=e,this.#a=null,this.#l=am(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#i=void 0;#r;#s;#l;#a;#p;#f;#h;#c;#u;#o;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Gx(this.#t,this.options)?this.#d():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return lm(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return lm(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#v(),this.#k(),this.#t.removeObserver(this)}setOptions(e){const t=this.options,r=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Tr(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#w(),this.#t.setOptions(this.options),t._defaulted&&!zu(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const a=this.hasListeners();a&&Kx(this.#t,r,this.options,t)&&this.#d(),this.updateResult(),a&&(this.#t!==r||Tr(this.options.enabled,this.#t)!==Tr(t.enabled,this.#t)||ba(this.options.staleTime,this.#t)!==ba(t.staleTime,this.#t))&&this.#g();const l=this.#b();a&&(this.#t!==r||Tr(this.options.enabled,this.#t)!==Tr(t.enabled,this.#t)||l!==this.#o)&&this.#x(l)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),r=this.createResult(t,e);return ZC(this,r)&&(this.#i=r,this.#s=this.options,this.#r=this.#t.state),r}getCurrentResult(){return this.#i}trackResult(e,t){return new Proxy(e,{get:(r,a)=>(this.trackProp(a),t?.(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#l.status==="pending"&&this.#l.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,a))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),r=this.#e.getQueryCache().build(this.#e,t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return this.#d({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#i))}#d(e){this.#w();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Kn)),t}#g(){this.#v();const e=ba(this.options.staleTime,this.#t);if(Ga||this.#i.isStale||!nm(e))return;const r=S1(this.#i.dataUpdatedAt,e)+1;this.#c=$a.setTimeout(()=>{this.#i.isStale||this.updateResult()},r)}#b(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#x(e){this.#k(),this.#o=e,!(Ga||Tr(this.options.enabled,this.#t)===!1||!nm(this.#o)||this.#o===0)&&(this.#u=$a.setInterval(()=>{(this.options.refetchIntervalInBackground||qm.isFocused())&&this.#d()},this.#o))}#y(){this.#g(),this.#x(this.#b())}#v(){this.#c&&($a.clearTimeout(this.#c),this.#c=void 0)}#k(){this.#u&&($a.clearInterval(this.#u),this.#u=void 0)}createResult(e,t){const r=this.#t,a=this.options,l=this.#i,o=this.#r,c=this.#s,h=e!==r?e.state:this.#n,{state:m}=e;let g={...m},x=!1,y;if(t._optimisticResults){const A=this.hasListeners(),ie=!A&&Gx(e,t),F=A&&Kx(e,r,t,a);(ie||F)&&(g={...g,...O1(m.data,e.options)}),t._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:v,errorUpdatedAt:k,status:E}=g;y=g.data;let S=!1;if(t.placeholderData!==void 0&&y===void 0&&E==="pending"){let A;l?.isPlaceholderData&&t.placeholderData===c?.placeholderData?(A=l.data,S=!0):A=typeof t.placeholderData=="function"?t.placeholderData(this.#h?.state.data,this.#h):t.placeholderData,A!==void 0&&(E="success",y=im(l?.data,A,t),x=!0)}if(t.select&&y!==void 0&&!S)if(l&&y===o?.data&&t.select===this.#p)y=this.#f;else try{this.#p=t.select,y=t.select(y),y=im(l?.data,y,t),this.#f=y,this.#a=null}catch(A){this.#a=A}this.#a&&(v=this.#a,y=this.#f,k=Date.now(),E="error");const N=g.fetchStatus==="fetching",O=E==="pending",T=E==="error",P=O&&N,$=y!==void 0,G={status:E,fetchStatus:g.fetchStatus,isPending:O,isSuccess:E==="success",isError:T,isInitialLoading:P,isLoading:P,data:y,dataUpdatedAt:g.dataUpdatedAt,error:v,errorUpdatedAt:k,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:g.dataUpdateCount>0||g.errorUpdateCount>0,isFetchedAfterMount:g.dataUpdateCount>h.dataUpdateCount||g.errorUpdateCount>h.errorUpdateCount,isFetching:N,isRefetching:N&&!O,isLoadingError:T&&!$,isPaused:g.fetchStatus==="paused",isPlaceholderData:x,isRefetchError:T&&$,isStale:$m(e,t),refetch:this.refetch,promise:this.#l,isEnabled:Tr(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const A=G.data!==void 0,ie=G.status==="error"&&!A,F=we=>{ie?we.reject(G.error):A&&we.resolve(G.data)},ee=()=>{const we=this.#l=G.promise=am();F(we)},te=this.#l;switch(te.status){case"pending":e.queryHash===r.queryHash&&F(te);break;case"fulfilled":(ie||G.data!==te.value)&&ee();break;case"rejected":(!ie||G.error!==te.reason)&&ee();break}}return G}updateResult(){const e=this.#i,t=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#s=this.options,this.#r.data!==void 0&&(this.#h=this.#t),zu(t,e))return;this.#i=t;const r=()=>{if(!e)return!0;const{notifyOnChangeProps:a}=this.options,l=typeof a=="function"?a():a;if(l==="all"||!l&&!this.#m.size)return!0;const o=new Set(l??this.#m);return this.options.throwOnError&&o.add("error"),Object.keys(this.#i).some(c=>{const f=c;return this.#i[f]!==e[f]&&o.has(f)})};this.#_({listeners:r()})}#w(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#_(e){Sn.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#i)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function XC(e,t){return Tr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Gx(e,t){return XC(e,t)||e.state.data!==void 0&&lm(e,t,t.refetchOnMount)}function lm(e,t,r){if(Tr(t.enabled,e)!==!1&&ba(t.staleTime,e)!=="static"){const a=typeof r=="function"?r(e):r;return a==="always"||a!==!1&&$m(e,t)}return!1}function Kx(e,t,r,a){return(e!==t||Tr(a.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&$m(e,r)}function $m(e,t){return Tr(t.enabled,e)!==!1&&e.isStaleByTime(ba(t.staleTime,e))}function ZC(e,t){return!zu(e.getCurrentResult(),t)}function Vx(e){return{onFetch:(t,r)=>{const a=t.options,l=t.fetchOptions?.meta?.fetchMore?.direction,o=t.state.data?.pages||[],c=t.state.data?.pageParams||[];let f={pages:[],pageParams:[]},h=0;const m=async()=>{let g=!1;const x=k=>{HC(k,()=>t.signal,()=>g=!0)},y=C1(t.options,t.fetchOptions),v=async(k,E,S)=>{if(g)return Promise.reject();if(E==null&&k.pages.length)return Promise.resolve(k);const O=(()=>{const j={client:t.client,queryKey:t.queryKey,pageParam:E,direction:S?"backward":"forward",meta:t.options.meta};return x(j),j})(),T=await y(O),{maxPages:P}=t.options,$=S?PC:FC;return{pages:$(k.pages,T,P),pageParams:$(k.pageParams,E,P)}};if(l&&o.length){const k=l==="backward",E=k?WC:Yx,S={pages:o,pageParams:c},N=E(a,S);f=await v(S,N,k)}else{const k=e??o.length;do{const E=h===0?c[0]??a.initialPageParam:Yx(a,f);if(h>0&&E==null)break;f=await v(f,E),h++}while(h<k)}return f};t.options.persister?t.fetchFn=()=>t.options.persister?.(m,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r):t.fetchFn=m}}}function Yx(e,{pages:t,pageParams:r}){const a=t.length-1;return t.length>0?e.getNextPageParam(t[a],t,r[a],r):void 0}function WC(e,{pages:t,pageParams:r}){return t.length>0?e.getPreviousPageParam?.(t[0],t,r[0],r):void 0}var JC=class extends A1{#e;#t;#n;#i;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||M1(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#i?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#r({type:"continue"})},r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#i=R1({fn:()=>this.options.mutationFn?this.options.mutationFn(e,r):Promise.reject(new Error("No mutationFn found")),onFail:(o,c)=>{this.#r({type:"failed",failureCount:o,error:c})},onPause:()=>{this.#r({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const a=this.state.status==="pending",l=!this.#i.canStart();try{if(a)t();else{this.#r({type:"pending",variables:e,isPaused:l}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,r);const c=await this.options.onMutate?.(e,r);c!==this.state.context&&this.#r({type:"pending",context:c,variables:e,isPaused:l})}const o=await this.#i.start();return await this.#n.config.onSuccess?.(o,e,this.state.context,this,r),await this.options.onSuccess?.(o,e,this.state.context,r),await this.#n.config.onSettled?.(o,null,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(o,null,e,this.state.context,r),this.#r({type:"success",data:o}),o}catch(o){try{await this.#n.config.onError?.(o,e,this.state.context,this,r)}catch(c){Promise.reject(c)}try{await this.options.onError?.(o,e,this.state.context,r)}catch(c){Promise.reject(c)}try{await this.#n.config.onSettled?.(void 0,o,this.state.variables,this.state.context,this,r)}catch(c){Promise.reject(c)}try{await this.options.onSettled?.(void 0,o,e,this.state.context,r)}catch(c){Promise.reject(c)}throw this.#r({type:"error",error:o}),o}finally{this.#n.runNext(this)}}#r(e){const t=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Sn.batch(()=>{this.#t.forEach(r=>{r.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function M1(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var e2=class extends Vs{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,r){const a=new JC({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:r});return this.add(a),a}add(e){this.#e.add(e);const t=tu(e);if(typeof t=="string"){const r=this.#t.get(t);r?r.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=tu(e);if(typeof t=="string"){const r=this.#t.get(t);if(r)if(r.length>1){const a=r.indexOf(e);a!==-1&&r.splice(a,1)}else r[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=tu(e);if(typeof t=="string"){const a=this.#t.get(t)?.find(l=>l.state.status==="pending");return!a||a===e}else return!0}runNext(e){const t=tu(e);return typeof t=="string"?this.#t.get(t)?.find(a=>a!==e&&a.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Sn.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(r=>Fx(t,r))}findAll(e={}){return this.getAll().filter(t=>Fx(e,t))}notify(e){Sn.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Sn.batch(()=>Promise.all(e.map(t=>t.continue().catch(Kn))))}};function tu(e){return e.options.scope?.id}var t2=class extends Vs{#e;#t=void 0;#n;#i;constructor(t,r){super(),this.#e=t,this.setOptions(r),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const r=this.options;this.options=this.#e.defaultMutationOptions(t),zu(this.options,r)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),r?.mutationKey&&this.options.mutationKey&&Ka(r.mutationKey)!==Ka(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(t){this.#r(),this.#s(t)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#r(),this.#s()}mutate(t,r){return this.#i=r,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(t)}#r(){const t=this.#n?.state??M1();this.#t={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#s(t){Sn.batch(()=>{if(this.#i&&this.hasListeners()){const r=this.#t.variables,a=this.#t.context,l={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#i.onSuccess?.(t.data,r,a,l)}catch(o){Promise.reject(o)}try{this.#i.onSettled?.(t.data,null,r,a,l)}catch(o){Promise.reject(o)}}else if(t?.type==="error"){try{this.#i.onError?.(t.error,r,a,l)}catch(o){Promise.reject(o)}try{this.#i.onSettled?.(void 0,t.error,r,a,l)}catch(o){Promise.reject(o)}}}this.listeners.forEach(r=>{r(this.#t)})})}},n2=class extends Vs{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,r){const a=t.queryKey,l=t.queryHash??Fm(a,t);let o=this.get(l);return o||(o=new YC({client:e,queryKey:a,queryHash:l,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(a)}),this.add(o)),o}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Sn.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(r=>Ux(t,r))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(r=>Ux(e,r)):t}notify(e){Sn.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Sn.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Sn.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},r2=class{#e;#t;#n;#i;#r;#s;#l;#a;constructor(e={}){this.#e=e.queryCache||new n2,this.#t=e.mutationCache||new e2,this.#n=e.defaultOptions||{},this.#i=new Map,this.#r=new Map,this.#s=0}mount(){this.#s++,this.#s===1&&(this.#l=qm.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#a=Cu.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#s--,this.#s===0&&(this.#l?.(),this.#l=void 0,this.#a?.(),this.#a=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=this.#e.build(this,t),a=r.state.data;return a===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(ba(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(a))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:r})=>{const a=r.data;return[t,a]})}setQueryData(e,t,r){const a=this.defaultQueryOptions({queryKey:e}),o=this.#e.get(a.queryHash)?.state.data,c=IC(t,o);if(c!==void 0)return this.#e.build(this,a).setData(c,{...r,manual:!0})}setQueriesData(e,t,r){return Sn.batch(()=>this.#e.findAll(e).map(({queryKey:a})=>[a,this.setQueryData(a,t,r)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;Sn.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=this.#e;return Sn.batch(()=>(r.findAll(e).forEach(a=>{a.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},a=Sn.batch(()=>this.#e.findAll(e).map(l=>l.cancel(r)));return Promise.all(a).then(Kn).catch(Kn)}invalidateQueries(e,t={}){return Sn.batch(()=>(this.#e.findAll(e).forEach(r=>{r.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},a=Sn.batch(()=>this.#e.findAll(e).filter(l=>!l.isDisabled()&&!l.isStatic()).map(l=>{let o=l.fetch(void 0,r);return r.throwOnError||(o=o.catch(Kn)),l.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(a).then(Kn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=this.#e.build(this,t);return r.isStaleByTime(ba(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Kn).catch(Kn)}fetchInfiniteQuery(e){return e.behavior=Vx(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Kn).catch(Kn)}ensureInfiniteQueryData(e){return e.behavior=Vx(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Cu.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#i.set(Ka(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#i.values()],r={};return t.forEach(a=>{bo(e,a.queryKey)&&Object.assign(r,a.defaultOptions)}),r}setMutationDefaults(e,t){this.#r.set(Ka(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],r={};return t.forEach(a=>{bo(e,a.mutationKey)&&Object.assign(r,a.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Fm(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Pm&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},j1=_.createContext(void 0),An=e=>{const t=_.useContext(j1);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},i2=({client:e,children:t})=>(_.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),d.jsx(j1.Provider,{value:e,children:t})),D1=_.createContext(!1),a2=()=>_.useContext(D1);D1.Provider;function s2(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var l2=_.createContext(s2()),o2=()=>_.useContext(l2),c2=(e,t,r)=>{const a=r?.state.error&&typeof e.throwOnError=="function"?Hm(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||a)&&(t.isReset()||(e.retryOnMount=!1))},u2=e=>{_.useEffect(()=>{e.clearReset()},[e])},d2=({result:e,errorResetBoundary:t,throwOnError:r,query:a,suspense:l})=>e.isError&&!t.isReset()&&!e.isFetching&&a&&(l&&e.data===void 0||Hm(r,[e.error,a])),f2=e=>{if(e.suspense){const r=l=>l==="static"?l:Math.max(l??1e3,1e3),a=e.staleTime;e.staleTime=typeof a=="function"?(...l)=>r(a(...l)):r(a),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},h2=(e,t)=>e.isLoading&&e.isFetching&&!t,m2=(e,t)=>e?.suspense&&t.isPending,Qx=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function p2(e,t,r){const a=a2(),l=o2(),o=An(),c=o.defaultQueryOptions(e);o.getDefaultOptions().queries?._experimental_beforeQuery?.(c);const f=o.getQueryCache().get(c.queryHash);c._optimisticResults=a?"isRestoring":"optimistic",f2(c),c2(c,l,f),u2(l);const h=!o.getQueryCache().get(c.queryHash),[m]=_.useState(()=>new t(o,c)),g=m.getOptimisticResult(c),x=!a&&e.subscribed!==!1;if(_.useSyncExternalStore(_.useCallback(y=>{const v=x?m.subscribe(Sn.batchCalls(y)):Kn;return m.updateResult(),v},[m,x]),()=>m.getCurrentResult(),()=>m.getCurrentResult()),_.useEffect(()=>{m.setOptions(c)},[c,m]),m2(c,g))throw Qx(c,m,l);if(d2({result:g,errorResetBoundary:l,throwOnError:c.throwOnError,query:f,suspense:c.suspense}))throw g.error;return o.getDefaultOptions().queries?._experimental_afterQuery?.(c,g),c.experimental_prefetchInRender&&!Ga&&h2(g,a)&&(h?Qx(c,m,l):f?.promise)?.catch(Kn).finally(()=>{m.updateResult()}),c.notifyOnChangeProps?g:m.trackResult(g)}function nn(e,t){return p2(e,QC)}function Ro(e,t){const r=An(),[a]=_.useState(()=>new t2(r,e));_.useEffect(()=>{a.setOptions(e)},[a,e]);const l=_.useSyncExternalStore(_.useCallback(c=>a.subscribe(Sn.batchCalls(c)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),o=_.useCallback((c,f)=>{a.mutate(c,f).catch(Kn)},[a]);if(l.error&&Hm(a.options.throwOnError,[l.error]))throw l.error;return{...l,mutate:o,mutateAsync:l.mutate}}function g2({children:e}){const[t]=_.useState(()=>new r2({defaultOptions:{queries:{staleTime:3e4,retry:1,refetchOnWindowFocus:!1}}}));return d.jsx(i2,{client:t,children:e})}function L1(e){var t,r,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var l=e.length;for(t=0;t<l;t++)e[t]&&(r=L1(e[t]))&&(a&&(a+=" "),a+=r)}else for(r in e)e[r]&&(a&&(a+=" "),a+=r);return a}function b2(){for(var e,t,r=0,a="",l=arguments.length;r<l;r++)(e=arguments[r])&&(t=L1(e))&&(a&&(a+=" "),a+=t);return a}const x2=(e,t)=>{const r=new Array(e.length+t.length);for(let a=0;a<e.length;a++)r[a]=e[a];for(let a=0;a<t.length;a++)r[e.length+a]=t[a];return r},y2=(e,t)=>({classGroupId:e,validator:t}),I1=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),Tu="-",Xx=[],v2="arbitrary..",k2=e=>{const t=_2(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:c=>{if(c.startsWith("[")&&c.endsWith("]"))return w2(c);const f=c.split(Tu),h=f[0]===""&&f.length>1?1:0;return B1(f,h,t)},getConflictingClassGroupIds:(c,f)=>{if(f){const h=a[c],m=r[c];return h?m?x2(m,h):h:m||Xx}return r[c]||Xx}}},B1=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const l=e[t],o=r.nextPart.get(l);if(o){const m=B1(e,t+1,o);if(m)return m}const c=r.validators;if(c===null)return;const f=t===0?e.join(Tu):e.slice(t).join(Tu),h=c.length;for(let m=0;m<h;m++){const g=c[m];if(g.validator(f))return g.classGroupId}},w2=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),a=t.slice(0,r);return a?v2+a:void 0})(),_2=e=>{const{theme:t,classGroups:r}=e;return E2(r,t)},E2=(e,t)=>{const r=I1();for(const a in e){const l=e[a];Gm(l,r,a,t)}return r},Gm=(e,t,r,a)=>{const l=e.length;for(let o=0;o<l;o++){const c=e[o];N2(c,t,r,a)}},N2=(e,t,r,a)=>{if(typeof e=="string"){S2(e,t,r);return}if(typeof e=="function"){z2(e,t,r,a);return}C2(e,t,r,a)},S2=(e,t,r)=>{const a=e===""?t:U1(t,e);a.classGroupId=r},z2=(e,t,r,a)=>{if(T2(e)){Gm(e(a),t,r,a);return}t.validators===null&&(t.validators=[]),t.validators.push(y2(r,e))},C2=(e,t,r,a)=>{const l=Object.entries(e),o=l.length;for(let c=0;c<o;c++){const[f,h]=l[c];Gm(h,U1(t,f),r,a)}},U1=(e,t)=>{let r=e;const a=t.split(Tu),l=a.length;for(let o=0;o<l;o++){const c=a[o];let f=r.nextPart.get(c);f||(f=I1(),r.nextPart.set(c,f)),r=f}return r},T2=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,R2=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),a=Object.create(null);const l=(o,c)=>{r[o]=c,t++,t>e&&(t=0,a=r,r=Object.create(null))};return{get(o){let c=r[o];if(c!==void 0)return c;if((c=a[o])!==void 0)return l(o,c),c},set(o,c){o in r?r[o]=c:l(o,c)}}},om="!",Zx=":",A2=[],Wx=(e,t,r,a,l)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:a,isExternal:l}),O2=e=>{const{prefix:t,experimentalParseClassName:r}=e;let a=l=>{const o=[];let c=0,f=0,h=0,m;const g=l.length;for(let E=0;E<g;E++){const S=l[E];if(c===0&&f===0){if(S===Zx){o.push(l.slice(h,E)),h=E+1;continue}if(S==="/"){m=E;continue}}S==="["?c++:S==="]"?c--:S==="("?f++:S===")"&&f--}const x=o.length===0?l:l.slice(h);let y=x,v=!1;x.endsWith(om)?(y=x.slice(0,-1),v=!0):x.startsWith(om)&&(y=x.slice(1),v=!0);const k=m&&m>h?m-h:void 0;return Wx(o,v,y,k)};if(t){const l=t+Zx,o=a;a=c=>c.startsWith(l)?o(c.slice(l.length)):Wx(A2,!1,c,void 0,!0)}if(r){const l=a;a=o=>r({className:o,parseClassName:l})}return a},M2=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,a)=>{t.set(r,1e6+a)}),r=>{const a=[];let l=[];for(let o=0;o<r.length;o++){const c=r[o],f=c[0]==="[",h=t.has(c);f||h?(l.length>0&&(l.sort(),a.push(...l),l=[]),a.push(c)):l.push(c)}return l.length>0&&(l.sort(),a.push(...l)),a}},j2=e=>({cache:R2(e.cacheSize),parseClassName:O2(e),sortModifiers:M2(e),...k2(e)}),D2=/\s+/,L2=(e,t)=>{const{parseClassName:r,getClassGroupId:a,getConflictingClassGroupIds:l,sortModifiers:o}=t,c=[],f=e.trim().split(D2);let h="";for(let m=f.length-1;m>=0;m-=1){const g=f[m],{isExternal:x,modifiers:y,hasImportantModifier:v,baseClassName:k,maybePostfixModifierPosition:E}=r(g);if(x){h=g+(h.length>0?" "+h:h);continue}let S=!!E,N=a(S?k.substring(0,E):k);if(!N){if(!S){h=g+(h.length>0?" "+h:h);continue}if(N=a(k),!N){h=g+(h.length>0?" "+h:h);continue}S=!1}const O=y.length===0?"":y.length===1?y[0]:o(y).join(":"),T=v?O+om:O,P=T+N;if(c.indexOf(P)>-1)continue;c.push(P);const $=l(N,S);for(let j=0;j<$.length;++j){const G=$[j];c.push(T+G)}h=g+(h.length>0?" "+h:h)}return h},I2=(...e)=>{let t=0,r,a,l="";for(;t<e.length;)(r=e[t++])&&(a=F1(r))&&(l&&(l+=" "),l+=a);return l},F1=e=>{if(typeof e=="string")return e;let t,r="";for(let a=0;a<e.length;a++)e[a]&&(t=F1(e[a]))&&(r&&(r+=" "),r+=t);return r},B2=(e,...t)=>{let r,a,l,o;const c=h=>{const m=t.reduce((g,x)=>x(g),e());return r=j2(m),a=r.cache.get,l=r.cache.set,o=f,f(h)},f=h=>{const m=a(h);if(m)return m;const g=L2(h,r);return l(h,g),g};return o=c,(...h)=>o(I2(...h))},U2=[],Nn=e=>{const t=r=>r[e]||U2;return t.isThemeGetter=!0,t},P1=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,H1=/^\((?:(\w[\w-]*):)?(.+)\)$/i,F2=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,P2=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,H2=/\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$/,q2=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,$2=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,G2=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,oa=e=>F2.test(e),ct=e=>!!e&&!Number.isNaN(Number(e)),ca=e=>!!e&&Number.isInteger(Number(e)),vh=e=>e.endsWith("%")&&ct(e.slice(0,-1)),Ci=e=>P2.test(e),q1=()=>!0,K2=e=>H2.test(e)&&!q2.test(e),Km=()=>!1,V2=e=>$2.test(e),Y2=e=>G2.test(e),Q2=e=>!De(e)&&!Le(e),X2=e=>va(e,K1,Km),De=e=>P1.test(e),Pa=e=>va(e,V1,K2),Jx=e=>va(e,iT,ct),Z2=e=>va(e,Q1,q1),W2=e=>va(e,Y1,Km),ey=e=>va(e,$1,Km),J2=e=>va(e,G1,Y2),nu=e=>va(e,X1,V2),Le=e=>H1.test(e),Xl=e=>Xa(e,V1),eT=e=>Xa(e,Y1),ty=e=>Xa(e,$1),tT=e=>Xa(e,K1),nT=e=>Xa(e,G1),ru=e=>Xa(e,X1,!0),rT=e=>Xa(e,Q1,!0),va=(e,t,r)=>{const a=P1.exec(e);return a?a[1]?t(a[1]):r(a[2]):!1},Xa=(e,t,r=!1)=>{const a=H1.exec(e);return a?a[1]?t(a[1]):r:!1},$1=e=>e==="position"||e==="percentage",G1=e=>e==="image"||e==="url",K1=e=>e==="length"||e==="size"||e==="bg-size",V1=e=>e==="length",iT=e=>e==="number",Y1=e=>e==="family-name",Q1=e=>e==="number"||e==="weight",X1=e=>e==="shadow",aT=()=>{const e=Nn("color"),t=Nn("font"),r=Nn("text"),a=Nn("font-weight"),l=Nn("tracking"),o=Nn("leading"),c=Nn("breakpoint"),f=Nn("container"),h=Nn("spacing"),m=Nn("radius"),g=Nn("shadow"),x=Nn("inset-shadow"),y=Nn("text-shadow"),v=Nn("drop-shadow"),k=Nn("blur"),E=Nn("perspective"),S=Nn("aspect"),N=Nn("ease"),O=Nn("animate"),T=()=>["auto","avoid","all","avoid-page","page","left","right","column"],P=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],$=()=>[...P(),Le,De],j=()=>["auto","hidden","clip","visible","scroll"],G=()=>["auto","contain","none"],A=()=>[Le,De,h],ie=()=>[oa,"full","auto",...A()],F=()=>[ca,"none","subgrid",Le,De],ee=()=>["auto",{span:["full",ca,Le,De]},ca,Le,De],te=()=>[ca,"auto",Le,De],we=()=>["auto","min","max","fr",Le,De],se=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Q=()=>["start","end","center","stretch","center-safe","end-safe"],M=()=>["auto",...A()],Y=()=>[oa,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...A()],V=()=>[oa,"screen","full","dvw","lvw","svw","min","max","fit",...A()],fe=()=>[oa,"screen","full","lh","dvh","lvh","svh","min","max","fit",...A()],R=()=>[e,Le,De],D=()=>[...P(),ty,ey,{position:[Le,De]}],B=()=>["no-repeat",{repeat:["","x","y","space","round"]}],z=()=>["auto","cover","contain",tT,X2,{size:[Le,De]}],ue=()=>[vh,Xl,Pa],be=()=>["","none","full",m,Le,De],ye=()=>["",ct,Xl,Pa],le=()=>["solid","dashed","dotted","double"],xe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],pe=()=>[ct,vh,ty,ey],Ue=()=>["","none",k,Le,De],Ae=()=>["none",ct,Le,De],Tt=()=>["none",ct,Le,De],tt=()=>[ct,Le,De],gt=()=>[oa,"full",...A()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ci],breakpoint:[Ci],color:[q1],container:[Ci],"drop-shadow":[Ci],ease:["in","out","in-out"],font:[Q2],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ci],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ci],shadow:[Ci],spacing:["px",ct],text:[Ci],"text-shadow":[Ci],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",oa,De,Le,S]}],container:["container"],columns:[{columns:[ct,De,Le,f]}],"break-after":[{"break-after":T()}],"break-before":[{"break-before":T()}],"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:$()}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:G()}],"overscroll-x":[{"overscroll-x":G()}],"overscroll-y":[{"overscroll-y":G()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:ie()}],"inset-x":[{"inset-x":ie()}],"inset-y":[{"inset-y":ie()}],start:[{"inset-s":ie(),start:ie()}],end:[{"inset-e":ie(),end:ie()}],"inset-bs":[{"inset-bs":ie()}],"inset-be":[{"inset-be":ie()}],top:[{top:ie()}],right:[{right:ie()}],bottom:[{bottom:ie()}],left:[{left:ie()}],visibility:["visible","invisible","collapse"],z:[{z:[ca,"auto",Le,De]}],basis:[{basis:[oa,"full","auto",f,...A()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ct,oa,"auto","initial","none",De]}],grow:[{grow:["",ct,Le,De]}],shrink:[{shrink:["",ct,Le,De]}],order:[{order:[ca,"first","last","none",Le,De]}],"grid-cols":[{"grid-cols":F()}],"col-start-end":[{col:ee()}],"col-start":[{"col-start":te()}],"col-end":[{"col-end":te()}],"grid-rows":[{"grid-rows":F()}],"row-start-end":[{row:ee()}],"row-start":[{"row-start":te()}],"row-end":[{"row-end":te()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":we()}],"auto-rows":[{"auto-rows":we()}],gap:[{gap:A()}],"gap-x":[{"gap-x":A()}],"gap-y":[{"gap-y":A()}],"justify-content":[{justify:[...se(),"normal"]}],"justify-items":[{"justify-items":[...Q(),"normal"]}],"justify-self":[{"justify-self":["auto",...Q()]}],"align-content":[{content:["normal",...se()]}],"align-items":[{items:[...Q(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Q(),{baseline:["","last"]}]}],"place-content":[{"place-content":se()}],"place-items":[{"place-items":[...Q(),"baseline"]}],"place-self":[{"place-self":["auto",...Q()]}],p:[{p:A()}],px:[{px:A()}],py:[{py:A()}],ps:[{ps:A()}],pe:[{pe:A()}],pbs:[{pbs:A()}],pbe:[{pbe:A()}],pt:[{pt:A()}],pr:[{pr:A()}],pb:[{pb:A()}],pl:[{pl:A()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":A()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":A()}],"space-y-reverse":["space-y-reverse"],size:[{size:Y()}],"inline-size":[{inline:["auto",...V()]}],"min-inline-size":[{"min-inline":["auto",...V()]}],"max-inline-size":[{"max-inline":["none",...V()]}],"block-size":[{block:["auto",...fe()]}],"min-block-size":[{"min-block":["auto",...fe()]}],"max-block-size":[{"max-block":["none",...fe()]}],w:[{w:[f,"screen",...Y()]}],"min-w":[{"min-w":[f,"screen","none",...Y()]}],"max-w":[{"max-w":[f,"screen","none","prose",{screen:[c]},...Y()]}],h:[{h:["screen","lh",...Y()]}],"min-h":[{"min-h":["screen","lh","none",...Y()]}],"max-h":[{"max-h":["screen","lh",...Y()]}],"font-size":[{text:["base",r,Xl,Pa]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,rT,Z2]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",vh,De]}],"font-family":[{font:[eT,W2,t]}],"font-features":[{"font-features":[De]}],"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:[l,Le,De]}],"line-clamp":[{"line-clamp":[ct,"none",Le,Jx]}],leading:[{leading:[o,...A()]}],"list-image":[{"list-image":["none",Le,De]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Le,De]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:R()}],"text-color":[{text:R()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...le(),"wavy"]}],"text-decoration-thickness":[{decoration:[ct,"from-font","auto",Le,Pa]}],"text-decoration-color":[{decoration:R()}],"underline-offset":[{"underline-offset":[ct,"auto",Le,De]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:A()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Le,De]}],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",Le,De]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:D()}],"bg-repeat":[{bg:B()}],"bg-size":[{bg:z()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ca,Le,De],radial:["",Le,De],conic:[ca,Le,De]},nT,J2]}],"bg-color":[{bg:R()}],"gradient-from-pos":[{from:ue()}],"gradient-via-pos":[{via:ue()}],"gradient-to-pos":[{to:ue()}],"gradient-from":[{from:R()}],"gradient-via":[{via:R()}],"gradient-to":[{to:R()}],rounded:[{rounded:be()}],"rounded-s":[{"rounded-s":be()}],"rounded-e":[{"rounded-e":be()}],"rounded-t":[{"rounded-t":be()}],"rounded-r":[{"rounded-r":be()}],"rounded-b":[{"rounded-b":be()}],"rounded-l":[{"rounded-l":be()}],"rounded-ss":[{"rounded-ss":be()}],"rounded-se":[{"rounded-se":be()}],"rounded-ee":[{"rounded-ee":be()}],"rounded-es":[{"rounded-es":be()}],"rounded-tl":[{"rounded-tl":be()}],"rounded-tr":[{"rounded-tr":be()}],"rounded-br":[{"rounded-br":be()}],"rounded-bl":[{"rounded-bl":be()}],"border-w":[{border:ye()}],"border-w-x":[{"border-x":ye()}],"border-w-y":[{"border-y":ye()}],"border-w-s":[{"border-s":ye()}],"border-w-e":[{"border-e":ye()}],"border-w-bs":[{"border-bs":ye()}],"border-w-be":[{"border-be":ye()}],"border-w-t":[{"border-t":ye()}],"border-w-r":[{"border-r":ye()}],"border-w-b":[{"border-b":ye()}],"border-w-l":[{"border-l":ye()}],"divide-x":[{"divide-x":ye()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ye()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...le(),"hidden","none"]}],"divide-style":[{divide:[...le(),"hidden","none"]}],"border-color":[{border:R()}],"border-color-x":[{"border-x":R()}],"border-color-y":[{"border-y":R()}],"border-color-s":[{"border-s":R()}],"border-color-e":[{"border-e":R()}],"border-color-bs":[{"border-bs":R()}],"border-color-be":[{"border-be":R()}],"border-color-t":[{"border-t":R()}],"border-color-r":[{"border-r":R()}],"border-color-b":[{"border-b":R()}],"border-color-l":[{"border-l":R()}],"divide-color":[{divide:R()}],"outline-style":[{outline:[...le(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ct,Le,De]}],"outline-w":[{outline:["",ct,Xl,Pa]}],"outline-color":[{outline:R()}],shadow:[{shadow:["","none",g,ru,nu]}],"shadow-color":[{shadow:R()}],"inset-shadow":[{"inset-shadow":["none",x,ru,nu]}],"inset-shadow-color":[{"inset-shadow":R()}],"ring-w":[{ring:ye()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:R()}],"ring-offset-w":[{"ring-offset":[ct,Pa]}],"ring-offset-color":[{"ring-offset":R()}],"inset-ring-w":[{"inset-ring":ye()}],"inset-ring-color":[{"inset-ring":R()}],"text-shadow":[{"text-shadow":["none",y,ru,nu]}],"text-shadow-color":[{"text-shadow":R()}],opacity:[{opacity:[ct,Le,De]}],"mix-blend":[{"mix-blend":[...xe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":xe()}],"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":[ct]}],"mask-image-linear-from-pos":[{"mask-linear-from":pe()}],"mask-image-linear-to-pos":[{"mask-linear-to":pe()}],"mask-image-linear-from-color":[{"mask-linear-from":R()}],"mask-image-linear-to-color":[{"mask-linear-to":R()}],"mask-image-t-from-pos":[{"mask-t-from":pe()}],"mask-image-t-to-pos":[{"mask-t-to":pe()}],"mask-image-t-from-color":[{"mask-t-from":R()}],"mask-image-t-to-color":[{"mask-t-to":R()}],"mask-image-r-from-pos":[{"mask-r-from":pe()}],"mask-image-r-to-pos":[{"mask-r-to":pe()}],"mask-image-r-from-color":[{"mask-r-from":R()}],"mask-image-r-to-color":[{"mask-r-to":R()}],"mask-image-b-from-pos":[{"mask-b-from":pe()}],"mask-image-b-to-pos":[{"mask-b-to":pe()}],"mask-image-b-from-color":[{"mask-b-from":R()}],"mask-image-b-to-color":[{"mask-b-to":R()}],"mask-image-l-from-pos":[{"mask-l-from":pe()}],"mask-image-l-to-pos":[{"mask-l-to":pe()}],"mask-image-l-from-color":[{"mask-l-from":R()}],"mask-image-l-to-color":[{"mask-l-to":R()}],"mask-image-x-from-pos":[{"mask-x-from":pe()}],"mask-image-x-to-pos":[{"mask-x-to":pe()}],"mask-image-x-from-color":[{"mask-x-from":R()}],"mask-image-x-to-color":[{"mask-x-to":R()}],"mask-image-y-from-pos":[{"mask-y-from":pe()}],"mask-image-y-to-pos":[{"mask-y-to":pe()}],"mask-image-y-from-color":[{"mask-y-from":R()}],"mask-image-y-to-color":[{"mask-y-to":R()}],"mask-image-radial":[{"mask-radial":[Le,De]}],"mask-image-radial-from-pos":[{"mask-radial-from":pe()}],"mask-image-radial-to-pos":[{"mask-radial-to":pe()}],"mask-image-radial-from-color":[{"mask-radial-from":R()}],"mask-image-radial-to-color":[{"mask-radial-to":R()}],"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":P()}],"mask-image-conic-pos":[{"mask-conic":[ct]}],"mask-image-conic-from-pos":[{"mask-conic-from":pe()}],"mask-image-conic-to-pos":[{"mask-conic-to":pe()}],"mask-image-conic-from-color":[{"mask-conic-from":R()}],"mask-image-conic-to-color":[{"mask-conic-to":R()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:D()}],"mask-repeat":[{mask:B()}],"mask-size":[{mask:z()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Le,De]}],filter:[{filter:["","none",Le,De]}],blur:[{blur:Ue()}],brightness:[{brightness:[ct,Le,De]}],contrast:[{contrast:[ct,Le,De]}],"drop-shadow":[{"drop-shadow":["","none",v,ru,nu]}],"drop-shadow-color":[{"drop-shadow":R()}],grayscale:[{grayscale:["",ct,Le,De]}],"hue-rotate":[{"hue-rotate":[ct,Le,De]}],invert:[{invert:["",ct,Le,De]}],saturate:[{saturate:[ct,Le,De]}],sepia:[{sepia:["",ct,Le,De]}],"backdrop-filter":[{"backdrop-filter":["","none",Le,De]}],"backdrop-blur":[{"backdrop-blur":Ue()}],"backdrop-brightness":[{"backdrop-brightness":[ct,Le,De]}],"backdrop-contrast":[{"backdrop-contrast":[ct,Le,De]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ct,Le,De]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ct,Le,De]}],"backdrop-invert":[{"backdrop-invert":["",ct,Le,De]}],"backdrop-opacity":[{"backdrop-opacity":[ct,Le,De]}],"backdrop-saturate":[{"backdrop-saturate":[ct,Le,De]}],"backdrop-sepia":[{"backdrop-sepia":["",ct,Le,De]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":A()}],"border-spacing-x":[{"border-spacing-x":A()}],"border-spacing-y":[{"border-spacing-y":A()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Le,De]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ct,"initial",Le,De]}],ease:[{ease:["linear","initial",N,Le,De]}],delay:[{delay:[ct,Le,De]}],animate:[{animate:["none",O,Le,De]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[E,Le,De]}],"perspective-origin":[{"perspective-origin":$()}],rotate:[{rotate:Ae()}],"rotate-x":[{"rotate-x":Ae()}],"rotate-y":[{"rotate-y":Ae()}],"rotate-z":[{"rotate-z":Ae()}],scale:[{scale:Tt()}],"scale-x":[{"scale-x":Tt()}],"scale-y":[{"scale-y":Tt()}],"scale-z":[{"scale-z":Tt()}],"scale-3d":["scale-3d"],skew:[{skew:tt()}],"skew-x":[{"skew-x":tt()}],"skew-y":[{"skew-y":tt()}],transform:[{transform:[Le,De,"","none","gpu","cpu"]}],"transform-origin":[{origin:$()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:gt()}],"translate-x":[{"translate-x":gt()}],"translate-y":[{"translate-y":gt()}],"translate-z":[{"translate-z":gt()}],"translate-none":["translate-none"],accent:[{accent:R()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:R()}],"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",Le,De]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":A()}],"scroll-mx":[{"scroll-mx":A()}],"scroll-my":[{"scroll-my":A()}],"scroll-ms":[{"scroll-ms":A()}],"scroll-me":[{"scroll-me":A()}],"scroll-mbs":[{"scroll-mbs":A()}],"scroll-mbe":[{"scroll-mbe":A()}],"scroll-mt":[{"scroll-mt":A()}],"scroll-mr":[{"scroll-mr":A()}],"scroll-mb":[{"scroll-mb":A()}],"scroll-ml":[{"scroll-ml":A()}],"scroll-p":[{"scroll-p":A()}],"scroll-px":[{"scroll-px":A()}],"scroll-py":[{"scroll-py":A()}],"scroll-ps":[{"scroll-ps":A()}],"scroll-pe":[{"scroll-pe":A()}],"scroll-pbs":[{"scroll-pbs":A()}],"scroll-pbe":[{"scroll-pbe":A()}],"scroll-pt":[{"scroll-pt":A()}],"scroll-pr":[{"scroll-pr":A()}],"scroll-pb":[{"scroll-pb":A()}],"scroll-pl":[{"scroll-pl":A()}],"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",Le,De]}],fill:[{fill:["none",...R()]}],"stroke-w":[{stroke:[ct,Xl,Pa,Jx]}],stroke:[{stroke:["none",...R()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},sT=B2(aT);function re(...e){return sT(b2(e))}async function Dt(e,t){const r=await fetch(e,{...t,headers:{...E1(),...t?.headers}});if(!r.ok){const a=await r.text().catch(()=>"");throw new Error(`${r.status}: ${a||r.statusText}`)}return r.json()}function ri(e){return/[Zz]$/.test(e)||/[+-]\d{2}:\d{2}$/.test(e)?new Date(e):new Date(e.replace(" ","T")+"Z")}function Ru(e,t,r,a,l){const o=r.startsWith("/")?r:`${t}/${r}`,c=o.replace(/^\//,""),f=a??1,h=1;switch(e){case"vscode":return`vscode://file/${c}:${f}:${h}`;case"cursor":return`cursor://file/${c}:${f}:${h}`;case"windsurf":return`windsurf://file/${c}:${f}:${h}`;case"jetbrains":return`jetbrains://open?file=${encodeURIComponent(o)}&line=${f}`;case"sublime":return`subl://open?url=file://${encodeURIComponent(o)}&line=${f}`}}function lT(e){return e==="success"?"complete":e==="incomplete"?"incomplete":e==="failed"?"failed":e==="cancelled"?"cancelled":"running"}const Z1=_.createContext(null);function oT({children:e}){const[t,r]=_.useState(new Map),[a,l]=_.useState(null),o=_.useRef(!1),{socket:c}=si(),f=_.useMemo(()=>Array.from(t.values()),[t]),h=_.useMemo(()=>f.filter(v=>v.status==="running").length,[f]),m=_.useMemo(()=>h>0,[h]);_.useEffect(()=>{o.current||(o.current=!0,Dt("/api/commands/active").then(v=>{if(v.commands.length>0){const k=new Map;let E=null;for(const S of v.commands)k.set(S.execution_id,{executionId:S.execution_id,command:S.command,output:S.output??"",events:[],status:"running",exitCode:null,startedAt:S.started_at}),E=S.execution_id;r(k),l(E);for(const S of v.commands)Dt(`/api/commands/${S.execution_id}/events`).then(N=>{!N.events||N.events.length===0||r(O=>{const T=O.get(S.execution_id);if(!T)return O;const P=new Set(T.events.map(G=>G.seq)),$=[...T.events];for(const G of N.events)P.has(G.seq)||$.push(G);$.sort((G,A)=>G.seq-A.seq);const j=new Map(O);return j.set(S.execution_id,{...T,events:$}),j})}).catch(()=>{})}}).catch(()=>{}))},[]),ut("command:started",v=>{const k={executionId:v.execution_id,command:v.command,output:"",events:[],status:"running",exitCode:null,startedAt:v.started_at};r(E=>{const S=new Map(E);return S.set(v.execution_id,k),S}),l(v.execution_id)}),ut("command:output",v=>{r(k=>{const E=k.get(v.execution_id);if(!E)return k;const S=new Map(k);return S.set(v.execution_id,{...E,output:E.output+v.content}),S})}),ut("command:event",v=>{r(k=>{const E=k.get(v.executionId);if(!E||E.events.some(N=>N.seq===v.seq))return k;const S=new Map(k);return S.set(v.executionId,{...E,events:[...E.events,v]}),S})}),ut("command:finished",v=>{r(k=>{const E=k.get(v.execution_id);if(!E)return k;const S=new Map(k),N=v.outcome?lT(v.outcome):v.exitCode===-2?"cancelled":v.exitCode===0?"complete":"failed";return S.set(v.execution_id,{...E,status:N,exitCode:v.exitCode}),S})});const g=_.useCallback(v=>{r(k=>{const E=new Map(k);return E.delete(v),l(S=>{if(S!==v)return S;const N=Array.from(E.keys());return N.length>0?N[N.length-1]:null}),E})},[]),x=_.useCallback(v=>{c?.emit("command:cancel",{execution_id:v})},[c]),y=_.useMemo(()=>({tabs:f,activeTabId:a,runningCount:h,isRunning:m,setActiveTabId:l,dismissTab:g,cancelCommand:x}),[f,a,h,m,g,x]);return d.jsx(Z1,{value:y,children:e})}function Vm(){const e=_.useContext(Z1);if(!e)throw new Error("useCommandState must be used within CommandStateProvider");return e}/**
62
+ * @license lucide-react v0.577.0 - ISC
63
+ *
64
+ * This source code is licensed under the ISC license.
65
+ * See the LICENSE file in the root directory of this source tree.
66
+ */const W1=(...e)=>e.filter((t,r,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===r).join(" ").trim();/**
67
+ * @license lucide-react v0.577.0 - ISC
68
+ *
69
+ * This source code is licensed under the ISC license.
70
+ * See the LICENSE file in the root directory of this source tree.
71
+ */const cT=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
72
+ * @license lucide-react v0.577.0 - ISC
73
+ *
74
+ * This source code is licensed under the ISC license.
75
+ * See the LICENSE file in the root directory of this source tree.
76
+ */const uT=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,a)=>a?a.toUpperCase():r.toLowerCase());/**
77
+ * @license lucide-react v0.577.0 - ISC
78
+ *
79
+ * This source code is licensed under the ISC license.
80
+ * See the LICENSE file in the root directory of this source tree.
81
+ */const ny=e=>{const t=uT(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
82
+ * @license lucide-react v0.577.0 - ISC
83
+ *
84
+ * This source code is licensed under the ISC license.
85
+ * See the LICENSE file in the root directory of this source tree.
86
+ */var dT={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"};/**
87
+ * @license lucide-react v0.577.0 - ISC
88
+ *
89
+ * This source code is licensed under the ISC license.
90
+ * See the LICENSE file in the root directory of this source tree.
91
+ */const fT=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};/**
92
+ * @license lucide-react v0.577.0 - ISC
93
+ *
94
+ * This source code is licensed under the ISC license.
95
+ * See the LICENSE file in the root directory of this source tree.
96
+ */const hT=_.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:a,className:l="",children:o,iconNode:c,...f},h)=>_.createElement("svg",{ref:h,...dT,width:t,height:t,stroke:e,strokeWidth:a?Number(r)*24/Number(t):r,className:W1("lucide",l),...!o&&!fT(f)&&{"aria-hidden":"true"},...f},[...c.map(([m,g])=>_.createElement(m,g)),...Array.isArray(o)?o:[o]]));/**
97
+ * @license lucide-react v0.577.0 - ISC
98
+ *
99
+ * This source code is licensed under the ISC license.
100
+ * See the LICENSE file in the root directory of this source tree.
101
+ */const Ne=(e,t)=>{const r=_.forwardRef(({className:a,...l},o)=>_.createElement(hT,{ref:o,iconNode:t,className:W1(`lucide-${cT(ny(e))}`,`lucide-${e}`,a),...l}));return r.displayName=ny(e),r};/**
102
+ * @license lucide-react v0.577.0 - ISC
103
+ *
104
+ * This source code is licensed under the ISC license.
105
+ * See the LICENSE file in the root directory of this source tree.
106
+ */const mT=[["circle",{cx:"16",cy:"4",r:"1",key:"1grugj"}],["path",{d:"m18 19 1-7-6 1",key:"r0i19z"}],["path",{d:"m5 8 3-3 5.5 3-2.36 3.5",key:"9ptxx2"}],["path",{d:"M4.24 14.5a5 5 0 0 0 6.88 6",key:"10kmtu"}],["path",{d:"M13.76 17.5a5 5 0 0 0-6.88-6",key:"2qq6rc"}]],pT=Ne("accessibility",mT);/**
107
+ * @license lucide-react v0.577.0 - ISC
108
+ *
109
+ * This source code is licensed under the ISC license.
110
+ * See the LICENSE file in the root directory of this source tree.
111
+ */const gT=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],Ym=Ne("activity",gT);/**
112
+ * @license lucide-react v0.577.0 - ISC
113
+ *
114
+ * This source code is licensed under the ISC license.
115
+ * See the LICENSE file in the root directory of this source tree.
116
+ */const bT=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],J1=Ne("arrow-down",bT);/**
117
+ * @license lucide-react v0.577.0 - ISC
118
+ *
119
+ * This source code is licensed under the ISC license.
120
+ * See the LICENSE file in the root directory of this source tree.
121
+ */const xT=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],xa=Ne("arrow-left",xT);/**
122
+ * @license lucide-react v0.577.0 - ISC
123
+ *
124
+ * This source code is licensed under the ISC license.
125
+ * See the LICENSE file in the root directory of this source tree.
126
+ */const yT=[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]],ek=Ne("arrow-up-down",yT);/**
127
+ * @license lucide-react v0.577.0 - ISC
128
+ *
129
+ * This source code is licensed under the ISC license.
130
+ * See the LICENSE file in the root directory of this source tree.
131
+ */const vT=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],kT=Ne("arrow-up",vT);/**
132
+ * @license lucide-react v0.577.0 - ISC
133
+ *
134
+ * This source code is licensed under the ISC license.
135
+ * See the LICENSE file in the root directory of this source tree.
136
+ */const wT=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}]],_T=Ne("ban",wT);/**
137
+ * @license lucide-react v0.577.0 - ISC
138
+ *
139
+ * This source code is licensed under the ISC license.
140
+ * See the LICENSE file in the root directory of this source tree.
141
+ */const ET=[["path",{d:"M10 22V7a1 1 0 0 0-1-1H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5a1 1 0 0 0-1-1H2",key:"1ah6g2"}],["rect",{x:"14",y:"2",width:"8",height:"8",rx:"1",key:"88lufb"}]],NT=Ne("blocks",ET);/**
142
+ * @license lucide-react v0.577.0 - ISC
143
+ *
144
+ * This source code is licensed under the ISC license.
145
+ * See the LICENSE file in the root directory of this source tree.
146
+ */const ST=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],zT=Ne("book-open",ST);/**
147
+ * @license lucide-react v0.577.0 - ISC
148
+ *
149
+ * This source code is licensed under the ISC license.
150
+ * See the LICENSE file in the root directory of this source tree.
151
+ */const CT=[["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"}]],TT=Ne("bot",CT);/**
152
+ * @license lucide-react v0.577.0 - ISC
153
+ *
154
+ * This source code is licensed under the ISC license.
155
+ * See the LICENSE file in the root directory of this source tree.
156
+ */const RT=[["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"}]],tk=Ne("brain",RT);/**
157
+ * @license lucide-react v0.577.0 - ISC
158
+ *
159
+ * This source code is licensed under the ISC license.
160
+ * See the LICENSE file in the root directory of this source tree.
161
+ */const AT=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Mr=Ne("check",AT);/**
162
+ * @license lucide-react v0.577.0 - ISC
163
+ *
164
+ * This source code is licensed under the ISC license.
165
+ * See the LICENSE file in the root directory of this source tree.
166
+ */const OT=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Za=Ne("chevron-down",OT);/**
167
+ * @license lucide-react v0.577.0 - ISC
168
+ *
169
+ * This source code is licensed under the ISC license.
170
+ * See the LICENSE file in the root directory of this source tree.
171
+ */const MT=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],ji=Ne("chevron-right",MT);/**
172
+ * @license lucide-react v0.577.0 - ISC
173
+ *
174
+ * This source code is licensed under the ISC license.
175
+ * See the LICENSE file in the root directory of this source tree.
176
+ */const jT=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Vu=Ne("circle-alert",jT);/**
177
+ * @license lucide-react v0.577.0 - ISC
178
+ *
179
+ * This source code is licensed under the ISC license.
180
+ * See the LICENSE file in the root directory of this source tree.
181
+ */const DT=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],co=Ne("circle-check",DT);/**
182
+ * @license lucide-react v0.577.0 - ISC
183
+ *
184
+ * This source code is licensed under the ISC license.
185
+ * See the LICENSE file in the root directory of this source tree.
186
+ */const LT=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],nk=Ne("circle-question-mark",LT);/**
187
+ * @license lucide-react v0.577.0 - ISC
188
+ *
189
+ * This source code is licensed under the ISC license.
190
+ * See the LICENSE file in the root directory of this source tree.
191
+ */const IT=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"9",x2:"15",y1:"15",y2:"9",key:"1dfufj"}]],BT=Ne("circle-slash",IT);/**
192
+ * @license lucide-react v0.577.0 - ISC
193
+ *
194
+ * This source code is licensed under the ISC license.
195
+ * See the LICENSE file in the root directory of this source tree.
196
+ */const UT=[["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"}]],cm=Ne("circle-x",UT);/**
197
+ * @license lucide-react v0.577.0 - ISC
198
+ *
199
+ * This source code is licensed under the ISC license.
200
+ * See the LICENSE file in the root directory of this source tree.
201
+ */const FT=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],PT=Ne("circle",FT);/**
202
+ * @license lucide-react v0.577.0 - ISC
203
+ *
204
+ * This source code is licensed under the ISC license.
205
+ * See the LICENSE file in the root directory of this source tree.
206
+ */const HT=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2",key:"4jdomd"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v4",key:"3hqy98"}],["path",{d:"M21 14H11",key:"1bme5i"}],["path",{d:"m15 10-4 4 4 4",key:"5dvupr"}]],rk=Ne("clipboard-copy",HT);/**
207
+ * @license lucide-react v0.577.0 - ISC
208
+ *
209
+ * This source code is licensed under the ISC license.
210
+ * See the LICENSE file in the root directory of this source tree.
211
+ */const qT=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],ik=Ne("clock",qT);/**
212
+ * @license lucide-react v0.577.0 - ISC
213
+ *
214
+ * This source code is licensed under the ISC license.
215
+ * See the LICENSE file in the root directory of this source tree.
216
+ */const $T=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],GT=Ne("cloud",$T);/**
217
+ * @license lucide-react v0.577.0 - ISC
218
+ *
219
+ * This source code is licensed under the ISC license.
220
+ * See the LICENSE file in the root directory of this source tree.
221
+ */const KT=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}]],VT=Ne("compass",KT);/**
222
+ * @license lucide-react v0.577.0 - ISC
223
+ *
224
+ * This source code is licensed under the ISC license.
225
+ * See the LICENSE file in the root directory of this source tree.
226
+ */const YT=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Yu=Ne("copy",YT);/**
227
+ * @license lucide-react v0.577.0 - ISC
228
+ *
229
+ * This source code is licensed under the ISC license.
230
+ * See the LICENSE file in the root directory of this source tree.
231
+ */const QT=[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]],XT=Ne("crown",QT);/**
232
+ * @license lucide-react v0.577.0 - ISC
233
+ *
234
+ * This source code is licensed under the ISC license.
235
+ * See the LICENSE file in the root directory of this source tree.
236
+ */const ZT=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],WT=Ne("database",ZT);/**
237
+ * @license lucide-react v0.577.0 - ISC
238
+ *
239
+ * This source code is licensed under the ISC license.
240
+ * See the LICENSE file in the root directory of this source tree.
241
+ */const JT=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],eR=Ne("ellipsis",JT);/**
242
+ * @license lucide-react v0.577.0 - ISC
243
+ *
244
+ * This source code is licensed under the ISC license.
245
+ * See the LICENSE file in the root directory of this source tree.
246
+ */const tR=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Qm=Ne("external-link",tR);/**
247
+ * @license lucide-react v0.577.0 - ISC
248
+ *
249
+ * This source code is licensed under the ISC license.
250
+ * See the LICENSE file in the root directory of this source tree.
251
+ */const nR=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],rR=Ne("eye",nR);/**
252
+ * @license lucide-react v0.577.0 - ISC
253
+ *
254
+ * This source code is licensed under the ISC license.
255
+ * See the LICENSE file in the root directory of this source tree.
256
+ */const iR=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]],aR=Ne("file-code",iR);/**
257
+ * @license lucide-react v0.577.0 - ISC
258
+ *
259
+ * This source code is licensed under the ISC license.
260
+ * See the LICENSE file in the root directory of this source tree.
261
+ */const sR=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["circle",{cx:"11.5",cy:"14.5",r:"2.5",key:"1bq0ko"}],["path",{d:"M13.3 16.3 15 18",key:"2quom7"}]],ii=Ne("file-search",sR);/**
262
+ * @license lucide-react v0.577.0 - ISC
263
+ *
264
+ * This source code is licensed under the ISC license.
265
+ * See the LICENSE file in the root directory of this source tree.
266
+ */const lR=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Ao=Ne("file-text",lR);/**
267
+ * @license lucide-react v0.577.0 - ISC
268
+ *
269
+ * This source code is licensed under the ISC license.
270
+ * See the LICENSE file in the root directory of this source tree.
271
+ */const oR=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]],cR=Ne("file",oR);/**
272
+ * @license lucide-react v0.577.0 - ISC
273
+ *
274
+ * This source code is licensed under the ISC license.
275
+ * See the LICENSE file in the root directory of this source tree.
276
+ */const uR=[["path",{d:"m6 14 1.45-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.55 6a2 2 0 0 1-1.94 1.5H4a2 2 0 0 1-2-2V5c0-1.1.9-2 2-2h3.93a2 2 0 0 1 1.66.9l.82 1.2a2 2 0 0 0 1.66.9H18a2 2 0 0 1 2 2v2",key:"1nmvlm"}],["circle",{cx:"14",cy:"15",r:"1",key:"1gm4qj"}]],dR=Ne("folder-open-dot",uR);/**
277
+ * @license lucide-react v0.577.0 - ISC
278
+ *
279
+ * This source code is licensed under the ISC license.
280
+ * See the LICENSE file in the root directory of this source tree.
281
+ */const fR=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],hR=Ne("folder-open",fR);/**
282
+ * @license lucide-react v0.577.0 - ISC
283
+ *
284
+ * This source code is licensed under the ISC license.
285
+ * See the LICENSE file in the root directory of this source tree.
286
+ */const mR=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],ak=Ne("funnel",mR);/**
287
+ * @license lucide-react v0.577.0 - ISC
288
+ *
289
+ * This source code is licensed under the ISC license.
290
+ * See the LICENSE file in the root directory of this source tree.
291
+ */const pR=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],gR=Ne("gauge",pR);/**
292
+ * @license lucide-react v0.577.0 - ISC
293
+ *
294
+ * This source code is licensed under the ISC license.
295
+ * See the LICENSE file in the root directory of this source tree.
296
+ */const bR=[["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"}]],Ys=Ne("git-branch",bR);/**
297
+ * @license lucide-react v0.577.0 - ISC
298
+ *
299
+ * This source code is licensed under the ISC license.
300
+ * See the LICENSE file in the root directory of this source tree.
301
+ */const xR=[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]],sk=Ne("github",xR);/**
302
+ * @license lucide-react v0.577.0 - ISC
303
+ *
304
+ * This source code is licensed under the ISC license.
305
+ * See the LICENSE file in the root directory of this source tree.
306
+ */const yR=[["path",{d:"m11 17 2 2a1 1 0 1 0 3-3",key:"efffak"}],["path",{d:"m14 14 2.5 2.5a1 1 0 1 0 3-3l-3.88-3.88a3 3 0 0 0-4.24 0l-.88.88a1 1 0 1 1-3-3l2.81-2.81a5.79 5.79 0 0 1 7.06-.87l.47.28a2 2 0 0 0 1.42.25L21 4",key:"9pr0kb"}],["path",{d:"m21 3 1 11h-2",key:"1tisrp"}],["path",{d:"M3 3 2 14l6.5 6.5a1 1 0 1 0 3-3",key:"1uvwmv"}],["path",{d:"M3 4h8",key:"1ep09j"}]],vR=Ne("handshake",yR);/**
307
+ * @license lucide-react v0.577.0 - ISC
308
+ *
309
+ * This source code is licensed under the ISC license.
310
+ * See the LICENSE file in the root directory of this source tree.
311
+ */const kR=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],ry=Ne("history",kR);/**
312
+ * @license lucide-react v0.577.0 - ISC
313
+ *
314
+ * This source code is licensed under the ISC license.
315
+ * See the LICENSE file in the root directory of this source tree.
316
+ */const wR=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],_R=Ne("house",wR);/**
317
+ * @license lucide-react v0.577.0 - ISC
318
+ *
319
+ * This source code is licensed under the ISC license.
320
+ * See the LICENSE file in the root directory of this source tree.
321
+ */const ER=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],NR=Ne("info",ER);/**
322
+ * @license lucide-react v0.577.0 - ISC
323
+ *
324
+ * This source code is licensed under the ISC license.
325
+ * See the LICENSE file in the root directory of this source tree.
326
+ */const SR=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],zR=Ne("layers",SR);/**
327
+ * @license lucide-react v0.577.0 - ISC
328
+ *
329
+ * This source code is licensed under the ISC license.
330
+ * See the LICENSE file in the root directory of this source tree.
331
+ */const CR=[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]],TR=Ne("lightbulb",CR);/**
332
+ * @license lucide-react v0.577.0 - ISC
333
+ *
334
+ * This source code is licensed under the ISC license.
335
+ * See the LICENSE file in the root directory of this source tree.
336
+ */const RR=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],AR=Ne("link-2",RR);/**
337
+ * @license lucide-react v0.577.0 - ISC
338
+ *
339
+ * This source code is licensed under the ISC license.
340
+ * See the LICENSE file in the root directory of this source tree.
341
+ */const OR=[["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"}]],MR=Ne("list",OR);/**
342
+ * @license lucide-react v0.577.0 - ISC
343
+ *
344
+ * This source code is licensed under the ISC license.
345
+ * See the LICENSE file in the root directory of this source tree.
346
+ */const jR=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],qr=Ne("loader-circle",jR);/**
347
+ * @license lucide-react v0.577.0 - ISC
348
+ *
349
+ * This source code is licensed under the ISC license.
350
+ * See the LICENSE file in the root directory of this source tree.
351
+ */const DR=[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]],ya=Ne("map",DR);/**
352
+ * @license lucide-react v0.577.0 - ISC
353
+ *
354
+ * This source code is licensed under the ISC license.
355
+ * See the LICENSE file in the root directory of this source tree.
356
+ */const LR=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]],um=Ne("message-circle",LR);/**
357
+ * @license lucide-react v0.577.0 - ISC
358
+ *
359
+ * This source code is licensed under the ISC license.
360
+ * See the LICENSE file in the root directory of this source tree.
361
+ */const IR=[["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"}]],Au=Ne("message-square",IR);/**
362
+ * @license lucide-react v0.577.0 - ISC
363
+ *
364
+ * This source code is licensed under the ISC license.
365
+ * See the LICENSE file in the root directory of this source tree.
366
+ */const BR=[["path",{d:"M5 12h14",key:"1ays0h"}]],xo=Ne("minus",BR);/**
367
+ * @license lucide-react v0.577.0 - ISC
368
+ *
369
+ * This source code is licensed under the ISC license.
370
+ * See the LICENSE file in the root directory of this source tree.
371
+ */const UR=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],FR=Ne("monitor",UR);/**
372
+ * @license lucide-react v0.577.0 - ISC
373
+ *
374
+ * This source code is licensed under the ISC license.
375
+ * See the LICENSE file in the root directory of this source tree.
376
+ */const PR=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],HR=Ne("moon",PR);/**
377
+ * @license lucide-react v0.577.0 - ISC
378
+ *
379
+ * This source code is licensed under the ISC license.
380
+ * See the LICENSE file in the root directory of this source tree.
381
+ */const qR=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M9 21V9",key:"1oto5p"}]],$R=Ne("panels-top-left",qR);/**
382
+ * @license lucide-react v0.577.0 - ISC
383
+ *
384
+ * This source code is licensed under the ISC license.
385
+ * See the LICENSE file in the root directory of this source tree.
386
+ */const GR=[["path",{d:"M13 21h8",key:"1jsn5i"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],yo=Ne("pen-line",GR);/**
387
+ * @license lucide-react v0.577.0 - ISC
388
+ *
389
+ * This source code is licensed under the ISC license.
390
+ * See the LICENSE file in the root directory of this source tree.
391
+ */const KR=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],$s=Ne("play",KR);/**
392
+ * @license lucide-react v0.577.0 - ISC
393
+ *
394
+ * This source code is licensed under the ISC license.
395
+ * See the LICENSE file in the root directory of this source tree.
396
+ */const VR=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],pa=Ne("plus",VR);/**
397
+ * @license lucide-react v0.577.0 - ISC
398
+ *
399
+ * This source code is licensed under the ISC license.
400
+ * See the LICENSE file in the root directory of this source tree.
401
+ */const YR=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],vo=Ne("refresh-cw",YR);/**
402
+ * @license lucide-react v0.577.0 - ISC
403
+ *
404
+ * This source code is licensed under the ISC license.
405
+ * See the LICENSE file in the root directory of this source tree.
406
+ */const QR=[["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}],["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09",key:"u4xsad"}],["path",{d:"M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z",key:"676m9"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05",key:"92ym6u"}]],XR=Ne("rocket",QR);/**
407
+ * @license lucide-react v0.577.0 - ISC
408
+ *
409
+ * This source code is licensed under the ISC license.
410
+ * See the LICENSE file in the root directory of this source tree.
411
+ */const ZR=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],lk=Ne("rotate-ccw",ZR);/**
412
+ * @license lucide-react v0.577.0 - ISC
413
+ *
414
+ * This source code is licensed under the ISC license.
415
+ * See the LICENSE file in the root directory of this source tree.
416
+ */const WR=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],iy=Ne("save",WR);/**
417
+ * @license lucide-react v0.577.0 - ISC
418
+ *
419
+ * This source code is licensed under the ISC license.
420
+ * See the LICENSE file in the root directory of this source tree.
421
+ */const JR=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Qu=Ne("search",JR);/**
422
+ * @license lucide-react v0.577.0 - ISC
423
+ *
424
+ * This source code is licensed under the ISC license.
425
+ * See the LICENSE file in the root directory of this source tree.
426
+ */const eA=[["path",{d:"M3.714 3.048a.498.498 0 0 0-.683.627l2.843 7.627a2 2 0 0 1 0 1.396l-2.842 7.627a.498.498 0 0 0 .682.627l18-8.5a.5.5 0 0 0 0-.904z",key:"117uat"}],["path",{d:"M6 12h16",key:"s4cdu5"}]],tA=Ne("send-horizontal",eA);/**
427
+ * @license lucide-react v0.577.0 - ISC
428
+ *
429
+ * This source code is licensed under the ISC license.
430
+ * See the LICENSE file in the root directory of this source tree.
431
+ */const nA=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],ay=Ne("send",nA);/**
432
+ * @license lucide-react v0.577.0 - ISC
433
+ *
434
+ * This source code is licensed under the ISC license.
435
+ * See the LICENSE file in the root directory of this source tree.
436
+ */const rA=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],iA=Ne("server",rA);/**
437
+ * @license lucide-react v0.577.0 - ISC
438
+ *
439
+ * This source code is licensed under the ISC license.
440
+ * See the LICENSE file in the root directory of this source tree.
441
+ */const aA=[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],ok=Ne("settings-2",aA);/**
442
+ * @license lucide-react v0.577.0 - ISC
443
+ *
444
+ * This source code is licensed under the ISC license.
445
+ * See the LICENSE file in the root directory of this source tree.
446
+ */const sA=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],Xm=Ne("shield-alert",sA);/**
447
+ * @license lucide-react v0.577.0 - ISC
448
+ *
449
+ * This source code is licensed under the ISC license.
450
+ * See the LICENSE file in the root directory of this source tree.
451
+ */const lA=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],oA=Ne("shield",lA);/**
452
+ * @license lucide-react v0.577.0 - ISC
453
+ *
454
+ * This source code is licensed under the ISC license.
455
+ * See the LICENSE file in the root directory of this source tree.
456
+ */const cA=[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]],uA=Ne("smartphone",cA);/**
457
+ * @license lucide-react v0.577.0 - ISC
458
+ *
459
+ * This source code is licensed under the ISC license.
460
+ * See the LICENSE file in the root directory of this source tree.
461
+ */const dA=[["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"}]],Oo=Ne("sparkles",dA);/**
462
+ * @license lucide-react v0.577.0 - ISC
463
+ *
464
+ * This source code is licensed under the ISC license.
465
+ * See the LICENSE file in the root directory of this source tree.
466
+ */const fA=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],hA=Ne("square",fA);/**
467
+ * @license lucide-react v0.577.0 - ISC
468
+ *
469
+ * This source code is licensed under the ISC license.
470
+ * See the LICENSE file in the root directory of this source tree.
471
+ */const mA=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],pA=Ne("sun",mA);/**
472
+ * @license lucide-react v0.577.0 - ISC
473
+ *
474
+ * This source code is licensed under the ISC license.
475
+ * See the LICENSE file in the root directory of this source tree.
476
+ */const gA=[["polyline",{points:"14.5 17.5 3 6 3 3 6 3 17.5 14.5",key:"1hfsw2"}],["line",{x1:"13",x2:"19",y1:"19",y2:"13",key:"1vrmhu"}],["line",{x1:"16",x2:"20",y1:"16",y2:"20",key:"1bron3"}],["line",{x1:"19",x2:"21",y1:"21",y2:"19",key:"13pww6"}],["polyline",{points:"14.5 6.5 18 3 21 3 21 6 17.5 9.5",key:"hbey2j"}],["line",{x1:"5",x2:"9",y1:"14",y2:"18",key:"1hf58s"}],["line",{x1:"7",x2:"4",y1:"17",y2:"20",key:"pidxm4"}],["line",{x1:"3",x2:"5",y1:"19",y2:"21",key:"1pehsh"}]],bA=Ne("swords",gA);/**
477
+ * @license lucide-react v0.577.0 - ISC
478
+ *
479
+ * This source code is licensed under the ISC license.
480
+ * See the LICENSE file in the root directory of this source tree.
481
+ */const xA=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Oi=Ne("terminal",xA);/**
482
+ * @license lucide-react v0.577.0 - ISC
483
+ *
484
+ * This source code is licensed under the ISC license.
485
+ * See the LICENSE file in the root directory of this source tree.
486
+ */const yA=[["path",{d:"M14.5 2v17.5c0 1.4-1.1 2.5-2.5 2.5c-1.4 0-2.5-1.1-2.5-2.5V2",key:"125lnx"}],["path",{d:"M8.5 2h7",key:"csnxdl"}],["path",{d:"M14.5 16h-5",key:"1ox875"}]],vA=Ne("test-tube",yA);/**
487
+ * @license lucide-react v0.577.0 - ISC
488
+ *
489
+ * This source code is licensed under the ISC license.
490
+ * See the LICENSE file in the root directory of this source tree.
491
+ */const kA=[["path",{d:"M9 2v17.5A2.5 2.5 0 0 1 6.5 22A2.5 2.5 0 0 1 4 19.5V2",key:"1hjrqt"}],["path",{d:"M20 2v17.5a2.5 2.5 0 0 1-2.5 2.5a2.5 2.5 0 0 1-2.5-2.5V2",key:"16lc8n"}],["path",{d:"M3 2h7",key:"7s29d5"}],["path",{d:"M14 2h7",key:"7sicin"}],["path",{d:"M9 16H4",key:"1bfye3"}],["path",{d:"M20 16h-5",key:"ddnjpe"}]],wA=Ne("test-tubes",kA);/**
492
+ * @license lucide-react v0.577.0 - ISC
493
+ *
494
+ * This source code is licensed under the ISC license.
495
+ * See the LICENSE file in the root directory of this source tree.
496
+ */const _A=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],EA=Ne("trash-2",_A);/**
497
+ * @license lucide-react v0.577.0 - ISC
498
+ *
499
+ * This source code is licensed under the ISC license.
500
+ * See the LICENSE file in the root directory of this source tree.
501
+ */const NA=[["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"}]],Mo=Ne("triangle-alert",NA);/**
502
+ * @license lucide-react v0.577.0 - ISC
503
+ *
504
+ * This source code is licensed under the ISC license.
505
+ * See the LICENSE file in the root directory of this source tree.
506
+ */const SA=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]],zA=Ne("user-plus",SA);/**
507
+ * @license lucide-react v0.577.0 - ISC
508
+ *
509
+ * This source code is licensed under the ISC license.
510
+ * See the LICENSE file in the root directory of this source tree.
511
+ */const CA=[["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"}]],Va=Ne("user",CA);/**
512
+ * @license lucide-react v0.577.0 - ISC
513
+ *
514
+ * This source code is licensed under the ISC license.
515
+ * See the LICENSE file in the root directory of this source tree.
516
+ */const TA=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],Zm=Ne("users",TA);/**
517
+ * @license lucide-react v0.577.0 - ISC
518
+ *
519
+ * This source code is licensed under the ISC license.
520
+ * See the LICENSE file in the root directory of this source tree.
521
+ */const RA=[["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"}]],ck=Ne("wrench",RA);/**
522
+ * @license lucide-react v0.577.0 - ISC
523
+ *
524
+ * This source code is licensed under the ISC license.
525
+ * See the LICENSE file in the root directory of this source tree.
526
+ */const AA=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Bn=Ne("x",AA);function Qs(){return nn({queryKey:["config"],queryFn:()=>Dt("/api/config"),staleTime:1/0})}const OA=[{to:"/",label:"Home",icon:_R},{to:"/commands",label:"Commands",icon:Oi},{to:"/reviewers",label:"Team",icon:Zm},{to:"/sessions",label:"Sessions",icon:Ys},{to:"/reviews",label:"Reviews",icon:ii}],MA={connected:"bg-emerald-500",connecting:"bg-amber-500 animate-pulse",reconnecting:"bg-amber-500 animate-pulse",disconnected:"bg-red-500"};function jA(){const e=ai(),{status:t}=si(),{runningCount:r}=Vm(),{data:a}=Qs();return _.useEffect(()=>{if(a?.workspaceName){const l=a.gitBranch?` (${a.gitBranch})`:"";document.title=`${a.workspaceName}${l} — OCR Dashboard`}else document.title="OCR Dashboard"},[a?.workspaceName,a?.gitBranch]),d.jsxs("aside",{className:"flex h-full w-56 flex-col border-r border-zinc-200 bg-zinc-50 dark:border-zinc-800 dark:bg-zinc-950",children:[d.jsxs("div",{className:"group/brand relative flex h-14 items-center gap-2 border-b border-zinc-200 px-4 dark:border-zinc-800",children:[d.jsx(ii,{className:"h-5 w-5 shrink-0 text-zinc-700 dark:text-zinc-300"}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsx("span",{className:"text-sm font-semibold text-zinc-900 dark:text-zinc-100",children:"OCR Dashboard"}),a?.workspaceName&&d.jsxs("span",{className:"block truncate text-[11px] text-zinc-500 dark:text-zinc-400",children:[a.workspaceName,a.gitBranch&&d.jsxs("span",{className:"ml-1 text-zinc-400 dark:text-zinc-500",children:["(",a.gitBranch,")"]})]})]}),a?.workspaceName&&d.jsxs("div",{className:"pointer-events-none absolute left-full top-2 z-50 ml-2 min-w-[280px] max-w-sm opacity-0 transition-opacity delay-300 group-hover/brand:opacity-100",children:[d.jsx("div",{className:"absolute -left-1 top-3 h-2 w-2 rotate-45 bg-zinc-900 dark:bg-zinc-700"}),d.jsxs("div",{className:"relative rounded-lg bg-zinc-900 px-3 py-2 text-xs shadow-lg dark:bg-zinc-700",children:[d.jsx("div",{className:"font-medium text-white",children:a.workspaceName}),a.gitBranch&&d.jsx("div",{className:"mt-0.5 font-mono text-emerald-400",children:a.gitBranch}),d.jsx("div",{className:"mt-1.5 break-words border-t border-zinc-700 pt-1.5 font-mono text-[10px] text-zinc-400 dark:border-zinc-600",children:a.projectRoot})]})]})]}),d.jsx("nav",{className:"flex-1 space-y-1 p-2",children:OA.map(({to:l,label:o,icon:c})=>{const f=l==="/"?e.pathname==="/":e.pathname.startsWith(l);return d.jsxs(In,{to:l,className:re("flex items-center gap-2 rounded-md px-3 py-2 text-sm transition-colors",f?"bg-zinc-200 font-medium text-zinc-900 dark:bg-zinc-800 dark:text-zinc-100":"text-zinc-600 hover:bg-zinc-100 hover:text-zinc-900 dark:text-zinc-400 dark:hover:bg-zinc-900 dark:hover:text-zinc-100"),children:[d.jsx(c,{className:"h-4 w-4"}),o,l==="/commands"&&r>0&&d.jsx("span",{className:"ml-auto inline-flex h-5 min-w-[20px] items-center justify-center rounded-full bg-indigo-500 px-1.5 text-[10px] font-semibold text-white",children:r})]},l)})}),d.jsx("div",{className:"border-t border-zinc-200 p-3 dark:border-zinc-800",children:d.jsxs("div",{role:"status","aria-label":`Connection status: ${t}`,className:"flex items-center gap-2 text-xs text-zinc-500 dark:text-zinc-400",children:[d.jsx("div",{className:re("h-2 w-2 rounded-full",MA[t]),"aria-hidden":"true"}),d.jsx("span",{className:"capitalize",children:t})]})})]})}const DA={system:FR,light:pA,dark:HR};function LA(e){if(e==="/")return[{label:"Home",path:"/"}];const t=e.split("/").filter(Boolean),r=[{label:"Home",path:"/"}];let a="";for(const l of t){a+=`/${l}`;const o=l.charAt(0).toUpperCase()+l.slice(1).replace(/-/g," ");r.push({label:o,path:a})}return r}function IA(){const{mode:e,cycle:t}=o1(),r=ai(),a=LA(r.pathname),l=DA[e];return d.jsxs("header",{className:"flex h-14 items-center justify-between border-b border-zinc-200 px-6 dark:border-zinc-800",children:[d.jsx("nav",{className:"flex items-center gap-1 text-sm","aria-label":"Breadcrumb",children:a.map((o,c)=>d.jsxs("span",{className:"flex items-center gap-1",children:[c>0&&d.jsx("span",{className:"text-zinc-400 dark:text-zinc-600",children:"/"}),c<a.length-1?d.jsx(In,{to:o.path,className:re("text-zinc-500 dark:text-zinc-400","hover:text-zinc-700 dark:hover:text-zinc-200"),children:o.label}):d.jsx("span",{className:"font-medium text-zinc-900 dark:text-zinc-100",children:o.label})]},o.path))}),d.jsxs("div",{className:"flex items-center gap-1",children:[d.jsx("a",{href:"https://github.com/spencermarx/open-code-review",target:"_blank",rel:"noopener noreferrer",className:"flex h-8 w-8 items-center justify-center rounded-md text-zinc-600 transition-colors hover:bg-zinc-100 hover:text-zinc-900 dark:text-zinc-400 dark:hover:bg-zinc-800 dark:hover:text-zinc-100","aria-label":"Documentation on GitHub",title:"Docs",children:d.jsx(sk,{className:"h-4 w-4"})}),d.jsx("button",{onClick:t,className:"flex h-8 w-8 items-center justify-center rounded-md text-zinc-600 transition-colors hover:bg-zinc-100 hover:text-zinc-900 dark:text-zinc-400 dark:hover:bg-zinc-800 dark:hover:text-zinc-100","aria-label":`Theme: ${e}. Click to cycle.`,title:`Theme: ${e}`,children:d.jsx(l,{className:"h-4 w-4"})})]})]})}function BA(){return d.jsxs("div",{className:"flex h-screen bg-white text-zinc-900 dark:bg-zinc-950 dark:text-zinc-100",children:[d.jsx(jA,{}),d.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[d.jsx(IA,{}),d.jsx("main",{className:"flex-1 overflow-y-auto p-6",children:d.jsx(ez,{})})]})]})}class UA extends _.Component{constructor(t){super(t),this.state={hasError:!1,error:null}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,r){console.error("ErrorBoundary caught a render error:",t,r.componentStack)}render(){return this.state.hasError?this.props.fallback?this.props.fallback:d.jsx("div",{className:"flex min-h-[200px] items-center justify-center",children:d.jsxs("div",{className:"max-w-md rounded-lg border border-red-200 bg-red-50 p-6 text-center dark:border-red-900/50 dark:bg-red-950/30",children:[d.jsx(Mo,{className:"mx-auto h-8 w-8 text-red-500"}),d.jsx("h2",{className:"mt-3 text-lg font-semibold text-zinc-900 dark:text-zinc-100",children:"Something went wrong"}),d.jsx("p",{className:"mt-1 text-sm text-zinc-600 dark:text-zinc-400",children:this.state.error?.message??"An unexpected error occurred."}),d.jsxs("button",{onClick:()=>this.setState({hasError:!1,error:null}),className:"mt-4 inline-flex items-center gap-2 rounded-md bg-zinc-900 px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-zinc-800 dark:bg-zinc-100 dark:text-zinc-900 dark:hover:bg-zinc-200",children:[d.jsx(vo,{className:"h-4 w-4"}),"Try again"]})]})}):this.props.children}}function Ti(){return d.jsx("div",{className:"flex min-h-[400px] items-center justify-center",children:d.jsxs("div",{className:"max-w-md rounded-lg border border-red-200 bg-red-50 p-8 text-center dark:border-red-900/50 dark:bg-red-950/30",children:[d.jsx(Mo,{className:"mx-auto h-10 w-10 text-red-500"}),d.jsx("h1",{className:"mt-4 text-xl font-semibold text-zinc-900 dark:text-zinc-100",children:"Page Error"}),d.jsx("p",{className:"mt-2 text-sm text-zinc-600 dark:text-zinc-400",children:"This page encountered an error. Try navigating back or refreshing."}),d.jsxs("div",{className:"mt-6 flex justify-center gap-3",children:[d.jsx("button",{onClick:()=>window.history.back(),className:"rounded-md border border-zinc-300 bg-white px-4 py-2 text-sm font-medium text-zinc-700 transition-colors hover:bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-900 dark:text-zinc-300 dark:hover:bg-zinc-800",children:"Go back"}),d.jsxs("button",{onClick:()=>window.location.reload(),className:"inline-flex items-center gap-2 rounded-md bg-zinc-900 px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-zinc-800 dark:bg-zinc-100 dark:text-zinc-900 dark:hover:bg-zinc-200",children:[d.jsx(vo,{className:"h-4 w-4"}),"Reload"]})]})]})})}function Ms({title:e,value:t,icon:r,trend:a}){return d.jsxs("div",{className:"rounded-lg border border-zinc-200 bg-white p-6 dark:border-zinc-800 dark:bg-zinc-900",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("span",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:e}),d.jsx(r,{className:"h-4 w-4 text-zinc-400 dark:text-zinc-500"})]}),d.jsxs("div",{className:"mt-2 flex items-baseline gap-2",children:[d.jsx("span",{className:"text-2xl font-semibold text-zinc-900 dark:text-zinc-100",children:t}),a&&d.jsx("span",{className:re("text-xs font-medium",a==="up"?"text-emerald-600 dark:text-emerald-400":"text-red-600 dark:text-red-400"),children:a==="up"?"↑":"↓"})]})]})}const sy={active:"bg-emerald-500/15 text-emerald-700 dark:text-emerald-400 border-emerald-500/25",closed:"bg-zinc-500/15 text-zinc-600 dark:text-zinc-400 border-zinc-500/25",unread:"bg-blue-500/15 text-blue-700 dark:text-blue-400 border-blue-500/25",read:"bg-zinc-500/15 text-zinc-600 dark:text-zinc-400 border-zinc-500/25",acknowledged:"bg-amber-500/15 text-amber-700 dark:text-amber-400 border-amber-500/25",fixed:"bg-emerald-500/15 text-emerald-700 dark:text-emerald-400 border-emerald-500/25",wont_fix:"bg-zinc-500/15 text-zinc-600 dark:text-zinc-400 border-zinc-500/25",needs_review:"bg-blue-500/15 text-blue-700 dark:text-blue-400 border-blue-500/25",in_progress:"bg-violet-500/15 text-violet-700 dark:text-violet-400 border-violet-500/25",changes_made:"bg-emerald-500/15 text-emerald-700 dark:text-emerald-400 border-emerald-500/25",dismissed:"bg-zinc-500/15 text-zinc-600 dark:text-zinc-400 border-zinc-500/25",critical:"bg-red-500/15 text-red-700 dark:text-red-400 border-red-500/25",high:"bg-orange-500/15 text-orange-700 dark:text-orange-400 border-orange-500/25",medium:"bg-amber-500/15 text-amber-700 dark:text-amber-400 border-amber-500/25",low:"bg-blue-500/15 text-blue-700 dark:text-blue-400 border-blue-500/25",info:"bg-zinc-500/15 text-zinc-600 dark:text-zinc-400 border-zinc-500/25",default:"bg-zinc-500/15 text-zinc-600 dark:text-zinc-400 border-zinc-500/25"},FA={wont_fix:"Won't Fix",needs_review:"Needs Review",in_progress:"In Progress",changes_made:"Changes Made"};function Xs({variant:e,label:t,className:r}){const a=t??FA[e]??e.charAt(0).toUpperCase()+e.slice(1);return d.jsx("span",{className:re("inline-flex items-center rounded-md border px-2 py-0.5 text-xs font-medium",sy[e]??sy.default,r),children:a})}function PA(e){return ri(e).toLocaleString(void 0,{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit"})}function HA(e){return ri(e).toLocaleDateString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function qA(e){return ri(e).toLocaleString()}function $A(e){const t=Math.floor((Date.now()-ri(e).getTime())/1e3);if(t<60)return"just now";const r=Math.floor(t/60);if(r<60)return`${r}m ago`;const a=Math.floor(r/60);return a<24?`${a}h ago`:`${Math.floor(a/24)}d ago`}function wu(e){const t=Date.now()-ri(e).getTime(),r=Math.floor(t/1e3);if(r<60)return`${r}s`;const a=Math.floor(r/60);if(a<60)return`${a}m`;const l=Math.floor(a/60);return l<24?`${l}h`:`${Math.floor(l/24)}d`}function GA(e){return e==null||Number.isNaN(e)?"-":e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`}function KA({sessions:e}){return e.length===0?d.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"No sessions yet. Run a code review or map to get started."}):d.jsx("div",{className:"space-y-1",children:e.map(t=>{const r=t.workflow_type==="map"?ya:ii;return d.jsxs(In,{to:`/sessions/${t.id}`,className:"flex items-center gap-3 rounded-md px-3 py-2 text-sm transition-colors hover:bg-zinc-100 dark:hover:bg-zinc-800/50",children:[d.jsx(Ys,{className:"h-4 w-4 shrink-0 text-zinc-400"}),d.jsx("span",{className:"min-w-0 flex-1 truncate text-zinc-900 dark:text-zinc-100",children:t.branch}),d.jsx(r,{className:"h-3.5 w-3.5 shrink-0 text-zinc-400"}),d.jsx(Xs,{variant:t.status}),d.jsx("span",{className:"shrink-0 text-xs text-zinc-400 dark:text-zinc-500",children:$A(t.updated_at)})]},t.id)})})}function VA(){const e=nn({queryKey:["stats"],queryFn:()=>Dt("/api/stats")}),t=nn({queryKey:["sessions","recent"],queryFn:()=>Dt("/api/sessions?limit=10")}),r=e.data;return d.jsxs("div",{className:"space-y-8",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-semibold",children:"Dashboard"}),d.jsx("p",{className:"mt-1 text-sm text-zinc-500 dark:text-zinc-400",children:"Overview of your code review activity."})]}),(e.isError||t.isError)&&d.jsx("div",{className:"rounded-lg border border-red-500/25 bg-red-500/5 p-4 text-sm text-red-600 dark:text-red-400",children:"Failed to load dashboard data. Check that the server is running."}),d.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:[d.jsx(Ms,{title:"Total Sessions",value:r?.totalSessions??0,icon:Ys}),d.jsx(Ms,{title:"Active Sessions",value:r?.activeSessions??0,icon:Ym}),d.jsx(Ms,{title:"Completed Reviews",value:r?.completedReviews??0,icon:ii}),d.jsx(Ms,{title:"Completed Maps",value:r?.completedMaps??0,icon:ya}),d.jsx(Ms,{title:"Files Tracked",value:r?.filesTracked??0,icon:cR}),d.jsx(Ms,{title:"Unresolved Blockers",value:r?.unresolvedBlockers??0,icon:Mo})]}),d.jsxs("div",{children:[d.jsx("h2",{className:"mb-4 text-lg font-medium text-zinc-900 dark:text-zinc-100",children:"Recent Sessions"}),d.jsx("div",{className:"rounded-lg border border-zinc-200 bg-white p-4 dark:border-zinc-800 dark:bg-zinc-900",children:t.isLoading?d.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Loading..."}):d.jsx(KA,{sessions:t.data??[]})})]})]})}function YA(){const e=An(),t=nn({queryKey:["sessions"],queryFn:()=>Dt("/api/sessions")});return ut("session:created",()=>{e.invalidateQueries({queryKey:["sessions"]})}),ut("session:updated",()=>{e.invalidateQueries({queryKey:["sessions"]})}),t}function QA(e){const t=An(),r=nn({queryKey:["sessions",e],queryFn:()=>Dt(`/api/sessions/${e}`),enabled:!!e});return ut("session:updated",()=>{t.invalidateQueries({queryKey:["sessions",e]})}),r}const XA=[{value:"all",label:"All"},{value:"active",label:"Active"},{value:"closed",label:"Closed"}],ZA=[{value:"all",label:"All"},{value:"review",label:"Review"},{value:"map",label:"Map"}];function ly({options:e,value:t,onChange:r,label:a}){return d.jsx("div",{role:"group","aria-label":a,className:"inline-flex rounded-md border border-zinc-200 dark:border-zinc-700",children:e.map((l,o)=>d.jsx("button",{onClick:()=>r(l.value),"aria-pressed":t===l.value,className:re("px-3 py-1.5 text-xs font-medium transition-colors",o>0&&"border-l border-zinc-200 dark:border-zinc-700",o===0&&"rounded-l-md",o===e.length-1&&"rounded-r-md",t===l.value?"bg-zinc-900 text-white dark:bg-zinc-100 dark:text-zinc-900":"bg-white text-zinc-600 hover:bg-zinc-50 dark:bg-zinc-900 dark:text-zinc-400 dark:hover:bg-zinc-800"),children:l.label},l.value))})}function WA({statusFilter:e,workflowFilter:t,onStatusChange:r,onWorkflowChange:a}){return d.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[d.jsx("span",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:"Status:"}),d.jsx(ly,{label:"Filter by status",options:XA,value:e,onChange:r}),d.jsx("span",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:"Workflow:"}),d.jsx(ly,{label:"Filter by workflow",options:ZA,value:t,onChange:a})]})}const _u={APPROVED:"bg-emerald-500/15 text-emerald-700 dark:text-emerald-400",APPROVE:"bg-emerald-500/15 text-emerald-700 dark:text-emerald-400",LGTM:"bg-emerald-500/15 text-emerald-700 dark:text-emerald-400","REQUEST CHANGES":"bg-red-500/15 text-red-700 dark:text-red-400","CHANGES REQUESTED":"bg-red-500/15 text-red-700 dark:text-red-400","NEEDS DISCUSSION":"bg-amber-500/15 text-amber-700 dark:text-amber-400","NEEDS WORK":"bg-amber-500/15 text-amber-700 dark:text-amber-400"};function JA(e){const t=e.trim().toUpperCase(),r=Object.keys(_u).sort((a,l)=>l.length-a.length);for(const a of r)if(t.startsWith(a))return a;return t.length>30?`${t.slice(0,30).trim()}…`:t}function e5(e){const t=e.trim().toUpperCase();if(_u[t])return _u[t];for(const[r,a]of Object.entries(_u))if(t.startsWith(r))return a;return"bg-amber-500/15 text-amber-700 dark:text-amber-400"}const t5=new Set(["changes_made","acknowledged","dismissed"]),n5={changes_made:"Changes Made",acknowledged:"Acknowledged",dismissed:"Dismissed"};function r5({session:e}){const r=e.has_review&&e.has_map?"Review + Map":e.has_map?"Map":"Review",l=(e.has_review?e.review_phase:e.map_phase).split("-").map(f=>f.charAt(0).toUpperCase()+f.slice(1)).join(" "),o=e.latest_round_status,c=o!=null&&t5.has(o);return d.jsxs(In,{to:`/sessions/${e.id}`,className:"group block rounded-lg border border-zinc-200 bg-white p-4 transition-colors hover:border-zinc-300 hover:bg-zinc-50 dark:border-zinc-800 dark:bg-zinc-900 dark:hover:border-zinc-700 dark:hover:bg-zinc-800/50",children:[d.jsxs("div",{className:"flex items-start justify-between gap-2",children:[d.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[d.jsx(Ys,{className:"h-4 w-4 shrink-0 text-zinc-400"}),d.jsx("span",{className:"truncate text-sm font-medium text-zinc-900 dark:text-zinc-100",children:e.branch})]}),d.jsx(Xs,{variant:e.status})]}),d.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-2 text-xs text-zinc-500 dark:text-zinc-400",children:[d.jsxs("span",{className:"flex items-center gap-1",children:[e.has_review&&d.jsx(ii,{className:"h-3.5 w-3.5"}),e.has_map&&d.jsx(ya,{className:"h-3.5 w-3.5"}),d.jsx("span",{children:r})]}),d.jsx("span",{className:"text-zinc-300 dark:text-zinc-700",children:"|"}),e.latest_verdict?d.jsx("span",{className:"flex items-center gap-1.5",children:c?d.jsx("span",{className:"inline-flex items-center rounded bg-zinc-500/10 px-1.5 py-0.5 text-[10px] font-semibold uppercase text-zinc-500 dark:text-zinc-400",children:n5[o]??o}):d.jsxs(d.Fragment,{children:[d.jsx("span",{className:re("inline-flex items-center rounded px-1.5 py-0.5 text-[10px] font-semibold uppercase",e5(e.latest_verdict)),children:JA(e.latest_verdict)}),e.latest_blocker_count>0&&d.jsxs("span",{className:"inline-flex items-center rounded bg-red-500/15 px-1.5 py-0.5 text-[10px] font-semibold text-red-700 dark:text-red-400",children:[e.latest_blocker_count," blocker",e.latest_blocker_count!==1?"s":""]})]})}):d.jsxs("span",{children:["Phase: ",l]})]}),d.jsxs("div",{className:"mt-2 flex items-center gap-3 text-xs text-zinc-400 dark:text-zinc-500",children:[d.jsx("span",{children:HA(e.started_at)}),d.jsxs("span",{className:"flex items-center gap-1",children:[d.jsx(ik,{className:"h-3 w-3"}),wu(e.updated_at)]})]})]})}function i5({sessions:e}){return e.length===0?d.jsx("p",{className:"py-8 text-center text-sm text-zinc-500 dark:text-zinc-400",children:"No sessions match your filters."}):d.jsx("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",children:e.map(t=>d.jsx(r5,{session:t},t.id))})}function a5(){const{data:e,isLoading:t}=YA(),[r,a]=_.useState("all"),[l,o]=_.useState("all"),c=_.useMemo(()=>e?e.filter(f=>!(r!=="all"&&f.status!==r||l!=="all"&&f.workflow_type!==l)):[],[e,r,l]);return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-semibold",children:"Sessions"}),d.jsx("p",{className:"mt-1 text-sm text-zinc-500 dark:text-zinc-400",children:"All code review and map sessions."})]}),d.jsx(WA,{statusFilter:r,workflowFilter:l,onStatusChange:a,onWorkflowChange:o}),t?d.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Loading sessions..."}):d.jsx(i5,{sessions:c})]})}function uk(e){const t=An(),r=nn({queryKey:["agent-sessions",e],queryFn:()=>Dt(`/api/agent-sessions?workflow=${encodeURIComponent(e??"")}`),enabled:!!e,refetchInterval:15e3});return ut("agent_session:updated",a=>{e&&(!a?.workflow_ids||a.workflow_ids.includes(e))&&t.invalidateQueries({queryKey:["agent-sessions",e]})}),r}function dk(e){return nn({queryKey:["handoff",e],queryFn:()=>Dt(`/api/sessions/${encodeURIComponent(e??"")}/handoff`),enabled:!!e,staleTime:5e3})}const s5=15*6e4;function fk(e){if(e.length===0)return{status:"idle",newestHeartbeat:null,liveRow:null,orphanedRow:null};const t=Date.now();let r=null,a=-1/0,l=null,o=-1/0,c=null,f=-1/0;for(const h of e){const m=l5(h.last_heartbeat_at);m>f&&(f=m,c=h.last_heartbeat_at),h.status==="running"&&m>a&&(a=m,r=h),h.status==="orphaned"&&m>o&&(o=m,l=h)}return r?{status:t-a<=s5?"running":"stalled",newestHeartbeat:c,liveRow:r,orphanedRow:null}:l?{status:"orphaned",newestHeartbeat:c,liveRow:null,orphanedRow:l}:{status:"idle",newestHeartbeat:c,liveRow:null,orphanedRow:null}}function l5(e){return/[Zz]$/.test(e)||/[+-]\d{2}:\d{2}$/.test(e)?new Date(e).getTime():new Date(e.replace(" ","T")+"Z").getTime()}function kh({phases:e,className:t}){return d.jsx("div",{role:"list","aria-label":"Phase timeline",className:re("flex items-center gap-1",t),children:e.map((r,a)=>d.jsxs("div",{className:"flex items-center gap-1",children:[d.jsx(o5,{phase:r}),a<e.length-1&&d.jsx("div",{className:re("h-px w-6",r.status==="complete"&&e[a+1]?.status!=="skipped"?"bg-emerald-500":"bg-zinc-300 dark:bg-zinc-700")})]},r.name))})}function o5({phase:e}){return d.jsxs("div",{className:"group relative flex flex-col items-center",children:[d.jsxs("div",{tabIndex:0,role:"listitem","aria-label":`${e.name}: ${e.status}${e.timestamp?`, ${e.timestamp}`:""}`,className:re("flex h-6 w-6 items-center justify-center rounded-full border",e.status==="complete"&&"border-emerald-500 bg-emerald-500 text-white",e.status==="active"&&"border-blue-500 bg-blue-500/10 text-blue-600 dark:text-blue-400",e.status==="pending"&&"border-zinc-300 bg-zinc-100 text-zinc-400 dark:border-zinc-600 dark:bg-zinc-800 dark:text-zinc-500",e.status==="skipped"&&"border-zinc-200 bg-zinc-50 text-zinc-300 dark:border-zinc-700 dark:bg-zinc-800/50 dark:text-zinc-600"),children:[e.status==="complete"&&d.jsx(Mr,{className:"h-3.5 w-3.5"}),e.status==="active"&&d.jsx(qr,{className:"h-3.5 w-3.5 animate-spin"}),e.status==="pending"&&d.jsx(PT,{className:"h-2.5 w-2.5"}),e.status==="skipped"&&d.jsx(xo,{className:"h-3 w-3"})]}),d.jsxs("div",{className:"pointer-events-none absolute top-8 hidden whitespace-nowrap rounded bg-zinc-900 px-2 py-1 text-xs text-white shadow-lg group-hover:block group-focus-within:block dark:bg-zinc-100 dark:text-zinc-900",children:[d.jsx("span",{className:"font-medium",children:e.name}),e.timestamp&&d.jsx("span",{className:"ml-1 text-zinc-400 dark:text-zinc-500",children:e.timestamp})]})]})}function c5({session:e}){const t=e.has_review,r=e.has_map,a=t?"review":"map",[l,o]=_.useState(a),f=[{id:"review",label:"Review",icon:ii,visible:t},{id:"map",label:"Map",icon:ya,visible:r}].filter(h=>h.visible);return f.length===0?d.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"No review or map data yet."}):d.jsxs("div",{children:[d.jsx("div",{className:"flex border-b border-zinc-200 dark:border-zinc-800",children:f.map(h=>d.jsxs("button",{onClick:()=>o(h.id),className:re("flex items-center gap-1.5 border-b-2 px-4 py-2 text-sm font-medium transition-colors",l===h.id?"border-zinc-900 text-zinc-900 dark:border-zinc-100 dark:text-zinc-100":"border-transparent text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-300"),children:[d.jsx(h.icon,{className:"h-4 w-4"}),h.label]},h.id))}),d.jsxs("div",{className:"mt-4",children:[l==="review"&&d.jsx(u5,{sessionId:e.id,status:e.status}),l==="map"&&d.jsx(d5,{sessionId:e.id,status:e.status})]})]})}function u5({sessionId:e,status:t}){const r=An();ut("artifact:created",()=>{r.invalidateQueries({queryKey:["sessions",e,"rounds"]})}),ut("artifact:updated",()=>{r.invalidateQueries({queryKey:["sessions",e,"rounds"]})});const{data:a,isLoading:l}=nn({queryKey:["sessions",e,"rounds"],queryFn:()=>Dt(`/api/sessions/${e}/rounds`),enabled:!!e});return l?d.jsxs("p",{className:"flex items-center gap-2 text-sm text-zinc-500 dark:text-zinc-400",children:[d.jsx(qr,{className:"h-4 w-4 animate-spin"}),"Loading rounds..."]}):!a||a.length===0?d.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:t==="closed"?"This session was closed without completing any review rounds.":"Review in progress — no completed rounds yet."}):d.jsx("div",{className:"space-y-2",children:a.map(o=>d.jsxs(In,{to:`/sessions/${e}/reviews/${o.round_number}`,className:"flex items-center gap-2 rounded-md px-3 py-2 text-sm transition-colors hover:bg-zinc-100 dark:hover:bg-zinc-800/50",children:[d.jsx(ii,{className:"h-4 w-4 text-zinc-400"}),d.jsxs("span",{className:"text-zinc-900 dark:text-zinc-100",children:["Round ",o.round_number]}),d.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[o.progress&&d.jsx(Xs,{variant:o.progress.status}),o.verdict&&d.jsx("span",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:o.verdict})]})]},o.round_number))})}function d5({sessionId:e,status:t}){const r=An();ut("artifact:created",()=>{r.invalidateQueries({queryKey:["sessions",e,"runs"]})}),ut("artifact:updated",()=>{r.invalidateQueries({queryKey:["sessions",e,"runs"]})});const{data:a,isLoading:l}=nn({queryKey:["sessions",e,"runs"],queryFn:()=>Dt(`/api/sessions/${e}/runs`),enabled:!!e});return l?d.jsxs("p",{className:"flex items-center gap-2 text-sm text-zinc-500 dark:text-zinc-400",children:[d.jsx(qr,{className:"h-4 w-4 animate-spin"}),"Loading runs..."]}):!a||a.length===0?d.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:t==="closed"?"This session was closed without completing any map runs.":"Map in progress — no completed runs yet."}):d.jsx("div",{className:"space-y-2",children:a.map(o=>d.jsxs(In,{to:`/sessions/${e}/maps/${o.run_number}`,className:"flex items-center gap-2 rounded-md px-3 py-2 text-sm transition-colors hover:bg-zinc-100 dark:hover:bg-zinc-800/50",children:[d.jsx(ya,{className:"h-4 w-4 text-zinc-400"}),d.jsxs("span",{className:"text-zinc-900 dark:text-zinc-100",children:["Run ",o.run_number]})]},o.run_number))})}const f5={running:{label:"Running",icon:Ym,iconClass:"text-emerald-600 dark:text-emerald-400",border:"border-emerald-500/30",bg:"bg-emerald-500/5 dark:bg-emerald-500/10",descriptor:e=>e?`Last activity ${wu(e)} ago`:"Active agent session"},stalled:{label:"Stalled",icon:Mo,iconClass:"text-amber-600 dark:text-amber-400",border:"border-amber-500/30",bg:"bg-amber-500/5 dark:bg-amber-500/10",descriptor:e=>e?`Last activity ${wu(e)} ago — your AI may have crashed`:"No recent heartbeat"},orphaned:{label:"Orphaned",icon:BT,iconClass:"text-zinc-500 dark:text-zinc-400",border:"border-zinc-300 dark:border-zinc-700",bg:"bg-zinc-100/50 dark:bg-zinc-800/30",descriptor:e=>e?`Auto-marked after ${wu(e)} of inactivity`:"Reclassified by sweep"},idle:{label:"Idle",icon:co,iconClass:"text-zinc-400 dark:text-zinc-500",border:"border-zinc-200 dark:border-zinc-800",bg:"bg-white dark:bg-zinc-900",descriptor:()=>"No active agent sessions"}};function h5({workflowId:e}){const{data:t,isLoading:r}=uk(e);if(r||!t)return null;const a=t.agent_sessions;if(a.length===0)return null;const{status:l,newestHeartbeat:o}=fk(a);if(l==="idle")return null;const c=f5[l];if(!c)return null;const f=c.icon;return d.jsxs("div",{role:"status","aria-live":"polite",className:re("flex items-start gap-3 rounded-lg border px-4 py-3",c.border,c.bg),children:[d.jsx(f,{className:re("mt-0.5 h-5 w-5 shrink-0",c.iconClass),"aria-hidden":!0}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"text-sm font-semibold text-zinc-900 dark:text-zinc-100",children:c.label}),o&&d.jsx("span",{className:"text-xs tabular-nums text-zinc-500 dark:text-zinc-400",title:ri(o).toLocaleString(),children:ri(o).toLocaleTimeString()})]}),d.jsx("p",{className:"text-xs text-zinc-600 dark:text-zinc-400",children:c.descriptor(o)}),d.jsx(m5,{rows:a})]})]})}function m5({rows:e}){if(e.length===0)return null;const t={};for(const l of e)t[l.status]=(t[l.status]??0)+1;const a=["running","done","orphaned","crashed","cancelled","spawning"].filter(l=>t[l]).map(l=>`${t[l]} ${l}`).join(" · ");return a?d.jsx("p",{className:"mt-1 text-[11px] uppercase tracking-wide text-zinc-500 dark:text-zinc-500",children:a}):null}const p5={claude:"Claude Code",opencode:"OpenCode",gemini:"Gemini CLI"};function hk(e){return e?p5[e]??e:"—"}function Wm({workflowId:e,onClose:t}){const{data:r,isLoading:a,error:l}=dk(e??void 0),o=_.useRef(null);if(_.useEffect(()=>{if(!e)return;const m=g=>{g.key==="Escape"&&t()};return window.addEventListener("keydown",m),o.current?.focus(),()=>window.removeEventListener("keydown",m)},[e,t]),!e)return null;const c=r?.outcome,f=c?.kind==="resumable"?c.vendor:c?.kind==="unresumable"?c.diagnostics.vendor:null,h=r?.projectDir??null;return a1.createPortal(d.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-6 backdrop-blur-sm",onClick:t,children:d.jsxs("div",{ref:o,role:"dialog","aria-modal":"true","aria-labelledby":"handoff-title",tabIndex:-1,onClick:m=>m.stopPropagation(),className:"flex max-h-[90vh] w-full max-w-xl flex-col overflow-hidden rounded-xl border border-zinc-200 bg-white shadow-2xl outline-none dark:border-zinc-800 dark:bg-zinc-900",children:[d.jsxs("div",{className:"flex items-center gap-3 border-b border-zinc-200 px-5 py-3.5 dark:border-zinc-800",children:[d.jsx(Oi,{className:"h-5 w-5 shrink-0 text-zinc-500 dark:text-zinc-400"}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsx("h2",{id:"handoff-title",className:"text-sm font-semibold text-zinc-900 dark:text-zinc-100",children:"Pick up this review in your terminal"}),d.jsx("p",{className:"truncate text-xs text-zinc-500 dark:text-zinc-400",children:c?d.jsxs(d.Fragment,{children:["AI CLI: ",d.jsx("span",{className:"font-medium",children:hk(f)}),h&&d.jsxs(d.Fragment,{children:[d.jsx("span",{className:"mx-1",children:"·"}),"Project: ",d.jsx("span",{className:"font-mono",children:h})]})]}):"Loading…"})]}),d.jsx("button",{type:"button",onClick:t,"aria-label":"Close",className:"rounded-md p-1 text-zinc-400 hover:bg-zinc-100 hover:text-zinc-600 dark:text-zinc-500 dark:hover:bg-zinc-800 dark:hover:text-zinc-300",children:d.jsx(Bn,{className:"h-4 w-4"})})]}),d.jsxs("div",{className:"flex-1 overflow-y-auto px-5 py-4",children:[a&&d.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Loading handoff details…"}),l&&d.jsxs("div",{className:"flex items-start gap-2 rounded-lg border border-red-200 bg-red-50 p-3 text-sm text-red-700 dark:border-red-900/50 dark:bg-red-950/40 dark:text-red-300",children:[d.jsx(Vu,{className:"mt-0.5 h-4 w-4 shrink-0"}),d.jsxs("span",{children:["Couldn't load handoff details. ",l.message]})]}),c?.kind==="resumable"&&d.jsx(g5,{outcome:c,projectDir:r?.projectDir??""}),c?.kind==="unresumable"&&d.jsx(b5,{outcome:c})]})]})}),document.body)}function g5({outcome:e,projectDir:t}){const r=hk(e.vendor),a=`cd ${t}`,l=e.vendorCommand,o=`Resume directly in ${r}`;return d.jsxs("div",{className:"space-y-4",children:[d.jsx(oy,{index:1,label:"Open the project directory",command:a,copyAriaLabel:"Copy cd command"}),d.jsx(oy,{index:2,label:o,command:l,copyAriaLabel:"Copy resume command"}),d.jsx("div",{className:"border-t border-zinc-200 pt-3 text-xs text-zinc-500 dark:border-zinc-800 dark:text-zinc-400",children:d.jsxs("p",{children:["Requires ",d.jsx("span",{className:"font-medium",children:r})," on your"," ",d.jsx("span",{className:"font-mono",children:"$PATH"}),!e.hostBinaryAvailable&&d.jsxs(d.Fragment,{children:[" ","— we couldn't see it from the dashboard. Install it to resume in your terminal."]}),"."]})}),d.jsx("div",{className:"flex justify-end",children:d.jsx(v5,{commands:[a,l]})})]})}function b5({outcome:e}){const{microcopy:t}=e.diagnostics;return d.jsxs("div",{className:"space-y-4",children:[d.jsx("div",{className:"rounded-md border border-amber-300/40 bg-amber-50 px-4 py-3 text-sm text-amber-900 dark:border-amber-700/40 dark:bg-amber-950/30 dark:text-amber-200",children:d.jsxs("div",{className:"flex items-start gap-2",children:[d.jsx(Mo,{"aria-hidden":!0,className:"mt-0.5 h-4 w-4 shrink-0"}),d.jsxs("div",{className:"space-y-1",children:[d.jsx("p",{className:"font-medium",children:t.headline}),d.jsxs("p",{className:"text-xs opacity-90",children:[d.jsx("span",{className:"font-medium",children:"Why: "}),t.cause]}),d.jsxs("p",{className:"text-xs opacity-90",children:[d.jsx("span",{className:"font-medium",children:"Try: "}),t.remediation]})]})]})}),d.jsx(x5,{diagnostics:e.diagnostics,reason:e.reason})]})}function x5({diagnostics:e,reason:t}){const[r,a]=_.useState(!1),l=[`reason: ${t}`,`vendor: ${e.vendor??"unknown"}`,`vendorBinaryAvailable: ${e.vendorBinaryAvailable}`,`invocationsForWorkflow: ${e.invocationsForWorkflow}`,`sessionIdEventsObserved: ${e.sessionIdEventsObserved}`].join(`
527
+ `),o=()=>{navigator.clipboard.writeText(l).then(()=>{a(!0),setTimeout(()=>a(!1),1500)}).catch(()=>{})};return d.jsxs("div",{className:"rounded-md border border-zinc-200 bg-zinc-50 px-4 py-3 dark:border-zinc-800 dark:bg-zinc-900/50",children:[d.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[d.jsx("p",{className:"text-[11px] font-medium uppercase tracking-wider text-zinc-500 dark:text-zinc-500",children:"Diagnostic data"}),d.jsx("button",{type:"button",onClick:o,className:"inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[11px] text-zinc-600 transition-colors hover:bg-zinc-100 dark:text-zinc-400 dark:hover:bg-zinc-800",children:r?d.jsxs(d.Fragment,{children:[d.jsx(Mr,{className:"h-3 w-3"}),"Copied"]}):d.jsxs(d.Fragment,{children:[d.jsx(Yu,{className:"h-3 w-3"}),"Copy for issue report"]})})]}),d.jsx("pre",{className:"whitespace-pre-wrap font-mono text-[11px] leading-relaxed text-zinc-700 dark:text-zinc-300",children:l})]})}function oy({index:e,label:t,command:r,copyAriaLabel:a}){return d.jsxs("div",{children:[d.jsxs("div",{className:"mb-1 flex items-center gap-2 text-xs uppercase tracking-wide text-zinc-500 dark:text-zinc-500",children:[d.jsx("span",{className:"inline-flex h-4 w-4 items-center justify-center rounded-full bg-zinc-200 text-[10px] font-semibold text-zinc-700 dark:bg-zinc-800 dark:text-zinc-300",children:e}),d.jsx("span",{children:t})]}),d.jsxs("div",{className:"flex items-stretch gap-2",children:[d.jsx("pre",{className:"min-w-0 flex-1 overflow-x-auto rounded-md border border-zinc-200 bg-zinc-50 px-3 py-2 font-mono text-xs text-zinc-800 dark:border-zinc-800 dark:bg-zinc-900 dark:text-zinc-200",children:r}),d.jsx(y5,{text:r,ariaLabel:a})]})]})}function y5({text:e,ariaLabel:t}){const[r,a]=_.useState(!1);return d.jsx("button",{type:"button","aria-label":t,onClick:()=>{navigator.clipboard.writeText(e).then(()=>{a(!0),setTimeout(()=>a(!1),1500)}).catch(()=>{a(!1)})},className:re("inline-flex shrink-0 items-center gap-1 rounded-md border px-2.5 py-2 text-xs font-medium transition",r?"border-emerald-500/40 bg-emerald-500/10 text-emerald-700 dark:text-emerald-400":"border-zinc-200 bg-white text-zinc-600 hover:border-zinc-300 hover:bg-zinc-50 dark:border-zinc-800 dark:bg-zinc-900 dark:text-zinc-400 dark:hover:border-zinc-700"),children:r?d.jsxs(d.Fragment,{children:[d.jsx(Mr,{className:"h-3.5 w-3.5"}),d.jsx("span",{"aria-live":"polite",children:"Copied"})]}):d.jsxs(d.Fragment,{children:[d.jsx(Yu,{className:"h-3.5 w-3.5"}),d.jsx("span",{children:"Copy"})]})})}function v5({commands:e}){const[t,r]=_.useState(!1);return d.jsx("button",{type:"button",onClick:()=>{navigator.clipboard.writeText(e.join(`
528
+ `)).then(()=>{r(!0),setTimeout(()=>r(!1),1500)}).catch(()=>r(!1))},className:re("inline-flex items-center gap-1.5 rounded-md border px-3 py-1.5 text-xs font-medium transition",t?"border-emerald-500/40 bg-emerald-500/10 text-emerald-700 dark:text-emerald-400":"border-zinc-200 bg-white text-zinc-700 hover:bg-zinc-50 dark:border-zinc-800 dark:bg-zinc-900 dark:text-zinc-300 dark:hover:bg-zinc-800/50"),children:t?d.jsxs(d.Fragment,{children:[d.jsx(Mr,{className:"h-3.5 w-3.5"}),d.jsx("span",{"aria-live":"polite",children:"Copied both"})]}):d.jsxs(d.Fragment,{children:[d.jsx(Yu,{className:"h-3.5 w-3.5"}),d.jsx("span",{children:"Copy both"})]})})}function k5({workflowId:e,variant:t="paused"}){const{socket:r}=si(),a=Hu(),[l,o]=_.useState(!1),c=dk(l?e:void 0),f=!r,h=_.useCallback(()=>{r&&(r.emit("command:run",{command:`review --resume ${e}`}),a("/"))},[r,e,a]),m=t==="paused",g=m?"This review is paused.":"Continue this review in your terminal.",x=m?"Bring the AI back where it left off, or hand off the resume command to your terminal.":"Copy the resume command and pick up the AI conversation in your own terminal.";return d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:re("flex flex-col gap-3 rounded-lg border px-4 py-3 sm:flex-row sm:items-center sm:justify-between","border-zinc-200 bg-white dark:border-zinc-800 dark:bg-zinc-900"),children:[d.jsxs("div",{className:"min-w-0",children:[d.jsx("p",{className:"text-sm font-medium text-zinc-900 dark:text-zinc-100",children:g}),d.jsx("p",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:x})]}),d.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[m&&d.jsxs("button",{type:"button",onClick:h,disabled:f,className:re("inline-flex items-center gap-1.5 rounded-md px-3 py-1.5 text-sm font-medium transition","bg-zinc-900 text-white hover:bg-zinc-800","dark:bg-zinc-100 dark:text-zinc-900 dark:hover:bg-zinc-200",f&&"cursor-not-allowed opacity-50"),children:[d.jsx($s,{className:"h-3.5 w-3.5","aria-hidden":!0}),d.jsx("span",{children:"Continue from where you left off"})]}),d.jsxs("button",{type:"button",onClick:()=>o(!0),className:re("inline-flex items-center gap-1.5 rounded-md border px-3 py-1.5 text-sm font-medium transition",m?"border-zinc-200 bg-white text-zinc-700 hover:bg-zinc-50 dark:border-zinc-800 dark:bg-zinc-900 dark:text-zinc-300 dark:hover:bg-zinc-800/50":"border-zinc-900 bg-zinc-900 text-white hover:bg-zinc-800 dark:border-zinc-100 dark:bg-zinc-100 dark:text-zinc-900 dark:hover:bg-zinc-200"),children:[d.jsx(Oi,{className:"h-3.5 w-3.5","aria-hidden":!0}),d.jsx("span",{children:"Resume in terminal"})]})]})]}),l&&d.jsx(Wm,{workflowId:e,onClose:()=>o(!1)}),d.jsx("span",{className:"sr-only",children:c.data?"handoff ready":""})]})}const w5=["context","change-context","analysis","reviews","aggregation","discourse","synthesis","complete"],_5=["map-context","topology","flow-analysis","requirements-mapping","synthesis","complete"];function wh(e){return e.split("-").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}function _h(e,t,r,a){const l=e==="map"?_5:w5,o=l.length;return r>=o?l.map(c=>({name:wh(c),status:"complete"})):a==="closed"?l.map((c,f)=>({name:wh(c),status:f+1<=r?"complete":"skipped"})):l.map((c,f)=>({name:wh(c),status:f+1<r?"complete":f+1===r?"active":"pending"}))}function E5(){const{id:e}=qu(),t=An(),{data:r,isLoading:a}=QA(e??""),l=nn({queryKey:["sessions",e,"events"],queryFn:()=>Dt(`/api/sessions/${e}/events`),enabled:!!e}),o=uk(e??void 0),c=o.data?fk(o.data.agent_sessions):null,f=o.data?.agent_sessions.some(y=>y.vendor_session_id!=null)??!1,h=c?.status==="stalled"||c?.status==="orphaned",m=h||f;if(ut("session:events",()=>{t.invalidateQueries({queryKey:["sessions",e,"events"]})}),a)return d.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Loading session..."});if(!r)return d.jsxs("div",{children:[d.jsxs(In,{to:"/sessions",className:"mb-4 inline-flex items-center gap-1 text-sm text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-300",children:[d.jsx(xa,{className:"h-4 w-4"}),"Back to sessions"]}),d.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Session not found."})]});const g=r.has_review&&r.has_map,x=g?"Review + Map":r.has_map?"Map":"Review";return d.jsxs("div",{className:"space-y-6",children:[d.jsxs(In,{to:"/sessions",className:"inline-flex items-center gap-1 text-sm text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-300",children:[d.jsx(xa,{className:"h-4 w-4"}),"Back to sessions"]}),e&&d.jsx(h5,{workflowId:e}),e&&m&&d.jsx(k5,{workflowId:e,variant:h?"paused":"completed"}),d.jsxs("div",{className:"rounded-lg border border-zinc-200 bg-white p-6 dark:border-zinc-800 dark:bg-zinc-900",children:[d.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[d.jsxs("div",{className:"space-y-1",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(Ys,{className:"h-5 w-5 text-zinc-400"}),d.jsx("h1",{className:"text-xl font-semibold text-zinc-900 dark:text-zinc-100",children:r.branch})]}),d.jsxs("div",{className:"flex items-center gap-3 text-sm text-zinc-500 dark:text-zinc-400",children:[d.jsxs("span",{className:"flex items-center gap-1",children:[r.has_review&&d.jsx(ii,{className:"h-4 w-4"}),r.has_map&&d.jsx(ya,{className:"h-4 w-4"}),d.jsx("span",{children:x})]}),d.jsxs("span",{className:"flex items-center gap-1",children:[d.jsx(ik,{className:"h-4 w-4"}),PA(r.started_at)]})]})]}),d.jsx(Xs,{variant:r.status})]}),d.jsxs("div",{className:"mt-6",children:[d.jsx("h3",{className:"mb-2 text-xs font-medium uppercase tracking-wide text-zinc-500 dark:text-zinc-400",children:"Progress"}),g?d.jsxs("div",{className:"space-y-3",children:[d.jsxs("div",{children:[d.jsxs("div",{className:"mb-1 flex items-center gap-1.5 text-xs text-zinc-500 dark:text-zinc-400",children:[d.jsx(ii,{className:"h-3.5 w-3.5"}),d.jsx("span",{children:"Review"})]}),d.jsx(kh,{phases:_h("review",r.review_phase,r.review_phase_number,r.status)})]}),d.jsxs("div",{children:[d.jsxs("div",{className:"mb-1 flex items-center gap-1.5 text-xs text-zinc-500 dark:text-zinc-400",children:[d.jsx(ya,{className:"h-3.5 w-3.5"}),d.jsx("span",{children:"Map"})]}),d.jsx(kh,{phases:_h("map",r.map_phase,r.map_phase_number,r.status)})]})]}):d.jsx(kh,{phases:_h(r.has_map?"map":"review",r.has_map?r.map_phase:r.review_phase,r.has_map?r.map_phase_number:r.review_phase_number,r.status)})]})]}),d.jsx("div",{className:"rounded-lg border border-zinc-200 bg-white p-6 dark:border-zinc-800 dark:bg-zinc-900",children:d.jsx(c5,{session:r})}),d.jsxs("div",{className:"rounded-lg border border-zinc-200 bg-white p-6 dark:border-zinc-800 dark:bg-zinc-900",children:[d.jsx("h2",{className:"mb-4 text-sm font-medium text-zinc-900 dark:text-zinc-100",children:"Event Log"}),l.isLoading?d.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Loading events..."}):(l.data??[]).length===0?d.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"No events recorded."}):d.jsx("div",{className:"space-y-2",children:(l.data??[]).map(y=>d.jsxs("div",{className:"flex items-start gap-3 rounded-md px-3 py-2 text-sm hover:bg-zinc-50 dark:hover:bg-zinc-800/50",children:[d.jsx("span",{className:"shrink-0 text-xs tabular-nums text-zinc-400 dark:text-zinc-500",children:ri(y.created_at).toLocaleTimeString()}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsx("span",{className:"font-medium text-zinc-900 dark:text-zinc-100",children:y.event_type}),y.phase&&d.jsxs("span",{className:"ml-2 text-zinc-500 dark:text-zinc-400",children:["Phase: ",y.phase]}),y.round!=null&&d.jsxs("span",{className:"ml-2 text-zinc-500 dark:text-zinc-400",children:["Round: ",y.round]})]})]},y.id))})]})]})}function jo(){const{data:e}=Qs(),t=e?.aiCli?.active??null,r=e?.aiCli?.available??[],a=e?.aiCli?.preferred??"auto";return{isAvailable:t!=null,activeCli:t,availableClis:r,isDisabledByConfig:a==="off"&&r.length>0}}function Jm(){const e=An(),{data:t,isLoading:r}=nn({queryKey:["reviewers"],queryFn:()=>Dt("/api/reviewers")});return ut("reviewers:updated",a=>{e.setQueryData(["reviewers"],a)}),{reviewers:t?.reviewers??[],defaults:t?.defaults??[],isLoaded:!r}}const N5={activity:Ym,blocks:NT,bot:TT,layers:zR,compass:VT,layout:$R,server:iA,cloud:GT,gauge:gR,accessibility:pT,database:WT,rocket:XR,terminal:Oi,smartphone:uA,crown:XT,sparkles:Oo,"shield-alert":Xm,"test-tubes":wA,"file-text":Ao,brain:tk,user:Va};function Zs({icon:e,className:t="h-4 w-4"}){const r=N5[e]??Va;return d.jsx(r,{className:t})}function S5({reviewers:e,selection:t,isLoaded:r,disabled:a,onRemove:l,onCustomize:o}){if(!r)return d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("label",{className:"w-28 shrink-0 text-right text-xs font-medium text-zinc-500 dark:text-zinc-400",children:"Reviewers"}),d.jsx("div",{className:"flex h-8 items-center text-xs text-zinc-400 dark:text-zinc-500",children:"Loading..."})]});if(e.length===0)return d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("label",{className:"w-28 shrink-0 text-right text-xs font-medium text-zinc-500 dark:text-zinc-400",children:"Reviewers"}),d.jsxs("p",{className:"text-xs text-zinc-400 dark:text-zinc-500",children:["Run ",d.jsx("code",{className:"rounded bg-zinc-100 px-1 py-0.5 dark:bg-zinc-800",children:"/ocr:sync-reviewers"})," to customize your review team"]})]});const c=t.filter(m=>!m.description),f=t.filter(m=>m.description),h=c.map(m=>{const g=e.find(x=>x.id===m.id);return g?{...g,count:m.count}:null}).filter(Boolean);return d.jsxs("div",{className:"flex items-start gap-3",children:[d.jsx("label",{className:"w-28 shrink-0 pt-1.5 text-right text-xs font-medium text-zinc-500 dark:text-zinc-400",children:"Reviewers"}),d.jsxs("div",{className:"flex flex-1 flex-wrap items-center gap-1.5",children:[h.map(m=>d.jsxs("span",{className:re("inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-xs","border-zinc-200 bg-zinc-50 text-zinc-700","dark:border-zinc-700 dark:bg-zinc-800 dark:text-zinc-300"),children:[d.jsx(Zs,{icon:m.icon,className:"h-3 w-3 text-zinc-400 dark:text-zinc-500"}),d.jsx("span",{className:"max-w-[120px] truncate",children:m.name}),m.count>1&&d.jsxs("span",{className:"text-[10px] text-zinc-400 dark:text-zinc-500",children:["x",m.count]}),!a&&d.jsx("button",{type:"button",onClick:()=>l(m.id),className:"ml-0.5 rounded-full p-0.5 text-zinc-400 hover:bg-zinc-200 hover:text-zinc-600 dark:text-zinc-500 dark:hover:bg-zinc-700 dark:hover:text-zinc-300","aria-label":`Remove ${m.name}`,children:d.jsx(Bn,{className:"h-2.5 w-2.5"})})]},m.id)),f.map(m=>d.jsxs("span",{title:m.description,className:re("inline-flex items-center gap-1 rounded-full border border-dashed px-2 py-0.5 text-xs italic","border-amber-300 bg-amber-50 text-amber-700","dark:border-amber-700 dark:bg-amber-950/30 dark:text-amber-300"),children:[d.jsx(yo,{className:"h-3 w-3 shrink-0"}),d.jsx("span",{className:"max-w-[160px] truncate",children:m.description}),m.count>1&&d.jsxs("span",{className:"text-[10px] text-amber-400 dark:text-amber-500",children:["x",m.count]}),!a&&d.jsx("button",{type:"button",onClick:()=>l(m.id),className:"ml-0.5 rounded-full p-0.5 text-amber-400 hover:bg-amber-200 hover:text-amber-600 dark:text-amber-500 dark:hover:bg-amber-800 dark:hover:text-amber-300","aria-label":"Remove ephemeral reviewer",children:d.jsx(Bn,{className:"h-2.5 w-2.5"})})]},m.id)),d.jsxs("button",{type:"button",disabled:a,onClick:o,className:re("inline-flex items-center gap-1 rounded-full border border-dashed px-2.5 py-0.5 text-xs transition-colors","border-zinc-300 text-zinc-500 hover:border-indigo-400 hover:text-indigo-600","dark:border-zinc-600 dark:text-zinc-400 dark:hover:border-indigo-400 dark:hover:text-indigo-400","disabled:cursor-not-allowed disabled:opacity-50"),children:[d.jsx(ok,{className:"h-3 w-3"}),"Customize..."]})]})]})}const Ou={holistic:{label:"Generalists",order:0},specialist:{label:"Specialists",order:1},persona:{label:"Famous Engineers",order:2},custom:{label:"Custom",order:3}};function mk(e,t){if(!t.trim())return e;const r=t.toLowerCase();return e.filter(a=>a.name.toLowerCase().includes(r)||a.description.toLowerCase().includes(r)||a.focus_areas.some(l=>l.toLowerCase().includes(r))||a.known_for?.toLowerCase().includes(r))}function pk(e){const t=new Map;for(const r of e){const a=t.get(r.tier)??[];a.push(r),t.set(r.tier,a)}return[...t.entries()].sort((r,a)=>Ou[r[0]].order-Ou[a[0]].order)}function z5(e){return e.toLowerCase().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}function gk(e){return nn({queryKey:["team","resolved","disk"],queryFn:()=>Dt("/api/team/resolved"),staleTime:5e3})}function bk(e){return nn({queryKey:["models",e??"auto"],queryFn:()=>Dt(e?`/api/team/models?vendor=${encodeURIComponent(e)}`:"/api/team/models"),staleTime:6e4})}function C5(){const e=An();return Ro({mutationFn:async t=>{const r=await fetch("/api/team/default",{method:"POST",headers:{"Content-Type":"application/json",...E1()},body:JSON.stringify({team:t})});if(!r.ok){const a=await r.text().catch(()=>"");throw new Error(`${r.status}: ${a||r.statusText}`)}return r.json()},onSuccess:()=>{e.invalidateQueries({queryKey:["team"]}),e.invalidateQueries({queryKey:["reviewers"]})}})}const cy="\0custom";function ko({value:e,options:t,onChange:r,freeText:a=!1,freeTextPlaceholder:l="Type model id…",disabled:o=!1,className:c,allowCustom:f=!1,ariaLabel:h,defaultOpen:m=!1,onOpenChange:g}){const[x,y]=_.useState(m),[v,k]=_.useState(!1),[E,S]=_.useState(-1),N=_.useRef(null),O=_.useRef(null),T=_.useRef(null),P=_.useId(),$=M=>{y(Y=>{const V=typeof M=="function"?M(Y):M;return V!==Y&&g?.(V),V})},j=t.some(M=>M.id===e),G=[...e&&!j?[{id:e,label:e,detail:"(custom)"}]:[],...t,...f&&!a?[{id:cy,label:"Custom…",detail:"type any model id"}]:[]],A=a||v;_.useEffect(()=>{if(!x)return;const M=Y=>{N.current&&(N.current.contains(Y.target)||$(!1))};return document.addEventListener("mousedown",M),()=>document.removeEventListener("mousedown",M)},[x]),_.useEffect(()=>{if(!x)return;const M=Y=>{Y.key==="Escape"&&(Y.preventDefault(),$(!1),O.current?.focus())};return window.addEventListener("keydown",M),()=>window.removeEventListener("keydown",M)},[x]);const ie=G.find(M=>M.id===e)??G[0]??null,F=ie?G.findIndex(M=>M.id===ie.id):-1;_.useEffect(()=>{x&&S(F>=0?F:0)},[x,F]),_.useEffect(()=>{v&&T.current?.focus()},[v]);function ee(M){if(M.id===cy){$(!1),k(!0);return}r(M.id),$(!1),O.current?.focus()}function te(M){(M.key==="ArrowDown"||M.key==="ArrowUp"||M.key==="Enter"||M.key===" ")&&(M.preventDefault(),$(!0))}function we(M){if(M.key==="ArrowDown")M.preventDefault(),S(Y=>Math.min(G.length-1,(Y<0?-1:Y)+1));else if(M.key==="ArrowUp")M.preventDefault(),S(Y=>Math.max(0,(Y<0?G.length:Y)-1));else if(M.key==="Home")M.preventDefault(),S(0);else if(M.key==="End")M.preventDefault(),S(G.length-1);else if(M.key==="Enter"||M.key===" "){if(M.preventDefault(),E>=0&&E<G.length){const Y=G[E];Y&&ee(Y)}}else M.key==="Tab"&&$(!1)}if(A)return d.jsxs("div",{className:re("flex items-center gap-1",c),children:[d.jsx("input",{ref:T,type:"text",value:e,placeholder:l,disabled:o,onChange:M=>r(M.target.value),onKeyDown:M=>{M.key==="Escape"&&v&&(M.preventDefault(),k(!1))},"aria-label":h,className:re("w-full min-w-0 flex-1 rounded-md border bg-white px-2.5 py-1.5 font-mono text-xs","border-zinc-200 text-zinc-700 placeholder:text-zinc-400","focus:border-indigo-400 focus:outline-none focus:ring-1 focus:ring-indigo-400/50","dark:border-zinc-700 dark:bg-zinc-900 dark:text-zinc-300 dark:placeholder:text-zinc-500","disabled:cursor-not-allowed disabled:opacity-50")}),v&&d.jsx("button",{type:"button",onClick:()=>k(!1),"aria-label":"Back to model list",title:"Back to model list",className:re("shrink-0 rounded-md border p-1.5 text-zinc-500 transition","border-zinc-200 hover:bg-zinc-50 hover:text-zinc-700","dark:border-zinc-700 dark:hover:bg-zinc-800 dark:hover:text-zinc-300"),children:d.jsx(MR,{className:"h-3.5 w-3.5","aria-hidden":!0})})]});const se=ie?.label??l,Q=ie?.detail;return d.jsxs("div",{ref:N,className:re("relative",c),children:[d.jsxs("button",{ref:O,type:"button",role:"combobox","aria-haspopup":"listbox","aria-expanded":x,"aria-controls":x?P:void 0,"aria-label":h,disabled:o,onClick:()=>$(M=>!M),onKeyDown:te,className:re("flex w-full items-center gap-2 rounded-md border bg-white px-2.5 py-1.5 text-left","border-zinc-200 hover:border-zinc-300","focus:border-indigo-400 focus:outline-none focus:ring-1 focus:ring-indigo-400/50","dark:border-zinc-700 dark:bg-zinc-900 dark:hover:border-zinc-600","disabled:cursor-not-allowed disabled:opacity-50"),children:[d.jsx("span",{className:"min-w-0 flex-1 truncate text-xs text-zinc-700 dark:text-zinc-300",children:se}),Q&&d.jsx("span",{className:"hidden shrink-0 truncate font-mono text-[10px] text-zinc-400 dark:text-zinc-500 sm:block",children:Q}),d.jsx(Za,{className:re("h-3.5 w-3.5 shrink-0 text-zinc-400 transition-transform dark:text-zinc-500",x&&"rotate-180"),"aria-hidden":!0})]}),x&&d.jsx("div",{id:P,role:"listbox",tabIndex:-1,onKeyDown:we,"aria-activedescendant":E>=0?`${P}-opt-${E}`:void 0,ref:M=>{M?.focus()},className:re("absolute left-0 right-0 z-30 mt-1 max-h-64 overflow-auto rounded-md border bg-white py-1 shadow-lg outline-none","border-zinc-200 dark:border-zinc-700 dark:bg-zinc-900 dark:shadow-black/30"),children:G.length===0?d.jsx("div",{className:"px-3 py-2 text-xs text-zinc-500 dark:text-zinc-400",children:"No models available."}):G.map((M,Y)=>{const V=M.id===e,fe=Y===E;return d.jsxs("button",{id:`${P}-opt-${Y}`,type:"button",role:"option","aria-selected":V,onClick:()=>ee(M),onMouseEnter:()=>S(Y),className:re("flex w-full items-start gap-2 px-3 py-1.5 text-left transition-colors",fe?"bg-zinc-100 dark:bg-zinc-800":"bg-transparent",V&&"bg-indigo-50/60 dark:bg-indigo-950/40"),children:[d.jsx(Mr,{className:re("mt-0.5 h-3.5 w-3.5 shrink-0",V?"text-indigo-600 dark:text-indigo-400":"text-transparent"),"aria-hidden":!0}),d.jsxs("span",{className:"min-w-0 flex-1",children:[d.jsx("span",{className:"block truncate text-xs font-medium text-zinc-900 dark:text-zinc-100",children:M.label}),M.detail&&d.jsx("span",{className:"block truncate font-mono text-[10px] text-zinc-500 dark:text-zinc-500",children:M.detail})]})]},M.id||`__default-${Y}`)})})]})}function xk({modelList:e,className:t}){if(!e||e.source!=="bundled")return null;const r=e.nativeUnavailableReason;return d.jsxs("p",{className:re("flex items-start gap-1.5 text-[11px] text-zinc-500 dark:text-zinc-400",t),children:[d.jsx(NR,{className:"mt-0.5 h-3 w-3 shrink-0","aria-hidden":!0}),d.jsxs("span",{children:["Model list is a bundled fallback",r?d.jsxs(d.Fragment,{children:[" — ",r]}):null,". Use “Custom…” to enter any model id your CLI accepts."]})]})}const T5="(default model)",R5="Use the host CLI's default";function A5({open:e,reviewers:t,initialSelection:r,onApply:a,onClose:l}){const[o,c]=_.useState(""),[f,h]=_.useState(new Map),[m,g]=_.useState(new Set),[x,y]=_.useState(null),v=_.useRef(null),[k,E]=_.useState([]),[S,N]=_.useState(!1),[O,T]=_.useState(""),P=_.useRef(null),[$,j]=_.useState(new Map),[G,A]=_.useState(new Set),{activeCli:ie}=jo(),{data:F,isLoading:ee}=bk(ie??void 0),te=_.useMemo(()=>{const le=[{id:"",label:T5,detail:R5}];if(F?.models)for(const xe of F.models)le.push({id:xe.id,label:xe.displayName??xe.id,detail:xe.displayName?xe.id:void 0});return le},[F]),we=!ee&&(F?.models?.length??0)===0;_.useEffect(()=>{if(e){const le=new Map,xe=new Map,pe=[];for(const Ue of r)Ue.description?pe.push({description:Ue.description,count:Ue.count}):(le.set(Ue.id,Ue.count),Ue.models&&Ue.models.length===Ue.count&&xe.set(Ue.id,Ue.models));h(le),j(xe),A(new Set),E(pe),c(""),y(null),N(!1),T(""),setTimeout(()=>v.current?.focus(),50)}},[e,r]),_.useEffect(()=>{if(!e)return;const le=xe=>{xe.key==="Escape"&&l()};return window.addEventListener("keydown",le),()=>window.removeEventListener("keydown",le)},[e,l]);const se=_.useMemo(()=>mk(t,o),[t,o]),Q=_.useMemo(()=>pk(se),[se]);function M(le){h(xe=>{const pe=new Map(xe);return pe.has(le)?pe.delete(le):pe.set(le,1),pe}),j(xe=>{if(!xe.has(le))return xe;const pe=new Map(xe);return pe.delete(le),pe}),A(xe=>{if(!xe.has(le))return xe;const pe=new Set(xe);return pe.delete(le),pe})}function Y(le,xe){const pe=Math.max(1,Math.min(3,xe));h(Ue=>{const Ae=new Map(Ue);return Ae.set(le,pe),Ae}),j(Ue=>{const Ae=Ue.get(le);if(!Ae)return Ue;const Tt=new Map(Ue),tt=[];for(let gt=0;gt<pe;gt++)tt.push(Ae[gt]??null);return Tt.set(le,tt),Tt})}function V(le){A(xe=>{const pe=new Set(xe);return pe.has(le)?pe.delete(le):pe.add(le),pe}),j(xe=>{if(xe.has(le))return xe;const pe=f.get(le)??1,Ue=new Map(xe);return Ue.set(le,Array(pe).fill(null)),Ue})}function fe(le,xe){j(pe=>{const Ue=new Map(pe),Ae=f.get(le)??1;return Ue.set(le,Array(Ae).fill(xe)),Ue})}function R(le,xe,pe){j(Ue=>{const Ae=Ue.get(le),Tt=f.get(le)??1,tt=Ae?[...Ae]:Array(Tt).fill(null);tt[xe]=pe;const gt=new Map(Ue);return gt.set(le,tt),gt})}function D(le){g(xe=>{const pe=new Set(xe);return pe.has(le)?pe.delete(le):pe.add(le),pe})}function B(){const le=O.trim();le&&(E(xe=>[...xe,{description:le,count:1}]),T(""),N(!1))}function z(le){E(xe=>xe.filter((pe,Ue)=>Ue!==le))}function ue(le,xe){const pe=Math.max(1,Math.min(3,xe));E(Ue=>Ue.map((Ae,Tt)=>Tt===le?{...Ae,count:pe}:Ae))}function be(){const le=[];for(const[xe,pe]of f){const Ue=$.get(xe),Ae=Ue&&Ue.length===pe&&Ue.some(Tt=>Tt!==null);le.push(Ae?{id:xe,count:pe,models:Ue}:{id:xe,count:pe})}k.forEach((xe,pe)=>{le.push({id:`ephemeral-${pe+1}`,count:xe.count,description:xe.description})}),a(le)}if(!e)return null;const ye=f.size+k.length;return d.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center px-4 bg-black/50 backdrop-blur-sm",children:d.jsxs("div",{role:"dialog","aria-modal":"true",className:"flex max-h-[80vh] w-full max-w-2xl flex-col overflow-hidden rounded-xl border border-zinc-200 bg-white shadow-2xl dark:border-zinc-700 dark:bg-zinc-900",children:[d.jsxs("div",{className:"flex items-center justify-between border-b border-zinc-200 px-5 py-3.5 dark:border-zinc-700",children:[d.jsx("h2",{className:"text-sm font-semibold text-zinc-900 dark:text-zinc-100",children:"Select Reviewers"}),d.jsx("button",{type:"button",onClick:l,className:"rounded-md p-1 text-zinc-400 hover:bg-zinc-100 hover:text-zinc-600 dark:text-zinc-500 dark:hover:bg-zinc-800 dark:hover:text-zinc-300",children:d.jsx(Bn,{className:"h-4 w-4"})})]}),d.jsx("div",{className:"border-b border-zinc-200 px-5 py-2.5 dark:border-zinc-700",children:d.jsxs("div",{className:"relative",children:[d.jsx(Qu,{className:"absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-zinc-400"}),d.jsx("input",{ref:v,type:"text",value:o,onChange:le=>c(le.target.value),placeholder:"Search reviewers...",className:re("w-full rounded-md border py-1.5 pl-8 pr-3 text-sm","border-zinc-200 bg-zinc-50 placeholder:text-zinc-400","dark:border-zinc-700 dark:bg-zinc-800 dark:placeholder:text-zinc-500","focus:border-indigo-400 focus:outline-none focus:ring-1 focus:ring-indigo-400/50")})]})}),d.jsxs("div",{className:"min-w-0 flex-1 overflow-y-auto overflow-x-hidden px-5 py-3",children:[Q.length===0&&k.length===0&&d.jsx("p",{className:"py-8 text-center text-sm text-zinc-400 dark:text-zinc-500",children:"No reviewers match your search."}),Q.map(([le,xe])=>{const pe=m.has(le),Ue=Ou[le];return d.jsxs("div",{className:"mb-4 last:mb-0",children:[d.jsxs("button",{type:"button",onClick:()=>D(le),className:"mb-2 flex w-full items-center gap-1.5 text-left text-xs font-semibold uppercase tracking-wider text-zinc-400 hover:text-zinc-600 dark:text-zinc-500 dark:hover:text-zinc-300",children:[pe?d.jsx(ji,{className:"h-3 w-3"}):d.jsx(Za,{className:"h-3 w-3"}),Ue.label,d.jsxs("span",{className:"font-normal text-zinc-300 dark:text-zinc-600",children:["(",xe.length,")"]})]}),!pe&&d.jsx("div",{className:"flex flex-col gap-1.5",children:xe.map(Ae=>{const Tt=f.has(Ae.id),tt=f.get(Ae.id)??1,gt=x===Ae.id;return d.jsxs("div",{children:[d.jsxs("div",{role:"button",tabIndex:0,onClick:()=>M(Ae.id),onKeyDown:_t=>{(_t.key==="Enter"||_t.key===" ")&&(_t.preventDefault(),M(Ae.id))},className:re("flex min-w-0 items-center gap-3 rounded-lg border px-3 py-2 transition-colors cursor-pointer",Tt?"border-indigo-200 bg-indigo-50/50 dark:border-indigo-800 dark:bg-indigo-950/30":"border-zinc-100 bg-white hover:border-zinc-200 dark:border-zinc-800 dark:bg-zinc-900 dark:hover:border-zinc-700"),children:[d.jsx("input",{type:"checkbox",checked:Tt,onChange:()=>M(Ae.id),onClick:_t=>_t.stopPropagation(),className:"h-3.5 w-3.5 shrink-0 rounded border-zinc-300 text-indigo-500 focus:ring-indigo-400 dark:border-zinc-600"}),d.jsx(Zs,{icon:Ae.icon,className:re("h-4 w-4 shrink-0",Tt?"text-indigo-500 dark:text-indigo-400":"text-zinc-400 dark:text-zinc-500")}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"text-sm font-medium text-zinc-900 dark:text-zinc-100",children:Ae.name}),Ae.tier==="persona"&&d.jsx("span",{className:"rounded-full bg-violet-100 px-1.5 py-0.5 text-[10px] font-medium text-violet-700 dark:bg-violet-900/50 dark:text-violet-300",children:"Persona"})]}),d.jsx("p",{className:"truncate text-xs text-zinc-500 dark:text-zinc-400",children:Ae.description})]}),Tt&&d.jsxs("div",{className:"flex shrink-0 items-center gap-1",onClick:_t=>_t.stopPropagation(),children:[d.jsx("button",{type:"button",onClick:()=>Y(Ae.id,tt-1),disabled:tt<=1,className:"rounded p-0.5 text-zinc-400 hover:bg-zinc-100 disabled:opacity-30 dark:hover:bg-zinc-800",children:d.jsx(xo,{className:"h-3 w-3"})}),d.jsx("span",{className:"w-4 text-center text-xs font-medium text-zinc-600 dark:text-zinc-300",children:tt}),d.jsx("button",{type:"button",onClick:()=>Y(Ae.id,tt+1),disabled:tt>=3,className:"rounded p-0.5 text-zinc-400 hover:bg-zinc-100 disabled:opacity-30 dark:hover:bg-zinc-800",children:d.jsx(pa,{className:"h-3 w-3"})})]}),Tt&&d.jsx("button",{type:"button",onClick:_t=>{_t.stopPropagation(),V(Ae.id)},"aria-expanded":G.has(Ae.id),"aria-label":"Advanced model overrides",title:"Advanced — model overrides for this run",className:re("shrink-0 rounded p-1 transition-colors",G.has(Ae.id)?"bg-indigo-100 text-indigo-600 dark:bg-indigo-900/50 dark:text-indigo-400":$.get(Ae.id)?.some(_t=>_t!==null)?"text-indigo-500 dark:text-indigo-400":"text-zinc-300 hover:text-zinc-500 dark:text-zinc-600 dark:hover:text-zinc-400"),children:d.jsx(ok,{className:"h-3.5 w-3.5"})}),d.jsx("button",{type:"button",onClick:_t=>{_t.stopPropagation(),y(gt?null:Ae.id)},className:re("shrink-0 rounded p-1 transition-colors",gt?"bg-indigo-100 text-indigo-600 dark:bg-indigo-900/50 dark:text-indigo-400":"text-zinc-300 hover:text-zinc-500 dark:text-zinc-600 dark:hover:text-zinc-400"),children:d.jsx(nk,{className:"h-3.5 w-3.5"})})]}),Tt&&G.has(Ae.id)&&d.jsx(O5,{count:tt,models:$.get(Ae.id)??Array(tt).fill(null),modelOptions:te,freeText:we,personaName:Ae.id,onUniformChange:_t=>fe(Ae.id,_t),onInstanceChange:(_t,ot)=>R(Ae.id,_t,ot)}),gt&&d.jsxs("div",{className:"ml-10 mt-1 rounded-lg border border-zinc-100 bg-zinc-50 p-3 text-xs dark:border-zinc-800 dark:bg-zinc-800/50",children:[Ae.description&&d.jsx("p",{className:"mb-2 text-zinc-600 dark:text-zinc-300",children:Ae.description}),Ae.known_for&&d.jsxs("p",{className:"mb-1.5",children:[d.jsxs("span",{className:"font-semibold text-zinc-600 dark:text-zinc-300",children:["Known for:"," "]}),d.jsx("span",{className:"text-zinc-500 dark:text-zinc-400",children:Ae.known_for})]}),Ae.philosophy&&d.jsxs("p",{className:"mb-2 italic text-zinc-500 dark:text-zinc-400",children:["“",Ae.philosophy,"”"]}),Ae.focus_areas.length>0&&d.jsx("div",{className:"flex flex-wrap gap-1",children:Ae.focus_areas.map(_t=>d.jsx("span",{className:"rounded-full bg-zinc-200 px-2 py-0.5 text-[10px] text-zinc-600 dark:bg-zinc-700 dark:text-zinc-300",children:_t},_t))})]})]},Ae.id)})})]},le)}),d.jsxs("div",{className:"mb-2 mt-2",children:[k.length>0&&d.jsxs("div",{className:"mb-2 flex items-center gap-1.5 text-xs font-semibold uppercase tracking-wider text-amber-500 dark:text-amber-400",children:[d.jsx(yo,{className:"h-3 w-3"}),"One-off Reviewers",d.jsxs("span",{className:"font-normal text-amber-400 dark:text-amber-600",children:["(",k.length,")"]})]}),d.jsx("div",{className:"flex flex-col gap-1.5",children:k.map((le,xe)=>d.jsxs("div",{className:re("flex min-w-0 items-center gap-3 rounded-lg border border-dashed px-3 py-2","border-amber-300 bg-amber-50/50","dark:border-amber-700 dark:bg-amber-950/20"),children:[d.jsx(yo,{className:"h-4 w-4 shrink-0 text-amber-500 dark:text-amber-400"}),d.jsx("p",{className:"min-w-0 flex-1 text-xs text-amber-700 dark:text-amber-300",children:le.description}),d.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[d.jsx("button",{type:"button",onClick:()=>ue(xe,le.count-1),disabled:le.count<=1,className:"rounded p-0.5 text-amber-400 hover:bg-amber-100 disabled:opacity-30 dark:text-amber-500 dark:hover:bg-amber-900",children:d.jsx(xo,{className:"h-3 w-3"})}),d.jsx("span",{className:"w-4 text-center text-xs font-medium text-amber-600 dark:text-amber-300",children:le.count}),d.jsx("button",{type:"button",onClick:()=>ue(xe,le.count+1),disabled:le.count>=3,className:"rounded p-0.5 text-amber-400 hover:bg-amber-100 disabled:opacity-30 dark:text-amber-500 dark:hover:bg-amber-900",children:d.jsx(pa,{className:"h-3 w-3"})})]}),d.jsx("button",{type:"button",onClick:()=>z(xe),className:"shrink-0 rounded p-1 text-amber-400 hover:bg-amber-100 hover:text-amber-600 dark:text-amber-500 dark:hover:bg-amber-900 dark:hover:text-amber-300",children:d.jsx(Bn,{className:"h-3.5 w-3.5"})})]},xe))}),S?d.jsxs("div",{className:re("mt-1.5 rounded-lg border border-dashed p-3","border-amber-400 bg-amber-50/30","dark:border-amber-600 dark:bg-amber-950/20"),children:[d.jsx("label",{className:"mb-1.5 block text-xs font-medium text-zinc-700 dark:text-zinc-300",children:"What should this reviewer focus on?"}),d.jsx("textarea",{ref:P,value:O,onChange:le=>T(le.target.value),onKeyDown:le=>{le.key==="Enter"&&!le.shiftKey&&(le.preventDefault(),B()),le.key==="Escape"&&(le.stopPropagation(),N(!1),T(""))},placeholder:"e.g. Error handling in the auth flow, accessibility compliance, review as a junior developer",rows:2,className:re("w-full resize-none rounded-md border px-3 py-2 text-sm","border-zinc-200 bg-white placeholder:text-zinc-400","dark:border-zinc-700 dark:bg-zinc-800 dark:placeholder:text-zinc-500","focus:border-amber-400 focus:outline-none focus:ring-1 focus:ring-amber-400/50")}),d.jsxs("div",{className:"mt-2 flex items-center justify-between",children:[d.jsx("p",{className:"text-[10px] text-zinc-400 dark:text-zinc-500",children:"For this review only — won't be saved to your library."}),d.jsxs("div",{className:"flex gap-1.5",children:[d.jsx("button",{type:"button",onClick:()=>{N(!1),T("")},className:"rounded-md px-3 py-1 text-xs text-zinc-500 hover:bg-zinc-100 dark:hover:bg-zinc-800",children:"Cancel"}),d.jsxs("button",{type:"button",onClick:B,disabled:!O.trim(),className:"flex items-center gap-1 rounded-md bg-amber-500 px-3 py-1 text-xs font-medium text-white hover:bg-amber-600 disabled:opacity-50",children:[d.jsx(pa,{className:"h-3 w-3"}),"Add to Team"]})]})]})]}):d.jsxs("button",{type:"button",onClick:()=>{N(!0),setTimeout(()=>P.current?.focus(),50)},className:re("mt-1.5 flex w-full items-center gap-3 rounded-lg border border-dashed px-3 py-2.5 text-left transition-colors","border-zinc-300 text-zinc-400 hover:border-amber-400 hover:bg-amber-50/50 hover:text-amber-600","dark:border-zinc-700 dark:text-zinc-500 dark:hover:border-amber-600 dark:hover:bg-amber-950/20 dark:hover:text-amber-400"),children:[d.jsx(pa,{className:"h-4 w-4 shrink-0"}),d.jsx("span",{className:"text-sm",children:"Describe a one-off reviewer for this review..."})]})]})]}),d.jsxs("div",{className:"flex items-center justify-between gap-3 border-t border-zinc-200 px-5 py-3 dark:border-zinc-700",children:[d.jsxs("div",{className:"min-w-0",children:[d.jsxs("span",{className:"text-xs text-zinc-400 dark:text-zinc-500",children:[ye," reviewer",ye!==1?"s":""," selected"]}),d.jsx(xk,{modelList:F})]}),d.jsxs("div",{className:"flex gap-2",children:[d.jsx("button",{type:"button",onClick:l,className:"rounded-md border border-zinc-300 px-4 py-1.5 text-xs font-medium transition-colors hover:bg-zinc-100 dark:border-zinc-700 dark:hover:bg-zinc-800",children:"Cancel"}),d.jsx("button",{type:"button",onClick:be,className:"rounded-md bg-indigo-600 px-4 py-1.5 text-xs font-medium text-white transition-colors hover:bg-indigo-700",children:"Apply"})]})]})]})})}function O5({count:e,models:t,modelOptions:r,freeText:a,personaName:l,onUniformChange:o,onInstanceChange:c}){const h=new Set(t).size<=1,[m,g]=_.useState(h?"uniform":"per-instance");_.useEffect(()=>{!h&&m==="uniform"&&g("per-instance")},[h,m]);const x=t[0]??null;return d.jsxs("div",{onClick:y=>y.stopPropagation(),className:"ml-10 mt-1 space-y-2 rounded-lg border border-zinc-100 bg-zinc-50/50 p-3 dark:border-zinc-800 dark:bg-zinc-800/30",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("span",{className:"text-[11px] font-medium uppercase tracking-wider text-zinc-500 dark:text-zinc-400",children:"Model override (this run)"}),e>1&&d.jsxs("div",{className:"inline-flex items-center gap-0.5 rounded-md border border-zinc-200 p-0.5 dark:border-zinc-700",children:[d.jsx("button",{type:"button",onClick:()=>{g("uniform"),h||o(x)},"aria-pressed":m==="uniform"&&h,className:re("rounded px-2 py-0.5 text-[10px] font-medium transition",m==="uniform"&&h?"bg-zinc-900 text-white dark:bg-zinc-100 dark:text-zinc-900":"text-zinc-500 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-zinc-200"),children:"Same model"}),d.jsx("button",{type:"button",onClick:()=>g("per-instance"),"aria-pressed":m==="per-instance"||!h,className:re("rounded px-2 py-0.5 text-[10px] font-medium transition",m==="per-instance"||!h?"bg-zinc-900 text-white dark:bg-zinc-100 dark:text-zinc-900":"text-zinc-500 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-zinc-200"),children:"Per reviewer"})]})]}),m==="uniform"&&h||e===1?d.jsx(ko,{value:x??"",options:r,freeText:a,allowCustom:!0,ariaLabel:`Model for ${l}`,onChange:y=>o(y||null)}):d.jsx("div",{className:"space-y-1",children:Array.from({length:e},(y,v)=>d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsxs("span",{className:"w-28 shrink-0 truncate text-[11px] text-zinc-500",children:[l,"-",v+1]}),d.jsx(ko,{value:t[v]??"",options:r,freeText:a,allowCustom:!0,ariaLabel:`Model for ${l}-${v+1}`,onChange:k=>c(v,k||null)})]},v))}),a&&d.jsx("p",{className:"text-[10px] text-zinc-500 dark:text-zinc-500",children:"Your AI CLI didn't return a model list. Type any model id it accepts."})]})}const so=[{id:"review",command:"ocr review",label:"Review",description:"Run multi-agent AI code review",params:[{name:"target",type:"text",label:"Target",placeholder:"staged (default)"},{name:"requirements",type:"text",label:"Requirements",placeholder:"spec.md or describe what to focus on..."},{name:"fresh",type:"toggle",label:"Fresh start"}]},{id:"map",command:"ocr map",label:"Map",description:"Generate a Code Review Map for large changesets",params:[{name:"target",type:"text",label:"Target",placeholder:"staged (default)"},{name:"requirements",type:"text",label:"Requirements",placeholder:"spec.md or describe what to focus on..."},{name:"fresh",type:"toggle",label:"Fresh start"}]}];function M5(e){const t=[];return{cleaned:e.replace(/--reviewer\s+(?:(\d+):)?(?:"([^"]*?)"|'([^']*?)')/g,(a,l,o,c)=>(t.push({description:o??c??"",count:parseInt(l??"1",10)||1}),"")).replace(/\s{2,}/g," ").trim(),entries:t}}function j5(e){const{cleaned:t,entries:r}=M5(e),l=t.replace(/^ocr\s+/,"").split(/\s+/),o=l[0]??"";if(!so.find(m=>m.id===o))return null;const c={};let f,h=1;for(;h<l.length;){const m=l[h]??"";if(m==="--fresh")c.fresh=!0,h++;else if(m==="--team"&&h+1<l.length){const g=l[h+1]??"";f=uy(g),h+=2}else if(m==="--requirements"&&h+1<l.length){const g=l.slice(h+1),x=g.indexOf("--team");if(x>=0){c.requirements=g.slice(0,x).join(" ");const y=g[x+1]??"";f=uy(y)}else c.requirements=g.join(" ");break}else m.startsWith("--")||(c.target=m),h++}return r.length>0&&(f||(f=[]),r.forEach((m,g)=>{f.push({id:`ephemeral-${g+1}`,count:m.count,description:m.description})})),{commandId:o,params:c,team:f}}function uy(e){const t=e.trim();if(t.startsWith("["))try{const r=JSON.parse(t),a=new Map;for(const l of r){if(typeof l.persona!="string")continue;const o=typeof l.instance_index=="number"?l.instance_index:1,c=typeof l.model=="string"?l.model:null,f=a.get(l.persona)??{count:0,models:[]};f.count=Math.max(f.count,o),f.models[o-1]=c,a.set(l.persona,f)}return Array.from(a,([l,{count:o,models:c}])=>{const f=[];for(let h=0;h<o;h++)f.push(c[h]??null);return f.some(h=>h!==null)?{id:l,count:o,models:f}:{id:l,count:o}})}catch{}return t.split(",").map(r=>{const[a="",l]=r.split(":");return{id:a,count:parseInt(l??"1",10)||1}}).filter(r=>r.id.length>0)}function D5(e){const t=e.filter(l=>!l.description);if(!t.some(l=>l.models&&l.models.length===l.count&&l.models.some(o=>o!==null)))return t.map(l=>`${l.id}:${l.count}`).join(",");const a=[];for(const l of t)for(let o=0;o<l.count;o++)a.push({persona:l.id,instance_index:o+1,name:`${l.id}-${o+1}`,model:l.models?.[o]??null});return JSON.stringify(a)}function L5(e,t){if(e.some(a=>a.description)||t.some(a=>a.description)||e.some(a=>a.models?.some(l=>l!==null))||t.some(a=>a.models?.some(l=>l!==null))||e.length!==t.length)return!1;const r=new Map(e.map(a=>[a.id,a.count]));for(const a of t)if(r.get(a.id)!==a.count)return!1;return!0}function I5({isRunning:e,runningCount:t,onRunCommand:r,prefill:a,onPrefillConsumed:l}){const[o,c]=_.useState(so[0]?.id??""),[f,h]=_.useState({}),[m,g]=_.useState(!1),[x,y]=_.useState(!1),v=_.useRef(void 0),{reviewers:k,defaults:E,isLoaded:S}=Jm(),[N,O]=_.useState(null),[T,P]=_.useState(!1),$=so.find(V=>V.id===o)??so[0],j=$.id==="review",G=S?E.map(V=>({id:V,count:1})).reduce((V,fe)=>{const R=V.find(D=>D.id===fe.id);return R?R.count+=fe.count:V.push({...fe}),V},[]):[],A=N??G,[ie,F]=_.useState(null);a!==ie&&(F(a),a&&(c(a.commandId),h(a.params),O(a.team??null),g(!1),y(!0),l())),_.useEffect(()=>{if(x)return v.current=setTimeout(()=>y(!1),1200),()=>clearTimeout(v.current)},[x]);function ee(V){V!==o&&(c(V),h({}),O(null),g(!1))}function te(V,fe){h(R=>({...R,[V]:fe}))}function we(V){const R=(N??G).filter(D=>D.id!==V);O(R)}const se=_.useCallback(V=>{L5(V,G)?O(null):O(V),P(!1)},[G]);function Q(){const V=[$.command],fe=f.target;if(typeof fe=="string"&&fe.trim()&&V.push(fe.trim()),f.fresh===!0&&V.push("--fresh"),j&&N!==null){const D=D5(N);D&&V.push("--team",D);for(const B of N)if(B.description){const z=B.description.replace(/"/g,'\\"');B.count>1?V.push("--reviewer",`${B.count}:"${z}"`):V.push("--reviewer",`"${z}"`)}}const R=f.requirements;return typeof R=="string"&&R.trim()&&V.push("--requirements",R.trim()),V.join(" ")}function M(){e||g(!0)}function Y(){const V=Q();g(!1),h({}),O(null),r(V)}return d.jsxs("div",{className:re("relative overflow-hidden rounded-lg border border-zinc-200 border-l-[3px] border-l-indigo-500 transition-shadow duration-500 dark:border-zinc-800 dark:border-l-indigo-400",x&&"ring-2 ring-indigo-400/60 shadow-md shadow-indigo-500/10"),children:[d.jsxs("div",{className:"flex items-center gap-1 border-b border-zinc-200 bg-zinc-50 px-4 py-2.5 dark:border-zinc-800 dark:bg-zinc-900",children:[d.jsx(Oo,{className:"mr-1.5 h-4 w-4 text-indigo-500 dark:text-indigo-400"}),so.map(V=>d.jsx("button",{type:"button",onClick:()=>ee(V.id),className:re("rounded-full px-3.5 py-1 text-xs font-medium transition-colors",V.id===o?"bg-indigo-600 text-white shadow-sm":"text-zinc-600 hover:bg-zinc-200 dark:text-zinc-400 dark:hover:bg-zinc-800"),children:V.label},V.id))]}),d.jsxs("div",{className:"flex items-start gap-2 border-b border-amber-200 bg-amber-50 px-4 py-2.5 text-xs text-amber-800 dark:border-amber-900/50 dark:bg-amber-950/30 dark:text-amber-300",children:[d.jsx(Xm,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),d.jsx("span",{children:"Commands run an AI agent with full read/write and shell access to your project. Only run in trusted environments."})]}),d.jsxs("div",{className:"space-y-4 bg-white px-5 py-4 dark:bg-zinc-900/50",children:[d.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:$.description}),d.jsxs("div",{className:"space-y-3",children:[$.params.map(V=>V.type==="text"?d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("label",{className:"w-28 shrink-0 text-right text-xs font-medium text-zinc-500 dark:text-zinc-400",children:V.label}),d.jsx("input",{type:"text",placeholder:V.placeholder,disabled:e,value:f[V.name]??"",onChange:fe=>te(V.name,fe.target.value),className:re("w-full rounded-md border px-3 py-1.5 text-sm","border-zinc-200 bg-zinc-50 placeholder:text-zinc-400","dark:border-zinc-700 dark:bg-zinc-800 dark:placeholder:text-zinc-500","focus:border-indigo-400 focus:outline-none focus:ring-1 focus:ring-indigo-400/50","disabled:cursor-not-allowed disabled:opacity-50")})]},V.name):d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("span",{className:"w-28 shrink-0"}),d.jsxs("label",{className:"flex items-center gap-2 text-xs text-zinc-500 dark:text-zinc-400",children:[d.jsx("input",{type:"checkbox",disabled:e,checked:f[V.name]===!0,onChange:fe=>te(V.name,fe.target.checked),className:"h-3.5 w-3.5 rounded border-zinc-300 text-indigo-500 focus:ring-indigo-400 dark:border-zinc-600"}),V.label]})]},V.name)),j&&d.jsx(S5,{reviewers:k,selection:A,isLoaded:S,disabled:e,onRemove:we,onCustomize:()=>P(!0)})]}),d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("span",{className:"w-28 shrink-0"}),d.jsxs("button",{type:"button",disabled:e,onClick:M,className:re("flex w-full items-center justify-center gap-1.5 rounded-md px-4 py-2 text-sm font-medium transition-colors","bg-indigo-600 text-white hover:bg-indigo-700","disabled:cursor-not-allowed disabled:opacity-50"),children:[d.jsx($s,{className:"h-3.5 w-3.5"}),"Run ",$.label,t!=null&&t>0&&d.jsxs("span",{className:"ml-1.5 rounded-full bg-indigo-500/20 px-1.5 text-[10px] font-normal text-indigo-300",children:[t," running"]})]})]})]}),m&&d.jsx("div",{className:"absolute inset-0 z-10 flex items-center justify-center bg-white/95 backdrop-blur-sm dark:bg-zinc-900/95",children:d.jsxs("div",{className:"flex flex-col items-center gap-3 px-4",children:[d.jsxs("p",{className:"text-sm font-medium",children:["Run ",$.label,"?"]}),d.jsx("p",{className:"max-w-[260px] text-center text-xs text-zinc-500 dark:text-zinc-400",children:"This will spawn a Claude Code session that may take several minutes."}),d.jsx("code",{className:"max-w-[320px] truncate rounded bg-zinc-100 px-2 py-1 text-xs text-zinc-600 dark:bg-zinc-800 dark:text-zinc-400",children:Q()}),d.jsxs("div",{className:"flex gap-2",children:[d.jsx("button",{type:"button",onClick:()=>g(!1),className:"rounded-md border border-zinc-300 px-4 py-1.5 text-xs font-medium transition-colors hover:bg-zinc-100 dark:border-zinc-700 dark:hover:bg-zinc-800",children:"Cancel"}),d.jsxs("button",{type:"button",onClick:Y,className:"flex items-center gap-1 rounded-md bg-indigo-600 px-4 py-1.5 text-xs font-medium text-white transition-colors hover:bg-indigo-700",children:[d.jsx($s,{className:"h-3 w-3"}),"Start"]})]})]})}),j&&d.jsx(A5,{open:T,reviewers:k,initialSelection:A,onApply:se,onClose:()=>P(!1)})]})}const dy=[{border:"border-l-indigo-400 dark:border-l-indigo-500",bg:"bg-indigo-50/30 dark:bg-indigo-950/15",text:"text-indigo-700 dark:text-indigo-300",dot:"bg-indigo-500"},{border:"border-l-emerald-400 dark:border-l-emerald-500",bg:"bg-emerald-50/30 dark:bg-emerald-950/15",text:"text-emerald-700 dark:text-emerald-300",dot:"bg-emerald-500"},{border:"border-l-amber-400 dark:border-l-amber-500",bg:"bg-amber-50/30 dark:bg-amber-950/15",text:"text-amber-700 dark:text-amber-300",dot:"bg-amber-500"},{border:"border-l-sky-400 dark:border-l-sky-500",bg:"bg-sky-50/30 dark:bg-sky-950/15",text:"text-sky-700 dark:text-sky-300",dot:"bg-sky-500"},{border:"border-l-rose-400 dark:border-l-rose-500",bg:"bg-rose-50/30 dark:bg-rose-950/15",text:"text-rose-700 dark:text-rose-300",dot:"bg-rose-500"},{border:"border-l-violet-400 dark:border-l-violet-500",bg:"bg-violet-50/30 dark:bg-violet-950/15",text:"text-violet-700 dark:text-violet-300",dot:"bg-violet-500"}],B5={border:"border-l-zinc-300 dark:border-l-zinc-700",bg:"bg-transparent",text:"text-zinc-600 dark:text-zinc-400",dot:"bg-zinc-400 dark:bg-zinc-500"};function U5(e){let t=0;for(let r=0;r<e.length;r++)t=t*31+e.charCodeAt(r)|0;return Math.abs(t)}function F5(e){return e==="orchestrator"?B5:dy[U5(e)%dy.length]}function P5(e){return e==="orchestrator"?"Orchestrator":e}function H5({agentId:e,showName:t,displayName:r,children:a}){const l=F5(e),o=r??P5(e);return d.jsxs("div",{className:re("relative pl-4",l.bg),children:[d.jsx("span",{"aria-hidden":!0,className:re("pointer-events-none absolute inset-y-0 left-0 w-[2px]",l.border.replace("border-l-","bg-"))}),t&&d.jsxs("div",{className:re("mb-1 flex items-center gap-1.5 text-[11px] font-medium",l.text),children:[d.jsx("span",{"aria-hidden":!0,className:re("inline-block h-1.5 w-1.5 rounded-full",l.dot)}),o]}),d.jsx("div",{children:a})]})}function q5(e,t){const r={};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const $5=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,G5=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,K5={};function fy(e,t){return(K5.jsx?G5:$5).test(e)}const V5=/[ \t\n\f\r]/g;function Y5(e){return typeof e=="object"?e.type==="text"?hy(e.value):!1:hy(e)}function hy(e){return e.replace(V5,"")===""}class Do{constructor(t,r,a){this.normal=r,this.property=t,a&&(this.space=a)}}Do.prototype.normal={};Do.prototype.property={};Do.prototype.space=void 0;function yk(e,t){const r={},a={};for(const l of e)Object.assign(r,l.property),Object.assign(a,l.normal);return new Do(r,a,t)}function dm(e){return e.toLowerCase()}class ir{constructor(t,r){this.attribute=r,this.property=t}}ir.prototype.attribute="";ir.prototype.booleanish=!1;ir.prototype.boolean=!1;ir.prototype.commaOrSpaceSeparated=!1;ir.prototype.commaSeparated=!1;ir.prototype.defined=!1;ir.prototype.mustUseProperty=!1;ir.prototype.number=!1;ir.prototype.overloadedBoolean=!1;ir.prototype.property="";ir.prototype.spaceSeparated=!1;ir.prototype.space=void 0;let Q5=0;const st=Wa(),vn=Wa(),fm=Wa(),ke=Wa(),Zt=Wa(),qs=Wa(),mr=Wa();function Wa(){return 2**++Q5}const hm=Object.freeze(Object.defineProperty({__proto__:null,boolean:st,booleanish:vn,commaOrSpaceSeparated:mr,commaSeparated:qs,number:ke,overloadedBoolean:fm,spaceSeparated:Zt},Symbol.toStringTag,{value:"Module"})),Eh=Object.keys(hm);class ep extends ir{constructor(t,r,a,l){let o=-1;if(super(t,r),my(this,"space",l),typeof a=="number")for(;++o<Eh.length;){const c=Eh[o];my(this,Eh[o],(a&hm[c])===hm[c])}}}ep.prototype.defined=!0;function my(e,t,r){r&&(e[t]=r)}function Ws(e){const t={},r={};for(const[a,l]of Object.entries(e.properties)){const o=new ep(a,e.transform(e.attributes||{},a),l,e.space);e.mustUseProperty&&e.mustUseProperty.includes(a)&&(o.mustUseProperty=!0),t[a]=o,r[dm(a)]=a,r[dm(o.attribute)]=a}return new Do(t,r,e.space)}const vk=Ws({properties:{ariaActiveDescendant:null,ariaAtomic:vn,ariaAutoComplete:null,ariaBusy:vn,ariaChecked:vn,ariaColCount:ke,ariaColIndex:ke,ariaColSpan:ke,ariaControls:Zt,ariaCurrent:null,ariaDescribedBy:Zt,ariaDetails:null,ariaDisabled:vn,ariaDropEffect:Zt,ariaErrorMessage:null,ariaExpanded:vn,ariaFlowTo:Zt,ariaGrabbed:vn,ariaHasPopup:null,ariaHidden:vn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Zt,ariaLevel:ke,ariaLive:null,ariaModal:vn,ariaMultiLine:vn,ariaMultiSelectable:vn,ariaOrientation:null,ariaOwns:Zt,ariaPlaceholder:null,ariaPosInSet:ke,ariaPressed:vn,ariaReadOnly:vn,ariaRelevant:null,ariaRequired:vn,ariaRoleDescription:Zt,ariaRowCount:ke,ariaRowIndex:ke,ariaRowSpan:ke,ariaSelected:vn,ariaSetSize:ke,ariaSort:null,ariaValueMax:ke,ariaValueMin:ke,ariaValueNow:ke,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function kk(e,t){return t in e?e[t]:t}function wk(e,t){return kk(e,t.toLowerCase())}const X5=Ws({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:qs,acceptCharset:Zt,accessKey:Zt,action:null,allow:null,allowFullScreen:st,allowPaymentRequest:st,allowUserMedia:st,alt:null,as:null,async:st,autoCapitalize:null,autoComplete:Zt,autoFocus:st,autoPlay:st,blocking:Zt,capture:null,charSet:null,checked:st,cite:null,className:Zt,cols:ke,colSpan:null,content:null,contentEditable:vn,controls:st,controlsList:Zt,coords:ke|qs,crossOrigin:null,data:null,dateTime:null,decoding:null,default:st,defer:st,dir:null,dirName:null,disabled:st,download:fm,draggable:vn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:st,formTarget:null,headers:Zt,height:ke,hidden:fm,high:ke,href:null,hrefLang:null,htmlFor:Zt,httpEquiv:Zt,id:null,imageSizes:null,imageSrcSet:null,inert:st,inputMode:null,integrity:null,is:null,isMap:st,itemId:null,itemProp:Zt,itemRef:Zt,itemScope:st,itemType:Zt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:st,low:ke,manifest:null,max:null,maxLength:ke,media:null,method:null,min:null,minLength:ke,multiple:st,muted:st,name:null,nonce:null,noModule:st,noValidate:st,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:st,optimum:ke,pattern:null,ping:Zt,placeholder:null,playsInline:st,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:st,referrerPolicy:null,rel:Zt,required:st,reversed:st,rows:ke,rowSpan:ke,sandbox:Zt,scope:null,scoped:st,seamless:st,selected:st,shadowRootClonable:st,shadowRootDelegatesFocus:st,shadowRootMode:null,shape:null,size:ke,sizes:null,slot:null,span:ke,spellCheck:vn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ke,step:null,style:null,tabIndex:ke,target:null,title:null,translate:null,type:null,typeMustMatch:st,useMap:null,value:vn,width:ke,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Zt,axis:null,background:null,bgColor:null,border:ke,borderColor:null,bottomMargin:ke,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:st,declare:st,event:null,face:null,frame:null,frameBorder:null,hSpace:ke,leftMargin:ke,link:null,longDesc:null,lowSrc:null,marginHeight:ke,marginWidth:ke,noResize:st,noHref:st,noShade:st,noWrap:st,object:null,profile:null,prompt:null,rev:null,rightMargin:ke,rules:null,scheme:null,scrolling:vn,standby:null,summary:null,text:null,topMargin:ke,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ke,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:st,disableRemotePlayback:st,prefix:null,property:null,results:ke,security:null,unselectable:null},space:"html",transform:wk}),Z5=Ws({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",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:mr,accentHeight:ke,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ke,amplitude:ke,arabicForm:null,ascent:ke,attributeName:null,attributeType:null,azimuth:ke,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ke,by:null,calcMode:null,capHeight:ke,className:Zt,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:ke,diffuseConstant:ke,direction:null,display:null,dur:null,divisor:ke,dominantBaseline:null,download:st,dx:null,dy:null,edgeMode:null,editable:null,elevation:ke,enableBackground:null,end:null,event:null,exponent:ke,externalResourcesRequired:null,fill:null,fillOpacity:ke,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:qs,g2:qs,glyphName:qs,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ke,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ke,horizOriginX:ke,horizOriginY:ke,id:null,ideographic:ke,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ke,k:ke,k1:ke,k2:ke,k3:ke,k4:ke,kernelMatrix:mr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ke,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ke,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:ke,overlineThickness:ke,paintOrder:null,panose1:null,path:null,pathLength:ke,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Zt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ke,pointsAtY:ke,pointsAtZ:ke,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:mr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:mr,rev:mr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:mr,requiredFeatures:mr,requiredFonts:mr,requiredFormats:mr,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:ke,specularExponent:ke,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ke,strikethroughThickness:ke,string:null,stroke:null,strokeDashArray:mr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ke,strokeOpacity:ke,strokeWidth:null,style:null,surfaceScale:ke,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:mr,tabIndex:ke,tableValues:null,target:null,targetX:ke,targetY:ke,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:mr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ke,underlineThickness:ke,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ke,values:null,vAlphabetic:ke,vMathematical:ke,vectorEffect:null,vHanging:ke,vIdeographic:ke,version:null,vertAdvY:ke,vertOriginX:ke,vertOriginY:ke,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ke,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:kk}),_k=Ws({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()}}),Ek=Ws({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:wk}),Nk=Ws({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),W5={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"},J5=/[A-Z]/g,py=/-[a-z]/g,eO=/^data[-\w.:]+$/i;function tO(e,t){const r=dm(t);let a=t,l=ir;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&eO.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(py,rO);a="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!py.test(o)){let c=o.replace(J5,nO);c.charAt(0)!=="-"&&(c="-"+c),t="data"+c}}l=ep}return new l(a,t)}function nO(e){return"-"+e.toLowerCase()}function rO(e){return e.charAt(1).toUpperCase()}const iO=yk([vk,X5,_k,Ek,Nk],"html"),tp=yk([vk,Z5,_k,Ek,Nk],"svg");function aO(e){return e.join(" ").trim()}var js={},Nh,gy;function sO(){if(gy)return Nh;gy=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,r=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,l=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,f=/^\s+|\s+$/g,h=`
529
+ `,m="/",g="*",x="",y="comment",v="declaration";function k(S,N){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];N=N||{};var O=1,T=1;function P(se){var Q=se.match(t);Q&&(O+=Q.length);var M=se.lastIndexOf(h);T=~M?se.length-M:T+se.length}function $(){var se={line:O,column:T};return function(Q){return Q.position=new j(se),ie(),Q}}function j(se){this.start=se,this.end={line:O,column:T},this.source=N.source}j.prototype.content=S;function G(se){var Q=new Error(N.source+":"+O+":"+T+": "+se);if(Q.reason=se,Q.filename=N.source,Q.line=O,Q.column=T,Q.source=S,!N.silent)throw Q}function A(se){var Q=se.exec(S);if(Q){var M=Q[0];return P(M),S=S.slice(M.length),Q}}function ie(){A(r)}function F(se){var Q;for(se=se||[];Q=ee();)Q!==!1&&se.push(Q);return se}function ee(){var se=$();if(!(m!=S.charAt(0)||g!=S.charAt(1))){for(var Q=2;x!=S.charAt(Q)&&(g!=S.charAt(Q)||m!=S.charAt(Q+1));)++Q;if(Q+=2,x===S.charAt(Q-1))return G("End of comment missing");var M=S.slice(2,Q-2);return T+=2,P(M),S=S.slice(Q),T+=2,se({type:y,comment:M})}}function te(){var se=$(),Q=A(a);if(Q){if(ee(),!A(l))return G("property missing ':'");var M=A(o),Y=se({type:v,property:E(Q[0].replace(e,x)),value:M?E(M[0].replace(e,x)):x});return A(c),Y}}function we(){var se=[];F(se);for(var Q;Q=te();)Q!==!1&&(se.push(Q),F(se));return se}return ie(),we()}function E(S){return S?S.replace(f,x):x}return Nh=k,Nh}var by;function lO(){if(by)return js;by=1;var e=js&&js.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(js,"__esModule",{value:!0}),js.default=r;const t=e(sO());function r(a,l){let o=null;if(!a||typeof a!="string")return o;const c=(0,t.default)(a),f=typeof l=="function";return c.forEach(h=>{if(h.type!=="declaration")return;const{property:m,value:g}=h;f?l(m,g,h):g&&(o=o||{},o[m]=g)}),o}return js}var Zl={},xy;function oO(){if(xy)return Zl;xy=1,Object.defineProperty(Zl,"__esModule",{value:!0}),Zl.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,r=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,l=/^-(ms)-/,o=function(m){return!m||r.test(m)||e.test(m)},c=function(m,g){return g.toUpperCase()},f=function(m,g){return"".concat(g,"-")},h=function(m,g){return g===void 0&&(g={}),o(m)?m:(m=m.toLowerCase(),g.reactCompat?m=m.replace(l,f):m=m.replace(a,f),m.replace(t,c))};return Zl.camelCase=h,Zl}var Wl,yy;function cO(){if(yy)return Wl;yy=1;var e=Wl&&Wl.__importDefault||function(l){return l&&l.__esModule?l:{default:l}},t=e(lO()),r=oO();function a(l,o){var c={};return!l||typeof l!="string"||(0,t.default)(l,function(f,h){f&&h&&(c[(0,r.camelCase)(f,o)]=h)}),c}return a.default=a,Wl=a,Wl}var uO=cO();const dO=Uu(uO),Sk=zk("end"),np=zk("start");function zk(e){return t;function t(r){const a=r&&r.position&&r.position[e]||{};if(typeof a.line=="number"&&a.line>0&&typeof a.column=="number"&&a.column>0)return{line:a.line,column:a.column,offset:typeof a.offset=="number"&&a.offset>-1?a.offset:void 0}}}function fO(e){const t=np(e),r=Sk(e);if(t&&r)return{start:t,end:r}}function uo(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?vy(e.position):"start"in e||"end"in e?vy(e):"line"in e||"column"in e?mm(e):""}function mm(e){return ky(e&&e.line)+":"+ky(e&&e.column)}function vy(e){return mm(e&&e.start)+"-"+mm(e&&e.end)}function ky(e){return e&&typeof e=="number"?e:1}class qn extends Error{constructor(t,r,a){super(),typeof r=="string"&&(a=r,r=void 0);let l="",o={},c=!1;if(r&&("line"in r&&"column"in r?o={place:r}:"start"in r&&"end"in r?o={place:r}:"type"in r?o={ancestors:[r],place:r.position}:o={...r}),typeof t=="string"?l=t:!o.cause&&t&&(c=!0,l=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof a=="string"){const h=a.indexOf(":");h===-1?o.ruleId=a:(o.source=a.slice(0,h),o.ruleId=a.slice(h+1))}if(!o.place&&o.ancestors&&o.ancestors){const h=o.ancestors[o.ancestors.length-1];h&&(o.place=h.position)}const f=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=f?f.column:void 0,this.fatal=void 0,this.file="",this.message=l,this.line=f?f.line:void 0,this.name=uo(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=c&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}qn.prototype.file="";qn.prototype.name="";qn.prototype.reason="";qn.prototype.message="";qn.prototype.stack="";qn.prototype.column=void 0;qn.prototype.line=void 0;qn.prototype.ancestors=void 0;qn.prototype.cause=void 0;qn.prototype.fatal=void 0;qn.prototype.place=void 0;qn.prototype.ruleId=void 0;qn.prototype.source=void 0;const rp={}.hasOwnProperty,hO=new Map,mO=/[A-Z]/g,pO=new Set(["table","tbody","thead","tfoot","tr"]),gO=new Set(["td","th"]),Ck="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function bO(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=t.filePath||void 0;let a;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");a=NO(r,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");a=EO(r,t.jsx,t.jsxs)}const l={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:a,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?tp:iO,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=Tk(l,e,void 0);return o&&typeof o!="string"?o:l.create(e,l.Fragment,{children:o||void 0},void 0)}function Tk(e,t,r){if(t.type==="element")return xO(e,t,r);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return yO(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return kO(e,t,r);if(t.type==="mdxjsEsm")return vO(e,t);if(t.type==="root")return wO(e,t,r);if(t.type==="text")return _O(e,t)}function xO(e,t,r){const a=e.schema;let l=a;t.tagName.toLowerCase()==="svg"&&a.space==="html"&&(l=tp,e.schema=l),e.ancestors.push(t);const o=Ak(e,t.tagName,!1),c=SO(e,t);let f=ap(e,t);return pO.has(t.tagName)&&(f=f.filter(function(h){return typeof h=="string"?!Y5(h):!0})),Rk(e,c,o,t),ip(c,f),e.ancestors.pop(),e.schema=a,e.create(t,o,c,r)}function yO(e,t){if(t.data&&t.data.estree&&e.evaluater){const a=t.data.estree.body[0];return a.type,e.evaluater.evaluateExpression(a.expression)}wo(e,t.position)}function vO(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);wo(e,t.position)}function kO(e,t,r){const a=e.schema;let l=a;t.name==="svg"&&a.space==="html"&&(l=tp,e.schema=l),e.ancestors.push(t);const o=t.name===null?e.Fragment:Ak(e,t.name,!0),c=zO(e,t),f=ap(e,t);return Rk(e,c,o,t),ip(c,f),e.ancestors.pop(),e.schema=a,e.create(t,o,c,r)}function wO(e,t,r){const a={};return ip(a,ap(e,t)),e.create(t,e.Fragment,a,r)}function _O(e,t){return t.value}function Rk(e,t,r,a){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(t.node=a)}function ip(e,t){if(t.length>0){const r=t.length>1?t:t[0];r&&(e.children=r)}}function EO(e,t,r){return a;function a(l,o,c,f){const m=Array.isArray(c.children)?r:t;return f?m(o,c,f):m(o,c)}}function NO(e,t){return r;function r(a,l,o,c){const f=Array.isArray(o.children),h=np(a);return t(l,o,c,f,{columnNumber:h?h.column-1:void 0,fileName:e,lineNumber:h?h.line:void 0},void 0)}}function SO(e,t){const r={};let a,l;for(l in t.properties)if(l!=="children"&&rp.call(t.properties,l)){const o=CO(e,l,t.properties[l]);if(o){const[c,f]=o;e.tableCellAlignToStyle&&c==="align"&&typeof f=="string"&&gO.has(t.tagName)?a=f:r[c]=f}}if(a){const o=r.style||(r.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=a}return r}function zO(e,t){const r={};for(const a of t.attributes)if(a.type==="mdxJsxExpressionAttribute")if(a.data&&a.data.estree&&e.evaluater){const o=a.data.estree.body[0];o.type;const c=o.expression;c.type;const f=c.properties[0];f.type,Object.assign(r,e.evaluater.evaluateExpression(f.argument))}else wo(e,t.position);else{const l=a.name;let o;if(a.value&&typeof a.value=="object")if(a.value.data&&a.value.data.estree&&e.evaluater){const f=a.value.data.estree.body[0];f.type,o=e.evaluater.evaluateExpression(f.expression)}else wo(e,t.position);else o=a.value===null?!0:a.value;r[l]=o}return r}function ap(e,t){const r=[];let a=-1;const l=e.passKeys?new Map:hO;for(;++a<t.children.length;){const o=t.children[a];let c;if(e.passKeys){const h=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(h){const m=l.get(h)||0;c=h+"-"+m,l.set(h,m+1)}}const f=Tk(e,o,c);f!==void 0&&r.push(f)}return r}function CO(e,t,r){const a=tO(e.schema,t);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=a.commaSeparated?q5(r):aO(r)),a.property==="style"){let l=typeof r=="object"?r:TO(e,String(r));return e.stylePropertyNameCase==="css"&&(l=RO(l)),["style",l]}return[e.elementAttributeNameCase==="react"&&a.space?W5[a.property]||a.property:a.attribute,r]}}function TO(e,t){try{return dO(t,{reactCompat:!0})}catch(r){if(e.ignoreInvalidStyle)return{};const a=r,l=new qn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:a,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw l.file=e.filePath||void 0,l.url=Ck+"#cannot-parse-style-attribute",l}}function Ak(e,t,r){let a;if(!r)a={type:"Literal",value:t};else if(t.includes(".")){const l=t.split(".");let o=-1,c;for(;++o<l.length;){const f=fy(l[o])?{type:"Identifier",name:l[o]}:{type:"Literal",value:l[o]};c=c?{type:"MemberExpression",object:c,property:f,computed:!!(o&&f.type==="Literal"),optional:!1}:f}a=c}else a=fy(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(a.type==="Literal"){const l=a.value;return rp.call(e.components,l)?e.components[l]:l}if(e.evaluater)return e.evaluater.evaluateExpression(a);wo(e)}function wo(e,t){const r=new qn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=Ck+"#cannot-handle-mdx-estrees-without-createevaluater",r}function RO(e){const t={};let r;for(r in e)rp.call(e,r)&&(t[AO(r)]=e[r]);return t}function AO(e){let t=e.replace(mO,OO);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function OO(e){return"-"+e.toLowerCase()}const Sh={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"]},MO={};function sp(e,t){const r=MO,a=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,l=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return Ok(e,a,l)}function Ok(e,t,r){if(jO(e)){if("value"in e)return e.type==="html"&&!r?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return wy(e.children,t,r)}return Array.isArray(e)?wy(e,t,r):""}function wy(e,t,r){const a=[];let l=-1;for(;++l<e.length;)a[l]=Ok(e[l],t,r);return a.join("")}function jO(e){return!!(e&&typeof e=="object")}const _y=document.createElement("i");function lp(e){const t="&"+e+";";_y.innerHTML=t;const r=_y.textContent;return r.charCodeAt(r.length-1)===59&&e!=="semi"||r===t?!1:r}function gr(e,t,r,a){const l=e.length;let o=0,c;if(t<0?t=-t>l?0:l+t:t=t>l?l:t,r=r>0?r:0,a.length<1e4)c=Array.from(a),c.unshift(t,r),e.splice(...c);else for(r&&e.splice(t,r);o<a.length;)c=a.slice(o,o+1e4),c.unshift(t,0),e.splice(...c),o+=1e4,t+=1e4}function Ar(e,t){return e.length>0?(gr(e,e.length,0,t),e):t}const Ey={}.hasOwnProperty;function Mk(e){const t={};let r=-1;for(;++r<e.length;)DO(t,e[r]);return t}function DO(e,t){let r;for(r in t){const l=(Ey.call(e,r)?e[r]:void 0)||(e[r]={}),o=t[r];let c;if(o)for(c in o){Ey.call(l,c)||(l[c]=[]);const f=o[c];LO(l[c],Array.isArray(f)?f:f?[f]:[])}}}function LO(e,t){let r=-1;const a=[];for(;++r<t.length;)(t[r].add==="after"?e:a).push(t[r]);gr(e,0,0,a)}function jk(e,t){const r=Number.parseInt(e,t);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCodePoint(r)}function $r(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Vn=ka(/[A-Za-z]/),Hn=ka(/[\dA-Za-z]/),IO=ka(/[#-'*+\--9=?A-Z^-~]/);function Mu(e){return e!==null&&(e<32||e===127)}const pm=ka(/\d/),BO=ka(/[\dA-Fa-f]/),UO=ka(/[!-/:-@[-`{-~]/);function Ke(e){return e!==null&&e<-2}function Yt(e){return e!==null&&(e<0||e===32)}function pt(e){return e===-2||e===-1||e===32}const Xu=ka(/\p{P}|\p{S}/u),Ya=ka(/\s/);function ka(e){return t;function t(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function Js(e){const t=[];let r=-1,a=0,l=0;for(;++r<e.length;){const o=e.charCodeAt(r);let c="";if(o===37&&Hn(e.charCodeAt(r+1))&&Hn(e.charCodeAt(r+2)))l=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(c=String.fromCharCode(o));else if(o>55295&&o<57344){const f=e.charCodeAt(r+1);o<56320&&f>56319&&f<57344?(c=String.fromCharCode(o,f),l=1):c="�"}else c=String.fromCharCode(o);c&&(t.push(e.slice(a,r),encodeURIComponent(c)),a=r+l+1,c=""),l&&(r+=l,l=0)}return t.join("")+e.slice(a)}function Ct(e,t,r,a){const l=a?a-1:Number.POSITIVE_INFINITY;let o=0;return c;function c(h){return pt(h)?(e.enter(r),f(h)):t(h)}function f(h){return pt(h)&&o++<l?(e.consume(h),f):(e.exit(r),t(h))}}const FO={tokenize:PO};function PO(e){const t=e.attempt(this.parser.constructs.contentInitial,a,l);let r;return t;function a(f){if(f===null){e.consume(f);return}return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),Ct(e,t,"linePrefix")}function l(f){return e.enter("paragraph"),o(f)}function o(f){const h=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=h),r=h,c(f)}function c(f){if(f===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(f);return}return Ke(f)?(e.consume(f),e.exit("chunkText"),o):(e.consume(f),c)}}const HO={tokenize:qO},Ny={tokenize:$O};function qO(e){const t=this,r=[];let a=0,l,o,c;return f;function f(T){if(a<r.length){const P=r[a];return t.containerState=P[1],e.attempt(P[0].continuation,h,m)(T)}return m(T)}function h(T){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,l&&O();const P=t.events.length;let $=P,j;for(;$--;)if(t.events[$][0]==="exit"&&t.events[$][1].type==="chunkFlow"){j=t.events[$][1].end;break}N(a);let G=P;for(;G<t.events.length;)t.events[G][1].end={...j},G++;return gr(t.events,$+1,0,t.events.slice(P)),t.events.length=G,m(T)}return f(T)}function m(T){if(a===r.length){if(!l)return y(T);if(l.currentConstruct&&l.currentConstruct.concrete)return k(T);t.interrupt=!!(l.currentConstruct&&!l._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Ny,g,x)(T)}function g(T){return l&&O(),N(a),y(T)}function x(T){return t.parser.lazy[t.now().line]=a!==r.length,c=t.now().offset,k(T)}function y(T){return t.containerState={},e.attempt(Ny,v,k)(T)}function v(T){return a++,r.push([t.currentConstruct,t.containerState]),y(T)}function k(T){if(T===null){l&&O(),N(0),e.consume(T);return}return l=l||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:l,contentType:"flow",previous:o}),E(T)}function E(T){if(T===null){S(e.exit("chunkFlow"),!0),N(0),e.consume(T);return}return Ke(T)?(e.consume(T),S(e.exit("chunkFlow")),a=0,t.interrupt=void 0,f):(e.consume(T),E)}function S(T,P){const $=t.sliceStream(T);if(P&&$.push(null),T.previous=o,o&&(o.next=T),o=T,l.defineSkip(T.start),l.write($),t.parser.lazy[T.start.line]){let j=l.events.length;for(;j--;)if(l.events[j][1].start.offset<c&&(!l.events[j][1].end||l.events[j][1].end.offset>c))return;const G=t.events.length;let A=G,ie,F;for(;A--;)if(t.events[A][0]==="exit"&&t.events[A][1].type==="chunkFlow"){if(ie){F=t.events[A][1].end;break}ie=!0}for(N(a),j=G;j<t.events.length;)t.events[j][1].end={...F},j++;gr(t.events,A+1,0,t.events.slice(G)),t.events.length=j}}function N(T){let P=r.length;for(;P-- >T;){const $=r[P];t.containerState=$[1],$[0].exit.call(t,e)}r.length=T}function O(){l.write([null]),o=void 0,l=void 0,t.containerState._closeFlow=void 0}}function $O(e,t,r){return Ct(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Gs(e){if(e===null||Yt(e)||Ya(e))return 1;if(Xu(e))return 2}function Zu(e,t,r){const a=[];let l=-1;for(;++l<e.length;){const o=e[l].resolveAll;o&&!a.includes(o)&&(t=o(t,r),a.push(o))}return t}const gm={name:"attention",resolveAll:GO,tokenize:KO};function GO(e,t){let r=-1,a,l,o,c,f,h,m,g;for(;++r<e.length;)if(e[r][0]==="enter"&&e[r][1].type==="attentionSequence"&&e[r][1]._close){for(a=r;a--;)if(e[a][0]==="exit"&&e[a][1].type==="attentionSequence"&&e[a][1]._open&&t.sliceSerialize(e[a][1]).charCodeAt(0)===t.sliceSerialize(e[r][1]).charCodeAt(0)){if((e[a][1]._close||e[r][1]._open)&&(e[r][1].end.offset-e[r][1].start.offset)%3&&!((e[a][1].end.offset-e[a][1].start.offset+e[r][1].end.offset-e[r][1].start.offset)%3))continue;h=e[a][1].end.offset-e[a][1].start.offset>1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1;const x={...e[a][1].end},y={...e[r][1].start};Sy(x,-h),Sy(y,h),c={type:h>1?"strongSequence":"emphasisSequence",start:x,end:{...e[a][1].end}},f={type:h>1?"strongSequence":"emphasisSequence",start:{...e[r][1].start},end:y},o={type:h>1?"strongText":"emphasisText",start:{...e[a][1].end},end:{...e[r][1].start}},l={type:h>1?"strong":"emphasis",start:{...c.start},end:{...f.end}},e[a][1].end={...c.start},e[r][1].start={...f.end},m=[],e[a][1].end.offset-e[a][1].start.offset&&(m=Ar(m,[["enter",e[a][1],t],["exit",e[a][1],t]])),m=Ar(m,[["enter",l,t],["enter",c,t],["exit",c,t],["enter",o,t]]),m=Ar(m,Zu(t.parser.constructs.insideSpan.null,e.slice(a+1,r),t)),m=Ar(m,[["exit",o,t],["enter",f,t],["exit",f,t],["exit",l,t]]),e[r][1].end.offset-e[r][1].start.offset?(g=2,m=Ar(m,[["enter",e[r][1],t],["exit",e[r][1],t]])):g=0,gr(e,a-1,r-a+3,m),r=a+m.length-g-2;break}}for(r=-1;++r<e.length;)e[r][1].type==="attentionSequence"&&(e[r][1].type="data");return e}function KO(e,t){const r=this.parser.constructs.attentionMarkers.null,a=this.previous,l=Gs(a);let o;return c;function c(h){return o=h,e.enter("attentionSequence"),f(h)}function f(h){if(h===o)return e.consume(h),f;const m=e.exit("attentionSequence"),g=Gs(h),x=!g||g===2&&l||r.includes(h),y=!l||l===2&&g||r.includes(a);return m._open=!!(o===42?x:x&&(l||!y)),m._close=!!(o===42?y:y&&(g||!x)),t(h)}}function Sy(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const VO={name:"autolink",tokenize:YO};function YO(e,t,r){let a=0;return l;function l(v){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(v){return Vn(v)?(e.consume(v),c):v===64?r(v):m(v)}function c(v){return v===43||v===45||v===46||Hn(v)?(a=1,f(v)):m(v)}function f(v){return v===58?(e.consume(v),a=0,h):(v===43||v===45||v===46||Hn(v))&&a++<32?(e.consume(v),f):(a=0,m(v))}function h(v){return v===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):v===null||v===32||v===60||Mu(v)?r(v):(e.consume(v),h)}function m(v){return v===64?(e.consume(v),g):IO(v)?(e.consume(v),m):r(v)}function g(v){return Hn(v)?x(v):r(v)}function x(v){return v===46?(e.consume(v),a=0,g):v===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):y(v)}function y(v){if((v===45||Hn(v))&&a++<63){const k=v===45?y:x;return e.consume(v),k}return r(v)}}const Lo={partial:!0,tokenize:QO};function QO(e,t,r){return a;function a(o){return pt(o)?Ct(e,l,"linePrefix")(o):l(o)}function l(o){return o===null||Ke(o)?t(o):r(o)}}const Dk={continuation:{tokenize:ZO},exit:WO,name:"blockQuote",tokenize:XO};function XO(e,t,r){const a=this;return l;function l(c){if(c===62){const f=a.containerState;return f.open||(e.enter("blockQuote",{_container:!0}),f.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(c),e.exit("blockQuoteMarker"),o}return r(c)}function o(c){return pt(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(c))}}function ZO(e,t,r){const a=this;return l;function l(c){return pt(c)?Ct(e,o,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):o(c)}function o(c){return e.attempt(Dk,t,r)(c)}}function WO(e){e.exit("blockQuote")}const Lk={name:"characterEscape",tokenize:JO};function JO(e,t,r){return a;function a(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),l}function l(o){return UO(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(o)}}const Ik={name:"characterReference",tokenize:eM};function eM(e,t,r){const a=this;let l=0,o,c;return f;function f(x){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(x),e.exit("characterReferenceMarker"),h}function h(x){return x===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(x),e.exit("characterReferenceMarkerNumeric"),m):(e.enter("characterReferenceValue"),o=31,c=Hn,g(x))}function m(x){return x===88||x===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(x),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,c=BO,g):(e.enter("characterReferenceValue"),o=7,c=pm,g(x))}function g(x){if(x===59&&l){const y=e.exit("characterReferenceValue");return c===Hn&&!lp(a.sliceSerialize(y))?r(x):(e.enter("characterReferenceMarker"),e.consume(x),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return c(x)&&l++<o?(e.consume(x),g):r(x)}}const zy={partial:!0,tokenize:nM},Cy={concrete:!0,name:"codeFenced",tokenize:tM};function tM(e,t,r){const a=this,l={partial:!0,tokenize:$};let o=0,c=0,f;return h;function h(j){return m(j)}function m(j){const G=a.events[a.events.length-1];return o=G&&G[1].type==="linePrefix"?G[2].sliceSerialize(G[1],!0).length:0,f=j,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),g(j)}function g(j){return j===f?(c++,e.consume(j),g):c<3?r(j):(e.exit("codeFencedFenceSequence"),pt(j)?Ct(e,x,"whitespace")(j):x(j))}function x(j){return j===null||Ke(j)?(e.exit("codeFencedFence"),a.interrupt?t(j):e.check(zy,E,P)(j)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),y(j))}function y(j){return j===null||Ke(j)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),x(j)):pt(j)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ct(e,v,"whitespace")(j)):j===96&&j===f?r(j):(e.consume(j),y)}function v(j){return j===null||Ke(j)?x(j):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),k(j))}function k(j){return j===null||Ke(j)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),x(j)):j===96&&j===f?r(j):(e.consume(j),k)}function E(j){return e.attempt(l,P,S)(j)}function S(j){return e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),N}function N(j){return o>0&&pt(j)?Ct(e,O,"linePrefix",o+1)(j):O(j)}function O(j){return j===null||Ke(j)?e.check(zy,E,P)(j):(e.enter("codeFlowValue"),T(j))}function T(j){return j===null||Ke(j)?(e.exit("codeFlowValue"),O(j)):(e.consume(j),T)}function P(j){return e.exit("codeFenced"),t(j)}function $(j,G,A){let ie=0;return F;function F(Q){return j.enter("lineEnding"),j.consume(Q),j.exit("lineEnding"),ee}function ee(Q){return j.enter("codeFencedFence"),pt(Q)?Ct(j,te,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Q):te(Q)}function te(Q){return Q===f?(j.enter("codeFencedFenceSequence"),we(Q)):A(Q)}function we(Q){return Q===f?(ie++,j.consume(Q),we):ie>=c?(j.exit("codeFencedFenceSequence"),pt(Q)?Ct(j,se,"whitespace")(Q):se(Q)):A(Q)}function se(Q){return Q===null||Ke(Q)?(j.exit("codeFencedFence"),G(Q)):A(Q)}}}function nM(e,t,r){const a=this;return l;function l(c){return c===null?r(c):(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),o)}function o(c){return a.parser.lazy[a.now().line]?r(c):t(c)}}const zh={name:"codeIndented",tokenize:iM},rM={partial:!0,tokenize:aM};function iM(e,t,r){const a=this;return l;function l(m){return e.enter("codeIndented"),Ct(e,o,"linePrefix",5)(m)}function o(m){const g=a.events[a.events.length-1];return g&&g[1].type==="linePrefix"&&g[2].sliceSerialize(g[1],!0).length>=4?c(m):r(m)}function c(m){return m===null?h(m):Ke(m)?e.attempt(rM,c,h)(m):(e.enter("codeFlowValue"),f(m))}function f(m){return m===null||Ke(m)?(e.exit("codeFlowValue"),c(m)):(e.consume(m),f)}function h(m){return e.exit("codeIndented"),t(m)}}function aM(e,t,r){const a=this;return l;function l(c){return a.parser.lazy[a.now().line]?r(c):Ke(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),l):Ct(e,o,"linePrefix",5)(c)}function o(c){const f=a.events[a.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(c):Ke(c)?l(c):r(c)}}const sM={name:"codeText",previous:oM,resolve:lM,tokenize:cM};function lM(e){let t=e.length-4,r=3,a,l;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(a=r;++a<t;)if(e[a][1].type==="codeTextData"){e[r][1].type="codeTextPadding",e[t][1].type="codeTextPadding",r+=2,t-=2;break}}for(a=r-1,t++;++a<=t;)l===void 0?a!==t&&e[a][1].type!=="lineEnding"&&(l=a):(a===t||e[a][1].type==="lineEnding")&&(e[l][1].type="codeTextData",a!==l+2&&(e[l][1].end=e[a-1][1].end,e.splice(l+2,a-l-2),t-=a-l-2,a=l+2),l=void 0);return e}function oM(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function cM(e,t,r){let a=0,l,o;return c;function c(x){return e.enter("codeText"),e.enter("codeTextSequence"),f(x)}function f(x){return x===96?(e.consume(x),a++,f):(e.exit("codeTextSequence"),h(x))}function h(x){return x===null?r(x):x===32?(e.enter("space"),e.consume(x),e.exit("space"),h):x===96?(o=e.enter("codeTextSequence"),l=0,g(x)):Ke(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),h):(e.enter("codeTextData"),m(x))}function m(x){return x===null||x===32||x===96||Ke(x)?(e.exit("codeTextData"),h(x)):(e.consume(x),m)}function g(x){return x===96?(e.consume(x),l++,g):l===a?(e.exit("codeTextSequence"),e.exit("codeText"),t(x)):(o.type="codeTextData",m(x))}}class uM{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,r){const a=r??Number.POSITIVE_INFINITY;return a<this.left.length?this.left.slice(t,a):t>this.left.length?this.right.slice(this.right.length-a+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-a+this.left.length).reverse())}splice(t,r,a){const l=r||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-l,Number.POSITIVE_INFINITY);return a&&Jl(this.left,a),o.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),Jl(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Jl(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 r=this.left.splice(t,Number.POSITIVE_INFINITY);Jl(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Jl(this.left,r.reverse())}}}function Jl(e,t){let r=0;if(t.length<1e4)e.push(...t);else for(;r<t.length;)e.push(...t.slice(r,r+1e4)),r+=1e4}function Bk(e){const t={};let r=-1,a,l,o,c,f,h,m;const g=new uM(e);for(;++r<g.length;){for(;r in t;)r=t[r];if(a=g.get(r),r&&a[1].type==="chunkFlow"&&g.get(r-1)[1].type==="listItemPrefix"&&(h=a[1]._tokenizer.events,o=0,o<h.length&&h[o][1].type==="lineEndingBlank"&&(o+=2),o<h.length&&h[o][1].type==="content"))for(;++o<h.length&&h[o][1].type!=="content";)h[o][1].type==="chunkText"&&(h[o][1]._isInFirstContentOfListItem=!0,o++);if(a[0]==="enter")a[1].contentType&&(Object.assign(t,dM(g,r)),r=t[r],m=!0);else if(a[1]._container){for(o=r,l=void 0;o--;)if(c=g.get(o),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(l&&(g.get(l)[1].type="lineEndingBlank"),c[1].type="lineEnding",l=o);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;l&&(a[1].end={...g.get(l)[1].start},f=g.slice(l,r),f.unshift(a),g.splice(l,r-l+1,f))}}return gr(e,0,Number.POSITIVE_INFINITY,g.slice(0)),!m}function dM(e,t){const r=e.get(t)[1],a=e.get(t)[2];let l=t-1;const o=[];let c=r._tokenizer;c||(c=a.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const f=c.events,h=[],m={};let g,x,y=-1,v=r,k=0,E=0;const S=[E];for(;v;){for(;e.get(++l)[1]!==v;);o.push(l),v._tokenizer||(g=a.sliceStream(v),v.next||g.push(null),x&&c.defineSkip(v.start),v._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(g),v._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),x=v,v=v.next}for(v=r;++y<f.length;)f[y][0]==="exit"&&f[y-1][0]==="enter"&&f[y][1].type===f[y-1][1].type&&f[y][1].start.line!==f[y][1].end.line&&(E=y+1,S.push(E),v._tokenizer=void 0,v.previous=void 0,v=v.next);for(c.events=[],v?(v._tokenizer=void 0,v.previous=void 0):S.pop(),y=S.length;y--;){const N=f.slice(S[y],S[y+1]),O=o.pop();h.push([O,O+N.length-1]),e.splice(O,2,N)}for(h.reverse(),y=-1;++y<h.length;)m[k+h[y][0]]=k+h[y][1],k+=h[y][1]-h[y][0]-1;return m}const fM={resolve:mM,tokenize:pM},hM={partial:!0,tokenize:gM};function mM(e){return Bk(e),e}function pM(e,t){let r;return a;function a(f){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),l(f)}function l(f){return f===null?o(f):Ke(f)?e.check(hM,c,o)(f):(e.consume(f),l)}function o(f){return e.exit("chunkContent"),e.exit("content"),t(f)}function c(f){return e.consume(f),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,l}}function gM(e,t,r){const a=this;return l;function l(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Ct(e,o,"linePrefix")}function o(c){if(c===null||Ke(c))return r(c);const f=a.events[a.events.length-1];return!a.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(c):e.interrupt(a.parser.constructs.flow,r,t)(c)}}function Uk(e,t,r,a,l,o,c,f,h){const m=h||Number.POSITIVE_INFINITY;let g=0;return x;function x(N){return N===60?(e.enter(a),e.enter(l),e.enter(o),e.consume(N),e.exit(o),y):N===null||N===32||N===41||Mu(N)?r(N):(e.enter(a),e.enter(c),e.enter(f),e.enter("chunkString",{contentType:"string"}),E(N))}function y(N){return N===62?(e.enter(o),e.consume(N),e.exit(o),e.exit(l),e.exit(a),t):(e.enter(f),e.enter("chunkString",{contentType:"string"}),v(N))}function v(N){return N===62?(e.exit("chunkString"),e.exit(f),y(N)):N===null||N===60||Ke(N)?r(N):(e.consume(N),N===92?k:v)}function k(N){return N===60||N===62||N===92?(e.consume(N),v):v(N)}function E(N){return!g&&(N===null||N===41||Yt(N))?(e.exit("chunkString"),e.exit(f),e.exit(c),e.exit(a),t(N)):g<m&&N===40?(e.consume(N),g++,E):N===41?(e.consume(N),g--,E):N===null||N===32||N===40||Mu(N)?r(N):(e.consume(N),N===92?S:E)}function S(N){return N===40||N===41||N===92?(e.consume(N),E):E(N)}}function Fk(e,t,r,a,l,o){const c=this;let f=0,h;return m;function m(v){return e.enter(a),e.enter(l),e.consume(v),e.exit(l),e.enter(o),g}function g(v){return f>999||v===null||v===91||v===93&&!h||v===94&&!f&&"_hiddenFootnoteSupport"in c.parser.constructs?r(v):v===93?(e.exit(o),e.enter(l),e.consume(v),e.exit(l),e.exit(a),t):Ke(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),g):(e.enter("chunkString",{contentType:"string"}),x(v))}function x(v){return v===null||v===91||v===93||Ke(v)||f++>999?(e.exit("chunkString"),g(v)):(e.consume(v),h||(h=!pt(v)),v===92?y:x)}function y(v){return v===91||v===92||v===93?(e.consume(v),f++,x):x(v)}}function Pk(e,t,r,a,l,o){let c;return f;function f(y){return y===34||y===39||y===40?(e.enter(a),e.enter(l),e.consume(y),e.exit(l),c=y===40?41:y,h):r(y)}function h(y){return y===c?(e.enter(l),e.consume(y),e.exit(l),e.exit(a),t):(e.enter(o),m(y))}function m(y){return y===c?(e.exit(o),h(c)):y===null?r(y):Ke(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),Ct(e,m,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),g(y))}function g(y){return y===c||y===null||Ke(y)?(e.exit("chunkString"),m(y)):(e.consume(y),y===92?x:g)}function x(y){return y===c||y===92?(e.consume(y),g):g(y)}}function fo(e,t){let r;return a;function a(l){return Ke(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),r=!0,a):pt(l)?Ct(e,a,r?"linePrefix":"lineSuffix")(l):t(l)}}const bM={name:"definition",tokenize:yM},xM={partial:!0,tokenize:vM};function yM(e,t,r){const a=this;let l;return o;function o(v){return e.enter("definition"),c(v)}function c(v){return Fk.call(a,e,f,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function f(v){return l=$r(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)),v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),h):r(v)}function h(v){return Yt(v)?fo(e,m)(v):m(v)}function m(v){return Uk(e,g,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function g(v){return e.attempt(xM,x,x)(v)}function x(v){return pt(v)?Ct(e,y,"whitespace")(v):y(v)}function y(v){return v===null||Ke(v)?(e.exit("definition"),a.parser.defined.push(l),t(v)):r(v)}}function vM(e,t,r){return a;function a(f){return Yt(f)?fo(e,l)(f):r(f)}function l(f){return Pk(e,o,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function o(f){return pt(f)?Ct(e,c,"whitespace")(f):c(f)}function c(f){return f===null||Ke(f)?t(f):r(f)}}const kM={name:"hardBreakEscape",tokenize:wM};function wM(e,t,r){return a;function a(o){return e.enter("hardBreakEscape"),e.consume(o),l}function l(o){return Ke(o)?(e.exit("hardBreakEscape"),t(o)):r(o)}}const _M={name:"headingAtx",resolve:EM,tokenize:NM};function EM(e,t){let r=e.length-2,a=3,l,o;return e[a][1].type==="whitespace"&&(a+=2),r-2>a&&e[r][1].type==="whitespace"&&(r-=2),e[r][1].type==="atxHeadingSequence"&&(a===r-1||r-4>a&&e[r-2][1].type==="whitespace")&&(r-=a+1===r?2:4),r>a&&(l={type:"atxHeadingText",start:e[a][1].start,end:e[r][1].end},o={type:"chunkText",start:e[a][1].start,end:e[r][1].end,contentType:"text"},gr(e,a,r-a+1,[["enter",l,t],["enter",o,t],["exit",o,t],["exit",l,t]])),e}function NM(e,t,r){let a=0;return l;function l(g){return e.enter("atxHeading"),o(g)}function o(g){return e.enter("atxHeadingSequence"),c(g)}function c(g){return g===35&&a++<6?(e.consume(g),c):g===null||Yt(g)?(e.exit("atxHeadingSequence"),f(g)):r(g)}function f(g){return g===35?(e.enter("atxHeadingSequence"),h(g)):g===null||Ke(g)?(e.exit("atxHeading"),t(g)):pt(g)?Ct(e,f,"whitespace")(g):(e.enter("atxHeadingText"),m(g))}function h(g){return g===35?(e.consume(g),h):(e.exit("atxHeadingSequence"),f(g))}function m(g){return g===null||g===35||Yt(g)?(e.exit("atxHeadingText"),f(g)):(e.consume(g),m)}}const SM=["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"],Ty=["pre","script","style","textarea"],zM={concrete:!0,name:"htmlFlow",resolveTo:RM,tokenize:AM},CM={partial:!0,tokenize:MM},TM={partial:!0,tokenize:OM};function RM(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 AM(e,t,r){const a=this;let l,o,c,f,h;return m;function m(z){return g(z)}function g(z){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(z),x}function x(z){return z===33?(e.consume(z),y):z===47?(e.consume(z),o=!0,E):z===63?(e.consume(z),l=3,a.interrupt?t:R):Vn(z)?(e.consume(z),c=String.fromCharCode(z),S):r(z)}function y(z){return z===45?(e.consume(z),l=2,v):z===91?(e.consume(z),l=5,f=0,k):Vn(z)?(e.consume(z),l=4,a.interrupt?t:R):r(z)}function v(z){return z===45?(e.consume(z),a.interrupt?t:R):r(z)}function k(z){const ue="CDATA[";return z===ue.charCodeAt(f++)?(e.consume(z),f===ue.length?a.interrupt?t:te:k):r(z)}function E(z){return Vn(z)?(e.consume(z),c=String.fromCharCode(z),S):r(z)}function S(z){if(z===null||z===47||z===62||Yt(z)){const ue=z===47,be=c.toLowerCase();return!ue&&!o&&Ty.includes(be)?(l=1,a.interrupt?t(z):te(z)):SM.includes(c.toLowerCase())?(l=6,ue?(e.consume(z),N):a.interrupt?t(z):te(z)):(l=7,a.interrupt&&!a.parser.lazy[a.now().line]?r(z):o?O(z):T(z))}return z===45||Hn(z)?(e.consume(z),c+=String.fromCharCode(z),S):r(z)}function N(z){return z===62?(e.consume(z),a.interrupt?t:te):r(z)}function O(z){return pt(z)?(e.consume(z),O):F(z)}function T(z){return z===47?(e.consume(z),F):z===58||z===95||Vn(z)?(e.consume(z),P):pt(z)?(e.consume(z),T):F(z)}function P(z){return z===45||z===46||z===58||z===95||Hn(z)?(e.consume(z),P):$(z)}function $(z){return z===61?(e.consume(z),j):pt(z)?(e.consume(z),$):T(z)}function j(z){return z===null||z===60||z===61||z===62||z===96?r(z):z===34||z===39?(e.consume(z),h=z,G):pt(z)?(e.consume(z),j):A(z)}function G(z){return z===h?(e.consume(z),h=null,ie):z===null||Ke(z)?r(z):(e.consume(z),G)}function A(z){return z===null||z===34||z===39||z===47||z===60||z===61||z===62||z===96||Yt(z)?$(z):(e.consume(z),A)}function ie(z){return z===47||z===62||pt(z)?T(z):r(z)}function F(z){return z===62?(e.consume(z),ee):r(z)}function ee(z){return z===null||Ke(z)?te(z):pt(z)?(e.consume(z),ee):r(z)}function te(z){return z===45&&l===2?(e.consume(z),M):z===60&&l===1?(e.consume(z),Y):z===62&&l===4?(e.consume(z),D):z===63&&l===3?(e.consume(z),R):z===93&&l===5?(e.consume(z),fe):Ke(z)&&(l===6||l===7)?(e.exit("htmlFlowData"),e.check(CM,B,we)(z)):z===null||Ke(z)?(e.exit("htmlFlowData"),we(z)):(e.consume(z),te)}function we(z){return e.check(TM,se,B)(z)}function se(z){return e.enter("lineEnding"),e.consume(z),e.exit("lineEnding"),Q}function Q(z){return z===null||Ke(z)?we(z):(e.enter("htmlFlowData"),te(z))}function M(z){return z===45?(e.consume(z),R):te(z)}function Y(z){return z===47?(e.consume(z),c="",V):te(z)}function V(z){if(z===62){const ue=c.toLowerCase();return Ty.includes(ue)?(e.consume(z),D):te(z)}return Vn(z)&&c.length<8?(e.consume(z),c+=String.fromCharCode(z),V):te(z)}function fe(z){return z===93?(e.consume(z),R):te(z)}function R(z){return z===62?(e.consume(z),D):z===45&&l===2?(e.consume(z),R):te(z)}function D(z){return z===null||Ke(z)?(e.exit("htmlFlowData"),B(z)):(e.consume(z),D)}function B(z){return e.exit("htmlFlow"),t(z)}}function OM(e,t,r){const a=this;return l;function l(c){return Ke(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),o):r(c)}function o(c){return a.parser.lazy[a.now().line]?r(c):t(c)}}function MM(e,t,r){return a;function a(l){return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),e.attempt(Lo,t,r)}}const jM={name:"htmlText",tokenize:DM};function DM(e,t,r){const a=this;let l,o,c;return f;function f(R){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(R),h}function h(R){return R===33?(e.consume(R),m):R===47?(e.consume(R),$):R===63?(e.consume(R),T):Vn(R)?(e.consume(R),A):r(R)}function m(R){return R===45?(e.consume(R),g):R===91?(e.consume(R),o=0,k):Vn(R)?(e.consume(R),O):r(R)}function g(R){return R===45?(e.consume(R),v):r(R)}function x(R){return R===null?r(R):R===45?(e.consume(R),y):Ke(R)?(c=x,Y(R)):(e.consume(R),x)}function y(R){return R===45?(e.consume(R),v):x(R)}function v(R){return R===62?M(R):R===45?y(R):x(R)}function k(R){const D="CDATA[";return R===D.charCodeAt(o++)?(e.consume(R),o===D.length?E:k):r(R)}function E(R){return R===null?r(R):R===93?(e.consume(R),S):Ke(R)?(c=E,Y(R)):(e.consume(R),E)}function S(R){return R===93?(e.consume(R),N):E(R)}function N(R){return R===62?M(R):R===93?(e.consume(R),N):E(R)}function O(R){return R===null||R===62?M(R):Ke(R)?(c=O,Y(R)):(e.consume(R),O)}function T(R){return R===null?r(R):R===63?(e.consume(R),P):Ke(R)?(c=T,Y(R)):(e.consume(R),T)}function P(R){return R===62?M(R):T(R)}function $(R){return Vn(R)?(e.consume(R),j):r(R)}function j(R){return R===45||Hn(R)?(e.consume(R),j):G(R)}function G(R){return Ke(R)?(c=G,Y(R)):pt(R)?(e.consume(R),G):M(R)}function A(R){return R===45||Hn(R)?(e.consume(R),A):R===47||R===62||Yt(R)?ie(R):r(R)}function ie(R){return R===47?(e.consume(R),M):R===58||R===95||Vn(R)?(e.consume(R),F):Ke(R)?(c=ie,Y(R)):pt(R)?(e.consume(R),ie):M(R)}function F(R){return R===45||R===46||R===58||R===95||Hn(R)?(e.consume(R),F):ee(R)}function ee(R){return R===61?(e.consume(R),te):Ke(R)?(c=ee,Y(R)):pt(R)?(e.consume(R),ee):ie(R)}function te(R){return R===null||R===60||R===61||R===62||R===96?r(R):R===34||R===39?(e.consume(R),l=R,we):Ke(R)?(c=te,Y(R)):pt(R)?(e.consume(R),te):(e.consume(R),se)}function we(R){return R===l?(e.consume(R),l=void 0,Q):R===null?r(R):Ke(R)?(c=we,Y(R)):(e.consume(R),we)}function se(R){return R===null||R===34||R===39||R===60||R===61||R===96?r(R):R===47||R===62||Yt(R)?ie(R):(e.consume(R),se)}function Q(R){return R===47||R===62||Yt(R)?ie(R):r(R)}function M(R){return R===62?(e.consume(R),e.exit("htmlTextData"),e.exit("htmlText"),t):r(R)}function Y(R){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),V}function V(R){return pt(R)?Ct(e,fe,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):fe(R)}function fe(R){return e.enter("htmlTextData"),c(R)}}const op={name:"labelEnd",resolveAll:UM,resolveTo:FM,tokenize:PM},LM={tokenize:HM},IM={tokenize:qM},BM={tokenize:$M};function UM(e){let t=-1;const r=[];for(;++t<e.length;){const a=e[t][1];if(r.push(e[t]),a.type==="labelImage"||a.type==="labelLink"||a.type==="labelEnd"){const l=a.type==="labelImage"?4:2;a.type="data",t+=l}}return e.length!==r.length&&gr(e,0,e.length,r),e}function FM(e,t){let r=e.length,a=0,l,o,c,f;for(;r--;)if(l=e[r][1],o){if(l.type==="link"||l.type==="labelLink"&&l._inactive)break;e[r][0]==="enter"&&l.type==="labelLink"&&(l._inactive=!0)}else if(c){if(e[r][0]==="enter"&&(l.type==="labelImage"||l.type==="labelLink")&&!l._balanced&&(o=r,l.type!=="labelLink")){a=2;break}}else l.type==="labelEnd"&&(c=r);const h={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},m={type:"label",start:{...e[o][1].start},end:{...e[c][1].end}},g={type:"labelText",start:{...e[o+a+2][1].end},end:{...e[c-2][1].start}};return f=[["enter",h,t],["enter",m,t]],f=Ar(f,e.slice(o+1,o+a+3)),f=Ar(f,[["enter",g,t]]),f=Ar(f,Zu(t.parser.constructs.insideSpan.null,e.slice(o+a+4,c-3),t)),f=Ar(f,[["exit",g,t],e[c-2],e[c-1],["exit",m,t]]),f=Ar(f,e.slice(c+1)),f=Ar(f,[["exit",h,t]]),gr(e,o,e.length,f),e}function PM(e,t,r){const a=this;let l=a.events.length,o,c;for(;l--;)if((a.events[l][1].type==="labelImage"||a.events[l][1].type==="labelLink")&&!a.events[l][1]._balanced){o=a.events[l][1];break}return f;function f(y){return o?o._inactive?x(y):(c=a.parser.defined.includes($r(a.sliceSerialize({start:o.end,end:a.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(y),e.exit("labelMarker"),e.exit("labelEnd"),h):r(y)}function h(y){return y===40?e.attempt(LM,g,c?g:x)(y):y===91?e.attempt(IM,g,c?m:x)(y):c?g(y):x(y)}function m(y){return e.attempt(BM,g,x)(y)}function g(y){return t(y)}function x(y){return o._balanced=!0,r(y)}}function HM(e,t,r){return a;function a(x){return e.enter("resource"),e.enter("resourceMarker"),e.consume(x),e.exit("resourceMarker"),l}function l(x){return Yt(x)?fo(e,o)(x):o(x)}function o(x){return x===41?g(x):Uk(e,c,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(x)}function c(x){return Yt(x)?fo(e,h)(x):g(x)}function f(x){return r(x)}function h(x){return x===34||x===39||x===40?Pk(e,m,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(x):g(x)}function m(x){return Yt(x)?fo(e,g)(x):g(x)}function g(x){return x===41?(e.enter("resourceMarker"),e.consume(x),e.exit("resourceMarker"),e.exit("resource"),t):r(x)}}function qM(e,t,r){const a=this;return l;function l(f){return Fk.call(a,e,o,c,"reference","referenceMarker","referenceString")(f)}function o(f){return a.parser.defined.includes($r(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)))?t(f):r(f)}function c(f){return r(f)}}function $M(e,t,r){return a;function a(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),l}function l(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):r(o)}}const GM={name:"labelStartImage",resolveAll:op.resolveAll,tokenize:KM};function KM(e,t,r){const a=this;return l;function l(f){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(f),e.exit("labelImageMarker"),o}function o(f){return f===91?(e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelImage"),c):r(f)}function c(f){return f===94&&"_hiddenFootnoteSupport"in a.parser.constructs?r(f):t(f)}}const VM={name:"labelStartLink",resolveAll:op.resolveAll,tokenize:YM};function YM(e,t,r){const a=this;return l;function l(c){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelLink"),o}function o(c){return c===94&&"_hiddenFootnoteSupport"in a.parser.constructs?r(c):t(c)}}const Ch={name:"lineEnding",tokenize:QM};function QM(e,t){return r;function r(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Ct(e,t,"linePrefix")}}const Eu={name:"thematicBreak",tokenize:XM};function XM(e,t,r){let a=0,l;return o;function o(m){return e.enter("thematicBreak"),c(m)}function c(m){return l=m,f(m)}function f(m){return m===l?(e.enter("thematicBreakSequence"),h(m)):a>=3&&(m===null||Ke(m))?(e.exit("thematicBreak"),t(m)):r(m)}function h(m){return m===l?(e.consume(m),a++,h):(e.exit("thematicBreakSequence"),pt(m)?Ct(e,f,"whitespace")(m):f(m))}}const rr={continuation:{tokenize:e4},exit:n4,name:"list",tokenize:JM},ZM={partial:!0,tokenize:r4},WM={partial:!0,tokenize:t4};function JM(e,t,r){const a=this,l=a.events[a.events.length-1];let o=l&&l[1].type==="linePrefix"?l[2].sliceSerialize(l[1],!0).length:0,c=0;return f;function f(v){const k=a.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(k==="listUnordered"?!a.containerState.marker||v===a.containerState.marker:pm(v)){if(a.containerState.type||(a.containerState.type=k,e.enter(k,{_container:!0})),k==="listUnordered")return e.enter("listItemPrefix"),v===42||v===45?e.check(Eu,r,m)(v):m(v);if(!a.interrupt||v===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),h(v)}return r(v)}function h(v){return pm(v)&&++c<10?(e.consume(v),h):(!a.interrupt||c<2)&&(a.containerState.marker?v===a.containerState.marker:v===41||v===46)?(e.exit("listItemValue"),m(v)):r(v)}function m(v){return e.enter("listItemMarker"),e.consume(v),e.exit("listItemMarker"),a.containerState.marker=a.containerState.marker||v,e.check(Lo,a.interrupt?r:g,e.attempt(ZM,y,x))}function g(v){return a.containerState.initialBlankLine=!0,o++,y(v)}function x(v){return pt(v)?(e.enter("listItemPrefixWhitespace"),e.consume(v),e.exit("listItemPrefixWhitespace"),y):r(v)}function y(v){return a.containerState.size=o+a.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(v)}}function e4(e,t,r){const a=this;return a.containerState._closeFlow=void 0,e.check(Lo,l,o);function l(f){return a.containerState.furtherBlankLines=a.containerState.furtherBlankLines||a.containerState.initialBlankLine,Ct(e,t,"listItemIndent",a.containerState.size+1)(f)}function o(f){return a.containerState.furtherBlankLines||!pt(f)?(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,c(f)):(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,e.attempt(WM,t,c)(f))}function c(f){return a.containerState._closeFlow=!0,a.interrupt=void 0,Ct(e,e.attempt(rr,t,r),"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function t4(e,t,r){const a=this;return Ct(e,l,"listItemIndent",a.containerState.size+1);function l(o){const c=a.events[a.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===a.containerState.size?t(o):r(o)}}function n4(e){e.exit(this.containerState.type)}function r4(e,t,r){const a=this;return Ct(e,l,"listItemPrefixWhitespace",a.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function l(o){const c=a.events[a.events.length-1];return!pt(o)&&c&&c[1].type==="listItemPrefixWhitespace"?t(o):r(o)}}const Ry={name:"setextUnderline",resolveTo:i4,tokenize:a4};function i4(e,t){let r=e.length,a,l,o;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){a=r;break}e[r][1].type==="paragraph"&&(l=r)}else e[r][1].type==="content"&&e.splice(r,1),!o&&e[r][1].type==="definition"&&(o=r);const c={type:"setextHeading",start:{...e[a][1].start},end:{...e[e.length-1][1].end}};return e[l][1].type="setextHeadingText",o?(e.splice(l,0,["enter",c,t]),e.splice(o+1,0,["exit",e[a][1],t]),e[a][1].end={...e[o][1].end}):e[a][1]=c,e.push(["exit",c,t]),e}function a4(e,t,r){const a=this;let l;return o;function o(m){let g=a.events.length,x;for(;g--;)if(a.events[g][1].type!=="lineEnding"&&a.events[g][1].type!=="linePrefix"&&a.events[g][1].type!=="content"){x=a.events[g][1].type==="paragraph";break}return!a.parser.lazy[a.now().line]&&(a.interrupt||x)?(e.enter("setextHeadingLine"),l=m,c(m)):r(m)}function c(m){return e.enter("setextHeadingLineSequence"),f(m)}function f(m){return m===l?(e.consume(m),f):(e.exit("setextHeadingLineSequence"),pt(m)?Ct(e,h,"lineSuffix")(m):h(m))}function h(m){return m===null||Ke(m)?(e.exit("setextHeadingLine"),t(m)):r(m)}}const s4={tokenize:l4};function l4(e){const t=this,r=e.attempt(Lo,a,e.attempt(this.parser.constructs.flowInitial,l,Ct(e,e.attempt(this.parser.constructs.flow,l,e.attempt(fM,l)),"linePrefix")));return r;function a(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r}function l(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,r}}const o4={resolveAll:qk()},c4=Hk("string"),u4=Hk("text");function Hk(e){return{resolveAll:qk(e==="text"?d4:void 0),tokenize:t};function t(r){const a=this,l=this.parser.constructs[e],o=r.attempt(l,c,f);return c;function c(g){return m(g)?o(g):f(g)}function f(g){if(g===null){r.consume(g);return}return r.enter("data"),r.consume(g),h}function h(g){return m(g)?(r.exit("data"),o(g)):(r.consume(g),h)}function m(g){if(g===null)return!0;const x=l[g];let y=-1;if(x)for(;++y<x.length;){const v=x[y];if(!v.previous||v.previous.call(a,a.previous))return!0}return!1}}}function qk(e){return t;function t(r,a){let l=-1,o;for(;++l<=r.length;)o===void 0?r[l]&&r[l][1].type==="data"&&(o=l,l++):(!r[l]||r[l][1].type!=="data")&&(l!==o+2&&(r[o][1].end=r[l-1][1].end,r.splice(o+2,l-o-2),l=o+2),o=void 0);return e?e(r,a):r}}function d4(e,t){let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){const a=e[r-1][1],l=t.sliceStream(a);let o=l.length,c=-1,f=0,h;for(;o--;){const m=l[o];if(typeof m=="string"){for(c=m.length;m.charCodeAt(c-1)===32;)f++,c--;if(c)break;c=-1}else if(m===-2)h=!0,f++;else if(m!==-1){o++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(f=0),f){const m={type:r===e.length||h||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?c:a.start._bufferIndex+c,_index:a.start._index+o,line:a.end.line,column:a.end.column-f,offset:a.end.offset-f},end:{...a.end}};a.end={...m.start},a.start.offset===a.end.offset?Object.assign(a,m):(e.splice(r,0,["enter",m,t],["exit",m,t]),r+=2)}r++}return e}const f4={42:rr,43:rr,45:rr,48:rr,49:rr,50:rr,51:rr,52:rr,53:rr,54:rr,55:rr,56:rr,57:rr,62:Dk},h4={91:bM},m4={[-2]:zh,[-1]:zh,32:zh},p4={35:_M,42:Eu,45:[Ry,Eu],60:zM,61:Ry,95:Eu,96:Cy,126:Cy},g4={38:Ik,92:Lk},b4={[-5]:Ch,[-4]:Ch,[-3]:Ch,33:GM,38:Ik,42:gm,60:[VO,jM],91:VM,92:[kM,Lk],93:op,95:gm,96:sM},x4={null:[gm,o4]},y4={null:[42,95]},v4={null:[]},k4=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:y4,contentInitial:h4,disable:v4,document:f4,flow:p4,flowInitial:m4,insideSpan:x4,string:g4,text:b4},Symbol.toStringTag,{value:"Module"}));function w4(e,t,r){let a={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0};const l={},o=[];let c=[],f=[];const h={attempt:G($),check:G(j),consume:O,enter:T,exit:P,interrupt:G(j,{interrupt:!0})},m={code:null,containerState:{},defineSkip:E,events:[],now:k,parser:e,previous:null,sliceSerialize:y,sliceStream:v,write:x};let g=t.tokenize.call(m,h);return t.resolveAll&&o.push(t),m;function x(ee){return c=Ar(c,ee),S(),c[c.length-1]!==null?[]:(A(t,0),m.events=Zu(o,m.events,m),m.events)}function y(ee,te){return E4(v(ee),te)}function v(ee){return _4(c,ee)}function k(){const{_bufferIndex:ee,_index:te,line:we,column:se,offset:Q}=a;return{_bufferIndex:ee,_index:te,line:we,column:se,offset:Q}}function E(ee){l[ee.line]=ee.column,F()}function S(){let ee;for(;a._index<c.length;){const te=c[a._index];if(typeof te=="string")for(ee=a._index,a._bufferIndex<0&&(a._bufferIndex=0);a._index===ee&&a._bufferIndex<te.length;)N(te.charCodeAt(a._bufferIndex));else N(te)}}function N(ee){g=g(ee)}function O(ee){Ke(ee)?(a.line++,a.column=1,a.offset+=ee===-3?2:1,F()):ee!==-1&&(a.column++,a.offset++),a._bufferIndex<0?a._index++:(a._bufferIndex++,a._bufferIndex===c[a._index].length&&(a._bufferIndex=-1,a._index++)),m.previous=ee}function T(ee,te){const we=te||{};return we.type=ee,we.start=k(),m.events.push(["enter",we,m]),f.push(we),we}function P(ee){const te=f.pop();return te.end=k(),m.events.push(["exit",te,m]),te}function $(ee,te){A(ee,te.from)}function j(ee,te){te.restore()}function G(ee,te){return we;function we(se,Q,M){let Y,V,fe,R;return Array.isArray(se)?B(se):"tokenize"in se?B([se]):D(se);function D(ye){return le;function le(xe){const pe=xe!==null&&ye[xe],Ue=xe!==null&&ye.null,Ae=[...Array.isArray(pe)?pe:pe?[pe]:[],...Array.isArray(Ue)?Ue:Ue?[Ue]:[]];return B(Ae)(xe)}}function B(ye){return Y=ye,V=0,ye.length===0?M:z(ye[V])}function z(ye){return le;function le(xe){return R=ie(),fe=ye,ye.partial||(m.currentConstruct=ye),ye.name&&m.parser.constructs.disable.null.includes(ye.name)?be():ye.tokenize.call(te?Object.assign(Object.create(m),te):m,h,ue,be)(xe)}}function ue(ye){return ee(fe,R),Q}function be(ye){return R.restore(),++V<Y.length?z(Y[V]):M}}}function A(ee,te){ee.resolveAll&&!o.includes(ee)&&o.push(ee),ee.resolve&&gr(m.events,te,m.events.length-te,ee.resolve(m.events.slice(te),m)),ee.resolveTo&&(m.events=ee.resolveTo(m.events,m))}function ie(){const ee=k(),te=m.previous,we=m.currentConstruct,se=m.events.length,Q=Array.from(f);return{from:se,restore:M};function M(){a=ee,m.previous=te,m.currentConstruct=we,m.events.length=se,f=Q,F()}}function F(){a.line in l&&a.column<2&&(a.column=l[a.line],a.offset+=l[a.line]-1)}}function _4(e,t){const r=t.start._index,a=t.start._bufferIndex,l=t.end._index,o=t.end._bufferIndex;let c;if(r===l)c=[e[r].slice(a,o)];else{if(c=e.slice(r,l),a>-1){const f=c[0];typeof f=="string"?c[0]=f.slice(a):c.shift()}o>0&&c.push(e[l].slice(0,o))}return c}function E4(e,t){let r=-1;const a=[];let l;for(;++r<e.length;){const o=e[r];let c;if(typeof o=="string")c=o;else switch(o){case-5:{c="\r";break}case-4:{c=`
530
+ `;break}case-3:{c=`\r
531
+ `;break}case-2:{c=t?" ":" ";break}case-1:{if(!t&&l)continue;c=" ";break}default:c=String.fromCharCode(o)}l=o===-2,a.push(c)}return a.join("")}function N4(e){const a={constructs:Mk([k4,...(e||{}).extensions||[]]),content:l(FO),defined:[],document:l(HO),flow:l(s4),lazy:{},string:l(c4),text:l(u4)};return a;function l(o){return c;function c(f){return w4(a,o,f)}}}function S4(e){for(;!Bk(e););return e}const Ay=/[\0\t\n\r]/g;function z4(){let e=1,t="",r=!0,a;return l;function l(o,c,f){const h=[];let m,g,x,y,v;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(c||void 0).decode(o)),x=0,t="",r&&(o.charCodeAt(0)===65279&&x++,r=void 0);x<o.length;){if(Ay.lastIndex=x,m=Ay.exec(o),y=m&&m.index!==void 0?m.index:o.length,v=o.charCodeAt(y),!m){t=o.slice(x);break}if(v===10&&x===y&&a)h.push(-3),a=void 0;else switch(a&&(h.push(-5),a=void 0),x<y&&(h.push(o.slice(x,y)),e+=y-x),v){case 0:{h.push(65533),e++;break}case 9:{for(g=Math.ceil(e/4)*4,h.push(-2);e++<g;)h.push(-1);break}case 10:{h.push(-4),e=1;break}default:a=!0,e=1}x=y+1}return f&&(a&&h.push(-5),t&&h.push(t),h.push(null)),h}}const C4=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function T4(e){return e.replace(C4,R4)}function R4(e,t,r){if(t)return t;if(r.charCodeAt(0)===35){const l=r.charCodeAt(1),o=l===120||l===88;return jk(r.slice(o?2:1),o?16:10)}return lp(r)||e}const $k={}.hasOwnProperty;function A4(e,t,r){return t&&typeof t=="object"&&(r=t,t=void 0),O4(r)(S4(N4(r).document().write(z4()(e,t,!0))))}function O4(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(br),autolinkProtocol:ie,autolinkEmail:ie,atxHeading:o(_t),blockQuote:o(Ue),characterEscape:ie,characterReference:ie,codeFenced:o(Ae),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:o(Ae,c),codeText:o(Tt,c),codeTextData:ie,data:ie,codeFlowValue:ie,definition:o(tt),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:o(gt),hardBreakEscape:o(ot),hardBreakTrailing:o(ot),htmlFlow:o(_n,c),htmlFlowData:ie,htmlText:o(_n,c),htmlTextData:ie,image:o(Yn),label:c,link:o(br),listItem:o(oi),listItemValue:y,listOrdered:o(xr,x),listUnordered:o(xr),paragraph:o(wa),reference:z,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:o(_t),strong:o(Li),thematicBreak:o(Qn)},exit:{atxHeading:h(),atxHeadingSequence:$,autolink:h(),autolinkEmail:pe,autolinkProtocol:xe,blockQuote:h(),characterEscapeValue:F,characterReferenceMarkerHexadecimal:be,characterReferenceMarkerNumeric:be,characterReferenceValue:ye,characterReference:le,codeFenced:h(S),codeFencedFence:E,codeFencedFenceInfo:v,codeFencedFenceMeta:k,codeFlowValue:F,codeIndented:h(N),codeText:h(Q),codeTextData:F,data:F,definition:h(),definitionDestinationString:P,definitionLabelString:O,definitionTitleString:T,emphasis:h(),hardBreakEscape:h(te),hardBreakTrailing:h(te),htmlFlow:h(we),htmlFlowData:F,htmlText:h(se),htmlTextData:F,image:h(Y),label:fe,labelText:V,lineEnding:ee,link:h(M),listItem:h(),listOrdered:h(),listUnordered:h(),paragraph:h(),referenceString:ue,resourceDestinationString:R,resourceTitleString:D,resource:B,setextHeading:h(A),setextHeadingLineSequence:G,setextHeadingText:j,strong:h(),thematicBreak:h()}};Gk(t,(e||{}).mdastExtensions||[]);const r={};return a;function a(ae){let _e={type:"root",children:[]};const $e={stack:[_e],tokenStack:[],config:t,enter:f,exit:m,buffer:c,resume:g,data:r},We=[];let rt=-1;for(;++rt<ae.length;)if(ae[rt][1].type==="listOrdered"||ae[rt][1].type==="listUnordered")if(ae[rt][0]==="enter")We.push(rt);else{const zn=We.pop();rt=l(ae,zn,rt)}for(rt=-1;++rt<ae.length;){const zn=t[ae[rt][0]];$k.call(zn,ae[rt][1].type)&&zn[ae[rt][1].type].call(Object.assign({sliceSerialize:ae[rt][2].sliceSerialize},$e),ae[rt][1])}if($e.tokenStack.length>0){const zn=$e.tokenStack[$e.tokenStack.length-1];(zn[1]||Oy).call($e,void 0,zn[0])}for(_e.position={start:ua(ae.length>0?ae[0][1].start:{line:1,column:1,offset:0}),end:ua(ae.length>0?ae[ae.length-2][1].end:{line:1,column:1,offset:0})},rt=-1;++rt<t.transforms.length;)_e=t.transforms[rt](_e)||_e;return _e}function l(ae,_e,$e){let We=_e-1,rt=-1,zn=!1,ar,cn,rn,Qt;for(;++We<=$e;){const Rt=ae[We];switch(Rt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Rt[0]==="enter"?rt++:rt--,Qt=void 0;break}case"lineEndingBlank":{Rt[0]==="enter"&&(ar&&!Qt&&!rt&&!rn&&(rn=We),Qt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Qt=void 0}if(!rt&&Rt[0]==="enter"&&Rt[1].type==="listItemPrefix"||rt===-1&&Rt[0]==="exit"&&(Rt[1].type==="listUnordered"||Rt[1].type==="listOrdered")){if(ar){let sr=We;for(cn=void 0;sr--;){const Cn=ae[sr];if(Cn[1].type==="lineEnding"||Cn[1].type==="lineEndingBlank"){if(Cn[0]==="exit")continue;cn&&(ae[cn][1].type="lineEndingBlank",zn=!0),Cn[1].type="lineEnding",cn=sr}else if(!(Cn[1].type==="linePrefix"||Cn[1].type==="blockQuotePrefix"||Cn[1].type==="blockQuotePrefixWhitespace"||Cn[1].type==="blockQuoteMarker"||Cn[1].type==="listItemIndent"))break}rn&&(!cn||rn<cn)&&(ar._spread=!0),ar.end=Object.assign({},cn?ae[cn][1].start:Rt[1].end),ae.splice(cn||We,0,["exit",ar,Rt[2]]),We++,$e++}if(Rt[1].type==="listItemPrefix"){const sr={type:"listItem",_spread:!1,start:Object.assign({},Rt[1].start),end:void 0};ar=sr,ae.splice(We,0,["enter",sr,Rt[2]]),We++,$e++,rn=void 0,Qt=!0}}}return ae[_e][1]._spread=zn,$e}function o(ae,_e){return $e;function $e(We){f.call(this,ae(We),We),_e&&_e.call(this,We)}}function c(){this.stack.push({type:"fragment",children:[]})}function f(ae,_e,$e){this.stack[this.stack.length-1].children.push(ae),this.stack.push(ae),this.tokenStack.push([_e,$e||void 0]),ae.position={start:ua(_e.start),end:void 0}}function h(ae){return _e;function _e($e){ae&&ae.call(this,$e),m.call(this,$e)}}function m(ae,_e){const $e=this.stack.pop(),We=this.tokenStack.pop();if(We)We[0].type!==ae.type&&(_e?_e.call(this,ae,We[0]):(We[1]||Oy).call(this,ae,We[0]));else throw new Error("Cannot close `"+ae.type+"` ("+uo({start:ae.start,end:ae.end})+"): it’s not open");$e.position.end=ua(ae.end)}function g(){return sp(this.stack.pop())}function x(){this.data.expectingFirstListItemValue=!0}function y(ae){if(this.data.expectingFirstListItemValue){const _e=this.stack[this.stack.length-2];_e.start=Number.parseInt(this.sliceSerialize(ae),10),this.data.expectingFirstListItemValue=void 0}}function v(){const ae=this.resume(),_e=this.stack[this.stack.length-1];_e.lang=ae}function k(){const ae=this.resume(),_e=this.stack[this.stack.length-1];_e.meta=ae}function E(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function S(){const ae=this.resume(),_e=this.stack[this.stack.length-1];_e.value=ae.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function N(){const ae=this.resume(),_e=this.stack[this.stack.length-1];_e.value=ae.replace(/(\r?\n|\r)$/g,"")}function O(ae){const _e=this.resume(),$e=this.stack[this.stack.length-1];$e.label=_e,$e.identifier=$r(this.sliceSerialize(ae)).toLowerCase()}function T(){const ae=this.resume(),_e=this.stack[this.stack.length-1];_e.title=ae}function P(){const ae=this.resume(),_e=this.stack[this.stack.length-1];_e.url=ae}function $(ae){const _e=this.stack[this.stack.length-1];if(!_e.depth){const $e=this.sliceSerialize(ae).length;_e.depth=$e}}function j(){this.data.setextHeadingSlurpLineEnding=!0}function G(ae){const _e=this.stack[this.stack.length-1];_e.depth=this.sliceSerialize(ae).codePointAt(0)===61?1:2}function A(){this.data.setextHeadingSlurpLineEnding=void 0}function ie(ae){const $e=this.stack[this.stack.length-1].children;let We=$e[$e.length-1];(!We||We.type!=="text")&&(We=Wt(),We.position={start:ua(ae.start),end:void 0},$e.push(We)),this.stack.push(We)}function F(ae){const _e=this.stack.pop();_e.value+=this.sliceSerialize(ae),_e.position.end=ua(ae.end)}function ee(ae){const _e=this.stack[this.stack.length-1];if(this.data.atHardBreak){const $e=_e.children[_e.children.length-1];$e.position.end=ua(ae.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(_e.type)&&(ie.call(this,ae),F.call(this,ae))}function te(){this.data.atHardBreak=!0}function we(){const ae=this.resume(),_e=this.stack[this.stack.length-1];_e.value=ae}function se(){const ae=this.resume(),_e=this.stack[this.stack.length-1];_e.value=ae}function Q(){const ae=this.resume(),_e=this.stack[this.stack.length-1];_e.value=ae}function M(){const ae=this.stack[this.stack.length-1];if(this.data.inReference){const _e=this.data.referenceType||"shortcut";ae.type+="Reference",ae.referenceType=_e,delete ae.url,delete ae.title}else delete ae.identifier,delete ae.label;this.data.referenceType=void 0}function Y(){const ae=this.stack[this.stack.length-1];if(this.data.inReference){const _e=this.data.referenceType||"shortcut";ae.type+="Reference",ae.referenceType=_e,delete ae.url,delete ae.title}else delete ae.identifier,delete ae.label;this.data.referenceType=void 0}function V(ae){const _e=this.sliceSerialize(ae),$e=this.stack[this.stack.length-2];$e.label=T4(_e),$e.identifier=$r(_e).toLowerCase()}function fe(){const ae=this.stack[this.stack.length-1],_e=this.resume(),$e=this.stack[this.stack.length-1];if(this.data.inReference=!0,$e.type==="link"){const We=ae.children;$e.children=We}else $e.alt=_e}function R(){const ae=this.resume(),_e=this.stack[this.stack.length-1];_e.url=ae}function D(){const ae=this.resume(),_e=this.stack[this.stack.length-1];_e.title=ae}function B(){this.data.inReference=void 0}function z(){this.data.referenceType="collapsed"}function ue(ae){const _e=this.resume(),$e=this.stack[this.stack.length-1];$e.label=_e,$e.identifier=$r(this.sliceSerialize(ae)).toLowerCase(),this.data.referenceType="full"}function be(ae){this.data.characterReferenceType=ae.type}function ye(ae){const _e=this.sliceSerialize(ae),$e=this.data.characterReferenceType;let We;$e?(We=jk(_e,$e==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):We=lp(_e);const rt=this.stack[this.stack.length-1];rt.value+=We}function le(ae){const _e=this.stack.pop();_e.position.end=ua(ae.end)}function xe(ae){F.call(this,ae);const _e=this.stack[this.stack.length-1];_e.url=this.sliceSerialize(ae)}function pe(ae){F.call(this,ae);const _e=this.stack[this.stack.length-1];_e.url="mailto:"+this.sliceSerialize(ae)}function Ue(){return{type:"blockquote",children:[]}}function Ae(){return{type:"code",lang:null,meta:null,value:""}}function Tt(){return{type:"inlineCode",value:""}}function tt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function gt(){return{type:"emphasis",children:[]}}function _t(){return{type:"heading",depth:0,children:[]}}function ot(){return{type:"break"}}function _n(){return{type:"html",value:""}}function Yn(){return{type:"image",title:null,url:"",alt:null}}function br(){return{type:"link",title:null,url:"",children:[]}}function xr(ae){return{type:"list",ordered:ae.type==="listOrdered",start:null,spread:ae._spread,children:[]}}function oi(ae){return{type:"listItem",spread:ae._spread,checked:null,children:[]}}function wa(){return{type:"paragraph",children:[]}}function Li(){return{type:"strong",children:[]}}function Wt(){return{type:"text",value:""}}function Qn(){return{type:"thematicBreak"}}}function ua(e){return{line:e.line,column:e.column,offset:e.offset}}function Gk(e,t){let r=-1;for(;++r<t.length;){const a=t[r];Array.isArray(a)?Gk(e,a):M4(e,a)}}function M4(e,t){let r;for(r in t)if($k.call(t,r))switch(r){case"canContainEols":{const a=t[r];a&&e[r].push(...a);break}case"transforms":{const a=t[r];a&&e[r].push(...a);break}case"enter":case"exit":{const a=t[r];a&&Object.assign(e[r],a);break}}}function Oy(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+uo({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+uo({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+uo({start:t.start,end:t.end})+") is still open")}function j4(e){const t=this;t.parser=r;function r(a){return A4(a,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function D4(e,t){const r={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,r),e.applyData(t,r)}function L4(e,t){const r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,r),[e.applyData(t,r),{type:"text",value:`
532
+ `}]}function I4(e,t){const r=t.value?t.value+`
533
+ `:"",a={},l=t.lang?t.lang.split(/\s+/):[];l.length>0&&(a.className=["language-"+l[0]]);let o={type:"element",tagName:"code",properties:a,children:[{type:"text",value:r}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function B4(e,t){const r={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function U4(e,t){const r={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function F4(e,t){const r=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",a=String(t.identifier).toUpperCase(),l=Js(a.toLowerCase()),o=e.footnoteOrder.indexOf(a);let c,f=e.footnoteCounts.get(a);f===void 0?(f=0,e.footnoteOrder.push(a),c=e.footnoteOrder.length):c=o+1,f+=1,e.footnoteCounts.set(a,f);const h={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+l,id:r+"fnref-"+l+(f>1?"-"+f:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};e.patch(t,h);const m={type:"element",tagName:"sup",properties:{},children:[h]};return e.patch(t,m),e.applyData(t,m)}function P4(e,t){const r={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function H4(e,t){if(e.options.allowDangerousHtml){const r={type:"raw",value:t.value};return e.patch(t,r),e.applyData(t,r)}}function Kk(e,t){const r=t.referenceType;let a="]";if(r==="collapsed"?a+="[]":r==="full"&&(a+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+a}];const l=e.all(t),o=l[0];o&&o.type==="text"?o.value="["+o.value:l.unshift({type:"text",value:"["});const c=l[l.length-1];return c&&c.type==="text"?c.value+=a:l.push({type:"text",value:a}),l}function q4(e,t){const r=String(t.identifier).toUpperCase(),a=e.definitionById.get(r);if(!a)return Kk(e,t);const l={src:Js(a.url||""),alt:t.alt};a.title!==null&&a.title!==void 0&&(l.title=a.title);const o={type:"element",tagName:"img",properties:l,children:[]};return e.patch(t,o),e.applyData(t,o)}function $4(e,t){const r={src:Js(t.url)};t.alt!==null&&t.alt!==void 0&&(r.alt=t.alt),t.title!==null&&t.title!==void 0&&(r.title=t.title);const a={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,a),e.applyData(t,a)}function G4(e,t){const r={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,r);const a={type:"element",tagName:"code",properties:{},children:[r]};return e.patch(t,a),e.applyData(t,a)}function K4(e,t){const r=String(t.identifier).toUpperCase(),a=e.definitionById.get(r);if(!a)return Kk(e,t);const l={href:Js(a.url||"")};a.title!==null&&a.title!==void 0&&(l.title=a.title);const o={type:"element",tagName:"a",properties:l,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function V4(e,t){const r={href:Js(t.url)};t.title!==null&&t.title!==void 0&&(r.title=t.title);const a={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function Y4(e,t,r){const a=e.all(t),l=r?Q4(r):Vk(t),o={},c=[];if(typeof t.checked=="boolean"){const g=a[0];let x;g&&g.type==="element"&&g.tagName==="p"?x=g:(x={type:"element",tagName:"p",properties:{},children:[]},a.unshift(x)),x.children.length>0&&x.children.unshift({type:"text",value:" "}),x.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let f=-1;for(;++f<a.length;){const g=a[f];(l||f!==0||g.type!=="element"||g.tagName!=="p")&&c.push({type:"text",value:`
534
+ `}),g.type==="element"&&g.tagName==="p"&&!l?c.push(...g.children):c.push(g)}const h=a[a.length-1];h&&(l||h.type!=="element"||h.tagName!=="p")&&c.push({type:"text",value:`
535
+ `});const m={type:"element",tagName:"li",properties:o,children:c};return e.patch(t,m),e.applyData(t,m)}function Q4(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const r=e.children;let a=-1;for(;!t&&++a<r.length;)t=Vk(r[a])}return t}function Vk(e){const t=e.spread;return t??e.children.length>1}function X4(e,t){const r={},a=e.all(t);let l=-1;for(typeof t.start=="number"&&t.start!==1&&(r.start=t.start);++l<a.length;){const c=a[l];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:r,children:e.wrap(a,!0)};return e.patch(t,o),e.applyData(t,o)}function Z4(e,t){const r={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function W4(e,t){const r={type:"root",children:e.wrap(e.all(t))};return e.patch(t,r),e.applyData(t,r)}function J4(e,t){const r={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function ej(e,t){const r=e.all(t),a=r.shift(),l=[];if(a){const c={type:"element",tagName:"thead",properties:{},children:e.wrap([a],!0)};e.patch(t.children[0],c),l.push(c)}if(r.length>0){const c={type:"element",tagName:"tbody",properties:{},children:e.wrap(r,!0)},f=np(t.children[1]),h=Sk(t.children[t.children.length-1]);f&&h&&(c.position={start:f,end:h}),l.push(c)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(l,!0)};return e.patch(t,o),e.applyData(t,o)}function tj(e,t,r){const a=r?r.children:void 0,o=(a?a.indexOf(t):1)===0?"th":"td",c=r&&r.type==="table"?r.align:void 0,f=c?c.length:t.children.length;let h=-1;const m=[];for(;++h<f;){const x=t.children[h],y={},v=c?c[h]:void 0;v&&(y.align=v);let k={type:"element",tagName:o,properties:y,children:[]};x&&(k.children=e.all(x),e.patch(x,k),k=e.applyData(x,k)),m.push(k)}const g={type:"element",tagName:"tr",properties:{},children:e.wrap(m,!0)};return e.patch(t,g),e.applyData(t,g)}function nj(e,t){const r={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}const My=9,jy=32;function rj(e){const t=String(e),r=/\r?\n|\r/g;let a=r.exec(t),l=0;const o=[];for(;a;)o.push(Dy(t.slice(l,a.index),l>0,!0),a[0]),l=a.index+a[0].length,a=r.exec(t);return o.push(Dy(t.slice(l),l>0,!1)),o.join("")}function Dy(e,t,r){let a=0,l=e.length;if(t){let o=e.codePointAt(a);for(;o===My||o===jy;)a++,o=e.codePointAt(a)}if(r){let o=e.codePointAt(l-1);for(;o===My||o===jy;)l--,o=e.codePointAt(l-1)}return l>a?e.slice(a,l):""}function ij(e,t){const r={type:"text",value:rj(String(t.value))};return e.patch(t,r),e.applyData(t,r)}function aj(e,t){const r={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,r),e.applyData(t,r)}const sj={blockquote:D4,break:L4,code:I4,delete:B4,emphasis:U4,footnoteReference:F4,heading:P4,html:H4,imageReference:q4,image:$4,inlineCode:G4,linkReference:K4,link:V4,listItem:Y4,list:X4,paragraph:Z4,root:W4,strong:J4,table:ej,tableCell:nj,tableRow:tj,text:ij,thematicBreak:aj,toml:iu,yaml:iu,definition:iu,footnoteDefinition:iu};function iu(){}const Yk=-1,Wu=0,ho=1,ju=2,cp=3,up=4,dp=5,fp=6,Qk=7,Xk=8,Ly=typeof self=="object"?self:globalThis,lj=(e,t)=>{const r=(l,o)=>(e.set(o,l),l),a=l=>{if(e.has(l))return e.get(l);const[o,c]=t[l];switch(o){case Wu:case Yk:return r(c,l);case ho:{const f=r([],l);for(const h of c)f.push(a(h));return f}case ju:{const f=r({},l);for(const[h,m]of c)f[a(h)]=a(m);return f}case cp:return r(new Date(c),l);case up:{const{source:f,flags:h}=c;return r(new RegExp(f,h),l)}case dp:{const f=r(new Map,l);for(const[h,m]of c)f.set(a(h),a(m));return f}case fp:{const f=r(new Set,l);for(const h of c)f.add(a(h));return f}case Qk:{const{name:f,message:h}=c;return r(new Ly[f](h),l)}case Xk:return r(BigInt(c),l);case"BigInt":return r(Object(BigInt(c)),l);case"ArrayBuffer":return r(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:f}=new Uint8Array(c);return r(new DataView(f),c)}}return r(new Ly[o](c),l)};return a},Iy=e=>lj(new Map,e)(0),Ds="",{toString:oj}={},{keys:cj}=Object,eo=e=>{const t=typeof e;if(t!=="object"||!e)return[Wu,t];const r=oj.call(e).slice(8,-1);switch(r){case"Array":return[ho,Ds];case"Object":return[ju,Ds];case"Date":return[cp,Ds];case"RegExp":return[up,Ds];case"Map":return[dp,Ds];case"Set":return[fp,Ds];case"DataView":return[ho,r]}return r.includes("Array")?[ho,r]:r.includes("Error")?[Qk,r]:[ju,r]},au=([e,t])=>e===Wu&&(t==="function"||t==="symbol"),uj=(e,t,r,a)=>{const l=(c,f)=>{const h=a.push(c)-1;return r.set(f,h),h},o=c=>{if(r.has(c))return r.get(c);let[f,h]=eo(c);switch(f){case Wu:{let g=c;switch(h){case"bigint":f=Xk,g=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+h);g=null;break;case"undefined":return l([Yk],c)}return l([f,g],c)}case ho:{if(h){let y=c;return h==="DataView"?y=new Uint8Array(c.buffer):h==="ArrayBuffer"&&(y=new Uint8Array(c)),l([h,[...y]],c)}const g=[],x=l([f,g],c);for(const y of c)g.push(o(y));return x}case ju:{if(h)switch(h){case"BigInt":return l([h,c.toString()],c);case"Boolean":case"Number":case"String":return l([h,c.valueOf()],c)}if(t&&"toJSON"in c)return o(c.toJSON());const g=[],x=l([f,g],c);for(const y of cj(c))(e||!au(eo(c[y])))&&g.push([o(y),o(c[y])]);return x}case cp:return l([f,c.toISOString()],c);case up:{const{source:g,flags:x}=c;return l([f,{source:g,flags:x}],c)}case dp:{const g=[],x=l([f,g],c);for(const[y,v]of c)(e||!(au(eo(y))||au(eo(v))))&&g.push([o(y),o(v)]);return x}case fp:{const g=[],x=l([f,g],c);for(const y of c)(e||!au(eo(y)))&&g.push(o(y));return x}}const{message:m}=c;return l([f,{name:h,message:m}],c)};return o},By=(e,{json:t,lossy:r}={})=>{const a=[];return uj(!(t||r),!!t,new Map,a)(e),a},Du=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Iy(By(e,t)):structuredClone(e):(e,t)=>Iy(By(e,t));function dj(e,t){const r=[{type:"text",value:"↩"}];return t>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),r}function fj(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function hj(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=e.options.footnoteBackContent||dj,a=e.options.footnoteBackLabel||fj,l=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",c=e.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let h=-1;for(;++h<e.footnoteOrder.length;){const m=e.footnoteById.get(e.footnoteOrder[h]);if(!m)continue;const g=e.all(m),x=String(m.identifier).toUpperCase(),y=Js(x.toLowerCase());let v=0;const k=[],E=e.footnoteCounts.get(x);for(;E!==void 0&&++v<=E;){k.length>0&&k.push({type:"text",value:" "});let O=typeof r=="string"?r:r(h,v);typeof O=="string"&&(O={type:"text",value:O}),k.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+y+(v>1?"-"+v:""),dataFootnoteBackref:"",ariaLabel:typeof a=="string"?a:a(h,v),className:["data-footnote-backref"]},children:Array.isArray(O)?O:[O]})}const S=g[g.length-1];if(S&&S.type==="element"&&S.tagName==="p"){const O=S.children[S.children.length-1];O&&O.type==="text"?O.value+=" ":S.children.push({type:"text",value:" "}),S.children.push(...k)}else g.push(...k);const N={type:"element",tagName:"li",properties:{id:t+"fn-"+y},children:e.wrap(g,!0)};e.patch(m,N),f.push(N)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...Du(c),id:"footnote-label"},children:[{type:"text",value:l}]},{type:"text",value:`
536
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(f,!0)},{type:"text",value:`
537
+ `}]}}const Io=(function(e){if(e==null)return bj;if(typeof e=="function")return Ju(e);if(typeof e=="object")return Array.isArray(e)?mj(e):pj(e);if(typeof e=="string")return gj(e);throw new Error("Expected function, string, or object as test")});function mj(e){const t=[];let r=-1;for(;++r<e.length;)t[r]=Io(e[r]);return Ju(a);function a(...l){let o=-1;for(;++o<t.length;)if(t[o].apply(this,l))return!0;return!1}}function pj(e){const t=e;return Ju(r);function r(a){const l=a;let o;for(o in e)if(l[o]!==t[o])return!1;return!0}}function gj(e){return Ju(t);function t(r){return r&&r.type===e}}function Ju(e){return t;function t(r,a,l){return!!(xj(r)&&e.call(this,r,typeof a=="number"?a:void 0,l||void 0))}}function bj(){return!0}function xj(e){return e!==null&&typeof e=="object"&&"type"in e}const Zk=[],yj=!0,bm=!1,vj="skip";function Wk(e,t,r,a){let l;typeof t=="function"&&typeof r!="function"?(a=r,r=t):l=t;const o=Io(l),c=a?-1:1;f(e,void 0,[])();function f(h,m,g){const x=h&&typeof h=="object"?h:{};if(typeof x.type=="string"){const v=typeof x.tagName=="string"?x.tagName:typeof x.name=="string"?x.name:void 0;Object.defineProperty(y,"name",{value:"node ("+(h.type+(v?"<"+v+">":""))+")"})}return y;function y(){let v=Zk,k,E,S;if((!t||o(h,m,g[g.length-1]||void 0))&&(v=kj(r(h,g)),v[0]===bm))return v;if("children"in h&&h.children){const N=h;if(N.children&&v[0]!==vj)for(E=(a?N.children.length:-1)+c,S=g.concat(N);E>-1&&E<N.children.length;){const O=N.children[E];if(k=f(O,E,S)(),k[0]===bm)return k;E=typeof k[1]=="number"?k[1]:E+c}}return v}}}function kj(e){return Array.isArray(e)?e:typeof e=="number"?[yj,e]:e==null?Zk:[e]}function ed(e,t,r,a){let l,o,c;typeof t=="function"&&typeof r!="function"?(o=void 0,c=t,l=r):(o=t,c=r,l=a),Wk(e,o,f,l);function f(h,m){const g=m[m.length-1],x=g?g.children.indexOf(h):void 0;return c(h,x,g)}}const xm={}.hasOwnProperty,wj={};function _j(e,t){const r=t||wj,a=new Map,l=new Map,o=new Map,c={...sj,...r.handlers},f={all:m,applyData:Nj,definitionById:a,footnoteById:l,footnoteCounts:o,footnoteOrder:[],handlers:c,one:h,options:r,patch:Ej,wrap:zj};return ed(e,function(g){if(g.type==="definition"||g.type==="footnoteDefinition"){const x=g.type==="definition"?a:l,y=String(g.identifier).toUpperCase();x.has(y)||x.set(y,g)}}),f;function h(g,x){const y=g.type,v=f.handlers[y];if(xm.call(f.handlers,y)&&v)return v(f,g,x);if(f.options.passThrough&&f.options.passThrough.includes(y)){if("children"in g){const{children:E,...S}=g,N=Du(S);return N.children=f.all(g),N}return Du(g)}return(f.options.unknownHandler||Sj)(f,g,x)}function m(g){const x=[];if("children"in g){const y=g.children;let v=-1;for(;++v<y.length;){const k=f.one(y[v],g);if(k){if(v&&y[v-1].type==="break"&&(!Array.isArray(k)&&k.type==="text"&&(k.value=Uy(k.value)),!Array.isArray(k)&&k.type==="element")){const E=k.children[0];E&&E.type==="text"&&(E.value=Uy(E.value))}Array.isArray(k)?x.push(...k):x.push(k)}}}return x}}function Ej(e,t){e.position&&(t.position=fO(e))}function Nj(e,t){let r=t;if(e&&e.data){const a=e.data.hName,l=e.data.hChildren,o=e.data.hProperties;if(typeof a=="string")if(r.type==="element")r.tagName=a;else{const c="children"in r?r.children:[r];r={type:"element",tagName:a,properties:{},children:c}}r.type==="element"&&o&&Object.assign(r.properties,Du(o)),"children"in r&&r.children&&l!==null&&l!==void 0&&(r.children=l)}return r}function Sj(e,t){const r=t.data||{},a="value"in t&&!(xm.call(r,"hProperties")||xm.call(r,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function zj(e,t){const r=[];let a=-1;for(t&&r.push({type:"text",value:`
538
+ `});++a<e.length;)a&&r.push({type:"text",value:`
539
+ `}),r.push(e[a]);return t&&e.length>0&&r.push({type:"text",value:`
540
+ `}),r}function Uy(e){let t=0,r=e.charCodeAt(t);for(;r===9||r===32;)t++,r=e.charCodeAt(t);return e.slice(t)}function Fy(e,t){const r=_j(e,t),a=r.one(e,void 0),l=hj(r),o=Array.isArray(a)?{type:"root",children:a}:a||{type:"root",children:[]};return l&&o.children.push({type:"text",value:`
541
+ `},l),o}function Cj(e,t){return e&&"run"in e?async function(r,a){const l=Fy(r,{file:a,...t});await e.run(l,a)}:function(r,a){return Fy(r,{file:a,...e||t})}}function Py(e){if(e)throw e}var Th,Hy;function Tj(){if(Hy)return Th;Hy=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,r=Object.defineProperty,a=Object.getOwnPropertyDescriptor,l=function(m){return typeof Array.isArray=="function"?Array.isArray(m):t.call(m)==="[object Array]"},o=function(m){if(!m||t.call(m)!=="[object Object]")return!1;var g=e.call(m,"constructor"),x=m.constructor&&m.constructor.prototype&&e.call(m.constructor.prototype,"isPrototypeOf");if(m.constructor&&!g&&!x)return!1;var y;for(y in m);return typeof y>"u"||e.call(m,y)},c=function(m,g){r&&g.name==="__proto__"?r(m,g.name,{enumerable:!0,configurable:!0,value:g.newValue,writable:!0}):m[g.name]=g.newValue},f=function(m,g){if(g==="__proto__")if(e.call(m,g)){if(a)return a(m,g).value}else return;return m[g]};return Th=function h(){var m,g,x,y,v,k,E=arguments[0],S=1,N=arguments.length,O=!1;for(typeof E=="boolean"&&(O=E,E=arguments[1]||{},S=2),(E==null||typeof E!="object"&&typeof E!="function")&&(E={});S<N;++S)if(m=arguments[S],m!=null)for(g in m)x=f(E,g),y=f(m,g),E!==y&&(O&&y&&(o(y)||(v=l(y)))?(v?(v=!1,k=x&&l(x)?x:[]):k=x&&o(x)?x:{},c(E,{name:g,newValue:h(O,k,y)})):typeof y<"u"&&c(E,{name:g,newValue:y}));return E},Th}var Rj=Tj();const Rh=Uu(Rj);function ym(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 Aj(){const e=[],t={run:r,use:a};return t;function r(...l){let o=-1;const c=l.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);f(null,...l);function f(h,...m){const g=e[++o];let x=-1;if(h){c(h);return}for(;++x<l.length;)(m[x]===null||m[x]===void 0)&&(m[x]=l[x]);l=m,g?Oj(g,f)(...m):c(null,...m)}}function a(l){if(typeof l!="function")throw new TypeError("Expected `middelware` to be a function, not "+l);return e.push(l),t}}function Oj(e,t){let r;return a;function a(...c){const f=e.length>c.length;let h;f&&c.push(l);try{h=e.apply(this,c)}catch(m){const g=m;if(f&&r)throw g;return l(g)}f||(h&&h.then&&typeof h.then=="function"?h.then(o,l):h instanceof Error?l(h):o(h))}function l(c,...f){r||(r=!0,t(c,...f))}function o(c){l(null,c)}}const ei={basename:Mj,dirname:jj,extname:Dj,join:Lj,sep:"/"};function Mj(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Bo(e);let r=0,a=-1,l=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;l--;)if(e.codePointAt(l)===47){if(o){r=l+1;break}}else a<0&&(o=!0,a=l+1);return a<0?"":e.slice(r,a)}if(t===e)return"";let c=-1,f=t.length-1;for(;l--;)if(e.codePointAt(l)===47){if(o){r=l+1;break}}else c<0&&(o=!0,c=l+1),f>-1&&(e.codePointAt(l)===t.codePointAt(f--)?f<0&&(a=l):(f=-1,a=c));return r===a?a=c:a<0&&(a=e.length),e.slice(r,a)}function jj(e){if(Bo(e),e.length===0)return".";let t=-1,r=e.length,a;for(;--r;)if(e.codePointAt(r)===47){if(a){t=r;break}}else a||(a=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function Dj(e){Bo(e);let t=e.length,r=-1,a=0,l=-1,o=0,c;for(;t--;){const f=e.codePointAt(t);if(f===47){if(c){a=t+1;break}continue}r<0&&(c=!0,r=t+1),f===46?l<0?l=t:o!==1&&(o=1):l>-1&&(o=-1)}return l<0||r<0||o===0||o===1&&l===r-1&&l===a+1?"":e.slice(l,r)}function Lj(...e){let t=-1,r;for(;++t<e.length;)Bo(e[t]),e[t]&&(r=r===void 0?e[t]:r+"/"+e[t]);return r===void 0?".":Ij(r)}function Ij(e){Bo(e);const t=e.codePointAt(0)===47;let r=Bj(e,!t);return r.length===0&&!t&&(r="."),r.length>0&&e.codePointAt(e.length-1)===47&&(r+="/"),t?"/"+r:r}function Bj(e,t){let r="",a=0,l=-1,o=0,c=-1,f,h;for(;++c<=e.length;){if(c<e.length)f=e.codePointAt(c);else{if(f===47)break;f=47}if(f===47){if(!(l===c-1||o===1))if(l!==c-1&&o===2){if(r.length<2||a!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(h=r.lastIndexOf("/"),h!==r.length-1){h<0?(r="",a=0):(r=r.slice(0,h),a=r.length-1-r.lastIndexOf("/")),l=c,o=0;continue}}else if(r.length>0){r="",a=0,l=c,o=0;continue}}t&&(r=r.length>0?r+"/..":"..",a=2)}else r.length>0?r+="/"+e.slice(l+1,c):r=e.slice(l+1,c),a=c-l-1;l=c,o=0}else f===46&&o>-1?o++:o=-1}return r}function Bo(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Uj={cwd:Fj};function Fj(){return"/"}function vm(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Pj(e){if(typeof e=="string")e=new URL(e);else if(!vm(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 Hj(e)}function Hj(e){if(e.hostname!==""){const a=new TypeError('File URL host must be "localhost" or empty on darwin');throw a.code="ERR_INVALID_FILE_URL_HOST",a}const t=e.pathname;let r=-1;for(;++r<t.length;)if(t.codePointAt(r)===37&&t.codePointAt(r+1)===50){const a=t.codePointAt(r+2);if(a===70||a===102){const l=new TypeError("File URL path must not include encoded / characters");throw l.code="ERR_INVALID_FILE_URL_PATH",l}}return decodeURIComponent(t)}const Ah=["history","path","basename","stem","extname","dirname"];class Jk{constructor(t){let r;t?vm(t)?r={path:t}:typeof t=="string"||qj(t)?r={value:t}:r=t:r={},this.cwd="cwd"in r?"":Uj.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let a=-1;for(;++a<Ah.length;){const o=Ah[a];o in r&&r[o]!==void 0&&r[o]!==null&&(this[o]=o==="history"?[...r[o]]:r[o])}let l;for(l in r)Ah.includes(l)||(this[l]=r[l])}get basename(){return typeof this.path=="string"?ei.basename(this.path):void 0}set basename(t){Mh(t,"basename"),Oh(t,"basename"),this.path=ei.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?ei.dirname(this.path):void 0}set dirname(t){qy(this.basename,"dirname"),this.path=ei.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?ei.extname(this.path):void 0}set extname(t){if(Oh(t,"extname"),qy(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=ei.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){vm(t)&&(t=Pj(t)),Mh(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?ei.basename(this.path,this.extname):void 0}set stem(t){Mh(t,"stem"),Oh(t,"stem"),this.path=ei.join(this.dirname||"",t+(this.extname||""))}fail(t,r,a){const l=this.message(t,r,a);throw l.fatal=!0,l}info(t,r,a){const l=this.message(t,r,a);return l.fatal=void 0,l}message(t,r,a){const l=new qn(t,r,a);return this.path&&(l.name=this.path+":"+l.name,l.file=this.path),l.fatal=!1,this.messages.push(l),l}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Oh(e,t){if(e&&e.includes(ei.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+ei.sep+"`")}function Mh(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function qy(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function qj(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const $j=(function(e){const a=this.constructor.prototype,l=a[e],o=function(){return l.apply(o,arguments)};return Object.setPrototypeOf(o,a),o}),Gj={}.hasOwnProperty;class hp extends $j{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=Aj()}copy(){const t=new hp;let r=-1;for(;++r<this.attachers.length;){const a=this.attachers[r];t.use(...a)}return t.data(Rh(!0,{},this.namespace)),t}data(t,r){return typeof t=="string"?arguments.length===2?(Lh("data",this.frozen),this.namespace[t]=r,this):Gj.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Lh("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[r,...a]=this.attachers[this.freezeIndex];if(a[0]===!1)continue;a[0]===!0&&(a[0]=void 0);const l=r.call(t,...a);typeof l=="function"&&this.transformers.use(l)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const r=su(t),a=this.parser||this.Parser;return jh("parse",a),a(String(r),r)}process(t,r){const a=this;return this.freeze(),jh("process",this.parser||this.Parser),Dh("process",this.compiler||this.Compiler),r?l(void 0,r):new Promise(l);function l(o,c){const f=su(t),h=a.parse(f);a.run(h,f,function(g,x,y){if(g||!x||!y)return m(g);const v=x,k=a.stringify(v,y);Yj(k)?y.value=k:y.result=k,m(g,y)});function m(g,x){g||!x?c(g):o?o(x):r(void 0,x)}}}processSync(t){let r=!1,a;return this.freeze(),jh("processSync",this.parser||this.Parser),Dh("processSync",this.compiler||this.Compiler),this.process(t,l),Gy("processSync","process",r),a;function l(o,c){r=!0,Py(o),a=c}}run(t,r,a){$y(t),this.freeze();const l=this.transformers;return!a&&typeof r=="function"&&(a=r,r=void 0),a?o(void 0,a):new Promise(o);function o(c,f){const h=su(r);l.run(t,h,m);function m(g,x,y){const v=x||t;g?f(g):c?c(v):a(void 0,v,y)}}}runSync(t,r){let a=!1,l;return this.run(t,r,o),Gy("runSync","run",a),l;function o(c,f){Py(c),l=f,a=!0}}stringify(t,r){this.freeze();const a=su(r),l=this.compiler||this.Compiler;return Dh("stringify",l),$y(t),l(t,a)}use(t,...r){const a=this.attachers,l=this.namespace;if(Lh("use",this.frozen),t!=null)if(typeof t=="function")h(t,r);else if(typeof t=="object")Array.isArray(t)?f(t):c(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(m){if(typeof m=="function")h(m,[]);else if(typeof m=="object")if(Array.isArray(m)){const[g,...x]=m;h(g,x)}else c(m);else throw new TypeError("Expected usable value, not `"+m+"`")}function c(m){if(!("plugins"in m)&&!("settings"in m))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");f(m.plugins),m.settings&&(l.settings=Rh(!0,l.settings,m.settings))}function f(m){let g=-1;if(m!=null)if(Array.isArray(m))for(;++g<m.length;){const x=m[g];o(x)}else throw new TypeError("Expected a list of plugins, not `"+m+"`")}function h(m,g){let x=-1,y=-1;for(;++x<a.length;)if(a[x][0]===m){y=x;break}if(y===-1)a.push([m,...g]);else if(g.length>0){let[v,...k]=g;const E=a[y][1];ym(E)&&ym(v)&&(v=Rh(!0,E,v)),a[y]=[m,v,...k]}}}}const Kj=new hp().freeze();function jh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Dh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Lh(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 $y(e){if(!ym(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Gy(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function su(e){return Vj(e)?e:new Jk(e)}function Vj(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Yj(e){return typeof e=="string"||Qj(e)}function Qj(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Xj="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Ky=[],Vy={allowDangerousHtml:!0},Zj=/^(https?|ircs?|mailto|xmpp)$/i,Wj=[{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:"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 Jj(e){const t=e3(e),r=t3(e);return n3(t.runSync(t.parse(r),r),e)}function e3(e){const t=e.rehypePlugins||Ky,r=e.remarkPlugins||Ky,a=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Vy}:Vy;return Kj().use(j4).use(r).use(Cj,a).use(t)}function t3(e){const t=e.children||"",r=new Jk;return typeof t=="string"&&(r.value=t),r}function n3(e,t){const r=t.allowedElements,a=t.allowElement,l=t.components,o=t.disallowedElements,c=t.skipHtml,f=t.unwrapDisallowed,h=t.urlTransform||r3;for(const g of Wj)Object.hasOwn(t,g.from)&&(""+g.from+(g.to?"use `"+g.to+"` instead":"remove it")+Xj+g.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),ed(e,m),bO(e,{Fragment:d.Fragment,components:l,ignoreInvalidStyle:!0,jsx:d.jsx,jsxs:d.jsxs,passKeys:!0,passNode:!0});function m(g,x,y){if(g.type==="raw"&&y&&typeof x=="number")return c?y.children.splice(x,1):y.children[x]={type:"text",value:g.value},x;if(g.type==="element"){let v;for(v in Sh)if(Object.hasOwn(Sh,v)&&Object.hasOwn(g.properties,v)){const k=g.properties[v],E=Sh[v];(E===null||E.includes(g.tagName))&&(g.properties[v]=h(String(k||""),v,g))}}if(g.type==="element"){let v=r?!r.includes(g.tagName):o?o.includes(g.tagName):!1;if(!v&&a&&typeof x=="number"&&(v=!a(g,x,y)),v&&y&&typeof x=="number")return f&&g.children?y.children.splice(x,1,...g.children):y.children.splice(x,1),x}}}function r3(e){const t=e.indexOf(":"),r=e.indexOf("?"),a=e.indexOf("#"),l=e.indexOf("/");return t===-1||l!==-1&&t>l||r!==-1&&t>r||a!==-1&&t>a||Zj.test(e.slice(0,t))?e:""}function Yy(e,t){const r=String(e);if(typeof t!="string")throw new TypeError("Expected character");let a=0,l=r.indexOf(t);for(;l!==-1;)a++,l=r.indexOf(t,l+t.length);return a}function i3(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function a3(e,t,r){const l=Io((r||{}).ignore||[]),o=s3(t);let c=-1;for(;++c<o.length;)Wk(e,"text",f);function f(m,g){let x=-1,y;for(;++x<g.length;){const v=g[x],k=y?y.children:void 0;if(l(v,k?k.indexOf(v):void 0,y))return;y=v}if(y)return h(m,g)}function h(m,g){const x=g[g.length-1],y=o[c][0],v=o[c][1];let k=0;const S=x.children.indexOf(m);let N=!1,O=[];y.lastIndex=0;let T=y.exec(m.value);for(;T;){const P=T.index,$={index:T.index,input:T.input,stack:[...g,m]};let j=v(...T,$);if(typeof j=="string"&&(j=j.length>0?{type:"text",value:j}:void 0),j===!1?y.lastIndex=P+1:(k!==P&&O.push({type:"text",value:m.value.slice(k,P)}),Array.isArray(j)?O.push(...j):j&&O.push(j),k=P+T[0].length,N=!0),!y.global)break;T=y.exec(m.value)}return N?(k<m.value.length&&O.push({type:"text",value:m.value.slice(k)}),x.children.splice(S,1,...O)):O=[m],S+O.length}}function s3(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const r=!e[0]||Array.isArray(e[0])?e:[e];let a=-1;for(;++a<r.length;){const l=r[a];t.push([l3(l[0]),o3(l[1])])}return t}function l3(e){return typeof e=="string"?new RegExp(i3(e),"g"):e}function o3(e){return typeof e=="function"?e:function(){return e}}const Ih="phrasing",Bh=["autolink","link","image","label"];function c3(){return{transforms:[g3],enter:{literalAutolink:d3,literalAutolinkEmail:Uh,literalAutolinkHttp:Uh,literalAutolinkWww:Uh},exit:{literalAutolink:p3,literalAutolinkEmail:m3,literalAutolinkHttp:f3,literalAutolinkWww:h3}}}function u3(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Ih,notInConstruct:Bh},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Ih,notInConstruct:Bh},{character:":",before:"[ps]",after:"\\/",inConstruct:Ih,notInConstruct:Bh}]}}function d3(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Uh(e){this.config.enter.autolinkProtocol.call(this,e)}function f3(e){this.config.exit.autolinkProtocol.call(this,e)}function h3(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 m3(e){this.config.exit.autolinkEmail.call(this,e)}function p3(e){this.exit(e)}function g3(e){a3(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,b3],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,x3]],{ignore:["link","linkReference"]})}function b3(e,t,r,a,l){let o="";if(!ew(l)||(/^w/i.test(t)&&(r=t+r,t="",o="http://"),!y3(r)))return!1;const c=v3(r+a);if(!c[0])return!1;const f={type:"link",title:null,url:o+t+c[0],children:[{type:"text",value:t+c[0]}]};return c[1]?[f,{type:"text",value:c[1]}]:f}function x3(e,t,r,a){return!ew(a,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+r,children:[{type:"text",value:t+"@"+r}]}}function y3(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 v3(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let r=t[0],a=r.indexOf(")");const l=Yy(e,"(");let o=Yy(e,")");for(;a!==-1&&l>o;)e+=r.slice(0,a+1),r=r.slice(a+1),a=r.indexOf(")"),o++;return[e,r]}function ew(e,t){const r=e.input.charCodeAt(e.index-1);return(e.index===0||Ya(r)||Xu(r))&&(!t||r!==47)}tw.peek=T3;function k3(){this.buffer()}function w3(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function _3(){this.buffer()}function E3(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function N3(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=$r(this.sliceSerialize(e)).toLowerCase(),r.label=t}function S3(e){this.exit(e)}function z3(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=$r(this.sliceSerialize(e)).toLowerCase(),r.label=t}function C3(e){this.exit(e)}function T3(){return"["}function tw(e,t,r,a){const l=r.createTracker(a);let o=l.move("[^");const c=r.enter("footnoteReference"),f=r.enter("reference");return o+=l.move(r.safe(r.associationId(e),{after:"]",before:o})),f(),c(),o+=l.move("]"),o}function R3(){return{enter:{gfmFootnoteCallString:k3,gfmFootnoteCall:w3,gfmFootnoteDefinitionLabelString:_3,gfmFootnoteDefinition:E3},exit:{gfmFootnoteCallString:N3,gfmFootnoteCall:S3,gfmFootnoteDefinitionLabelString:z3,gfmFootnoteDefinition:C3}}}function A3(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:r,footnoteReference:tw},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(a,l,o,c){const f=o.createTracker(c);let h=f.move("[^");const m=o.enter("footnoteDefinition"),g=o.enter("label");return h+=f.move(o.safe(o.associationId(a),{before:h,after:"]"})),g(),h+=f.move("]:"),a.children&&a.children.length>0&&(f.shift(4),h+=f.move((t?`
542
+ `:" ")+o.indentLines(o.containerFlow(a,f.current()),t?nw:O3))),m(),h}}function O3(e,t,r){return t===0?e:nw(e,t,r)}function nw(e,t,r){return(r?"":" ")+e}const M3=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];rw.peek=B3;function j3(){return{canContainEols:["delete"],enter:{strikethrough:L3},exit:{strikethrough:I3}}}function D3(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:M3}],handlers:{delete:rw}}}function L3(e){this.enter({type:"delete",children:[]},e)}function I3(e){this.exit(e)}function rw(e,t,r,a){const l=r.createTracker(a),o=r.enter("strikethrough");let c=l.move("~~");return c+=r.containerPhrasing(e,{...l.current(),before:c,after:"~"}),c+=l.move("~~"),o(),c}function B3(){return"~"}function U3(e){return e.length}function F3(e,t){const r=t||{},a=(r.align||[]).concat(),l=r.stringLength||U3,o=[],c=[],f=[],h=[];let m=0,g=-1;for(;++g<e.length;){const E=[],S=[];let N=-1;for(e[g].length>m&&(m=e[g].length);++N<e[g].length;){const O=P3(e[g][N]);if(r.alignDelimiters!==!1){const T=l(O);S[N]=T,(h[N]===void 0||T>h[N])&&(h[N]=T)}E.push(O)}c[g]=E,f[g]=S}let x=-1;if(typeof a=="object"&&"length"in a)for(;++x<m;)o[x]=Qy(a[x]);else{const E=Qy(a);for(;++x<m;)o[x]=E}x=-1;const y=[],v=[];for(;++x<m;){const E=o[x];let S="",N="";E===99?(S=":",N=":"):E===108?S=":":E===114&&(N=":");let O=r.alignDelimiters===!1?1:Math.max(1,h[x]-S.length-N.length);const T=S+"-".repeat(O)+N;r.alignDelimiters!==!1&&(O=S.length+O+N.length,O>h[x]&&(h[x]=O),v[x]=O),y[x]=T}c.splice(1,0,y),f.splice(1,0,v),g=-1;const k=[];for(;++g<c.length;){const E=c[g],S=f[g];x=-1;const N=[];for(;++x<m;){const O=E[x]||"";let T="",P="";if(r.alignDelimiters!==!1){const $=h[x]-(S[x]||0),j=o[x];j===114?T=" ".repeat($):j===99?$%2?(T=" ".repeat($/2+.5),P=" ".repeat($/2-.5)):(T=" ".repeat($/2),P=T):P=" ".repeat($)}r.delimiterStart!==!1&&!x&&N.push("|"),r.padding!==!1&&!(r.alignDelimiters===!1&&O==="")&&(r.delimiterStart!==!1||x)&&N.push(" "),r.alignDelimiters!==!1&&N.push(T),N.push(O),r.alignDelimiters!==!1&&N.push(P),r.padding!==!1&&N.push(" "),(r.delimiterEnd!==!1||x!==m-1)&&N.push("|")}k.push(r.delimiterEnd===!1?N.join("").replace(/ +$/,""):N.join(""))}return k.join(`
543
+ `)}function P3(e){return e==null?"":String(e)}function Qy(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 H3(e,t,r,a){const l=r.enter("blockquote"),o=r.createTracker(a);o.move("> "),o.shift(2);const c=r.indentLines(r.containerFlow(e,o.current()),q3);return l(),c}function q3(e,t,r){return">"+(r?"":" ")+e}function $3(e,t){return Xy(e,t.inConstruct,!0)&&!Xy(e,t.notInConstruct,!1)}function Xy(e,t,r){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return r;let a=-1;for(;++a<t.length;)if(e.includes(t[a]))return!0;return!1}function Zy(e,t,r,a){let l=-1;for(;++l<r.unsafe.length;)if(r.unsafe[l].character===`
544
+ `&&$3(r.stack,r.unsafe[l]))return/[ \t]/.test(a.before)?"":" ";return`\\
545
+ `}function G3(e,t){const r=String(e);let a=r.indexOf(t),l=a,o=0,c=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;a!==-1;)a===l?++o>c&&(c=o):o=1,l=a+t.length,a=r.indexOf(t,l);return c}function K3(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 V3(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 Y3(e,t,r,a){const l=V3(r),o=e.value||"",c=l==="`"?"GraveAccent":"Tilde";if(K3(e,r)){const x=r.enter("codeIndented"),y=r.indentLines(o,Q3);return x(),y}const f=r.createTracker(a),h=l.repeat(Math.max(G3(o,l)+1,3)),m=r.enter("codeFenced");let g=f.move(h);if(e.lang){const x=r.enter(`codeFencedLang${c}`);g+=f.move(r.safe(e.lang,{before:g,after:" ",encode:["`"],...f.current()})),x()}if(e.lang&&e.meta){const x=r.enter(`codeFencedMeta${c}`);g+=f.move(" "),g+=f.move(r.safe(e.meta,{before:g,after:`
546
+ `,encode:["`"],...f.current()})),x()}return g+=f.move(`
547
+ `),o&&(g+=f.move(o+`
548
+ `)),g+=f.move(h),m(),g}function Q3(e,t,r){return(r?"":" ")+e}function mp(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 X3(e,t,r,a){const l=mp(r),o=l==='"'?"Quote":"Apostrophe",c=r.enter("definition");let f=r.enter("label");const h=r.createTracker(a);let m=h.move("[");return m+=h.move(r.safe(r.associationId(e),{before:m,after:"]",...h.current()})),m+=h.move("]: "),f(),!e.url||/[\0- \u007F]/.test(e.url)?(f=r.enter("destinationLiteral"),m+=h.move("<"),m+=h.move(r.safe(e.url,{before:m,after:">",...h.current()})),m+=h.move(">")):(f=r.enter("destinationRaw"),m+=h.move(r.safe(e.url,{before:m,after:e.title?" ":`
549
+ `,...h.current()}))),f(),e.title&&(f=r.enter(`title${o}`),m+=h.move(" "+l),m+=h.move(r.safe(e.title,{before:m,after:l,...h.current()})),m+=h.move(l),f()),c(),m}function Z3(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 _o(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Lu(e,t,r){const a=Gs(e),l=Gs(t);return a===void 0?l===void 0?r==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:l===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:a===1?l===void 0?{inside:!1,outside:!1}:l===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:l===void 0?{inside:!1,outside:!1}:l===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}iw.peek=W3;function iw(e,t,r,a){const l=Z3(r),o=r.enter("emphasis"),c=r.createTracker(a),f=c.move(l);let h=c.move(r.containerPhrasing(e,{after:l,before:f,...c.current()}));const m=h.charCodeAt(0),g=Lu(a.before.charCodeAt(a.before.length-1),m,l);g.inside&&(h=_o(m)+h.slice(1));const x=h.charCodeAt(h.length-1),y=Lu(a.after.charCodeAt(0),x,l);y.inside&&(h=h.slice(0,-1)+_o(x));const v=c.move(l);return o(),r.attentionEncodeSurroundingInfo={after:y.outside,before:g.outside},f+h+v}function W3(e,t,r){return r.options.emphasis||"*"}function J3(e,t){let r=!1;return ed(e,function(a){if("value"in a&&/\r?\n|\r/.test(a.value)||a.type==="break")return r=!0,bm}),!!((!e.depth||e.depth<3)&&sp(e)&&(t.options.setext||r))}function eD(e,t,r,a){const l=Math.max(Math.min(6,e.depth||1),1),o=r.createTracker(a);if(J3(e,r)){const g=r.enter("headingSetext"),x=r.enter("phrasing"),y=r.containerPhrasing(e,{...o.current(),before:`
550
+ `,after:`
551
+ `});return x(),g(),y+`
552
+ `+(l===1?"=":"-").repeat(y.length-(Math.max(y.lastIndexOf("\r"),y.lastIndexOf(`
553
+ `))+1))}const c="#".repeat(l),f=r.enter("headingAtx"),h=r.enter("phrasing");o.move(c+" ");let m=r.containerPhrasing(e,{before:"# ",after:`
554
+ `,...o.current()});return/^[\t ]/.test(m)&&(m=_o(m.charCodeAt(0))+m.slice(1)),m=m?c+" "+m:c,r.options.closeAtx&&(m+=" "+c),h(),f(),m}aw.peek=tD;function aw(e){return e.value||""}function tD(){return"<"}sw.peek=nD;function sw(e,t,r,a){const l=mp(r),o=l==='"'?"Quote":"Apostrophe",c=r.enter("image");let f=r.enter("label");const h=r.createTracker(a);let m=h.move("![");return m+=h.move(r.safe(e.alt,{before:m,after:"]",...h.current()})),m+=h.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=r.enter("destinationLiteral"),m+=h.move("<"),m+=h.move(r.safe(e.url,{before:m,after:">",...h.current()})),m+=h.move(">")):(f=r.enter("destinationRaw"),m+=h.move(r.safe(e.url,{before:m,after:e.title?" ":")",...h.current()}))),f(),e.title&&(f=r.enter(`title${o}`),m+=h.move(" "+l),m+=h.move(r.safe(e.title,{before:m,after:l,...h.current()})),m+=h.move(l),f()),m+=h.move(")"),c(),m}function nD(){return"!"}lw.peek=rD;function lw(e,t,r,a){const l=e.referenceType,o=r.enter("imageReference");let c=r.enter("label");const f=r.createTracker(a);let h=f.move("![");const m=r.safe(e.alt,{before:h,after:"]",...f.current()});h+=f.move(m+"]["),c();const g=r.stack;r.stack=[],c=r.enter("reference");const x=r.safe(r.associationId(e),{before:h,after:"]",...f.current()});return c(),r.stack=g,o(),l==="full"||!m||m!==x?h+=f.move(x+"]"):l==="shortcut"?h=h.slice(0,-1):h+=f.move("]"),h}function rD(){return"!"}ow.peek=iD;function ow(e,t,r){let a=e.value||"",l="`",o=-1;for(;new RegExp("(^|[^`])"+l+"([^`]|$)").test(a);)l+="`";for(/[^ \r\n]/.test(a)&&(/^[ \r\n]/.test(a)&&/[ \r\n]$/.test(a)||/^`|`$/.test(a))&&(a=" "+a+" ");++o<r.unsafe.length;){const c=r.unsafe[o],f=r.compilePattern(c);let h;if(c.atBreak)for(;h=f.exec(a);){let m=h.index;a.charCodeAt(m)===10&&a.charCodeAt(m-1)===13&&m--,a=a.slice(0,m)+" "+a.slice(h.index+1)}}return l+a+l}function iD(){return"`"}function cw(e,t){const r=sp(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(r===e.url||"mailto:"+r===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}uw.peek=aD;function uw(e,t,r,a){const l=mp(r),o=l==='"'?"Quote":"Apostrophe",c=r.createTracker(a);let f,h;if(cw(e,r)){const g=r.stack;r.stack=[],f=r.enter("autolink");let x=c.move("<");return x+=c.move(r.containerPhrasing(e,{before:x,after:">",...c.current()})),x+=c.move(">"),f(),r.stack=g,x}f=r.enter("link"),h=r.enter("label");let m=c.move("[");return m+=c.move(r.containerPhrasing(e,{before:m,after:"](",...c.current()})),m+=c.move("]("),h(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(h=r.enter("destinationLiteral"),m+=c.move("<"),m+=c.move(r.safe(e.url,{before:m,after:">",...c.current()})),m+=c.move(">")):(h=r.enter("destinationRaw"),m+=c.move(r.safe(e.url,{before:m,after:e.title?" ":")",...c.current()}))),h(),e.title&&(h=r.enter(`title${o}`),m+=c.move(" "+l),m+=c.move(r.safe(e.title,{before:m,after:l,...c.current()})),m+=c.move(l),h()),m+=c.move(")"),f(),m}function aD(e,t,r){return cw(e,r)?"<":"["}dw.peek=sD;function dw(e,t,r,a){const l=e.referenceType,o=r.enter("linkReference");let c=r.enter("label");const f=r.createTracker(a);let h=f.move("[");const m=r.containerPhrasing(e,{before:h,after:"]",...f.current()});h+=f.move(m+"]["),c();const g=r.stack;r.stack=[],c=r.enter("reference");const x=r.safe(r.associationId(e),{before:h,after:"]",...f.current()});return c(),r.stack=g,o(),l==="full"||!m||m!==x?h+=f.move(x+"]"):l==="shortcut"?h=h.slice(0,-1):h+=f.move("]"),h}function sD(){return"["}function pp(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 lD(e){const t=pp(e),r=e.options.bulletOther;if(!r)return t==="*"?"-":"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+r+"`) to be different");return r}function oD(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 fw(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 cD(e,t,r,a){const l=r.enter("list"),o=r.bulletCurrent;let c=e.ordered?oD(r):pp(r);const f=e.ordered?c==="."?")":".":lD(r);let h=t&&r.bulletLastUsed?c===r.bulletLastUsed:!1;if(!e.ordered){const g=e.children?e.children[0]:void 0;if((c==="*"||c==="-")&&g&&(!g.children||!g.children[0])&&r.stack[r.stack.length-1]==="list"&&r.stack[r.stack.length-2]==="listItem"&&r.stack[r.stack.length-3]==="list"&&r.stack[r.stack.length-4]==="listItem"&&r.indexStack[r.indexStack.length-1]===0&&r.indexStack[r.indexStack.length-2]===0&&r.indexStack[r.indexStack.length-3]===0&&(h=!0),fw(r)===c&&g){let x=-1;for(;++x<e.children.length;){const y=e.children[x];if(y&&y.type==="listItem"&&y.children&&y.children[0]&&y.children[0].type==="thematicBreak"){h=!0;break}}}}h&&(c=f),r.bulletCurrent=c;const m=r.containerFlow(e,a);return r.bulletLastUsed=c,r.bulletCurrent=o,l(),m}function uD(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 dD(e,t,r,a){const l=uD(r);let o=r.bulletCurrent||pp(r);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(r.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let c=o.length+1;(l==="tab"||l==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(c=Math.ceil(c/4)*4);const f=r.createTracker(a);f.move(o+" ".repeat(c-o.length)),f.shift(c);const h=r.enter("listItem"),m=r.indentLines(r.containerFlow(e,f.current()),g);return h(),m;function g(x,y,v){return y?(v?"":" ".repeat(c))+x:(v?o:o+" ".repeat(c-o.length))+x}}function fD(e,t,r,a){const l=r.enter("paragraph"),o=r.enter("phrasing"),c=r.containerPhrasing(e,a);return o(),l(),c}const hD=Io(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function mD(e,t,r,a){return(e.children.some(function(c){return hD(c)})?r.containerPhrasing:r.containerFlow).call(r,e,a)}function pD(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}hw.peek=gD;function hw(e,t,r,a){const l=pD(r),o=r.enter("strong"),c=r.createTracker(a),f=c.move(l+l);let h=c.move(r.containerPhrasing(e,{after:l,before:f,...c.current()}));const m=h.charCodeAt(0),g=Lu(a.before.charCodeAt(a.before.length-1),m,l);g.inside&&(h=_o(m)+h.slice(1));const x=h.charCodeAt(h.length-1),y=Lu(a.after.charCodeAt(0),x,l);y.inside&&(h=h.slice(0,-1)+_o(x));const v=c.move(l+l);return o(),r.attentionEncodeSurroundingInfo={after:y.outside,before:g.outside},f+h+v}function gD(e,t,r){return r.options.strong||"*"}function bD(e,t,r,a){return r.safe(e.value,a)}function xD(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 yD(e,t,r){const a=(fw(r)+(r.options.ruleSpaces?" ":"")).repeat(xD(r));return r.options.ruleSpaces?a.slice(0,-1):a}const mw={blockquote:H3,break:Zy,code:Y3,definition:X3,emphasis:iw,hardBreak:Zy,heading:eD,html:aw,image:sw,imageReference:lw,inlineCode:ow,link:uw,linkReference:dw,list:cD,listItem:dD,paragraph:fD,root:mD,strong:hw,text:bD,thematicBreak:yD};function vD(){return{enter:{table:kD,tableData:Wy,tableHeader:Wy,tableRow:_D},exit:{codeText:ED,table:wD,tableData:Fh,tableHeader:Fh,tableRow:Fh}}}function kD(e){const t=e._align;this.enter({type:"table",align:t.map(function(r){return r==="none"?null:r}),children:[]},e),this.data.inTable=!0}function wD(e){this.exit(e),this.data.inTable=void 0}function _D(e){this.enter({type:"tableRow",children:[]},e)}function Fh(e){this.exit(e)}function Wy(e){this.enter({type:"tableCell",children:[]},e)}function ED(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,ND));const r=this.stack[this.stack.length-1];r.type,r.value=t,this.exit(e)}function ND(e,t){return t==="|"?t:e}function SD(e){const t=e||{},r=t.tableCellPadding,a=t.tablePipeAlign,l=t.stringLength,o=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
555
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:y,table:c,tableCell:h,tableRow:f}};function c(v,k,E,S){return m(g(v,E,S),v.align)}function f(v,k,E,S){const N=x(v,E,S),O=m([N]);return O.slice(0,O.indexOf(`
556
+ `))}function h(v,k,E,S){const N=E.enter("tableCell"),O=E.enter("phrasing"),T=E.containerPhrasing(v,{...S,before:o,after:o});return O(),N(),T}function m(v,k){return F3(v,{align:k,alignDelimiters:a,padding:r,stringLength:l})}function g(v,k,E){const S=v.children;let N=-1;const O=[],T=k.enter("table");for(;++N<S.length;)O[N]=x(S[N],k,E);return T(),O}function x(v,k,E){const S=v.children;let N=-1;const O=[],T=k.enter("tableRow");for(;++N<S.length;)O[N]=h(S[N],v,k,E);return T(),O}function y(v,k,E){let S=mw.inlineCode(v,k,E);return E.stack.includes("tableCell")&&(S=S.replace(/\|/g,"\\$&")),S}}function zD(){return{exit:{taskListCheckValueChecked:Jy,taskListCheckValueUnchecked:Jy,paragraph:TD}}}function CD(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:RD}}}function Jy(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function TD(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const r=this.stack[this.stack.length-1];r.type;const a=r.children[0];if(a&&a.type==="text"){const l=t.children;let o=-1,c;for(;++o<l.length;){const f=l[o];if(f.type==="paragraph"){c=f;break}}c===r&&(a.value=a.value.slice(1),a.value.length===0?r.children.shift():r.position&&a.position&&typeof a.position.start.offset=="number"&&(a.position.start.column++,a.position.start.offset++,r.position.start=Object.assign({},a.position.start)))}}this.exit(e)}function RD(e,t,r,a){const l=e.children[0],o=typeof e.checked=="boolean"&&l&&l.type==="paragraph",c="["+(e.checked?"x":" ")+"] ",f=r.createTracker(a);o&&f.move(c);let h=mw.listItem(e,t,r,{...a,...f.current()});return o&&(h=h.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,m)),h;function m(g){return g+c}}function AD(){return[c3(),R3(),j3(),vD(),zD()]}function OD(e){return{extensions:[u3(),A3(e),D3(),SD(e),CD()]}}const MD={tokenize:UD,partial:!0},pw={tokenize:FD,partial:!0},gw={tokenize:PD,partial:!0},bw={tokenize:HD,partial:!0},jD={tokenize:qD,partial:!0},xw={name:"wwwAutolink",tokenize:ID,previous:vw},yw={name:"protocolAutolink",tokenize:BD,previous:kw},Di={name:"emailAutolink",tokenize:LD,previous:ww},li={};function DD(){return{text:li}}let Ha=48;for(;Ha<123;)li[Ha]=Di,Ha++,Ha===58?Ha=65:Ha===91&&(Ha=97);li[43]=Di;li[45]=Di;li[46]=Di;li[95]=Di;li[72]=[Di,yw];li[104]=[Di,yw];li[87]=[Di,xw];li[119]=[Di,xw];function LD(e,t,r){const a=this;let l,o;return c;function c(x){return!km(x)||!ww.call(a,a.previous)||gp(a.events)?r(x):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),f(x))}function f(x){return km(x)?(e.consume(x),f):x===64?(e.consume(x),h):r(x)}function h(x){return x===46?e.check(jD,g,m)(x):x===45||x===95||Hn(x)?(o=!0,e.consume(x),h):g(x)}function m(x){return e.consume(x),l=!0,h}function g(x){return o&&l&&Vn(a.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(x)):r(x)}}function ID(e,t,r){const a=this;return l;function l(c){return c!==87&&c!==119||!vw.call(a,a.previous)||gp(a.events)?r(c):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(MD,e.attempt(pw,e.attempt(gw,o),r),r)(c))}function o(c){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(c)}}function BD(e,t,r){const a=this;let l="",o=!1;return c;function c(x){return(x===72||x===104)&&kw.call(a,a.previous)&&!gp(a.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),l+=String.fromCodePoint(x),e.consume(x),f):r(x)}function f(x){if(Vn(x)&&l.length<5)return l+=String.fromCodePoint(x),e.consume(x),f;if(x===58){const y=l.toLowerCase();if(y==="http"||y==="https")return e.consume(x),h}return r(x)}function h(x){return x===47?(e.consume(x),o?m:(o=!0,h)):r(x)}function m(x){return x===null||Mu(x)||Yt(x)||Ya(x)||Xu(x)?r(x):e.attempt(pw,e.attempt(gw,g),r)(x)}function g(x){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(x)}}function UD(e,t,r){let a=0;return l;function l(c){return(c===87||c===119)&&a<3?(a++,e.consume(c),l):c===46&&a===3?(e.consume(c),o):r(c)}function o(c){return c===null?r(c):t(c)}}function FD(e,t,r){let a,l,o;return c;function c(m){return m===46||m===95?e.check(bw,h,f)(m):m===null||Yt(m)||Ya(m)||m!==45&&Xu(m)?h(m):(o=!0,e.consume(m),c)}function f(m){return m===95?a=!0:(l=a,a=void 0),e.consume(m),c}function h(m){return l||a||!o?r(m):t(m)}}function PD(e,t){let r=0,a=0;return l;function l(c){return c===40?(r++,e.consume(c),l):c===41&&a<r?o(c):c===33||c===34||c===38||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===60||c===63||c===93||c===95||c===126?e.check(bw,t,o)(c):c===null||Yt(c)||Ya(c)?t(c):(e.consume(c),l)}function o(c){return c===41&&a++,e.consume(c),l}}function HD(e,t,r){return a;function a(f){return f===33||f===34||f===39||f===41||f===42||f===44||f===46||f===58||f===59||f===63||f===95||f===126?(e.consume(f),a):f===38?(e.consume(f),o):f===93?(e.consume(f),l):f===60||f===null||Yt(f)||Ya(f)?t(f):r(f)}function l(f){return f===null||f===40||f===91||Yt(f)||Ya(f)?t(f):a(f)}function o(f){return Vn(f)?c(f):r(f)}function c(f){return f===59?(e.consume(f),a):Vn(f)?(e.consume(f),c):r(f)}}function qD(e,t,r){return a;function a(o){return e.consume(o),l}function l(o){return Hn(o)?r(o):t(o)}}function vw(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Yt(e)}function kw(e){return!Vn(e)}function ww(e){return!(e===47||km(e))}function km(e){return e===43||e===45||e===46||e===95||Hn(e)}function gp(e){let t=e.length,r=!1;for(;t--;){const a=e[t][1];if((a.type==="labelLink"||a.type==="labelImage")&&!a._balanced){r=!0;break}if(a._gfmAutolinkLiteralWalkedInto){r=!1;break}}return e.length>0&&!r&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}const $D={tokenize:WD,partial:!0};function GD(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:QD,continuation:{tokenize:XD},exit:ZD}},text:{91:{name:"gfmFootnoteCall",tokenize:YD},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:KD,resolveTo:VD}}}}function KD(e,t,r){const a=this;let l=a.events.length;const o=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let c;for(;l--;){const h=a.events[l][1];if(h.type==="labelImage"){c=h;break}if(h.type==="gfmFootnoteCall"||h.type==="labelLink"||h.type==="label"||h.type==="image"||h.type==="link")break}return f;function f(h){if(!c||!c._balanced)return r(h);const m=$r(a.sliceSerialize({start:c.end,end:a.now()}));return m.codePointAt(0)!==94||!o.includes(m.slice(1))?r(h):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),t(h))}}function VD(e,t){let r=e.length;for(;r--;)if(e[r][1].type==="labelImage"&&e[r][0]==="enter"){e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";const a={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},l={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};l.end.column++,l.end.offset++,l.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},l.end),end:Object.assign({},e[e.length-1][1].start)},c={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},f=[e[r+1],e[r+2],["enter",a,t],e[r+3],e[r+4],["enter",l,t],["exit",l,t],["enter",o,t],["enter",c,t],["exit",c,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",a,t]];return e.splice(r,e.length-r+1,...f),e}function YD(e,t,r){const a=this,l=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let o=0,c;return f;function f(x){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(x),e.exit("gfmFootnoteCallLabelMarker"),h}function h(x){return x!==94?r(x):(e.enter("gfmFootnoteCallMarker"),e.consume(x),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",m)}function m(x){if(o>999||x===93&&!c||x===null||x===91||Yt(x))return r(x);if(x===93){e.exit("chunkString");const y=e.exit("gfmFootnoteCallString");return l.includes($r(a.sliceSerialize(y)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(x),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):r(x)}return Yt(x)||(c=!0),o++,e.consume(x),x===92?g:m}function g(x){return x===91||x===92||x===93?(e.consume(x),o++,m):m(x)}}function QD(e,t,r){const a=this,l=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let o,c=0,f;return h;function h(k){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),m}function m(k){return k===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",g):r(k)}function g(k){if(c>999||k===93&&!f||k===null||k===91||Yt(k))return r(k);if(k===93){e.exit("chunkString");const E=e.exit("gfmFootnoteDefinitionLabelString");return o=$r(a.sliceSerialize(E)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),y}return Yt(k)||(f=!0),c++,e.consume(k),k===92?x:g}function x(k){return k===91||k===92||k===93?(e.consume(k),c++,g):g(k)}function y(k){return k===58?(e.enter("definitionMarker"),e.consume(k),e.exit("definitionMarker"),l.includes(o)||l.push(o),Ct(e,v,"gfmFootnoteDefinitionWhitespace")):r(k)}function v(k){return t(k)}}function XD(e,t,r){return e.check(Lo,t,e.attempt($D,t,r))}function ZD(e){e.exit("gfmFootnoteDefinition")}function WD(e,t,r){const a=this;return Ct(e,l,"gfmFootnoteDefinitionIndent",5);function l(o){const c=a.events[a.events.length-1];return c&&c[1].type==="gfmFootnoteDefinitionIndent"&&c[2].sliceSerialize(c[1],!0).length===4?t(o):r(o)}}function JD(e){let r=(e||{}).singleTilde;const a={name:"strikethrough",tokenize:o,resolveAll:l};return r==null&&(r=!0),{text:{126:a},insideSpan:{null:[a]},attentionMarkers:{null:[126]}};function l(c,f){let h=-1;for(;++h<c.length;)if(c[h][0]==="enter"&&c[h][1].type==="strikethroughSequenceTemporary"&&c[h][1]._close){let m=h;for(;m--;)if(c[m][0]==="exit"&&c[m][1].type==="strikethroughSequenceTemporary"&&c[m][1]._open&&c[h][1].end.offset-c[h][1].start.offset===c[m][1].end.offset-c[m][1].start.offset){c[h][1].type="strikethroughSequence",c[m][1].type="strikethroughSequence";const g={type:"strikethrough",start:Object.assign({},c[m][1].start),end:Object.assign({},c[h][1].end)},x={type:"strikethroughText",start:Object.assign({},c[m][1].end),end:Object.assign({},c[h][1].start)},y=[["enter",g,f],["enter",c[m][1],f],["exit",c[m][1],f],["enter",x,f]],v=f.parser.constructs.insideSpan.null;v&&gr(y,y.length,0,Zu(v,c.slice(m+1,h),f)),gr(y,y.length,0,[["exit",x,f],["enter",c[h][1],f],["exit",c[h][1],f],["exit",g,f]]),gr(c,m-1,h-m+3,y),h=m+y.length-2;break}}for(h=-1;++h<c.length;)c[h][1].type==="strikethroughSequenceTemporary"&&(c[h][1].type="data");return c}function o(c,f,h){const m=this.previous,g=this.events;let x=0;return y;function y(k){return m===126&&g[g.length-1][1].type!=="characterEscape"?h(k):(c.enter("strikethroughSequenceTemporary"),v(k))}function v(k){const E=Gs(m);if(k===126)return x>1?h(k):(c.consume(k),x++,v);if(x<2&&!r)return h(k);const S=c.exit("strikethroughSequenceTemporary"),N=Gs(k);return S._open=!N||N===2&&!!E,S._close=!E||E===2&&!!N,f(k)}}}class eL{constructor(){this.map=[]}add(t,r,a){tL(this,t,r,a)}consume(t){if(this.map.sort(function(o,c){return o[0]-c[0]}),this.map.length===0)return;let r=this.map.length;const a=[];for(;r>0;)r-=1,a.push(t.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),t.length=this.map[r][0];a.push(t.slice()),t.length=0;let l=a.pop();for(;l;){for(const o of l)t.push(o);l=a.pop()}this.map.length=0}}function tL(e,t,r,a){let l=0;if(!(r===0&&a.length===0)){for(;l<e.map.length;){if(e.map[l][0]===t){e.map[l][1]+=r,e.map[l][2].push(...a);return}l+=1}e.map.push([t,r,a])}}function nL(e,t){let r=!1;const a=[];for(;t<e.length;){const l=e[t];if(r){if(l[0]==="enter")l[1].type==="tableContent"&&a.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(l[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=a.length-1;a[o]=a[o]==="left"?"center":"right"}}else if(l[1].type==="tableDelimiterRow")break}else l[0]==="enter"&&l[1].type==="tableDelimiterRow"&&(r=!0);t+=1}return a}function rL(){return{flow:{null:{name:"table",tokenize:iL,resolveAll:aL}}}}function iL(e,t,r){const a=this;let l=0,o=0,c;return f;function f(F){let ee=a.events.length-1;for(;ee>-1;){const se=a.events[ee][1].type;if(se==="lineEnding"||se==="linePrefix")ee--;else break}const te=ee>-1?a.events[ee][1].type:null,we=te==="tableHead"||te==="tableRow"?j:h;return we===j&&a.parser.lazy[a.now().line]?r(F):we(F)}function h(F){return e.enter("tableHead"),e.enter("tableRow"),m(F)}function m(F){return F===124||(c=!0,o+=1),g(F)}function g(F){return F===null?r(F):Ke(F)?o>1?(o=0,a.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(F),e.exit("lineEnding"),v):r(F):pt(F)?Ct(e,g,"whitespace")(F):(o+=1,c&&(c=!1,l+=1),F===124?(e.enter("tableCellDivider"),e.consume(F),e.exit("tableCellDivider"),c=!0,g):(e.enter("data"),x(F)))}function x(F){return F===null||F===124||Yt(F)?(e.exit("data"),g(F)):(e.consume(F),F===92?y:x)}function y(F){return F===92||F===124?(e.consume(F),x):x(F)}function v(F){return a.interrupt=!1,a.parser.lazy[a.now().line]?r(F):(e.enter("tableDelimiterRow"),c=!1,pt(F)?Ct(e,k,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(F):k(F))}function k(F){return F===45||F===58?S(F):F===124?(c=!0,e.enter("tableCellDivider"),e.consume(F),e.exit("tableCellDivider"),E):$(F)}function E(F){return pt(F)?Ct(e,S,"whitespace")(F):S(F)}function S(F){return F===58?(o+=1,c=!0,e.enter("tableDelimiterMarker"),e.consume(F),e.exit("tableDelimiterMarker"),N):F===45?(o+=1,N(F)):F===null||Ke(F)?P(F):$(F)}function N(F){return F===45?(e.enter("tableDelimiterFiller"),O(F)):$(F)}function O(F){return F===45?(e.consume(F),O):F===58?(c=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(F),e.exit("tableDelimiterMarker"),T):(e.exit("tableDelimiterFiller"),T(F))}function T(F){return pt(F)?Ct(e,P,"whitespace")(F):P(F)}function P(F){return F===124?k(F):F===null||Ke(F)?!c||l!==o?$(F):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(F)):$(F)}function $(F){return r(F)}function j(F){return e.enter("tableRow"),G(F)}function G(F){return F===124?(e.enter("tableCellDivider"),e.consume(F),e.exit("tableCellDivider"),G):F===null||Ke(F)?(e.exit("tableRow"),t(F)):pt(F)?Ct(e,G,"whitespace")(F):(e.enter("data"),A(F))}function A(F){return F===null||F===124||Yt(F)?(e.exit("data"),G(F)):(e.consume(F),F===92?ie:A)}function ie(F){return F===92||F===124?(e.consume(F),A):A(F)}}function aL(e,t){let r=-1,a=!0,l=0,o=[0,0,0,0],c=[0,0,0,0],f=!1,h=0,m,g,x;const y=new eL;for(;++r<e.length;){const v=e[r],k=v[1];v[0]==="enter"?k.type==="tableHead"?(f=!1,h!==0&&(ev(y,t,h,m,g),g=void 0,h=0),m={type:"table",start:Object.assign({},k.start),end:Object.assign({},k.end)},y.add(r,0,[["enter",m,t]])):k.type==="tableRow"||k.type==="tableDelimiterRow"?(a=!0,x=void 0,o=[0,0,0,0],c=[0,r+1,0,0],f&&(f=!1,g={type:"tableBody",start:Object.assign({},k.start),end:Object.assign({},k.end)},y.add(r,0,[["enter",g,t]])),l=k.type==="tableDelimiterRow"?2:g?3:1):l&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")?(a=!1,c[2]===0&&(o[1]!==0&&(c[0]=c[1],x=lu(y,t,o,l,void 0,x),o=[0,0,0,0]),c[2]=r)):k.type==="tableCellDivider"&&(a?a=!1:(o[1]!==0&&(c[0]=c[1],x=lu(y,t,o,l,void 0,x)),o=c,c=[o[1],r,0,0])):k.type==="tableHead"?(f=!0,h=r):k.type==="tableRow"||k.type==="tableDelimiterRow"?(h=r,o[1]!==0?(c[0]=c[1],x=lu(y,t,o,l,r,x)):c[1]!==0&&(x=lu(y,t,c,l,r,x)),l=0):l&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")&&(c[3]=r)}for(h!==0&&ev(y,t,h,m,g),y.consume(t.events),r=-1;++r<t.events.length;){const v=t.events[r];v[0]==="enter"&&v[1].type==="table"&&(v[1]._align=nL(t.events,r))}return e}function lu(e,t,r,a,l,o){const c=a===1?"tableHeader":a===2?"tableDelimiter":"tableData",f="tableContent";r[0]!==0&&(o.end=Object.assign({},Is(t.events,r[0])),e.add(r[0],0,[["exit",o,t]]));const h=Is(t.events,r[1]);if(o={type:c,start:Object.assign({},h),end:Object.assign({},h)},e.add(r[1],0,[["enter",o,t]]),r[2]!==0){const m=Is(t.events,r[2]),g=Is(t.events,r[3]),x={type:f,start:Object.assign({},m),end:Object.assign({},g)};if(e.add(r[2],0,[["enter",x,t]]),a!==2){const y=t.events[r[2]],v=t.events[r[3]];if(y[1].end=Object.assign({},v[1].end),y[1].type="chunkText",y[1].contentType="text",r[3]>r[2]+1){const k=r[2]+1,E=r[3]-r[2]-1;e.add(k,E,[])}}e.add(r[3]+1,0,[["exit",x,t]])}return l!==void 0&&(o.end=Object.assign({},Is(t.events,l)),e.add(l,0,[["exit",o,t]]),o=void 0),o}function ev(e,t,r,a,l){const o=[],c=Is(t.events,r);l&&(l.end=Object.assign({},c),o.push(["exit",l,t])),a.end=Object.assign({},c),o.push(["exit",a,t]),e.add(r+1,0,o)}function Is(e,t){const r=e[t],a=r[0]==="enter"?"start":"end";return r[1][a]}const sL={name:"tasklistCheck",tokenize:oL};function lL(){return{text:{91:sL}}}function oL(e,t,r){const a=this;return l;function l(h){return a.previous!==null||!a._gfmTasklistFirstContentOfListItem?r(h):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(h),e.exit("taskListCheckMarker"),o)}function o(h){return Yt(h)?(e.enter("taskListCheckValueUnchecked"),e.consume(h),e.exit("taskListCheckValueUnchecked"),c):h===88||h===120?(e.enter("taskListCheckValueChecked"),e.consume(h),e.exit("taskListCheckValueChecked"),c):r(h)}function c(h){return h===93?(e.enter("taskListCheckMarker"),e.consume(h),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),f):r(h)}function f(h){return Ke(h)?t(h):pt(h)?e.check({tokenize:cL},t,r)(h):r(h)}}function cL(e,t,r){return Ct(e,a,"whitespace");function a(l){return l===null?r(l):t(l)}}function uL(e){return Mk([DD(),GD(),JD(e),rL(),lL()])}const dL={};function fL(e){const t=this,r=e||dL,a=t.data(),l=a.micromarkExtensions||(a.micromarkExtensions=[]),o=a.fromMarkdownExtensions||(a.fromMarkdownExtensions=[]),c=a.toMarkdownExtensions||(a.toMarkdownExtensions=[]);l.push(uL(r)),o.push(AD()),c.push(OD(r))}const tv=(function(e,t,r){const a=Io(r);if(!e||!e.type||!e.children)throw new Error("Expected parent node");if(typeof t=="number"){if(t<0||t===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if(t=e.children.indexOf(t),t<0)throw new Error("Expected child node or index");for(;++t<e.children.length;)if(a(e.children[t],t,e))return e.children[t]}),Ja=(function(e){if(e==null)return pL;if(typeof e=="string")return mL(e);if(typeof e=="object")return hL(e);if(typeof e=="function")return bp(e);throw new Error("Expected function, string, or array as `test`")});function hL(e){const t=[];let r=-1;for(;++r<e.length;)t[r]=Ja(e[r]);return bp(a);function a(...l){let o=-1;for(;++o<t.length;)if(t[o].apply(this,l))return!0;return!1}}function mL(e){return bp(t);function t(r){return r.tagName===e}}function bp(e){return t;function t(r,a,l){return!!(gL(r)&&e.call(this,r,typeof a=="number"?a:void 0,l||void 0))}}function pL(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function gL(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const nv=/\n/g,rv=/[\t ]+/g,wm=Ja("br"),iv=Ja(EL),bL=Ja("p"),av=Ja("tr"),xL=Ja(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",_L,NL]),_w=Ja(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl","dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","li","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"]);function yL(e,t){const r=t||{},a="children"in e?e.children:[],l=_w(e),o=Sw(e,{whitespace:r.whitespace||"normal"}),c=[];(e.type==="text"||e.type==="comment")&&c.push(...Nw(e,{breakBefore:!0,breakAfter:!0}));let f=-1;for(;++f<a.length;)c.push(...Ew(a[f],e,{whitespace:o,breakBefore:f?void 0:l,breakAfter:f<a.length-1?wm(a[f+1]):l}));const h=[];let m;for(f=-1;++f<c.length;){const g=c[f];typeof g=="number"?m!==void 0&&g>m&&(m=g):g&&(m!==void 0&&m>-1&&h.push(`
557
+ `.repeat(m)||" "),m=-1,h.push(g))}return h.join("")}function Ew(e,t,r){return e.type==="element"?vL(e,t,r):e.type==="text"?r.whitespace==="normal"?Nw(e,r):kL(e):[]}function vL(e,t,r){const a=Sw(e,r),l=e.children||[];let o=-1,c=[];if(xL(e))return c;let f,h;for(wm(e)||av(e)&&tv(t,e,av)?h=`
558
+ `:bL(e)?(f=2,h=2):_w(e)&&(f=1,h=1);++o<l.length;)c=c.concat(Ew(l[o],e,{whitespace:a,breakBefore:o?void 0:f,breakAfter:o<l.length-1?wm(l[o+1]):h}));return iv(e)&&tv(t,e,iv)&&c.push(" "),f&&c.unshift(f),h&&c.push(h),c}function Nw(e,t){const r=String(e.value),a=[],l=[];let o=0;for(;o<=r.length;){nv.lastIndex=o;const h=nv.exec(r),m=h&&"index"in h?h.index:r.length;a.push(wL(r.slice(o,m).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),o===0?t.breakBefore:!0,m===r.length?t.breakAfter:!0)),o=m+1}let c=-1,f;for(;++c<a.length;)a[c].charCodeAt(a[c].length-1)===8203||c<a.length-1&&a[c+1].charCodeAt(0)===8203?(l.push(a[c]),f=void 0):a[c]?(typeof f=="number"&&l.push(f),l.push(a[c]),f=0):(c===0||c===a.length-1)&&l.push(0);return l}function kL(e){return[String(e.value)]}function wL(e,t,r){const a=[];let l=0,o;for(;l<e.length;){rv.lastIndex=l;const c=rv.exec(e);o=c?c.index:e.length,!l&&!o&&c&&!t&&a.push(""),l!==o&&a.push(e.slice(l,o)),l=c?o+c[0].length:o}return l!==o&&!r&&a.push(""),a.join(" ")}function Sw(e,t){if(e.type==="element"){const r=e.properties||{};switch(e.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return r.wrap?"pre-wrap":"pre";case"td":case"th":return r.noWrap?"nowrap":t.whitespace;case"textarea":return"pre-wrap"}}return t.whitespace}function _L(e){return!!(e.properties||{}).hidden}function EL(e){return e.tagName==="td"||e.tagName==="th"}function NL(e){return e.tagName==="dialog"&&!(e.properties||{}).open}function SL(e){const t=e.regex,r=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),a="decltype\\(auto\\)",l="[a-zA-Z_]\\w*::",c="(?!struct)("+a+"|"+t.optional(l)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",f={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},m={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},g={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},x={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(m,{className:"string"}),{className:"string",begin:/<.*?>/},r,e.C_BLOCK_COMMENT_MODE]},y={className:"title",begin:t.optional(l)+e.IDENT_RE,relevance:0},v=t.optional(l)+e.IDENT_RE+"\\s*\\(",k=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],E=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],S=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],N=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],P={type:E,keyword:k,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:S},$={className:"function.dispatch",relevance:0,keywords:{_hint:N},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},j=[$,x,f,r,e.C_BLOCK_COMMENT_MODE,g,m],G={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:P,contains:j.concat([{begin:/\(/,end:/\)/,keywords:P,contains:j.concat(["self"]),relevance:0}]),relevance:0},A={className:"function",begin:"("+c+"[\\*&\\s]+)+"+v,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:P,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:P,relevance:0},{begin:v,returnBegin:!0,contains:[y],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[m,g]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:P,relevance:0,contains:[r,e.C_BLOCK_COMMENT_MODE,m,g,f,{begin:/\(/,end:/\)/,keywords:P,relevance:0,contains:["self",r,e.C_BLOCK_COMMENT_MODE,m,g,f]}]},f,r,e.C_BLOCK_COMMENT_MODE,x]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:P,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(G,A,$,j,[x,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:P,contains:["self",f]},{begin:e.IDENT_RE+"::",keywords:P},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function zL(e){const t={type:["boolean","byte","word","String"],built_in:["KeyboardController","MouseController","SoftwareSerial","EthernetServer","EthernetClient","LiquidCrystal","RobotControl","GSMVoiceCall","EthernetUDP","EsploraTFT","HttpClient","RobotMotor","WiFiClient","GSMScanner","FileSystem","Scheduler","GSMServer","YunClient","YunServer","IPAddress","GSMClient","GSMModem","Keyboard","Ethernet","Console","GSMBand","Esplora","Stepper","Process","WiFiUDP","GSM_SMS","Mailbox","USBHost","Firmata","PImage","Client","Server","GSMPIN","FileIO","Bridge","Serial","EEPROM","Stream","Mouse","Audio","Servo","File","Task","GPRS","WiFi","Wire","TFT","GSM","SPI","SD"],_hints:["setup","loop","runShellCommandAsynchronously","analogWriteResolution","retrieveCallingNumber","printFirmwareVersion","analogReadResolution","sendDigitalPortPair","noListenOnLocalhost","readJoystickButton","setFirmwareVersion","readJoystickSwitch","scrollDisplayRight","getVoiceCallStatus","scrollDisplayLeft","writeMicroseconds","delayMicroseconds","beginTransmission","getSignalStrength","runAsynchronously","getAsynchronously","listenOnLocalhost","getCurrentCarrier","readAccelerometer","messageAvailable","sendDigitalPorts","lineFollowConfig","countryNameWrite","runShellCommand","readStringUntil","rewindDirectory","readTemperature","setClockDivider","readLightSensor","endTransmission","analogReference","detachInterrupt","countryNameRead","attachInterrupt","encryptionType","readBytesUntil","robotNameWrite","readMicrophone","robotNameRead","cityNameWrite","userNameWrite","readJoystickY","readJoystickX","mouseReleased","openNextFile","scanNetworks","noInterrupts","digitalWrite","beginSpeaker","mousePressed","isActionDone","mouseDragged","displayLogos","noAutoscroll","addParameter","remoteNumber","getModifiers","keyboardRead","userNameRead","waitContinue","processInput","parseCommand","printVersion","readNetworks","writeMessage","blinkVersion","cityNameRead","readMessage","setDataMode","parsePacket","isListening","setBitOrder","beginPacket","isDirectory","motorsWrite","drawCompass","digitalRead","clearScreen","serialEvent","rightToLeft","setTextSize","leftToRight","requestFrom","keyReleased","compassRead","analogWrite","interrupts","WiFiServer","disconnect","playMelody","parseFloat","autoscroll","getPINUsed","setPINUsed","setTimeout","sendAnalog","readSlider","analogRead","beginWrite","createChar","motorsStop","keyPressed","tempoWrite","readButton","subnetMask","debugPrint","macAddress","writeGreen","randomSeed","attachGPRS","readString","sendString","remotePort","releaseAll","mouseMoved","background","getXChange","getYChange","answerCall","getResult","voiceCall","endPacket","constrain","getSocket","writeJSON","getButton","available","connected","findUntil","readBytes","exitValue","readGreen","writeBlue","startLoop","IPAddress","isPressed","sendSysex","pauseMode","gatewayIP","setCursor","getOemKey","tuneWrite","noDisplay","loadImage","switchPIN","onRequest","onReceive","changePIN","playFile","noBuffer","parseInt","overflow","checkPIN","knobRead","beginTFT","bitClear","updateIR","bitWrite","position","writeRGB","highByte","writeRed","setSpeed","readBlue","noStroke","remoteIP","transfer","shutdown","hangCall","beginSMS","endWrite","attached","maintain","noCursor","checkReg","checkPUK","shiftOut","isValid","shiftIn","pulseIn","connect","println","localIP","pinMode","getIMEI","display","noBlink","process","getBand","running","beginSD","drawBMP","lowByte","setBand","release","bitRead","prepare","pointTo","readRed","setMode","noFill","remove","listen","stroke","detach","attach","noTone","exists","buffer","height","bitSet","circle","config","cursor","random","IRread","setDNS","endSMS","getKey","micros","millis","begin","print","write","ready","flush","width","isPIN","blink","clear","press","mkdir","rmdir","close","point","yield","image","BSSID","click","delay","read","text","move","peek","beep","rect","line","open","seek","fill","size","turn","stop","home","find","step","tone","sqrt","RSSI","SSID","end","bit","tan","cos","sin","pow","map","abs","max","min","get","run","put"],literal:["DIGITAL_MESSAGE","FIRMATA_STRING","ANALOG_MESSAGE","REPORT_DIGITAL","REPORT_ANALOG","INPUT_PULLUP","SET_PIN_MODE","INTERNAL2V56","SYSTEM_RESET","LED_BUILTIN","INTERNAL1V1","SYSEX_START","INTERNAL","EXTERNAL","DEFAULT","OUTPUT","INPUT","HIGH","LOW"]},r=SL(e),a=r.keywords;return a.type=[...a.type,...t.type],a.literal=[...a.literal,...t.literal],a.built_in=[...a.built_in,...t.built_in],a._hints=t._hints,r.name="Arduino",r.aliases=["ino"],r.supersetOf="cpp",r}function CL(e){const t=e.regex,r={},a={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[r]}]};Object.assign(r,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},a]});const l={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},o=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),c={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},f={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,r,l]};l.contains.push(f);const h={match:/\\"/},m={className:"string",begin:/'/,end:/'/},g={match:/\\'/},x={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,r]},y=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],v=e.SHEBANG({binary:`(${y.join("|")})`,relevance:10}),k={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},E=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],S=["true","false"],N={match:/(\/[a-z._-]+)+/},O=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],T=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],P=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],$=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:E,literal:S,built_in:[...O,...T,"set","shopt",...P,...$]},contains:[v,e.SHEBANG(),k,x,o,c,N,f,h,m,g,r]}}function TL(e){const t=e.regex,r=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),a="decltype\\(auto\\)",l="[a-zA-Z_]\\w*::",c="("+a+"|"+t.optional(l)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",f={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},m={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},g={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},x={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(m,{className:"string"}),{className:"string",begin:/<.*?>/},r,e.C_BLOCK_COMMENT_MODE]},y={className:"title",begin:t.optional(l)+e.IDENT_RE,relevance:0},v=t.optional(l)+e.IDENT_RE+"\\s*\\(",S={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},N=[x,f,r,e.C_BLOCK_COMMENT_MODE,g,m],O={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:S,contains:N.concat([{begin:/\(/,end:/\)/,keywords:S,contains:N.concat(["self"]),relevance:0}]),relevance:0},T={begin:"("+c+"[\\*&\\s]+)+"+v,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:S,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:S,relevance:0},{begin:v,returnBegin:!0,contains:[e.inherit(y,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:S,relevance:0,contains:[r,e.C_BLOCK_COMMENT_MODE,m,g,f,{begin:/\(/,end:/\)/,keywords:S,relevance:0,contains:["self",r,e.C_BLOCK_COMMENT_MODE,m,g,f]}]},f,r,e.C_BLOCK_COMMENT_MODE,x]};return{name:"C",aliases:["h"],keywords:S,disableAutodetect:!0,illegal:"</",contains:[].concat(O,T,N,[x,{begin:e.IDENT_RE+"::",keywords:S},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:x,strings:m,keywords:S}}}function RL(e){const t=e.regex,r=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),a="decltype\\(auto\\)",l="[a-zA-Z_]\\w*::",c="(?!struct)("+a+"|"+t.optional(l)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",f={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},m={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},g={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},x={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(m,{className:"string"}),{className:"string",begin:/<.*?>/},r,e.C_BLOCK_COMMENT_MODE]},y={className:"title",begin:t.optional(l)+e.IDENT_RE,relevance:0},v=t.optional(l)+e.IDENT_RE+"\\s*\\(",k=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],E=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],S=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],N=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],P={type:E,keyword:k,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:S},$={className:"function.dispatch",relevance:0,keywords:{_hint:N},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},j=[$,x,f,r,e.C_BLOCK_COMMENT_MODE,g,m],G={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:P,contains:j.concat([{begin:/\(/,end:/\)/,keywords:P,contains:j.concat(["self"]),relevance:0}]),relevance:0},A={className:"function",begin:"("+c+"[\\*&\\s]+)+"+v,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:P,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:P,relevance:0},{begin:v,returnBegin:!0,contains:[y],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[m,g]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:P,relevance:0,contains:[r,e.C_BLOCK_COMMENT_MODE,m,g,f,{begin:/\(/,end:/\)/,keywords:P,relevance:0,contains:["self",r,e.C_BLOCK_COMMENT_MODE,m,g,f]}]},f,r,e.C_BLOCK_COMMENT_MODE,x]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:P,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(G,A,$,j,[x,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:P,contains:["self",f]},{begin:e.IDENT_RE+"::",keywords:P},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function AL(e){const t=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],r=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],a=["default","false","null","true"],l=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],o=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],c={keyword:l.concat(o),built_in:t,literal:a},f=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),h={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},m={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},g={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},x=e.inherit(g,{illegal:/\n/}),y={className:"subst",begin:/\{/,end:/\}/,keywords:c},v=e.inherit(y,{illegal:/\n/}),k={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,v]},E={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},y]},S=e.inherit(E,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},v]});y.contains=[E,k,g,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,h,e.C_BLOCK_COMMENT_MODE],v.contains=[S,k,x,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,h,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const N={variants:[m,E,k,g,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},O={begin:"<",end:">",contains:[{beginKeywords:"in out"},f]},T=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",P={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:c,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"<!--|-->"},{begin:"</?",end:">"}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},N,h,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},f,O,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[f,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[f,O,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+T+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:c,contains:[{beginKeywords:r.join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,O],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,relevance:0,contains:[N,h,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},P]}}const OL=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),ML=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],jL=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],DL=[...ML,...jL],LL=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),IL=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),BL=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),UL=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function FL(e){const t=e.regex,r=OL(e),a={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},l="and or not only",o=/@-?\w[\w]*(-\w+)*/,c="[a-zA-Z-][a-zA-Z0-9_-]*",f=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[r.BLOCK_COMMENT,a,r.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+c,relevance:0},r.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+IL.join("|")+")"},{begin:":(:)?("+BL.join("|")+")"}]},r.CSS_VARIABLE,{className:"attribute",begin:"\\b("+UL.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[r.BLOCK_COMMENT,r.HEXCOLOR,r.IMPORTANT,r.CSS_NUMBER_MODE,...f,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...f,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},r.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:o},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:l,attribute:LL.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...f,r.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+DL.join("|")+")\\b"}]}}function PL(e){const t=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}function HL(e){const o={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:o,illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:o,illegal:/["']/}]}]}}function qL(e){const t=e.regex,r=/[_A-Za-z][_0-9A-Za-z]*/;return{name:"GraphQL",aliases:["gql"],case_insensitive:!0,disableAutodetect:!1,keywords:{keyword:["query","mutation","subscription","type","input","schema","directive","interface","union","scalar","fragment","enum","on"],literal:["true","false","null"]},contains:[e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{scope:"punctuation",match:/[.]{3}/,relevance:0},{scope:"punctuation",begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:"variable",begin:/\$/,end:/\W/,excludeEnd:!0,relevance:0},{scope:"meta",match:/@\w+/,excludeEnd:!0},{scope:"symbol",begin:t.concat(r,t.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}}function $L(e){const t=e.regex,r={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:e.NUMBER_RE}]},a=e.COMMENT();a.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const l={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},o={className:"literal",begin:/\bon|off|true|false|yes|no\b/},c={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},f={begin:/\[/,end:/\]/,contains:[a,o,l,c,r,"self"],relevance:0},h=/[A-Za-z0-9_-]+/,m=/"(\\"|[^"])*"/,g=/'[^']*'/,x=t.either(h,m,g),y=t.concat(x,"(\\s*\\.\\s*",x,")*",t.lookahead(/\s*=\s*[^#\s]/));return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[a,{className:"section",begin:/\[+/,end:/\]+/},{begin:y,className:"attr",starts:{end:/$/,contains:[a,f,o,l,c,r]}}]}}var Bs="[0-9](_*[0-9])*",ou=`\\.(${Bs})`,cu="[0-9a-fA-F](_*[0-9a-fA-F])*",sv={className:"number",variants:[{begin:`(\\b(${Bs})((${ou})|\\.)?|(${ou}))[eE][+-]?(${Bs})[fFdD]?\\b`},{begin:`\\b(${Bs})((${ou})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${ou})[fFdD]?\\b`},{begin:`\\b(${Bs})[fFdD]\\b`},{begin:`\\b0[xX]((${cu})\\.?|(${cu})?\\.(${cu}))[pP][+-]?(${Bs})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${cu})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function zw(e,t,r){return r===-1?"":e.replace(t,a=>zw(e,t,r-1))}function GL(e){const t=e.regex,r="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",a=r+zw("(?:<"+r+"~~~(?:\\s*,\\s*"+r+"~~~)*>)?",/~~~/g,2),h={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},m={className:"meta",begin:"@"+r,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},g={className:"params",begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:h,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,r],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t.concat(/(?!else)/,r),/\s+/,r,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,r],className:{1:"keyword",3:"title.class"},contains:[g,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+a+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:h,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:[m,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,sv,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},sv,m]}}const lv="[A-Za-z$_][0-9A-Za-z$_]*",KL=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],VL=["true","false","null","undefined","NaN","Infinity"],Cw=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],Tw=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Rw=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],YL=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],QL=[].concat(Rw,Cw,Tw);function XL(e){const t=e.regex,r=(V,{after:fe})=>{const R="</"+V[0].slice(1);return V.input.indexOf(R,fe)!==-1},a=lv,l={begin:"<>",end:"</>"},o=/<[A-Za-z0-9\\._:-]+\s*\/>/,c={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(V,fe)=>{const R=V[0].length+V.index,D=V.input[R];if(D==="<"||D===","){fe.ignoreMatch();return}D===">"&&(r(V,{after:R})||fe.ignoreMatch());let B;const z=V.input.substring(R);if(B=z.match(/^\s*=/)){fe.ignoreMatch();return}if((B=z.match(/^\s+extends\s+/))&&B.index===0){fe.ignoreMatch();return}}},f={$pattern:lv,keyword:KL,literal:VL,built_in:QL,"variable.language":YL},h="[0-9](_?[0-9])*",m=`\\.(${h})`,g="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",x={className:"number",variants:[{begin:`(\\b(${g})((${m})|\\.)?|(${m}))[eE][+-]?(${h})\\b`},{begin:`\\b(${g})\\b((${m})\\b|\\.)?|(${m})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},y={className:"subst",begin:"\\$\\{",end:"\\}",keywords:f,contains:[]},v={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,y],subLanguage:"xml"}},k={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,y],subLanguage:"css"}},E={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,y],subLanguage:"graphql"}},S={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,y]},O={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:a+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},T=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,v,k,E,S,{match:/\$\d+/},x];y.contains=T.concat({begin:/\{/,end:/\}/,keywords:f,contains:["self"].concat(T)});const P=[].concat(O,y.contains),$=P.concat([{begin:/(\s*)\(/,end:/\)/,keywords:f,contains:["self"].concat(P)}]),j={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:$},G={variants:[{match:[/class/,/\s+/,a,/\s+/,/extends/,/\s+/,t.concat(a,"(",t.concat(/\./,a),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,a],scope:{1:"keyword",3:"title.class"}}]},A={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...Cw,...Tw]}},ie={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},F={variants:[{match:[/function/,/\s+/,a,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[j],illegal:/%/},ee={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function te(V){return t.concat("(?!",V.join("|"),")")}const we={match:t.concat(/\b/,te([...Rw,"super","import"].map(V=>`${V}\\s*\\(`)),a,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},se={begin:t.concat(/\./,t.lookahead(t.concat(a,/(?![0-9A-Za-z$_(])/))),end:a,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},Q={match:[/get|set/,/\s+/,a,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},j]},M="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",Y={match:[/const|var|let/,/\s+/,a,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(M)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[j]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:f,exports:{PARAMS_CONTAINS:$,CLASS_REFERENCE:A},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),ie,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,v,k,E,S,O,{match:/\$\d+/},x,A,{scope:"attr",match:a+t.lookahead(":"),relevance:0},Y,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[O,e.REGEXP_MODE,{className:"function",begin:M,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:$}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:l.begin,end:l.end},{match:o},{begin:c.begin,"on:begin":c.isTrulyOpeningTag,end:c.end}],subLanguage:"xml",contains:[{begin:c.begin,end:c.end,skip:!0,contains:["self"]}]}]},F,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[j,e.inherit(e.TITLE_MODE,{begin:a,className:"title.function"})]},{match:/\.\.\./,relevance:0},se,{match:"\\$"+a,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[j]},we,ee,G,Q,{match:/\$[(.]/}]}}function ZL(e){const t={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},r={match:/[{}[\],:]/,className:"punctuation",relevance:0},a=["true","false","null"],l={scope:"literal",beginKeywords:a.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:a},contains:[t,r,e.QUOTE_STRING_MODE,l,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}var Us="[0-9](_*[0-9])*",uu=`\\.(${Us})`,du="[0-9a-fA-F](_*[0-9a-fA-F])*",WL={className:"number",variants:[{begin:`(\\b(${Us})((${uu})|\\.)?|(${uu}))[eE][+-]?(${Us})[fFdD]?\\b`},{begin:`\\b(${Us})((${uu})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${uu})[fFdD]?\\b`},{begin:`\\b(${Us})[fFdD]\\b`},{begin:`\\b0[xX]((${du})\\.?|(${du})?\\.(${du}))[pP][+-]?(${Us})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${du})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function JL(e){const t={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},r={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},a={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},l={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},o={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},c={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[o,l]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,o,l]}]};l.contains.push(c);const f={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},h={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(c,{className:"string"}),"self"]}]},m=WL,g=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),x={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},y=x;return y.variants[1].contains=[x],x.variants[1].contains=[y],{name:"Kotlin",aliases:["kt","kts"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,g,r,a,f,h,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[x,e.C_LINE_COMMENT_MODE,g],relevance:0},e.C_LINE_COMMENT_MODE,g,f,h,c,e.C_NUMBER_MODE]},g]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},f,h]},c,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
559
+ `},m]}}const eI=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),tI=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],nI=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],rI=[...tI,...nI],iI=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),Aw=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),Ow=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),aI=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),sI=Aw.concat(Ow).sort().reverse();function lI(e){const t=eI(e),r=sI,a="and or not only",l="[\\w-]+",o="("+l+"|@\\{"+l+"\\})",c=[],f=[],h=function(T){return{className:"string",begin:"~?"+T+".*?"+T}},m=function(T,P,$){return{className:T,begin:P,relevance:$}},g={$pattern:/[a-z-]+/,keyword:a,attribute:iI.join(" ")},x={begin:"\\(",end:"\\)",contains:f,keywords:g,relevance:0};f.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,h("'"),h('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,x,m("variable","@@?"+l,10),m("variable","@\\{"+l+"\\}"),m("built_in","~?`[^`]*?`"),{className:"attribute",begin:l+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:"and not"},t.FUNCTION_DISPATCH);const y=f.concat({begin:/\{/,end:/\}/,contains:c}),v={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(f)},k={begin:o+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+aI.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:f}}]},E={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:g,returnEnd:!0,contains:f,relevance:0}},S={className:"variable",variants:[{begin:"@"+l+"\\s*:",relevance:15},{begin:"@"+l}],starts:{end:"[;}]",returnEnd:!0,contains:y}},N={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:o,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,v,m("keyword","all\\b"),m("variable","@\\{"+l+"\\}"),{begin:"\\b("+rI.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,m("selector-tag",o,0),m("selector-id","#"+o),m("selector-class","\\."+o,0),m("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+Aw.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+Ow.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:y},{begin:"!important"},t.FUNCTION_DISPATCH]},O={begin:l+`:(:)?(${r.join("|")})`,returnBegin:!0,contains:[N]};return c.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,E,S,O,k,N,v,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:c}}function oI(e){const t="\\[=*\\[",r="\\]=*\\]",a={begin:t,end:r,contains:["self"]},l=[e.COMMENT("--(?!"+t+")","$"),e.COMMENT("--"+t,r,{contains:[a],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:l.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:l}].concat(l)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:t,end:r,contains:[a],relevance:5}])}}function cI(e){const t={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},r={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,t]},a={className:"variable",begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:"subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value"},contains:[t,r]},l={begin:"^"+e.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},o={className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},c={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[t]};return{name:"Makefile",aliases:["mk","mak","make"],keywords:{$pattern:/[\w-]+/,keyword:"define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath"},contains:[e.HASH_COMMENT_MODE,t,r,a,l,o,c]}}function uI(e){const t=e.regex,r={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},a={begin:"^[-\\*]{3,}",end:"$"},l={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},o={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},c={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},f=/[A-Za-z][A-Za-z0-9+.-]*/,h={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,f,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},m={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},g={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},x=e.inherit(m,{contains:[]}),y=e.inherit(g,{contains:[]});m.contains.push(y),g.contains.push(x);let v=[r,h];return[m,g,x,y].forEach(N=>{N.contains=N.contains.concat(v)}),v=v.concat(m,g),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:v},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:v}]}]},r,o,m,g,{className:"quote",begin:"^>\\s+",contains:v,end:"$"},l,a,h,c,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function dI(e){const t={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},r=/[a-zA-Z@][a-zA-Z0-9_]*/,f={"variable.language":["this","super"],$pattern:r,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},h={$pattern:r,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:f,illegal:"</",contains:[t,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+h.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:h,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}function fI(e){const t=e.regex,r=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],a=/[dualxmsipngr]{0,12}/,l={$pattern:/[\w.]+/,keyword:r.join(" ")},o={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:l},c={begin:/->\{/,end:/\}/},f={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},h={scope:"variable",variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[f]},m={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},g=[e.BACKSLASH_ESCAPE,o,h],x=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],y=(E,S,N="\\1")=>{const O=N==="\\1"?N:t.concat(N,S);return t.concat(t.concat("(?:",E,")"),S,/(?:\\.|[^\\\/])*?/,O,/(?:\\.|[^\\\/])*?/,N,a)},v=(E,S,N)=>t.concat(t.concat("(?:",E,")"),S,/(?:\\.|[^\\\/])*?/,N,a),k=[h,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),c,{className:"string",contains:g,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},m,{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:y("s|tr|y",t.either(...x,{capture:!0}))},{begin:y("s|tr|y","\\(","\\)")},{begin:y("s|tr|y","\\[","\\]")},{begin:y("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:v("(?:m|qr)?",/\//,/\//)},{begin:v("m|qr",t.either(...x,{capture:!0}),/\1/)},{begin:v("m|qr",/\(/,/\)/)},{begin:v("m|qr",/\[/,/\]/)},{begin:v("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,f]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,f,m]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return o.contains=k,c.contains=k,{name:"Perl",aliases:["pl","pm"],keywords:l,contains:k}}function hI(e){const t=e.regex,r=/(?![A-Za-z0-9])(?![$])/,a=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,r),l=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,r),o=t.concat(/[A-Z]+/,r),c={scope:"variable",match:"\\$+"+a},f={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},h={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},m=e.inherit(e.APOS_STRING_MODE,{illegal:null}),g=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(h)}),x={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(h),"on:begin":(se,Q)=>{Q.data._beginMatch=se[1]||se[2]},"on:end":(se,Q)=>{Q.data._beginMatch!==se[1]&&Q.ignoreMatch()}},y=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),v=`[
560
+ ]`,k={scope:"string",variants:[g,m,x,y]},E={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},S=["false","null","true"],N=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],O=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],P={keyword:N,literal:(se=>{const Q=[];return se.forEach(M=>{Q.push(M),M.toLowerCase()===M?Q.push(M.toUpperCase()):Q.push(M.toLowerCase())}),Q})(S),built_in:O},$=se=>se.map(Q=>Q.replace(/\|\d+$/,"")),j={variants:[{match:[/new/,t.concat(v,"+"),t.concat("(?!",$(O).join("\\b|"),"\\b)"),l],scope:{1:"keyword",4:"title.class"}}]},G=t.concat(a,"\\b(?!\\()"),A={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),G],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[l,t.concat(/::/,t.lookahead(/(?!class\b)/)),G],scope:{1:"title.class",3:"variable.constant"}},{match:[l,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[l,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},ie={scope:"attr",match:t.concat(a,t.lookahead(":"),t.lookahead(/(?!::)/))},F={relevance:0,begin:/\(/,end:/\)/,keywords:P,contains:[ie,c,A,e.C_BLOCK_COMMENT_MODE,k,E,j]},ee={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",$(N).join("\\b|"),"|",$(O).join("\\b|"),"\\b)"),a,t.concat(v,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[F]};F.contains.push(ee);const te=[ie,A,e.C_BLOCK_COMMENT_MODE,k,E,j],we={begin:t.concat(/#\[\s*\\?/,t.either(l,o)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:S,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:S,keyword:["new","array"]},contains:["self",...te]},...te,{scope:"meta",variants:[{match:l},{match:o}]}]};return{case_insensitive:!1,keywords:P,contains:[we,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},f,{scope:"variable.language",match:/\$this\b/},c,ee,A,{match:[/const/,/\s/,a],scope:{1:"keyword",3:"variable.constant"}},j,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:P,contains:["self",we,c,A,e.C_BLOCK_COMMENT_MODE,k,E]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},k,E]}}function mI(e){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}function pI(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function gI(e){const t=e.regex,r=/[\p{XID_Start}_]\p{XID_Continue}*/u,a=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],f={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:a,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},h={className:"meta",begin:/^(>>>|\.\.\.) /},m={className:"subst",begin:/\{/,end:/\}/,keywords:f,illegal:/#/},g={begin:/\{\{/,relevance:0},x={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,h],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,h],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,h,g,m]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,h,g,m]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,g,m]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,g,m]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},y="[0-9](_?[0-9])*",v=`(\\b(${y}))?\\.(${y})|\\b(${y})\\.`,k=`\\b|${a.join("|")}`,E={className:"number",relevance:0,variants:[{begin:`(\\b(${y})|(${v}))[eE][+-]?(${y})[jJ]?(?=${k})`},{begin:`(${v})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${k})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${k})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${k})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${k})`},{begin:`\\b(${y})[jJ](?=${k})`}]},S={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:f,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},N={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:["self",h,E,x,e.HASH_COMMENT_MODE]}]};return m.contains=[x,E,h],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:f,illegal:/(<\/|\?)|=>/,contains:[h,E,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},x,S,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,r],scope:{1:"keyword",3:"title.function"},contains:[N]},{variants:[{match:[/\bclass/,/\s+/,r,/\s*/,/\(\s*/,r,/\s*\)/]},{match:[/\bclass/,/\s+/,r]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[E,N,x]}]}}function bI(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function xI(e){const t=e.regex,r=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,a=t.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),l=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,o=t.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:r,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[e.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:t.lookahead(t.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:r},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),e.HASH_COMMENT_MODE,{scope:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[l,a]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,a]},{scope:{1:"punctuation",2:"number"},match:[o,a]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,a]}]},{scope:{3:"operator"},match:[r,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:l},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:o},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function yI(e){const t=e.regex,r="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",a=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),l=t.concat(a,/(::\w+)*/),c={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},f={className:"doctag",begin:"@[A-Za-z]+"},h={begin:"#<",end:">"},m=[e.COMMENT("#","$",{contains:[f]}),e.COMMENT("^=begin","^=end",{contains:[f],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],g={className:"subst",begin:/#\{/,end:/\}/,keywords:c},x={className:"string",contains:[e.BACKSLASH_ESCAPE,g],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,g]})]}]},y="[1-9](_?[0-9])*|0",v="[0-9](_?[0-9])*",k={className:"number",relevance:0,variants:[{begin:`\\b(${y})(\\.(${v}))?([eE][+-]?(${v})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},E={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:c}]},j=[x,{variants:[{match:[/class\s+/,l,/\s+<\s+/,l]},{match:[/\b(class|module)\s+/,l]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:c},{match:[/(include|extend)\s+/,l],scope:{2:"title.class"},keywords:c},{relevance:0,match:[l,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:a,scope:"title.class"},{match:[/def/,/\s+/,r],scope:{1:"keyword",3:"title.function"},contains:[E]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[x,{begin:r}],relevance:0},k,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:c},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,g],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(h,m),relevance:0}].concat(h,m);g.contains=j,E.contains=j;const F=[{begin:/^\s*=>/,starts:{end:"$",contains:j}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:c,contains:j}}];return m.unshift(h),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:c,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(F).concat(m).concat(j)}}function vI(e){const t=e.regex,r=/(r#)?/,a=t.concat(r,e.UNDERSCORE_IDENT_RE),l=t.concat(r,e.IDENT_RE),o={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,l,t.lookahead(/\s*\(/))},c="([ui](8|16|32|64|128|size)|f(32|64))?",f=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],h=["true","false","Some","None","Ok","Err"],m=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],g=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:g,keyword:f,literal:h,built_in:m},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:"char.escape",match:/\\('|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{className:"number",variants:[{begin:"\\b0b([01_]+)"+c},{begin:"\\b0o([0-7_]+)"+c},{begin:"\\b0x([A-Fa-f0-9_]+)"+c},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+c}],relevance:0},{begin:[/fn/,/\s+/,a],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,a],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,a,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,a],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,a],className:{1:"keyword",3:"title.class"}},{begin:e.IDENT_RE+"::",keywords:{keyword:"Self",built_in:m,type:g}},{className:"punctuation",begin:"->"},o]}}const kI=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),wI=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],_I=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],EI=[...wI,..._I],NI=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),SI=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),zI=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),CI=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function TI(e){const t=kI(e),r=zI,a=SI,l="@[a-z-]+",o="and or not only",f={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+EI.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+a.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+r.join("|")+")"},f,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+CI.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[t.BLOCK_COMMENT,f,t.HEXCOLOR,t.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT,t.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:l,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:o,attribute:NI.join(" ")},contains:[{begin:l,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},f,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}}function RI(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function AI(e){const t=e.regex,r=e.COMMENT("--","$"),a={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},l={begin:/"/,end:/"/,contains:[{match:/""/}]},o=["true","false","unknown"],c=["double precision","large object","with timezone","without timezone"],f=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],h=["add","asc","collation","desc","final","first","last","view"],m=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],g=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],x=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],y=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],v=g,k=[...m,...h].filter($=>!g.includes($)),E={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},S={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},N={match:t.concat(/\b/,t.either(...v),/\s*\(/),relevance:0,keywords:{built_in:v}};function O($){return t.concat(/\b/,t.either(...$.map(j=>j.replace(/\s+/,"\\s+"))),/\b/)}const T={scope:"keyword",match:O(y),relevance:0};function P($,{exceptions:j,when:G}={}){const A=G;return j=j||[],$.map(ie=>ie.match(/\|\d+$/)||j.includes(ie)?ie:A(ie)?`${ie}|0`:ie)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:P(k,{when:$=>$.length<3}),literal:o,type:f,built_in:x},contains:[{scope:"type",match:O(c)},T,N,E,a,l,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,r,S]}}function Mw(e){return e?typeof e=="string"?e:e.source:null}function to(e){return Kt("(?=",e,")")}function Kt(...e){return e.map(r=>Mw(r)).join("")}function OI(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function Gn(...e){return"("+(OI(e).capture?"":"?:")+e.map(a=>Mw(a)).join("|")+")"}const xp=e=>Kt(/\b/,e,/\w$/.test(e)?/\b/:/\B/),MI=["Protocol","Type"].map(xp),ov=["init","self"].map(xp),jI=["Any","Self"],Ph=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],cv=["false","nil","true"],DI=["assignment","associativity","higherThan","left","lowerThan","none","right"],LI=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],uv=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],jw=Gn(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),Dw=Gn(jw,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),Hh=Kt(jw,Dw,"*"),Lw=Gn(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),Iu=Gn(Lw,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),Jr=Kt(Lw,Iu,"*"),fu=Kt(/[A-Z]/,Iu,"*"),II=["attached","autoclosure",Kt(/convention\(/,Gn("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",Kt(/objc\(/,Jr,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],BI=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function UI(e){const t={match:/\s+/,relevance:0},r=e.COMMENT("/\\*","\\*/",{contains:["self"]}),a=[e.C_LINE_COMMENT_MODE,r],l={match:[/\./,Gn(...MI,...ov)],className:{2:"keyword"}},o={match:Kt(/\./,Gn(...Ph)),relevance:0},c=Ph.filter(ot=>typeof ot=="string").concat(["_|0"]),f=Ph.filter(ot=>typeof ot!="string").concat(jI).map(xp),h={variants:[{className:"keyword",match:Gn(...f,...ov)}]},m={$pattern:Gn(/\b\w+/,/#\w+/),keyword:c.concat(LI),literal:cv},g=[l,o,h],x={match:Kt(/\./,Gn(...uv)),relevance:0},y={className:"built_in",match:Kt(/\b/,Gn(...uv),/(?=\()/)},v=[x,y],k={match:/->/,relevance:0},E={className:"operator",relevance:0,variants:[{match:Hh},{match:`\\.(\\.|${Dw})+`}]},S=[k,E],N="([0-9]_*)+",O="([0-9a-fA-F]_*)+",T={className:"number",relevance:0,variants:[{match:`\\b(${N})(\\.(${N}))?([eE][+-]?(${N}))?\\b`},{match:`\\b0x(${O})(\\.(${O}))?([pP][+-]?(${N}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},P=(ot="")=>({className:"subst",variants:[{match:Kt(/\\/,ot,/[0\\tnr"']/)},{match:Kt(/\\/,ot,/u\{[0-9a-fA-F]{1,8}\}/)}]}),$=(ot="")=>({className:"subst",match:Kt(/\\/,ot,/[\t ]*(?:[\r\n]|\r\n)/)}),j=(ot="")=>({className:"subst",label:"interpol",begin:Kt(/\\/,ot,/\(/),end:/\)/}),G=(ot="")=>({begin:Kt(ot,/"""/),end:Kt(/"""/,ot),contains:[P(ot),$(ot),j(ot)]}),A=(ot="")=>({begin:Kt(ot,/"/),end:Kt(/"/,ot),contains:[P(ot),j(ot)]}),ie={className:"string",variants:[G(),G("#"),G("##"),G("###"),A(),A("#"),A("##"),A("###")]},F=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],ee={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:F},te=ot=>{const _n=Kt(ot,/\//),Yn=Kt(/\//,ot);return{begin:_n,end:Yn,contains:[...F,{scope:"comment",begin:`#(?!.*${Yn})`,end:/$/}]}},we={scope:"regexp",variants:[te("###"),te("##"),te("#"),ee]},se={match:Kt(/`/,Jr,/`/)},Q={className:"variable",match:/\$\d+/},M={className:"variable",match:`\\$${Iu}+`},Y=[se,Q,M],V={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:BI,contains:[...S,T,ie]}]}},fe={scope:"keyword",match:Kt(/@/,Gn(...II),to(Gn(/\(/,/\s+/)))},R={scope:"meta",match:Kt(/@/,Jr)},D=[V,fe,R],B={match:to(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:Kt(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,Iu,"+")},{className:"type",match:fu,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:Kt(/\s+&\s+/,to(fu)),relevance:0}]},z={begin:/</,end:/>/,keywords:m,contains:[...a,...g,...D,k,B]};B.contains.push(z);const ue={match:Kt(Jr,/\s*:/),keywords:"_|0",relevance:0},be={begin:/\(/,end:/\)/,relevance:0,keywords:m,contains:["self",ue,...a,we,...g,...v,...S,T,ie,...Y,...D,B]},ye={begin:/</,end:/>/,keywords:"repeat each",contains:[...a,B]},le={begin:Gn(to(Kt(Jr,/\s*:/)),to(Kt(Jr,/\s+/,Jr,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:Jr}]},xe={begin:/\(/,end:/\)/,keywords:m,contains:[le,...a,...g,...S,T,ie,...D,B,be],endsParent:!0,illegal:/["']/},pe={match:[/(func|macro)/,/\s+/,Gn(se.match,Jr,Hh)],className:{1:"keyword",3:"title.function"},contains:[ye,xe,t],illegal:[/\[/,/%/]},Ue={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[ye,xe,t],illegal:/\[|%/},Ae={match:[/operator/,/\s+/,Hh],className:{1:"keyword",3:"title"}},Tt={begin:[/precedencegroup/,/\s+/,fu],className:{1:"keyword",3:"title"},contains:[B],keywords:[...DI,...cv],end:/}/},tt={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},gt={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},_t={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,Jr,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:m,contains:[ye,...g,{begin:/:/,end:/\{/,keywords:m,contains:[{scope:"title.class.inherited",match:fu},...g],relevance:0}]};for(const ot of ie.variants){const _n=ot.contains.find(br=>br.label==="interpol");_n.keywords=m;const Yn=[...g,...v,...S,T,ie,...Y];_n.contains=[...Yn,{begin:/\(/,end:/\)/,contains:["self",...Yn]}]}return{name:"Swift",keywords:m,contains:[...a,pe,Ue,tt,gt,_t,Ae,Tt,{beginKeywords:"import",end:/$/,contains:[...a],relevance:0},we,...g,...v,...S,T,ie,...Y,...D,B,be]}}const Bu="[A-Za-z$_][0-9A-Za-z$_]*",Iw=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],Bw=["true","false","null","undefined","NaN","Infinity"],Uw=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],Fw=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Pw=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Hw=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],qw=[].concat(Pw,Uw,Fw);function FI(e){const t=e.regex,r=(V,{after:fe})=>{const R="</"+V[0].slice(1);return V.input.indexOf(R,fe)!==-1},a=Bu,l={begin:"<>",end:"</>"},o=/<[A-Za-z0-9\\._:-]+\s*\/>/,c={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(V,fe)=>{const R=V[0].length+V.index,D=V.input[R];if(D==="<"||D===","){fe.ignoreMatch();return}D===">"&&(r(V,{after:R})||fe.ignoreMatch());let B;const z=V.input.substring(R);if(B=z.match(/^\s*=/)){fe.ignoreMatch();return}if((B=z.match(/^\s+extends\s+/))&&B.index===0){fe.ignoreMatch();return}}},f={$pattern:Bu,keyword:Iw,literal:Bw,built_in:qw,"variable.language":Hw},h="[0-9](_?[0-9])*",m=`\\.(${h})`,g="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",x={className:"number",variants:[{begin:`(\\b(${g})((${m})|\\.)?|(${m}))[eE][+-]?(${h})\\b`},{begin:`\\b(${g})\\b((${m})\\b|\\.)?|(${m})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},y={className:"subst",begin:"\\$\\{",end:"\\}",keywords:f,contains:[]},v={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,y],subLanguage:"xml"}},k={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,y],subLanguage:"css"}},E={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,y],subLanguage:"graphql"}},S={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,y]},O={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:a+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},T=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,v,k,E,S,{match:/\$\d+/},x];y.contains=T.concat({begin:/\{/,end:/\}/,keywords:f,contains:["self"].concat(T)});const P=[].concat(O,y.contains),$=P.concat([{begin:/(\s*)\(/,end:/\)/,keywords:f,contains:["self"].concat(P)}]),j={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:$},G={variants:[{match:[/class/,/\s+/,a,/\s+/,/extends/,/\s+/,t.concat(a,"(",t.concat(/\./,a),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,a],scope:{1:"keyword",3:"title.class"}}]},A={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...Uw,...Fw]}},ie={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},F={variants:[{match:[/function/,/\s+/,a,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[j],illegal:/%/},ee={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function te(V){return t.concat("(?!",V.join("|"),")")}const we={match:t.concat(/\b/,te([...Pw,"super","import"].map(V=>`${V}\\s*\\(`)),a,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},se={begin:t.concat(/\./,t.lookahead(t.concat(a,/(?![0-9A-Za-z$_(])/))),end:a,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},Q={match:[/get|set/,/\s+/,a,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},j]},M="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",Y={match:[/const|var|let/,/\s+/,a,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(M)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[j]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:f,exports:{PARAMS_CONTAINS:$,CLASS_REFERENCE:A},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),ie,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,v,k,E,S,O,{match:/\$\d+/},x,A,{scope:"attr",match:a+t.lookahead(":"),relevance:0},Y,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[O,e.REGEXP_MODE,{className:"function",begin:M,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:$}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:l.begin,end:l.end},{match:o},{begin:c.begin,"on:begin":c.isTrulyOpeningTag,end:c.end}],subLanguage:"xml",contains:[{begin:c.begin,end:c.end,skip:!0,contains:["self"]}]}]},F,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[j,e.inherit(e.TITLE_MODE,{begin:a,className:"title.function"})]},{match:/\.\.\./,relevance:0},se,{match:"\\$"+a,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[j]},we,ee,G,Q,{match:/\$[(.]/}]}}function PI(e){const t=e.regex,r=FI(e),a=Bu,l=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],o={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},c={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:l},contains:[r.exports.CLASS_REFERENCE]},f={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},h=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],m={$pattern:Bu,keyword:Iw.concat(h),literal:Bw,built_in:qw.concat(l),"variable.language":Hw},g={className:"meta",begin:"@"+a},x=(E,S,N)=>{const O=E.contains.findIndex(T=>T.label===S);if(O===-1)throw new Error("can not find mode to replace");E.contains.splice(O,1,N)};Object.assign(r.keywords,m),r.exports.PARAMS_CONTAINS.push(g);const y=r.contains.find(E=>E.scope==="attr"),v=Object.assign({},y,{match:t.concat(a,t.lookahead(/\s*\?:/))});r.exports.PARAMS_CONTAINS.push([r.exports.CLASS_REFERENCE,y,v]),r.contains=r.contains.concat([g,o,c,v]),x(r,"shebang",e.SHEBANG()),x(r,"use_strict",f);const k=r.contains.find(E=>E.label==="func.def");return k.relevance=0,Object.assign(r,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),r}function HI(e){const t=e.regex,r={className:"string",begin:/"(""|[^/n])"C\b/},a={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},l=/\d{1,2}\/\d{1,2}\/\d{4}/,o=/\d{4}-\d{1,2}-\d{1,2}/,c=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,f=/\d{1,2}(:\d{1,2}){1,2}/,h={className:"literal",variants:[{begin:t.concat(/# */,t.either(o,l),/ *#/)},{begin:t.concat(/# */,f,/ *#/)},{begin:t.concat(/# */,c,/ *#/)},{begin:t.concat(/# */,t.either(o,l),/ +/,t.either(c,f),/ *#/)}]},m={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},g={className:"label",begin:/^\w+:/},x=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),y=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[r,a,h,m,g,x,y,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[y]}]}}function qI(e){e.regex;const t=e.COMMENT(/\(;/,/;\)/);t.contains.push("self");const r=e.COMMENT(/;;/,/$/),a=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],l={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},o={className:"variable",begin:/\$[\w_]+/},c={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},f={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},h={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},m={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:a},contains:[r,t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},o,c,l,e.QUOTE_STRING_MODE,h,m,f]}}function $I(e){const t=e.regex,r=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),a=/[\p{L}0-9._:-]+/u,l={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},o={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},c=e.inherit(o,{begin:/\(/,end:/\)/}),f=e.inherit(e.APOS_STRING_MODE,{className:"string"}),h=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),m={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:a,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[l]},{begin:/'/,end:/'/,contains:[l]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[o,h,f,c,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[o,c,h,f]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},l,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[h]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[m],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[m],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(/</,t.lookahead(t.concat(r,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:r,relevance:0,starts:m}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(r,/>/))),contains:[{className:"name",begin:r,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function GI(e){const t="true false yes no null",r="[\\w#;/?:@&=+$,.~*'()[\\]]+",a={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},l={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},o={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},c={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,l]},f=e.inherit(c,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),y={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},v={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},k={begin:/\{/,end:/\}/,contains:[v],illegal:"\\n",relevance:0},E={begin:"\\[",end:"\\]",contains:[v],illegal:"\\n",relevance:0},S=[a,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+r},{className:"type",begin:"!<"+r+">"},{className:"type",begin:"!"+r},{className:"type",begin:"!!"+r},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},y,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},k,E,o,c],N=[...S];return N.pop(),N.push(f),v.contains=N,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:S}}const KI={arduino:zL,bash:CL,c:TL,cpp:RL,csharp:AL,css:FL,diff:PL,go:HL,graphql:qL,ini:$L,java:GL,javascript:XL,json:ZL,kotlin:JL,less:lI,lua:oI,makefile:cI,markdown:uI,objectivec:dI,perl:fI,php:hI,"php-template":mI,plaintext:pI,python:gI,"python-repl":bI,r:xI,ruby:yI,rust:vI,scss:TI,shell:RI,sql:AI,swift:UI,typescript:PI,vbnet:HI,wasm:qI,xml:$I,yaml:GI};var qh,dv;function VI(){if(dv)return qh;dv=1;function e(U){return U instanceof Map?U.clear=U.delete=U.set=function(){throw new Error("map is read-only")}:U instanceof Set&&(U.add=U.clear=U.delete=function(){throw new Error("set is read-only")}),Object.freeze(U),Object.getOwnPropertyNames(U).forEach(ce=>{const ze=U[ce],Qe=typeof ze;(Qe==="object"||Qe==="function")&&!Object.isFrozen(ze)&&e(ze)}),U}class t{constructor(ce){ce.data===void 0&&(ce.data={}),this.data=ce.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function r(U){return U.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function a(U,...ce){const ze=Object.create(null);for(const Qe in U)ze[Qe]=U[Qe];return ce.forEach(function(Qe){for(const Lt in Qe)ze[Lt]=Qe[Lt]}),ze}const l="</span>",o=U=>!!U.scope,c=(U,{prefix:ce})=>{if(U.startsWith("language:"))return U.replace("language:","language-");if(U.includes(".")){const ze=U.split(".");return[`${ce}${ze.shift()}`,...ze.map((Qe,Lt)=>`${Qe}${"_".repeat(Lt+1)}`)].join(" ")}return`${ce}${U}`};class f{constructor(ce,ze){this.buffer="",this.classPrefix=ze.classPrefix,ce.walk(this)}addText(ce){this.buffer+=r(ce)}openNode(ce){if(!o(ce))return;const ze=c(ce.scope,{prefix:this.classPrefix});this.span(ze)}closeNode(ce){o(ce)&&(this.buffer+=l)}value(){return this.buffer}span(ce){this.buffer+=`<span class="${ce}">`}}const h=(U={})=>{const ce={children:[]};return Object.assign(ce,U),ce};class m{constructor(){this.rootNode=h(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(ce){this.top.children.push(ce)}openNode(ce){const ze=h({scope:ce});this.add(ze),this.stack.push(ze)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(ce){return this.constructor._walk(ce,this.rootNode)}static _walk(ce,ze){return typeof ze=="string"?ce.addText(ze):ze.children&&(ce.openNode(ze),ze.children.forEach(Qe=>this._walk(ce,Qe)),ce.closeNode(ze)),ce}static _collapse(ce){typeof ce!="string"&&ce.children&&(ce.children.every(ze=>typeof ze=="string")?ce.children=[ce.children.join("")]:ce.children.forEach(ze=>{m._collapse(ze)}))}}class g extends m{constructor(ce){super(),this.options=ce}addText(ce){ce!==""&&this.add(ce)}startScope(ce){this.openNode(ce)}endScope(){this.closeNode()}__addSublanguage(ce,ze){const Qe=ce.root;ze&&(Qe.scope=`language:${ze}`),this.add(Qe)}toHTML(){return new f(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function x(U){return U?typeof U=="string"?U:U.source:null}function y(U){return E("(?=",U,")")}function v(U){return E("(?:",U,")*")}function k(U){return E("(?:",U,")?")}function E(...U){return U.map(ze=>x(ze)).join("")}function S(U){const ce=U[U.length-1];return typeof ce=="object"&&ce.constructor===Object?(U.splice(U.length-1,1),ce):{}}function N(...U){return"("+(S(U).capture?"":"?:")+U.map(Qe=>x(Qe)).join("|")+")"}function O(U){return new RegExp(U.toString()+"|").exec("").length-1}function T(U,ce){const ze=U&&U.exec(ce);return ze&&ze.index===0}const P=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function $(U,{joinWith:ce}){let ze=0;return U.map(Qe=>{ze+=1;const Lt=ze;let At=x(Qe),Me="";for(;At.length>0;){const Te=P.exec(At);if(!Te){Me+=At;break}Me+=At.substring(0,Te.index),At=At.substring(Te.index+Te[0].length),Te[0][0]==="\\"&&Te[1]?Me+="\\"+String(Number(Te[1])+Lt):(Me+=Te[0],Te[0]==="("&&ze++)}return Me}).map(Qe=>`(${Qe})`).join(ce)}const j=/\b\B/,G="[a-zA-Z]\\w*",A="[a-zA-Z_]\\w*",ie="\\b\\d+(\\.\\d+)?",F="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",ee="\\b(0b[01]+)",te="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",we=(U={})=>{const ce=/^#![ ]*\//;return U.binary&&(U.begin=E(ce,/.*\b/,U.binary,/\b.*/)),a({scope:"meta",begin:ce,end:/$/,relevance:0,"on:begin":(ze,Qe)=>{ze.index!==0&&Qe.ignoreMatch()}},U)},se={begin:"\\\\[\\s\\S]",relevance:0},Q={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[se]},M={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[se]},Y={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},V=function(U,ce,ze={}){const Qe=a({scope:"comment",begin:U,end:ce,contains:[]},ze);Qe.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const Lt=N("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return Qe.contains.push({begin:E(/[ ]+/,"(",Lt,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),Qe},fe=V("//","$"),R=V("/\\*","\\*/"),D=V("#","$"),B={scope:"number",begin:ie,relevance:0},z={scope:"number",begin:F,relevance:0},ue={scope:"number",begin:ee,relevance:0},be={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[se,{begin:/\[/,end:/\]/,relevance:0,contains:[se]}]},ye={scope:"title",begin:G,relevance:0},le={scope:"title",begin:A,relevance:0},xe={begin:"\\.\\s*"+A,relevance:0};var Ue=Object.freeze({__proto__:null,APOS_STRING_MODE:Q,BACKSLASH_ESCAPE:se,BINARY_NUMBER_MODE:ue,BINARY_NUMBER_RE:ee,COMMENT:V,C_BLOCK_COMMENT_MODE:R,C_LINE_COMMENT_MODE:fe,C_NUMBER_MODE:z,C_NUMBER_RE:F,END_SAME_AS_BEGIN:function(U){return Object.assign(U,{"on:begin":(ce,ze)=>{ze.data._beginMatch=ce[1]},"on:end":(ce,ze)=>{ze.data._beginMatch!==ce[1]&&ze.ignoreMatch()}})},HASH_COMMENT_MODE:D,IDENT_RE:G,MATCH_NOTHING_RE:j,METHOD_GUARD:xe,NUMBER_MODE:B,NUMBER_RE:ie,PHRASAL_WORDS_MODE:Y,QUOTE_STRING_MODE:M,REGEXP_MODE:be,RE_STARTERS_RE:te,SHEBANG:we,TITLE_MODE:ye,UNDERSCORE_IDENT_RE:A,UNDERSCORE_TITLE_MODE:le});function Ae(U,ce){U.input[U.index-1]==="."&&ce.ignoreMatch()}function Tt(U,ce){U.className!==void 0&&(U.scope=U.className,delete U.className)}function tt(U,ce){ce&&U.beginKeywords&&(U.begin="\\b("+U.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",U.__beforeBegin=Ae,U.keywords=U.keywords||U.beginKeywords,delete U.beginKeywords,U.relevance===void 0&&(U.relevance=0))}function gt(U,ce){Array.isArray(U.illegal)&&(U.illegal=N(...U.illegal))}function _t(U,ce){if(U.match){if(U.begin||U.end)throw new Error("begin & end are not supported with match");U.begin=U.match,delete U.match}}function ot(U,ce){U.relevance===void 0&&(U.relevance=1)}const _n=(U,ce)=>{if(!U.beforeMatch)return;if(U.starts)throw new Error("beforeMatch cannot be used with starts");const ze=Object.assign({},U);Object.keys(U).forEach(Qe=>{delete U[Qe]}),U.keywords=ze.keywords,U.begin=E(ze.beforeMatch,y(ze.begin)),U.starts={relevance:0,contains:[Object.assign(ze,{endsParent:!0})]},U.relevance=0,delete ze.beforeMatch},Yn=["of","and","for","in","not","or","if","then","parent","list","value"],br="keyword";function xr(U,ce,ze=br){const Qe=Object.create(null);return typeof U=="string"?Lt(ze,U.split(" ")):Array.isArray(U)?Lt(ze,U):Object.keys(U).forEach(function(At){Object.assign(Qe,xr(U[At],ce,At))}),Qe;function Lt(At,Me){ce&&(Me=Me.map(Te=>Te.toLowerCase())),Me.forEach(function(Te){const Ve=Te.split("|");Qe[Ve[0]]=[At,oi(Ve[0],Ve[1])]})}}function oi(U,ce){return ce?Number(ce):wa(U)?0:1}function wa(U){return Yn.includes(U.toLowerCase())}const Li={},Wt=U=>{console.error(U)},Qn=(U,...ce)=>{console.log(`WARN: ${U}`,...ce)},ae=(U,ce)=>{Li[`${U}/${ce}`]||(console.log(`Deprecated as of ${U}. ${ce}`),Li[`${U}/${ce}`]=!0)},_e=new Error;function $e(U,ce,{key:ze}){let Qe=0;const Lt=U[ze],At={},Me={};for(let Te=1;Te<=ce.length;Te++)Me[Te+Qe]=Lt[Te],At[Te+Qe]=!0,Qe+=O(ce[Te-1]);U[ze]=Me,U[ze]._emit=At,U[ze]._multi=!0}function We(U){if(Array.isArray(U.begin)){if(U.skip||U.excludeBegin||U.returnBegin)throw Wt("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),_e;if(typeof U.beginScope!="object"||U.beginScope===null)throw Wt("beginScope must be object"),_e;$e(U,U.begin,{key:"beginScope"}),U.begin=$(U.begin,{joinWith:""})}}function rt(U){if(Array.isArray(U.end)){if(U.skip||U.excludeEnd||U.returnEnd)throw Wt("skip, excludeEnd, returnEnd not compatible with endScope: {}"),_e;if(typeof U.endScope!="object"||U.endScope===null)throw Wt("endScope must be object"),_e;$e(U,U.end,{key:"endScope"}),U.end=$(U.end,{joinWith:""})}}function zn(U){U.scope&&typeof U.scope=="object"&&U.scope!==null&&(U.beginScope=U.scope,delete U.scope)}function ar(U){zn(U),typeof U.beginScope=="string"&&(U.beginScope={_wrap:U.beginScope}),typeof U.endScope=="string"&&(U.endScope={_wrap:U.endScope}),We(U),rt(U)}function cn(U){function ce(Me,Te){return new RegExp(x(Me),"m"+(U.case_insensitive?"i":"")+(U.unicodeRegex?"u":"")+(Te?"g":""))}class ze{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(Te,Ve){Ve.position=this.position++,this.matchIndexes[this.matchAt]=Ve,this.regexes.push([Ve,Te]),this.matchAt+=O(Te)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const Te=this.regexes.map(Ve=>Ve[1]);this.matcherRe=ce($(Te,{joinWith:"|"}),!0),this.lastIndex=0}exec(Te){this.matcherRe.lastIndex=this.lastIndex;const Ve=this.matcherRe.exec(Te);if(!Ve)return null;const L=Ve.findIndex((W,me)=>me>0&&W!==void 0),H=this.matchIndexes[L];return Ve.splice(0,L),Object.assign(Ve,H)}}class Qe{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(Te){if(this.multiRegexes[Te])return this.multiRegexes[Te];const Ve=new ze;return this.rules.slice(Te).forEach(([L,H])=>Ve.addRule(L,H)),Ve.compile(),this.multiRegexes[Te]=Ve,Ve}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(Te,Ve){this.rules.push([Te,Ve]),Ve.type==="begin"&&this.count++}exec(Te){const Ve=this.getMatcher(this.regexIndex);Ve.lastIndex=this.lastIndex;let L=Ve.exec(Te);if(this.resumingScanAtSamePosition()&&!(L&&L.index===this.lastIndex)){const H=this.getMatcher(0);H.lastIndex=this.lastIndex+1,L=H.exec(Te)}return L&&(this.regexIndex+=L.position+1,this.regexIndex===this.count&&this.considerAll()),L}}function Lt(Me){const Te=new Qe;return Me.contains.forEach(Ve=>Te.addRule(Ve.begin,{rule:Ve,type:"begin"})),Me.terminatorEnd&&Te.addRule(Me.terminatorEnd,{type:"end"}),Me.illegal&&Te.addRule(Me.illegal,{type:"illegal"}),Te}function At(Me,Te){const Ve=Me;if(Me.isCompiled)return Ve;[Tt,_t,ar,_n].forEach(H=>H(Me,Te)),U.compilerExtensions.forEach(H=>H(Me,Te)),Me.__beforeBegin=null,[tt,gt,ot].forEach(H=>H(Me,Te)),Me.isCompiled=!0;let L=null;return typeof Me.keywords=="object"&&Me.keywords.$pattern&&(Me.keywords=Object.assign({},Me.keywords),L=Me.keywords.$pattern,delete Me.keywords.$pattern),L=L||/\w+/,Me.keywords&&(Me.keywords=xr(Me.keywords,U.case_insensitive)),Ve.keywordPatternRe=ce(L,!0),Te&&(Me.begin||(Me.begin=/\B|\b/),Ve.beginRe=ce(Ve.begin),!Me.end&&!Me.endsWithParent&&(Me.end=/\B|\b/),Me.end&&(Ve.endRe=ce(Ve.end)),Ve.terminatorEnd=x(Ve.end)||"",Me.endsWithParent&&Te.terminatorEnd&&(Ve.terminatorEnd+=(Me.end?"|":"")+Te.terminatorEnd)),Me.illegal&&(Ve.illegalRe=ce(Me.illegal)),Me.contains||(Me.contains=[]),Me.contains=[].concat(...Me.contains.map(function(H){return Qt(H==="self"?Me:H)})),Me.contains.forEach(function(H){At(H,Ve)}),Me.starts&&At(Me.starts,Te),Ve.matcher=Lt(Ve),Ve}if(U.compilerExtensions||(U.compilerExtensions=[]),U.contains&&U.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return U.classNameAliases=a(U.classNameAliases||{}),At(U)}function rn(U){return U?U.endsWithParent||rn(U.starts):!1}function Qt(U){return U.variants&&!U.cachedVariants&&(U.cachedVariants=U.variants.map(function(ce){return a(U,{variants:null},ce)})),U.cachedVariants?U.cachedVariants:rn(U)?a(U,{starts:U.starts?a(U.starts):null}):Object.isFrozen(U)?a(U):U}var Rt="11.11.1";class sr extends Error{constructor(ce,ze){super(ce),this.name="HTMLInjectionError",this.html=ze}}const Cn=r,es=a,Kr=Symbol("nomatch"),Lr=7,Vr=function(U){const ce=Object.create(null),ze=Object.create(null),Qe=[];let Lt=!0;const At="Could not find the language '{}', did you forget to load/include a language module?",Me={disableAutodetect:!0,name:"Plain text",contains:[]};let Te={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:g};function Ve(ge){return Te.noHighlightRe.test(ge)}function L(ge){let Be=ge.className+" ";Be+=ge.parentNode?ge.parentNode.className:"";const Je=Te.languageDetectRe.exec(Be);if(Je){const St=Nt(Je[1]);return St||(Qn(At.replace("{}",Je[1])),Qn("Falling back to no-highlight mode for this block.",ge)),St?Je[1]:"no-highlight"}return Be.split(/\s+/).find(St=>Ve(St)||Nt(St))}function H(ge,Be,Je){let St="",Xt="";typeof Be=="object"?(St=ge,Je=Be.ignoreIllegals,Xt=Be.language):(ae("10.7.0","highlight(lang, code, ...args) has been deprecated."),ae("10.7.0",`Please use highlight(code, options) instead.
561
+ https://github.com/highlightjs/highlight.js/issues/2277`),Xt=ge,St=Be),Je===void 0&&(Je=!0);const Xe={code:St,language:Xt};Un("before:highlight",Xe);const It=Xe.result?Xe.result:W(Xe.language,Xe.code,Je);return It.code=Xe.code,Un("after:highlight",It),It}function W(ge,Be,Je,St){const Xt=Object.create(null);function Xe(Se,Fe){return Se.keywords[Fe]}function It(){if(!Ze.keywords){pn.addText(Ut);return}let Se=0;Ze.keywordPatternRe.lastIndex=0;let Fe=Ze.keywordPatternRe.exec(Ut),nt="";for(;Fe;){nt+=Ut.substring(Se,Fe.index);const xt=On.case_insensitive?Fe[0].toLowerCase():Fe[0],sn=Xe(Ze,xt);if(sn){const[yr,nl]=sn;if(pn.addText(nt),nt="",Xt[xt]=(Xt[xt]||0)+1,Xt[xt]<=Lr&&(Ii+=nl),yr.startsWith("_"))nt+=Fe[0];else{const Po=On.classNameAliases[yr]||yr;bt(Fe[0],Po)}}else nt+=Fe[0];Se=Ze.keywordPatternRe.lastIndex,Fe=Ze.keywordPatternRe.exec(Ut)}nt+=Ut.substring(Se),pn.addText(nt)}function dn(){if(Ut==="")return;let Se=null;if(typeof Ze.subLanguage=="string"){if(!ce[Ze.subLanguage]){pn.addText(Ut);return}Se=W(Ze.subLanguage,Ut,!0,Fo[Ze.subLanguage]),Fo[Ze.subLanguage]=Se._top}else Se=ve(Ut,Ze.subLanguage.length?Ze.subLanguage:null);Ze.relevance>0&&(Ii+=Se.relevance),pn.__addSublanguage(Se._emitter,Se.language)}function zt(){Ze.subLanguage!=null?dn():It(),Ut=""}function bt(Se,Fe){Se!==""&&(pn.startScope(Fe),pn.addText(Se),pn.endScope())}function ci(Se,Fe){let nt=1;const xt=Fe.length-1;for(;nt<=xt;){if(!Se._emit[nt]){nt++;continue}const sn=On.classNameAliases[Se[nt]]||Se[nt],yr=Fe[nt];sn?bt(yr,sn):(Ut=yr,It(),Ut=""),nt++}}function ui(Se,Fe){return Se.scope&&typeof Se.scope=="string"&&pn.openNode(On.classNameAliases[Se.scope]||Se.scope),Se.beginScope&&(Se.beginScope._wrap?(bt(Ut,On.classNameAliases[Se.beginScope._wrap]||Se.beginScope._wrap),Ut=""):Se.beginScope._multi&&(ci(Se.beginScope,Fe),Ut="")),Ze=Object.create(Se,{parent:{value:Ze}}),Ze}function _a(Se,Fe,nt){let xt=T(Se.endRe,nt);if(xt){if(Se["on:end"]){const sn=new t(Se);Se["on:end"](Fe,sn),sn.isMatchIgnored&&(xt=!1)}if(xt){for(;Se.endsParent&&Se.parent;)Se=Se.parent;return Se}}if(Se.endsWithParent)return _a(Se.parent,Fe,nt)}function ts(Se){return Ze.matcher.regexIndex===0?(Ut+=Se[0],1):(Bi=!0,0)}function td(Se){const Fe=Se[0],nt=Se.rule,xt=new t(nt),sn=[nt.__beforeBegin,nt["on:begin"]];for(const yr of sn)if(yr&&(yr(Se,xt),xt.isMatchIgnored))return ts(Fe);return nt.skip?Ut+=Fe:(nt.excludeBegin&&(Ut+=Fe),zt(),!nt.returnBegin&&!nt.excludeBegin&&(Ut=Fe)),ui(nt,Se),nt.returnBegin?0:Fe.length}function Xn(Se){const Fe=Se[0],nt=Be.substring(Se.index),xt=_a(Ze,Se,nt);if(!xt)return Kr;const sn=Ze;Ze.endScope&&Ze.endScope._wrap?(zt(),bt(Fe,Ze.endScope._wrap)):Ze.endScope&&Ze.endScope._multi?(zt(),ci(Ze.endScope,Se)):sn.skip?Ut+=Fe:(sn.returnEnd||sn.excludeEnd||(Ut+=Fe),zt(),sn.excludeEnd&&(Ut=Fe));do Ze.scope&&pn.closeNode(),!Ze.skip&&!Ze.subLanguage&&(Ii+=Ze.relevance),Ze=Ze.parent;while(Ze!==xt.parent);return xt.starts&&ui(xt.starts,Se),sn.returnEnd?0:Fe.length}function el(){const Se=[];for(let Fe=Ze;Fe!==On;Fe=Fe.parent)Fe.scope&&Se.unshift(Fe.scope);Se.forEach(Fe=>pn.openNode(Fe))}let Ea={};function ns(Se,Fe){const nt=Fe&&Fe[0];if(Ut+=Se,nt==null)return zt(),0;if(Ea.type==="begin"&&Fe.type==="end"&&Ea.index===Fe.index&&nt===""){if(Ut+=Be.slice(Fe.index,Fe.index+1),!Lt){const xt=new Error(`0 width match regex (${ge})`);throw xt.languageName=ge,xt.badRule=Ea.rule,xt}return 1}if(Ea=Fe,Fe.type==="begin")return td(Fe);if(Fe.type==="illegal"&&!Je){const xt=new Error('Illegal lexeme "'+nt+'" for mode "'+(Ze.scope||"<unnamed>")+'"');throw xt.mode=Ze,xt}else if(Fe.type==="end"){const xt=Xn(Fe);if(xt!==Kr)return xt}if(Fe.type==="illegal"&&nt==="")return Ut+=`
562
+ `,1;if(tl>1e5&&tl>Fe.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Ut+=nt,nt.length}const On=Nt(ge);if(!On)throw Wt(At.replace("{}",ge)),new Error('Unknown language: "'+ge+'"');const Uo=cn(On);let rs="",Ze=St||Uo;const Fo={},pn=new Te.__emitter(Te);el();let Ut="",Ii=0,di=0,tl=0,Bi=!1;try{if(On.__emitTokens)On.__emitTokens(Be,pn);else{for(Ze.matcher.considerAll();;){tl++,Bi?Bi=!1:Ze.matcher.considerAll(),Ze.matcher.lastIndex=di;const Se=Ze.matcher.exec(Be);if(!Se)break;const Fe=Be.substring(di,Se.index),nt=ns(Fe,Se);di=Se.index+nt}ns(Be.substring(di))}return pn.finalize(),rs=pn.toHTML(),{language:ge,value:rs,relevance:Ii,illegal:!1,_emitter:pn,_top:Ze}}catch(Se){if(Se.message&&Se.message.includes("Illegal"))return{language:ge,value:Cn(Be),illegal:!0,relevance:0,_illegalBy:{message:Se.message,index:di,context:Be.slice(di-100,di+100),mode:Se.mode,resultSoFar:rs},_emitter:pn};if(Lt)return{language:ge,value:Cn(Be),illegal:!1,relevance:0,errorRaised:Se,_emitter:pn,_top:Ze};throw Se}}function me(ge){const Be={value:Cn(ge),illegal:!1,relevance:0,_top:Me,_emitter:new Te.__emitter(Te)};return Be._emitter.addText(ge),Be}function ve(ge,Be){Be=Be||Te.languages||Object.keys(ce);const Je=me(ge),St=Be.filter(Nt).filter(ft).map(zt=>W(zt,ge,!1));St.unshift(Je);const Xt=St.sort((zt,bt)=>{if(zt.relevance!==bt.relevance)return bt.relevance-zt.relevance;if(zt.language&&bt.language){if(Nt(zt.language).supersetOf===bt.language)return 1;if(Nt(bt.language).supersetOf===zt.language)return-1}return 0}),[Xe,It]=Xt,dn=Xe;return dn.secondBest=It,dn}function Oe(ge,Be,Je){const St=Be&&ze[Be]||Je;ge.classList.add("hljs"),ge.classList.add(`language-${St}`)}function Ee(ge){let Be=null;const Je=L(ge);if(Ve(Je))return;if(Un("before:highlightElement",{el:ge,language:Je}),ge.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",ge);return}if(ge.children.length>0&&(Te.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(ge)),Te.throwUnescapedHTML))throw new sr("One of your code blocks includes unescaped HTML.",ge.innerHTML);Be=ge;const St=Be.textContent,Xt=Je?H(St,{language:Je,ignoreIllegals:!0}):ve(St);ge.innerHTML=Xt.value,ge.dataset.highlighted="yes",Oe(ge,Je,Xt.language),ge.result={language:Xt.language,re:Xt.relevance,relevance:Xt.relevance},Xt.secondBest&&(ge.secondBest={language:Xt.secondBest.language,relevance:Xt.secondBest.relevance}),Un("after:highlightElement",{el:ge,result:Xt,text:St})}function Ce(ge){Te=es(Te,ge)}const Re=()=>{Ie(),ae("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function He(){Ie(),ae("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let qe=!1;function Ie(){function ge(){Ie()}if(document.readyState==="loading"){qe||window.addEventListener("DOMContentLoaded",ge,!1),qe=!0;return}document.querySelectorAll(Te.cssSelector).forEach(Ee)}function Et(ge,Be){let Je=null;try{Je=Be(U)}catch(St){if(Wt("Language definition for '{}' could not be registered.".replace("{}",ge)),Lt)Wt(St);else throw St;Je=Me}Je.name||(Je.name=ge),ce[ge]=Je,Je.rawDefinition=Be.bind(null,U),Je.aliases&&Jt(Je.aliases,{languageName:ge})}function lt(ge){delete ce[ge];for(const Be of Object.keys(ze))ze[Be]===ge&&delete ze[Be]}function Bt(){return Object.keys(ce)}function Nt(ge){return ge=(ge||"").toLowerCase(),ce[ge]||ce[ze[ge]]}function Jt(ge,{languageName:Be}){typeof ge=="string"&&(ge=[ge]),ge.forEach(Je=>{ze[Je.toLowerCase()]=Be})}function ft(ge){const Be=Nt(ge);return Be&&!Be.disableAutodetect}function un(ge){ge["before:highlightBlock"]&&!ge["before:highlightElement"]&&(ge["before:highlightElement"]=Be=>{ge["before:highlightBlock"](Object.assign({block:Be.el},Be))}),ge["after:highlightBlock"]&&!ge["after:highlightElement"]&&(ge["after:highlightElement"]=Be=>{ge["after:highlightBlock"](Object.assign({block:Be.el},Be))})}function Ht(ge){un(ge),Qe.push(ge)}function Yr(ge){const Be=Qe.indexOf(ge);Be!==-1&&Qe.splice(Be,1)}function Un(ge,Be){const Je=ge;Qe.forEach(function(St){St[Je]&&St[Je](Be)})}function mn(ge){return ae("10.7.0","highlightBlock will be removed entirely in v12.0"),ae("10.7.0","Please use highlightElement now."),Ee(ge)}Object.assign(U,{highlight:H,highlightAuto:ve,highlightAll:Ie,highlightElement:Ee,highlightBlock:mn,configure:Ce,initHighlighting:Re,initHighlightingOnLoad:He,registerLanguage:Et,unregisterLanguage:lt,listLanguages:Bt,getLanguage:Nt,registerAliases:Jt,autoDetection:ft,inherit:es,addPlugin:Ht,removePlugin:Yr}),U.debugMode=function(){Lt=!1},U.safeMode=function(){Lt=!0},U.versionString=Rt,U.regex={concat:E,lookahead:y,either:N,optional:k,anyNumberOfTimes:v};for(const ge in Ue)typeof Ue[ge]=="object"&&e(Ue[ge]);return Object.assign(U,Ue),U},Tn=Vr({});return Tn.newInstance=()=>Vr({}),qh=Tn,Tn.HighlightJS=Tn,Tn.default=Tn,qh}var YI=VI();const QI=Uu(YI),fv={},XI="hljs-";function ZI(e){const t=QI.newInstance();return e&&o(e),{highlight:r,highlightAuto:a,listLanguages:l,register:o,registerAlias:c,registered:f};function r(h,m,g){const x=g||fv,y=typeof x.prefix=="string"?x.prefix:XI;if(!t.getLanguage(h))throw new Error("Unknown language: `"+h+"` is not registered");t.configure({__emitter:WI,classPrefix:y});const v=t.highlight(m,{ignoreIllegals:!0,language:h});if(v.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:v.errorRaised});const k=v._emitter.root,E=k.data;return E.language=v.language,E.relevance=v.relevance,k}function a(h,m){const x=(m||fv).subset||l();let y=-1,v=0,k;for(;++y<x.length;){const E=x[y];if(!t.getLanguage(E))continue;const S=r(E,h,m);S.data&&S.data.relevance!==void 0&&S.data.relevance>v&&(v=S.data.relevance,k=S)}return k||{type:"root",children:[],data:{language:void 0,relevance:v}}}function l(){return t.listLanguages()}function o(h,m){if(typeof h=="string")t.registerLanguage(h,m);else{let g;for(g in h)Object.hasOwn(h,g)&&t.registerLanguage(g,h[g])}}function c(h,m){if(typeof h=="string")t.registerAliases(typeof m=="string"?m:[...m],{languageName:h});else{let g;for(g in h)if(Object.hasOwn(h,g)){const x=h[g];t.registerAliases(typeof x=="string"?x:[...x],{languageName:g})}}}function f(h){return!!t.getLanguage(h)}}class WI{constructor(t){this.options=t,this.root={type:"root",children:[],data:{language:void 0,relevance:0}},this.stack=[this.root]}addText(t){if(t==="")return;const r=this.stack[this.stack.length-1],a=r.children[r.children.length-1];a&&a.type==="text"?a.value+=t:r.children.push({type:"text",value:t})}startScope(t){this.openNode(String(t))}endScope(){this.closeNode()}__addSublanguage(t,r){const a=this.stack[this.stack.length-1],l=t.root.children;r?a.children.push({type:"element",tagName:"span",properties:{className:[r]},children:l}):a.children.push(...l)}openNode(t){const r=this,a=t.split(".").map(function(c,f){return f?c+"_".repeat(f):r.options.classPrefix+c}),l=this.stack[this.stack.length-1],o={type:"element",tagName:"span",properties:{className:a},children:[]};l.children.push(o),this.stack.push(o)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}}const JI={};function e6(e){const t=e||JI,r=t.aliases,a=t.detect||!1,l=t.languages||KI,o=t.plainText,c=t.prefix,f=t.subset;let h="hljs";const m=ZI(l);if(r&&m.registerAlias(r),c){const g=c.indexOf("-");h=g===-1?c:c.slice(0,g)}return function(g,x){ed(g,"element",function(y,v,k){if(y.tagName!=="code"||!k||k.type!=="element"||k.tagName!=="pre")return;const E=t6(y);if(E===!1||!E&&!a||E&&o&&o.includes(E))return;Array.isArray(y.properties.className)||(y.properties.className=[]),y.properties.className.includes(h)||y.properties.className.unshift(h);const S=yL(y,{whitespace:"pre"});let N;try{N=E?m.highlight(E,S,{prefix:c}):m.highlightAuto(S,{prefix:c,subset:f})}catch(O){const T=O;if(E&&/Unknown language/.test(T.message)){x.message("Cannot highlight as `"+E+"`, it’s not registered",{ancestors:[k,y],cause:T,place:y.position,ruleId:"missing-language",source:"rehype-highlight"});return}throw T}!E&&N.data&&N.data.language&&y.properties.className.push("language-"+N.data.language),N.children.length>0&&(y.children=N.children)})}}function t6(e){const t=e.properties.className;let r=-1;if(!Array.isArray(t))return;let a;for(;++r<t.length;){const l=String(t[r]);if(l==="no-highlight"||l==="nohighlight")return!1;!a&&l.slice(0,5)==="lang-"&&(a=l.slice(5)),!a&&l.slice(0,9)==="language-"&&(a=l.slice(9))}return a}const n6={h1({node:e,className:t,...r}){return d.jsx("h1",{className:re("mt-8 mb-4 text-2xl font-semibold tracking-tight text-zinc-900 dark:text-zinc-100 first:mt-0",t),...r})},h2({node:e,className:t,...r}){return d.jsx("h2",{className:re("mt-8 mb-3 text-xl font-semibold tracking-tight text-zinc-900 dark:text-zinc-100",t),...r})},h3({node:e,className:t,...r}){return d.jsx("h3",{className:re("mt-6 mb-2 text-lg font-semibold text-zinc-900 dark:text-zinc-100",t),...r})},h4({node:e,className:t,...r}){return d.jsx("h4",{className:re("mt-4 mb-2 text-base font-semibold text-zinc-900 dark:text-zinc-100",t),...r})},p({node:e,className:t,...r}){return d.jsx("p",{className:re("mb-4 leading-7 text-zinc-700 dark:text-zinc-300 last:mb-0",t),...r})},a({node:e,className:t,...r}){return d.jsx("a",{className:re("font-medium text-blue-600 underline underline-offset-4 hover:text-blue-500 dark:text-blue-400 dark:hover:text-blue-300",t),target:"_blank",rel:"noopener noreferrer",...r})},ul({node:e,className:t,...r}){return d.jsx("ul",{className:re("mb-4 ml-6 list-disc space-y-1 text-zinc-700 dark:text-zinc-300",t),...r})},ol({node:e,className:t,...r}){return d.jsx("ol",{className:re("mb-4 ml-6 list-decimal space-y-1 text-zinc-700 dark:text-zinc-300",t),...r})},li({node:e,className:t,...r}){return d.jsx("li",{className:re("leading-7",t),...r})},blockquote({node:e,className:t,...r}){return d.jsx("blockquote",{className:re("mb-4 border-l-4 border-zinc-300 pl-4 italic text-zinc-600 dark:border-zinc-700 dark:text-zinc-400",t),...r})},hr({node:e,...t}){return d.jsx("hr",{className:"my-6 border-zinc-200 dark:border-zinc-800",...t})},strong({node:e,className:t,...r}){return d.jsx("strong",{className:re("font-semibold text-zinc-900 dark:text-zinc-100",t),...r})},code({node:e,className:t,children:r,...a}){return t?.includes("hljs")?d.jsx("code",{className:re("text-sm",t),...a,children:r}):d.jsx("code",{className:re("rounded-md bg-zinc-100 px-1.5 py-0.5 text-sm font-mono text-zinc-800 dark:bg-zinc-800 dark:text-zinc-200",t),...a,children:r})},pre({node:e,className:t,...r}){return d.jsx("pre",{className:re("mb-4 overflow-x-auto rounded-lg border border-zinc-200 bg-zinc-50 p-4 text-sm dark:border-zinc-800 dark:bg-zinc-900",t),...r})},table({node:e,className:t,...r}){return d.jsx("div",{className:"mb-4 overflow-x-auto rounded-lg border border-zinc-200 dark:border-zinc-800",children:d.jsx("table",{className:re("w-full text-sm",t),...r})})},thead({node:e,className:t,...r}){return d.jsx("thead",{className:re("bg-zinc-50 dark:bg-zinc-900",t),...r})},th({node:e,className:t,...r}){return d.jsx("th",{className:re("border-b border-zinc-200 px-4 py-2 text-left font-medium text-zinc-900 dark:border-zinc-800 dark:text-zinc-100",t),...r})},td({node:e,className:t,...r}){return d.jsx("td",{className:re("border-b border-zinc-200 px-4 py-2 text-zinc-700 dark:border-zinc-800 dark:text-zinc-300",t),...r})},img({node:e,className:t,...r}){return d.jsx("img",{className:re("mb-4 max-w-full rounded-lg",t),...r})}};function jr({content:e,className:t}){return d.jsx("div",{className:re("ocr-markdown",t),children:d.jsx(Jj,{remarkPlugins:[fL],rehypePlugins:[e6],components:n6,children:e})})}function r6({text:e}){return d.jsx("div",{className:"py-1 text-sm leading-relaxed text-zinc-800 dark:text-zinc-200",children:d.jsx(jr,{content:e})})}function i6(e){for(const t of e.split(`
563
+ `)){const r=t.trim();if(r)return r}return e.trim()}function a6({text:e}){const[t,r]=_.useState(!1),a=i6(e);return d.jsx("div",{className:"py-1",children:d.jsxs("button",{type:"button",onClick:()=>r(l=>!l),"aria-expanded":t,className:re("group flex w-full items-start gap-1.5 text-left text-[13px] italic","text-zinc-500 hover:text-zinc-700 dark:text-zinc-500 dark:hover:text-zinc-300","transition-colors"),children:[d.jsx(ji,{"aria-hidden":!0,className:re("mt-1 h-3 w-3 shrink-0 transition-transform",t&&"rotate-90")}),d.jsx("span",{className:"min-w-0 flex-1",children:t?d.jsx("span",{className:"block whitespace-pre-wrap leading-relaxed text-zinc-600 dark:text-zinc-400",children:e}):d.jsxs("span",{className:"line-clamp-1 not-italic text-[12px] tracking-wide text-zinc-400 dark:text-zinc-500",children:[d.jsx("span",{className:"italic",children:"Thinking · "}),d.jsx("span",{className:"italic",children:a})]})})]})})}const $w=80,s6=60;function Nu(e,t=$w){return e.length<=t?e:e.slice(0,t-1)+"…"}function Fr(e,t){const r=e[t];return typeof r=="string"?r:null}function l6(e,t){switch(e){case"Read":case"Edit":case"Write":case"NotebookEdit":return Fr(t,"file_path")??Fr(t,"path")??null;case"Bash":{const r=Fr(t,"command");if(!r)return null;const a=r.replace(/^cd\s+\S+\s*&&\s*/,"");return Nu(a)}case"Grep":{const r=Fr(t,"pattern"),a=Fr(t,"glob");return r?a?`${r} · ${a}`:r:null}case"Glob":return Fr(t,"pattern");case"WebFetch":return Fr(t,"url");case"WebSearch":{const r=Fr(t,"query");return r?Nu(r):null}case"Task":{const r=Fr(t,"subagent_type"),a=Fr(t,"prompt")??Fr(t,"description"),l=a?Nu(a,s6):null;return r&&l?`${r} · ${l}`:r??l??null}case"TodoWrite":{const r=t.todos;return Array.isArray(r)?`${r.length} todos`:null}default:return null}}function o6(e){try{const t=JSON.stringify(e);return Nu(t,$w)}catch{return""}}function c6({name:e,input:t,inputPartial:r,output:a,status:l}){const[o,c]=_.useState(!1),f=l6(e,t)??o6(t);return d.jsxs("div",{className:"py-1",children:[d.jsxs("button",{type:"button",onClick:()=>c(h=>!h),"aria-expanded":o,className:re("group flex w-full items-center gap-2 rounded-md px-1.5 py-1 text-left","transition-colors hover:bg-zinc-50 dark:hover:bg-zinc-800/50"),children:[d.jsx(ji,{"aria-hidden":!0,className:re("h-3 w-3 shrink-0 text-zinc-400 transition-transform dark:text-zinc-500",o&&"rotate-90")}),d.jsx(ck,{"aria-hidden":!0,className:"h-3.5 w-3.5 shrink-0 text-zinc-500 dark:text-zinc-400"}),d.jsx("span",{className:"text-[13px] font-medium text-zinc-700 dark:text-zinc-200",children:e}),f&&d.jsxs(d.Fragment,{children:[d.jsx("span",{className:"text-zinc-400 dark:text-zinc-600",children:"·"}),d.jsx("span",{className:"min-w-0 flex-1 truncate font-mono text-[12px] text-zinc-600 dark:text-zinc-400",children:f})]}),!f&&d.jsx("span",{className:"flex-1"}),d.jsx(u6,{status:l})]}),o&&d.jsxs("div",{className:"ml-7 mt-1 space-y-2",children:[d.jsx(hv,{label:"Input",children:d.jsx("pre",{className:"overflow-x-auto whitespace-pre-wrap break-all rounded-md bg-zinc-100 px-3 py-2 font-mono text-[11px] leading-relaxed text-zinc-700 dark:bg-zinc-900 dark:text-zinc-300",children:d6(t,r)})}),a!==void 0&&d.jsx(hv,{label:l==="error"?"Error output":"Output",children:d.jsx("pre",{className:re("overflow-x-auto whitespace-pre-wrap break-words rounded-md px-3 py-2 font-mono text-[11px] leading-relaxed",l==="error"?"bg-red-50 text-red-800 dark:bg-red-950/40 dark:text-red-200":"bg-zinc-100 text-zinc-700 dark:bg-zinc-900 dark:text-zinc-300"),children:a||"(empty)"})})]})]})}function u6({status:e}){return e==="running"?d.jsx(qr,{"aria-label":"Running",className:"h-3.5 w-3.5 shrink-0 animate-spin text-indigo-500 dark:text-indigo-400"}):e==="done"?d.jsx(Mr,{"aria-label":"Done",className:"h-3.5 w-3.5 shrink-0 text-emerald-600 dark:text-emerald-400"}):e==="error"?d.jsx(Bn,{"aria-label":"Error",className:"h-3.5 w-3.5 shrink-0 text-red-500 dark:text-red-400"}):d.jsx(Vu,{"aria-label":"Pending",className:"h-3.5 w-3.5 shrink-0 text-zinc-400 dark:text-zinc-500"})}function hv({label:e,children:t}){return d.jsxs("div",{children:[d.jsx("div",{className:"mb-1 text-[10px] font-medium uppercase tracking-wider text-zinc-500 dark:text-zinc-500",children:e}),t]})}function d6(e,t){let r;try{r=JSON.stringify(e,null,2)}catch{r="{}"}return t?`${r}
564
+
565
+ // streaming…
566
+ ${t}`:r}function f6({source:e,message:t,detail:r}){const[a,l]=_.useState(!1),o=r?`${t}
567
+
568
+ ${r}`:t,c=()=>{navigator.clipboard.writeText(o).then(()=>{l(!0),setTimeout(()=>l(!1),1500)},()=>{})};return d.jsx("div",{className:re("my-1 rounded-md border px-3 py-2","border-red-300 bg-red-50 dark:border-red-800/60 dark:bg-red-950/30"),children:d.jsxs("div",{className:"flex items-start gap-2",children:[d.jsx(Vu,{"aria-hidden":!0,className:"mt-0.5 h-4 w-4 shrink-0 text-red-600 dark:text-red-400"}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"text-[10px] font-medium uppercase tracking-wider text-red-700 dark:text-red-400",children:e==="agent"?"Agent error":"Process error"}),d.jsxs("button",{type:"button",onClick:c,className:"ml-auto inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[10px] text-red-700 transition-colors hover:bg-red-100 dark:text-red-400 dark:hover:bg-red-900/30",children:[d.jsx(Yu,{"aria-hidden":!0,className:"h-3 w-3"}),a?"Copied":"Copy"]})]}),d.jsx("p",{className:"mt-1 text-[13px] font-medium text-red-800 dark:text-red-200",children:t}),r&&d.jsx("pre",{className:"mt-2 overflow-x-auto whitespace-pre-wrap break-words font-mono text-[11px] leading-relaxed text-red-700/80 dark:text-red-300/80",children:r})]})]})})}const h6=24;function m6(e){const t=_.useRef(null),[r,a]=_.useState(!0),l=_.useRef(!0);l.current=r,_.useEffect(()=>{const c=t.current;if(!c)return;const f=()=>{const m=c.scrollHeight-c.scrollTop-c.clientHeight<=h6;m!==l.current&&a(m)};return c.addEventListener("scroll",f,{passive:!0}),()=>c.removeEventListener("scroll",f)},[]),_.useEffect(()=>{if(!l.current)return;const c=t.current;c&&requestAnimationFrame(()=>{l.current&&(c.scrollTop=c.scrollHeight)})},e);const o=_.useCallback(()=>{const c=t.current;c&&(c.scrollTop=c.scrollHeight,a(!0))},[]);return{scrollRef:t,isAtBottom:r,jumpToBottom:o}}function p6(e){const t=[],r=new Map;let a=null,l=null;for(const o of e)switch(o.type!=="text_delta"&&o.type!=="message"&&o.type!=="session_id"&&(a=null),o.type!=="thinking_delta"&&o.type!=="session_id"&&(l=null),o.type){case"text_delta":{if(a!==null){const c=t[a];c&&c.kind==="message"&&(c.text+=o.text)}else t.push({kind:"message",key:`msg-${o.seq}`,agentId:o.agentId,text:o.text}),a=t.length-1;break}case"message":{if(a!==null){const c=t[a];c&&c.kind==="message"&&(c.text=o.text)}else t.push({kind:"message",key:`msg-${o.seq}`,agentId:o.agentId,text:o.text});break}case"thinking_delta":{if(l!==null){const c=t[l];c&&c.kind==="thinking"&&(c.text+=o.text)}else t.push({kind:"thinking",key:`think-${o.seq}`,agentId:o.agentId,text:o.text}),l=t.length-1;break}case"tool_call":{const c={kind:"tool",key:`tool-${o.toolId}-${o.seq}`,agentId:o.agentId,toolId:o.toolId,name:o.name,input:o.input,inputPartial:"",status:"running"};t.push(c),r.set(o.toolId,t.length-1);break}case"tool_input_delta":{const c=r.get(o.toolId);if(c===void 0)break;const f=t[c];f&&f.kind==="tool"&&(f.inputPartial+=o.deltaJson);break}case"tool_result":{const c=r.get(o.toolId);if(c===void 0)break;const f=t[c];f&&f.kind==="tool"&&(f.status=o.isError?"error":"done",f.output=o.output,f.inputPartial="");break}case"error":{const c={kind:"error",key:`err-${o.seq}`,agentId:o.agentId,source:o.source,message:o.message};o.detail&&(c.detail=o.detail),t.push(c);break}}return t}function Gw({events:e,isRunning:t,className:r}){const a=_.useMemo(()=>p6(e),[e]),{scrollRef:l,isAtBottom:o,jumpToBottom:c}=m6([a.length,a[a.length-1]?.kind==="message"?a[a.length-1].text.length:0]);return d.jsxs("div",{className:re("relative flex flex-col overflow-hidden",r),children:[d.jsxs("div",{ref:l,className:re("min-h-0 flex-1 overflow-y-auto",a.length===0?"flex items-center justify-center px-6 py-10":"px-4 py-3"),role:"log","aria-live":"polite","aria-relevant":"additions",children:[a.length===0?d.jsx(g6,{isRunning:t}):d.jsx(b6,{blocks:a}),t&&a.length>0&&d.jsx("span",{"aria-hidden":!0,className:"ml-1 inline-block h-3 w-[2px] animate-pulse bg-indigo-400 align-middle dark:bg-indigo-500"})]}),!o&&d.jsxs("button",{type:"button",onClick:c,className:re("absolute bottom-3 left-1/2 -translate-x-1/2","inline-flex items-center gap-1.5 rounded-full px-3 py-1.5 text-[11px] font-medium","bg-zinc-900/90 text-white shadow-lg backdrop-blur transition-colors","hover:bg-zinc-900 dark:bg-zinc-100 dark:text-zinc-900 dark:hover:bg-white"),children:[d.jsx(J1,{"aria-hidden":!0,className:"h-3 w-3"}),"Jump to live"]})]})}function g6({isRunning:e}){return e?d.jsxs("div",{className:"flex max-w-sm flex-col items-center gap-3 text-center",children:[d.jsxs("span",{className:"relative flex h-10 w-10 items-center justify-center",children:[d.jsx("span",{"aria-hidden":!0,className:"absolute inset-0 animate-ping rounded-full bg-indigo-400/30 dark:bg-indigo-500/20"}),d.jsx("span",{className:"relative flex h-10 w-10 items-center justify-center rounded-full bg-indigo-500/10 dark:bg-indigo-500/15",children:d.jsx(Oo,{className:"h-4 w-4 text-indigo-500 dark:text-indigo-400","aria-hidden":!0})})]}),d.jsxs("div",{className:"space-y-1",children:[d.jsx("p",{className:"text-sm font-medium text-zinc-700 dark:text-zinc-200",children:"Spinning up the orchestrator"}),d.jsx("p",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:"Tool calls and reviewer output will appear here as the workflow progresses. The first response usually arrives within a few seconds."})]})]}):d.jsxs("div",{className:"flex max-w-sm flex-col items-center gap-3 text-center",children:[d.jsx("span",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-zinc-100 dark:bg-zinc-800",children:d.jsx(ii,{className:"h-4 w-4 text-zinc-400 dark:text-zinc-500","aria-hidden":!0})}),d.jsxs("div",{className:"space-y-1",children:[d.jsx("p",{className:"text-sm font-medium text-zinc-600 dark:text-zinc-300",children:"No structured events captured"}),d.jsx("p",{className:"text-xs text-zinc-500 dark:text-zinc-500",children:"This run completed without emitting timeline events. The legacy raw output may still contain its result."})]})]})}function b6({blocks:e}){return _.useMemo(()=>{const a=new Set;for(const l of e)a.add(l.agentId);return a},[e]).size>1?d.jsx(d.Fragment,{children:e.map((a,l)=>{const o=l>0?e[l-1]:null,c=!o||o.agentId!==a.agentId;return d.jsx(_.Fragment,{children:d.jsx(H5,{agentId:a.agentId,showName:c,children:d.jsx(mv,{block:a})})},a.key)})}):d.jsx(d.Fragment,{children:e.map(a=>d.jsx(_.Fragment,{children:d.jsx(mv,{block:a})},a.key))})}function mv({block:e}){switch(e.kind){case"message":return d.jsx(r6,{text:e.text});case"thinking":return d.jsx(a6,{text:e.text});case"tool":{const t={name:e.name,toolId:e.toolId,input:e.input,status:e.status};return e.inputPartial&&(t.inputPartial=e.inputPartial),e.output!==void 0&&(t.output=e.output),d.jsx(c6,{...t})}case"error":{const t={source:e.source,message:e.message};return e.detail&&(t.detail=e.detail),d.jsx(f6,{...t})}}}function x6(e,t){return e==="complete"?"Complete":e==="incomplete"?"Incomplete":e==="cancelled"?"Cancelled":e==="failed"?`Exit: ${t}`:t===0?"Complete":t===-2?"Cancelled":`Exit: ${t}`}function y6(e,t){const r=e??(t===0?"complete":t===-2?"cancelled":"failed");return r==="complete"?"border-emerald-500/25 bg-emerald-500/15 text-emerald-700 dark:text-emerald-400":r==="incomplete"||r==="cancelled"?"border-amber-500/25 bg-amber-500/15 text-amber-700 dark:text-amber-400":"border-red-500/25 bg-red-500/15 text-red-700 dark:text-red-400"}function v6(e){if(!e)return{verb:"workflow",reviewerCount:null};const t=e.replace(/^ocr\s+/,""),r=t.split(/\s+/)[0]??"workflow",a=t.match(/--team\s+(\[[\s\S]*?\])(?=\s+--|\s*$)/);let l=null;if(a?.[1])try{const o=JSON.parse(a[1]);Array.isArray(o)&&(l=o.length)}catch{}return{verb:r,reviewerCount:l}}function k6({output:e,events:t,isRunning:r,exitCode:a,status:l,commandName:o,onCancel:c,bare:f}){const h=_.useRef(null),[m,g]=_.useState(!1);_.useEffect(()=>{h.current&&(h.current.scrollTop=h.current.scrollHeight)},[e]);const x=_.useMemo(()=>w6(e),[e]),y=e.length>0||t&&t.length>0||r,v=!!t&&t.length>0,k=_.useMemo(()=>v6(o),[o]);return y?d.jsxs("div",{className:re(!f&&"overflow-hidden rounded-lg border border-zinc-200 dark:border-zinc-800"),children:[d.jsxs("div",{className:"flex items-center justify-between border-b border-zinc-200 bg-zinc-50 px-4 py-2.5 dark:border-zinc-800 dark:bg-zinc-900",children:[d.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[r?d.jsxs(d.Fragment,{children:[d.jsxs("span",{className:"relative flex h-2 w-2 shrink-0",children:[d.jsx("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-indigo-400 opacity-75"}),d.jsx("span",{className:"relative inline-flex h-2 w-2 rounded-full bg-indigo-500"})]}),d.jsxs("span",{className:"truncate text-xs font-medium text-zinc-600 dark:text-zinc-300",children:["Running ",d.jsx("span",{className:"capitalize",children:k.verb})]})]}):d.jsxs(d.Fragment,{children:[d.jsx(Oo,{className:"h-3.5 w-3.5 shrink-0 text-zinc-400"}),d.jsxs("span",{className:"text-xs font-medium text-zinc-500 dark:text-zinc-400",children:[d.jsx("span",{className:"capitalize",children:k.verb})," output"]})]}),k.reviewerCount!=null&&k.reviewerCount>0&&d.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1 rounded-full border border-zinc-200 bg-white px-1.5 py-0.5 text-[10px] font-medium text-zinc-600 dark:border-zinc-700 dark:bg-zinc-800 dark:text-zinc-400",children:[d.jsx(Zm,{className:"h-2.5 w-2.5","aria-hidden":!0}),k.reviewerCount," reviewer",k.reviewerCount===1?"":"s"]})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[r&&d.jsxs("button",{type:"button",onClick:c,className:re("flex items-center gap-1 rounded-md border px-2 py-0.5 text-xs font-medium transition-colors","border-zinc-300 text-zinc-600 hover:bg-zinc-100","dark:border-zinc-700 dark:text-zinc-400 dark:hover:bg-zinc-800"),children:[d.jsx(hA,{className:"h-2.5 w-2.5"}),"Cancel"]}),a!==null&&d.jsx("span",{className:re("inline-flex items-center rounded-md border px-2 py-0.5 text-xs font-medium",y6(l,a)),title:l==="incomplete"?"Process exited 0 but the workflow never reached its terminal phase. Likely cause: the parent process was interrupted (e.g. macOS sleep dropped the streaming connection). Use 'Resume in terminal' to pick up where it left off.":void 0,children:x6(l,a)}),v&&d.jsxs("button",{type:"button",onClick:()=>g(E=>!E),className:re("flex items-center gap-1 rounded-md border px-2 py-0.5 text-[11px] font-medium transition-colors","border-zinc-300 text-zinc-500 hover:bg-zinc-100","dark:border-zinc-700 dark:text-zinc-400 dark:hover:bg-zinc-800"),title:m?"Show timeline":"Show raw output",children:[d.jsx(eR,{"aria-hidden":!0,className:"h-3 w-3"}),m?"Timeline":"Raw"]})]})]}),v&&!m?d.jsx("div",{className:"flex max-h-[600px] min-h-[120px] flex-col bg-white dark:bg-zinc-950",children:d.jsx(Gw,{events:t,isRunning:r,className:"min-h-0 flex-1"})}):d.jsxs("div",{ref:h,className:"max-h-[600px] min-h-[120px] overflow-y-auto bg-white px-5 py-4 dark:bg-zinc-950",children:[x.length===0&&r?d.jsxs("div",{className:"flex items-center gap-2 text-sm text-zinc-400",children:[d.jsx("span",{className:"h-1 w-1 animate-pulse rounded-full bg-zinc-400"}),"Waiting for output..."]}):x.map((E,S)=>{if(E.type==="tool")return d.jsxs("div",{className:"my-1 flex items-center gap-1.5 border-l-2 border-indigo-400/40 py-0.5 pl-2.5 font-mono text-xs text-zinc-400 dark:text-zinc-500",children:[d.jsx("span",{className:"shrink-0 text-indigo-400/70",children:"▸"}),d.jsx("span",{className:"truncate",children:E.text})]},S);if(E.type==="empty")return d.jsx("div",{className:"h-3"},S);const N=E.text.match(/^(#{1,6})\s+(.+)/);if(N){const O=N[1]?.length??1,T=N[2]??"",P=O<=2?"text-base font-semibold":O<=4?"text-sm font-semibold":"text-sm font-medium";return d.jsx("div",{className:re(P,"mt-3 mb-1 text-zinc-800 dark:text-zinc-200"),children:T},S)}return/^[-*+]\s/.test(E.text)||/^\d+\.\s/.test(E.text)?d.jsx("div",{className:"ml-4 text-sm leading-relaxed text-zinc-700 dark:text-zinc-300",children:E.text},S):d.jsx("div",{className:"text-sm leading-relaxed text-zinc-700 dark:text-zinc-300",children:E.text},S)}),r&&x.length>0&&d.jsx("span",{className:"inline-block h-4 w-0.5 animate-pulse bg-indigo-500"})]})]}):null}function w6(e){if(!e)return[];const t=e.split(`
569
+ `),r=[];for(const a of t){const l=a.trim();if(l===""){r.length>0&&r[r.length-1]?.type!=="empty"&&r.push({type:"empty",text:""});continue}if(l.startsWith("▸")){r.push({type:"tool",text:l.replace(/^▸\s*/,"")});continue}if(/^(#{1,6}\s|[-*+]\s|\d+\.\s|```|>\s|---|\*\*\*|___)/.test(l))r.push({type:"text",text:l});else{const c=r[r.length-1];c&&c.type==="text"?c.text+=" "+l:r.push({type:"text",text:l})}}return r.length>0&&r[r.length-1]?.type==="empty"&&r.pop(),r}function _6(){return nn({queryKey:["command-history"],queryFn:()=>Dt("/api/commands/history")})}function E6(e,t){return nn({queryKey:["command-events",e],queryFn:async()=>e===null?[]:(await Dt(`/api/commands/${e}/events`)).events??[],enabled:t&&e!==null,staleTime:1/0})}const N6=6e4,S6=-2,z6=-3;function C6(e,t){const r=e.toLowerCase(),a=t.toLowerCase();let l=0;for(let o=0;o<a.length;o++){const c=r.indexOf(a[o],l);if(c<0)return!1;l=c+1}return!0}function Eo(e){return e.exit_code===null?e.last_heartbeat_at&&Date.now()-ri(e.last_heartbeat_at).getTime()>N6?"stalled":"running":e.outcome==="success"?"success":e.outcome==="incomplete"?"incomplete":e.outcome==="cancelled"?"cancelled":e.outcome==="failed"?"fail":e.exit_code===0?"success":e.exit_code===S6||e.cancellation_reason==="cascade"?"cancelled":e.exit_code===z6?"orphaned":"fail"}function T6(e){switch(e){case"success":return"Success";case"fail":return"Fail";case"cancelled":return"Cancelled";case"incomplete":return"Incomplete";case"running":return"Running";case"stalled":return"Stalled";case"orphaned":return"Orphaned";default:return"All"}}function R6(e,t){return t==="cancelled"&&e.cancellation_reason==="cascade"?"Superseded":T6(t)}function A6(e,t){if(t==="cancelled"&&e.cancellation_reason==="cascade")return"Stopped because its parent workflow was closed"}function O6(e){switch(e){case"success":return"border-emerald-500/25 bg-emerald-500/15 text-emerald-700 dark:text-emerald-400";case"cancelled":return"border-amber-500/25 bg-amber-500/15 text-amber-700 dark:text-amber-400";case"incomplete":return"border-amber-500/25 bg-amber-500/15 text-amber-700 dark:text-amber-400";case"stalled":return"border-amber-500/30 bg-amber-500/10 text-amber-700 dark:text-amber-400";case"orphaned":return"border-zinc-300 bg-zinc-100/50 text-zinc-600 dark:border-zinc-700 dark:bg-zinc-800/30 dark:text-zinc-400";case"fail":return"border-red-500/25 bg-red-500/15 text-red-700 dark:text-red-400";case"running":return"border-emerald-500/30 bg-emerald-500/10 text-emerald-700 dark:text-emerald-400";default:return"border-zinc-500/25 bg-zinc-500/15 text-zinc-600 dark:text-zinc-400"}}function M6(e,t,r,a){let l=0;switch(r){case"date":l=new Date(e.started_at).getTime()-new Date(t.started_at).getTime();break;case"command":l=e.command.localeCompare(t.command);break;case"duration":l=(e.duration_ms??-1)-(t.duration_ms??-1);break;case"status":{const o={running:0,stalled:1,incomplete:2,orphaned:3,success:4,cancelled:5,fail:6,all:-1};l=(o[Eo(e)]??0)-(o[Eo(t)]??0);break}}return a==="asc"?l:-l}const j6=[{value:"all",label:"All"},{value:"running",label:"Running"},{value:"stalled",label:"Stalled"},{value:"orphaned",label:"Orphaned"},{value:"success",label:"Success"},{value:"incomplete",label:"Incomplete"},{value:"fail",label:"Fail"},{value:"cancelled",label:"Cancelled"}];function hu({label:e,field:t,activeField:r,dir:a,onToggle:l}){const o=t===r;return d.jsxs("button",{type:"button",onClick:()=>l(t),className:re("inline-flex items-center gap-1 text-xs transition-colors",o?"font-medium text-zinc-900 dark:text-zinc-100":"text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-300"),children:[e,o?a==="desc"?d.jsx(J1,{className:"h-3 w-3"}):d.jsx(kT,{className:"h-3 w-3"}):d.jsx(ek,{className:"h-3 w-3 opacity-40"})]})}const D6=new Set(["map","review"]);function L6(e){const t=e.replace(/^ocr\s+/,"").split(/\s+/)[0]??"";return D6.has(t)}function I6(e){const t=parseInt(e,10);return Number.isFinite(t)&&t>0?t:null}function pv({active:e,onClick:t,children:r}){return d.jsx("button",{type:"button",onClick:t,"aria-pressed":e,className:re("rounded px-2 py-0.5 text-[11px] font-medium transition",e?"bg-zinc-900 text-white dark:bg-zinc-100 dark:text-zinc-900":"text-zinc-500 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-zinc-200"),children:r})}function B6({entry:e,isRunning:t,onRerun:r,onHandoff:a}){const[l,o]=_.useState(!1),[c,f]=_.useState(!1),h=Eo(e),g=e.exit_code!==null&&L6(e.command),x=!!e.workflow_id&&!!e.vendor_session_id,y=I6(e.id),v=!!e.vendor&&l,k=E6(y,v&&c);return d.jsxs("div",{className:"border-b border-zinc-200 last:border-b-0 dark:border-zinc-800",children:[d.jsxs("div",{className:"flex w-full items-center gap-3 px-4 py-3 min-w-0",children:[d.jsxs("button",{type:"button",onClick:()=>o(!l),className:"flex min-w-0 flex-1 items-center gap-3 text-left transition-colors hover:text-zinc-900 dark:hover:text-zinc-100",children:[l?d.jsx(Za,{className:"h-4 w-4 shrink-0 text-zinc-400"}):d.jsx(ji,{className:"h-4 w-4 shrink-0 text-zinc-400"}),d.jsx("span",{className:"min-w-0 flex-1 truncate font-mono text-sm",children:e.command})]}),d.jsx("span",{className:"shrink-0 text-xs text-zinc-500 dark:text-zinc-400",children:qA(e.started_at)}),d.jsx("span",{className:"shrink-0 text-xs tabular-nums text-zinc-500 dark:text-zinc-400",children:GA(e.duration_ms)}),d.jsx("span",{title:A6(e,h),className:re("inline-flex shrink-0 items-center rounded-md border px-2 py-0.5 text-xs font-medium",O6(h)),children:R6(e,h)}),x&&d.jsx("button",{type:"button",onClick:()=>a(e),title:"Pick up in terminal","aria-label":"Pick up in terminal",className:re("shrink-0 rounded-md p-1.5 text-zinc-400 transition-colors","hover:bg-zinc-100 hover:text-zinc-700","dark:hover:bg-zinc-800 dark:hover:text-zinc-200"),children:d.jsx(Oi,{className:"h-3.5 w-3.5"})}),g&&d.jsx("button",{type:"button",disabled:t,onClick:()=>r(e.command),title:"Re-run this command",className:re("shrink-0 rounded-md p-1.5 text-zinc-400 transition-colors","hover:bg-indigo-50 hover:text-indigo-600","dark:hover:bg-indigo-500/10 dark:hover:text-indigo-400",t&&"cursor-not-allowed opacity-30"),children:d.jsx(lk,{className:"h-3.5 w-3.5"})})]}),l&&d.jsxs("div",{children:[(e.vendor||e.resolved_model)&&d.jsxs("dl",{className:"grid grid-cols-[auto_1fr] gap-x-3 gap-y-1 border-b border-zinc-100 bg-zinc-50 px-4 py-2 text-[11px] dark:border-zinc-800 dark:bg-zinc-900/50",children:[e.vendor&&d.jsxs(d.Fragment,{children:[d.jsx("dt",{className:"text-zinc-500 dark:text-zinc-500",children:"Vendor"}),d.jsx("dd",{className:"font-mono text-zinc-700 dark:text-zinc-300",children:e.vendor})]}),e.resolved_model&&d.jsxs(d.Fragment,{children:[d.jsx("dt",{className:"text-zinc-500 dark:text-zinc-500",children:"Model"}),d.jsx("dd",{className:"font-mono text-zinc-700 dark:text-zinc-300",children:e.resolved_model})]}),e.workflow_id&&d.jsxs(d.Fragment,{children:[d.jsx("dt",{className:"text-zinc-500 dark:text-zinc-500",children:"Workflow"}),d.jsx("dd",{className:"font-mono text-zinc-700 dark:text-zinc-300",children:e.workflow_id})]})]}),x&&d.jsx("div",{className:"border-b border-zinc-100 bg-zinc-50/50 px-4 py-2 dark:border-zinc-800 dark:bg-zinc-900/30",children:d.jsxs("button",{type:"button",onClick:()=>a(e),title:"Copy a resume command to continue this AI session in your terminal",className:"inline-flex items-center gap-1.5 rounded-md border border-zinc-200 bg-white px-3 py-1.5 text-xs font-medium text-zinc-700 transition-colors hover:bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-800 dark:text-zinc-300 dark:hover:bg-zinc-700",children:[d.jsx(Oi,{className:"h-3.5 w-3.5"}),"Resume in terminal"]})}),v&&d.jsxs("div",{className:"flex items-center gap-2 border-b border-zinc-100 bg-zinc-50/50 px-4 py-2 dark:border-zinc-800 dark:bg-zinc-900/30",children:[d.jsx("span",{className:"text-[11px] text-zinc-500 dark:text-zinc-500",children:"View:"}),d.jsx(pv,{active:!c,onClick:()=>f(!1),children:"Raw output"}),d.jsx(pv,{active:c,onClick:()=>f(!0),children:"Timeline"}),c&&k.isLoading&&d.jsx("span",{className:"ml-auto text-[11px] text-zinc-500 dark:text-zinc-500",children:"Loading…"}),c&&!k.isLoading&&k.data?.length===0&&d.jsx("span",{className:"ml-auto text-[11px] text-zinc-500 dark:text-zinc-500",children:"No timeline data captured for this run."})]}),v&&c?k.data&&k.data.length>0?d.jsx("div",{className:"flex max-h-[400px] flex-col bg-white dark:bg-zinc-950",children:d.jsx(Gw,{events:k.data,isRunning:!1,className:"min-h-0 flex-1"})}):d.jsx("pre",{className:"max-h-[300px] overflow-y-auto bg-zinc-950 px-4 py-3 font-mono text-sm leading-relaxed text-zinc-300",children:e.output||"No output recorded."}):d.jsx("pre",{className:"max-h-[300px] overflow-y-auto bg-zinc-950 px-4 py-3 font-mono text-sm leading-relaxed text-zinc-300",children:e.output||"No output recorded."})]})]})}function U6({isRunning:e,onRerun:t}){const{data:r,isLoading:a}=_6(),[l,o]=_.useState(""),[c,f]=_.useState("all"),[h,m]=_.useState("date"),[g,x]=_.useState("desc"),[y,v]=_.useState(null),k=O=>{O===h?x(T=>T==="desc"?"asc":"desc"):(m(O),x(O==="date"?"desc":"asc"))},E=_.useMemo(()=>{if(!r)return[];let O=r;if(c!=="all"&&(O=O.filter(T=>Eo(T)===c)),l.trim()){const T=l.trim();O=O.filter(P=>{const $=P.command+(P.args?" "+P.args:"");return C6($,T)})}return[...O].sort((T,P)=>M6(T,P,h,g))},[r,c,l,h,g]),S=_.useMemo(()=>{if(!r)return{};const O={all:r.length,success:0,fail:0,cancelled:0,incomplete:0,running:0,stalled:0,orphaned:0};for(const T of r)O[Eo(T)]++;return O},[r]);if(a)return d.jsxs("div",{className:"rounded-lg border border-zinc-200 dark:border-zinc-800",children:[d.jsxs("div",{className:"flex items-center gap-2 border-b border-zinc-200 px-4 py-3 dark:border-zinc-800",children:[d.jsx(ry,{className:"h-4 w-4 text-zinc-500 dark:text-zinc-400"}),d.jsx("span",{className:"text-sm font-medium",children:"Command History"})]}),d.jsx("div",{className:"p-4 text-center text-sm text-zinc-500 dark:text-zinc-400",children:"Loading..."})]});const N=r&&r.length>0;return d.jsxs("div",{className:"overflow-hidden rounded-lg border border-zinc-200 dark:border-zinc-800",children:[d.jsxs("div",{className:"flex items-center gap-2 border-b border-zinc-200 bg-zinc-50 px-4 py-3 dark:border-zinc-800 dark:bg-zinc-900",children:[d.jsx(ry,{className:"h-4 w-4 text-zinc-500 dark:text-zinc-400"}),d.jsx("span",{className:"text-sm font-medium",children:"Command History"}),N&&d.jsx("span",{className:"text-xs text-zinc-400 dark:text-zinc-500",children:E.length===r.length?`${r.length}`:`${E.length} / ${r.length}`})]}),N&&d.jsxs("div",{className:"space-y-2 border-b border-zinc-200 bg-zinc-50/50 px-4 py-2.5 dark:border-zinc-800 dark:bg-zinc-900/50",children:[d.jsxs("div",{className:"relative",children:[d.jsx(Qu,{className:"pointer-events-none absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-zinc-400"}),d.jsx("input",{type:"text",value:l,onChange:O=>o(O.target.value),placeholder:"Search commands...",className:"w-full rounded-md border border-zinc-200 bg-white py-1.5 pl-8 pr-8 text-sm text-zinc-900 placeholder:text-zinc-400 focus:border-blue-400 focus:outline-none focus:ring-1 focus:ring-blue-400 dark:border-zinc-700 dark:bg-zinc-800 dark:text-zinc-100 dark:placeholder:text-zinc-500"}),l&&d.jsx("button",{type:"button",onClick:()=>o(""),className:"absolute right-2.5 top-1/2 -translate-y-1/2 text-zinc-400 hover:text-zinc-600 dark:hover:text-zinc-300",children:d.jsx(Bn,{className:"h-3.5 w-3.5"})})]}),d.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[d.jsx("div",{className:"flex flex-wrap items-center gap-1",children:j6.map(O=>{const T=S[O.value]??0;return O.value!=="all"&&T===0?null:d.jsxs("button",{type:"button",onClick:()=>f(O.value),className:re("inline-flex items-center gap-1 rounded-full px-2.5 py-1 text-xs font-medium transition-colors",c===O.value?"bg-zinc-900 text-white dark:bg-zinc-100 dark:text-zinc-900":"bg-zinc-100 text-zinc-600 hover:bg-zinc-200 dark:bg-zinc-800 dark:text-zinc-400 dark:hover:bg-zinc-700"),children:[O.label,d.jsx("span",{className:re("tabular-nums",c===O.value?"text-zinc-300 dark:text-zinc-400":"text-zinc-400 dark:text-zinc-500"),children:T})]},O.value)})}),d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("span",{className:"text-[10px] uppercase tracking-wider text-zinc-400 dark:text-zinc-500",children:"Sort"}),d.jsx(hu,{label:"Date",field:"date",activeField:h,dir:g,onToggle:k}),d.jsx(hu,{label:"Command",field:"command",activeField:h,dir:g,onToggle:k}),d.jsx(hu,{label:"Duration",field:"duration",activeField:h,dir:g,onToggle:k}),d.jsx(hu,{label:"Status",field:"status",activeField:h,dir:g,onToggle:k})]})]})]}),N?E.length===0?d.jsx("div",{className:"p-6 text-center text-sm text-zinc-500 dark:text-zinc-400",children:"No commands match your filters."}):E.map(O=>d.jsx(B6,{entry:O,isRunning:e,onRerun:t,onHandoff:T=>{T.workflow_id&&v(T.workflow_id)}},O.id)):d.jsx("div",{className:"p-6 text-center text-sm text-zinc-500 dark:text-zinc-400",children:"No commands have been run yet."}),y&&d.jsx(Wm,{workflowId:y,onClose:()=>v(null)})]})}function F6({tabs:e,activeTabId:t,onSelectTab:r,onDismissTab:a}){return e.length===0?null:d.jsx("div",{className:"flex items-center gap-0.5 overflow-x-auto border-b border-zinc-200 bg-zinc-50 px-2 dark:border-zinc-800 dark:bg-zinc-900",children:e.map(l=>{const o=l.executionId===t,c=l.command.replace(/^ocr\s+/,"").split(/\s+/)[0]??"command";return d.jsxs("button",{type:"button",onClick:()=>r(l.executionId),className:re("group relative flex items-center gap-1.5 whitespace-nowrap px-3 py-2 text-xs font-medium transition-colors",o?"border-b-2 border-indigo-500 text-zinc-900 dark:text-zinc-100":"text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-200"),children:[l.status==="running"?d.jsxs("span",{className:"relative flex h-2 w-2",children:[d.jsx("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-indigo-400 opacity-75"}),d.jsx("span",{className:"relative inline-flex h-2 w-2 rounded-full bg-indigo-500"})]}):l.status==="complete"?d.jsx(co,{className:"h-3 w-3 text-emerald-500"}):l.status==="cancelled"?d.jsx(_T,{className:"h-3 w-3 text-amber-500"}):d.jsx(cm,{className:"h-3 w-3 text-red-500"}),d.jsx("span",{className:"capitalize",children:c}),d.jsxs("span",{className:"text-[10px] text-zinc-400 dark:text-zinc-500",children:["#",l.executionId]}),l.status!=="running"&&d.jsx("span",{role:"button",tabIndex:0,onClick:f=>{f.stopPropagation(),a(l.executionId)},onKeyDown:f=>{(f.key==="Enter"||f.key===" ")&&(f.stopPropagation(),a(l.executionId))},className:"ml-1 rounded p-0.5 opacity-0 transition-opacity hover:bg-zinc-200 group-hover:opacity-100 dark:hover:bg-zinc-700",children:d.jsx(Bn,{className:"h-3 w-3"})})]},l.executionId)})})}const P6={claude:"Claude Code",opencode:"OpenCode"};function H6(){const{socket:e}=si(),t=An(),{isAvailable:r,activeCli:a,isDisabledByConfig:l}=jo(),{tabs:o,activeTabId:c,runningCount:f,setActiveTabId:h,dismissTab:m,cancelCommand:g}=Vm(),x=o.find(T=>T.executionId===c)??null,[y,v]=_.useState(null),k=_.useRef(null);ut("command:finished",()=>{t.invalidateQueries({queryKey:["command-history"]})});const E=_.useCallback(T=>{e&&e.emit("command:run",{command:T})},[e]),S=_.useCallback(()=>{x&&x.status==="running"&&g(x.executionId)},[x,g]),N=_.useCallback(T=>{const P=j5(T);P&&(v(P),k.current?.scrollIntoView({behavior:"smooth",block:"start"}))},[]),O=_.useCallback(()=>{v(null)},[]);return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-semibold",children:"Command Center"}),d.jsxs("p",{className:"mt-1 text-sm text-zinc-500 dark:text-zinc-400",children:["Launch AI-powered code review workflows.",a&&d.jsxs("span",{className:"ml-2 inline-flex items-center gap-1 rounded-full bg-zinc-100 px-2.5 py-0.5 text-[10px] font-medium text-zinc-600 dark:bg-zinc-800 dark:text-zinc-400",children:["Using ",P6[a]??a]})]})]}),r?d.jsx("div",{ref:k,children:d.jsx(I5,{isRunning:!1,runningCount:f,onRunCommand:E,prefill:y,onPrefillConsumed:O})}):d.jsx("div",{className:"rounded-lg border border-zinc-200 bg-zinc-50 p-6 dark:border-zinc-800 dark:bg-zinc-900/50",children:d.jsxs("div",{className:"flex items-start gap-3",children:[d.jsx(Oi,{className:"mt-0.5 h-5 w-5 shrink-0 text-zinc-400"}),d.jsxs("div",{children:[d.jsx("h3",{className:"text-sm font-medium text-zinc-900 dark:text-zinc-100",children:l?"AI Commands Disabled":"AI CLI Required"}),d.jsx("p",{className:"mt-1 text-sm text-zinc-500 dark:text-zinc-400",children:l?d.jsxs(d.Fragment,{children:["AI commands are turned off in your project config. Set ",d.jsx("code",{className:"rounded bg-zinc-200 px-1 py-0.5 text-xs dark:bg-zinc-800",children:"ai_cli"})," to"," ",d.jsx("code",{className:"rounded bg-zinc-200 px-1 py-0.5 text-xs dark:bg-zinc-800",children:"auto"}),","," ",d.jsx("code",{className:"rounded bg-zinc-200 px-1 py-0.5 text-xs dark:bg-zinc-800",children:"claude"}),", or"," ",d.jsx("code",{className:"rounded bg-zinc-200 px-1 py-0.5 text-xs dark:bg-zinc-800",children:"opencode"})," ","in ",d.jsx("code",{className:"rounded bg-zinc-200 px-1 py-0.5 text-xs dark:bg-zinc-800",children:".ocr/config.yaml"})," to enable them."]}):d.jsxs(d.Fragment,{children:["Install"," ",d.jsx("a",{href:"https://docs.anthropic.com/en/docs/claude-code/getting-started",target:"_blank",rel:"noopener noreferrer",className:"font-medium text-indigo-600 hover:text-indigo-500 dark:text-indigo-400",children:"Claude Code"})," ","or"," ",d.jsx("a",{href:"https://opencode.ai",target:"_blank",rel:"noopener noreferrer",className:"font-medium text-indigo-600 hover:text-indigo-500 dark:text-indigo-400",children:"OpenCode"})," ","to run AI-powered review commands from the dashboard."]})}),d.jsx("p",{className:"mt-2 text-xs text-zinc-400 dark:text-zinc-500",children:"You can still use OCR slash commands directly from your IDE, and browse existing sessions, reviews, and maps below."})]})]})}),o.length>0&&d.jsxs("div",{className:"overflow-hidden rounded-lg border border-zinc-200 dark:border-zinc-800",children:[d.jsx(F6,{tabs:o,activeTabId:c,onSelectTab:h,onDismissTab:m}),x&&d.jsx(k6,{bare:!0,output:x.output,events:x.events,isRunning:x.status==="running",exitCode:x.exitCode,status:x.status,commandName:x.command,onCancel:S})]}),d.jsx(U6,{isRunning:!1,onRerun:N})]})}const gv={holistic:{label:"Generalist",className:"bg-blue-100 text-blue-700 dark:bg-blue-900/50 dark:text-blue-300"},specialist:{label:"Specialist",className:"bg-emerald-100 text-emerald-700 dark:bg-emerald-900/50 dark:text-emerald-300"},persona:{label:"Persona",className:"bg-violet-100 text-violet-700 dark:bg-violet-900/50 dark:text-violet-300"},custom:{label:"Custom",className:"bg-amber-100 text-amber-700 dark:bg-amber-900/50 dark:text-amber-300"}};function q6({reviewer:e,onViewPrompt:t,inDefaultTeamCount:r}){const a=gv[e.tier]??gv.custom,l=r??(e.is_default?1:0);return d.jsxs("div",{className:"group flex flex-col rounded-lg border border-zinc-200 bg-white p-4 transition-colors hover:border-zinc-300 dark:border-zinc-800 dark:bg-zinc-900 dark:hover:border-zinc-700",children:[d.jsxs("div",{className:"mb-2 flex items-start gap-3",children:[d.jsx(Zs,{icon:e.icon,className:"mt-0.5 h-5 w-5 shrink-0 text-zinc-500 dark:text-zinc-400"}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("h3",{className:"truncate text-sm font-semibold text-zinc-900 dark:text-zinc-100",children:e.name}),l>0&&d.jsx("span",{className:"shrink-0 rounded-full bg-indigo-100 px-1.5 py-0.5 text-[10px] font-medium text-indigo-700 dark:bg-indigo-900/50 dark:text-indigo-300",title:"Reviewer is part of the workspace's default team",children:l>1?`In default team ×${l}`:"In default team"})]}),d.jsx("span",{className:re("mt-0.5 inline-block rounded-full px-1.5 py-0.5 text-[10px] font-medium",a.className),children:a.label})]})]}),d.jsx("p",{className:"mb-2 line-clamp-2 text-xs leading-relaxed text-zinc-500 dark:text-zinc-400",children:e.description}),e.known_for&&d.jsxs("p",{className:"mb-2 text-[11px] italic text-zinc-400 dark:text-zinc-500",children:["Known for: ",e.known_for]}),e.focus_areas.length>0&&d.jsxs("div",{className:"mb-3 flex flex-wrap gap-1",children:[e.focus_areas.slice(0,4).map(o=>d.jsx("span",{className:"rounded-full bg-zinc-100 px-2 py-0.5 text-[10px] text-zinc-600 dark:bg-zinc-800 dark:text-zinc-400",children:o},o)),e.focus_areas.length>4&&d.jsxs("span",{className:"rounded-full bg-zinc-100 px-2 py-0.5 text-[10px] text-zinc-400 dark:bg-zinc-800 dark:text-zinc-500",children:["+",e.focus_areas.length-4]})]}),d.jsx("div",{className:"mt-auto pt-1",children:d.jsxs("button",{type:"button",onClick:()=>t(e.id),className:"flex items-center gap-1.5 rounded-md px-2 py-1 text-xs font-medium text-zinc-500 transition-colors hover:bg-zinc-100 hover:text-zinc-700 dark:text-zinc-400 dark:hover:bg-zinc-800 dark:hover:text-zinc-200",children:[d.jsx(Ao,{className:"h-3 w-3"}),"View Prompt"]})})]})}const $6="(default model)",G6="Use the host CLI's default";function K6({className:e}){const{activeCli:t}=jo(),{data:r,isLoading:a}=gk(),{data:l,isLoading:o}=bk(t??void 0),{reviewers:c,isLoaded:f}=Jm(),h=C5(),[m,g]=_.useState(null),[x,y]=_.useState(new Set),v=m??r?.team??[],[k,E]=_.useState("idle"),S=_.useRef(null),N=_.useMemo(()=>J6(v),[v]),O=new Set(N.map(B=>B.persona)),T=c.filter(B=>!O.has(B.id)),P=_.useMemo(()=>new Set((r?.team??[]).map(B=>B.persona)),[r]),$=_.useMemo(()=>{const B=new Map;for(const z of r?.team??[]){const ue=B.get(z.persona)??[];ue.push(z),B.set(z.persona,ue)}for(const z of B.values())z.sort((ue,be)=>ue.instance_index-be.instance_index);return B},[r]),j=a||!f,G=_.useMemo(()=>r?!!(x.size>0||m&&!xv(m,r.team)):!1,[m,r,x]);_.useEffect(()=>{!m||!r||x.size>0||xv(m,r.team)&&g(null)},[m,r,x]);const A=_.useMemo(()=>{const B=[{id:"",label:$6,detail:G6}];if(l?.models)for(const z of l.models)B.push({id:z.id,label:z.displayName??z.id,detail:z.displayName?z.id:void 0});return B},[l]),ie=!o&&(l?.models?.length??0)===0,[F,ee]=_.useState(null),[te,we]=_.useState(!1),se=B=>{const z=m??r?.team??[];g(B(z))},Q=B=>{y(z=>{const ue=new Set(z);return ue.add(B),ue})},M=B=>{y(z=>{const ue=new Set(z);return ue.delete(B),ue})},Y=B=>{g(z=>(z??r?.team??[]).filter(be=>be.persona!==B))},V=()=>{const z=(m??r?.team??[]).filter(ue=>!x.has(ue.persona));S.current&&clearTimeout(S.current),E("saving"),h.mutate(z,{onSuccess:()=>{g(z),y(new Set),E("saved"),S.current=setTimeout(()=>E("idle"),2e3)},onError:()=>E("error")})},fe=()=>{g(null),y(new Set),E("idle"),S.current&&clearTimeout(S.current)};_.useEffect(()=>{if(!G)return;const B=z=>{(z.metaKey||z.ctrlKey)&&z.key.toLowerCase()==="s"&&(z.preventDefault(),k!=="saving"&&V())};return window.addEventListener("keydown",B),()=>window.removeEventListener("keydown",B)},[G,k]),_.useEffect(()=>{if(!G)return;const B=z=>{z.preventDefault(),z.returnValue=""};return window.addEventListener("beforeunload",B),()=>window.removeEventListener("beforeunload",B)},[G]);const R=F?N.find(B=>B.persona===F)??null:null,D=F?c.find(B=>B.id===F)??null:null;return d.jsxs("section",{className:re("space-y-4 rounded-lg border border-zinc-200 bg-white p-5 dark:border-zinc-800 dark:bg-zinc-900",e),children:[d.jsxs("header",{className:"flex items-start justify-between gap-3",children:[d.jsxs("div",{className:"min-w-0",children:[d.jsx("h2",{className:"text-sm font-semibold text-zinc-900 dark:text-zinc-100",children:"Default team"}),d.jsx("p",{className:"mt-0.5 text-xs text-zinc-500 dark:text-zinc-400",children:"The reviewers and models used for new reviews in this workspace. Click a card to customize."})]}),d.jsx("div",{className:"shrink-0",children:G?d.jsx(Q6,{saving:k==="saving",onSave:V,onDiscard:fe}):d.jsx(X6,{state:k})})]}),j?d.jsx("p",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:"Loading team…"}):N.length===0&&T.length===0?d.jsxs("p",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:["No reviewers available. Run ",d.jsx("code",{className:"rounded bg-zinc-100 px-1.5 py-0.5 dark:bg-zinc-800",children:"/ocr:sync-reviewers"})," from your IDE to populate the library below."]}):d.jsxs("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",children:[N.map(B=>{const z=c.find(xe=>xe.id===B.persona)??null,ue=x.has(B.persona),be=!P.has(B.persona),ye=$.get(B.persona),le=!be&&!ue&&ye!=null&&!n9(B.instances,ye);return d.jsx(V6,{group:B,meta:z,markedForRemoval:ue,isNewlyAdded:be,isModified:le,onEdit:()=>{ue||ee(B.persona)},onRemove:()=>{be?Y(B.persona):Q(B.persona)},onUndoRemoval:()=>M(B.persona)},B.persona)}),d.jsx(Y6,{disabled:T.length===0,picking:te,addable:T,onStart:()=>we(!0),onCancel:()=>we(!1),onSelect:B=>{we(!1),se(z=>[...z,{persona:B,instance_index:1,name:`${B}-1`,model:null}]),ee(B)}})]}),d.jsx(xk,{modelList:l,className:"mt-3"}),R&&d.jsx(Z6,{group:R,meta:D,modelOptions:A,modelListEmpty:ie,onClose:()=>ee(null),onCountChange:B=>se(z=>e9(z,R.persona,B)),onUniformModelChange:B=>se(z=>t9(z,R.persona,B)),onInstanceModelChange:(B,z)=>se(ue=>ue.map(be=>be.persona===R.persona&&be.instance_index===B?{...be,model:z}:be))})]})}function V6({group:e,meta:t,markedForRemoval:r,isNewlyAdded:a,isModified:l,onEdit:o,onRemove:c,onUndoRemoval:f}){const h=e.instances.length,m=e.instances.map(k=>k.model),g=Array.from(new Set(m)),x=g.length===1&&g[0]===null,y=x?"(default model)":g.length===1?W6(g[0]):`Mixed · ${g.length} models`,v=t?.name??e.persona;return d.jsxs("div",{role:"button",tabIndex:r?-1:0,"aria-disabled":r,onClick:r?void 0:o,onKeyDown:k=>{r||(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),o())},className:re("group relative flex flex-col gap-2 rounded-lg border p-3 transition-colors",r?"cursor-default border-dashed border-amber-300 bg-amber-50/40 dark:border-amber-800/60 dark:bg-amber-950/20":a?"cursor-pointer border-dashed border-indigo-300/70 bg-indigo-50/30 hover:border-indigo-400 hover:bg-indigo-50/50 dark:border-indigo-700/70 dark:bg-indigo-950/20 dark:hover:border-indigo-600 dark:hover:bg-indigo-950/30":"cursor-pointer border-zinc-200 bg-white hover:border-zinc-300 hover:bg-zinc-50 dark:border-zinc-800 dark:bg-zinc-900 dark:hover:border-zinc-700 dark:hover:bg-zinc-800/50"),children:[d.jsxs("div",{className:"flex items-start gap-2",children:[t?.icon&&d.jsx(Zs,{icon:t.icon,className:re("mt-0.5 h-4 w-4 shrink-0",r?"text-amber-600/70 dark:text-amber-500/70":"text-zinc-500 dark:text-zinc-400")}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsxs("div",{className:"flex items-center gap-1.5",children:[d.jsx("h3",{className:re("truncate text-sm font-medium",r?"text-amber-700/80 line-through decoration-amber-500/70 dark:text-amber-300/80":"text-zinc-900 dark:text-zinc-100"),children:v}),l&&d.jsx("span",{className:"inline-block h-1.5 w-1.5 shrink-0 rounded-full bg-amber-500",role:"status","aria-label":"Modified — unsaved",title:"Modified — unsaved"}),h>1&&d.jsxs("span",{className:re("shrink-0 rounded-full px-1.5 py-0.5 text-[10px] font-medium tabular-nums",r?"bg-amber-100 text-amber-700 dark:bg-amber-950/50 dark:text-amber-300":"bg-zinc-100 text-zinc-700 dark:bg-zinc-800 dark:text-zinc-300"),children:["×",h]}),!r&&a&&d.jsx("span",{className:"shrink-0 rounded-full bg-indigo-100 px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wide text-indigo-700 dark:bg-indigo-950/50 dark:text-indigo-300",children:"New"})]}),r?d.jsx("p",{className:"mt-0.5 text-[11px] font-medium text-amber-700/80 dark:text-amber-400/80",children:"Will remove on save"}):t?.description&&d.jsx("p",{className:"mt-0.5 line-clamp-1 text-[11px] text-zinc-500 dark:text-zinc-500",children:t.description})]}),r?d.jsx("button",{type:"button",onClick:k=>{k.stopPropagation(),f()},"aria-label":`Undo removal of ${v}`,className:"shrink-0 rounded p-1 text-amber-700 transition-colors hover:bg-amber-100 dark:text-amber-400 dark:hover:bg-amber-950/40",children:d.jsx(lk,{className:"h-3.5 w-3.5"})}):d.jsx("button",{type:"button",onClick:k=>{k.stopPropagation(),c()},"aria-label":`Remove ${v} from default team`,className:re("shrink-0 rounded p-1 opacity-0 transition-opacity","text-zinc-400 hover:bg-zinc-100 hover:text-zinc-600","group-hover:opacity-100 group-focus-within:opacity-100","dark:hover:bg-zinc-800 dark:hover:text-zinc-300"),children:d.jsx(Bn,{className:"h-3.5 w-3.5"})})]}),!r&&d.jsx("div",{className:"flex items-center gap-1.5 text-[11px]",children:d.jsx("span",{className:re("truncate font-mono",x?"text-zinc-400 dark:text-zinc-600":"text-zinc-700 dark:text-zinc-300"),title:g.length===1&&g[0]?g[0]:g.length>1?g.filter(Boolean).join(" · "):void 0,children:y})})]})}function Y6({disabled:e,picking:t,addable:r,onStart:a,onCancel:l,onSelect:o}){if(t){const c=r.map(f=>({id:f.id,label:f.name,detail:f.tier.charAt(0).toUpperCase()+f.tier.slice(1)}));return d.jsxs("div",{className:"flex flex-col gap-2 rounded-lg border border-dashed border-indigo-300 bg-indigo-50/30 p-3 dark:border-indigo-700 dark:bg-indigo-950/20",children:[d.jsx("span",{className:"text-[11px] font-medium uppercase tracking-wide text-indigo-700 dark:text-indigo-300",children:"Add reviewer"}),d.jsx(ko,{value:"",options:c,defaultOpen:!0,ariaLabel:"Choose a reviewer to add",freeTextPlaceholder:"Choose a reviewer…",onChange:f=>{f&&o(f)},onOpenChange:f=>{f||l()}})]})}return d.jsxs("button",{type:"button",onClick:a,disabled:e,className:re("flex flex-col items-center justify-center gap-1.5 rounded-lg border border-dashed p-3 transition-colors","min-h-[88px]",e?"cursor-not-allowed border-zinc-200 text-zinc-300 dark:border-zinc-800 dark:text-zinc-700":"border-zinc-300 text-zinc-500 hover:border-zinc-400 hover:bg-zinc-50 hover:text-zinc-700 dark:border-zinc-700 dark:text-zinc-400 dark:hover:border-zinc-600 dark:hover:bg-zinc-800/50 dark:hover:text-zinc-200"),children:[d.jsx(zA,{className:"h-4 w-4"}),d.jsx("span",{className:"text-xs font-medium",children:"Add reviewer"})]})}function Q6({saving:e,onSave:t,onDiscard:r}){return d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsxs("span",{className:"hidden items-center gap-1.5 text-[11px] text-amber-700 dark:text-amber-400 sm:inline-flex",children:[d.jsx("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-amber-500","aria-hidden":!0}),"Unsaved changes"]}),d.jsx("button",{type:"button",onClick:r,disabled:e,className:"rounded-md px-2.5 py-1.5 text-xs font-medium text-zinc-600 transition-colors hover:bg-zinc-100 hover:text-zinc-900 disabled:cursor-not-allowed disabled:opacity-50 dark:text-zinc-400 dark:hover:bg-zinc-800 dark:hover:text-zinc-100",children:"Discard"}),d.jsx("button",{type:"button",onClick:t,disabled:e,className:"inline-flex items-center gap-1.5 rounded-md bg-indigo-600 px-3 py-1.5 text-xs font-semibold text-white transition-colors hover:bg-indigo-500 disabled:cursor-not-allowed disabled:opacity-60 dark:bg-indigo-500 dark:hover:bg-indigo-400",children:e?d.jsxs(d.Fragment,{children:[d.jsx(qr,{className:"h-3 w-3 animate-spin"}),"Saving…"]}):d.jsx(d.Fragment,{children:"Save changes"})})]})}function X6({state:e}){return e==="idle"?null:e==="saving"?d.jsxs("span",{className:"inline-flex items-center gap-1.5 text-[11px] text-zinc-500 dark:text-zinc-400",children:[d.jsx(qr,{className:"h-3 w-3 animate-spin"}),"Saving…"]}):e==="saved"?d.jsxs("span",{className:"inline-flex items-center gap-1.5 text-[11px] text-emerald-600 dark:text-emerald-400",children:[d.jsx(Mr,{className:"h-3 w-3"}),"Saved"]}):d.jsx("span",{className:"text-[11px] text-red-600 dark:text-red-400",children:"Couldn't save"})}function Z6({group:e,meta:t,modelOptions:r,modelListEmpty:a,onClose:l,onCountChange:o,onUniformModelChange:c,onInstanceModelChange:f}){const h=e.instances.length,m=e.instances.map(N=>N.model),x=new Set(m).size<=1,[y,v]=_.useState(x?"uniform":"per-instance");_.useEffect(()=>{!x&&y==="uniform"&&v("per-instance")},[x,y]);const k=_.useRef(null);_.useEffect(()=>{const N=O=>{O.key==="Escape"&&l()};return window.addEventListener("keydown",N),k.current?.focus(),()=>window.removeEventListener("keydown",N)},[l]);const E=e.instances[0]?.model??null,S=t?.name??e.persona;return d.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4 backdrop-blur-sm",onClick:l,children:d.jsxs("div",{ref:k,role:"dialog","aria-modal":"true","aria-labelledby":"edit-team-reviewer-title",tabIndex:-1,onClick:N=>N.stopPropagation(),className:"flex max-h-[85vh] w-full max-w-md flex-col overflow-hidden rounded-xl border border-zinc-200 bg-white shadow-2xl outline-none dark:border-zinc-700 dark:bg-zinc-900",children:[d.jsxs("div",{className:"flex items-start gap-3 border-b border-zinc-200 px-5 py-3.5 dark:border-zinc-700",children:[t?.icon&&d.jsx(Zs,{icon:t.icon,className:"mt-0.5 h-5 w-5 shrink-0 text-zinc-500 dark:text-zinc-400"}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsx("h2",{id:"edit-team-reviewer-title",className:"text-sm font-semibold text-zinc-900 dark:text-zinc-100",children:S}),t?.description&&d.jsx("p",{className:"mt-0.5 line-clamp-2 text-xs text-zinc-500 dark:text-zinc-400",children:t.description})]}),d.jsx("button",{type:"button",onClick:l,"aria-label":"Close",className:"shrink-0 rounded-md p-1 text-zinc-400 hover:bg-zinc-100 hover:text-zinc-600 dark:text-zinc-500 dark:hover:bg-zinc-800 dark:hover:text-zinc-300",children:d.jsx(Bn,{className:"h-4 w-4"})})]}),d.jsxs("div",{className:"flex-1 overflow-y-auto px-5 py-4 space-y-5",children:[d.jsxs("div",{children:[d.jsx("label",{className:"block text-xs font-medium uppercase tracking-wider text-zinc-500 dark:text-zinc-500",children:"Reviewer count"}),d.jsx("p",{className:"mt-0.5 text-[11px] text-zinc-500 dark:text-zinc-500",children:"How many independent reviews this persona produces per round."}),d.jsxs("div",{className:"mt-2 inline-flex items-center gap-0.5 rounded-md border border-zinc-200 dark:border-zinc-700",children:[d.jsx("button",{type:"button",onClick:()=>o(Math.max(1,h-1)),disabled:h<=1,"aria-label":"Decrease count",className:"px-2 py-1 text-zinc-500 hover:bg-zinc-100 hover:text-zinc-700 disabled:opacity-30 dark:text-zinc-400 dark:hover:bg-zinc-800 dark:hover:text-zinc-200",children:d.jsx(xo,{className:"h-3.5 w-3.5"})}),d.jsx("span",{className:"min-w-[2rem] px-2 text-center text-sm font-medium tabular-nums text-zinc-700 dark:text-zinc-300",children:h}),d.jsx("button",{type:"button",onClick:()=>o(h+1),"aria-label":"Increase count",className:"px-2 py-1 text-zinc-500 hover:bg-zinc-100 hover:text-zinc-700 dark:text-zinc-400 dark:hover:bg-zinc-800 dark:hover:text-zinc-200",children:d.jsx(pa,{className:"h-3.5 w-3.5"})})]})]}),d.jsxs("div",{children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("label",{className:"block text-xs font-medium uppercase tracking-wider text-zinc-500 dark:text-zinc-500",children:"Model"}),h>1&&d.jsxs("div",{className:"inline-flex items-center gap-0.5 rounded-md border border-zinc-200 p-0.5 dark:border-zinc-700",children:[d.jsx(bv,{active:y==="uniform"&&x,onClick:()=>{v("uniform"),x||c(E)},label:"Same model"}),d.jsx(bv,{active:y==="per-instance"||!x,onClick:()=>v("per-instance"),label:"Per reviewer"})]})]}),d.jsx("div",{className:"mt-2 space-y-2",children:y==="uniform"&&x||h===1?d.jsx(ko,{value:E??"",options:r,freeText:a,allowCustom:!0,ariaLabel:"Model",onChange:N=>c(N||null)}):e.instances.map(N=>d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"w-28 shrink-0 truncate font-mono text-[11px] text-zinc-500 dark:text-zinc-500",children:N.name}),d.jsx(ko,{value:N.model??"",options:r,freeText:a,allowCustom:!0,ariaLabel:`Model for ${N.name}`,onChange:O=>f(N.instance_index,O||null)})]},`${N.persona}-${N.instance_index}`))}),a&&d.jsx("p",{className:"mt-2 text-[11px] text-zinc-500 dark:text-zinc-500",children:"Your AI CLI didn't return a model list. Type any model id it accepts."})]}),d.jsxs("p",{className:"rounded-md border border-zinc-200 bg-zinc-50 px-3 py-2 text-[11px] text-zinc-600 dark:border-zinc-800 dark:bg-zinc-900/50 dark:text-zinc-400",children:["Edits stay in draft until you click ",d.jsx("span",{className:"font-medium text-zinc-800 dark:text-zinc-200",children:"Save changes"})," at the top of the section. Close to keep editing."]})]}),d.jsx("div",{className:"flex justify-end gap-2 border-t border-zinc-200 px-5 py-3 dark:border-zinc-700",children:d.jsx("button",{type:"button",onClick:l,className:"rounded-md bg-zinc-900 px-4 py-1.5 text-xs font-medium text-white transition-colors hover:bg-zinc-800 dark:bg-zinc-100 dark:text-zinc-900 dark:hover:bg-zinc-200",children:"Done"})})]})})}function bv({active:e,onClick:t,label:r}){return d.jsx("button",{type:"button",onClick:t,"aria-pressed":e,className:re("rounded px-2 py-0.5 text-[11px] font-medium transition",e?"bg-zinc-900 text-white dark:bg-zinc-100 dark:text-zinc-900":"text-zinc-500 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-zinc-200"),children:r})}function W6(e){return(e.includes("/")?e.split("/").slice(-1)[0]:e).replace(/-\d{8,}$/,"")}function J6(e){const t=new Map;for(const r of e){const a=t.get(r.persona)??[];a.push(r),t.set(r.persona,a)}for(const[r,a]of t)a.sort((l,o)=>l.instance_index-o.instance_index),t.set(r,a);return Array.from(t,([r,a])=>({persona:r,instances:a}))}function e9(e,t,r){const a=e.filter(c=>c.persona!==t);if(r<=0)return a;const l=e.filter(c=>c.persona===t),o=[];for(let c=1;c<=r;c++){const f=l[c-1];o.push({persona:t,instance_index:c,name:f?.name??`${t}-${c}`,model:f?.model??l[0]?.model??null})}return[...a,...o].sort((c,f)=>c.persona===f.persona?c.instance_index-f.instance_index:0)}function t9(e,t,r){return e.map(a=>a.persona===t?{...a,model:r}:a)}function n9(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++){const a=e[r],l=t[r];if(a.persona!==l.persona||a.instance_index!==l.instance_index||a.name!==l.name||a.model!==l.model)return!1}return!0}function xv(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++){const a=e[r],l=t[r];if(a.persona!==l.persona||a.instance_index!==l.instance_index||a.name!==l.name||a.model!==l.model)return!1}return!0}const r9={AGREE:{icon:vR,borderColor:"border-l-emerald-500",bgColor:"bg-emerald-500/5",label:"Agree"},CHALLENGE:{icon:bA,borderColor:"border-l-red-500",bgColor:"bg-red-500/5",label:"Challenge"},CONNECT:{icon:AR,borderColor:"border-l-blue-500",bgColor:"bg-blue-500/5",label:"Connect"},SURFACE:{icon:TR,borderColor:"border-l-amber-500",bgColor:"bg-amber-500/5",label:"Surface"}},yv={icon:um,borderColor:"border-l-zinc-400",bgColor:"bg-zinc-500/5",label:"Discourse"};function i9(e){const t=r9[e];if(t)return t;const r=e.trim();return{...yv,label:r||yv.label}}function a9({type:e,content:t,reviewer:r,className:a}){const l=i9(e),o=l.icon;return d.jsxs("div",{className:re("rounded-r-lg border-l-4 p-4",l.borderColor,l.bgColor,a),children:[d.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[d.jsx(o,{className:"h-4 w-4 text-zinc-600 dark:text-zinc-400"}),d.jsx("span",{className:"text-sm font-semibold text-zinc-900 dark:text-zinc-100",children:l.label}),r&&d.jsxs("span",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:["— ",r]})]}),d.jsx(jr,{content:t})]})}function s9(e){const t=[],r=/^###?\s+(AGREE|CHALLENGE|CONNECT|SURFACE)(?:\s*[-—]\s*(.+))?$/gm;let a,l=0,o=null;for(;(a=r.exec(e))!==null;)o&&(o.content=e.slice(l,a.index).trim(),t.push(o)),o={type:a[1],reviewer:a[2]?.trim(),content:""},l=a.index+a[0].length;return o&&(o.content=e.slice(l).trim(),t.push(o)),t}const $h={APPROVE:{icon:co,bg:"bg-emerald-500/10",border:"border-emerald-500/30",text:"text-emerald-700 dark:text-emerald-400",label:"Approved"},APPROVED:{icon:co,bg:"bg-emerald-500/10",border:"border-emerald-500/30",text:"text-emerald-700 dark:text-emerald-400",label:"Approved"},LGTM:{icon:co,bg:"bg-emerald-500/10",border:"border-emerald-500/30",text:"text-emerald-700 dark:text-emerald-400",label:"LGTM"},"REQUEST CHANGES":{icon:cm,bg:"bg-red-500/10",border:"border-red-500/30",text:"text-red-700 dark:text-red-400",label:"Changes Requested"},"CHANGES REQUESTED":{icon:cm,bg:"bg-red-500/10",border:"border-red-500/30",text:"text-red-700 dark:text-red-400",label:"Changes Requested"},"NEEDS DISCUSSION":{icon:um,bg:"bg-amber-500/10",border:"border-amber-500/30",text:"text-amber-700 dark:text-amber-400",label:"Needs Discussion"},"NEEDS WORK":{icon:um,bg:"bg-amber-500/10",border:"border-amber-500/30",text:"text-amber-700 dark:text-amber-400",label:"Needs Work"}},l9={icon:nk,bg:"bg-zinc-500/10",border:"border-zinc-500/30",text:"text-zinc-700 dark:text-zinc-300",label:"Verdict"};function o9(e){const t=e.trim(),r=t.toUpperCase();if($h[r])return $h[r];for(const[l,o]of Object.entries($h))if(r.startsWith(l))return o;const a=t.length>60?`${t.slice(0,60).trim()}…`:t;return{...l9,label:a||"Verdict"}}function c9({verdict:e,blockerCount:t,suggestionCount:r,shouldFixCount:a,className:l}){const o=o9(e),c=o.icon;return d.jsxs("div",{className:re("flex items-center justify-between rounded-lg border p-4",o.bg,o.border,l),children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx(c,{className:re("h-6 w-6",o.text)}),d.jsx("span",{className:re("text-lg font-semibold",o.text),children:o.label})]}),d.jsxs("div",{className:"flex items-center gap-4 text-sm",children:[t!=null&&d.jsx(Gh,{label:"Blockers",value:t,className:t>0?"text-red-600 dark:text-red-400":void 0}),a!=null&&d.jsx(Gh,{label:"Should Fix",value:a,className:a>0?"text-amber-600 dark:text-amber-400":void 0}),r!=null&&d.jsx(Gh,{label:"Suggestions",value:r})]})]})}function Gh({label:e,value:t,className:r}){return d.jsxs("div",{className:"flex items-center gap-1.5",children:[d.jsx("span",{className:re("font-semibold tabular-nums",r??"text-zinc-700 dark:text-zinc-300"),children:t}),d.jsx("span",{className:"text-zinc-500 dark:text-zinc-400",children:e})]})}function u9({reviewer:e,onClose:t}){const{data:r,isLoading:a,error:l}=nn({queryKey:["reviewer-prompt",e?.id],queryFn:()=>Dt(`/api/reviewers/${e.id}/prompt`),enabled:e!=null});return _.useEffect(()=>{if(!e)return;const o=c=>{c.key==="Escape"&&t()};return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)},[e,t]),e?d.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm",onClick:t,children:d.jsxs("div",{role:"dialog","aria-modal":"true",className:"flex max-h-[85vh] w-full max-w-2xl flex-col overflow-hidden rounded-xl border border-zinc-200 bg-white shadow-2xl dark:border-zinc-700 dark:bg-zinc-900",onClick:o=>o.stopPropagation(),children:[d.jsxs("div",{className:"flex items-center gap-3 border-b border-zinc-200 px-5 py-3.5 dark:border-zinc-700",children:[d.jsx(Zs,{icon:e.icon,className:"h-5 w-5 shrink-0 text-zinc-500 dark:text-zinc-400"}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsx("h2",{className:"text-sm font-semibold text-zinc-900 dark:text-zinc-100",children:e.name}),d.jsx("p",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:e.description})]}),d.jsx("button",{type:"button",onClick:t,className:"rounded-md p-1 text-zinc-400 hover:bg-zinc-100 hover:text-zinc-600 dark:text-zinc-500 dark:hover:bg-zinc-800 dark:hover:text-zinc-300",children:d.jsx(Bn,{className:"h-4 w-4"})})]}),(e.known_for||e.philosophy||e.focus_areas.length>0)&&d.jsxs("div",{className:"border-b border-zinc-200 px-5 py-3 dark:border-zinc-700",children:[e.known_for&&d.jsxs("p",{className:"mb-1.5 text-xs",children:[d.jsx("span",{className:"font-semibold text-zinc-600 dark:text-zinc-300",children:"Known for: "}),d.jsx("span",{className:"text-zinc-500 dark:text-zinc-400",children:e.known_for})]}),e.philosophy&&d.jsxs("p",{className:"mb-2 text-xs italic text-zinc-500 dark:text-zinc-400",children:["“",e.philosophy,"”"]}),e.focus_areas.length>0&&d.jsx("div",{className:"flex flex-wrap gap-1",children:e.focus_areas.map(o=>d.jsx("span",{className:"rounded-full bg-zinc-100 px-2 py-0.5 text-[10px] text-zinc-600 dark:bg-zinc-800 dark:text-zinc-400",children:o},o))})]}),d.jsxs("div",{className:"flex-1 overflow-y-auto px-6 py-5",children:[a&&d.jsx("p",{className:"text-sm text-zinc-400 dark:text-zinc-500",children:"Loading prompt..."}),l&&d.jsx("div",{className:"rounded-lg border border-red-200 bg-red-50 p-4 text-sm text-red-600 dark:border-red-800 dark:bg-red-950/30 dark:text-red-400",children:"Prompt file not found. The reviewer may have been removed from disk."}),r?.content&&d.jsx(jr,{content:r.content})]})]})}):null}function d9({open:e,onClose:t}){const{socket:r}=si(),[a,l]=_.useState(""),[o,c]=_.useState(""),[f,h]=_.useState(""),[m,g]=_.useState(null),[x,y]=_.useState(!1),v=_.useRef(null),k=_.useRef(null),E=z5(a),S=E.length>0&&o.trim().length>0&&m===null;_.useEffect(()=>{e&&(l(""),c(""),h(""),g(null),y(!1),setTimeout(()=>v.current?.focus(),50))},[e]),_.useEffect(()=>{if(!e)return;const O=T=>{T.key==="Escape"&&m===null&&t()};return window.addEventListener("keydown",O),()=>window.removeEventListener("keydown",O)},[e,t,m]),ut("command:started",O=>{O.command.startsWith("create-reviewer")&&g(O.execution_id)}),ut("command:output",O=>{O.execution_id===m&&(h(T=>T+O.content),setTimeout(()=>{k.current&&(k.current.scrollTop=k.current.scrollHeight)},0))}),ut("command:finished",O=>{O.execution_id===m&&(g(null),y(!0))});const N=_.useCallback(()=>{if(!S||!r)return;h(""),y(!1);const O=`create-reviewer ${E} --focus "${o.replace(/"/g,'\\"')}"`;r.emit("command:run",{command:O})},[S,r,E,o]);return e?d.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm",children:d.jsxs("div",{role:"dialog","aria-modal":"true",className:"flex w-full max-w-lg flex-col overflow-hidden rounded-xl border border-zinc-200 bg-white shadow-2xl dark:border-zinc-700 dark:bg-zinc-900",children:[d.jsxs("div",{className:"flex items-center justify-between border-b border-zinc-200 px-5 py-3.5 dark:border-zinc-700",children:[d.jsx("h2",{className:"text-sm font-semibold text-zinc-900 dark:text-zinc-100",children:"Create Reviewer"}),d.jsx("button",{type:"button",onClick:t,disabled:m!==null,className:"rounded-md p-1 text-zinc-400 hover:bg-zinc-100 hover:text-zinc-600 disabled:opacity-30 dark:text-zinc-500 dark:hover:bg-zinc-800 dark:hover:text-zinc-300",children:d.jsx(Bn,{className:"h-4 w-4"})})]}),d.jsxs("div",{className:"space-y-4 px-5 py-4",children:[d.jsxs("div",{children:[d.jsx("label",{className:"mb-1 block text-xs font-medium text-zinc-700 dark:text-zinc-300",children:"Reviewer Name"}),d.jsx("input",{ref:v,type:"text",value:a,onChange:O=>l(O.target.value),placeholder:"e.g. API Design, Rust Safety, GraphQL",disabled:m!==null,className:re("w-full rounded-md border py-2 px-3 text-sm","border-zinc-200 bg-zinc-50 placeholder:text-zinc-400","dark:border-zinc-700 dark:bg-zinc-800 dark:placeholder:text-zinc-500","focus:border-indigo-400 focus:outline-none focus:ring-1 focus:ring-indigo-400/50","disabled:opacity-50")}),E&&d.jsxs("p",{className:"mt-1 text-[11px] text-zinc-400 dark:text-zinc-500",children:["Slug: ",d.jsx("code",{className:"rounded bg-zinc-100 px-1 py-0.5 dark:bg-zinc-800",children:E})]})]}),d.jsxs("div",{children:[d.jsx("label",{className:"mb-1 block text-xs font-medium text-zinc-700 dark:text-zinc-300",children:"What should this reviewer focus on?"}),d.jsx("textarea",{value:o,onChange:O=>c(O.target.value),placeholder:"e.g. REST API design, backwards compatibility, versioning, error response consistency, pagination patterns",rows:3,disabled:m!==null,className:re("w-full resize-none rounded-md border py-2 px-3 text-sm","border-zinc-200 bg-zinc-50 placeholder:text-zinc-400","dark:border-zinc-700 dark:bg-zinc-800 dark:placeholder:text-zinc-500","focus:border-indigo-400 focus:outline-none focus:ring-1 focus:ring-indigo-400/50","disabled:opacity-50")})]})]}),f&&d.jsx("div",{ref:k,className:"mx-5 mb-4 max-h-48 overflow-y-auto rounded-lg border border-zinc-200 bg-zinc-50 p-3 font-mono text-[11px] leading-relaxed text-zinc-600 dark:border-zinc-700 dark:bg-zinc-800 dark:text-zinc-400",children:d.jsx("pre",{className:"whitespace-pre-wrap",children:f})}),d.jsx("div",{className:"flex items-center justify-end gap-2 border-t border-zinc-200 px-5 py-3 dark:border-zinc-700",children:x?d.jsx("button",{type:"button",onClick:t,className:"rounded-md bg-indigo-600 px-4 py-1.5 text-xs font-medium text-white transition-colors hover:bg-indigo-700",children:"Done"}):d.jsxs(d.Fragment,{children:[d.jsx("button",{type:"button",onClick:t,disabled:m!==null,className:"rounded-md border border-zinc-300 px-4 py-1.5 text-xs font-medium transition-colors hover:bg-zinc-100 disabled:opacity-30 dark:border-zinc-700 dark:hover:bg-zinc-800",children:"Cancel"}),d.jsx("button",{type:"button",onClick:N,disabled:!S,className:"flex items-center gap-1.5 rounded-md bg-indigo-600 px-4 py-1.5 text-xs font-medium text-white transition-colors hover:bg-indigo-700 disabled:opacity-50",children:m!==null?d.jsxs(d.Fragment,{children:[d.jsx(qr,{className:"h-3 w-3 animate-spin"}),"Creating..."]}):d.jsxs(d.Fragment,{children:[d.jsx(pa,{className:"h-3 w-3"}),"Create"]})})]})})]})}):null}function f9(){const{reviewers:e,isLoaded:t}=Jm(),{isAvailable:r}=jo(),{socket:a}=si(),{data:l}=gk(),o=_.useMemo(()=>{const j={};for(const G of l?.team??[])j[G.persona]=(j[G.persona]??0)+1;return j},[l]),[c,f]=_.useState(""),[h,m]=_.useState(new Set),[g,x]=_.useState(null),[y,v]=_.useState(!1),[k,E]=_.useState(null),S=_.useMemo(()=>mk(e,c),[e,c]),N=_.useMemo(()=>pk(S),[S]),O=g?e.find(j=>j.id===g)??null:null;function T(j){m(G=>{const A=new Set(G);return A.has(j)?A.delete(j):A.add(j),A})}const P=k!==null;ut("command:started",j=>{j.command.startsWith("sync-reviewers")&&E(j.execution_id)}),ut("command:finished",j=>{j.execution_id===k&&E(null)});const $=_.useCallback(()=>{!a||P||a.emit("command:run",{command:"sync-reviewers"})},[a,P]);return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("h1",{className:"text-2xl font-semibold",children:"Review Team"}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsxs("button",{type:"button",onClick:$,disabled:!r||P,title:r?"Sync reviewer metadata":"AI CLI required",className:re("flex items-center gap-1.5 rounded-md border px-3 py-1.5 text-xs font-medium transition-colors","border-zinc-300 text-zinc-600 hover:bg-zinc-100","dark:border-zinc-700 dark:text-zinc-400 dark:hover:bg-zinc-800","disabled:opacity-40 disabled:cursor-not-allowed"),children:[P?d.jsx(qr,{className:"h-3.5 w-3.5 animate-spin"}):d.jsx(vo,{className:"h-3.5 w-3.5"}),"Sync"]}),d.jsxs("button",{type:"button",onClick:()=>v(!0),disabled:!r,title:r?"Create a new reviewer":"AI CLI required to create reviewers",className:re("flex items-center gap-1.5 rounded-md bg-indigo-600 px-3 py-1.5 text-xs font-medium text-white transition-colors","hover:bg-indigo-700","disabled:opacity-40 disabled:cursor-not-allowed"),children:[d.jsx(pa,{className:"h-3.5 w-3.5"}),"Create Reviewer"]})]})]}),d.jsx("p",{className:"mt-1 text-sm text-zinc-500 dark:text-zinc-400",children:"Manage your AI reviewer personas."})]}),d.jsx(K6,{}),d.jsxs("div",{className:"relative",children:[d.jsx(Qu,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-zinc-400"}),d.jsx("input",{type:"text",value:c,onChange:j=>f(j.target.value),placeholder:"Search reviewers...",className:re("w-full rounded-lg border py-2.5 pl-9 pr-4 text-sm","border-zinc-200 bg-zinc-50 placeholder:text-zinc-400","dark:border-zinc-800 dark:bg-zinc-900 dark:placeholder:text-zinc-500","focus:border-indigo-400 focus:outline-none focus:ring-1 focus:ring-indigo-400/50")})]}),t?e.length===0?d.jsxs("div",{className:"rounded-lg border border-zinc-200 bg-zinc-50 p-8 text-center dark:border-zinc-800 dark:bg-zinc-900/50",children:[d.jsx(Zm,{className:"mx-auto mb-3 h-8 w-8 text-zinc-300 dark:text-zinc-600"}),d.jsx("h3",{className:"text-sm font-medium text-zinc-900 dark:text-zinc-100",children:"No reviewers found"}),d.jsxs("p",{className:"mt-1 text-sm text-zinc-500 dark:text-zinc-400",children:["Click ",d.jsx("strong",{children:"Sync"})," above or run"," ",d.jsx("code",{className:"rounded bg-zinc-200 px-1.5 py-0.5 text-xs dark:bg-zinc-800",children:"/ocr:sync-reviewers"})," ","from your IDE to populate your reviewer team."]})]}):N.length===0?d.jsx("p",{className:"py-8 text-center text-sm text-zinc-400 dark:text-zinc-500",children:"No reviewers match your search."}):d.jsx("div",{className:"space-y-6",children:N.map(([j,G])=>{const A=h.has(j),ie=Ou[j];return d.jsxs("div",{children:[d.jsxs("button",{type:"button",onClick:()=>T(j),className:"mb-3 flex w-full items-center gap-2 text-left text-xs font-semibold uppercase tracking-wider text-zinc-400 hover:text-zinc-600 dark:text-zinc-500 dark:hover:text-zinc-300",children:[A?d.jsx(ji,{className:"h-3.5 w-3.5"}):d.jsx(Za,{className:"h-3.5 w-3.5"}),ie.label,d.jsxs("span",{className:"font-normal text-zinc-300 dark:text-zinc-600",children:["(",G.length,")"]})]}),!A&&d.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",children:G.map(F=>d.jsx(q6,{reviewer:F,onViewPrompt:x,inDefaultTeamCount:o[F.id]??0},F.id))})]},j)})}):d.jsx("p",{className:"text-sm text-zinc-400 dark:text-zinc-500",children:"Loading reviewers..."}),d.jsx(u9,{reviewer:O,onClose:()=>x(null)}),d.jsx(d9,{open:y,onClose:()=>v(!1)})]})}function Kw({value:e,max:t,className:r,showLabel:a=!1,size:l="md"}){const o=t>0?Math.round(e/t*100):0,c=Math.min(100,Math.max(0,o));return d.jsxs("div",{className:re("flex items-center gap-2",r),children:[d.jsx("div",{className:re("flex-1 overflow-hidden rounded-full bg-zinc-200 dark:bg-zinc-800",l==="sm"?"h-1.5":"h-2.5"),role:"progressbar","aria-valuenow":e,"aria-valuemin":0,"aria-valuemax":t,"aria-label":`${e} of ${t} (${c}%)`,children:d.jsx("div",{className:re("h-full rounded-full transition-all duration-300",c===100?"bg-emerald-500":c>50?"bg-blue-500":"bg-amber-500"),style:{width:`${c}%`}})}),a&&d.jsxs("span",{className:"text-xs tabular-nums text-zinc-500 dark:text-zinc-400",children:[e,"/",t]})]})}function h9({file:e,onToggle:t,highlighted:r}){const{data:a}=Qs();return d.jsxs("label",{"data-file-id":e.id,className:re("group flex cursor-pointer items-center gap-3 px-4 py-2.5 pl-11 transition-colors hover:bg-zinc-50 dark:hover:bg-zinc-800/50",r&&"bg-indigo-50 ring-1 ring-inset ring-indigo-200 dark:bg-indigo-950/30 dark:ring-indigo-800"),children:[d.jsx("input",{type:"checkbox",checked:e.is_reviewed,onChange:l=>t(l.target.checked),className:"h-4 w-4 rounded border-zinc-300 text-emerald-600 focus:ring-emerald-500 dark:border-zinc-600 dark:bg-zinc-800"}),d.jsx(Ao,{className:"h-4 w-4 shrink-0 text-zinc-400"}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsxs("span",{className:"flex items-center gap-1.5",children:[a?d.jsx("a",{href:Ru(a.ide,a.projectRoot,e.file_path),onClick:l=>l.stopPropagation(),className:re("truncate text-sm font-mono hover:underline",e.is_reviewed?"text-zinc-400 line-through dark:text-zinc-500":"text-zinc-900 dark:text-zinc-100"),title:`Open in ${a.ide}`,children:e.file_path}):d.jsx("span",{className:re("truncate text-sm font-mono",e.is_reviewed?"text-zinc-400 line-through dark:text-zinc-500":"text-zinc-900 dark:text-zinc-100"),children:e.file_path}),a&&d.jsx(Qm,{className:"h-3 w-3 shrink-0 text-zinc-400 opacity-0 transition-opacity group-hover:opacity-100"})]}),e.role&&d.jsx("span",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:e.role})]}),d.jsxs("div",{className:"flex items-center gap-2 text-xs tabular-nums",children:[e.lines_added>0&&d.jsxs("span",{className:"flex items-center gap-0.5 text-emerald-600 dark:text-emerald-400",children:[d.jsx(pa,{className:"h-3 w-3"}),e.lines_added]}),e.lines_deleted>0&&d.jsxs("span",{className:"flex items-center gap-0.5 text-red-600 dark:text-red-400",children:[d.jsx(xo,{className:"h-3 w-3"}),e.lines_deleted]})]})]})}function m9({section:e,onToggleFile:t}){const[r,a]=_.useState(!1),[l,o]=_.useState(null),c=_.useRef(null),{data:f}=Qs();_.useEffect(()=>{!r||l==null||!c.current||requestAnimationFrame(()=>{c.current?.querySelector(`[data-file-id="${l}"]`)?.scrollIntoView({behavior:"smooth",block:"nearest"})})},[r,l]);const h=_.useCallback(m=>{if(m.stopPropagation(),!f||e.files.length===0)return;a(!0);const g=e.files.find(E=>!E.is_reviewed);o(g?.id??e.files[0]?.id??null);const x=e.files.filter(E=>!E.is_reviewed),v=(x.length>0?x:e.files).map(E=>Ru(f.ide,f.projectRoot,E.file_path));function k(E){if(E>=v.length)return;const S=document.createElement("iframe");S.style.display="none",S.src=v[E],document.body.appendChild(S),setTimeout(()=>{S.remove(),k(E+1)},500)}k(0)},[f,e.files]);return d.jsxs("div",{className:"rounded-lg border border-zinc-200 bg-white dark:border-zinc-800 dark:bg-zinc-900",children:[d.jsxs("button",{onClick:()=>a(!r),"aria-expanded":r,className:"flex w-full items-start gap-3 p-4 text-left transition-colors hover:bg-zinc-50 dark:hover:bg-zinc-800/50",children:[d.jsx("div",{className:"mt-0.5 text-zinc-400",children:r?d.jsx(Za,{className:"h-4 w-4"}):d.jsx(ji,{className:"h-4 w-4"})}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(hR,{className:"h-4 w-4 text-zinc-400"}),d.jsxs("span",{className:"text-sm font-medium text-zinc-900 dark:text-zinc-100",children:[e.section_number,". ",e.title]}),d.jsxs("span",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:[e.file_count," ",e.file_count===1?"file":"files"]}),f&&e.files.length>0&&d.jsxs("button",{onClick:h,title:`Open all ${e.file_count} files in ${f.ide}`,className:"inline-flex items-center gap-1 rounded-md border border-zinc-200 bg-white px-2 py-0.5 text-xs text-zinc-600 transition-colors hover:border-zinc-300 hover:bg-zinc-50 hover:text-zinc-900 dark:border-zinc-700 dark:bg-zinc-800 dark:text-zinc-400 dark:hover:border-zinc-600 dark:hover:bg-zinc-700 dark:hover:text-zinc-200",children:[d.jsx(dR,{className:"h-3 w-3"}),"Open all"]})]}),e.description&&d.jsx("p",{className:"mt-1 text-xs text-zinc-500 dark:text-zinc-400",children:e.description}),d.jsx("div",{className:"mt-2",children:d.jsx(Kw,{value:e.reviewed_count,max:e.file_count,showLabel:!0,size:"sm"})})]})]}),r&&d.jsx("div",{ref:c,className:re("border-t border-zinc-200 dark:border-zinc-800",e.files.length>0&&"divide-y divide-zinc-100 dark:divide-zinc-800"),children:e.files.length===0?d.jsx("p",{className:"px-4 py-3 text-sm text-zinc-500 dark:text-zinc-400",children:"No files in this section."}):e.files.map(m=>d.jsx(h9,{file:m,highlighted:m.id===l,onToggle:g=>{if(t(m.id,g),g&&m.id===l){const x=e.files.find(y=>y.id!==m.id&&!y.is_reviewed);o(x?.id??null)}}},m.id))})]})}function p9({onConfirm:e,isPending:t}){const[r,a]=_.useState(!1),l=_.useRef(null),o=_.useCallback(()=>a(!1),[]);return _.useEffect(()=>{if(!r)return;const c=f=>{f.key==="Escape"&&o()};return document.addEventListener("keydown",c),l.current?.focus(),()=>document.removeEventListener("keydown",c)},[r,o]),d.jsxs(d.Fragment,{children:[d.jsxs("button",{onClick:()=>a(!0),className:"inline-flex items-center gap-1.5 rounded-md border border-zinc-200 px-3 py-1.5 text-xs font-medium text-zinc-600 transition-colors hover:bg-zinc-100 hover:text-zinc-900 dark:border-zinc-700 dark:text-zinc-400 dark:hover:bg-zinc-800 dark:hover:text-zinc-100",children:[d.jsx(EA,{className:"h-3.5 w-3.5"}),"Clear Progress"]}),r&&d.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[d.jsx("div",{className:"fixed inset-0 bg-black/50",onClick:o}),d.jsxs("div",{ref:l,role:"dialog","aria-modal":"true","aria-labelledby":"clear-progress-title",tabIndex:-1,className:"relative z-10 w-full max-w-sm rounded-lg border border-zinc-200 bg-white p-6 shadow-lg dark:border-zinc-800 dark:bg-zinc-900",children:[d.jsx("button",{onClick:o,className:"absolute right-4 top-4 text-zinc-400 hover:text-zinc-600 dark:hover:text-zinc-300","aria-label":"Close dialog",children:d.jsx(Bn,{className:"h-4 w-4"})}),d.jsx("h3",{id:"clear-progress-title",className:"text-lg font-semibold text-zinc-900 dark:text-zinc-100",children:"Clear all progress?"}),d.jsx("p",{className:"mt-2 text-sm text-zinc-600 dark:text-zinc-400",children:"This will uncheck all reviewed files for this map run. This action cannot be undone."}),d.jsxs("div",{className:"mt-6 flex justify-end gap-3",children:[d.jsx("button",{onClick:()=>a(!1),className:"rounded-md border border-zinc-200 px-3 py-1.5 text-sm font-medium text-zinc-700 transition-colors hover:bg-zinc-100 dark:border-zinc-700 dark:text-zinc-300 dark:hover:bg-zinc-800",children:"Cancel"}),d.jsx("button",{onClick:()=>{e(),a(!1)},disabled:t,className:re("rounded-md bg-red-600 px-3 py-1.5 text-sm font-medium text-white transition-colors hover:bg-red-700",t&&"cursor-not-allowed opacity-50"),children:t?"Clearing...":"Clear Progress"})]})]})]})]})}function g9(e,t){const r=An(),a=["sessions",e,"runs",t],l=nn({queryKey:a,queryFn:()=>Dt(`/api/sessions/${e}/runs/${t}`),enabled:!!e&&t>0});return ut("artifact:updated",()=>{r.invalidateQueries({queryKey:a})}),l}function b9(e){return nn({queryKey:["sessions",e,"artifacts","map"],queryFn:()=>Dt(`/api/sessions/${e}/artifacts/map`),enabled:!!e})}function x9(e,t){const r=An(),a=["sessions",e,"runs",t];return Ro({mutationFn:async({fileId:l,isReviewed:o})=>Dt(`/api/map-files/${l}/progress`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({is_reviewed:o})}),onMutate:async({fileId:l,isReviewed:o})=>{await r.cancelQueries({queryKey:a});const c=r.getQueryData(a);return c&&r.setQueryData(a,{...c,sections:c.sections.map(f=>({...f,reviewed_count:f.files.some(h=>h.id===l)?f.reviewed_count+(o?1:-1):f.reviewed_count,files:f.files.map(h=>h.id===l?{...h,is_reviewed:o,reviewed_at:o?new Date().toISOString():null}:h)}))}),{previous:c}},onError:(l,o,c)=>{c?.previous&&r.setQueryData(a,c.previous)},onSettled:()=>{r.invalidateQueries({queryKey:a})}})}function y9(e,t){const r=An();return Ro({mutationFn:async a=>Dt(`/api/map-runs/${a}/progress`,{method:"DELETE"}),onSuccess:()=>{r.invalidateQueries({queryKey:["sessions",e,"runs",t]})}})}function v9({sessionId:e}){const[t,r]=_.useState(!1),{data:a,isLoading:l}=b9(e),o=_.useRef(null),c=_.useCallback(()=>r(!1),[]);return _.useEffect(()=>{if(!t)return;const f=h=>{h.key==="Escape"&&c()};return document.addEventListener("keydown",f),o.current?.focus(),()=>document.removeEventListener("keydown",f)},[t,c]),d.jsxs(d.Fragment,{children:[d.jsxs("button",{onClick:()=>r(!0),className:"inline-flex items-center gap-1.5 rounded-md border border-zinc-200 px-3 py-1.5 text-xs font-medium text-zinc-600 transition-colors hover:bg-zinc-100 hover:text-zinc-900 dark:border-zinc-700 dark:text-zinc-400 dark:hover:bg-zinc-800 dark:hover:text-zinc-100",children:[d.jsx(aR,{className:"h-3.5 w-3.5"}),"View Raw Map"]}),t&&d.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[d.jsx("div",{className:"fixed inset-0 bg-black/50",onClick:c}),d.jsxs("div",{ref:o,role:"dialog","aria-modal":"true","aria-labelledby":"raw-map-title",tabIndex:-1,className:"relative z-10 flex max-h-[85vh] w-full max-w-4xl flex-col rounded-lg border border-zinc-200 bg-white shadow-lg dark:border-zinc-800 dark:bg-zinc-900",children:[d.jsxs("div",{className:"flex items-center justify-between border-b border-zinc-200 px-6 py-4 dark:border-zinc-800",children:[d.jsx("h3",{id:"raw-map-title",className:"text-lg font-semibold text-zinc-900 dark:text-zinc-100",children:"Raw Map Output"}),d.jsx("button",{onClick:c,className:"text-zinc-400 hover:text-zinc-600 dark:hover:text-zinc-300","aria-label":"Close",children:d.jsx(Bn,{className:"h-5 w-5"})})]}),d.jsx("div",{className:"flex-1 overflow-y-auto px-6 py-4",children:l?d.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Loading map content..."}):a?.content?d.jsx(jr,{content:a.content}):d.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"No map content available."})})]})]})]})}const k9="modulepreload",w9=function(e){return"/"+e},vv={},_9=function(t,r,a){let l=Promise.resolve();if(r&&r.length>0){let c=function(m){return Promise.all(m.map(g=>Promise.resolve(g).then(x=>({status:"fulfilled",value:x}),x=>({status:"rejected",reason:x}))))};document.getElementsByTagName("link");const f=document.querySelector("meta[property=csp-nonce]"),h=f?.nonce||f?.getAttribute("nonce");l=c(r.map(m=>{if(m=w9(m),m in vv)return;vv[m]=!0;const g=m.endsWith(".css"),x=g?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${m}"]${x}`))return;const y=document.createElement("link");if(y.rel=g?"stylesheet":k9,g||(y.as="script"),y.crossOrigin="",y.href=m,h&&y.setAttribute("nonce",h),document.head.appendChild(y),g)return new Promise((v,k)=>{y.addEventListener("load",v),y.addEventListener("error",()=>k(new Error(`Unable to preload CSS for ${m}`)))})}))}function o(c){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=c,window.dispatchEvent(f),!f.defaultPrevented)throw c}return l.then(c=>{for(const f of c||[])f.status==="rejected"&&o(f.reason);return t().catch(o)})},E9=_.lazy(()=>_9(()=>import("./mermaid-renderer-dJ71wgld.js").then(e=>e.bC),[]));function N9({sessionId:e,runNumber:t,sections:r,onSectionClick:a}){const{resolved:l}=o1(),{data:o,isLoading:c}=nn({queryKey:["sessions",e,"runs",t,"graph"],queryFn:async()=>{try{return await Dt(`/api/sessions/${e}/runs/${t}/graph`)}catch(m){if(m instanceof Error&&m.message.startsWith("404:"))return null;throw m}},enabled:!!e&&t>0,retry:!1}),f=_.useMemo(()=>o?.dependencies?S9(o.dependencies,r,l):null,[o?.dependencies,r,l]),h=_.useCallback(m=>{const g=r.find(x=>lo(x.title)===m);g&&a&&a(g.id)},[r,a]);return c||!f?null:d.jsxs("div",{className:"overflow-hidden rounded-lg border border-zinc-200 dark:border-zinc-800",children:[d.jsxs("div",{className:"flex items-center gap-2 border-b border-zinc-200 bg-zinc-50 px-4 py-3 dark:border-zinc-800 dark:bg-zinc-900",children:[d.jsx(Ys,{className:"h-4 w-4 text-zinc-500 dark:text-zinc-400"}),d.jsx("span",{className:"text-sm font-medium",children:"Section Dependencies"})]}),d.jsx("div",{className:"p-4",children:d.jsx(_.Suspense,{fallback:d.jsx("div",{className:"h-64 animate-pulse rounded-lg bg-zinc-100 dark:bg-zinc-800"}),children:d.jsx(E9,{definition:f,onNodeClick:h})})})]})}function S9(e,t,r){if(t.length===0)return null;const a=r==="dark",l=["graph TD"];for(const o of t){const c=lo(o.title),f=o.reviewed_count,h=o.file_count,m=`${o.title}<br/>${f}/${h} files`;l.push(` ${c}["${m}"]`)}for(const o of e){const c=lo(o.fromTitle),f=lo(o.toTitle),h=o.relationship.replace(/"/g,"'");l.push(` ${c} -->|"${h}"| ${f}`)}a?(l.push(""),l.push(" classDef notStarted fill:#27272a,stroke:#71717a,color:#d4d4d8"),l.push(" classDef inProgress fill:#422006,stroke:#f59e0b,color:#fef3c7"),l.push(" classDef complete fill:#052e16,stroke:#22c55e,color:#dcfce7")):(l.push(""),l.push(" classDef notStarted fill:#f4f4f5,stroke:#a1a1aa,color:#3f3f46"),l.push(" classDef inProgress fill:#fef9c3,stroke:#f59e0b,color:#78350f"),l.push(" classDef complete fill:#dcfce7,stroke:#22c55e,color:#166534"));for(const o of t){const c=lo(o.title),f=o.file_count>0?o.reviewed_count/o.file_count:0;f>=1?l.push(` class ${c} complete`):f>0?l.push(` class ${c} inProgress`):l.push(` class ${c} notStarted`)}return l.join(`
570
+ `)}function lo(e){return e.replace(/[^a-zA-Z0-9]/g,"_").replace(/_+/g,"_").replace(/^_|_$/g,"")}function z9(e,t,r){const{socket:a}=si(),l=`chat-${e}-${t}-${r}`,[o,c]=_.useState([]),[f,h]=_.useState(!1),[m,g]=_.useState(""),[x,y]=_.useState(null),[v,k]=_.useState([]),[E,S]=_.useState(null),N=_.useRef("");_.useEffect(()=>{a&&a.emit("chat:history",{conversationId:l})},[a,l]),ut("chat:history:result",_.useCallback(T=>{T.conversationId===l&&c(T.messages)},[l])),ut("chat:token",_.useCallback(T=>{T.conversationId===l&&(N.current+=T.token,g(N.current))},[l])),ut("chat:status",_.useCallback(T=>{if(T.conversationId!==l)return;const P={tool:T.tool,detail:T.detail,timestamp:Date.now()};y(P),k($=>[...$,P])},[l])),ut("chat:done",_.useCallback(T=>{if(T.conversationId!==l)return;const P={id:Date.now(),conversation_id:l,role:"assistant",content:N.current,created_at:new Date().toISOString()};c($=>[...$,P]),h(!1),g(""),y(null),k([]),N.current=""},[l])),ut("chat:error",_.useCallback(T=>{T.conversationId===l&&(S(T.error),h(!1),g(""),y(null),k([]),N.current="")},[l]));const O=_.useCallback(T=>{if(!a||!T.trim()||f)return;const P={id:Date.now(),conversation_id:l,role:"user",content:T.trim(),created_at:new Date().toISOString()};c($=>[...$,P]),h(!0),S(null),y(null),k([]),N.current="",a.emit("chat:send",{conversationId:l,sessionId:e,targetType:t,targetId:r,message:T.trim()})},[a,l,e,t,r,f]);return{messages:o,sendMessage:O,isStreaming:f,streamingContent:m,toolStatus:x,toolHistory:v,error:E}}const kv=3;function wv({currentStatus:e,history:t}){const[r,a]=_.useState(!1),l=e?t.filter(h=>h.timestamp!==e.timestamp):t,o=l.length>kv,c=r?l:l.slice(-kv),f=l.length-c.length;return!e&&l.length===0?null:d.jsxs("div",{className:"space-y-1",children:[l.length>0&&d.jsxs("div",{className:"space-y-0.5",children:[o&&f>0&&d.jsxs("button",{type:"button",onClick:()=>a(h=>!h),className:"flex items-center gap-1 text-[11px] text-zinc-400 transition-colors hover:text-zinc-600 dark:text-zinc-500 dark:hover:text-zinc-400",children:[r?d.jsx(Za,{className:"h-3 w-3"}):d.jsx(ji,{className:"h-3 w-3"}),r?"Collapse":`${f} more step${f!==1?"s":""}`]}),c.map((h,m)=>d.jsxs("div",{className:"flex items-center gap-1.5 text-[11px] text-zinc-400 dark:text-zinc-500",children:[d.jsx(Mr,{className:"h-3 w-3 flex-shrink-0 text-emerald-500"}),d.jsx("span",{className:"truncate",children:h.detail})]},h.timestamp+m))]}),e&&d.jsxs("div",{className:re("flex items-center gap-1.5 text-[11px] font-medium","text-indigo-600 dark:text-indigo-400"),children:[d.jsxs("span",{className:"relative flex h-2 w-2 flex-shrink-0",children:[d.jsx("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-indigo-400 opacity-75"}),d.jsx("span",{className:"relative inline-flex h-2 w-2 rounded-full bg-indigo-500"})]}),d.jsx("span",{className:"truncate",children:e.detail})]})]})}function C9({message:e}){const t=e.role==="user",r=ri(e.created_at).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"});return d.jsxs("div",{className:re("flex flex-col",t?"items-end":"items-start"),children:[d.jsx("div",{className:re("max-w-[85%] rounded-lg px-3 py-2 text-sm",t?"bg-indigo-600 text-white":"bg-zinc-100 text-zinc-900 dark:bg-zinc-800 dark:text-zinc-100"),children:t?d.jsx("p",{className:"whitespace-pre-wrap",children:e.content}):d.jsx(jr,{content:e.content})}),d.jsx("span",{className:"mt-1 text-[10px] text-zinc-400 dark:text-zinc-500",children:r})]})}const _v=["Reading the code review artifacts...","Analyzing the changeset structure...","Examining file relationships...","Reviewing the findings...","Connecting the patterns...","Preparing a thoughtful response..."];function T9({content:e,toolStatus:t,toolHistory:r}){const[a,l]=_.useState(0),o=t!==null||r.length>0;return _.useEffect(()=>{if(e||o)return;const c=setInterval(()=>{l(f=>(f+1)%_v.length)},2500);return()=>clearInterval(c)},[e,o]),d.jsx("div",{className:"flex flex-col items-start",children:d.jsxs("div",{className:"max-w-[85%] rounded-lg bg-zinc-100 px-3 py-2 text-sm text-zinc-900 dark:bg-zinc-800 dark:text-zinc-100",children:[e?d.jsxs(d.Fragment,{children:[d.jsx(jr,{content:e}),d.jsx("span",{className:"ml-0.5 inline-block h-4 w-0.5 animate-pulse bg-zinc-400 dark:bg-zinc-500"})]}):o?d.jsx(wv,{currentStatus:t,history:r}):d.jsx(R9,{phrase:_v[a]}),e&&o&&d.jsx("div",{className:"mt-2 border-t border-zinc-200 pt-2 dark:border-zinc-700",children:d.jsx(wv,{currentStatus:t,history:r})})]})})}function R9({phrase:e}){return d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsxs("div",{className:"flex gap-1",children:[d.jsx("span",{className:"h-1.5 w-1.5 animate-bounce rounded-full bg-indigo-400 [animation-delay:0ms]"}),d.jsx("span",{className:"h-1.5 w-1.5 animate-bounce rounded-full bg-indigo-400 [animation-delay:150ms]"}),d.jsx("span",{className:"h-1.5 w-1.5 animate-bounce rounded-full bg-indigo-400 [animation-delay:300ms]"})]}),d.jsx("span",{className:"animate-pulse text-xs text-zinc-400 dark:text-zinc-500",children:e})]})}const A9={map_run:"Ask about this map...",review_round:"Ask about this review..."};function O9({onSend:e,isStreaming:t,disabled:r,targetType:a}){const[l,o]=_.useState(""),c=_.useRef(null),f=_.useCallback(()=>{const g=c.current;g&&(g.style.height="auto",g.style.height=`${Math.min(g.scrollHeight,80)}px`)},[]),h=_.useCallback(()=>{!l.trim()||t||r||(e(l),o(""),c.current&&(c.current.style.height="auto"))},[l,t,e]),m=_.useCallback(g=>{g.key==="Enter"&&!g.shiftKey&&(g.preventDefault(),h())},[h]);return d.jsxs("div",{className:"flex items-end gap-2 border-t border-zinc-200 bg-white p-3 dark:border-zinc-800 dark:bg-zinc-900",children:[d.jsx("textarea",{ref:c,value:l,onChange:g=>{o(g.target.value),f()},onKeyDown:m,placeholder:A9[a],rows:1,className:re("flex-1 resize-none rounded-md border border-zinc-300 bg-white px-3 py-2 text-sm","placeholder:text-zinc-400 focus:border-indigo-500 focus:outline-none focus:ring-1 focus:ring-indigo-500","dark:border-zinc-700 dark:bg-zinc-800 dark:placeholder:text-zinc-500")}),d.jsx("button",{type:"button",onClick:h,disabled:t||!l.trim(),className:re("flex-shrink-0 rounded-md p-2 transition-colors","bg-indigo-600 text-white hover:bg-indigo-700","disabled:cursor-not-allowed disabled:opacity-50"),children:d.jsx(tA,{className:"h-4 w-4"})})]})}function Vw({sessionId:e,targetType:t,targetId:r,onClose:a}){const{isAvailable:l,isDisabledByConfig:o}=jo(),{messages:c,sendMessage:f,isStreaming:h,streamingContent:m,toolStatus:g,toolHistory:x,error:y}=z9(e,t,r),v=_.useRef(null);return _.useEffect(()=>{function k(E){E.key==="Escape"&&a()}return document.addEventListener("keydown",k),()=>document.removeEventListener("keydown",k)},[a]),_.useEffect(()=>{const k=v.current;k&&(k.scrollTop=k.scrollHeight)},[c,m,g]),d.jsxs("div",{className:re("fixed right-0 top-0 z-50 flex h-full w-[400px] flex-col","border-l border-zinc-200 bg-white shadow-xl","dark:border-zinc-800 dark:bg-zinc-950"),children:[d.jsxs("div",{className:"flex items-center justify-between border-b border-zinc-200 px-4 py-3 dark:border-zinc-800",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(Au,{className:"h-4 w-4 text-indigo-500"}),d.jsx("h2",{className:"text-sm font-semibold text-zinc-900 dark:text-zinc-100",children:"Ask the Team"})]}),d.jsx("button",{type:"button",onClick:a,className:"rounded-md p-1 text-zinc-400 transition-colors hover:bg-zinc-100 hover:text-zinc-600 dark:hover:bg-zinc-800 dark:hover:text-zinc-300",children:d.jsx(Bn,{className:"h-4 w-4"})})]}),d.jsxs("div",{ref:v,className:"flex-1 space-y-4 overflow-y-auto p-4",children:[!l&&c.length===0&&d.jsxs("div",{className:"flex items-start gap-2.5 rounded-md border border-zinc-200 bg-zinc-50 p-3 dark:border-zinc-800 dark:bg-zinc-900/50",children:[d.jsx(Oi,{className:"mt-0.5 h-4 w-4 shrink-0 text-zinc-400"}),d.jsx("p",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:o?d.jsxs(d.Fragment,{children:["AI commands are turned off in your project config. Set ",d.jsx("code",{className:"rounded bg-zinc-200 px-1 py-0.5 text-[10px] dark:bg-zinc-800",children:"ai_cli"})," to ",d.jsx("code",{className:"rounded bg-zinc-200 px-1 py-0.5 text-[10px] dark:bg-zinc-800",children:"auto"}),", ",d.jsx("code",{className:"rounded bg-zinc-200 px-1 py-0.5 text-[10px] dark:bg-zinc-800",children:"claude"}),", or ",d.jsx("code",{className:"rounded bg-zinc-200 px-1 py-0.5 text-[10px] dark:bg-zinc-800",children:"opencode"})," in ",d.jsx("code",{className:"rounded bg-zinc-200 px-1 py-0.5 text-[10px] dark:bg-zinc-800",children:".ocr/config.yaml"})," to enable Ask the Team."]}):"Install Claude Code or OpenCode to use Ask the Team."})]}),l&&c.length===0&&!h&&d.jsxs("p",{className:"text-center text-sm text-zinc-400 dark:text-zinc-500",children:["Ask a question about this ",t==="map_run"?"map":"review"," to get started."]}),c.map(k=>d.jsx(C9,{message:k},k.id)),h&&d.jsx(T9,{content:m,toolStatus:g,toolHistory:x}),y&&d.jsx("div",{className:"rounded-md bg-red-50 px-3 py-2 text-sm text-red-700 dark:bg-red-900/20 dark:text-red-400",children:y})]}),d.jsx(O9,{onSend:f,isStreaming:h,disabled:!l,targetType:t})]})}function M9(){const{id:e,run:t}=qu(),r=parseInt(t??"0",10),{data:a,isLoading:l}=g9(e??"",r),o=x9(e??"",r),c=y9(e??"",r),[f,h]=_.useState(!1),m=_.useCallback(y=>{document.getElementById(`section-${y}`)?.scrollIntoView({behavior:"smooth",block:"start"})},[]);if(l)return d.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Loading map run..."});if(!a)return d.jsxs("div",{children:[d.jsxs(In,{to:`/sessions/${e}`,className:"mb-4 inline-flex items-center gap-1 text-sm text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-300",children:[d.jsx(xa,{className:"h-4 w-4"}),"Back to session"]}),d.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Map run not found."})]});const g=a.sections.reduce((y,v)=>y+v.file_count,0),x=a.sections.reduce((y,v)=>y+v.reviewed_count,0);return d.jsxs("div",{className:"space-y-6",children:[d.jsxs(In,{to:`/sessions/${e}`,className:"inline-flex items-center gap-1 text-sm text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-300",children:[d.jsx(xa,{className:"h-4 w-4"}),"Back to session"]}),d.jsxs("div",{className:"rounded-lg border border-zinc-200 bg-white p-6 dark:border-zinc-800 dark:bg-zinc-900",children:[d.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[d.jsxs("div",{className:"space-y-1",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(ya,{className:"h-5 w-5 text-zinc-400"}),d.jsxs("h1",{className:"text-xl font-semibold text-zinc-900 dark:text-zinc-100",children:["Map Run ",a.run_number]})]}),d.jsxs("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:[x," / ",g," files reviewed"]})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsxs("button",{type:"button",onClick:()=>h(!0),className:"inline-flex items-center gap-1.5 rounded-md border border-zinc-200 bg-white px-3 py-1.5 text-xs font-medium text-zinc-700 transition-colors hover:bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-800 dark:text-zinc-300 dark:hover:bg-zinc-700",children:[d.jsx(Au,{className:"h-3.5 w-3.5"}),"Ask the Team"]}),d.jsx(v9,{sessionId:e??""}),d.jsx(p9,{onConfirm:()=>c.mutate(a.id),isPending:c.isPending})]})]}),d.jsx("div",{className:"mt-4",children:d.jsx(Kw,{value:x,max:g,showLabel:!0})})]}),d.jsx(N9,{sessionId:e??"",runNumber:r,sections:a.sections,onSectionClick:m}),a.sections.length===0?d.jsx("div",{className:"rounded-lg border border-zinc-200 bg-white p-6 dark:border-zinc-800 dark:bg-zinc-900",children:d.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"No sections found in this map run."})}):d.jsx("div",{className:"space-y-3",children:a.sections.map(y=>d.jsx("div",{id:`section-${y.id}`,children:d.jsx(m9,{section:y,onToggleFile:(v,k)=>o.mutate({fileId:v,isReviewed:k})})},y.id))}),f&&d.jsx(Vw,{sessionId:e??"",targetType:"map_run",targetId:a.run_number,onClose:()=>h(!1)})]})}function j9(){const e=An();return ut("artifact:created",()=>{e.invalidateQueries({queryKey:["reviews"]})}),ut("artifact:updated",()=>{e.invalidateQueries({queryKey:["reviews"]})}),nn({queryKey:["reviews"],queryFn:()=>Dt("/api/reviews")})}function D9(e,t){const r=An(),a=["sessions",e,"rounds",t],l=nn({queryKey:a,queryFn:()=>Dt(`/api/sessions/${e}/rounds/${t}`),enabled:!!e&&t>0});return ut("artifact:created",()=>{r.invalidateQueries({queryKey:a})}),ut("artifact:updated",()=>{r.invalidateQueries({queryKey:a})}),l}function L9(e,t){return nn({queryKey:["sessions",e,"rounds",t,"findings"],queryFn:()=>Dt(`/api/sessions/${e}/rounds/${t}/findings`),enabled:!!e&&t>0})}function I9(e,t,r){return nn({queryKey:["sessions",e,"rounds",t,"reviewers",r],queryFn:()=>Dt(`/api/sessions/${e}/rounds/${t}/reviewers/${r}`),enabled:!!e&&t>0&&r>0})}function Kh(e,t){return nn({queryKey:["sessions",e,"artifacts",t],queryFn:()=>Dt(`/api/sessions/${e}/artifacts/${t}`),enabled:!!e&&!!t,retry:!1})}function B9(){const e=An();return Ro({mutationFn:({findingId:t,status:r})=>Dt(`/api/findings/${t}/progress`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:r})}),onSuccess:()=>{e.invalidateQueries({queryKey:["sessions"]})}})}function Yw(){const e=An();return Ro({mutationFn:({roundId:t,status:r})=>Dt(`/api/rounds/${t}/progress`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:r})}),onSuccess:()=>{e.invalidateQueries({queryKey:["reviews"]}),e.invalidateQueries({queryKey:["sessions"]})}})}const Qw={principal:Oo,quality:Va,security:oA,testing:vA},U9={principal:"text-violet-600 dark:text-violet-400 bg-violet-500/10 border-violet-500/25",quality:"text-blue-600 dark:text-blue-400 bg-blue-500/10 border-blue-500/25",security:"text-amber-600 dark:text-amber-400 bg-amber-500/10 border-amber-500/25",testing:"text-emerald-600 dark:text-emerald-400 bg-emerald-500/10 border-emerald-500/25"};function F9({sessionId:e,roundNumber:t,reviewer:r}){const a=Qw[r.reviewer_type]??Va,l=U9[r.reviewer_type]??"text-zinc-600 dark:text-zinc-400 bg-zinc-500/10 border-zinc-500/25";return d.jsx(In,{to:`/sessions/${e}/reviews/${t}/reviewers/${r.id}`,className:"group block rounded-lg border border-zinc-200 bg-white p-4 transition-colors hover:border-zinc-300 hover:bg-zinc-50 dark:border-zinc-800 dark:bg-zinc-900 dark:hover:border-zinc-700 dark:hover:bg-zinc-800/50",children:d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:`flex h-10 w-10 items-center justify-center rounded-lg border ${l}`,children:d.jsx(a,{className:"h-5 w-5"})}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsxs("div",{className:"text-sm font-medium capitalize text-zinc-900 dark:text-zinc-100",children:[r.reviewer_type,r.instance_number>1&&d.jsxs("span",{className:"ml-1 text-zinc-500 dark:text-zinc-400",children:["#",r.instance_number]})]}),d.jsxs("div",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:[r.finding_count," finding",r.finding_count!==1?"s":""]})]})]})})}const P9=[{value:"unread",label:"Unread"},{value:"read",label:"Read"},{value:"acknowledged",label:"Acknowledged"},{value:"fixed",label:"Fixed"},{value:"wont_fix",label:"Won't Fix"}];function H9({finding:e,onTriageChange:t}){const[r,a]=_.useState(!1),{data:l}=Qs(),o=_.useCallback(()=>a(h=>!h),[]),c=_.useCallback(h=>{(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),o())},[o]),f=e.line_start!=null?e.line_end!=null&&e.line_end!==e.line_start?`${e.line_start}-${e.line_end}`:String(e.line_start):"-";return d.jsxs(d.Fragment,{children:[d.jsxs("tr",{tabIndex:0,role:"row","aria-expanded":r,className:"cursor-pointer transition-colors hover:bg-zinc-50 dark:hover:bg-zinc-800/50",onClick:o,onKeyDown:c,children:[d.jsx("td",{className:"border-b border-zinc-200 px-4 py-2 dark:border-zinc-800",children:d.jsxs("div",{className:"flex items-center gap-1",children:[d.jsx(ji,{className:re("h-3.5 w-3.5 shrink-0 text-zinc-400 transition-transform",r&&"rotate-90")}),d.jsx(Xs,{variant:e.severity})]})}),d.jsx("td",{className:"border-b border-zinc-200 px-4 py-2 text-zinc-900 dark:border-zinc-800 dark:text-zinc-100",children:e.title}),d.jsx("td",{className:"border-b border-zinc-200 px-4 py-2 font-mono text-xs text-zinc-600 dark:border-zinc-800 dark:text-zinc-400",children:e.file_path&&l?d.jsxs("a",{href:Ru(l.ide,l.projectRoot,e.file_path,e.line_start),onClick:h=>h.stopPropagation(),className:"hover:text-zinc-900 hover:underline dark:hover:text-zinc-200",title:`Open in ${l.ide}`,children:[e.file_path,d.jsx(Qm,{className:"ml-1 inline h-3 w-3"})]}):e.file_path??"-"}),d.jsx("td",{className:"border-b border-zinc-200 px-4 py-2 tabular-nums text-zinc-600 dark:border-zinc-800 dark:text-zinc-400",children:e.file_path&&l&&e.line_start!=null?d.jsx("a",{href:Ru(l.ide,l.projectRoot,e.file_path,e.line_start),onClick:h=>h.stopPropagation(),className:"hover:text-zinc-900 hover:underline dark:hover:text-zinc-200",children:f}):f}),d.jsx("td",{className:"border-b border-zinc-200 px-4 py-2 dark:border-zinc-800",children:e.is_blocker?d.jsx("span",{className:"text-xs font-medium text-red-600 dark:text-red-400",children:"Yes"}):d.jsx("span",{className:"text-xs text-zinc-400",children:"No"})}),d.jsx("td",{className:"border-b border-zinc-200 px-4 py-2 dark:border-zinc-800",onClick:h=>h.stopPropagation(),children:d.jsx("select",{value:e.progress?.status??"unread",onChange:h=>t(e.id,h.target.value),"aria-label":`Triage status for ${e.title}`,className:"rounded-md border border-zinc-300 bg-white px-2 py-1 text-xs dark:border-zinc-700 dark:bg-zinc-900",children:P9.map(h=>d.jsx("option",{value:h.value,children:h.label},h.value))})})]}),r&&e.summary&&d.jsx("tr",{children:d.jsx("td",{colSpan:6,className:"border-b border-zinc-200 bg-zinc-50 px-4 py-3 dark:border-zinc-800 dark:bg-zinc-900/50",children:d.jsx(jr,{content:e.summary,className:"text-sm"})})})]})}function ha({label:e,field:t,activeField:r,direction:a,onSort:l}){return d.jsx("th",{className:"border-b border-zinc-200 px-4 py-2 text-left dark:border-zinc-800",children:d.jsxs("button",{onClick:()=>l(t),className:re("flex items-center gap-1 text-sm font-medium transition-colors",r===t?"text-zinc-900 dark:text-zinc-100":"text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-zinc-100"),children:[e,d.jsx(ek,{className:re("h-3 w-3",r===t?"opacity-100":"opacity-40",r===t&&a==="desc"&&"rotate-180")})]})})}const Ev={critical:0,high:1,medium:2,low:3,info:4},q9=[{value:"all",label:"All"},{value:"critical",label:"Critical"},{value:"high",label:"High"},{value:"medium",label:"Medium"},{value:"low",label:"Low"},{value:"info",label:"Info"}],$9=[{value:"all",label:"All"},{value:"unread",label:"Unread"},{value:"read",label:"Read"},{value:"acknowledged",label:"Acknowledged"},{value:"fixed",label:"Fixed"},{value:"wont_fix",label:"Won't Fix"}];function Xw({findings:e}){const[t,r]=_.useState("severity"),[a,l]=_.useState("asc"),[o,c]=_.useState("all"),[f,h]=_.useState("all"),m=B9();function g(k){t===k?l(E=>E==="asc"?"desc":"asc"):(r(k),l("asc"))}const x=_.useMemo(()=>{let k=e;return o!=="all"&&(k=k.filter(E=>E.severity===o)),f!=="all"&&(k=k.filter(E=>(E.progress?.status??"unread")===f)),k},[e,o,f]),y=_.useMemo(()=>{const k=a==="asc"?1:-1;return[...x].sort((E,S)=>t==="severity"?(Ev[E.severity]-Ev[S.severity])*k:t==="title"?E.title.localeCompare(S.title)*k:t==="file_path"?(E.file_path??"").localeCompare(S.file_path??"")*k:0)},[x,t,a]);function v(k,E){m.mutate({findingId:k,status:E})}return d.jsxs("div",{children:[d.jsxs("div",{className:"mb-4 flex flex-wrap items-center gap-3",children:[d.jsx(ak,{className:"h-4 w-4 text-zinc-400"}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:"Severity:"}),d.jsx("select",{value:o,onChange:k=>c(k.target.value),className:"rounded-md border border-zinc-300 bg-white px-2 py-1 text-xs dark:border-zinc-700 dark:bg-zinc-900",children:q9.map(k=>d.jsx("option",{value:k.value,children:k.label},k.value))})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:"Status:"}),d.jsx("select",{value:f,onChange:k=>h(k.target.value),className:"rounded-md border border-zinc-300 bg-white px-2 py-1 text-xs dark:border-zinc-700 dark:bg-zinc-900",children:$9.map(k=>d.jsx("option",{value:k.value,children:k.label},k.value))})]}),d.jsxs("span",{className:"text-xs text-zinc-400 dark:text-zinc-500",children:[y.length," of ",e.length," findings"]})]}),y.length===0?d.jsx("p",{className:"py-8 text-center text-sm text-zinc-500 dark:text-zinc-400",children:"No findings match your filters."}):d.jsx("div",{className:"overflow-x-auto rounded-lg border border-zinc-200 dark:border-zinc-800",children:d.jsxs("table",{className:"w-full text-sm",children:[d.jsx("thead",{className:"bg-zinc-50 dark:bg-zinc-900",children:d.jsxs("tr",{children:[d.jsx(ha,{label:"Severity",field:"severity",activeField:t,direction:a,onSort:g}),d.jsx(ha,{label:"Title",field:"title",activeField:t,direction:a,onSort:g}),d.jsx(ha,{label:"File",field:"file_path",activeField:t,direction:a,onSort:g}),d.jsx("th",{className:"border-b border-zinc-200 px-4 py-2 text-left font-medium text-zinc-900 dark:border-zinc-800 dark:text-zinc-100",children:"Lines"}),d.jsx("th",{className:"border-b border-zinc-200 px-4 py-2 text-left font-medium text-zinc-900 dark:border-zinc-800 dark:text-zinc-100",children:"Blocker"}),d.jsx("th",{className:"border-b border-zinc-200 px-4 py-2 text-left font-medium text-zinc-900 dark:border-zinc-800 dark:text-zinc-100",children:"Status"})]})}),d.jsx("tbody",{children:y.map(k=>d.jsx(H9,{finding:k,onTriageChange:v},k.id))})]})})]})}function G9(){const{socket:e}=si(),[t,r]=_.useState("idle"),[a,l]=_.useState(null),[o,c]=_.useState(""),[f,h]=_.useState(""),[m,g]=_.useState(null),[x,y]=_.useState([]),[v,k]=_.useState(null),[E,S]=_.useState(null),N=_.useRef(""),[O,T]=_.useState(0),P=_.useRef(null);_.useEffect(()=>(t==="generating"?(T(0),P.current=setInterval(()=>T(ee=>ee+1),1e3)):P.current&&(clearInterval(P.current),P.current=null),()=>{P.current&&clearInterval(P.current)}),[t]),ut("post:gh-result",_.useCallback(ee=>{l(ee),ee.authenticated&&ee.prNumber?r("ready"):(S(ee.error??"GitHub check failed"),r("error"))},[])),ut("post:token",_.useCallback(ee=>{N.current+=ee.token,c(N.current)},[])),ut("post:clear-stream",_.useCallback(()=>{N.current="",c("")},[])),ut("post:status",_.useCallback(ee=>{const te={tool:ee.tool,detail:ee.detail,timestamp:Date.now()};g(te),y(we=>[...we,te])},[])),ut("post:done",_.useCallback(ee=>{h(ee.content),c(""),g(null),N.current="",r("preview")},[])),ut("post:cancelled",_.useCallback(()=>{c(""),g(null),N.current="",r("ready")},[])),ut("post:error",_.useCallback(ee=>{S(ee.error),c(""),g(null),N.current="",r("error")},[])),ut("post:save-result",_.useCallback(ee=>{ee.success||S(ee.error??"Failed to save draft")},[])),ut("post:submit-result",_.useCallback(ee=>{k(ee),ee.success?r("posted"):(S(ee.error??"Failed to post to GitHub"),r("error"))},[]));const $=_.useCallback(ee=>{e&&(r("checking"),S(null),l(null),e.emit("post:check-gh",{sessionId:ee}))},[e]),j=_.useCallback((ee,te)=>{e&&(r("generating"),S(null),c(""),h(""),g(null),y([]),N.current="",e.emit("post:generate",{sessionId:ee,roundNumber:te}))},[e]),G=_.useCallback((ee,te)=>{e&&e.emit("post:cancel",{sessionId:ee,roundNumber:te})},[e]),A=_.useCallback((ee,te,we)=>{e&&e.emit("post:save",{sessionId:ee,roundNumber:te,content:we})},[e]),ie=_.useCallback((ee,te)=>{e&&(r("posting"),S(null),e.emit("post:submit",{prNumber:ee,content:te}))},[e]),F=_.useCallback(()=>{r("idle"),l(null),c(""),h(""),g(null),y([]),k(null),S(null),N.current=""},[]);return{step:t,checkResult:a,streamingContent:o,generatedContent:f,toolStatus:m,activityLog:x,elapsedSeconds:O,postResult:v,error:E,checkGitHub:$,generate:j,cancelGeneration:G,saveDraft:A,submitToGitHub:ie,reset:F,setStep:r}}function K9(e){const t=Math.floor(e/60),r=e%60;return`${t}:${String(r).padStart(2,"0")}`}function V9(e,t,r){return r==="Write"?"Rewriting as your voice":t?"Writing review":e?"Analyzing source material":"Starting up"}function Y9({tool:e}){switch(e){case"Read":return d.jsx(zT,{className:"h-3 w-3 shrink-0"});case"Glob":case"Grep":return d.jsx(Qu,{className:"h-3 w-3 shrink-0"});case"thinking":return d.jsx(tk,{className:"h-3 w-3 shrink-0"});default:return d.jsx(ck,{className:"h-3 w-3 shrink-0"})}}function Q9({sessionId:e,roundNumber:t,finalContent:r,savedHumanReview:a}){const[l,o]=_.useState(!1),[c,f]=_.useState(!1),[h,m]=_.useState(""),g=_.useRef(null),x=_.useRef(null),{step:y,checkResult:v,streamingContent:k,generatedContent:E,toolStatus:S,activityLog:N,elapsedSeconds:O,postResult:T,error:P,checkGitHub:$,generate:j,cancelGeneration:G,saveDraft:A,submitToGitHub:ie,reset:F,setStep:ee}=G9(),[te,we]=_.useState(!0),se=_.useRef(!1),[Q,M]=_.useState(!1),Y=_.useCallback(()=>{o(!1),f(!1),m(""),F()},[F]),V=_.useCallback(()=>{o(!0),$(e)},[e,$]);_.useEffect(()=>{if(!l)return;const D=B=>{B.key==="Escape"&&y!=="generating"&&Y()};return document.addEventListener("keydown",D),g.current?.focus(),()=>document.removeEventListener("keydown",D)},[l,Y,y]),_.useEffect(()=>{y==="generating"&&k&&!se.current&&(se.current=!0,we(!1))},[y,k]),_.useEffect(()=>{y==="generating"&&(se.current=!1,we(!0))},[y]),_.useEffect(()=>{y==="generating"&&x.current?.scrollIntoView({behavior:"smooth"})},[k,y]);const fe=()=>c&&h?h:E||a||r,R=v?.prNumber??0;return d.jsxs(d.Fragment,{children:[d.jsxs("button",{type:"button",onClick:V,className:"inline-flex items-center gap-1.5 rounded-md border border-zinc-200 bg-white px-3 py-1.5 text-xs font-medium text-zinc-700 transition-colors hover:bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-800 dark:text-zinc-300 dark:hover:bg-zinc-700",children:[d.jsx(ay,{className:"h-3.5 w-3.5"}),"Post to GitHub"]}),l&&d.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[d.jsx("div",{className:"fixed inset-0 bg-black/50",onClick:y!=="generating"?Y:void 0}),d.jsxs("div",{ref:g,role:"dialog","aria-modal":"true","aria-labelledby":"post-review-title",tabIndex:-1,className:"relative z-10 flex w-full max-w-4xl flex-col rounded-lg border border-zinc-200 bg-white shadow-xl dark:border-zinc-800 dark:bg-zinc-900",style:{maxHeight:"85vh"},children:[d.jsxs("div",{className:"flex items-center justify-between border-b border-zinc-200 px-6 py-4 dark:border-zinc-800",children:[d.jsx("h3",{id:"post-review-title",className:"text-lg font-semibold text-zinc-900 dark:text-zinc-100",children:y==="posted"?"Review Posted":"Post Review to GitHub"}),d.jsx("button",{onClick:Y,className:"text-zinc-400 hover:text-zinc-600 dark:hover:text-zinc-300","aria-label":"Close dialog",children:d.jsx(Bn,{className:"h-5 w-5"})})]}),d.jsxs("div",{className:"flex-1 overflow-y-auto px-6 py-4",children:[y==="checking"&&d.jsxs("div",{className:"flex items-center justify-center gap-3 py-12",children:[d.jsx(qr,{className:"h-5 w-5 animate-spin text-zinc-500"}),d.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Checking GitHub CLI..."})]}),y==="ready"&&v&&d.jsxs("div",{className:"space-y-4",children:[d.jsx("div",{className:"rounded-md border border-zinc-200 bg-zinc-50 p-3 dark:border-zinc-700 dark:bg-zinc-800",children:d.jsxs("p",{className:"text-sm text-zinc-700 dark:text-zinc-300",children:[d.jsx(sk,{className:"mr-1.5 inline h-4 w-4"}),"PR #",v.prNumber," on branch"," ",d.jsx("code",{className:"rounded bg-zinc-200 px-1.5 py-0.5 text-xs dark:bg-zinc-700",children:v.branch})]})}),d.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[d.jsxs("button",{onClick:()=>ie(R,r),className:"group rounded-lg border border-zinc-200 p-4 text-left transition-colors hover:border-blue-300 hover:bg-blue-50/50 dark:border-zinc-700 dark:hover:border-blue-700 dark:hover:bg-blue-950/20",children:[d.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[d.jsx(Ao,{className:"h-5 w-5 text-zinc-500 group-hover:text-blue-600 dark:group-hover:text-blue-400"}),d.jsx("span",{className:"font-medium text-zinc-900 dark:text-zinc-100",children:"Post Team Review"})]}),d.jsx("p",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:"Post the original multi-reviewer synthesis as-is."})]}),d.jsxs("button",{onClick:()=>j(e,t),className:"group rounded-lg border border-zinc-200 p-4 text-left transition-colors hover:border-emerald-300 hover:bg-emerald-50/50 dark:border-zinc-700 dark:hover:border-emerald-700 dark:hover:bg-emerald-950/20",children:[d.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[d.jsx(Va,{className:"h-5 w-5 text-zinc-500 group-hover:text-emerald-600 dark:group-hover:text-emerald-400"}),d.jsx("span",{className:"font-medium text-zinc-900 dark:text-zinc-100",children:"Generate Human Review"})]}),d.jsx("p",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:"Rewrite as a single human voice — sounds like you wrote it."})]})]}),a&&d.jsxs("button",{onClick:()=>{m(a),ee("preview")},className:"w-full rounded-lg border border-dashed border-zinc-300 p-3 text-left text-sm text-zinc-600 transition-colors hover:border-zinc-400 hover:text-zinc-800 dark:border-zinc-600 dark:text-zinc-400 dark:hover:border-zinc-500 dark:hover:text-zinc-300",children:[d.jsx(iy,{className:"mr-1.5 inline h-3.5 w-3.5"}),"Use previously saved human review"]})]}),y==="generating"&&d.jsxs("div",{className:"space-y-4",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{className:"flex items-center gap-2.5",children:[d.jsxs("div",{className:"relative flex h-8 w-8 items-center justify-center",children:[d.jsx("div",{className:"absolute inset-0 animate-ping rounded-full bg-emerald-400/20"}),d.jsx(Va,{className:"h-4 w-4 text-emerald-500 dark:text-emerald-400"})]}),d.jsxs("div",{children:[d.jsx("p",{className:"text-sm font-medium text-zinc-800 dark:text-zinc-200",children:V9(N.length>0,!!k,S?.tool)}),d.jsx("p",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:"All findings preserved — just the tone changes"})]})]}),d.jsx("span",{className:"tabular-nums text-xs font-medium text-zinc-400 dark:text-zinc-500",children:K9(O)})]}),d.jsxs("div",{className:"rounded-md border border-zinc-200 bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-800",children:[d.jsxs("button",{type:"button",onClick:()=>we(D=>!D),className:"flex w-full items-center gap-2 px-3 py-2 text-xs text-zinc-600 dark:text-zinc-400",children:[d.jsx(qr,{className:"h-3 w-3 animate-spin shrink-0 text-emerald-500"}),d.jsx("span",{className:"flex-1 truncate text-left font-medium",children:S?.detail??"Reading review files..."}),N.length>0&&d.jsxs("span",{className:"flex items-center gap-1 text-zinc-400 dark:text-zinc-500",children:[d.jsx("span",{className:"tabular-nums",children:N.length}),te?d.jsx(Za,{className:"h-3 w-3"}):d.jsx(ji,{className:"h-3 w-3"})]})]}),te&&N.length>0&&d.jsx("div",{className:"border-t border-zinc-200 px-3 py-2 dark:border-zinc-700",children:d.jsx("div",{className:"max-h-32 space-y-1 overflow-y-auto",children:N.map((D,B)=>d.jsxs("div",{className:"flex items-center gap-2 text-[11px] text-zinc-500 dark:text-zinc-500",children:[d.jsx(Y9,{tool:D.tool}),d.jsx("span",{className:"truncate",children:D.detail})]},B))})})]}),k&&d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"flex items-center gap-2 text-xs text-zinc-500 dark:text-zinc-400",children:[d.jsx(yo,{className:"h-3 w-3"}),d.jsx("span",{className:"font-medium",children:"Generated Review"})]}),d.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none",children:d.jsx(jr,{content:k})})]}),d.jsx("div",{ref:x})]}),y==="preview"&&d.jsxs("div",{className:"space-y-3",children:[d.jsxs("div",{className:"flex items-center gap-1 border-b border-zinc-200 dark:border-zinc-700",children:[d.jsxs("button",{onClick:()=>f(!1),className:re("inline-flex items-center gap-1.5 border-b-2 px-3 py-2 text-xs font-medium transition-colors",c?"border-transparent text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-300":"border-blue-500 text-blue-600 dark:text-blue-400"),children:[d.jsx(rR,{className:"h-3.5 w-3.5"}),"Preview"]}),d.jsxs("button",{onClick:()=>{f(!0),h||m(E||a||r)},className:re("inline-flex items-center gap-1.5 border-b-2 px-3 py-2 text-xs font-medium transition-colors",c?"border-blue-500 text-blue-600 dark:text-blue-400":"border-transparent text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-300"),children:[d.jsx(yo,{className:"h-3.5 w-3.5"}),"Edit"]})]}),c?d.jsx("textarea",{value:h||E||a||r,onChange:D=>m(D.target.value),className:"h-96 w-full rounded-md border border-zinc-200 bg-zinc-50 p-3 font-mono text-sm text-zinc-900 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500 dark:border-zinc-700 dark:bg-zinc-800 dark:text-zinc-100"}):d.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none",children:d.jsx(jr,{content:fe()})})]}),y==="posting"&&d.jsxs("div",{className:"flex items-center justify-center gap-3 py-12",children:[d.jsx(qr,{className:"h-5 w-5 animate-spin text-zinc-500"}),d.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Posting to GitHub..."})]}),y==="posted"&&d.jsxs("div",{className:"flex flex-col items-center gap-3 py-12",children:[d.jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-full bg-emerald-100 dark:bg-emerald-900/30",children:d.jsx(Mr,{className:"h-6 w-6 text-emerald-600 dark:text-emerald-400"})}),d.jsx("p",{className:"text-sm font-medium text-zinc-900 dark:text-zinc-100",children:"Review posted to GitHub"}),T?.commentUrl&&d.jsxs("a",{href:T.commentUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-sm text-blue-600 hover:underline dark:text-blue-400",children:["View comment",d.jsx(Qm,{className:"h-3.5 w-3.5"})]})]}),y==="error"&&d.jsx("div",{className:"space-y-4 py-4",children:d.jsxs("div",{className:"flex items-start gap-3 rounded-md border border-red-200 bg-red-50 p-4 dark:border-red-800 dark:bg-red-950/30",children:[d.jsx(Vu,{className:"mt-0.5 h-5 w-5 shrink-0 text-red-600 dark:text-red-400"}),d.jsx("p",{className:"text-sm text-red-700 dark:text-red-300",children:P})]})})]}),d.jsxs("div",{className:"flex items-center justify-end gap-3 border-t border-zinc-200 px-6 py-4 dark:border-zinc-800",children:[y==="generating"&&d.jsx("button",{onClick:()=>G(e,t),className:"rounded-md border border-zinc-200 px-3 py-1.5 text-sm font-medium text-zinc-700 transition-colors hover:bg-zinc-100 dark:border-zinc-700 dark:text-zinc-300 dark:hover:bg-zinc-800",children:"Cancel"}),y==="preview"&&d.jsxs(d.Fragment,{children:[d.jsxs("button",{onClick:()=>j(e,t),className:"inline-flex items-center gap-1.5 rounded-md border border-zinc-200 px-3 py-1.5 text-sm font-medium text-zinc-700 transition-colors hover:bg-zinc-100 dark:border-zinc-700 dark:text-zinc-300 dark:hover:bg-zinc-800",children:[d.jsx(vo,{className:"h-3.5 w-3.5"}),"Regenerate"]}),d.jsxs("button",{onClick:()=>{A(e,t,fe()),M(!0),setTimeout(()=>M(!1),2e3)},className:re("inline-flex items-center gap-1.5 rounded-md border px-3 py-1.5 text-sm font-medium transition-colors",Q?"border-emerald-300 text-emerald-700 dark:border-emerald-700 dark:text-emerald-400":"border-zinc-200 text-zinc-700 hover:bg-zinc-100 dark:border-zinc-700 dark:text-zinc-300 dark:hover:bg-zinc-800"),children:[Q?d.jsx(Mr,{className:"h-3.5 w-3.5"}):d.jsx(iy,{className:"h-3.5 w-3.5"}),Q?"Saved!":"Save Draft"]}),d.jsxs("button",{onClick:()=>{const D=fe();A(e,t,D),ie(R,D)},className:"inline-flex items-center gap-1.5 rounded-md bg-blue-600 px-3 py-1.5 text-sm font-medium text-white transition-colors hover:bg-blue-700",children:[d.jsx(ay,{className:"h-3.5 w-3.5"}),"Post to GitHub"]})]}),y==="error"&&d.jsxs(d.Fragment,{children:[d.jsxs("button",{onClick:()=>$(e),className:"inline-flex items-center gap-1.5 rounded-md border border-zinc-200 px-3 py-1.5 text-sm font-medium text-zinc-700 transition-colors hover:bg-zinc-100 dark:border-zinc-700 dark:text-zinc-300 dark:hover:bg-zinc-800",children:[d.jsx(vo,{className:"h-3.5 w-3.5"}),"Retry"]}),d.jsx("button",{onClick:Y,className:"rounded-md border border-zinc-200 px-3 py-1.5 text-sm font-medium text-zinc-700 transition-colors hover:bg-zinc-100 dark:border-zinc-700 dark:text-zinc-300 dark:hover:bg-zinc-800",children:"Close"})]}),y==="posted"&&d.jsx("button",{onClick:Y,className:"rounded-md bg-zinc-900 px-3 py-1.5 text-sm font-medium text-white transition-colors hover:bg-zinc-800 dark:bg-zinc-100 dark:text-zinc-900 dark:hover:bg-zinc-200",children:"Done"})]})]})]})]})}function X9(e,t){return`.ocr/sessions/${e}/rounds/round-${t}/final.md`}const Nv=e=>`Review the feedback in \`${e}\` and address it following these steps:
571
+
572
+ 1. Read the review in its entirety and parse all feedback into discrete items
573
+ 2. For each item, read the actual code at the referenced location to corroborate
574
+ 3. Classify each as: Valid (will address) | Valid (alternative approach) | Invalid (decline with evidence) | Needs Clarification
575
+ 4. Present a numbered summary of all items with classification before implementing
576
+ 5. For valid items, implement changes — use sub-agents in parallel where items are independent
577
+ 6. Report: total items, items addressed, items declined with reasoning
578
+
579
+ GUARDRAILS: Do NOT blindly accept every piece of feedback. Corroborate against actual code first. If feedback is incorrect, decline with evidence. If the suggested fix is suboptimal, propose a better alternative.`;function Z9({sessionId:e,roundNumber:t}){const[r,a]=_.useState(!1),l=_.useRef(null),{data:o}=Qs(),c=!!o?.aiCli?.active,f=_.useCallback(()=>a(!1),[]);_.useEffect(()=>{if(!r)return;const m=g=>{g.key==="Escape"&&f()};return document.addEventListener("keydown",m),l.current?.focus(),()=>document.removeEventListener("keydown",m)},[r,f]);const h=X9(e,t);return d.jsxs(d.Fragment,{children:[d.jsxs("button",{type:"button",onClick:()=>a(!0),className:"inline-flex items-center gap-1.5 rounded-md border border-zinc-200 bg-white px-3 py-1.5 text-xs font-medium text-zinc-700 transition-colors hover:bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-800 dark:text-zinc-300 dark:hover:bg-zinc-700",children:[d.jsx($s,{className:"h-3.5 w-3.5"}),"Address Feedback"]}),r&&d.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[d.jsx("div",{className:"fixed inset-0 bg-black/50",onClick:f}),d.jsxs("div",{ref:l,role:"dialog","aria-modal":"true","aria-labelledby":"address-feedback-title",tabIndex:-1,className:"relative z-10 mx-4 w-full max-w-md rounded-lg border border-zinc-200 bg-white shadow-lg sm:max-w-lg dark:border-zinc-800 dark:bg-zinc-900",children:[d.jsx("button",{onClick:f,className:"absolute right-4 top-4 text-zinc-400 hover:text-zinc-600 dark:hover:text-zinc-300","aria-label":"Close dialog",children:d.jsx(Bn,{className:"h-4 w-4"})}),c?d.jsx(W9,{finalPath:h,onClose:f}):d.jsx(J9,{finalPath:h,onClose:f})]})]})]})}function W9({finalPath:e,onClose:t}){const[r,a]=_.useState(""),[l,o]=_.useState(!1),[c,f]=_.useState(!1),{socket:h}=si(),{isRunning:m}=Vm(),g=Hu();function x(){const E=["ocr address",e];return r.trim()&&E.push("--requirements",r.trim()),E.join(" ")}function y(){const E=["/ocr:address",e];return r.trim()&&E.push(`
580
+
581
+ NOTES:`,r.trim()),E.join(" ")}function v(){const E=x();h?.emit("command:run",{command:E}),t(),g("/commands")}async function k(){await navigator.clipboard.writeText(y()),f(!0),setTimeout(()=>f(!1),2e3)}return d.jsxs("div",{children:[d.jsxs("div",{className:"p-6 pb-0",children:[d.jsx("h3",{id:"address-feedback-title",className:"text-lg font-semibold text-zinc-900 dark:text-zinc-100",children:"Address Feedback"}),d.jsx("p",{className:"mt-2 text-sm text-zinc-500 dark:text-zinc-400",children:"Run an AI agent to corroborate, validate, and implement changes from this review — in the dashboard or your own terminal."})]}),d.jsxs("div",{className:"mx-6 mt-4 flex items-start gap-2 rounded-md border border-amber-200 bg-amber-50 px-3 py-2.5 text-xs text-amber-800 dark:border-amber-900/50 dark:bg-amber-950/30 dark:text-amber-300",children:[d.jsx(Xm,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),d.jsx("span",{children:"This runs an AI agent with full read/write and shell access to your project."})]}),d.jsxs("div",{className:"space-y-4 p-6",children:[d.jsxs("div",{children:[d.jsx("label",{className:"text-xs font-medium text-zinc-500 dark:text-zinc-400",children:"Review"}),d.jsx("code",{className:"mt-1 block w-full break-all rounded-md border border-zinc-200 bg-zinc-50 px-3 py-2 text-xs text-zinc-700 dark:border-zinc-700 dark:bg-zinc-800 dark:text-zinc-300",children:e})]}),d.jsxs("div",{children:[d.jsxs("label",{className:"text-xs font-medium text-zinc-500 dark:text-zinc-400",children:["Additional notes ",d.jsx("span",{className:"font-normal text-zinc-400 dark:text-zinc-500",children:"(optional)"})]}),d.jsx("textarea",{value:r,onChange:E=>a(E.target.value),placeholder:"e.g. Focus on the blockers first, skip style nits...",rows:3,className:re("mt-1 w-full rounded-md border px-3 py-2 text-sm","border-zinc-200 bg-zinc-50 placeholder:text-zinc-400","dark:border-zinc-700 dark:bg-zinc-800 dark:placeholder:text-zinc-500","focus:border-indigo-400 focus:outline-none focus:ring-1 focus:ring-indigo-400/50","resize-none")})]}),d.jsx("code",{className:"block w-full whitespace-pre-wrap break-all rounded-md bg-zinc-100 px-2.5 py-1.5 text-xs text-zinc-600 dark:bg-zinc-800 dark:text-zinc-400",children:y()}),d.jsxs("div",{className:"space-y-2 pt-2",children:[d.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row-reverse",children:[l?d.jsxs("button",{onClick:v,className:"flex flex-1 items-center justify-center gap-2 rounded-md bg-indigo-600 px-3 py-2 text-sm font-medium text-white transition-colors hover:bg-indigo-700",children:[d.jsx($s,{className:"h-3.5 w-3.5"}),"Confirm"]}):d.jsxs("button",{onClick:()=>o(!0),disabled:m,className:re("flex flex-1 items-center justify-center gap-2 rounded-md bg-indigo-600 px-3 py-2 text-sm font-medium text-white transition-colors hover:bg-indigo-700",m&&"cursor-not-allowed opacity-50"),children:[d.jsx($s,{className:"h-3.5 w-3.5"}),"Run in Dashboard"]}),d.jsx("button",{onClick:k,className:"flex flex-1 items-center justify-center gap-2 rounded-md border border-zinc-200 px-3 py-2 text-sm font-medium text-zinc-700 transition-colors hover:bg-zinc-100 dark:border-zinc-700 dark:text-zinc-300 dark:hover:bg-zinc-800",children:c?d.jsxs(d.Fragment,{children:[d.jsx(Mr,{className:"h-3.5 w-3.5"}),"Copied!"]}):d.jsxs(d.Fragment,{children:[d.jsx(rk,{className:"h-3.5 w-3.5"}),"Copy to Terminal"]})})]}),d.jsx("button",{onClick:t,className:"w-full py-1 text-sm text-zinc-500 transition-colors hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-200",children:"Cancel"})]})]})]})}function J9({finalPath:e,onClose:t}){const[r,a]=_.useState(!0),[l,o]=_.useState(!1);async function c(){const f=r?Nv(e):e;await navigator.clipboard.writeText(f),o(!0),setTimeout(()=>o(!1),2e3)}return d.jsxs("div",{className:"p-6",children:[d.jsx("h3",{id:"address-feedback-title",className:"text-lg font-semibold text-zinc-900 dark:text-zinc-100",children:"Address Feedback"}),d.jsx("p",{className:"mt-2 text-sm text-zinc-500 dark:text-zinc-400",children:"Copy the review path and AI prompt to paste into any AI coding tool (Claude Code, Cursor, Windsurf, Copilot, etc.)."}),d.jsxs("div",{className:"mt-4",children:[d.jsx("label",{className:"text-xs font-medium text-zinc-500 dark:text-zinc-400",children:"Review path"}),d.jsx("code",{className:"mt-1 block w-full break-all rounded-md border border-zinc-200 bg-zinc-50 px-3 py-2 text-xs text-zinc-700 dark:border-zinc-700 dark:bg-zinc-800 dark:text-zinc-300",children:e})]}),d.jsxs("label",{className:"mt-4 flex items-center gap-2 text-sm text-zinc-600 dark:text-zinc-400",children:[d.jsx("input",{type:"checkbox",checked:r,onChange:f=>a(f.target.checked),className:"h-3.5 w-3.5 rounded border-zinc-300 text-indigo-500 focus:ring-indigo-400 dark:border-zinc-600"}),"Include AI prompt"]}),r&&d.jsx("div",{className:"mt-3 max-h-40 overflow-y-auto rounded-md border border-zinc-200 bg-zinc-50 p-3 text-xs text-zinc-600 dark:border-zinc-700 dark:bg-zinc-800 dark:text-zinc-400",children:d.jsx("pre",{className:"whitespace-pre-wrap font-mono leading-relaxed",children:Nv(e)})}),d.jsxs("div",{className:"mt-6 flex justify-end gap-3",children:[d.jsx("button",{onClick:t,className:"rounded-md border border-zinc-200 px-3 py-1.5 text-sm font-medium text-zinc-700 transition-colors hover:bg-zinc-100 dark:border-zinc-700 dark:text-zinc-300 dark:hover:bg-zinc-800",children:"Cancel"}),d.jsx("button",{onClick:c,className:"inline-flex items-center gap-1.5 rounded-md bg-indigo-600 px-3 py-1.5 text-sm font-medium text-white transition-colors hover:bg-indigo-700",children:l?d.jsxs(d.Fragment,{children:[d.jsx(Mr,{className:"h-3.5 w-3.5"}),"Copied!"]}):d.jsxs(d.Fragment,{children:[d.jsx(rk,{className:"h-3.5 w-3.5"}),"Copy"]})})]})]})}const eB=[{value:"needs_review",label:"Needs Review"},{value:"in_progress",label:"In Progress"},{value:"changes_made",label:"Changes Made"},{value:"acknowledged",label:"Acknowledged"},{value:"dismissed",label:"Dismissed"}];function tB(){const{id:e,round:t}=qu(),r=parseInt(t??"0",10),{data:a,isLoading:l}=D9(e??"",r),{data:o}=L9(e??"",r),{data:c}=Kh(e??"","final"),{data:f}=Kh(e??"","final-human"),{data:h}=Kh(e??"","discourse"),m=Yw(),[g,x]=_.useState(!1),[y,v]=_.useState(!1),[k,E]=_.useState(!1);if(l)return d.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Loading round..."});if(!a)return d.jsxs("div",{children:[d.jsxs(In,{to:`/sessions/${e}`,className:"mb-4 inline-flex items-center gap-1 text-sm text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-300",children:[d.jsx(xa,{className:"h-4 w-4"}),"Back to session"]}),d.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Round not found."})]});const S=h?s9(h.content):[];return d.jsxs("div",{className:"space-y-6",children:[d.jsxs(In,{to:`/sessions/${e}`,className:"inline-flex items-center gap-1 text-sm text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-300",children:[d.jsx(xa,{className:"h-4 w-4"}),"Back to session"]}),d.jsxs("div",{className:"flex items-start justify-between gap-4",children:[d.jsxs("div",{children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsxs("h1",{className:"text-2xl font-semibold",children:["Round ",a.round_number]}),d.jsx("select",{value:a.progress?.status??"needs_review",onChange:N=>m.mutate({roundId:a.id,status:N.target.value}),className:"rounded-md border border-zinc-300 bg-white px-2 py-1 text-xs dark:border-zinc-700 dark:bg-zinc-900",children:eB.map(N=>d.jsx("option",{value:N.value,children:N.label},N.value))})]}),d.jsxs("p",{className:"mt-1 text-sm text-zinc-500 dark:text-zinc-400",children:[(a.reviewer_outputs??[]).length," reviewer",(a.reviewer_outputs??[]).length!==1?"s":""]})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[c&&d.jsx(Q9,{sessionId:e??"",roundNumber:r,finalContent:c.content,savedHumanReview:f?.content}),c&&d.jsx(Z9,{sessionId:e??"",roundNumber:r}),d.jsxs("button",{type:"button",onClick:()=>v(!0),className:"inline-flex items-center gap-1.5 rounded-md border border-zinc-200 bg-white px-3 py-1.5 text-xs font-medium text-zinc-700 transition-colors hover:bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-800 dark:text-zinc-300 dark:hover:bg-zinc-700",children:[d.jsx(Au,{className:"h-3.5 w-3.5"}),"Ask the Team"]}),d.jsxs("button",{type:"button",onClick:()=>E(!0),title:"Copy a resume command to continue this review's AI conversation in your terminal",className:"inline-flex items-center gap-1.5 rounded-md border border-zinc-200 bg-white px-3 py-1.5 text-xs font-medium text-zinc-700 transition-colors hover:bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-800 dark:text-zinc-300 dark:hover:bg-zinc-700",children:[d.jsx(Oi,{className:"h-3.5 w-3.5"}),"Resume in terminal"]})]})]}),k&&e&&d.jsx(Wm,{workflowId:e,onClose:()=>E(!1)}),a.verdict&&d.jsx(c9,{verdict:a.verdict,blockerCount:a.blocker_count,suggestionCount:a.suggestion_count,shouldFixCount:a.should_fix_count}),d.jsxs("div",{children:[d.jsx("h2",{className:"mb-3 text-sm font-medium text-zinc-900 dark:text-zinc-100",children:"Reviewers"}),d.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-4",children:(a.reviewer_outputs??[]).map(N=>d.jsx(F9,{sessionId:e??"",roundNumber:r,reviewer:N},N.id))})]}),o&&o.length>0&&d.jsxs("div",{className:"rounded-lg border border-zinc-200 bg-white p-6 dark:border-zinc-800 dark:bg-zinc-900",children:[d.jsxs("h2",{className:"mb-4 text-sm font-medium text-zinc-900 dark:text-zinc-100",children:["Findings (",o.length,")"]}),d.jsx(Xw,{findings:o})]}),h&&d.jsxs("div",{className:"rounded-lg border border-zinc-200 bg-white p-6 dark:border-zinc-800 dark:bg-zinc-900",children:[d.jsxs("button",{onClick:()=>x(N=>!N),className:"flex items-center gap-2 text-sm font-medium text-zinc-900 transition-colors hover:text-zinc-700 dark:text-zinc-100 dark:hover:text-zinc-300",children:[d.jsx(Au,{className:"h-4 w-4"}),g?"Hide Discourse":"View Discourse"]}),g&&d.jsx("div",{className:"mt-4 space-y-4",children:S.length>0?S.map((N,O)=>d.jsx(a9,{type:N.type,content:N.content,reviewer:N.reviewer},O)):d.jsx(jr,{content:h.content})})]}),c&&d.jsxs("div",{className:"rounded-lg border border-zinc-200 bg-white p-6 dark:border-zinc-800 dark:bg-zinc-900",children:[d.jsx("h2",{className:"mb-4 text-sm font-medium text-zinc-900 dark:text-zinc-100",children:"Final Review"}),d.jsx(jr,{content:c.content})]}),y&&a&&d.jsx(Vw,{sessionId:e??"",targetType:"review_round",targetId:a.round_number,onClose:()=>v(!1)})]})}function nB(){const{id:e,round:t,reviewerId:r}=qu(),a=parseInt(t??"0",10),l=parseInt(r??"0",10),{data:o,isLoading:c}=I9(e??"",a,l),f=nn({queryKey:["reviewer-content",e,a,l],queryFn:async()=>{if(!o?.file_path)return"";try{return(await Dt(`/api/sessions/${e}/rounds/${a}/reviewers/${l}/content`)).content??""}catch{return""}},enabled:!!o?.file_path});if(c)return d.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Loading reviewer..."});if(!o)return d.jsxs("div",{children:[d.jsxs(In,{to:`/sessions/${e}/reviews/${a}`,className:"mb-4 inline-flex items-center gap-1 text-sm text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-300",children:[d.jsx(xa,{className:"h-4 w-4"}),"Back to round"]}),d.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Reviewer not found."})]});const h=Qw[o.reviewer_type]??Va;return d.jsxs("div",{className:"space-y-6",children:[d.jsxs(In,{to:`/sessions/${e}/reviews/${a}`,className:"inline-flex items-center gap-1 text-sm text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-300",children:[d.jsx(xa,{className:"h-4 w-4"}),"Back to round ",a]}),d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx(h,{className:"h-6 w-6 text-zinc-500"}),d.jsxs("div",{children:[d.jsxs("h1",{className:"text-2xl font-semibold capitalize",children:[o.reviewer_type,o.instance_number>1&&d.jsxs("span",{className:"ml-1 text-zinc-500 dark:text-zinc-400",children:["#",o.instance_number]})]}),d.jsxs("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:[o.finding_count," finding",o.finding_count!==1?"s":""]})]})]}),f.data&&d.jsxs("div",{className:"rounded-lg border border-zinc-200 bg-white p-6 dark:border-zinc-800 dark:bg-zinc-900",children:[d.jsx("h2",{className:"mb-4 text-sm font-medium text-zinc-900 dark:text-zinc-100",children:"Reviewer Output"}),d.jsx(jr,{content:f.data})]}),o.findings.length>0&&d.jsxs("div",{className:"rounded-lg border border-zinc-200 bg-white p-6 dark:border-zinc-800 dark:bg-zinc-900",children:[d.jsxs("h2",{className:"mb-4 text-sm font-medium text-zinc-900 dark:text-zinc-100",children:["Findings (",o.findings.length,")"]}),d.jsx(Xw,{findings:o.findings})]})]})}const Sv={needs_review:0,in_progress:1,changes_made:2,acknowledged:3,dismissed:4},Zw=[{value:"needs_review",label:"Needs Review"},{value:"in_progress",label:"In Progress"},{value:"changes_made",label:"Changes Made"},{value:"acknowledged",label:"Acknowledged"},{value:"dismissed",label:"Dismissed"}],rB=[{value:"all",label:"All Statuses"},...Zw];function iB(){const{data:e,isLoading:t}=j9(),r=Yw(),a=Hu(),[l,o]=_.useState(!1),[c,f]=_.useState("all"),[h,m]=_.useState("all"),[g,x]=_.useState("status"),[y,v]=_.useState("asc"),k=_.useMemo(()=>{const T=new Set,P=[{value:"all",label:"All Verdicts"}];for(const $ of e??[])$.verdict&&!T.has($.verdict)&&(T.add($.verdict),P.push({value:$.verdict,label:$.verdict}));return P},[e]),E=_.useMemo(()=>{let T=e??[];return l||(T=T.filter(P=>{const $=P.progress?.status??"needs_review";return $==="needs_review"||$==="in_progress"})),c!=="all"&&(T=T.filter(P=>(P.progress?.status??"needs_review")===c)),h!=="all"&&(T=T.filter(P=>P.verdict===h)),T},[e,l,c,h]),S=_.useMemo(()=>{const T=y==="asc"?1:-1;return[...E].sort((P,$)=>{switch(g){case"session_id":return P.session_id.localeCompare($.session_id)*T;case"round_number":return(P.round_number-$.round_number)*T;case"verdict":return(P.verdict??"").localeCompare($.verdict??"")*T;case"blocker_count":return(P.blocker_count-$.blocker_count)*T;case"status":{const j=Sv[P.progress?.status??"needs_review"],G=Sv[$.progress?.status??"needs_review"];return(j-G)*T}default:return 0}})},[E,g,y]);function N(T){g===T?v(P=>P==="asc"?"desc":"asc"):(x(T),v("asc"))}function O(T,P){r.mutate({roundId:T,status:P})}return d.jsxs("div",{children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("h1",{className:"text-2xl font-semibold",children:"Reviews"}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("button",{onClick:()=>o(!1),className:re("rounded-md px-3 py-1.5 text-xs font-medium transition-colors",l?"text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-zinc-100":"bg-zinc-900 text-white dark:bg-zinc-100 dark:text-zinc-900"),children:"Actionable"}),d.jsx("button",{onClick:()=>o(!0),className:re("rounded-md px-3 py-1.5 text-xs font-medium transition-colors",l?"bg-zinc-900 text-white dark:bg-zinc-100 dark:text-zinc-900":"text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-zinc-100"),children:"All"})]})]}),t?d.jsx("p",{className:"mt-6 text-sm text-zinc-500 dark:text-zinc-400",children:"Loading reviews..."}):!e||e.length===0?d.jsxs("p",{className:"mt-6 text-sm text-zinc-500 dark:text-zinc-400",children:["No review rounds found. Run ",d.jsx("code",{className:"rounded bg-zinc-100 px-1.5 py-0.5 text-xs dark:bg-zinc-800",children:"ocr review"})," to create one."]}):d.jsxs("div",{className:"mt-6",children:[d.jsxs("div",{className:"mb-4 flex flex-wrap items-center gap-3",children:[d.jsx(ak,{className:"h-4 w-4 text-zinc-400"}),l&&d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:"Status:"}),d.jsx("select",{value:c,onChange:T=>f(T.target.value),className:"rounded-md border border-zinc-300 bg-white px-2 py-1 text-xs dark:border-zinc-700 dark:bg-zinc-900",children:rB.map(T=>d.jsx("option",{value:T.value,children:T.label},T.value))})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:"Verdict:"}),d.jsx("select",{value:h,onChange:T=>m(T.target.value),className:"rounded-md border border-zinc-300 bg-white px-2 py-1 text-xs dark:border-zinc-700 dark:bg-zinc-900",children:k.map(T=>d.jsx("option",{value:T.value,children:T.label},T.value))})]}),d.jsxs("span",{className:"text-xs text-zinc-400 dark:text-zinc-500",children:[S.length," of ",(e??[]).length," reviews"]})]}),S.length===0?d.jsx("p",{className:"py-8 text-center text-sm text-zinc-500 dark:text-zinc-400",children:"No reviews match your filters."}):d.jsx("div",{className:"overflow-x-auto rounded-lg border border-zinc-200 dark:border-zinc-800",children:d.jsxs("table",{className:"w-full text-sm",children:[d.jsx("thead",{className:"bg-zinc-50 dark:bg-zinc-900",children:d.jsxs("tr",{children:[d.jsx(ha,{label:"Branch",field:"session_id",activeField:g,direction:y,onSort:N}),d.jsx(ha,{label:"Round",field:"round_number",activeField:g,direction:y,onSort:N}),d.jsx(ha,{label:"Verdict",field:"verdict",activeField:g,direction:y,onSort:N}),d.jsx(ha,{label:"Blockers",field:"blocker_count",activeField:g,direction:y,onSort:N}),d.jsx("th",{className:"border-b border-zinc-200 px-4 py-2 text-left font-medium text-zinc-900 dark:border-zinc-800 dark:text-zinc-100",children:"Reviewers"}),d.jsx(ha,{label:"Status",field:"status",activeField:g,direction:y,onSort:N})]})}),d.jsx("tbody",{children:S.map(T=>{const P=T.session_id.replace(/^\d{4}-\d{2}-\d{2}-/,""),$=(T.reviewer_outputs??[]).length;return d.jsxs("tr",{className:"cursor-pointer transition-colors hover:bg-zinc-50 dark:hover:bg-zinc-800/50",onClick:()=>a(`/sessions/${T.session_id}/reviews/${T.round_number}`),children:[d.jsx("td",{className:"border-b border-zinc-200 px-4 py-2 dark:border-zinc-800",children:d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(Ao,{className:"h-4 w-4 shrink-0 text-zinc-400"}),d.jsx("span",{className:"truncate text-zinc-900 dark:text-zinc-100",title:T.session_id,children:P})]})}),d.jsxs("td",{className:"border-b border-zinc-200 px-4 py-2 text-zinc-600 dark:border-zinc-800 dark:text-zinc-400",children:["Round ",T.round_number]}),d.jsx("td",{className:"border-b border-zinc-200 px-4 py-2 dark:border-zinc-800",children:T.verdict?d.jsx(Xs,{variant:T.verdict==="APPROVE"?"info":T.verdict==="REQUEST CHANGES"?"high":"medium",label:T.verdict}):d.jsx("span",{className:"text-xs text-zinc-400",children:"Pending"})}),d.jsx("td",{className:"border-b border-zinc-200 px-4 py-2 dark:border-zinc-800",children:T.blocker_count>0?d.jsx("span",{className:"inline-flex items-center rounded-md border border-red-500/25 bg-red-500/15 px-2 py-0.5 text-xs font-medium text-red-700 dark:text-red-400",children:T.blocker_count}):d.jsx("span",{className:"text-xs text-zinc-400",children:"0"})}),d.jsx("td",{className:"border-b border-zinc-200 px-4 py-2 text-zinc-600 dark:border-zinc-800 dark:text-zinc-400",children:$}),d.jsx("td",{className:"border-b border-zinc-200 px-4 py-2 dark:border-zinc-800",onClick:j=>j.stopPropagation(),children:d.jsx("select",{value:T.progress?.status??"needs_review",onChange:j=>O(T.id,j.target.value),className:"rounded-md border border-zinc-300 bg-white px-2 py-1 text-xs dark:border-zinc-700 dark:bg-zinc-900",children:Zw.map(j=>d.jsx("option",{value:j.value,children:j.label},j.value))})})]},`${T.session_id}-${T.round_number}`)})})]})})]})]})}function aB(){return d.jsx("div",{className:"flex min-h-[400px] items-center justify-center",children:d.jsxs("div",{className:"text-center",children:[d.jsx("h1",{className:"text-4xl font-semibold text-zinc-900 dark:text-zinc-100",children:"404"}),d.jsx("p",{className:"mt-2 text-zinc-500 dark:text-zinc-400",children:"Page not found."})]})})}function Ri(e){return d.jsx(UA,{children:e})}const sB=Nz([{element:d.jsx(BA,{}),errorElement:d.jsx(Ti,{}),children:[{index:!0,element:Ri(d.jsx(VA,{}))},{path:"sessions",element:Ri(d.jsx(a5,{})),errorElement:d.jsx(Ti,{})},{path:"sessions/:id",element:Ri(d.jsx(E5,{})),errorElement:d.jsx(Ti,{})},{path:"sessions/:id/reviews/:round",element:Ri(d.jsx(tB,{})),errorElement:d.jsx(Ti,{})},{path:"sessions/:id/reviews/:round/reviewers/:reviewerId",element:Ri(d.jsx(nB,{})),errorElement:d.jsx(Ti,{})},{path:"sessions/:id/maps/:run",element:Ri(d.jsx(M9,{})),errorElement:d.jsx(Ti,{})},{path:"reviews",element:Ri(d.jsx(iB,{})),errorElement:d.jsx(Ti,{})},{path:"commands",element:Ri(d.jsx(H6,{})),errorElement:d.jsx(Ti,{})},{path:"reviewers",element:Ri(d.jsx(f9,{})),errorElement:d.jsx(Ti,{})},{path:"*",element:d.jsx(aB,{})}]}]);function lB(){return d.jsx(Fz,{children:d.jsx(g2,{children:d.jsx(MC,{children:d.jsx(oT,{children:d.jsx(Iz,{router:sB})})})})})}_1().then(()=>{dN.createRoot(document.getElementById("root")).render(d.jsx(_.StrictMode,{children:d.jsx(lB,{})}))});export{_9 as _,oB as a,Uu as g,d as j,_ as r,o1 as u};