@open-code-review/cli 1.10.4 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/README.md +31 -5
  2. package/dist/dashboard/client/assets/{_basePickBy-DbLJVCA4.js → _basePickBy-B3ALyupE.js} +1 -1
  3. package/dist/dashboard/client/assets/{_baseUniq-IXEG0cJJ.js → _baseUniq-b2RALAWc.js} +1 -1
  4. package/dist/dashboard/client/assets/{arc-lsKxmOJY.js → arc-DcSVvhUd.js} +1 -1
  5. package/dist/dashboard/client/assets/{architectureDiagram-VXUJARFQ-DfMlzFJX.js → architectureDiagram-VXUJARFQ-BNUlmSCS.js} +1 -1
  6. package/dist/dashboard/client/assets/{blockDiagram-VD42YOAC-bSpnd26J.js → blockDiagram-VD42YOAC-BmhiQVwa.js} +1 -1
  7. package/dist/dashboard/client/assets/{c4Diagram-YG6GDRKO-DPYmVhCZ.js → c4Diagram-YG6GDRKO-jyJ3WOv5.js} +1 -1
  8. package/dist/dashboard/client/assets/channel-D3J8-GF_.js +1 -0
  9. package/dist/dashboard/client/assets/{chunk-4BX2VUAB-CI9zC4lV.js → chunk-4BX2VUAB-x1dQU_s3.js} +1 -1
  10. package/dist/dashboard/client/assets/{chunk-55IACEB6-BqUdJdx5.js → chunk-55IACEB6-CwbsE2XQ.js} +1 -1
  11. package/dist/dashboard/client/assets/{chunk-B4BG7PRW-DymQrTp-.js → chunk-B4BG7PRW-BaE7c-ti.js} +1 -1
  12. package/dist/dashboard/client/assets/{chunk-DI55MBZ5-lZ_9LKGJ.js → chunk-DI55MBZ5-Bw5PUaMK.js} +1 -1
  13. package/dist/dashboard/client/assets/{chunk-FMBD7UC4-DC5rgLNm.js → chunk-FMBD7UC4-B7cF6P3s.js} +1 -1
  14. package/dist/dashboard/client/assets/{chunk-QN33PNHL-BrygpHrX.js → chunk-QN33PNHL-OY4evNHd.js} +1 -1
  15. package/dist/dashboard/client/assets/{chunk-QZHKN3VN-CWJqBdNg.js → chunk-QZHKN3VN-BpjQwIWz.js} +1 -1
  16. package/dist/dashboard/client/assets/{chunk-TZMSLE5B-BACgM5pG.js → chunk-TZMSLE5B-D8b_Oq9B.js} +1 -1
  17. package/dist/dashboard/client/assets/classDiagram-2ON5EDUG-tkFUL-1Y.js +1 -0
  18. package/dist/dashboard/client/assets/classDiagram-v2-WZHVMYZB-tkFUL-1Y.js +1 -0
  19. package/dist/dashboard/client/assets/clone-CkY5ajLr.js +1 -0
  20. package/dist/dashboard/client/assets/{cose-bilkent-S5V4N54A-BYvGIfo0.js → cose-bilkent-S5V4N54A-C-sfP8PN.js} +1 -1
  21. package/dist/dashboard/client/assets/{dagre-6UL2VRFP-B1rZyiLJ.js → dagre-6UL2VRFP-Cqfo0NRg.js} +1 -1
  22. package/dist/dashboard/client/assets/{diagram-PSM6KHXK-Dvl5dQMd.js → diagram-PSM6KHXK-BR3ppxqI.js} +1 -1
  23. package/dist/dashboard/client/assets/{diagram-QEK2KX5R-Cmntmhht.js → diagram-QEK2KX5R-Dvcx6x3R.js} +1 -1
  24. package/dist/dashboard/client/assets/{diagram-S2PKOQOG-BqZcpG85.js → diagram-S2PKOQOG-DoyBLnVN.js} +1 -1
  25. package/dist/dashboard/client/assets/{erDiagram-Q2GNP2WA-Cw7BALso.js → erDiagram-Q2GNP2WA-hy77l1cL.js} +1 -1
  26. package/dist/dashboard/client/assets/{flowDiagram-NV44I4VS-B_amTHzQ.js → flowDiagram-NV44I4VS-Bz0B1rKM.js} +1 -1
  27. package/dist/dashboard/client/assets/{ganttDiagram-JELNMOA3-B1j2-sTo.js → ganttDiagram-JELNMOA3-CLgrZPoC.js} +1 -1
  28. package/dist/dashboard/client/assets/{gitGraphDiagram-V2S2FVAM-D5BkfAMt.js → gitGraphDiagram-V2S2FVAM-DwJ-1f-v.js} +1 -1
  29. package/dist/dashboard/client/assets/{graph-B_v15DHv.js → graph-DDBMM_t2.js} +1 -1
  30. package/dist/dashboard/client/assets/index-Cr9yEo_B.js +576 -0
  31. package/dist/dashboard/client/assets/index-Z1pPudAt.css +1 -0
  32. package/dist/dashboard/client/assets/{infoDiagram-HS3SLOUP-C4dtIkj3.js → infoDiagram-HS3SLOUP-Bhn1FmAk.js} +1 -1
  33. package/dist/dashboard/client/assets/{journeyDiagram-XKPGCS4Q-hha4Am8v.js → journeyDiagram-XKPGCS4Q-CzGbjX1y.js} +1 -1
  34. package/dist/dashboard/client/assets/{kanban-definition-3W4ZIXB7-1EY8l7Ng.js → kanban-definition-3W4ZIXB7-Da77-WYk.js} +1 -1
  35. package/dist/dashboard/client/assets/{layout-7SmAbjFT.js → layout-CVwSB-GS.js} +1 -1
  36. package/dist/dashboard/client/assets/{linear-BfjSBezh.js → linear-CTRAc5Jn.js} +1 -1
  37. package/dist/dashboard/client/assets/{mermaid-renderer-PPIt-kY4.js → mermaid-renderer-Bjo170ax.js} +4 -4
  38. package/dist/dashboard/client/assets/{mindmap-definition-VGOIOE7T-BFpjN9LY.js → mindmap-definition-VGOIOE7T-B55C2odl.js} +1 -1
  39. package/dist/dashboard/client/assets/{pieDiagram-ADFJNKIX-GBbQtDBQ.js → pieDiagram-ADFJNKIX-5lrQLrSz.js} +1 -1
  40. package/dist/dashboard/client/assets/{quadrantDiagram-AYHSOK5B-Dm0vOhOw.js → quadrantDiagram-AYHSOK5B-Bg55gC30.js} +1 -1
  41. package/dist/dashboard/client/assets/{requirementDiagram-UZGBJVZJ-BrKONIV8.js → requirementDiagram-UZGBJVZJ-CyR4YFJY.js} +1 -1
  42. package/dist/dashboard/client/assets/{sankeyDiagram-TZEHDZUN-IOobtmDc.js → sankeyDiagram-TZEHDZUN-BVWKr9_-.js} +1 -1
  43. package/dist/dashboard/client/assets/{sequenceDiagram-WL72ISMW-Dnb0bOW5.js → sequenceDiagram-WL72ISMW-D0AJg_tE.js} +1 -1
  44. package/dist/dashboard/client/assets/{stateDiagram-FKZM4ZOC-C9-bf7bn.js → stateDiagram-FKZM4ZOC-BuHpTgim.js} +1 -1
  45. package/dist/dashboard/client/assets/stateDiagram-v2-4FDKWEC3-DwAPhteN.js +1 -0
  46. package/dist/dashboard/client/assets/{timeline-definition-IT6M3QCI-tJogDEHB.js → timeline-definition-IT6M3QCI-LDhpAmDd.js} +1 -1
  47. package/dist/dashboard/client/assets/{treemap-GDKQZRPO-DQY6HADq.js → treemap-GDKQZRPO-Dd4gjvUl.js} +1 -1
  48. package/dist/dashboard/client/assets/{xychartDiagram-PRI3JC2R-DfxeQmTO.js → xychartDiagram-PRI3JC2R-B9RDod39.js} +1 -1
  49. package/dist/dashboard/client/index.html +2 -2
  50. package/dist/dashboard/server.js +10297 -878
  51. package/dist/index.js +10441 -913
  52. package/dist/lib/db/index.js +984 -58
  53. package/dist/lib/models.js +85 -0
  54. package/dist/lib/runtime-config.js +39 -0
  55. package/dist/lib/team-config.js +175 -0
  56. package/dist/lib/vendor-resume.js +31 -0
  57. package/package.json +29 -4
  58. package/dist/dashboard/client/assets/channel-C--wY_Wd.js +0 -1
  59. package/dist/dashboard/client/assets/classDiagram-2ON5EDUG-DoxmMlnf.js +0 -1
  60. package/dist/dashboard/client/assets/classDiagram-v2-WZHVMYZB-DoxmMlnf.js +0 -1
  61. package/dist/dashboard/client/assets/clone-BgvweD4v.js +0 -1
  62. package/dist/dashboard/client/assets/index-UkJZZdYD.js +0 -548
  63. package/dist/dashboard/client/assets/index-Zl---B_3.css +0 -1
  64. package/dist/dashboard/client/assets/stateDiagram-v2-4FDKWEC3-C8Gr4khP.js +0 -1
  65. package/dist/package.json +0 -61
@@ -1,548 +0,0 @@
1
- function xw(e,n){for(var r=0;r<n.length;r++){const a=n[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 n=document.createElement("link").relList;if(n&&n.supports&&n.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 u of o.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&a(u)}).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 Nu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function x6(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var n=e.default;if(typeof n=="function"){var r=function a(){return this instanceof a?Reflect.construct(n,arguments,this.constructor):n.apply(this,arguments)};r.prototype=n.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 Kf={exports:{}},Fl={};/**
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 Db;function yw(){if(Db)return Fl;Db=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function r(a,l,o){var u=null;if(o!==void 0&&(u=""+o),l.key!==void 0&&(u=""+l.key),"key"in l){o={};for(var d in l)d!=="key"&&(o[d]=l[d])}else o=l;return l=o.ref,{$$typeof:e,type:a,key:u,ref:l!==void 0?l:null,props:o}}return Fl.Fragment=n,Fl.jsx=r,Fl.jsxs=r,Fl}var jb;function vw(){return jb||(jb=1,Kf.exports=yw()),Kf.exports}var f=vw(),Vf={exports:{}},Ze={};/**
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 Lb;function kw(){if(Lb)return Ze;Lb=1;var e=Symbol.for("react.transitional.element"),n=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"),u=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),x=Symbol.for("react.activity"),y=Symbol.iterator;function v(O){return O===null||typeof O!="object"?null:(O=y&&O[y]||O["@@iterator"],typeof O=="function"?O:null)}var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,w={};function N(O,K,T){this.props=O,this.context=K,this.refs=w,this.updater=T||_}N.prototype.isReactComponent={},N.prototype.setState=function(O,K){if(typeof O!="object"&&typeof O!="function"&&O!=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,O,K,"setState")},N.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};function M(){}M.prototype=N.prototype;function R(O,K,T){this.props=O,this.context=K,this.refs=w,this.updater=T||_}var U=R.prototype=new M;U.constructor=R,E(U,N.prototype),U.isPureReactComponent=!0;var $=Array.isArray;function j(){}var J={H:null,A:null,T:null,S:null},A=Object.prototype.hasOwnProperty;function ae(O,K,T){var he=T.ref;return{$$typeof:e,type:O,key:K,ref:he!==void 0?he:null,props:T}}function H(O,K){return ae(O.type,K,O.props)}function te(O){return typeof O=="object"&&O!==null&&O.$$typeof===e}function ee(O){var K={"=":"=0",":":"=2"};return"$"+O.replace(/[=:]/g,function(T){return K[T]})}var ve=/\/+/g;function oe(O,K){return typeof O=="object"&&O!==null&&O.key!=null?ee(""+O.key):K.toString(36)}function q(O){switch(O.status){case"fulfilled":return O.value;case"rejected":throw O.reason;default:switch(typeof O.status=="string"?O.then(j,j):(O.status="pending",O.then(function(K){O.status==="pending"&&(O.status="fulfilled",O.value=K)},function(K){O.status==="pending"&&(O.status="rejected",O.reason=K)})),O.status){case"fulfilled":return O.value;case"rejected":throw O.reason}}throw O}function L(O,K,T,he,_e){var xe=typeof O;(xe==="undefined"||xe==="boolean")&&(O=null);var He=!1;if(O===null)He=!0;else switch(xe){case"bigint":case"string":case"number":He=!0;break;case"object":switch(O.$$typeof){case e:case n:He=!0;break;case b:return He=O._init,L(He(O._payload),K,T,he,_e)}}if(He)return _e=_e(O),He=he===""?"."+oe(O,0):he,$(_e)?(T="",He!=null&&(T=He.replace(ve,"$&/")+"/"),L(_e,K,T,"",function(Wt){return Wt})):_e!=null&&(te(_e)&&(_e=H(_e,T+(_e.key==null||O&&O.key===_e.key?"":(""+_e.key).replace(ve,"$&/")+"/")+He)),K.push(_e)),1;He=0;var st=he===""?".":he+":";if($(O))for(var Be=0;Be<O.length;Be++)he=O[Be],xe=st+oe(he,Be),He+=L(he,K,T,xe,_e);else if(Be=v(O),typeof Be=="function")for(O=Be.call(O),Be=0;!(he=O.next()).done;)he=he.value,xe=st+oe(he,Be++),He+=L(he,K,T,xe,_e);else if(xe==="object"){if(typeof O.then=="function")return L(q(O),K,T,he,_e);throw K=String(O),Error("Objects are not valid as a React child (found: "+(K==="[object Object]"?"object with keys {"+Object.keys(O).join(", ")+"}":K)+"). If you meant to render a collection of children, use an array instead.")}return He}function Y(O,K,T){if(O==null)return O;var he=[],_e=0;return L(O,he,"","",function(xe){return K.call(T,xe,_e++)}),he}function V(O){if(O._status===-1){var K=O._result;K=K(),K.then(function(T){(O._status===0||O._status===-1)&&(O._status=1,O._result=T)},function(T){(O._status===0||O._status===-1)&&(O._status=2,O._result=T)}),O._status===-1&&(O._status=0,O._result=K)}if(O._status===1)return O._result.default;throw O._result}var ne=typeof reportError=="function"?reportError:function(O){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var K=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof O=="object"&&O!==null&&typeof O.message=="string"?String(O.message):String(O),error:O});if(!window.dispatchEvent(K))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",O);return}console.error(O)},C={map:Y,forEach:function(O,K,T){Y(O,function(){K.apply(this,arguments)},T)},count:function(O){var K=0;return Y(O,function(){K++}),K},toArray:function(O){return Y(O,function(K){return K})||[]},only:function(O){if(!te(O))throw Error("React.Children.only expected to receive a single React element child.");return O}};return Ze.Activity=x,Ze.Children=C,Ze.Component=N,Ze.Fragment=r,Ze.Profiler=l,Ze.PureComponent=R,Ze.StrictMode=a,Ze.Suspense=h,Ze.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=J,Ze.__COMPILER_RUNTIME={__proto__:null,c:function(O){return J.H.useMemoCache(O)}},Ze.cache=function(O){return function(){return O.apply(null,arguments)}},Ze.cacheSignal=function(){return null},Ze.cloneElement=function(O,K,T){if(O==null)throw Error("The argument must be a React element, but you passed "+O+".");var he=E({},O.props),_e=O.key;if(K!=null)for(xe in K.key!==void 0&&(_e=""+K.key),K)!A.call(K,xe)||xe==="key"||xe==="__self"||xe==="__source"||xe==="ref"&&K.ref===void 0||(he[xe]=K[xe]);var xe=arguments.length-2;if(xe===1)he.children=T;else if(1<xe){for(var He=Array(xe),st=0;st<xe;st++)He[st]=arguments[st+2];he.children=He}return ae(O.type,_e,he)},Ze.createContext=function(O){return O={$$typeof:u,_currentValue:O,_currentValue2:O,_threadCount:0,Provider:null,Consumer:null},O.Provider=O,O.Consumer={$$typeof:o,_context:O},O},Ze.createElement=function(O,K,T){var he,_e={},xe=null;if(K!=null)for(he in K.key!==void 0&&(xe=""+K.key),K)A.call(K,he)&&he!=="key"&&he!=="__self"&&he!=="__source"&&(_e[he]=K[he]);var He=arguments.length-2;if(He===1)_e.children=T;else if(1<He){for(var st=Array(He),Be=0;Be<He;Be++)st[Be]=arguments[Be+2];_e.children=st}if(O&&O.defaultProps)for(he in He=O.defaultProps,He)_e[he]===void 0&&(_e[he]=He[he]);return ae(O,xe,_e)},Ze.createRef=function(){return{current:null}},Ze.forwardRef=function(O){return{$$typeof:d,render:O}},Ze.isValidElement=te,Ze.lazy=function(O){return{$$typeof:b,_payload:{_status:-1,_result:O},_init:V}},Ze.memo=function(O,K){return{$$typeof:m,type:O,compare:K===void 0?null:K}},Ze.startTransition=function(O){var K=J.T,T={};J.T=T;try{var he=O(),_e=J.S;_e!==null&&_e(T,he),typeof he=="object"&&he!==null&&typeof he.then=="function"&&he.then(j,ne)}catch(xe){ne(xe)}finally{K!==null&&T.types!==null&&(K.types=T.types),J.T=K}},Ze.unstable_useCacheRefresh=function(){return J.H.useCacheRefresh()},Ze.use=function(O){return J.H.use(O)},Ze.useActionState=function(O,K,T){return J.H.useActionState(O,K,T)},Ze.useCallback=function(O,K){return J.H.useCallback(O,K)},Ze.useContext=function(O){return J.H.useContext(O)},Ze.useDebugValue=function(){},Ze.useDeferredValue=function(O,K){return J.H.useDeferredValue(O,K)},Ze.useEffect=function(O,K){return J.H.useEffect(O,K)},Ze.useEffectEvent=function(O){return J.H.useEffectEvent(O)},Ze.useId=function(){return J.H.useId()},Ze.useImperativeHandle=function(O,K,T){return J.H.useImperativeHandle(O,K,T)},Ze.useInsertionEffect=function(O,K){return J.H.useInsertionEffect(O,K)},Ze.useLayoutEffect=function(O,K){return J.H.useLayoutEffect(O,K)},Ze.useMemo=function(O,K){return J.H.useMemo(O,K)},Ze.useOptimistic=function(O,K){return J.H.useOptimistic(O,K)},Ze.useReducer=function(O,K,T){return J.H.useReducer(O,K,T)},Ze.useRef=function(O){return J.H.useRef(O)},Ze.useState=function(O){return J.H.useState(O)},Ze.useSyncExternalStore=function(O,K,T){return J.H.useSyncExternalStore(O,K,T)},Ze.useTransition=function(){return J.H.useTransition()},Ze.version="19.2.4",Ze}var Ib;function cm(){return Ib||(Ib=1,Vf.exports=kw()),Vf.exports}var S=cm();const _w=Nu(S),Ew=xw({__proto__:null,default:_w},[S]);var Yf={exports:{}},Pl={},Qf={exports:{}},Xf={};/**
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 Bb;function ww(){return Bb||(Bb=1,(function(e){function n(L,Y){var V=L.length;L.push(Y);e:for(;0<V;){var ne=V-1>>>1,C=L[ne];if(0<l(C,Y))L[ne]=Y,L[V]=C,V=ne;else break e}}function r(L){return L.length===0?null:L[0]}function a(L){if(L.length===0)return null;var Y=L[0],V=L.pop();if(V!==Y){L[0]=V;e:for(var ne=0,C=L.length,O=C>>>1;ne<O;){var K=2*(ne+1)-1,T=L[K],he=K+1,_e=L[he];if(0>l(T,V))he<C&&0>l(_e,T)?(L[ne]=_e,L[he]=V,ne=he):(L[ne]=T,L[K]=V,ne=K);else if(he<C&&0>l(_e,V))L[ne]=_e,L[he]=V,ne=he;else break e}}return Y}function l(L,Y){var V=L.sortIndex-Y.sortIndex;return V!==0?V:L.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 u=Date,d=u.now();e.unstable_now=function(){return u.now()-d}}var h=[],m=[],b=1,x=null,y=3,v=!1,_=!1,E=!1,w=!1,N=typeof setTimeout=="function"?setTimeout:null,M=typeof clearTimeout=="function"?clearTimeout:null,R=typeof setImmediate<"u"?setImmediate:null;function U(L){for(var Y=r(m);Y!==null;){if(Y.callback===null)a(m);else if(Y.startTime<=L)a(m),Y.sortIndex=Y.expirationTime,n(h,Y);else break;Y=r(m)}}function $(L){if(E=!1,U(L),!_)if(r(h)!==null)_=!0,j||(j=!0,ee());else{var Y=r(m);Y!==null&&q($,Y.startTime-L)}}var j=!1,J=-1,A=5,ae=-1;function H(){return w?!0:!(e.unstable_now()-ae<A)}function te(){if(w=!1,j){var L=e.unstable_now();ae=L;var Y=!0;try{e:{_=!1,E&&(E=!1,M(J),J=-1),v=!0;var V=y;try{t:{for(U(L),x=r(h);x!==null&&!(x.expirationTime>L&&H());){var ne=x.callback;if(typeof ne=="function"){x.callback=null,y=x.priorityLevel;var C=ne(x.expirationTime<=L);if(L=e.unstable_now(),typeof C=="function"){x.callback=C,U(L),Y=!0;break t}x===r(h)&&a(h),U(L)}else a(h);x=r(h)}if(x!==null)Y=!0;else{var O=r(m);O!==null&&q($,O.startTime-L),Y=!1}}break e}finally{x=null,y=V,v=!1}Y=void 0}}finally{Y?ee():j=!1}}}var ee;if(typeof R=="function")ee=function(){R(te)};else if(typeof MessageChannel<"u"){var ve=new MessageChannel,oe=ve.port2;ve.port1.onmessage=te,ee=function(){oe.postMessage(null)}}else ee=function(){N(te,0)};function q(L,Y){J=N(function(){L(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(L){L.callback=null},e.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<L?Math.floor(1e3/L):5},e.unstable_getCurrentPriorityLevel=function(){return y},e.unstable_next=function(L){switch(y){case 1:case 2:case 3:var Y=3;break;default:Y=y}var V=y;y=Y;try{return L()}finally{y=V}},e.unstable_requestPaint=function(){w=!0},e.unstable_runWithPriority=function(L,Y){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var V=y;y=L;try{return Y()}finally{y=V}},e.unstable_scheduleCallback=function(L,Y,V){var ne=e.unstable_now();switch(typeof V=="object"&&V!==null?(V=V.delay,V=typeof V=="number"&&0<V?ne+V:ne):V=ne,L){case 1:var C=-1;break;case 2:C=250;break;case 5:C=1073741823;break;case 4:C=1e4;break;default:C=5e3}return C=V+C,L={id:b++,callback:Y,priorityLevel:L,startTime:V,expirationTime:C,sortIndex:-1},V>ne?(L.sortIndex=V,n(m,L),r(h)===null&&L===r(m)&&(E?(M(J),J=-1):E=!0,q($,V-ne))):(L.sortIndex=C,n(h,L),_||v||(_=!0,j||(j=!0,ee()))),L},e.unstable_shouldYield=H,e.unstable_wrapCallback=function(L){var Y=y;return function(){var V=y;y=Y;try{return L.apply(this,arguments)}finally{y=V}}}})(Xf)),Xf}var Ub;function Sw(){return Ub||(Ub=1,Qf.exports=ww()),Qf.exports}var Zf={exports:{}},In={};/**
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 Fb;function Nw(){if(Fb)return In;Fb=1;var e=cm();function n(h){var m="https://react.dev/errors/"+h;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)m+="&args[]="+encodeURIComponent(arguments[b])}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(n(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,b){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:b}}var u=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(h,m){if(h==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return In.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,In.createPortal=function(h,m){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(n(299));return o(h,m,null,b)},In.flushSync=function(h){var m=u.T,b=a.p;try{if(u.T=null,a.p=2,h)return h()}finally{u.T=m,a.p=b,a.d.f()}},In.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))},In.prefetchDNS=function(h){typeof h=="string"&&a.d.D(h)},In.preinit=function(h,m){if(typeof h=="string"&&m&&typeof m.as=="string"){var b=m.as,x=d(b,m.crossOrigin),y=typeof m.integrity=="string"?m.integrity:void 0,v=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;b==="style"?a.d.S(h,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:x,integrity:y,fetchPriority:v}):b==="script"&&a.d.X(h,{crossOrigin:x,integrity:y,fetchPriority:v,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},In.preinitModule=function(h,m){if(typeof h=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var b=d(m.as,m.crossOrigin);a.d.M(h,{crossOrigin:b,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)},In.preload=function(h,m){if(typeof h=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var b=m.as,x=d(b,m.crossOrigin);a.d.L(h,b,{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})}},In.preloadModule=function(h,m){if(typeof h=="string")if(m){var b=d(m.as,m.crossOrigin);a.d.m(h,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:b,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else a.d.m(h)},In.requestFormReset=function(h){a.d.r(h)},In.unstable_batchedUpdates=function(h,m){return h(m)},In.useFormState=function(h,m,b){return u.H.useFormState(h,m,b)},In.useFormStatus=function(){return u.H.useHostTransitionStatus()},In.version="19.2.4",In}var Pb;function nv(){if(Pb)return Zf.exports;Pb=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(n){console.error(n)}}return e(),Zf.exports=Nw(),Zf.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 Hb;function zw(){if(Hb)return Pl;Hb=1;var e=Sw(),n=cm(),r=nv();function a(t){var i="https://react.dev/errors/"+t;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 #"+t+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function o(t){var i=t,s=t;if(t.alternate)for(;i.return;)i=i.return;else{t=i;do i=t,(i.flags&4098)!==0&&(s=i.return),t=i.return;while(t)}return i.tag===3?s:null}function u(t){if(t.tag===13){var i=t.memoizedState;if(i===null&&(t=t.alternate,t!==null&&(i=t.memoizedState)),i!==null)return i.dehydrated}return null}function d(t){if(t.tag===31){var i=t.memoizedState;if(i===null&&(t=t.alternate,t!==null&&(i=t.memoizedState)),i!==null)return i.dehydrated}return null}function h(t){if(o(t)!==t)throw Error(a(188))}function m(t){var i=t.alternate;if(!i){if(i=o(t),i===null)throw Error(a(188));return i!==t?null:t}for(var s=t,c=i;;){var p=s.return;if(p===null)break;var g=p.alternate;if(g===null){if(c=p.return,c!==null){s=c;continue}break}if(p.child===g.child){for(g=p.child;g;){if(g===s)return h(p),t;if(g===c)return h(p),i;g=g.sibling}throw Error(a(188))}if(s.return!==c.return)s=p,c=g;else{for(var k=!1,z=p.child;z;){if(z===s){k=!0,s=p,c=g;break}if(z===c){k=!0,c=p,s=g;break}z=z.sibling}if(!k){for(z=g.child;z;){if(z===s){k=!0,s=g,c=p;break}if(z===c){k=!0,c=g,s=p;break}z=z.sibling}if(!k)throw Error(a(189))}}if(s.alternate!==c)throw Error(a(190))}if(s.tag!==3)throw Error(a(188));return s.stateNode.current===s?t:i}function b(t){var i=t.tag;if(i===5||i===26||i===27||i===6)return t;for(t=t.child;t!==null;){if(i=b(t),i!==null)return i;t=t.sibling}return null}var x=Object.assign,y=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),_=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),N=Symbol.for("react.profiler"),M=Symbol.for("react.consumer"),R=Symbol.for("react.context"),U=Symbol.for("react.forward_ref"),$=Symbol.for("react.suspense"),j=Symbol.for("react.suspense_list"),J=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),ae=Symbol.for("react.activity"),H=Symbol.for("react.memo_cache_sentinel"),te=Symbol.iterator;function ee(t){return t===null||typeof t!="object"?null:(t=te&&t[te]||t["@@iterator"],typeof t=="function"?t:null)}var ve=Symbol.for("react.client.reference");function oe(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===ve?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case E:return"Fragment";case N:return"Profiler";case w:return"StrictMode";case $:return"Suspense";case j:return"SuspenseList";case ae:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case _:return"Portal";case R:return t.displayName||"Context";case M:return(t._context.displayName||"Context")+".Consumer";case U:var i=t.render;return t=t.displayName,t||(t=i.displayName||i.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case J:return i=t.displayName||null,i!==null?i:oe(t.type)||"Memo";case A:i=t._payload,t=t._init;try{return oe(t(i))}catch{}}return null}var q=Array.isArray,L=n.__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},ne=[],C=-1;function O(t){return{current:t}}function K(t){0>C||(t.current=ne[C],ne[C]=null,C--)}function T(t,i){C++,ne[C]=t.current,t.current=i}var he=O(null),_e=O(null),xe=O(null),He=O(null);function st(t,i){switch(T(xe,i),T(_e,t),T(he,null),i.nodeType){case 9:case 11:t=(t=i.documentElement)&&(t=t.namespaceURI)?rb(t):0;break;default:if(t=i.tagName,i=i.namespaceURI)i=rb(i),t=ib(i,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}K(he),T(he,t)}function Be(){K(he),K(_e),K(xe)}function Wt(t){t.memoizedState!==null&&T(He,t);var i=he.current,s=ib(i,t.type);i!==s&&(T(_e,t),T(he,s))}function un(t){_e.current===t&&(K(he),K(_e)),He.current===t&&(K(He),Ll._currentValue=V)}var jn,At;function Kt(t){if(jn===void 0)try{throw Error()}catch(s){var i=s.stack.trim().match(/\n( *(at )?)/);jn=i&&i[1]||"",At=-1<s.stack.indexOf(`
42
- at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
43
- `+jn+t+At}var rr=!1;function lt(t,i){if(!t||rr)return"";rr=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(i){var ue=function(){throw Error()};if(Object.defineProperty(ue.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ue,[])}catch(re){var W=re}Reflect.construct(t,[],ue)}else{try{ue.call()}catch(re){W=re}t.call(ue.prototype)}}else{try{throw Error()}catch(re){W=re}(ue=t())&&typeof ue.catch=="function"&&ue.catch(function(){})}}catch(re){if(re&&W&&typeof re.stack=="string")return[re.stack,W.stack]}return[null,null]}};c.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(c.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(c.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var g=c.DetermineComponentFrameRoot(),k=g[0],z=g[1];if(k&&z){var I=k.split(`
44
- `),X=z.split(`
45
- `);for(p=c=0;c<I.length&&!I[c].includes("DetermineComponentFrameRoot");)c++;for(;p<X.length&&!X[p].includes("DetermineComponentFrameRoot");)p++;if(c===I.length||p===X.length)for(c=I.length-1,p=X.length-1;1<=c&&0<=p&&I[c]!==X[p];)p--;for(;1<=c&&0<=p;c--,p--)if(I[c]!==X[p]){if(c!==1||p!==1)do if(c--,p--,0>p||I[c]!==X[p]){var se=`
46
- `+I[c].replace(" at new "," at ");return t.displayName&&se.includes("<anonymous>")&&(se=se.replace("<anonymous>",t.displayName)),se}while(1<=c&&0<=p);break}}}finally{rr=!1,Error.prepareStackTrace=s}return(s=t?t.displayName||t.name:"")?Kt(s):""}function kn(t,i){switch(t.tag){case 26:case 27:case 5:return Kt(t.type);case 16:return Kt("Lazy");case 13:return t.child!==i&&i!==null?Kt("Suspense Fallback"):Kt("Suspense");case 19:return Kt("SuspenseList");case 0:case 15:return lt(t.type,!1);case 11:return lt(t.type.render,!1);case 1:return lt(t.type,!0);case 31:return Kt("Activity");default:return""}}function Kn(t){try{var i="",s=null;do i+=kn(t,s),s=t,t=t.return;while(t);return i}catch(c){return`
47
- Error generating stack: `+c.message+`
48
- `+c.stack}}var br=Object.prototype.hasOwnProperty,xr=e.unstable_scheduleCallback,ni=e.unstable_cancelCallback,ga=e.unstable_shouldYield,Ri=e.unstable_requestPaint,Vt=e.unstable_now,Vn=e.unstable_getCurrentPriorityLevel,ie=e.unstable_ImmediatePriority,be=e.unstable_UserBlockingPriority,Fe=e.unstable_NormalPriority,Qe=e.unstable_LowPriority,Je=e.unstable_IdlePriority,Sn=e.log,ir=e.unstable_setDisableYieldValue,an=null,Jt=null;function qt(t){if(typeof Sn=="function"&&ir(t),Jt&&typeof Jt.setStrictMode=="function")try{Jt.setStrictMode(an,t)}catch{}}var wt=Math.clz32?Math.clz32:Xa,ar=Math.log,Nn=Math.LN2;function Xa(t){return t>>>=0,t===0?32:31-(ar(t)/Nn|0)|0}var qr=256,Dr=262144,$r=4194304;function zn(t){var i=t&42;if(i!==0)return i;switch(t&-t){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 t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function B(t,i,s){var c=t.pendingLanes;if(c===0)return 0;var p=0,g=t.suspendedLanes,k=t.pingedLanes;t=t.warmLanes;var z=c&134217727;return z!==0?(c=z&~g,c!==0?p=zn(c):(k&=z,k!==0?p=zn(k):s||(s=z&~t,s!==0&&(p=zn(s))))):(z=c&~g,z!==0?p=zn(z):k!==0?p=zn(k):s||(s=c&~t,s!==0&&(p=zn(s)))),p===0?0:i!==0&&i!==p&&(i&g)===0&&(g=p&-p,s=i&-i,g>=s||g===32&&(s&4194048)!==0)?i:p}function le(t,i){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&i)===0}function Ee(t,i){switch(t){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 Ke(){var t=$r;return $r<<=1,($r&62914560)===0&&($r=4194304),t}function Tt(t){for(var i=[],s=0;31>s;s++)i.push(t);return i}function St(t,i){t.pendingLanes|=i,i!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Te(t,i,s,c,p,g){var k=t.pendingLanes;t.pendingLanes=s,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=s,t.entangledLanes&=s,t.errorRecoveryDisabledLanes&=s,t.shellSuspendCounter=0;var z=t.entanglements,I=t.expirationTimes,X=t.hiddenUpdates;for(s=k&~s;0<s;){var se=31-wt(s),ue=1<<se;z[se]=0,I[se]=-1;var W=X[se];if(W!==null)for(X[se]=null,se=0;se<W.length;se++){var re=W[se];re!==null&&(re.lane&=-536870913)}s&=~ue}c!==0&&Ne(t,c,0),g!==0&&p===0&&t.tag!==0&&(t.suspendedLanes|=g&~(k&~i))}function Ne(t,i,s){t.pendingLanes|=i,t.suspendedLanes&=~i;var c=31-wt(i);t.entangledLanes|=i,t.entanglements[c]=t.entanglements[c]|1073741824|s&261930}function $e(t,i){var s=t.entangledLanes|=i;for(t=t.entanglements;s;){var c=31-wt(s),p=1<<c;p&i|t[c]&i&&(t[c]|=i),s&=~p}}function D(t,i){var s=i&-i;return s=(s&42)!==0?1:F(s),(s&(t.suspendedLanes|i))!==0?0:s}function F(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=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:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function Z(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function de(){var t=Y.p;return t!==0?t:(t=window.event,t===void 0?32:zb(t.type))}function me(t,i){var s=Y.p;try{return Y.p=t,i()}finally{Y.p=s}}var Ce=Math.random().toString(36).slice(2),ye="__reactFiber$"+Ce,Se="__reactProps$"+Ce,ze="__reactContainer$"+Ce,Ie="__reactEvents$"+Ce,Ue="__reactListeners$"+Ce,Me="__reactHandles$"+Ce,yt="__reactResources$"+Ce,rt="__reactMarker$"+Ce;function Ot(t){delete t[ye],delete t[Se],delete t[Ie],delete t[Ue],delete t[Me]}function vt(t){var i=t[ye];if(i)return i;for(var s=t.parentNode;s;){if(i=s[ze]||s[ye]){if(s=i.alternate,i.child!==null||s!==null&&s.child!==null)for(t=db(t);t!==null;){if(s=t[ye])return s;t=db(t)}return i}t=s,s=t.parentNode}return null}function Yt(t){if(t=t[ye]||t[ze]){var i=t.tag;if(i===5||i===6||i===13||i===31||i===26||i===27||i===3)return t}return null}function ot(t){var i=t.tag;if(i===5||i===26||i===27||i===6)return t.stateNode;throw Error(a(33))}function sn(t){var i=t[yt];return i||(i=t[yt]={hoistableStyles:new Map,hoistableScripts:new Map}),i}function Lt(t){t[rt]=!0}var Gr=new Set,Ln={};function dn(t,i){fe(t,i),fe(t+"Capture",i)}function fe(t,i){for(Ln[t]=i,t=0;t<i.length;t++)Gr.add(i[t])}var De=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]*$"),Xe={},kt={};function $t(t){return br.call(kt,t)?!0:br.call(Xe,t)?!1:De.test(t)?kt[t]=!0:(Xe[t]=!0,!1)}function Ve(t,i,s){if($t(i))if(s===null)t.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":t.removeAttribute(i);return;case"boolean":var c=i.toLowerCase().slice(0,5);if(c!=="data-"&&c!=="aria-"){t.removeAttribute(i);return}}t.setAttribute(i,""+s)}}function Rt(t,i,s){if(s===null)t.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(i);return}t.setAttribute(i,""+s)}}function ln(t,i,s,c){if(c===null)t.removeAttribute(s);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(s);return}t.setAttributeNS(i,s,""+c)}}function _t(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function ht(t){var i=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function ri(t,i,s){var c=Object.getOwnPropertyDescriptor(t.constructor.prototype,i);if(!t.hasOwnProperty(i)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var p=c.get,g=c.set;return Object.defineProperty(t,i,{configurable:!0,get:function(){return p.call(this)},set:function(k){s=""+k,g.call(this,k)}}),Object.defineProperty(t,i,{enumerable:c.enumerable}),{getValue:function(){return s},setValue:function(k){s=""+k},stopTracking:function(){t._valueTracker=null,delete t[i]}}}}function ii(t){if(!t._valueTracker){var i=ht(t)?"checked":"value";t._valueTracker=ri(t,i,""+t[i])}}function ba(t){if(!t)return!1;var i=t._valueTracker;if(!i)return!0;var s=i.getValue(),c="";return t&&(c=ht(t)?t.checked?"true":"false":t.value),t=c,t!==s?(i.setValue(t),!0):!1}function Za(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var $u=/[\n"\\]/g;function Yn(t){return t.replace($u,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function Xs(t,i,s,c,p,g,k,z){t.name="",k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?t.type=k:t.removeAttribute("type"),i!=null?k==="number"?(i===0&&t.value===""||t.value!=i)&&(t.value=""+_t(i)):t.value!==""+_t(i)&&(t.value=""+_t(i)):k!=="submit"&&k!=="reset"||t.removeAttribute("value"),i!=null?Wa(t,k,_t(i)):s!=null?Wa(t,k,_t(s)):c!=null&&t.removeAttribute("value"),p==null&&g!=null&&(t.defaultChecked=!!g),p!=null&&(t.checked=p&&typeof p!="function"&&typeof p!="symbol"),z!=null&&typeof z!="function"&&typeof z!="symbol"&&typeof z!="boolean"?t.name=""+_t(z):t.removeAttribute("name")}function xa(t,i,s,c,p,g,k,z){if(g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(t.type=g),i!=null||s!=null){if(!(g!=="submit"&&g!=="reset"||i!=null)){ii(t);return}s=s!=null?""+_t(s):"",i=i!=null?""+_t(i):s,z||i===t.value||(t.value=i),t.defaultValue=i}c=c??p,c=typeof c!="function"&&typeof c!="symbol"&&!!c,t.checked=z?t.checked:!!c,t.defaultChecked=!!c,k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"&&(t.name=k),ii(t)}function Wa(t,i,s){i==="number"&&Za(t.ownerDocument)===t||t.defaultValue===""+s||(t.defaultValue=""+s)}function Tn(t,i,s,c){if(t=t.options,i){i={};for(var p=0;p<s.length;p++)i["$"+s[p]]=!0;for(s=0;s<t.length;s++)p=i.hasOwnProperty("$"+t[s].value),t[s].selected!==p&&(t[s].selected=p),p&&c&&(t[s].defaultSelected=!0)}else{for(s=""+_t(s),i=null,p=0;p<t.length;p++){if(t[p].value===s){t[p].selected=!0,c&&(t[p].defaultSelected=!0);return}i!==null||t[p].disabled||(i=t[p])}i!==null&&(i.selected=!0)}}function Co(t,i,s){if(i!=null&&(i=""+_t(i),i!==t.value&&(t.value=i),s==null)){t.defaultValue!==i&&(t.defaultValue=i);return}t.defaultValue=s!=null?""+_t(s):""}function Ja(t,i,s,c){if(i==null){if(c!=null){if(s!=null)throw Error(a(92));if(q(c)){if(1<c.length)throw Error(a(93));c=c[0]}s=c}s==null&&(s=""),i=s}s=_t(i),t.defaultValue=s,c=t.textContent,c===s&&c!==""&&c!==null&&(t.value=c),ii(t)}function Ye(t,i){if(i){var s=t.firstChild;if(s&&s===t.lastChild&&s.nodeType===3){s.nodeValue=i;return}}t.textContent=i}var To=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 fn(t,i,s){var c=i.indexOf("--")===0;s==null||typeof s=="boolean"||s===""?c?t.setProperty(i,""):i==="float"?t.cssFloat="":t[i]="":c?t.setProperty(i,s):typeof s!="number"||s===0||To.has(i)?i==="float"?t.cssFloat=s:t[i]=(""+s).trim():t[i]=s+"px"}function Mt(t,i,s){if(i!=null&&typeof i!="object")throw Error(a(62));if(t=t.style,s!=null){for(var c in s)!s.hasOwnProperty(c)||i!=null&&i.hasOwnProperty(c)||(c.indexOf("--")===0?t.setProperty(c,""):c==="float"?t.cssFloat="":t[c]="");for(var p in i)c=i[p],i.hasOwnProperty(p)&&s[p]!==c&&fn(t,p,c)}else for(var g in i)i.hasOwnProperty(g)&&fn(t,g,i[g])}function Ai(t){if(t.indexOf("-")===-1)return!1;switch(t){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 ai=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"]]),Zs=/^[\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 Oi(t){return Zs.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function ke(){}var je=null;function We(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var mt=null,tn=null;function yr(t){var i=Yt(t);if(i&&(t=i.stateNode)){var s=t[Se]||null;e:switch(t=i.stateNode,i.type){case"input":if(Xs(t,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),i=s.name,s.type==="radio"&&i!=null){for(s=t;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll('input[name="'+Yn(""+i)+'"][type="radio"]'),i=0;i<s.length;i++){var c=s[i];if(c!==t&&c.form===t.form){var p=c[Se]||null;if(!p)throw Error(a(90));Xs(c,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(i=0;i<s.length;i++)c=s[i],c.form===t.form&&ba(c)}break e;case"textarea":Co(t,s.value,s.defaultValue);break e;case"select":i=s.value,i!=null&&Tn(t,!!s.multiple,i,!1)}}}var Ws=!1;function Ro(t,i,s){if(Ws)return t(i,s);Ws=!0;try{var c=t(i);return c}finally{if(Ws=!1,(mt!==null||tn!==null)&&(bc(),mt&&(i=mt,t=tn,tn=mt=null,yr(i),t)))for(i=0;i<t.length;i++)yr(t[i])}}function Js(t,i){var s=t.stateNode;if(s===null)return null;var c=s[Se]||null;if(c===null)return null;s=c[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":(c=!c.disabled)||(t=t.type,c=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!c;break e;default:t=!1}if(t)return null;if(s&&typeof s!="function")throw Error(a(231,i,typeof s));return s}var si=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Gu=!1;if(si)try{var el={};Object.defineProperty(el,"passive",{get:function(){Gu=!0}}),window.addEventListener("test",el,el),window.removeEventListener("test",el,el)}catch{Gu=!1}var Mi=null,Ku=null,Ao=null;function ip(){if(Ao)return Ao;var t,i=Ku,s=i.length,c,p="value"in Mi?Mi.value:Mi.textContent,g=p.length;for(t=0;t<s&&i[t]===p[t];t++);var k=s-t;for(c=1;c<=k&&i[s-c]===p[g-c];c++);return Ao=p.slice(t,1<c?1-c:void 0)}function Oo(t){var i=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&i===13&&(t=13)):t=i,t===10&&(t=13),32<=t||t===13?t:0}function Mo(){return!0}function ap(){return!1}function Qn(t){function i(s,c,p,g,k){this._reactName=s,this._targetInst=p,this.type=c,this.nativeEvent=g,this.target=k,this.currentTarget=null;for(var z in t)t.hasOwnProperty(z)&&(s=t[z],this[z]=s?s(g):g[z]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?Mo:ap,this.isPropagationStopped=ap,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=Mo)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=Mo)},persist:function(){},isPersistent:Mo}),i}var ya={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Do=Qn(ya),tl=x({},ya,{view:0,detail:0}),g_=Qn(tl),Vu,Yu,nl,jo=x({},tl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Xu,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==nl&&(nl&&t.type==="mousemove"?(Vu=t.screenX-nl.screenX,Yu=t.screenY-nl.screenY):Yu=Vu=0,nl=t),Vu)},movementY:function(t){return"movementY"in t?t.movementY:Yu}}),sp=Qn(jo),b_=x({},jo,{dataTransfer:0}),x_=Qn(b_),y_=x({},tl,{relatedTarget:0}),Qu=Qn(y_),v_=x({},ya,{animationName:0,elapsedTime:0,pseudoElement:0}),k_=Qn(v_),__=x({},ya,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),E_=Qn(__),w_=x({},ya,{data:0}),lp=Qn(w_),S_={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},N_={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"},z_={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function C_(t){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(t):(t=z_[t])?!!i[t]:!1}function Xu(){return C_}var T_=x({},tl,{key:function(t){if(t.key){var i=S_[t.key]||t.key;if(i!=="Unidentified")return i}return t.type==="keypress"?(t=Oo(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?N_[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Xu,charCode:function(t){return t.type==="keypress"?Oo(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Oo(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),R_=Qn(T_),A_=x({},jo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),op=Qn(A_),O_=x({},tl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Xu}),M_=Qn(O_),D_=x({},ya,{propertyName:0,elapsedTime:0,pseudoElement:0}),j_=Qn(D_),L_=x({},jo,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),I_=Qn(L_),B_=x({},ya,{newState:0,oldState:0}),U_=Qn(B_),F_=[9,13,27,32],Zu=si&&"CompositionEvent"in window,rl=null;si&&"documentMode"in document&&(rl=document.documentMode);var P_=si&&"TextEvent"in window&&!rl,cp=si&&(!Zu||rl&&8<rl&&11>=rl),up=" ",dp=!1;function fp(t,i){switch(t){case"keyup":return F_.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function hp(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var es=!1;function H_(t,i){switch(t){case"compositionend":return hp(i);case"keypress":return i.which!==32?null:(dp=!0,up);case"textInput":return t=i.data,t===up&&dp?null:t;default:return null}}function q_(t,i){if(es)return t==="compositionend"||!Zu&&fp(t,i)?(t=ip(),Ao=Ku=Mi=null,es=!1,t):null;switch(t){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 cp&&i.locale!=="ko"?null:i.data;default:return null}}var $_={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 mp(t){var i=t&&t.nodeName&&t.nodeName.toLowerCase();return i==="input"?!!$_[t.type]:i==="textarea"}function pp(t,i,s,c){mt?tn?tn.push(c):tn=[c]:mt=c,i=wc(i,"onChange"),0<i.length&&(s=new Do("onChange","change",null,s,c),t.push({event:s,listeners:i}))}var il=null,al=null;function G_(t){Z0(t,0)}function Lo(t){var i=ot(t);if(ba(i))return t}function gp(t,i){if(t==="change")return i}var bp=!1;if(si){var Wu;if(si){var Ju="oninput"in document;if(!Ju){var xp=document.createElement("div");xp.setAttribute("oninput","return;"),Ju=typeof xp.oninput=="function"}Wu=Ju}else Wu=!1;bp=Wu&&(!document.documentMode||9<document.documentMode)}function yp(){il&&(il.detachEvent("onpropertychange",vp),al=il=null)}function vp(t){if(t.propertyName==="value"&&Lo(al)){var i=[];pp(i,al,t,We(t)),Ro(G_,i)}}function K_(t,i,s){t==="focusin"?(yp(),il=i,al=s,il.attachEvent("onpropertychange",vp)):t==="focusout"&&yp()}function V_(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Lo(al)}function Y_(t,i){if(t==="click")return Lo(i)}function Q_(t,i){if(t==="input"||t==="change")return Lo(i)}function X_(t,i){return t===i&&(t!==0||1/t===1/i)||t!==t&&i!==i}var sr=typeof Object.is=="function"?Object.is:X_;function sl(t,i){if(sr(t,i))return!0;if(typeof t!="object"||t===null||typeof i!="object"||i===null)return!1;var s=Object.keys(t),c=Object.keys(i);if(s.length!==c.length)return!1;for(c=0;c<s.length;c++){var p=s[c];if(!br.call(i,p)||!sr(t[p],i[p]))return!1}return!0}function kp(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function _p(t,i){var s=kp(t);t=0;for(var c;s;){if(s.nodeType===3){if(c=t+s.textContent.length,t<=i&&c>=i)return{node:s,offset:i-t};t=c}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=kp(s)}}function Ep(t,i){return t&&i?t===i?!0:t&&t.nodeType===3?!1:i&&i.nodeType===3?Ep(t,i.parentNode):"contains"in t?t.contains(i):t.compareDocumentPosition?!!(t.compareDocumentPosition(i)&16):!1:!1}function wp(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var i=Za(t.document);i instanceof t.HTMLIFrameElement;){try{var s=typeof i.contentWindow.location.href=="string"}catch{s=!1}if(s)t=i.contentWindow;else break;i=Za(t.document)}return i}function ed(t){var i=t&&t.nodeName&&t.nodeName.toLowerCase();return i&&(i==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||i==="textarea"||t.contentEditable==="true")}var Z_=si&&"documentMode"in document&&11>=document.documentMode,ts=null,td=null,ll=null,nd=!1;function Sp(t,i,s){var c=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;nd||ts==null||ts!==Za(c)||(c=ts,"selectionStart"in c&&ed(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),ll&&sl(ll,c)||(ll=c,c=wc(td,"onSelect"),0<c.length&&(i=new Do("onSelect","select",null,i,s),t.push({event:i,listeners:c}),i.target=ts)))}function va(t,i){var s={};return s[t.toLowerCase()]=i.toLowerCase(),s["Webkit"+t]="webkit"+i,s["Moz"+t]="moz"+i,s}var ns={animationend:va("Animation","AnimationEnd"),animationiteration:va("Animation","AnimationIteration"),animationstart:va("Animation","AnimationStart"),transitionrun:va("Transition","TransitionRun"),transitionstart:va("Transition","TransitionStart"),transitioncancel:va("Transition","TransitionCancel"),transitionend:va("Transition","TransitionEnd")},rd={},Np={};si&&(Np=document.createElement("div").style,"AnimationEvent"in window||(delete ns.animationend.animation,delete ns.animationiteration.animation,delete ns.animationstart.animation),"TransitionEvent"in window||delete ns.transitionend.transition);function ka(t){if(rd[t])return rd[t];if(!ns[t])return t;var i=ns[t],s;for(s in i)if(i.hasOwnProperty(s)&&s in Np)return rd[t]=i[s];return t}var zp=ka("animationend"),Cp=ka("animationiteration"),Tp=ka("animationstart"),W_=ka("transitionrun"),J_=ka("transitionstart"),eE=ka("transitioncancel"),Rp=ka("transitionend"),Ap=new Map,id="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(" ");id.push("scrollEnd");function jr(t,i){Ap.set(t,i),dn(i,[t])}var Io=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var i=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(i))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},vr=[],rs=0,ad=0;function Bo(){for(var t=rs,i=ad=rs=0;i<t;){var s=vr[i];vr[i++]=null;var c=vr[i];vr[i++]=null;var p=vr[i];vr[i++]=null;var g=vr[i];if(vr[i++]=null,c!==null&&p!==null){var k=c.pending;k===null?p.next=p:(p.next=k.next,k.next=p),c.pending=p}g!==0&&Op(s,p,g)}}function Uo(t,i,s,c){vr[rs++]=t,vr[rs++]=i,vr[rs++]=s,vr[rs++]=c,ad|=c,t.lanes|=c,t=t.alternate,t!==null&&(t.lanes|=c)}function sd(t,i,s,c){return Uo(t,i,s,c),Fo(t)}function _a(t,i){return Uo(t,null,null,i),Fo(t)}function Op(t,i,s){t.lanes|=s;var c=t.alternate;c!==null&&(c.lanes|=s);for(var p=!1,g=t.return;g!==null;)g.childLanes|=s,c=g.alternate,c!==null&&(c.childLanes|=s),g.tag===22&&(t=g.stateNode,t===null||t._visibility&1||(p=!0)),t=g,g=g.return;return t.tag===3?(g=t.stateNode,p&&i!==null&&(p=31-wt(s),t=g.hiddenUpdates,c=t[p],c===null?t[p]=[i]:c.push(i),i.lane=s|536870912),g):null}function Fo(t){if(50<Tl)throw Tl=0,gf=null,Error(a(185));for(var i=t.return;i!==null;)t=i,i=t.return;return t.tag===3?t.stateNode:null}var is={};function tE(t,i,s,c){this.tag=t,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=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function lr(t,i,s,c){return new tE(t,i,s,c)}function ld(t){return t=t.prototype,!(!t||!t.isReactComponent)}function li(t,i){var s=t.alternate;return s===null?(s=lr(t.tag,i,t.key,t.mode),s.elementType=t.elementType,s.type=t.type,s.stateNode=t.stateNode,s.alternate=t,t.alternate=s):(s.pendingProps=i,s.type=t.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=t.flags&65011712,s.childLanes=t.childLanes,s.lanes=t.lanes,s.child=t.child,s.memoizedProps=t.memoizedProps,s.memoizedState=t.memoizedState,s.updateQueue=t.updateQueue,i=t.dependencies,s.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},s.sibling=t.sibling,s.index=t.index,s.ref=t.ref,s.refCleanup=t.refCleanup,s}function Mp(t,i){t.flags&=65011714;var s=t.alternate;return s===null?(t.childLanes=0,t.lanes=i,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=s.childLanes,t.lanes=s.lanes,t.child=s.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=s.memoizedProps,t.memoizedState=s.memoizedState,t.updateQueue=s.updateQueue,t.type=s.type,i=s.dependencies,t.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),t}function Po(t,i,s,c,p,g){var k=0;if(c=t,typeof t=="function")ld(t)&&(k=1);else if(typeof t=="string")k=sw(t,s,he.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case ae:return t=lr(31,s,i,p),t.elementType=ae,t.lanes=g,t;case E:return Ea(s.children,p,g,i);case w:k=8,p|=24;break;case N:return t=lr(12,s,i,p|2),t.elementType=N,t.lanes=g,t;case $:return t=lr(13,s,i,p),t.elementType=$,t.lanes=g,t;case j:return t=lr(19,s,i,p),t.elementType=j,t.lanes=g,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case R:k=10;break e;case M:k=9;break e;case U:k=11;break e;case J:k=14;break e;case A:k=16,c=null;break e}k=29,s=Error(a(130,t===null?"null":typeof t,"")),c=null}return i=lr(k,s,i,p),i.elementType=t,i.type=c,i.lanes=g,i}function Ea(t,i,s,c){return t=lr(7,t,c,i),t.lanes=s,t}function od(t,i,s){return t=lr(6,t,null,i),t.lanes=s,t}function Dp(t){var i=lr(18,null,null,0);return i.stateNode=t,i}function cd(t,i,s){return i=lr(4,t.children!==null?t.children:[],t.key,i),i.lanes=s,i.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},i}var jp=new WeakMap;function kr(t,i){if(typeof t=="object"&&t!==null){var s=jp.get(t);return s!==void 0?s:(i={value:t,source:i,stack:Kn(i)},jp.set(t,i),i)}return{value:t,source:i,stack:Kn(i)}}var as=[],ss=0,Ho=null,ol=0,_r=[],Er=0,Di=null,Kr=1,Vr="";function oi(t,i){as[ss++]=ol,as[ss++]=Ho,Ho=t,ol=i}function Lp(t,i,s){_r[Er++]=Kr,_r[Er++]=Vr,_r[Er++]=Di,Di=t;var c=Kr;t=Vr;var p=32-wt(c)-1;c&=~(1<<p),s+=1;var g=32-wt(i)+p;if(30<g){var k=p-p%5;g=(c&(1<<k)-1).toString(32),c>>=k,p-=k,Kr=1<<32-wt(i)+p|s<<p|c,Vr=g+t}else Kr=1<<g|s<<p|c,Vr=t}function ud(t){t.return!==null&&(oi(t,1),Lp(t,1,0))}function dd(t){for(;t===Ho;)Ho=as[--ss],as[ss]=null,ol=as[--ss],as[ss]=null;for(;t===Di;)Di=_r[--Er],_r[Er]=null,Vr=_r[--Er],_r[Er]=null,Kr=_r[--Er],_r[Er]=null}function Ip(t,i){_r[Er++]=Kr,_r[Er++]=Vr,_r[Er++]=Di,Kr=i.id,Vr=i.overflow,Di=t}var Rn=null,Qt=null,bt=!1,ji=null,wr=!1,fd=Error(a(519));function Li(t){var i=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw cl(kr(i,t)),fd}function Bp(t){var i=t.stateNode,s=t.type,c=t.memoizedProps;switch(i[ye]=t,i[Se]=c,s){case"dialog":ut("cancel",i),ut("close",i);break;case"iframe":case"object":case"embed":ut("load",i);break;case"video":case"audio":for(s=0;s<Al.length;s++)ut(Al[s],i);break;case"source":ut("error",i);break;case"img":case"image":case"link":ut("error",i),ut("load",i);break;case"details":ut("toggle",i);break;case"input":ut("invalid",i),xa(i,c.value,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name,!0);break;case"select":ut("invalid",i);break;case"textarea":ut("invalid",i),Ja(i,c.value,c.defaultValue,c.children)}s=c.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||i.textContent===""+s||c.suppressHydrationWarning===!0||tb(i.textContent,s)?(c.popover!=null&&(ut("beforetoggle",i),ut("toggle",i)),c.onScroll!=null&&ut("scroll",i),c.onScrollEnd!=null&&ut("scrollend",i),c.onClick!=null&&(i.onclick=ke),i=!0):i=!1,i||Li(t,!0)}function Up(t){for(Rn=t.return;Rn;)switch(Rn.tag){case 5:case 31:case 13:wr=!1;return;case 27:case 3:wr=!0;return;default:Rn=Rn.return}}function ls(t){if(t!==Rn)return!1;if(!bt)return Up(t),bt=!0,!1;var i=t.tag,s;if((s=i!==3&&i!==27)&&((s=i===5)&&(s=t.type,s=!(s!=="form"&&s!=="button")||Af(t.type,t.memoizedProps)),s=!s),s&&Qt&&Li(t),Up(t),i===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(a(317));Qt=ub(t)}else if(i===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(a(317));Qt=ub(t)}else i===27?(i=Qt,Xi(t.type)?(t=Lf,Lf=null,Qt=t):Qt=i):Qt=Rn?Nr(t.stateNode.nextSibling):null;return!0}function wa(){Qt=Rn=null,bt=!1}function hd(){var t=ji;return t!==null&&(Jn===null?Jn=t:Jn.push.apply(Jn,t),ji=null),t}function cl(t){ji===null?ji=[t]:ji.push(t)}var md=O(null),Sa=null,ci=null;function Ii(t,i,s){T(md,i._currentValue),i._currentValue=s}function ui(t){t._currentValue=md.current,K(md)}function pd(t,i,s){for(;t!==null;){var c=t.alternate;if((t.childLanes&i)!==i?(t.childLanes|=i,c!==null&&(c.childLanes|=i)):c!==null&&(c.childLanes&i)!==i&&(c.childLanes|=i),t===s)break;t=t.return}}function gd(t,i,s,c){var p=t.child;for(p!==null&&(p.return=t);p!==null;){var g=p.dependencies;if(g!==null){var k=p.child;g=g.firstContext;e:for(;g!==null;){var z=g;g=p;for(var I=0;I<i.length;I++)if(z.context===i[I]){g.lanes|=s,z=g.alternate,z!==null&&(z.lanes|=s),pd(g.return,s,t),c||(k=null);break e}g=z.next}}else if(p.tag===18){if(k=p.return,k===null)throw Error(a(341));k.lanes|=s,g=k.alternate,g!==null&&(g.lanes|=s),pd(k,s,t),k=null}else k=p.child;if(k!==null)k.return=p;else for(k=p;k!==null;){if(k===t){k=null;break}if(p=k.sibling,p!==null){p.return=k.return,k=p;break}k=k.return}p=k}}function os(t,i,s,c){t=null;for(var p=i,g=!1;p!==null;){if(!g){if((p.flags&524288)!==0)g=!0;else if((p.flags&262144)!==0)break}if(p.tag===10){var k=p.alternate;if(k===null)throw Error(a(387));if(k=k.memoizedProps,k!==null){var z=p.type;sr(p.pendingProps.value,k.value)||(t!==null?t.push(z):t=[z])}}else if(p===He.current){if(k=p.alternate,k===null)throw Error(a(387));k.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(t!==null?t.push(Ll):t=[Ll])}p=p.return}t!==null&&gd(i,t,s,c),i.flags|=262144}function qo(t){for(t=t.firstContext;t!==null;){if(!sr(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function Na(t){Sa=t,ci=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function An(t){return Fp(Sa,t)}function $o(t,i){return Sa===null&&Na(t),Fp(t,i)}function Fp(t,i){var s=i._currentValue;if(i={context:i,memoizedValue:s,next:null},ci===null){if(t===null)throw Error(a(308));ci=i,t.dependencies={lanes:0,firstContext:i},t.flags|=524288}else ci=ci.next=i;return s}var nE=typeof AbortController<"u"?AbortController:function(){var t=[],i=this.signal={aborted:!1,addEventListener:function(s,c){t.push(c)}};this.abort=function(){i.aborted=!0,t.forEach(function(s){return s()})}},rE=e.unstable_scheduleCallback,iE=e.unstable_NormalPriority,hn={$$typeof:R,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function bd(){return{controller:new nE,data:new Map,refCount:0}}function ul(t){t.refCount--,t.refCount===0&&rE(iE,function(){t.controller.abort()})}var dl=null,xd=0,cs=0,us=null;function aE(t,i){if(dl===null){var s=dl=[];xd=0,cs=_f(),us={status:"pending",value:void 0,then:function(c){s.push(c)}}}return xd++,i.then(Pp,Pp),i}function Pp(){if(--xd===0&&dl!==null){us!==null&&(us.status="fulfilled");var t=dl;dl=null,cs=0,us=null;for(var i=0;i<t.length;i++)(0,t[i])()}}function sE(t,i){var s=[],c={status:"pending",value:null,reason:null,then:function(p){s.push(p)}};return t.then(function(){c.status="fulfilled",c.value=i;for(var p=0;p<s.length;p++)(0,s[p])(i)},function(p){for(c.status="rejected",c.reason=p,p=0;p<s.length;p++)(0,s[p])(void 0)}),c}var Hp=L.S;L.S=function(t,i){S0=Vt(),typeof i=="object"&&i!==null&&typeof i.then=="function"&&aE(t,i),Hp!==null&&Hp(t,i)};var za=O(null);function yd(){var t=za.current;return t!==null?t:Pt.pooledCache}function Go(t,i){i===null?T(za,za.current):T(za,i.pool)}function qp(){var t=yd();return t===null?null:{parent:hn._currentValue,pool:t}}var ds=Error(a(460)),vd=Error(a(474)),Ko=Error(a(542)),Vo={then:function(){}};function $p(t){return t=t.status,t==="fulfilled"||t==="rejected"}function Gp(t,i,s){switch(s=t[s],s===void 0?t.push(i):s!==i&&(i.then(ke,ke),i=s),i.status){case"fulfilled":return i.value;case"rejected":throw t=i.reason,Vp(t),t;default:if(typeof i.status=="string")i.then(ke,ke);else{if(t=Pt,t!==null&&100<t.shellSuspendCounter)throw Error(a(482));t=i,t.status="pending",t.then(function(c){if(i.status==="pending"){var p=i;p.status="fulfilled",p.value=c}},function(c){if(i.status==="pending"){var p=i;p.status="rejected",p.reason=c}})}switch(i.status){case"fulfilled":return i.value;case"rejected":throw t=i.reason,Vp(t),t}throw Ta=i,ds}}function Ca(t){try{var i=t._init;return i(t._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(Ta=s,ds):s}}var Ta=null;function Kp(){if(Ta===null)throw Error(a(459));var t=Ta;return Ta=null,t}function Vp(t){if(t===ds||t===Ko)throw Error(a(483))}var fs=null,fl=0;function Yo(t){var i=fl;return fl+=1,fs===null&&(fs=[]),Gp(fs,t,i)}function hl(t,i){i=i.props.ref,t.ref=i!==void 0?i:null}function Qo(t,i){throw i.$$typeof===y?Error(a(525)):(t=Object.prototype.toString.call(i),Error(a(31,t==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":t)))}function Yp(t){function i(G,P){if(t){var Q=G.deletions;Q===null?(G.deletions=[P],G.flags|=16):Q.push(P)}}function s(G,P){if(!t)return null;for(;P!==null;)i(G,P),P=P.sibling;return null}function c(G){for(var P=new Map;G!==null;)G.key!==null?P.set(G.key,G):P.set(G.index,G),G=G.sibling;return P}function p(G,P){return G=li(G,P),G.index=0,G.sibling=null,G}function g(G,P,Q){return G.index=Q,t?(Q=G.alternate,Q!==null?(Q=Q.index,Q<P?(G.flags|=67108866,P):Q):(G.flags|=67108866,P)):(G.flags|=1048576,P)}function k(G){return t&&G.alternate===null&&(G.flags|=67108866),G}function z(G,P,Q,ce){return P===null||P.tag!==6?(P=od(Q,G.mode,ce),P.return=G,P):(P=p(P,Q),P.return=G,P)}function I(G,P,Q,ce){var Pe=Q.type;return Pe===E?se(G,P,Q.props.children,ce,Q.key):P!==null&&(P.elementType===Pe||typeof Pe=="object"&&Pe!==null&&Pe.$$typeof===A&&Ca(Pe)===P.type)?(P=p(P,Q.props),hl(P,Q),P.return=G,P):(P=Po(Q.type,Q.key,Q.props,null,G.mode,ce),hl(P,Q),P.return=G,P)}function X(G,P,Q,ce){return P===null||P.tag!==4||P.stateNode.containerInfo!==Q.containerInfo||P.stateNode.implementation!==Q.implementation?(P=cd(Q,G.mode,ce),P.return=G,P):(P=p(P,Q.children||[]),P.return=G,P)}function se(G,P,Q,ce,Pe){return P===null||P.tag!==7?(P=Ea(Q,G.mode,ce,Pe),P.return=G,P):(P=p(P,Q),P.return=G,P)}function ue(G,P,Q){if(typeof P=="string"&&P!==""||typeof P=="number"||typeof P=="bigint")return P=od(""+P,G.mode,Q),P.return=G,P;if(typeof P=="object"&&P!==null){switch(P.$$typeof){case v:return Q=Po(P.type,P.key,P.props,null,G.mode,Q),hl(Q,P),Q.return=G,Q;case _:return P=cd(P,G.mode,Q),P.return=G,P;case A:return P=Ca(P),ue(G,P,Q)}if(q(P)||ee(P))return P=Ea(P,G.mode,Q,null),P.return=G,P;if(typeof P.then=="function")return ue(G,Yo(P),Q);if(P.$$typeof===R)return ue(G,$o(G,P),Q);Qo(G,P)}return null}function W(G,P,Q,ce){var Pe=P!==null?P.key:null;if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return Pe!==null?null:z(G,P,""+Q,ce);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case v:return Q.key===Pe?I(G,P,Q,ce):null;case _:return Q.key===Pe?X(G,P,Q,ce):null;case A:return Q=Ca(Q),W(G,P,Q,ce)}if(q(Q)||ee(Q))return Pe!==null?null:se(G,P,Q,ce,null);if(typeof Q.then=="function")return W(G,P,Yo(Q),ce);if(Q.$$typeof===R)return W(G,P,$o(G,Q),ce);Qo(G,Q)}return null}function re(G,P,Q,ce,Pe){if(typeof ce=="string"&&ce!==""||typeof ce=="number"||typeof ce=="bigint")return G=G.get(Q)||null,z(P,G,""+ce,Pe);if(typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case v:return G=G.get(ce.key===null?Q:ce.key)||null,I(P,G,ce,Pe);case _:return G=G.get(ce.key===null?Q:ce.key)||null,X(P,G,ce,Pe);case A:return ce=Ca(ce),re(G,P,Q,ce,Pe)}if(q(ce)||ee(ce))return G=G.get(Q)||null,se(P,G,ce,Pe,null);if(typeof ce.then=="function")return re(G,P,Q,Yo(ce),Pe);if(ce.$$typeof===R)return re(G,P,Q,$o(P,ce),Pe);Qo(P,ce)}return null}function Re(G,P,Q,ce){for(var Pe=null,Nt=null,Le=P,tt=P=0,gt=null;Le!==null&&tt<Q.length;tt++){Le.index>tt?(gt=Le,Le=null):gt=Le.sibling;var zt=W(G,Le,Q[tt],ce);if(zt===null){Le===null&&(Le=gt);break}t&&Le&&zt.alternate===null&&i(G,Le),P=g(zt,P,tt),Nt===null?Pe=zt:Nt.sibling=zt,Nt=zt,Le=gt}if(tt===Q.length)return s(G,Le),bt&&oi(G,tt),Pe;if(Le===null){for(;tt<Q.length;tt++)Le=ue(G,Q[tt],ce),Le!==null&&(P=g(Le,P,tt),Nt===null?Pe=Le:Nt.sibling=Le,Nt=Le);return bt&&oi(G,tt),Pe}for(Le=c(Le);tt<Q.length;tt++)gt=re(Le,G,tt,Q[tt],ce),gt!==null&&(t&&gt.alternate!==null&&Le.delete(gt.key===null?tt:gt.key),P=g(gt,P,tt),Nt===null?Pe=gt:Nt.sibling=gt,Nt=gt);return t&&Le.forEach(function(ta){return i(G,ta)}),bt&&oi(G,tt),Pe}function Ge(G,P,Q,ce){if(Q==null)throw Error(a(151));for(var Pe=null,Nt=null,Le=P,tt=P=0,gt=null,zt=Q.next();Le!==null&&!zt.done;tt++,zt=Q.next()){Le.index>tt?(gt=Le,Le=null):gt=Le.sibling;var ta=W(G,Le,zt.value,ce);if(ta===null){Le===null&&(Le=gt);break}t&&Le&&ta.alternate===null&&i(G,Le),P=g(ta,P,tt),Nt===null?Pe=ta:Nt.sibling=ta,Nt=ta,Le=gt}if(zt.done)return s(G,Le),bt&&oi(G,tt),Pe;if(Le===null){for(;!zt.done;tt++,zt=Q.next())zt=ue(G,zt.value,ce),zt!==null&&(P=g(zt,P,tt),Nt===null?Pe=zt:Nt.sibling=zt,Nt=zt);return bt&&oi(G,tt),Pe}for(Le=c(Le);!zt.done;tt++,zt=Q.next())zt=re(Le,G,tt,zt.value,ce),zt!==null&&(t&&zt.alternate!==null&&Le.delete(zt.key===null?tt:zt.key),P=g(zt,P,tt),Nt===null?Pe=zt:Nt.sibling=zt,Nt=zt);return t&&Le.forEach(function(bw){return i(G,bw)}),bt&&oi(G,tt),Pe}function Ut(G,P,Q,ce){if(typeof Q=="object"&&Q!==null&&Q.type===E&&Q.key===null&&(Q=Q.props.children),typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case v:e:{for(var Pe=Q.key;P!==null;){if(P.key===Pe){if(Pe=Q.type,Pe===E){if(P.tag===7){s(G,P.sibling),ce=p(P,Q.props.children),ce.return=G,G=ce;break e}}else if(P.elementType===Pe||typeof Pe=="object"&&Pe!==null&&Pe.$$typeof===A&&Ca(Pe)===P.type){s(G,P.sibling),ce=p(P,Q.props),hl(ce,Q),ce.return=G,G=ce;break e}s(G,P);break}else i(G,P);P=P.sibling}Q.type===E?(ce=Ea(Q.props.children,G.mode,ce,Q.key),ce.return=G,G=ce):(ce=Po(Q.type,Q.key,Q.props,null,G.mode,ce),hl(ce,Q),ce.return=G,G=ce)}return k(G);case _:e:{for(Pe=Q.key;P!==null;){if(P.key===Pe)if(P.tag===4&&P.stateNode.containerInfo===Q.containerInfo&&P.stateNode.implementation===Q.implementation){s(G,P.sibling),ce=p(P,Q.children||[]),ce.return=G,G=ce;break e}else{s(G,P);break}else i(G,P);P=P.sibling}ce=cd(Q,G.mode,ce),ce.return=G,G=ce}return k(G);case A:return Q=Ca(Q),Ut(G,P,Q,ce)}if(q(Q))return Re(G,P,Q,ce);if(ee(Q)){if(Pe=ee(Q),typeof Pe!="function")throw Error(a(150));return Q=Pe.call(Q),Ge(G,P,Q,ce)}if(typeof Q.then=="function")return Ut(G,P,Yo(Q),ce);if(Q.$$typeof===R)return Ut(G,P,$o(G,Q),ce);Qo(G,Q)}return typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint"?(Q=""+Q,P!==null&&P.tag===6?(s(G,P.sibling),ce=p(P,Q),ce.return=G,G=ce):(s(G,P),ce=od(Q,G.mode,ce),ce.return=G,G=ce),k(G)):s(G,P)}return function(G,P,Q,ce){try{fl=0;var Pe=Ut(G,P,Q,ce);return fs=null,Pe}catch(Le){if(Le===ds||Le===Ko)throw Le;var Nt=lr(29,Le,null,G.mode);return Nt.lanes=ce,Nt.return=G,Nt}finally{}}}var Ra=Yp(!0),Qp=Yp(!1),Bi=!1;function kd(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function _d(t,i){t=t.updateQueue,i.updateQueue===t&&(i.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function Ui(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Fi(t,i,s){var c=t.updateQueue;if(c===null)return null;if(c=c.shared,(Ct&2)!==0){var p=c.pending;return p===null?i.next=i:(i.next=p.next,p.next=i),c.pending=i,i=Fo(t),Op(t,null,s),i}return Uo(t,c,i,s),Fo(t)}function ml(t,i,s){if(i=i.updateQueue,i!==null&&(i=i.shared,(s&4194048)!==0)){var c=i.lanes;c&=t.pendingLanes,s|=c,i.lanes=s,$e(t,s)}}function Ed(t,i){var s=t.updateQueue,c=t.alternate;if(c!==null&&(c=c.updateQueue,s===c)){var p=null,g=null;if(s=s.firstBaseUpdate,s!==null){do{var k={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};g===null?p=g=k:g=g.next=k,s=s.next}while(s!==null);g===null?p=g=i:g=g.next=i}else p=g=i;s={baseState:c.baseState,firstBaseUpdate:p,lastBaseUpdate:g,shared:c.shared,callbacks:c.callbacks},t.updateQueue=s;return}t=s.lastBaseUpdate,t===null?s.firstBaseUpdate=i:t.next=i,s.lastBaseUpdate=i}var wd=!1;function pl(){if(wd){var t=us;if(t!==null)throw t}}function gl(t,i,s,c){wd=!1;var p=t.updateQueue;Bi=!1;var g=p.firstBaseUpdate,k=p.lastBaseUpdate,z=p.shared.pending;if(z!==null){p.shared.pending=null;var I=z,X=I.next;I.next=null,k===null?g=X:k.next=X,k=I;var se=t.alternate;se!==null&&(se=se.updateQueue,z=se.lastBaseUpdate,z!==k&&(z===null?se.firstBaseUpdate=X:z.next=X,se.lastBaseUpdate=I))}if(g!==null){var ue=p.baseState;k=0,se=X=I=null,z=g;do{var W=z.lane&-536870913,re=W!==z.lane;if(re?(pt&W)===W:(c&W)===W){W!==0&&W===cs&&(wd=!0),se!==null&&(se=se.next={lane:0,tag:z.tag,payload:z.payload,callback:null,next:null});e:{var Re=t,Ge=z;W=i;var Ut=s;switch(Ge.tag){case 1:if(Re=Ge.payload,typeof Re=="function"){ue=Re.call(Ut,ue,W);break e}ue=Re;break e;case 3:Re.flags=Re.flags&-65537|128;case 0:if(Re=Ge.payload,W=typeof Re=="function"?Re.call(Ut,ue,W):Re,W==null)break e;ue=x({},ue,W);break e;case 2:Bi=!0}}W=z.callback,W!==null&&(t.flags|=64,re&&(t.flags|=8192),re=p.callbacks,re===null?p.callbacks=[W]:re.push(W))}else re={lane:W,tag:z.tag,payload:z.payload,callback:z.callback,next:null},se===null?(X=se=re,I=ue):se=se.next=re,k|=W;if(z=z.next,z===null){if(z=p.shared.pending,z===null)break;re=z,z=re.next,re.next=null,p.lastBaseUpdate=re,p.shared.pending=null}}while(!0);se===null&&(I=ue),p.baseState=I,p.firstBaseUpdate=X,p.lastBaseUpdate=se,g===null&&(p.shared.lanes=0),Gi|=k,t.lanes=k,t.memoizedState=ue}}function Xp(t,i){if(typeof t!="function")throw Error(a(191,t));t.call(i)}function Zp(t,i){var s=t.callbacks;if(s!==null)for(t.callbacks=null,t=0;t<s.length;t++)Xp(s[t],i)}var hs=O(null),Xo=O(0);function Wp(t,i){t=yi,T(Xo,t),T(hs,i),yi=t|i.baseLanes}function Sd(){T(Xo,yi),T(hs,hs.current)}function Nd(){yi=Xo.current,K(hs),K(Xo)}var or=O(null),Sr=null;function Pi(t){var i=t.alternate;T(on,on.current&1),T(or,t),Sr===null&&(i===null||hs.current!==null||i.memoizedState!==null)&&(Sr=t)}function zd(t){T(on,on.current),T(or,t),Sr===null&&(Sr=t)}function Jp(t){t.tag===22?(T(on,on.current),T(or,t),Sr===null&&(Sr=t)):Hi()}function Hi(){T(on,on.current),T(or,or.current)}function cr(t){K(or),Sr===t&&(Sr=null),K(on)}var on=O(0);function Zo(t){for(var i=t;i!==null;){if(i.tag===13){var s=i.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||Df(s)||jf(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===t)break;for(;i.sibling===null;){if(i.return===null||i.return===t)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var di=0,et=null,It=null,mn=null,Wo=!1,ms=!1,Aa=!1,Jo=0,bl=0,ps=null,lE=0;function nn(){throw Error(a(321))}function Cd(t,i){if(i===null)return!1;for(var s=0;s<i.length&&s<t.length;s++)if(!sr(t[s],i[s]))return!1;return!0}function Td(t,i,s,c,p,g){return di=g,et=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,L.H=t===null||t.memoizedState===null?Lg:$d,Aa=!1,g=s(c,p),Aa=!1,ms&&(g=tg(i,s,c,p)),eg(t),g}function eg(t){L.H=vl;var i=It!==null&&It.next!==null;if(di=0,mn=It=et=null,Wo=!1,bl=0,ps=null,i)throw Error(a(300));t===null||pn||(t=t.dependencies,t!==null&&qo(t)&&(pn=!0))}function tg(t,i,s,c){et=t;var p=0;do{if(ms&&(ps=null),bl=0,ms=!1,25<=p)throw Error(a(301));if(p+=1,mn=It=null,t.updateQueue!=null){var g=t.updateQueue;g.lastEffect=null,g.events=null,g.stores=null,g.memoCache!=null&&(g.memoCache.index=0)}L.H=Ig,g=i(s,c)}while(ms);return g}function oE(){var t=L.H,i=t.useState()[0];return i=typeof i.then=="function"?xl(i):i,t=t.useState()[0],(It!==null?It.memoizedState:null)!==t&&(et.flags|=1024),i}function Rd(){var t=Jo!==0;return Jo=0,t}function Ad(t,i,s){i.updateQueue=t.updateQueue,i.flags&=-2053,t.lanes&=~s}function Od(t){if(Wo){for(t=t.memoizedState;t!==null;){var i=t.queue;i!==null&&(i.pending=null),t=t.next}Wo=!1}di=0,mn=It=et=null,ms=!1,bl=Jo=0,ps=null}function Hn(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return mn===null?et.memoizedState=mn=t:mn=mn.next=t,mn}function cn(){if(It===null){var t=et.alternate;t=t!==null?t.memoizedState:null}else t=It.next;var i=mn===null?et.memoizedState:mn.next;if(i!==null)mn=i,It=t;else{if(t===null)throw et.alternate===null?Error(a(467)):Error(a(310));It=t,t={memoizedState:It.memoizedState,baseState:It.baseState,baseQueue:It.baseQueue,queue:It.queue,next:null},mn===null?et.memoizedState=mn=t:mn=mn.next=t}return mn}function ec(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function xl(t){var i=bl;return bl+=1,ps===null&&(ps=[]),t=Gp(ps,t,i),i=et,(mn===null?i.memoizedState:mn.next)===null&&(i=i.alternate,L.H=i===null||i.memoizedState===null?Lg:$d),t}function tc(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return xl(t);if(t.$$typeof===R)return An(t)}throw Error(a(438,String(t)))}function Md(t){var i=null,s=et.updateQueue;if(s!==null&&(i=s.memoCache),i==null){var c=et.alternate;c!==null&&(c=c.updateQueue,c!==null&&(c=c.memoCache,c!=null&&(i={data:c.data.map(function(p){return p.slice()}),index:0})))}if(i==null&&(i={data:[],index:0}),s===null&&(s=ec(),et.updateQueue=s),s.memoCache=i,s=i.data[i.index],s===void 0)for(s=i.data[i.index]=Array(t),c=0;c<t;c++)s[c]=H;return i.index++,s}function fi(t,i){return typeof i=="function"?i(t):i}function nc(t){var i=cn();return Dd(i,It,t)}function Dd(t,i,s){var c=t.queue;if(c===null)throw Error(a(311));c.lastRenderedReducer=s;var p=t.baseQueue,g=c.pending;if(g!==null){if(p!==null){var k=p.next;p.next=g.next,g.next=k}i.baseQueue=p=g,c.pending=null}if(g=t.baseState,p===null)t.memoizedState=g;else{i=p.next;var z=k=null,I=null,X=i,se=!1;do{var ue=X.lane&-536870913;if(ue!==X.lane?(pt&ue)===ue:(di&ue)===ue){var W=X.revertLane;if(W===0)I!==null&&(I=I.next={lane:0,revertLane:0,gesture:null,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null}),ue===cs&&(se=!0);else if((di&W)===W){X=X.next,W===cs&&(se=!0);continue}else ue={lane:0,revertLane:X.revertLane,gesture:null,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null},I===null?(z=I=ue,k=g):I=I.next=ue,et.lanes|=W,Gi|=W;ue=X.action,Aa&&s(g,ue),g=X.hasEagerState?X.eagerState:s(g,ue)}else W={lane:ue,revertLane:X.revertLane,gesture:X.gesture,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null},I===null?(z=I=W,k=g):I=I.next=W,et.lanes|=ue,Gi|=ue;X=X.next}while(X!==null&&X!==i);if(I===null?k=g:I.next=z,!sr(g,t.memoizedState)&&(pn=!0,se&&(s=us,s!==null)))throw s;t.memoizedState=g,t.baseState=k,t.baseQueue=I,c.lastRenderedState=g}return p===null&&(c.lanes=0),[t.memoizedState,c.dispatch]}function jd(t){var i=cn(),s=i.queue;if(s===null)throw Error(a(311));s.lastRenderedReducer=t;var c=s.dispatch,p=s.pending,g=i.memoizedState;if(p!==null){s.pending=null;var k=p=p.next;do g=t(g,k.action),k=k.next;while(k!==p);sr(g,i.memoizedState)||(pn=!0),i.memoizedState=g,i.baseQueue===null&&(i.baseState=g),s.lastRenderedState=g}return[g,c]}function ng(t,i,s){var c=et,p=cn(),g=bt;if(g){if(s===void 0)throw Error(a(407));s=s()}else s=i();var k=!sr((It||p).memoizedState,s);if(k&&(p.memoizedState=s,pn=!0),p=p.queue,Bd(ag.bind(null,c,p,t),[t]),p.getSnapshot!==i||k||mn!==null&&mn.memoizedState.tag&1){if(c.flags|=2048,gs(9,{destroy:void 0},ig.bind(null,c,p,s,i),null),Pt===null)throw Error(a(349));g||(di&127)!==0||rg(c,i,s)}return s}function rg(t,i,s){t.flags|=16384,t={getSnapshot:i,value:s},i=et.updateQueue,i===null?(i=ec(),et.updateQueue=i,i.stores=[t]):(s=i.stores,s===null?i.stores=[t]:s.push(t))}function ig(t,i,s,c){i.value=s,i.getSnapshot=c,sg(i)&&lg(t)}function ag(t,i,s){return s(function(){sg(i)&&lg(t)})}function sg(t){var i=t.getSnapshot;t=t.value;try{var s=i();return!sr(t,s)}catch{return!0}}function lg(t){var i=_a(t,2);i!==null&&er(i,t,2)}function Ld(t){var i=Hn();if(typeof t=="function"){var s=t;if(t=s(),Aa){qt(!0);try{s()}finally{qt(!1)}}}return i.memoizedState=i.baseState=t,i.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:fi,lastRenderedState:t},i}function og(t,i,s,c){return t.baseState=s,Dd(t,It,typeof c=="function"?c:fi)}function cE(t,i,s,c,p){if(ac(t))throw Error(a(485));if(t=i.action,t!==null){var g={payload:p,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(k){g.listeners.push(k)}};L.T!==null?s(!0):g.isTransition=!1,c(g),s=i.pending,s===null?(g.next=i.pending=g,cg(i,g)):(g.next=s.next,i.pending=s.next=g)}}function cg(t,i){var s=i.action,c=i.payload,p=t.state;if(i.isTransition){var g=L.T,k={};L.T=k;try{var z=s(p,c),I=L.S;I!==null&&I(k,z),ug(t,i,z)}catch(X){Id(t,i,X)}finally{g!==null&&k.types!==null&&(g.types=k.types),L.T=g}}else try{g=s(p,c),ug(t,i,g)}catch(X){Id(t,i,X)}}function ug(t,i,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(c){dg(t,i,c)},function(c){return Id(t,i,c)}):dg(t,i,s)}function dg(t,i,s){i.status="fulfilled",i.value=s,fg(i),t.state=s,i=t.pending,i!==null&&(s=i.next,s===i?t.pending=null:(s=s.next,i.next=s,cg(t,s)))}function Id(t,i,s){var c=t.pending;if(t.pending=null,c!==null){c=c.next;do i.status="rejected",i.reason=s,fg(i),i=i.next;while(i!==c)}t.action=null}function fg(t){t=t.listeners;for(var i=0;i<t.length;i++)(0,t[i])()}function hg(t,i){return i}function mg(t,i){if(bt){var s=Pt.formState;if(s!==null){e:{var c=et;if(bt){if(Qt){t:{for(var p=Qt,g=wr;p.nodeType!==8;){if(!g){p=null;break t}if(p=Nr(p.nextSibling),p===null){p=null;break t}}g=p.data,p=g==="F!"||g==="F"?p:null}if(p){Qt=Nr(p.nextSibling),c=p.data==="F!";break e}}Li(c)}c=!1}c&&(i=s[0])}}return s=Hn(),s.memoizedState=s.baseState=i,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:hg,lastRenderedState:i},s.queue=c,s=Mg.bind(null,et,c),c.dispatch=s,c=Ld(!1),g=qd.bind(null,et,!1,c.queue),c=Hn(),p={state:i,dispatch:null,action:t,pending:null},c.queue=p,s=cE.bind(null,et,p,g,s),p.dispatch=s,c.memoizedState=t,[i,s,!1]}function pg(t){var i=cn();return gg(i,It,t)}function gg(t,i,s){if(i=Dd(t,i,hg)[0],t=nc(fi)[0],typeof i=="object"&&i!==null&&typeof i.then=="function")try{var c=xl(i)}catch(k){throw k===ds?Ko:k}else c=i;i=cn();var p=i.queue,g=p.dispatch;return s!==i.memoizedState&&(et.flags|=2048,gs(9,{destroy:void 0},uE.bind(null,p,s),null)),[c,g,t]}function uE(t,i){t.action=i}function bg(t){var i=cn(),s=It;if(s!==null)return gg(i,s,t);cn(),i=i.memoizedState,s=cn();var c=s.queue.dispatch;return s.memoizedState=t,[i,c,!1]}function gs(t,i,s,c){return t={tag:t,create:s,deps:c,inst:i,next:null},i=et.updateQueue,i===null&&(i=ec(),et.updateQueue=i),s=i.lastEffect,s===null?i.lastEffect=t.next=t:(c=s.next,s.next=t,t.next=c,i.lastEffect=t),t}function xg(){return cn().memoizedState}function rc(t,i,s,c){var p=Hn();et.flags|=t,p.memoizedState=gs(1|i,{destroy:void 0},s,c===void 0?null:c)}function ic(t,i,s,c){var p=cn();c=c===void 0?null:c;var g=p.memoizedState.inst;It!==null&&c!==null&&Cd(c,It.memoizedState.deps)?p.memoizedState=gs(i,g,s,c):(et.flags|=t,p.memoizedState=gs(1|i,g,s,c))}function yg(t,i){rc(8390656,8,t,i)}function Bd(t,i){ic(2048,8,t,i)}function dE(t){et.flags|=4;var i=et.updateQueue;if(i===null)i=ec(),et.updateQueue=i,i.events=[t];else{var s=i.events;s===null?i.events=[t]:s.push(t)}}function vg(t){var i=cn().memoizedState;return dE({ref:i,nextImpl:t}),function(){if((Ct&2)!==0)throw Error(a(440));return i.impl.apply(void 0,arguments)}}function kg(t,i){return ic(4,2,t,i)}function _g(t,i){return ic(4,4,t,i)}function Eg(t,i){if(typeof i=="function"){t=t();var s=i(t);return function(){typeof s=="function"?s():i(null)}}if(i!=null)return t=t(),i.current=t,function(){i.current=null}}function wg(t,i,s){s=s!=null?s.concat([t]):null,ic(4,4,Eg.bind(null,i,t),s)}function Ud(){}function Sg(t,i){var s=cn();i=i===void 0?null:i;var c=s.memoizedState;return i!==null&&Cd(i,c[1])?c[0]:(s.memoizedState=[t,i],t)}function Ng(t,i){var s=cn();i=i===void 0?null:i;var c=s.memoizedState;if(i!==null&&Cd(i,c[1]))return c[0];if(c=t(),Aa){qt(!0);try{t()}finally{qt(!1)}}return s.memoizedState=[c,i],c}function Fd(t,i,s){return s===void 0||(di&1073741824)!==0&&(pt&261930)===0?t.memoizedState=i:(t.memoizedState=s,t=z0(),et.lanes|=t,Gi|=t,s)}function zg(t,i,s,c){return sr(s,i)?s:hs.current!==null?(t=Fd(t,s,c),sr(t,i)||(pn=!0),t):(di&42)===0||(di&1073741824)!==0&&(pt&261930)===0?(pn=!0,t.memoizedState=s):(t=z0(),et.lanes|=t,Gi|=t,i)}function Cg(t,i,s,c,p){var g=Y.p;Y.p=g!==0&&8>g?g:8;var k=L.T,z={};L.T=z,qd(t,!1,i,s);try{var I=p(),X=L.S;if(X!==null&&X(z,I),I!==null&&typeof I=="object"&&typeof I.then=="function"){var se=sE(I,c);yl(t,i,se,fr(t))}else yl(t,i,c,fr(t))}catch(ue){yl(t,i,{then:function(){},status:"rejected",reason:ue},fr())}finally{Y.p=g,k!==null&&z.types!==null&&(k.types=z.types),L.T=k}}function fE(){}function Pd(t,i,s,c){if(t.tag!==5)throw Error(a(476));var p=Tg(t).queue;Cg(t,p,i,V,s===null?fE:function(){return Rg(t),s(c)})}function Tg(t){var i=t.memoizedState;if(i!==null)return i;i={memoizedState:V,baseState:V,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fi,lastRenderedState:V},next:null};var s={};return i.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fi,lastRenderedState:s},next:null},t.memoizedState=i,t=t.alternate,t!==null&&(t.memoizedState=i),i}function Rg(t){var i=Tg(t);i.next===null&&(i=t.alternate.memoizedState),yl(t,i.next.queue,{},fr())}function Hd(){return An(Ll)}function Ag(){return cn().memoizedState}function Og(){return cn().memoizedState}function hE(t){for(var i=t.return;i!==null;){switch(i.tag){case 24:case 3:var s=fr();t=Ui(s);var c=Fi(i,t,s);c!==null&&(er(c,i,s),ml(c,i,s)),i={cache:bd()},t.payload=i;return}i=i.return}}function mE(t,i,s){var c=fr();s={lane:c,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},ac(t)?Dg(i,s):(s=sd(t,i,s,c),s!==null&&(er(s,t,c),jg(s,i,c)))}function Mg(t,i,s){var c=fr();yl(t,i,s,c)}function yl(t,i,s,c){var p={lane:c,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(ac(t))Dg(i,p);else{var g=t.alternate;if(t.lanes===0&&(g===null||g.lanes===0)&&(g=i.lastRenderedReducer,g!==null))try{var k=i.lastRenderedState,z=g(k,s);if(p.hasEagerState=!0,p.eagerState=z,sr(z,k))return Uo(t,i,p,0),Pt===null&&Bo(),!1}catch{}finally{}if(s=sd(t,i,p,c),s!==null)return er(s,t,c),jg(s,i,c),!0}return!1}function qd(t,i,s,c){if(c={lane:2,revertLane:_f(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},ac(t)){if(i)throw Error(a(479))}else i=sd(t,s,c,2),i!==null&&er(i,t,2)}function ac(t){var i=t.alternate;return t===et||i!==null&&i===et}function Dg(t,i){ms=Wo=!0;var s=t.pending;s===null?i.next=i:(i.next=s.next,s.next=i),t.pending=i}function jg(t,i,s){if((s&4194048)!==0){var c=i.lanes;c&=t.pendingLanes,s|=c,i.lanes=s,$e(t,s)}}var vl={readContext:An,use:tc,useCallback:nn,useContext:nn,useEffect:nn,useImperativeHandle:nn,useLayoutEffect:nn,useInsertionEffect:nn,useMemo:nn,useReducer:nn,useRef:nn,useState:nn,useDebugValue:nn,useDeferredValue:nn,useTransition:nn,useSyncExternalStore:nn,useId:nn,useHostTransitionStatus:nn,useFormState:nn,useActionState:nn,useOptimistic:nn,useMemoCache:nn,useCacheRefresh:nn};vl.useEffectEvent=nn;var Lg={readContext:An,use:tc,useCallback:function(t,i){return Hn().memoizedState=[t,i===void 0?null:i],t},useContext:An,useEffect:yg,useImperativeHandle:function(t,i,s){s=s!=null?s.concat([t]):null,rc(4194308,4,Eg.bind(null,i,t),s)},useLayoutEffect:function(t,i){return rc(4194308,4,t,i)},useInsertionEffect:function(t,i){rc(4,2,t,i)},useMemo:function(t,i){var s=Hn();i=i===void 0?null:i;var c=t();if(Aa){qt(!0);try{t()}finally{qt(!1)}}return s.memoizedState=[c,i],c},useReducer:function(t,i,s){var c=Hn();if(s!==void 0){var p=s(i);if(Aa){qt(!0);try{s(i)}finally{qt(!1)}}}else p=i;return c.memoizedState=c.baseState=p,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:p},c.queue=t,t=t.dispatch=mE.bind(null,et,t),[c.memoizedState,t]},useRef:function(t){var i=Hn();return t={current:t},i.memoizedState=t},useState:function(t){t=Ld(t);var i=t.queue,s=Mg.bind(null,et,i);return i.dispatch=s,[t.memoizedState,s]},useDebugValue:Ud,useDeferredValue:function(t,i){var s=Hn();return Fd(s,t,i)},useTransition:function(){var t=Ld(!1);return t=Cg.bind(null,et,t.queue,!0,!1),Hn().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,i,s){var c=et,p=Hn();if(bt){if(s===void 0)throw Error(a(407));s=s()}else{if(s=i(),Pt===null)throw Error(a(349));(pt&127)!==0||rg(c,i,s)}p.memoizedState=s;var g={value:s,getSnapshot:i};return p.queue=g,yg(ag.bind(null,c,g,t),[t]),c.flags|=2048,gs(9,{destroy:void 0},ig.bind(null,c,g,s,i),null),s},useId:function(){var t=Hn(),i=Pt.identifierPrefix;if(bt){var s=Vr,c=Kr;s=(c&~(1<<32-wt(c)-1)).toString(32)+s,i="_"+i+"R_"+s,s=Jo++,0<s&&(i+="H"+s.toString(32)),i+="_"}else s=lE++,i="_"+i+"r_"+s.toString(32)+"_";return t.memoizedState=i},useHostTransitionStatus:Hd,useFormState:mg,useActionState:mg,useOptimistic:function(t){var i=Hn();i.memoizedState=i.baseState=t;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=s,i=qd.bind(null,et,!0,s),s.dispatch=i,[t,i]},useMemoCache:Md,useCacheRefresh:function(){return Hn().memoizedState=hE.bind(null,et)},useEffectEvent:function(t){var i=Hn(),s={impl:t};return i.memoizedState=s,function(){if((Ct&2)!==0)throw Error(a(440));return s.impl.apply(void 0,arguments)}}},$d={readContext:An,use:tc,useCallback:Sg,useContext:An,useEffect:Bd,useImperativeHandle:wg,useInsertionEffect:kg,useLayoutEffect:_g,useMemo:Ng,useReducer:nc,useRef:xg,useState:function(){return nc(fi)},useDebugValue:Ud,useDeferredValue:function(t,i){var s=cn();return zg(s,It.memoizedState,t,i)},useTransition:function(){var t=nc(fi)[0],i=cn().memoizedState;return[typeof t=="boolean"?t:xl(t),i]},useSyncExternalStore:ng,useId:Ag,useHostTransitionStatus:Hd,useFormState:pg,useActionState:pg,useOptimistic:function(t,i){var s=cn();return og(s,It,t,i)},useMemoCache:Md,useCacheRefresh:Og};$d.useEffectEvent=vg;var Ig={readContext:An,use:tc,useCallback:Sg,useContext:An,useEffect:Bd,useImperativeHandle:wg,useInsertionEffect:kg,useLayoutEffect:_g,useMemo:Ng,useReducer:jd,useRef:xg,useState:function(){return jd(fi)},useDebugValue:Ud,useDeferredValue:function(t,i){var s=cn();return It===null?Fd(s,t,i):zg(s,It.memoizedState,t,i)},useTransition:function(){var t=jd(fi)[0],i=cn().memoizedState;return[typeof t=="boolean"?t:xl(t),i]},useSyncExternalStore:ng,useId:Ag,useHostTransitionStatus:Hd,useFormState:bg,useActionState:bg,useOptimistic:function(t,i){var s=cn();return It!==null?og(s,It,t,i):(s.baseState=t,[t,s.queue.dispatch])},useMemoCache:Md,useCacheRefresh:Og};Ig.useEffectEvent=vg;function Gd(t,i,s,c){i=t.memoizedState,s=s(c,i),s=s==null?i:x({},i,s),t.memoizedState=s,t.lanes===0&&(t.updateQueue.baseState=s)}var Kd={enqueueSetState:function(t,i,s){t=t._reactInternals;var c=fr(),p=Ui(c);p.payload=i,s!=null&&(p.callback=s),i=Fi(t,p,c),i!==null&&(er(i,t,c),ml(i,t,c))},enqueueReplaceState:function(t,i,s){t=t._reactInternals;var c=fr(),p=Ui(c);p.tag=1,p.payload=i,s!=null&&(p.callback=s),i=Fi(t,p,c),i!==null&&(er(i,t,c),ml(i,t,c))},enqueueForceUpdate:function(t,i){t=t._reactInternals;var s=fr(),c=Ui(s);c.tag=2,i!=null&&(c.callback=i),i=Fi(t,c,s),i!==null&&(er(i,t,s),ml(i,t,s))}};function Bg(t,i,s,c,p,g,k){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(c,g,k):i.prototype&&i.prototype.isPureReactComponent?!sl(s,c)||!sl(p,g):!0}function Ug(t,i,s,c){t=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(s,c),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(s,c),i.state!==t&&Kd.enqueueReplaceState(i,i.state,null)}function Oa(t,i){var s=i;if("ref"in i){s={};for(var c in i)c!=="ref"&&(s[c]=i[c])}if(t=t.defaultProps){s===i&&(s=x({},s));for(var p in t)s[p]===void 0&&(s[p]=t[p])}return s}function Fg(t){Io(t)}function Pg(t){console.error(t)}function Hg(t){Io(t)}function sc(t,i){try{var s=t.onUncaughtError;s(i.value,{componentStack:i.stack})}catch(c){setTimeout(function(){throw c})}}function qg(t,i,s){try{var c=t.onCaughtError;c(s.value,{componentStack:s.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function Vd(t,i,s){return s=Ui(s),s.tag=3,s.payload={element:null},s.callback=function(){sc(t,i)},s}function $g(t){return t=Ui(t),t.tag=3,t}function Gg(t,i,s,c){var p=s.type.getDerivedStateFromError;if(typeof p=="function"){var g=c.value;t.payload=function(){return p(g)},t.callback=function(){qg(i,s,c)}}var k=s.stateNode;k!==null&&typeof k.componentDidCatch=="function"&&(t.callback=function(){qg(i,s,c),typeof p!="function"&&(Ki===null?Ki=new Set([this]):Ki.add(this));var z=c.stack;this.componentDidCatch(c.value,{componentStack:z!==null?z:""})})}function pE(t,i,s,c,p){if(s.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(i=s.alternate,i!==null&&os(i,s,p,!0),s=or.current,s!==null){switch(s.tag){case 31:case 13:return Sr===null?xc():s.alternate===null&&rn===0&&(rn=3),s.flags&=-257,s.flags|=65536,s.lanes=p,c===Vo?s.flags|=16384:(i=s.updateQueue,i===null?s.updateQueue=new Set([c]):i.add(c),yf(t,c,p)),!1;case 22:return s.flags|=65536,c===Vo?s.flags|=16384:(i=s.updateQueue,i===null?(i={transitions:null,markerInstances:null,retryQueue:new Set([c])},s.updateQueue=i):(s=i.retryQueue,s===null?i.retryQueue=new Set([c]):s.add(c)),yf(t,c,p)),!1}throw Error(a(435,s.tag))}return yf(t,c,p),xc(),!1}if(bt)return i=or.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=p,c!==fd&&(t=Error(a(422),{cause:c}),cl(kr(t,s)))):(c!==fd&&(i=Error(a(423),{cause:c}),cl(kr(i,s))),t=t.current.alternate,t.flags|=65536,p&=-p,t.lanes|=p,c=kr(c,s),p=Vd(t.stateNode,c,p),Ed(t,p),rn!==4&&(rn=2)),!1;var g=Error(a(520),{cause:c});if(g=kr(g,s),Cl===null?Cl=[g]:Cl.push(g),rn!==4&&(rn=2),i===null)return!0;c=kr(c,s),s=i;do{switch(s.tag){case 3:return s.flags|=65536,t=p&-p,s.lanes|=t,t=Vd(s.stateNode,c,t),Ed(s,t),!1;case 1:if(i=s.type,g=s.stateNode,(s.flags&128)===0&&(typeof i.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(Ki===null||!Ki.has(g))))return s.flags|=65536,p&=-p,s.lanes|=p,p=$g(p),Gg(p,t,s,c),Ed(s,p),!1}s=s.return}while(s!==null);return!1}var Yd=Error(a(461)),pn=!1;function On(t,i,s,c){i.child=t===null?Qp(i,null,s,c):Ra(i,t.child,s,c)}function Kg(t,i,s,c,p){s=s.render;var g=i.ref;if("ref"in c){var k={};for(var z in c)z!=="ref"&&(k[z]=c[z])}else k=c;return Na(i),c=Td(t,i,s,k,g,p),z=Rd(),t!==null&&!pn?(Ad(t,i,p),hi(t,i,p)):(bt&&z&&ud(i),i.flags|=1,On(t,i,c,p),i.child)}function Vg(t,i,s,c,p){if(t===null){var g=s.type;return typeof g=="function"&&!ld(g)&&g.defaultProps===void 0&&s.compare===null?(i.tag=15,i.type=g,Yg(t,i,g,c,p)):(t=Po(s.type,null,c,i,i.mode,p),t.ref=i.ref,t.return=i,i.child=t)}if(g=t.child,!nf(t,p)){var k=g.memoizedProps;if(s=s.compare,s=s!==null?s:sl,s(k,c)&&t.ref===i.ref)return hi(t,i,p)}return i.flags|=1,t=li(g,c),t.ref=i.ref,t.return=i,i.child=t}function Yg(t,i,s,c,p){if(t!==null){var g=t.memoizedProps;if(sl(g,c)&&t.ref===i.ref)if(pn=!1,i.pendingProps=c=g,nf(t,p))(t.flags&131072)!==0&&(pn=!0);else return i.lanes=t.lanes,hi(t,i,p)}return Qd(t,i,s,c,p)}function Qg(t,i,s,c){var p=c.children,g=t!==null?t.memoizedState:null;if(t===null&&i.stateNode===null&&(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),c.mode==="hidden"){if((i.flags&128)!==0){if(g=g!==null?g.baseLanes|s:s,t!==null){for(c=i.child=t.child,p=0;c!==null;)p=p|c.lanes|c.childLanes,c=c.sibling;c=p&~g}else c=0,i.child=null;return Xg(t,i,g,s,c)}if((s&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},t!==null&&Go(i,g!==null?g.cachePool:null),g!==null?Wp(i,g):Sd(),Jp(i);else return c=i.lanes=536870912,Xg(t,i,g!==null?g.baseLanes|s:s,s,c)}else g!==null?(Go(i,g.cachePool),Wp(i,g),Hi(),i.memoizedState=null):(t!==null&&Go(i,null),Sd(),Hi());return On(t,i,p,s),i.child}function kl(t,i){return t!==null&&t.tag===22||i.stateNode!==null||(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.sibling}function Xg(t,i,s,c,p){var g=yd();return g=g===null?null:{parent:hn._currentValue,pool:g},i.memoizedState={baseLanes:s,cachePool:g},t!==null&&Go(i,null),Sd(),Jp(i),t!==null&&os(t,i,c,!0),i.childLanes=p,null}function lc(t,i){return i=cc({mode:i.mode,children:i.children},t.mode),i.ref=t.ref,t.child=i,i.return=t,i}function Zg(t,i,s){return Ra(i,t.child,null,s),t=lc(i,i.pendingProps),t.flags|=2,cr(i),i.memoizedState=null,t}function gE(t,i,s){var c=i.pendingProps,p=(i.flags&128)!==0;if(i.flags&=-129,t===null){if(bt){if(c.mode==="hidden")return t=lc(i,c),i.lanes=536870912,kl(null,t);if(zd(i),(t=Qt)?(t=cb(t,wr),t=t!==null&&t.data==="&"?t:null,t!==null&&(i.memoizedState={dehydrated:t,treeContext:Di!==null?{id:Kr,overflow:Vr}:null,retryLane:536870912,hydrationErrors:null},s=Dp(t),s.return=i,i.child=s,Rn=i,Qt=null)):t=null,t===null)throw Li(i);return i.lanes=536870912,null}return lc(i,c)}var g=t.memoizedState;if(g!==null){var k=g.dehydrated;if(zd(i),p)if(i.flags&256)i.flags&=-257,i=Zg(t,i,s);else if(i.memoizedState!==null)i.child=t.child,i.flags|=128,i=null;else throw Error(a(558));else if(pn||os(t,i,s,!1),p=(s&t.childLanes)!==0,pn||p){if(c=Pt,c!==null&&(k=D(c,s),k!==0&&k!==g.retryLane))throw g.retryLane=k,_a(t,k),er(c,t,k),Yd;xc(),i=Zg(t,i,s)}else t=g.treeContext,Qt=Nr(k.nextSibling),Rn=i,bt=!0,ji=null,wr=!1,t!==null&&Ip(i,t),i=lc(i,c),i.flags|=4096;return i}return t=li(t.child,{mode:c.mode,children:c.children}),t.ref=i.ref,i.child=t,t.return=i,t}function oc(t,i){var s=i.ref;if(s===null)t!==null&&t.ref!==null&&(i.flags|=4194816);else{if(typeof s!="function"&&typeof s!="object")throw Error(a(284));(t===null||t.ref!==s)&&(i.flags|=4194816)}}function Qd(t,i,s,c,p){return Na(i),s=Td(t,i,s,c,void 0,p),c=Rd(),t!==null&&!pn?(Ad(t,i,p),hi(t,i,p)):(bt&&c&&ud(i),i.flags|=1,On(t,i,s,p),i.child)}function Wg(t,i,s,c,p,g){return Na(i),i.updateQueue=null,s=tg(i,c,s,p),eg(t),c=Rd(),t!==null&&!pn?(Ad(t,i,g),hi(t,i,g)):(bt&&c&&ud(i),i.flags|=1,On(t,i,s,g),i.child)}function Jg(t,i,s,c,p){if(Na(i),i.stateNode===null){var g=is,k=s.contextType;typeof k=="object"&&k!==null&&(g=An(k)),g=new s(c,g),i.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,g.updater=Kd,i.stateNode=g,g._reactInternals=i,g=i.stateNode,g.props=c,g.state=i.memoizedState,g.refs={},kd(i),k=s.contextType,g.context=typeof k=="object"&&k!==null?An(k):is,g.state=i.memoizedState,k=s.getDerivedStateFromProps,typeof k=="function"&&(Gd(i,s,k,c),g.state=i.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(k=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),k!==g.state&&Kd.enqueueReplaceState(g,g.state,null),gl(i,c,g,p),pl(),g.state=i.memoizedState),typeof g.componentDidMount=="function"&&(i.flags|=4194308),c=!0}else if(t===null){g=i.stateNode;var z=i.memoizedProps,I=Oa(s,z);g.props=I;var X=g.context,se=s.contextType;k=is,typeof se=="object"&&se!==null&&(k=An(se));var ue=s.getDerivedStateFromProps;se=typeof ue=="function"||typeof g.getSnapshotBeforeUpdate=="function",z=i.pendingProps!==z,se||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(z||X!==k)&&Ug(i,g,c,k),Bi=!1;var W=i.memoizedState;g.state=W,gl(i,c,g,p),pl(),X=i.memoizedState,z||W!==X||Bi?(typeof ue=="function"&&(Gd(i,s,ue,c),X=i.memoizedState),(I=Bi||Bg(i,s,I,c,W,X,k))?(se||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount()),typeof g.componentDidMount=="function"&&(i.flags|=4194308)):(typeof g.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=c,i.memoizedState=X),g.props=c,g.state=X,g.context=k,c=I):(typeof g.componentDidMount=="function"&&(i.flags|=4194308),c=!1)}else{g=i.stateNode,_d(t,i),k=i.memoizedProps,se=Oa(s,k),g.props=se,ue=i.pendingProps,W=g.context,X=s.contextType,I=is,typeof X=="object"&&X!==null&&(I=An(X)),z=s.getDerivedStateFromProps,(X=typeof z=="function"||typeof g.getSnapshotBeforeUpdate=="function")||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(k!==ue||W!==I)&&Ug(i,g,c,I),Bi=!1,W=i.memoizedState,g.state=W,gl(i,c,g,p),pl();var re=i.memoizedState;k!==ue||W!==re||Bi||t!==null&&t.dependencies!==null&&qo(t.dependencies)?(typeof z=="function"&&(Gd(i,s,z,c),re=i.memoizedState),(se=Bi||Bg(i,s,se,c,W,re,I)||t!==null&&t.dependencies!==null&&qo(t.dependencies))?(X||typeof g.UNSAFE_componentWillUpdate!="function"&&typeof g.componentWillUpdate!="function"||(typeof g.componentWillUpdate=="function"&&g.componentWillUpdate(c,re,I),typeof g.UNSAFE_componentWillUpdate=="function"&&g.UNSAFE_componentWillUpdate(c,re,I)),typeof g.componentDidUpdate=="function"&&(i.flags|=4),typeof g.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof g.componentDidUpdate!="function"||k===t.memoizedProps&&W===t.memoizedState||(i.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||k===t.memoizedProps&&W===t.memoizedState||(i.flags|=1024),i.memoizedProps=c,i.memoizedState=re),g.props=c,g.state=re,g.context=I,c=se):(typeof g.componentDidUpdate!="function"||k===t.memoizedProps&&W===t.memoizedState||(i.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||k===t.memoizedProps&&W===t.memoizedState||(i.flags|=1024),c=!1)}return g=c,oc(t,i),c=(i.flags&128)!==0,g||c?(g=i.stateNode,s=c&&typeof s.getDerivedStateFromError!="function"?null:g.render(),i.flags|=1,t!==null&&c?(i.child=Ra(i,t.child,null,p),i.child=Ra(i,null,s,p)):On(t,i,s,p),i.memoizedState=g.state,t=i.child):t=hi(t,i,p),t}function e0(t,i,s,c){return wa(),i.flags|=256,On(t,i,s,c),i.child}var Xd={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Zd(t){return{baseLanes:t,cachePool:qp()}}function Wd(t,i,s){return t=t!==null?t.childLanes&~s:0,i&&(t|=dr),t}function t0(t,i,s){var c=i.pendingProps,p=!1,g=(i.flags&128)!==0,k;if((k=g)||(k=t!==null&&t.memoizedState===null?!1:(on.current&2)!==0),k&&(p=!0,i.flags&=-129),k=(i.flags&32)!==0,i.flags&=-33,t===null){if(bt){if(p?Pi(i):Hi(),(t=Qt)?(t=cb(t,wr),t=t!==null&&t.data!=="&"?t:null,t!==null&&(i.memoizedState={dehydrated:t,treeContext:Di!==null?{id:Kr,overflow:Vr}:null,retryLane:536870912,hydrationErrors:null},s=Dp(t),s.return=i,i.child=s,Rn=i,Qt=null)):t=null,t===null)throw Li(i);return jf(t)?i.lanes=32:i.lanes=536870912,null}var z=c.children;return c=c.fallback,p?(Hi(),p=i.mode,z=cc({mode:"hidden",children:z},p),c=Ea(c,p,s,null),z.return=i,c.return=i,z.sibling=c,i.child=z,c=i.child,c.memoizedState=Zd(s),c.childLanes=Wd(t,k,s),i.memoizedState=Xd,kl(null,c)):(Pi(i),Jd(i,z))}var I=t.memoizedState;if(I!==null&&(z=I.dehydrated,z!==null)){if(g)i.flags&256?(Pi(i),i.flags&=-257,i=ef(t,i,s)):i.memoizedState!==null?(Hi(),i.child=t.child,i.flags|=128,i=null):(Hi(),z=c.fallback,p=i.mode,c=cc({mode:"visible",children:c.children},p),z=Ea(z,p,s,null),z.flags|=2,c.return=i,z.return=i,c.sibling=z,i.child=c,Ra(i,t.child,null,s),c=i.child,c.memoizedState=Zd(s),c.childLanes=Wd(t,k,s),i.memoizedState=Xd,i=kl(null,c));else if(Pi(i),jf(z)){if(k=z.nextSibling&&z.nextSibling.dataset,k)var X=k.dgst;k=X,c=Error(a(419)),c.stack="",c.digest=k,cl({value:c,source:null,stack:null}),i=ef(t,i,s)}else if(pn||os(t,i,s,!1),k=(s&t.childLanes)!==0,pn||k){if(k=Pt,k!==null&&(c=D(k,s),c!==0&&c!==I.retryLane))throw I.retryLane=c,_a(t,c),er(k,t,c),Yd;Df(z)||xc(),i=ef(t,i,s)}else Df(z)?(i.flags|=192,i.child=t.child,i=null):(t=I.treeContext,Qt=Nr(z.nextSibling),Rn=i,bt=!0,ji=null,wr=!1,t!==null&&Ip(i,t),i=Jd(i,c.children),i.flags|=4096);return i}return p?(Hi(),z=c.fallback,p=i.mode,I=t.child,X=I.sibling,c=li(I,{mode:"hidden",children:c.children}),c.subtreeFlags=I.subtreeFlags&65011712,X!==null?z=li(X,z):(z=Ea(z,p,s,null),z.flags|=2),z.return=i,c.return=i,c.sibling=z,i.child=c,kl(null,c),c=i.child,z=t.child.memoizedState,z===null?z=Zd(s):(p=z.cachePool,p!==null?(I=hn._currentValue,p=p.parent!==I?{parent:I,pool:I}:p):p=qp(),z={baseLanes:z.baseLanes|s,cachePool:p}),c.memoizedState=z,c.childLanes=Wd(t,k,s),i.memoizedState=Xd,kl(t.child,c)):(Pi(i),s=t.child,t=s.sibling,s=li(s,{mode:"visible",children:c.children}),s.return=i,s.sibling=null,t!==null&&(k=i.deletions,k===null?(i.deletions=[t],i.flags|=16):k.push(t)),i.child=s,i.memoizedState=null,s)}function Jd(t,i){return i=cc({mode:"visible",children:i},t.mode),i.return=t,t.child=i}function cc(t,i){return t=lr(22,t,null,i),t.lanes=0,t}function ef(t,i,s){return Ra(i,t.child,null,s),t=Jd(i,i.pendingProps.children),t.flags|=2,i.memoizedState=null,t}function n0(t,i,s){t.lanes|=i;var c=t.alternate;c!==null&&(c.lanes|=i),pd(t.return,i,s)}function tf(t,i,s,c,p,g){var k=t.memoizedState;k===null?t.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:c,tail:s,tailMode:p,treeForkCount:g}:(k.isBackwards=i,k.rendering=null,k.renderingStartTime=0,k.last=c,k.tail=s,k.tailMode=p,k.treeForkCount=g)}function r0(t,i,s){var c=i.pendingProps,p=c.revealOrder,g=c.tail;c=c.children;var k=on.current,z=(k&2)!==0;if(z?(k=k&1|2,i.flags|=128):k&=1,T(on,k),On(t,i,c,s),c=bt?ol:0,!z&&t!==null&&(t.flags&128)!==0)e:for(t=i.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&n0(t,s,i);else if(t.tag===19)n0(t,s,i);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===i)break e;for(;t.sibling===null;){if(t.return===null||t.return===i)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(p){case"forwards":for(s=i.child,p=null;s!==null;)t=s.alternate,t!==null&&Zo(t)===null&&(p=s),s=s.sibling;s=p,s===null?(p=i.child,i.child=null):(p=s.sibling,s.sibling=null),tf(i,!1,p,s,g,c);break;case"backwards":case"unstable_legacy-backwards":for(s=null,p=i.child,i.child=null;p!==null;){if(t=p.alternate,t!==null&&Zo(t)===null){i.child=p;break}t=p.sibling,p.sibling=s,s=p,p=t}tf(i,!0,s,null,g,c);break;case"together":tf(i,!1,null,null,void 0,c);break;default:i.memoizedState=null}return i.child}function hi(t,i,s){if(t!==null&&(i.dependencies=t.dependencies),Gi|=i.lanes,(s&i.childLanes)===0)if(t!==null){if(os(t,i,s,!1),(s&i.childLanes)===0)return null}else return null;if(t!==null&&i.child!==t.child)throw Error(a(153));if(i.child!==null){for(t=i.child,s=li(t,t.pendingProps),i.child=s,s.return=i;t.sibling!==null;)t=t.sibling,s=s.sibling=li(t,t.pendingProps),s.return=i;s.sibling=null}return i.child}function nf(t,i){return(t.lanes&i)!==0?!0:(t=t.dependencies,!!(t!==null&&qo(t)))}function bE(t,i,s){switch(i.tag){case 3:st(i,i.stateNode.containerInfo),Ii(i,hn,t.memoizedState.cache),wa();break;case 27:case 5:Wt(i);break;case 4:st(i,i.stateNode.containerInfo);break;case 10:Ii(i,i.type,i.memoizedProps.value);break;case 31:if(i.memoizedState!==null)return i.flags|=128,zd(i),null;break;case 13:var c=i.memoizedState;if(c!==null)return c.dehydrated!==null?(Pi(i),i.flags|=128,null):(s&i.child.childLanes)!==0?t0(t,i,s):(Pi(i),t=hi(t,i,s),t!==null?t.sibling:null);Pi(i);break;case 19:var p=(t.flags&128)!==0;if(c=(s&i.childLanes)!==0,c||(os(t,i,s,!1),c=(s&i.childLanes)!==0),p){if(c)return r0(t,i,s);i.flags|=128}if(p=i.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),T(on,on.current),c)break;return null;case 22:return i.lanes=0,Qg(t,i,s,i.pendingProps);case 24:Ii(i,hn,t.memoizedState.cache)}return hi(t,i,s)}function i0(t,i,s){if(t!==null)if(t.memoizedProps!==i.pendingProps)pn=!0;else{if(!nf(t,s)&&(i.flags&128)===0)return pn=!1,bE(t,i,s);pn=(t.flags&131072)!==0}else pn=!1,bt&&(i.flags&1048576)!==0&&Lp(i,ol,i.index);switch(i.lanes=0,i.tag){case 16:e:{var c=i.pendingProps;if(t=Ca(i.elementType),i.type=t,typeof t=="function")ld(t)?(c=Oa(t,c),i.tag=1,i=Jg(null,i,t,c,s)):(i.tag=0,i=Qd(null,i,t,c,s));else{if(t!=null){var p=t.$$typeof;if(p===U){i.tag=11,i=Kg(null,i,t,c,s);break e}else if(p===J){i.tag=14,i=Vg(null,i,t,c,s);break e}}throw i=oe(t)||t,Error(a(306,i,""))}}return i;case 0:return Qd(t,i,i.type,i.pendingProps,s);case 1:return c=i.type,p=Oa(c,i.pendingProps),Jg(t,i,c,p,s);case 3:e:{if(st(i,i.stateNode.containerInfo),t===null)throw Error(a(387));c=i.pendingProps;var g=i.memoizedState;p=g.element,_d(t,i),gl(i,c,null,s);var k=i.memoizedState;if(c=k.cache,Ii(i,hn,c),c!==g.cache&&gd(i,[hn],s,!0),pl(),c=k.element,g.isDehydrated)if(g={element:c,isDehydrated:!1,cache:k.cache},i.updateQueue.baseState=g,i.memoizedState=g,i.flags&256){i=e0(t,i,c,s);break e}else if(c!==p){p=kr(Error(a(424)),i),cl(p),i=e0(t,i,c,s);break e}else{switch(t=i.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}for(Qt=Nr(t.firstChild),Rn=i,bt=!0,ji=null,wr=!0,s=Qp(i,null,c,s),i.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling}else{if(wa(),c===p){i=hi(t,i,s);break e}On(t,i,c,s)}i=i.child}return i;case 26:return oc(t,i),t===null?(s=pb(i.type,null,i.pendingProps,null))?i.memoizedState=s:bt||(s=i.type,t=i.pendingProps,c=Sc(xe.current).createElement(s),c[ye]=i,c[Se]=t,Mn(c,s,t),Lt(c),i.stateNode=c):i.memoizedState=pb(i.type,t.memoizedProps,i.pendingProps,t.memoizedState),null;case 27:return Wt(i),t===null&&bt&&(c=i.stateNode=fb(i.type,i.pendingProps,xe.current),Rn=i,wr=!0,p=Qt,Xi(i.type)?(Lf=p,Qt=Nr(c.firstChild)):Qt=p),On(t,i,i.pendingProps.children,s),oc(t,i),t===null&&(i.flags|=4194304),i.child;case 5:return t===null&&bt&&((p=c=Qt)&&(c=VE(c,i.type,i.pendingProps,wr),c!==null?(i.stateNode=c,Rn=i,Qt=Nr(c.firstChild),wr=!1,p=!0):p=!1),p||Li(i)),Wt(i),p=i.type,g=i.pendingProps,k=t!==null?t.memoizedProps:null,c=g.children,Af(p,g)?c=null:k!==null&&Af(p,k)&&(i.flags|=32),i.memoizedState!==null&&(p=Td(t,i,oE,null,null,s),Ll._currentValue=p),oc(t,i),On(t,i,c,s),i.child;case 6:return t===null&&bt&&((t=s=Qt)&&(s=YE(s,i.pendingProps,wr),s!==null?(i.stateNode=s,Rn=i,Qt=null,t=!0):t=!1),t||Li(i)),null;case 13:return t0(t,i,s);case 4:return st(i,i.stateNode.containerInfo),c=i.pendingProps,t===null?i.child=Ra(i,null,c,s):On(t,i,c,s),i.child;case 11:return Kg(t,i,i.type,i.pendingProps,s);case 7:return On(t,i,i.pendingProps,s),i.child;case 8:return On(t,i,i.pendingProps.children,s),i.child;case 12:return On(t,i,i.pendingProps.children,s),i.child;case 10:return c=i.pendingProps,Ii(i,i.type,c.value),On(t,i,c.children,s),i.child;case 9:return p=i.type._context,c=i.pendingProps.children,Na(i),p=An(p),c=c(p),i.flags|=1,On(t,i,c,s),i.child;case 14:return Vg(t,i,i.type,i.pendingProps,s);case 15:return Yg(t,i,i.type,i.pendingProps,s);case 19:return r0(t,i,s);case 31:return gE(t,i,s);case 22:return Qg(t,i,s,i.pendingProps);case 24:return Na(i),c=An(hn),t===null?(p=yd(),p===null&&(p=Pt,g=bd(),p.pooledCache=g,g.refCount++,g!==null&&(p.pooledCacheLanes|=s),p=g),i.memoizedState={parent:c,cache:p},kd(i),Ii(i,hn,p)):((t.lanes&s)!==0&&(_d(t,i),gl(i,null,null,s),pl()),p=t.memoizedState,g=i.memoizedState,p.parent!==c?(p={parent:c,cache:c},i.memoizedState=p,i.lanes===0&&(i.memoizedState=i.updateQueue.baseState=p),Ii(i,hn,c)):(c=g.cache,Ii(i,hn,c),c!==p.cache&&gd(i,[hn],s,!0))),On(t,i,i.pendingProps.children,s),i.child;case 29:throw i.pendingProps}throw Error(a(156,i.tag))}function mi(t){t.flags|=4}function rf(t,i,s,c,p){if((i=(t.mode&32)!==0)&&(i=!1),i){if(t.flags|=16777216,(p&335544128)===p)if(t.stateNode.complete)t.flags|=8192;else if(A0())t.flags|=8192;else throw Ta=Vo,vd}else t.flags&=-16777217}function a0(t,i){if(i.type!=="stylesheet"||(i.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!vb(i))if(A0())t.flags|=8192;else throw Ta=Vo,vd}function uc(t,i){i!==null&&(t.flags|=4),t.flags&16384&&(i=t.tag!==22?Ke():536870912,t.lanes|=i,vs|=i)}function _l(t,i){if(!bt)switch(t.tailMode){case"hidden":i=t.tail;for(var s=null;i!==null;)i.alternate!==null&&(s=i),i=i.sibling;s===null?t.tail=null:s.sibling=null;break;case"collapsed":s=t.tail;for(var c=null;s!==null;)s.alternate!==null&&(c=s),s=s.sibling;c===null?i||t.tail===null?t.tail=null:t.tail.sibling=null:c.sibling=null}}function Xt(t){var i=t.alternate!==null&&t.alternate.child===t.child,s=0,c=0;if(i)for(var p=t.child;p!==null;)s|=p.lanes|p.childLanes,c|=p.subtreeFlags&65011712,c|=p.flags&65011712,p.return=t,p=p.sibling;else for(p=t.child;p!==null;)s|=p.lanes|p.childLanes,c|=p.subtreeFlags,c|=p.flags,p.return=t,p=p.sibling;return t.subtreeFlags|=c,t.childLanes=s,i}function xE(t,i,s){var c=i.pendingProps;switch(dd(i),i.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Xt(i),null;case 1:return Xt(i),null;case 3:return s=i.stateNode,c=null,t!==null&&(c=t.memoizedState.cache),i.memoizedState.cache!==c&&(i.flags|=2048),ui(hn),Be(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(t===null||t.child===null)&&(ls(i)?mi(i):t===null||t.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,hd())),Xt(i),null;case 26:var p=i.type,g=i.memoizedState;return t===null?(mi(i),g!==null?(Xt(i),a0(i,g)):(Xt(i),rf(i,p,null,c,s))):g?g!==t.memoizedState?(mi(i),Xt(i),a0(i,g)):(Xt(i),i.flags&=-16777217):(t=t.memoizedProps,t!==c&&mi(i),Xt(i),rf(i,p,t,c,s)),null;case 27:if(un(i),s=xe.current,p=i.type,t!==null&&i.stateNode!=null)t.memoizedProps!==c&&mi(i);else{if(!c){if(i.stateNode===null)throw Error(a(166));return Xt(i),null}t=he.current,ls(i)?Bp(i):(t=fb(p,c,s),i.stateNode=t,mi(i))}return Xt(i),null;case 5:if(un(i),p=i.type,t!==null&&i.stateNode!=null)t.memoizedProps!==c&&mi(i);else{if(!c){if(i.stateNode===null)throw Error(a(166));return Xt(i),null}if(g=he.current,ls(i))Bp(i);else{var k=Sc(xe.current);switch(g){case 1:g=k.createElementNS("http://www.w3.org/2000/svg",p);break;case 2:g=k.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;default:switch(p){case"svg":g=k.createElementNS("http://www.w3.org/2000/svg",p);break;case"math":g=k.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;case"script":g=k.createElement("div"),g.innerHTML="<script><\/script>",g=g.removeChild(g.firstChild);break;case"select":g=typeof c.is=="string"?k.createElement("select",{is:c.is}):k.createElement("select"),c.multiple?g.multiple=!0:c.size&&(g.size=c.size);break;default:g=typeof c.is=="string"?k.createElement(p,{is:c.is}):k.createElement(p)}}g[ye]=i,g[Se]=c;e:for(k=i.child;k!==null;){if(k.tag===5||k.tag===6)g.appendChild(k.stateNode);else if(k.tag!==4&&k.tag!==27&&k.child!==null){k.child.return=k,k=k.child;continue}if(k===i)break e;for(;k.sibling===null;){if(k.return===null||k.return===i)break e;k=k.return}k.sibling.return=k.return,k=k.sibling}i.stateNode=g;e:switch(Mn(g,p,c),p){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break e;case"img":c=!0;break e;default:c=!1}c&&mi(i)}}return Xt(i),rf(i,i.type,t===null?null:t.memoizedProps,i.pendingProps,s),null;case 6:if(t&&i.stateNode!=null)t.memoizedProps!==c&&mi(i);else{if(typeof c!="string"&&i.stateNode===null)throw Error(a(166));if(t=xe.current,ls(i)){if(t=i.stateNode,s=i.memoizedProps,c=null,p=Rn,p!==null)switch(p.tag){case 27:case 5:c=p.memoizedProps}t[ye]=i,t=!!(t.nodeValue===s||c!==null&&c.suppressHydrationWarning===!0||tb(t.nodeValue,s)),t||Li(i,!0)}else t=Sc(t).createTextNode(c),t[ye]=i,i.stateNode=t}return Xt(i),null;case 31:if(s=i.memoizedState,t===null||t.memoizedState!==null){if(c=ls(i),s!==null){if(t===null){if(!c)throw Error(a(318));if(t=i.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(a(557));t[ye]=i}else wa(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;Xt(i),t=!1}else s=hd(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=s),t=!0;if(!t)return i.flags&256?(cr(i),i):(cr(i),null);if((i.flags&128)!==0)throw Error(a(558))}return Xt(i),null;case 13:if(c=i.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(p=ls(i),c!==null&&c.dehydrated!==null){if(t===null){if(!p)throw Error(a(318));if(p=i.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(a(317));p[ye]=i}else wa(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;Xt(i),p=!1}else p=hd(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=p),p=!0;if(!p)return i.flags&256?(cr(i),i):(cr(i),null)}return cr(i),(i.flags&128)!==0?(i.lanes=s,i):(s=c!==null,t=t!==null&&t.memoizedState!==null,s&&(c=i.child,p=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(p=c.alternate.memoizedState.cachePool.pool),g=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(g=c.memoizedState.cachePool.pool),g!==p&&(c.flags|=2048)),s!==t&&s&&(i.child.flags|=8192),uc(i,i.updateQueue),Xt(i),null);case 4:return Be(),t===null&&Nf(i.stateNode.containerInfo),Xt(i),null;case 10:return ui(i.type),Xt(i),null;case 19:if(K(on),c=i.memoizedState,c===null)return Xt(i),null;if(p=(i.flags&128)!==0,g=c.rendering,g===null)if(p)_l(c,!1);else{if(rn!==0||t!==null&&(t.flags&128)!==0)for(t=i.child;t!==null;){if(g=Zo(t),g!==null){for(i.flags|=128,_l(c,!1),t=g.updateQueue,i.updateQueue=t,uc(i,t),i.subtreeFlags=0,t=s,s=i.child;s!==null;)Mp(s,t),s=s.sibling;return T(on,on.current&1|2),bt&&oi(i,c.treeForkCount),i.child}t=t.sibling}c.tail!==null&&Vt()>pc&&(i.flags|=128,p=!0,_l(c,!1),i.lanes=4194304)}else{if(!p)if(t=Zo(g),t!==null){if(i.flags|=128,p=!0,t=t.updateQueue,i.updateQueue=t,uc(i,t),_l(c,!0),c.tail===null&&c.tailMode==="hidden"&&!g.alternate&&!bt)return Xt(i),null}else 2*Vt()-c.renderingStartTime>pc&&s!==536870912&&(i.flags|=128,p=!0,_l(c,!1),i.lanes=4194304);c.isBackwards?(g.sibling=i.child,i.child=g):(t=c.last,t!==null?t.sibling=g:i.child=g,c.last=g)}return c.tail!==null?(t=c.tail,c.rendering=t,c.tail=t.sibling,c.renderingStartTime=Vt(),t.sibling=null,s=on.current,T(on,p?s&1|2:s&1),bt&&oi(i,c.treeForkCount),t):(Xt(i),null);case 22:case 23:return cr(i),Nd(),c=i.memoizedState!==null,t!==null?t.memoizedState!==null!==c&&(i.flags|=8192):c&&(i.flags|=8192),c?(s&536870912)!==0&&(i.flags&128)===0&&(Xt(i),i.subtreeFlags&6&&(i.flags|=8192)):Xt(i),s=i.updateQueue,s!==null&&uc(i,s.retryQueue),s=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),c=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(c=i.memoizedState.cachePool.pool),c!==s&&(i.flags|=2048),t!==null&&K(za),null;case 24:return s=null,t!==null&&(s=t.memoizedState.cache),i.memoizedState.cache!==s&&(i.flags|=2048),ui(hn),Xt(i),null;case 25:return null;case 30:return null}throw Error(a(156,i.tag))}function yE(t,i){switch(dd(i),i.tag){case 1:return t=i.flags,t&65536?(i.flags=t&-65537|128,i):null;case 3:return ui(hn),Be(),t=i.flags,(t&65536)!==0&&(t&128)===0?(i.flags=t&-65537|128,i):null;case 26:case 27:case 5:return un(i),null;case 31:if(i.memoizedState!==null){if(cr(i),i.alternate===null)throw Error(a(340));wa()}return t=i.flags,t&65536?(i.flags=t&-65537|128,i):null;case 13:if(cr(i),t=i.memoizedState,t!==null&&t.dehydrated!==null){if(i.alternate===null)throw Error(a(340));wa()}return t=i.flags,t&65536?(i.flags=t&-65537|128,i):null;case 19:return K(on),null;case 4:return Be(),null;case 10:return ui(i.type),null;case 22:case 23:return cr(i),Nd(),t!==null&&K(za),t=i.flags,t&65536?(i.flags=t&-65537|128,i):null;case 24:return ui(hn),null;case 25:return null;default:return null}}function s0(t,i){switch(dd(i),i.tag){case 3:ui(hn),Be();break;case 26:case 27:case 5:un(i);break;case 4:Be();break;case 31:i.memoizedState!==null&&cr(i);break;case 13:cr(i);break;case 19:K(on);break;case 10:ui(i.type);break;case 22:case 23:cr(i),Nd(),t!==null&&K(za);break;case 24:ui(hn)}}function El(t,i){try{var s=i.updateQueue,c=s!==null?s.lastEffect:null;if(c!==null){var p=c.next;s=p;do{if((s.tag&t)===t){c=void 0;var g=s.create,k=s.inst;c=g(),k.destroy=c}s=s.next}while(s!==p)}}catch(z){jt(i,i.return,z)}}function qi(t,i,s){try{var c=i.updateQueue,p=c!==null?c.lastEffect:null;if(p!==null){var g=p.next;c=g;do{if((c.tag&t)===t){var k=c.inst,z=k.destroy;if(z!==void 0){k.destroy=void 0,p=i;var I=s,X=z;try{X()}catch(se){jt(p,I,se)}}}c=c.next}while(c!==g)}}catch(se){jt(i,i.return,se)}}function l0(t){var i=t.updateQueue;if(i!==null){var s=t.stateNode;try{Zp(i,s)}catch(c){jt(t,t.return,c)}}}function o0(t,i,s){s.props=Oa(t.type,t.memoizedProps),s.state=t.memoizedState;try{s.componentWillUnmount()}catch(c){jt(t,i,c)}}function wl(t,i){try{var s=t.ref;if(s!==null){switch(t.tag){case 26:case 27:case 5:var c=t.stateNode;break;case 30:c=t.stateNode;break;default:c=t.stateNode}typeof s=="function"?t.refCleanup=s(c):s.current=c}}catch(p){jt(t,i,p)}}function Yr(t,i){var s=t.ref,c=t.refCleanup;if(s!==null)if(typeof c=="function")try{c()}catch(p){jt(t,i,p)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(p){jt(t,i,p)}else s.current=null}function c0(t){var i=t.type,s=t.memoizedProps,c=t.stateNode;try{e:switch(i){case"button":case"input":case"select":case"textarea":s.autoFocus&&c.focus();break e;case"img":s.src?c.src=s.src:s.srcSet&&(c.srcset=s.srcSet)}}catch(p){jt(t,t.return,p)}}function af(t,i,s){try{var c=t.stateNode;PE(c,t.type,s,i),c[Se]=i}catch(p){jt(t,t.return,p)}}function u0(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Xi(t.type)||t.tag===4}function sf(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||u0(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&Xi(t.type)||t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function lf(t,i,s){var c=t.tag;if(c===5||c===6)t=t.stateNode,i?(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(t,i):(i=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,i.appendChild(t),s=s._reactRootContainer,s!=null||i.onclick!==null||(i.onclick=ke));else if(c!==4&&(c===27&&Xi(t.type)&&(s=t.stateNode,i=null),t=t.child,t!==null))for(lf(t,i,s),t=t.sibling;t!==null;)lf(t,i,s),t=t.sibling}function dc(t,i,s){var c=t.tag;if(c===5||c===6)t=t.stateNode,i?s.insertBefore(t,i):s.appendChild(t);else if(c!==4&&(c===27&&Xi(t.type)&&(s=t.stateNode),t=t.child,t!==null))for(dc(t,i,s),t=t.sibling;t!==null;)dc(t,i,s),t=t.sibling}function d0(t){var i=t.stateNode,s=t.memoizedProps;try{for(var c=t.type,p=i.attributes;p.length;)i.removeAttributeNode(p[0]);Mn(i,c,s),i[ye]=t,i[Se]=s}catch(g){jt(t,t.return,g)}}var pi=!1,gn=!1,of=!1,f0=typeof WeakSet=="function"?WeakSet:Set,Cn=null;function vE(t,i){if(t=t.containerInfo,Tf=Oc,t=wp(t),ed(t)){if("selectionStart"in t)var s={start:t.selectionStart,end:t.selectionEnd};else e:{s=(s=t.ownerDocument)&&s.defaultView||window;var c=s.getSelection&&s.getSelection();if(c&&c.rangeCount!==0){s=c.anchorNode;var p=c.anchorOffset,g=c.focusNode;c=c.focusOffset;try{s.nodeType,g.nodeType}catch{s=null;break e}var k=0,z=-1,I=-1,X=0,se=0,ue=t,W=null;t:for(;;){for(var re;ue!==s||p!==0&&ue.nodeType!==3||(z=k+p),ue!==g||c!==0&&ue.nodeType!==3||(I=k+c),ue.nodeType===3&&(k+=ue.nodeValue.length),(re=ue.firstChild)!==null;)W=ue,ue=re;for(;;){if(ue===t)break t;if(W===s&&++X===p&&(z=k),W===g&&++se===c&&(I=k),(re=ue.nextSibling)!==null)break;ue=W,W=ue.parentNode}ue=re}s=z===-1||I===-1?null:{start:z,end:I}}else s=null}s=s||{start:0,end:0}}else s=null;for(Rf={focusedElem:t,selectionRange:s},Oc=!1,Cn=i;Cn!==null;)if(i=Cn,t=i.child,(i.subtreeFlags&1028)!==0&&t!==null)t.return=i,Cn=t;else for(;Cn!==null;){switch(i=Cn,g=i.alternate,t=i.flags,i.tag){case 0:if((t&4)!==0&&(t=i.updateQueue,t=t!==null?t.events:null,t!==null))for(s=0;s<t.length;s++)p=t[s],p.ref.impl=p.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&g!==null){t=void 0,s=i,p=g.memoizedProps,g=g.memoizedState,c=s.stateNode;try{var Re=Oa(s.type,p);t=c.getSnapshotBeforeUpdate(Re,g),c.__reactInternalSnapshotBeforeUpdate=t}catch(Ge){jt(s,s.return,Ge)}}break;case 3:if((t&1024)!==0){if(t=i.stateNode.containerInfo,s=t.nodeType,s===9)Mf(t);else if(s===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":Mf(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(a(163))}if(t=i.sibling,t!==null){t.return=i.return,Cn=t;break}Cn=i.return}}function h0(t,i,s){var c=s.flags;switch(s.tag){case 0:case 11:case 15:bi(t,s),c&4&&El(5,s);break;case 1:if(bi(t,s),c&4)if(t=s.stateNode,i===null)try{t.componentDidMount()}catch(k){jt(s,s.return,k)}else{var p=Oa(s.type,i.memoizedProps);i=i.memoizedState;try{t.componentDidUpdate(p,i,t.__reactInternalSnapshotBeforeUpdate)}catch(k){jt(s,s.return,k)}}c&64&&l0(s),c&512&&wl(s,s.return);break;case 3:if(bi(t,s),c&64&&(t=s.updateQueue,t!==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{Zp(t,i)}catch(k){jt(s,s.return,k)}}break;case 27:i===null&&c&4&&d0(s);case 26:case 5:bi(t,s),i===null&&c&4&&c0(s),c&512&&wl(s,s.return);break;case 12:bi(t,s);break;case 31:bi(t,s),c&4&&g0(t,s);break;case 13:bi(t,s),c&4&&b0(t,s),c&64&&(t=s.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(s=TE.bind(null,s),QE(t,s))));break;case 22:if(c=s.memoizedState!==null||pi,!c){i=i!==null&&i.memoizedState!==null||gn,p=pi;var g=gn;pi=c,(gn=i)&&!g?xi(t,s,(s.subtreeFlags&8772)!==0):bi(t,s),pi=p,gn=g}break;case 30:break;default:bi(t,s)}}function m0(t){var i=t.alternate;i!==null&&(t.alternate=null,m0(i)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(i=t.stateNode,i!==null&&Ot(i)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var en=null,Xn=!1;function gi(t,i,s){for(s=s.child;s!==null;)p0(t,i,s),s=s.sibling}function p0(t,i,s){if(Jt&&typeof Jt.onCommitFiberUnmount=="function")try{Jt.onCommitFiberUnmount(an,s)}catch{}switch(s.tag){case 26:gn||Yr(s,i),gi(t,i,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:gn||Yr(s,i);var c=en,p=Xn;Xi(s.type)&&(en=s.stateNode,Xn=!1),gi(t,i,s),Ml(s.stateNode),en=c,Xn=p;break;case 5:gn||Yr(s,i);case 6:if(c=en,p=Xn,en=null,gi(t,i,s),en=c,Xn=p,en!==null)if(Xn)try{(en.nodeType===9?en.body:en.nodeName==="HTML"?en.ownerDocument.body:en).removeChild(s.stateNode)}catch(g){jt(s,i,g)}else try{en.removeChild(s.stateNode)}catch(g){jt(s,i,g)}break;case 18:en!==null&&(Xn?(t=en,lb(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,s.stateNode),Cs(t)):lb(en,s.stateNode));break;case 4:c=en,p=Xn,en=s.stateNode.containerInfo,Xn=!0,gi(t,i,s),en=c,Xn=p;break;case 0:case 11:case 14:case 15:qi(2,s,i),gn||qi(4,s,i),gi(t,i,s);break;case 1:gn||(Yr(s,i),c=s.stateNode,typeof c.componentWillUnmount=="function"&&o0(s,i,c)),gi(t,i,s);break;case 21:gi(t,i,s);break;case 22:gn=(c=gn)||s.memoizedState!==null,gi(t,i,s),gn=c;break;default:gi(t,i,s)}}function g0(t,i){if(i.memoizedState===null&&(t=i.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{Cs(t)}catch(s){jt(i,i.return,s)}}}function b0(t,i){if(i.memoizedState===null&&(t=i.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{Cs(t)}catch(s){jt(i,i.return,s)}}function kE(t){switch(t.tag){case 31:case 13:case 19:var i=t.stateNode;return i===null&&(i=t.stateNode=new f0),i;case 22:return t=t.stateNode,i=t._retryCache,i===null&&(i=t._retryCache=new f0),i;default:throw Error(a(435,t.tag))}}function fc(t,i){var s=kE(t);i.forEach(function(c){if(!s.has(c)){s.add(c);var p=RE.bind(null,t,c);c.then(p,p)}})}function Zn(t,i){var s=i.deletions;if(s!==null)for(var c=0;c<s.length;c++){var p=s[c],g=t,k=i,z=k;e:for(;z!==null;){switch(z.tag){case 27:if(Xi(z.type)){en=z.stateNode,Xn=!1;break e}break;case 5:en=z.stateNode,Xn=!1;break e;case 3:case 4:en=z.stateNode.containerInfo,Xn=!0;break e}z=z.return}if(en===null)throw Error(a(160));p0(g,k,p),en=null,Xn=!1,g=p.alternate,g!==null&&(g.return=null),p.return=null}if(i.subtreeFlags&13886)for(i=i.child;i!==null;)x0(i,t),i=i.sibling}var Lr=null;function x0(t,i){var s=t.alternate,c=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:Zn(i,t),Wn(t),c&4&&(qi(3,t,t.return),El(3,t),qi(5,t,t.return));break;case 1:Zn(i,t),Wn(t),c&512&&(gn||s===null||Yr(s,s.return)),c&64&&pi&&(t=t.updateQueue,t!==null&&(c=t.callbacks,c!==null&&(s=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=s===null?c:s.concat(c))));break;case 26:var p=Lr;if(Zn(i,t),Wn(t),c&512&&(gn||s===null||Yr(s,s.return)),c&4){var g=s!==null?s.memoizedState:null;if(c=t.memoizedState,s===null)if(c===null)if(t.stateNode===null){e:{c=t.type,s=t.memoizedProps,p=p.ownerDocument||p;t:switch(c){case"title":g=p.getElementsByTagName("title")[0],(!g||g[rt]||g[ye]||g.namespaceURI==="http://www.w3.org/2000/svg"||g.hasAttribute("itemprop"))&&(g=p.createElement(c),p.head.insertBefore(g,p.querySelector("head > title"))),Mn(g,c,s),g[ye]=t,Lt(g),c=g;break e;case"link":var k=xb("link","href",p).get(c+(s.href||""));if(k){for(var z=0;z<k.length;z++)if(g=k[z],g.getAttribute("href")===(s.href==null||s.href===""?null:s.href)&&g.getAttribute("rel")===(s.rel==null?null:s.rel)&&g.getAttribute("title")===(s.title==null?null:s.title)&&g.getAttribute("crossorigin")===(s.crossOrigin==null?null:s.crossOrigin)){k.splice(z,1);break t}}g=p.createElement(c),Mn(g,c,s),p.head.appendChild(g);break;case"meta":if(k=xb("meta","content",p).get(c+(s.content||""))){for(z=0;z<k.length;z++)if(g=k[z],g.getAttribute("content")===(s.content==null?null:""+s.content)&&g.getAttribute("name")===(s.name==null?null:s.name)&&g.getAttribute("property")===(s.property==null?null:s.property)&&g.getAttribute("http-equiv")===(s.httpEquiv==null?null:s.httpEquiv)&&g.getAttribute("charset")===(s.charSet==null?null:s.charSet)){k.splice(z,1);break t}}g=p.createElement(c),Mn(g,c,s),p.head.appendChild(g);break;default:throw Error(a(468,c))}g[ye]=t,Lt(g),c=g}t.stateNode=c}else yb(p,t.type,t.stateNode);else t.stateNode=bb(p,c,t.memoizedProps);else g!==c?(g===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):g.count--,c===null?yb(p,t.type,t.stateNode):bb(p,c,t.memoizedProps)):c===null&&t.stateNode!==null&&af(t,t.memoizedProps,s.memoizedProps)}break;case 27:Zn(i,t),Wn(t),c&512&&(gn||s===null||Yr(s,s.return)),s!==null&&c&4&&af(t,t.memoizedProps,s.memoizedProps);break;case 5:if(Zn(i,t),Wn(t),c&512&&(gn||s===null||Yr(s,s.return)),t.flags&32){p=t.stateNode;try{Ye(p,"")}catch(Re){jt(t,t.return,Re)}}c&4&&t.stateNode!=null&&(p=t.memoizedProps,af(t,p,s!==null?s.memoizedProps:p)),c&1024&&(of=!0);break;case 6:if(Zn(i,t),Wn(t),c&4){if(t.stateNode===null)throw Error(a(162));c=t.memoizedProps,s=t.stateNode;try{s.nodeValue=c}catch(Re){jt(t,t.return,Re)}}break;case 3:if(Cc=null,p=Lr,Lr=Nc(i.containerInfo),Zn(i,t),Lr=p,Wn(t),c&4&&s!==null&&s.memoizedState.isDehydrated)try{Cs(i.containerInfo)}catch(Re){jt(t,t.return,Re)}of&&(of=!1,y0(t));break;case 4:c=Lr,Lr=Nc(t.stateNode.containerInfo),Zn(i,t),Wn(t),Lr=c;break;case 12:Zn(i,t),Wn(t);break;case 31:Zn(i,t),Wn(t),c&4&&(c=t.updateQueue,c!==null&&(t.updateQueue=null,fc(t,c)));break;case 13:Zn(i,t),Wn(t),t.child.flags&8192&&t.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(mc=Vt()),c&4&&(c=t.updateQueue,c!==null&&(t.updateQueue=null,fc(t,c)));break;case 22:p=t.memoizedState!==null;var I=s!==null&&s.memoizedState!==null,X=pi,se=gn;if(pi=X||p,gn=se||I,Zn(i,t),gn=se,pi=X,Wn(t),c&8192)e:for(i=t.stateNode,i._visibility=p?i._visibility&-2:i._visibility|1,p&&(s===null||I||pi||gn||Ma(t)),s=null,i=t;;){if(i.tag===5||i.tag===26){if(s===null){I=s=i;try{if(g=I.stateNode,p)k=g.style,typeof k.setProperty=="function"?k.setProperty("display","none","important"):k.display="none";else{z=I.stateNode;var ue=I.memoizedProps.style,W=ue!=null&&ue.hasOwnProperty("display")?ue.display:null;z.style.display=W==null||typeof W=="boolean"?"":(""+W).trim()}}catch(Re){jt(I,I.return,Re)}}}else if(i.tag===6){if(s===null){I=i;try{I.stateNode.nodeValue=p?"":I.memoizedProps}catch(Re){jt(I,I.return,Re)}}}else if(i.tag===18){if(s===null){I=i;try{var re=I.stateNode;p?ob(re,!0):ob(I.stateNode,!1)}catch(Re){jt(I,I.return,Re)}}}else if((i.tag!==22&&i.tag!==23||i.memoizedState===null||i===t)&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===t)break e;for(;i.sibling===null;){if(i.return===null||i.return===t)break e;s===i&&(s=null),i=i.return}s===i&&(s=null),i.sibling.return=i.return,i=i.sibling}c&4&&(c=t.updateQueue,c!==null&&(s=c.retryQueue,s!==null&&(c.retryQueue=null,fc(t,s))));break;case 19:Zn(i,t),Wn(t),c&4&&(c=t.updateQueue,c!==null&&(t.updateQueue=null,fc(t,c)));break;case 30:break;case 21:break;default:Zn(i,t),Wn(t)}}function Wn(t){var i=t.flags;if(i&2){try{for(var s,c=t.return;c!==null;){if(u0(c)){s=c;break}c=c.return}if(s==null)throw Error(a(160));switch(s.tag){case 27:var p=s.stateNode,g=sf(t);dc(t,g,p);break;case 5:var k=s.stateNode;s.flags&32&&(Ye(k,""),s.flags&=-33);var z=sf(t);dc(t,z,k);break;case 3:case 4:var I=s.stateNode.containerInfo,X=sf(t);lf(t,X,I);break;default:throw Error(a(161))}}catch(se){jt(t,t.return,se)}t.flags&=-3}i&4096&&(t.flags&=-4097)}function y0(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var i=t;y0(i),i.tag===5&&i.flags&1024&&i.stateNode.reset(),t=t.sibling}}function bi(t,i){if(i.subtreeFlags&8772)for(i=i.child;i!==null;)h0(t,i.alternate,i),i=i.sibling}function Ma(t){for(t=t.child;t!==null;){var i=t;switch(i.tag){case 0:case 11:case 14:case 15:qi(4,i,i.return),Ma(i);break;case 1:Yr(i,i.return);var s=i.stateNode;typeof s.componentWillUnmount=="function"&&o0(i,i.return,s),Ma(i);break;case 27:Ml(i.stateNode);case 26:case 5:Yr(i,i.return),Ma(i);break;case 22:i.memoizedState===null&&Ma(i);break;case 30:Ma(i);break;default:Ma(i)}t=t.sibling}}function xi(t,i,s){for(s=s&&(i.subtreeFlags&8772)!==0,i=i.child;i!==null;){var c=i.alternate,p=t,g=i,k=g.flags;switch(g.tag){case 0:case 11:case 15:xi(p,g,s),El(4,g);break;case 1:if(xi(p,g,s),c=g,p=c.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch(X){jt(c,c.return,X)}if(c=g,p=c.updateQueue,p!==null){var z=c.stateNode;try{var I=p.shared.hiddenCallbacks;if(I!==null)for(p.shared.hiddenCallbacks=null,p=0;p<I.length;p++)Xp(I[p],z)}catch(X){jt(c,c.return,X)}}s&&k&64&&l0(g),wl(g,g.return);break;case 27:d0(g);case 26:case 5:xi(p,g,s),s&&c===null&&k&4&&c0(g),wl(g,g.return);break;case 12:xi(p,g,s);break;case 31:xi(p,g,s),s&&k&4&&g0(p,g);break;case 13:xi(p,g,s),s&&k&4&&b0(p,g);break;case 22:g.memoizedState===null&&xi(p,g,s),wl(g,g.return);break;case 30:break;default:xi(p,g,s)}i=i.sibling}}function cf(t,i){var s=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),t=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(t=i.memoizedState.cachePool.pool),t!==s&&(t!=null&&t.refCount++,s!=null&&ul(s))}function uf(t,i){t=null,i.alternate!==null&&(t=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==t&&(i.refCount++,t!=null&&ul(t))}function Ir(t,i,s,c){if(i.subtreeFlags&10256)for(i=i.child;i!==null;)v0(t,i,s,c),i=i.sibling}function v0(t,i,s,c){var p=i.flags;switch(i.tag){case 0:case 11:case 15:Ir(t,i,s,c),p&2048&&El(9,i);break;case 1:Ir(t,i,s,c);break;case 3:Ir(t,i,s,c),p&2048&&(t=null,i.alternate!==null&&(t=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==t&&(i.refCount++,t!=null&&ul(t)));break;case 12:if(p&2048){Ir(t,i,s,c),t=i.stateNode;try{var g=i.memoizedProps,k=g.id,z=g.onPostCommit;typeof z=="function"&&z(k,i.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(I){jt(i,i.return,I)}}else Ir(t,i,s,c);break;case 31:Ir(t,i,s,c);break;case 13:Ir(t,i,s,c);break;case 23:break;case 22:g=i.stateNode,k=i.alternate,i.memoizedState!==null?g._visibility&2?Ir(t,i,s,c):Sl(t,i):g._visibility&2?Ir(t,i,s,c):(g._visibility|=2,bs(t,i,s,c,(i.subtreeFlags&10256)!==0||!1)),p&2048&&cf(k,i);break;case 24:Ir(t,i,s,c),p&2048&&uf(i.alternate,i);break;default:Ir(t,i,s,c)}}function bs(t,i,s,c,p){for(p=p&&((i.subtreeFlags&10256)!==0||!1),i=i.child;i!==null;){var g=t,k=i,z=s,I=c,X=k.flags;switch(k.tag){case 0:case 11:case 15:bs(g,k,z,I,p),El(8,k);break;case 23:break;case 22:var se=k.stateNode;k.memoizedState!==null?se._visibility&2?bs(g,k,z,I,p):Sl(g,k):(se._visibility|=2,bs(g,k,z,I,p)),p&&X&2048&&cf(k.alternate,k);break;case 24:bs(g,k,z,I,p),p&&X&2048&&uf(k.alternate,k);break;default:bs(g,k,z,I,p)}i=i.sibling}}function Sl(t,i){if(i.subtreeFlags&10256)for(i=i.child;i!==null;){var s=t,c=i,p=c.flags;switch(c.tag){case 22:Sl(s,c),p&2048&&cf(c.alternate,c);break;case 24:Sl(s,c),p&2048&&uf(c.alternate,c);break;default:Sl(s,c)}i=i.sibling}}var Nl=8192;function xs(t,i,s){if(t.subtreeFlags&Nl)for(t=t.child;t!==null;)k0(t,i,s),t=t.sibling}function k0(t,i,s){switch(t.tag){case 26:xs(t,i,s),t.flags&Nl&&t.memoizedState!==null&&lw(s,Lr,t.memoizedState,t.memoizedProps);break;case 5:xs(t,i,s);break;case 3:case 4:var c=Lr;Lr=Nc(t.stateNode.containerInfo),xs(t,i,s),Lr=c;break;case 22:t.memoizedState===null&&(c=t.alternate,c!==null&&c.memoizedState!==null?(c=Nl,Nl=16777216,xs(t,i,s),Nl=c):xs(t,i,s));break;default:xs(t,i,s)}}function _0(t){var i=t.alternate;if(i!==null&&(t=i.child,t!==null)){i.child=null;do i=t.sibling,t.sibling=null,t=i;while(t!==null)}}function zl(t){var i=t.deletions;if((t.flags&16)!==0){if(i!==null)for(var s=0;s<i.length;s++){var c=i[s];Cn=c,w0(c,t)}_0(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)E0(t),t=t.sibling}function E0(t){switch(t.tag){case 0:case 11:case 15:zl(t),t.flags&2048&&qi(9,t,t.return);break;case 3:zl(t);break;case 12:zl(t);break;case 22:var i=t.stateNode;t.memoizedState!==null&&i._visibility&2&&(t.return===null||t.return.tag!==13)?(i._visibility&=-3,hc(t)):zl(t);break;default:zl(t)}}function hc(t){var i=t.deletions;if((t.flags&16)!==0){if(i!==null)for(var s=0;s<i.length;s++){var c=i[s];Cn=c,w0(c,t)}_0(t)}for(t=t.child;t!==null;){switch(i=t,i.tag){case 0:case 11:case 15:qi(8,i,i.return),hc(i);break;case 22:s=i.stateNode,s._visibility&2&&(s._visibility&=-3,hc(i));break;default:hc(i)}t=t.sibling}}function w0(t,i){for(;Cn!==null;){var s=Cn;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 c=s.memoizedState.cachePool.pool;c!=null&&c.refCount++}break;case 24:ul(s.memoizedState.cache)}if(c=s.child,c!==null)c.return=s,Cn=c;else e:for(s=t;Cn!==null;){c=Cn;var p=c.sibling,g=c.return;if(m0(c),c===s){Cn=null;break e}if(p!==null){p.return=g,Cn=p;break e}Cn=g}}}var _E={getCacheForType:function(t){var i=An(hn),s=i.data.get(t);return s===void 0&&(s=t(),i.data.set(t,s)),s},cacheSignal:function(){return An(hn).controller.signal}},EE=typeof WeakMap=="function"?WeakMap:Map,Ct=0,Pt=null,ct=null,pt=0,Dt=0,ur=null,$i=!1,ys=!1,df=!1,yi=0,rn=0,Gi=0,Da=0,ff=0,dr=0,vs=0,Cl=null,Jn=null,hf=!1,mc=0,S0=0,pc=1/0,gc=null,Ki=null,_n=0,Vi=null,ks=null,vi=0,mf=0,pf=null,N0=null,Tl=0,gf=null;function fr(){return(Ct&2)!==0&&pt!==0?pt&-pt:L.T!==null?_f():de()}function z0(){if(dr===0)if((pt&536870912)===0||bt){var t=Dr;Dr<<=1,(Dr&3932160)===0&&(Dr=262144),dr=t}else dr=536870912;return t=or.current,t!==null&&(t.flags|=32),dr}function er(t,i,s){(t===Pt&&(Dt===2||Dt===9)||t.cancelPendingCommit!==null)&&(_s(t,0),Yi(t,pt,dr,!1)),St(t,s),((Ct&2)===0||t!==Pt)&&(t===Pt&&((Ct&2)===0&&(Da|=s),rn===4&&Yi(t,pt,dr,!1)),Qr(t))}function C0(t,i,s){if((Ct&6)!==0)throw Error(a(327));var c=!s&&(i&127)===0&&(i&t.expiredLanes)===0||le(t,i),p=c?NE(t,i):xf(t,i,!0),g=c;do{if(p===0){ys&&!c&&Yi(t,i,0,!1);break}else{if(s=t.current.alternate,g&&!wE(s)){p=xf(t,i,!1),g=!1;continue}if(p===2){if(g=i,t.errorRecoveryDisabledLanes&g)var k=0;else k=t.pendingLanes&-536870913,k=k!==0?k:k&536870912?536870912:0;if(k!==0){i=k;e:{var z=t;p=Cl;var I=z.current.memoizedState.isDehydrated;if(I&&(_s(z,k).flags|=256),k=xf(z,k,!1),k!==2){if(df&&!I){z.errorRecoveryDisabledLanes|=g,Da|=g,p=4;break e}g=Jn,Jn=p,g!==null&&(Jn===null?Jn=g:Jn.push.apply(Jn,g))}p=k}if(g=!1,p!==2)continue}}if(p===1){_s(t,0),Yi(t,i,0,!0);break}e:{switch(c=t,g=p,g){case 0:case 1:throw Error(a(345));case 4:if((i&4194048)!==i)break;case 6:Yi(c,i,dr,!$i);break e;case 2:Jn=null;break;case 3:case 5:break;default:throw Error(a(329))}if((i&62914560)===i&&(p=mc+300-Vt(),10<p)){if(Yi(c,i,dr,!$i),B(c,0,!0)!==0)break e;vi=i,c.timeoutHandle=ab(T0.bind(null,c,s,Jn,gc,hf,i,dr,Da,vs,$i,g,"Throttled",-0,0),p);break e}T0(c,s,Jn,gc,hf,i,dr,Da,vs,$i,g,null,-0,0)}}break}while(!0);Qr(t)}function T0(t,i,s,c,p,g,k,z,I,X,se,ue,W,re){if(t.timeoutHandle=-1,ue=i.subtreeFlags,ue&8192||(ue&16785408)===16785408){ue={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ke},k0(i,g,ue);var Re=(g&62914560)===g?mc-Vt():(g&4194048)===g?S0-Vt():0;if(Re=ow(ue,Re),Re!==null){vi=g,t.cancelPendingCommit=Re(I0.bind(null,t,i,g,s,c,p,k,z,I,se,ue,null,W,re)),Yi(t,g,k,!X);return}}I0(t,i,g,s,c,p,k,z,I)}function wE(t){for(var i=t;;){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 c=0;c<s.length;c++){var p=s[c],g=p.getSnapshot;p=p.value;try{if(!sr(g(),p))return!1}catch{return!1}}if(s=i.child,i.subtreeFlags&16384&&s!==null)s.return=i,i=s;else{if(i===t)break;for(;i.sibling===null;){if(i.return===null||i.return===t)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function Yi(t,i,s,c){i&=~ff,i&=~Da,t.suspendedLanes|=i,t.pingedLanes&=~i,c&&(t.warmLanes|=i),c=t.expirationTimes;for(var p=i;0<p;){var g=31-wt(p),k=1<<g;c[g]=-1,p&=~k}s!==0&&Ne(t,s,i)}function bc(){return(Ct&6)===0?(Rl(0),!1):!0}function bf(){if(ct!==null){if(Dt===0)var t=ct.return;else t=ct,ci=Sa=null,Od(t),fs=null,fl=0,t=ct;for(;t!==null;)s0(t.alternate,t),t=t.return;ct=null}}function _s(t,i){var s=t.timeoutHandle;s!==-1&&(t.timeoutHandle=-1,$E(s)),s=t.cancelPendingCommit,s!==null&&(t.cancelPendingCommit=null,s()),vi=0,bf(),Pt=t,ct=s=li(t.current,null),pt=i,Dt=0,ur=null,$i=!1,ys=le(t,i),df=!1,vs=dr=ff=Da=Gi=rn=0,Jn=Cl=null,hf=!1,(i&8)!==0&&(i|=i&32);var c=t.entangledLanes;if(c!==0)for(t=t.entanglements,c&=i;0<c;){var p=31-wt(c),g=1<<p;i|=t[p],c&=~g}return yi=i,Bo(),s}function R0(t,i){et=null,L.H=vl,i===ds||i===Ko?(i=Kp(),Dt=3):i===vd?(i=Kp(),Dt=4):Dt=i===Yd?8:i!==null&&typeof i=="object"&&typeof i.then=="function"?6:1,ur=i,ct===null&&(rn=1,sc(t,kr(i,t.current)))}function A0(){var t=or.current;return t===null?!0:(pt&4194048)===pt?Sr===null:(pt&62914560)===pt||(pt&536870912)!==0?t===Sr:!1}function O0(){var t=L.H;return L.H=vl,t===null?vl:t}function M0(){var t=L.A;return L.A=_E,t}function xc(){rn=4,$i||(pt&4194048)!==pt&&or.current!==null||(ys=!0),(Gi&134217727)===0&&(Da&134217727)===0||Pt===null||Yi(Pt,pt,dr,!1)}function xf(t,i,s){var c=Ct;Ct|=2;var p=O0(),g=M0();(Pt!==t||pt!==i)&&(gc=null,_s(t,i)),i=!1;var k=rn;e:do try{if(Dt!==0&&ct!==null){var z=ct,I=ur;switch(Dt){case 8:bf(),k=6;break e;case 3:case 2:case 9:case 6:or.current===null&&(i=!0);var X=Dt;if(Dt=0,ur=null,Es(t,z,I,X),s&&ys){k=0;break e}break;default:X=Dt,Dt=0,ur=null,Es(t,z,I,X)}}SE(),k=rn;break}catch(se){R0(t,se)}while(!0);return i&&t.shellSuspendCounter++,ci=Sa=null,Ct=c,L.H=p,L.A=g,ct===null&&(Pt=null,pt=0,Bo()),k}function SE(){for(;ct!==null;)D0(ct)}function NE(t,i){var s=Ct;Ct|=2;var c=O0(),p=M0();Pt!==t||pt!==i?(gc=null,pc=Vt()+500,_s(t,i)):ys=le(t,i);e:do try{if(Dt!==0&&ct!==null){i=ct;var g=ur;t:switch(Dt){case 1:Dt=0,ur=null,Es(t,i,g,1);break;case 2:case 9:if($p(g)){Dt=0,ur=null,j0(i);break}i=function(){Dt!==2&&Dt!==9||Pt!==t||(Dt=7),Qr(t)},g.then(i,i);break e;case 3:Dt=7;break e;case 4:Dt=5;break e;case 7:$p(g)?(Dt=0,ur=null,j0(i)):(Dt=0,ur=null,Es(t,i,g,7));break;case 5:var k=null;switch(ct.tag){case 26:k=ct.memoizedState;case 5:case 27:var z=ct;if(k?vb(k):z.stateNode.complete){Dt=0,ur=null;var I=z.sibling;if(I!==null)ct=I;else{var X=z.return;X!==null?(ct=X,yc(X)):ct=null}break t}}Dt=0,ur=null,Es(t,i,g,5);break;case 6:Dt=0,ur=null,Es(t,i,g,6);break;case 8:bf(),rn=6;break e;default:throw Error(a(462))}}zE();break}catch(se){R0(t,se)}while(!0);return ci=Sa=null,L.H=c,L.A=p,Ct=s,ct!==null?0:(Pt=null,pt=0,Bo(),rn)}function zE(){for(;ct!==null&&!ga();)D0(ct)}function D0(t){var i=i0(t.alternate,t,yi);t.memoizedProps=t.pendingProps,i===null?yc(t):ct=i}function j0(t){var i=t,s=i.alternate;switch(i.tag){case 15:case 0:i=Wg(s,i,i.pendingProps,i.type,void 0,pt);break;case 11:i=Wg(s,i,i.pendingProps,i.type.render,i.ref,pt);break;case 5:Od(i);default:s0(s,i),i=ct=Mp(i,yi),i=i0(s,i,yi)}t.memoizedProps=t.pendingProps,i===null?yc(t):ct=i}function Es(t,i,s,c){ci=Sa=null,Od(i),fs=null,fl=0;var p=i.return;try{if(pE(t,p,i,s,pt)){rn=1,sc(t,kr(s,t.current)),ct=null;return}}catch(g){if(p!==null)throw ct=p,g;rn=1,sc(t,kr(s,t.current)),ct=null;return}i.flags&32768?(bt||c===1?t=!0:ys||(pt&536870912)!==0?t=!1:($i=t=!0,(c===2||c===9||c===3||c===6)&&(c=or.current,c!==null&&c.tag===13&&(c.flags|=16384))),L0(i,t)):yc(i)}function yc(t){var i=t;do{if((i.flags&32768)!==0){L0(i,$i);return}t=i.return;var s=xE(i.alternate,i,yi);if(s!==null){ct=s;return}if(i=i.sibling,i!==null){ct=i;return}ct=i=t}while(i!==null);rn===0&&(rn=5)}function L0(t,i){do{var s=yE(t.alternate,t);if(s!==null){s.flags&=32767,ct=s;return}if(s=t.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!i&&(t=t.sibling,t!==null)){ct=t;return}ct=t=s}while(t!==null);rn=6,ct=null}function I0(t,i,s,c,p,g,k,z,I){t.cancelPendingCommit=null;do vc();while(_n!==0);if((Ct&6)!==0)throw Error(a(327));if(i!==null){if(i===t.current)throw Error(a(177));if(g=i.lanes|i.childLanes,g|=ad,Te(t,s,g,k,z,I),t===Pt&&(ct=Pt=null,pt=0),ks=i,Vi=t,vi=s,mf=g,pf=p,N0=c,(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,AE(Fe,function(){return H0(),null})):(t.callbackNode=null,t.callbackPriority=0),c=(i.flags&13878)!==0,(i.subtreeFlags&13878)!==0||c){c=L.T,L.T=null,p=Y.p,Y.p=2,k=Ct,Ct|=4;try{vE(t,i,s)}finally{Ct=k,Y.p=p,L.T=c}}_n=1,B0(),U0(),F0()}}function B0(){if(_n===1){_n=0;var t=Vi,i=ks,s=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||s){s=L.T,L.T=null;var c=Y.p;Y.p=2;var p=Ct;Ct|=4;try{x0(i,t);var g=Rf,k=wp(t.containerInfo),z=g.focusedElem,I=g.selectionRange;if(k!==z&&z&&z.ownerDocument&&Ep(z.ownerDocument.documentElement,z)){if(I!==null&&ed(z)){var X=I.start,se=I.end;if(se===void 0&&(se=X),"selectionStart"in z)z.selectionStart=X,z.selectionEnd=Math.min(se,z.value.length);else{var ue=z.ownerDocument||document,W=ue&&ue.defaultView||window;if(W.getSelection){var re=W.getSelection(),Re=z.textContent.length,Ge=Math.min(I.start,Re),Ut=I.end===void 0?Ge:Math.min(I.end,Re);!re.extend&&Ge>Ut&&(k=Ut,Ut=Ge,Ge=k);var G=_p(z,Ge),P=_p(z,Ut);if(G&&P&&(re.rangeCount!==1||re.anchorNode!==G.node||re.anchorOffset!==G.offset||re.focusNode!==P.node||re.focusOffset!==P.offset)){var Q=ue.createRange();Q.setStart(G.node,G.offset),re.removeAllRanges(),Ge>Ut?(re.addRange(Q),re.extend(P.node,P.offset)):(Q.setEnd(P.node,P.offset),re.addRange(Q))}}}}for(ue=[],re=z;re=re.parentNode;)re.nodeType===1&&ue.push({element:re,left:re.scrollLeft,top:re.scrollTop});for(typeof z.focus=="function"&&z.focus(),z=0;z<ue.length;z++){var ce=ue[z];ce.element.scrollLeft=ce.left,ce.element.scrollTop=ce.top}}Oc=!!Tf,Rf=Tf=null}finally{Ct=p,Y.p=c,L.T=s}}t.current=i,_n=2}}function U0(){if(_n===2){_n=0;var t=Vi,i=ks,s=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||s){s=L.T,L.T=null;var c=Y.p;Y.p=2;var p=Ct;Ct|=4;try{h0(t,i.alternate,i)}finally{Ct=p,Y.p=c,L.T=s}}_n=3}}function F0(){if(_n===4||_n===3){_n=0,Ri();var t=Vi,i=ks,s=vi,c=N0;(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?_n=5:(_n=0,ks=Vi=null,P0(t,t.pendingLanes));var p=t.pendingLanes;if(p===0&&(Ki=null),Z(s),i=i.stateNode,Jt&&typeof Jt.onCommitFiberRoot=="function")try{Jt.onCommitFiberRoot(an,i,void 0,(i.current.flags&128)===128)}catch{}if(c!==null){i=L.T,p=Y.p,Y.p=2,L.T=null;try{for(var g=t.onRecoverableError,k=0;k<c.length;k++){var z=c[k];g(z.value,{componentStack:z.stack})}}finally{L.T=i,Y.p=p}}(vi&3)!==0&&vc(),Qr(t),p=t.pendingLanes,(s&261930)!==0&&(p&42)!==0?t===gf?Tl++:(Tl=0,gf=t):Tl=0,Rl(0)}}function P0(t,i){(t.pooledCacheLanes&=i)===0&&(i=t.pooledCache,i!=null&&(t.pooledCache=null,ul(i)))}function vc(){return B0(),U0(),F0(),H0()}function H0(){if(_n!==5)return!1;var t=Vi,i=mf;mf=0;var s=Z(vi),c=L.T,p=Y.p;try{Y.p=32>s?32:s,L.T=null,s=pf,pf=null;var g=Vi,k=vi;if(_n=0,ks=Vi=null,vi=0,(Ct&6)!==0)throw Error(a(331));var z=Ct;if(Ct|=4,E0(g.current),v0(g,g.current,k,s),Ct=z,Rl(0,!1),Jt&&typeof Jt.onPostCommitFiberRoot=="function")try{Jt.onPostCommitFiberRoot(an,g)}catch{}return!0}finally{Y.p=p,L.T=c,P0(t,i)}}function q0(t,i,s){i=kr(s,i),i=Vd(t.stateNode,i,2),t=Fi(t,i,2),t!==null&&(St(t,2),Qr(t))}function jt(t,i,s){if(t.tag===3)q0(t,t,s);else for(;i!==null;){if(i.tag===3){q0(i,t,s);break}else if(i.tag===1){var c=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(Ki===null||!Ki.has(c))){t=kr(s,t),s=$g(2),c=Fi(i,s,2),c!==null&&(Gg(s,c,i,t),St(c,2),Qr(c));break}}i=i.return}}function yf(t,i,s){var c=t.pingCache;if(c===null){c=t.pingCache=new EE;var p=new Set;c.set(i,p)}else p=c.get(i),p===void 0&&(p=new Set,c.set(i,p));p.has(s)||(df=!0,p.add(s),t=CE.bind(null,t,i,s),i.then(t,t))}function CE(t,i,s){var c=t.pingCache;c!==null&&c.delete(i),t.pingedLanes|=t.suspendedLanes&s,t.warmLanes&=~s,Pt===t&&(pt&s)===s&&(rn===4||rn===3&&(pt&62914560)===pt&&300>Vt()-mc?(Ct&2)===0&&_s(t,0):ff|=s,vs===pt&&(vs=0)),Qr(t)}function $0(t,i){i===0&&(i=Ke()),t=_a(t,i),t!==null&&(St(t,i),Qr(t))}function TE(t){var i=t.memoizedState,s=0;i!==null&&(s=i.retryLane),$0(t,s)}function RE(t,i){var s=0;switch(t.tag){case 31:case 13:var c=t.stateNode,p=t.memoizedState;p!==null&&(s=p.retryLane);break;case 19:c=t.stateNode;break;case 22:c=t.stateNode._retryCache;break;default:throw Error(a(314))}c!==null&&c.delete(i),$0(t,s)}function AE(t,i){return xr(t,i)}var kc=null,ws=null,vf=!1,_c=!1,kf=!1,Qi=0;function Qr(t){t!==ws&&t.next===null&&(ws===null?kc=ws=t:ws=ws.next=t),_c=!0,vf||(vf=!0,ME())}function Rl(t,i){if(!kf&&_c){kf=!0;do for(var s=!1,c=kc;c!==null;){if(t!==0){var p=c.pendingLanes;if(p===0)var g=0;else{var k=c.suspendedLanes,z=c.pingedLanes;g=(1<<31-wt(42|t)+1)-1,g&=p&~(k&~z),g=g&201326741?g&201326741|1:g?g|2:0}g!==0&&(s=!0,Y0(c,g))}else g=pt,g=B(c,c===Pt?g:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(g&3)===0||le(c,g)||(s=!0,Y0(c,g));c=c.next}while(s);kf=!1}}function OE(){G0()}function G0(){_c=vf=!1;var t=0;Qi!==0&&qE()&&(t=Qi);for(var i=Vt(),s=null,c=kc;c!==null;){var p=c.next,g=K0(c,i);g===0?(c.next=null,s===null?kc=p:s.next=p,p===null&&(ws=s)):(s=c,(t!==0||(g&3)!==0)&&(_c=!0)),c=p}_n!==0&&_n!==5||Rl(t),Qi!==0&&(Qi=0)}function K0(t,i){for(var s=t.suspendedLanes,c=t.pingedLanes,p=t.expirationTimes,g=t.pendingLanes&-62914561;0<g;){var k=31-wt(g),z=1<<k,I=p[k];I===-1?((z&s)===0||(z&c)!==0)&&(p[k]=Ee(z,i)):I<=i&&(t.expiredLanes|=z),g&=~z}if(i=Pt,s=pt,s=B(t,t===i?s:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),c=t.callbackNode,s===0||t===i&&(Dt===2||Dt===9)||t.cancelPendingCommit!==null)return c!==null&&c!==null&&ni(c),t.callbackNode=null,t.callbackPriority=0;if((s&3)===0||le(t,s)){if(i=s&-s,i===t.callbackPriority)return i;switch(c!==null&&ni(c),Z(s)){case 2:case 8:s=be;break;case 32:s=Fe;break;case 268435456:s=Je;break;default:s=Fe}return c=V0.bind(null,t),s=xr(s,c),t.callbackPriority=i,t.callbackNode=s,i}return c!==null&&c!==null&&ni(c),t.callbackPriority=2,t.callbackNode=null,2}function V0(t,i){if(_n!==0&&_n!==5)return t.callbackNode=null,t.callbackPriority=0,null;var s=t.callbackNode;if(vc()&&t.callbackNode!==s)return null;var c=pt;return c=B(t,t===Pt?c:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),c===0?null:(C0(t,c,i),K0(t,Vt()),t.callbackNode!=null&&t.callbackNode===s?V0.bind(null,t):null)}function Y0(t,i){if(vc())return null;C0(t,i,!0)}function ME(){GE(function(){(Ct&6)!==0?xr(ie,OE):G0()})}function _f(){if(Qi===0){var t=cs;t===0&&(t=qr,qr<<=1,(qr&261888)===0&&(qr=256)),Qi=t}return Qi}function Q0(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:Oi(""+t)}function X0(t,i){var s=i.ownerDocument.createElement("input");return s.name=i.name,s.value=i.value,t.id&&s.setAttribute("form",t.id),i.parentNode.insertBefore(s,i),t=new FormData(t),s.parentNode.removeChild(s),t}function DE(t,i,s,c,p){if(i==="submit"&&s&&s.stateNode===p){var g=Q0((p[Se]||null).action),k=c.submitter;k&&(i=(i=k[Se]||null)?Q0(i.formAction):k.getAttribute("formAction"),i!==null&&(g=i,k=null));var z=new Do("action","action",null,c,p);t.push({event:z,listeners:[{instance:null,listener:function(){if(c.defaultPrevented){if(Qi!==0){var I=k?X0(p,k):new FormData(p);Pd(s,{pending:!0,data:I,method:p.method,action:g},null,I)}}else typeof g=="function"&&(z.preventDefault(),I=k?X0(p,k):new FormData(p),Pd(s,{pending:!0,data:I,method:p.method,action:g},g,I))},currentTarget:p}]})}}for(var Ef=0;Ef<id.length;Ef++){var wf=id[Ef],jE=wf.toLowerCase(),LE=wf[0].toUpperCase()+wf.slice(1);jr(jE,"on"+LE)}jr(zp,"onAnimationEnd"),jr(Cp,"onAnimationIteration"),jr(Tp,"onAnimationStart"),jr("dblclick","onDoubleClick"),jr("focusin","onFocus"),jr("focusout","onBlur"),jr(W_,"onTransitionRun"),jr(J_,"onTransitionStart"),jr(eE,"onTransitionCancel"),jr(Rp,"onTransitionEnd"),fe("onMouseEnter",["mouseout","mouseover"]),fe("onMouseLeave",["mouseout","mouseover"]),fe("onPointerEnter",["pointerout","pointerover"]),fe("onPointerLeave",["pointerout","pointerover"]),dn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),dn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),dn("onBeforeInput",["compositionend","keypress","textInput","paste"]),dn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),dn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),dn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Al="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(" "),IE=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Al));function Z0(t,i){i=(i&4)!==0;for(var s=0;s<t.length;s++){var c=t[s],p=c.event;c=c.listeners;e:{var g=void 0;if(i)for(var k=c.length-1;0<=k;k--){var z=c[k],I=z.instance,X=z.currentTarget;if(z=z.listener,I!==g&&p.isPropagationStopped())break e;g=z,p.currentTarget=X;try{g(p)}catch(se){Io(se)}p.currentTarget=null,g=I}else for(k=0;k<c.length;k++){if(z=c[k],I=z.instance,X=z.currentTarget,z=z.listener,I!==g&&p.isPropagationStopped())break e;g=z,p.currentTarget=X;try{g(p)}catch(se){Io(se)}p.currentTarget=null,g=I}}}}function ut(t,i){var s=i[Ie];s===void 0&&(s=i[Ie]=new Set);var c=t+"__bubble";s.has(c)||(W0(i,t,2,!1),s.add(c))}function Sf(t,i,s){var c=0;i&&(c|=4),W0(s,t,c,i)}var Ec="_reactListening"+Math.random().toString(36).slice(2);function Nf(t){if(!t[Ec]){t[Ec]=!0,Gr.forEach(function(s){s!=="selectionchange"&&(IE.has(s)||Sf(s,!1,t),Sf(s,!0,t))});var i=t.nodeType===9?t:t.ownerDocument;i===null||i[Ec]||(i[Ec]=!0,Sf("selectionchange",!1,i))}}function W0(t,i,s,c){switch(zb(i)){case 2:var p=dw;break;case 8:p=fw;break;default:p=Pf}s=p.bind(null,i,s,t),p=void 0,!Gu||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(p=!0),c?p!==void 0?t.addEventListener(i,s,{capture:!0,passive:p}):t.addEventListener(i,s,!0):p!==void 0?t.addEventListener(i,s,{passive:p}):t.addEventListener(i,s,!1)}function zf(t,i,s,c,p){var g=c;if((i&1)===0&&(i&2)===0&&c!==null)e:for(;;){if(c===null)return;var k=c.tag;if(k===3||k===4){var z=c.stateNode.containerInfo;if(z===p)break;if(k===4)for(k=c.return;k!==null;){var I=k.tag;if((I===3||I===4)&&k.stateNode.containerInfo===p)return;k=k.return}for(;z!==null;){if(k=vt(z),k===null)return;if(I=k.tag,I===5||I===6||I===26||I===27){c=g=k;continue e}z=z.parentNode}}c=c.return}Ro(function(){var X=g,se=We(s),ue=[];e:{var W=Ap.get(t);if(W!==void 0){var re=Do,Re=t;switch(t){case"keypress":if(Oo(s)===0)break e;case"keydown":case"keyup":re=R_;break;case"focusin":Re="focus",re=Qu;break;case"focusout":Re="blur",re=Qu;break;case"beforeblur":case"afterblur":re=Qu;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":re=sp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":re=x_;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":re=M_;break;case zp:case Cp:case Tp:re=k_;break;case Rp:re=j_;break;case"scroll":case"scrollend":re=g_;break;case"wheel":re=I_;break;case"copy":case"cut":case"paste":re=E_;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":re=op;break;case"toggle":case"beforetoggle":re=U_}var Ge=(i&4)!==0,Ut=!Ge&&(t==="scroll"||t==="scrollend"),G=Ge?W!==null?W+"Capture":null:W;Ge=[];for(var P=X,Q;P!==null;){var ce=P;if(Q=ce.stateNode,ce=ce.tag,ce!==5&&ce!==26&&ce!==27||Q===null||G===null||(ce=Js(P,G),ce!=null&&Ge.push(Ol(P,ce,Q))),Ut)break;P=P.return}0<Ge.length&&(W=new re(W,Re,null,s,se),ue.push({event:W,listeners:Ge}))}}if((i&7)===0){e:{if(W=t==="mouseover"||t==="pointerover",re=t==="mouseout"||t==="pointerout",W&&s!==je&&(Re=s.relatedTarget||s.fromElement)&&(vt(Re)||Re[ze]))break e;if((re||W)&&(W=se.window===se?se:(W=se.ownerDocument)?W.defaultView||W.parentWindow:window,re?(Re=s.relatedTarget||s.toElement,re=X,Re=Re?vt(Re):null,Re!==null&&(Ut=o(Re),Ge=Re.tag,Re!==Ut||Ge!==5&&Ge!==27&&Ge!==6)&&(Re=null)):(re=null,Re=X),re!==Re)){if(Ge=sp,ce="onMouseLeave",G="onMouseEnter",P="mouse",(t==="pointerout"||t==="pointerover")&&(Ge=op,ce="onPointerLeave",G="onPointerEnter",P="pointer"),Ut=re==null?W:ot(re),Q=Re==null?W:ot(Re),W=new Ge(ce,P+"leave",re,s,se),W.target=Ut,W.relatedTarget=Q,ce=null,vt(se)===X&&(Ge=new Ge(G,P+"enter",Re,s,se),Ge.target=Q,Ge.relatedTarget=Ut,ce=Ge),Ut=ce,re&&Re)t:{for(Ge=BE,G=re,P=Re,Q=0,ce=G;ce;ce=Ge(ce))Q++;ce=0;for(var Pe=P;Pe;Pe=Ge(Pe))ce++;for(;0<Q-ce;)G=Ge(G),Q--;for(;0<ce-Q;)P=Ge(P),ce--;for(;Q--;){if(G===P||P!==null&&G===P.alternate){Ge=G;break t}G=Ge(G),P=Ge(P)}Ge=null}else Ge=null;re!==null&&J0(ue,W,re,Ge,!1),Re!==null&&Ut!==null&&J0(ue,Ut,Re,Ge,!0)}}e:{if(W=X?ot(X):window,re=W.nodeName&&W.nodeName.toLowerCase(),re==="select"||re==="input"&&W.type==="file")var Nt=gp;else if(mp(W))if(bp)Nt=Q_;else{Nt=V_;var Le=K_}else re=W.nodeName,!re||re.toLowerCase()!=="input"||W.type!=="checkbox"&&W.type!=="radio"?X&&Ai(X.elementType)&&(Nt=gp):Nt=Y_;if(Nt&&(Nt=Nt(t,X))){pp(ue,Nt,s,se);break e}Le&&Le(t,W,X),t==="focusout"&&X&&W.type==="number"&&X.memoizedProps.value!=null&&Wa(W,"number",W.value)}switch(Le=X?ot(X):window,t){case"focusin":(mp(Le)||Le.contentEditable==="true")&&(ts=Le,td=X,ll=null);break;case"focusout":ll=td=ts=null;break;case"mousedown":nd=!0;break;case"contextmenu":case"mouseup":case"dragend":nd=!1,Sp(ue,s,se);break;case"selectionchange":if(Z_)break;case"keydown":case"keyup":Sp(ue,s,se)}var tt;if(Zu)e:{switch(t){case"compositionstart":var gt="onCompositionStart";break e;case"compositionend":gt="onCompositionEnd";break e;case"compositionupdate":gt="onCompositionUpdate";break e}gt=void 0}else es?fp(t,s)&&(gt="onCompositionEnd"):t==="keydown"&&s.keyCode===229&&(gt="onCompositionStart");gt&&(cp&&s.locale!=="ko"&&(es||gt!=="onCompositionStart"?gt==="onCompositionEnd"&&es&&(tt=ip()):(Mi=se,Ku="value"in Mi?Mi.value:Mi.textContent,es=!0)),Le=wc(X,gt),0<Le.length&&(gt=new lp(gt,t,null,s,se),ue.push({event:gt,listeners:Le}),tt?gt.data=tt:(tt=hp(s),tt!==null&&(gt.data=tt)))),(tt=P_?H_(t,s):q_(t,s))&&(gt=wc(X,"onBeforeInput"),0<gt.length&&(Le=new lp("onBeforeInput","beforeinput",null,s,se),ue.push({event:Le,listeners:gt}),Le.data=tt)),DE(ue,t,X,s,se)}Z0(ue,i)})}function Ol(t,i,s){return{instance:t,listener:i,currentTarget:s}}function wc(t,i){for(var s=i+"Capture",c=[];t!==null;){var p=t,g=p.stateNode;if(p=p.tag,p!==5&&p!==26&&p!==27||g===null||(p=Js(t,s),p!=null&&c.unshift(Ol(t,p,g)),p=Js(t,i),p!=null&&c.push(Ol(t,p,g))),t.tag===3)return c;t=t.return}return[]}function BE(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function J0(t,i,s,c,p){for(var g=i._reactName,k=[];s!==null&&s!==c;){var z=s,I=z.alternate,X=z.stateNode;if(z=z.tag,I!==null&&I===c)break;z!==5&&z!==26&&z!==27||X===null||(I=X,p?(X=Js(s,g),X!=null&&k.unshift(Ol(s,X,I))):p||(X=Js(s,g),X!=null&&k.push(Ol(s,X,I)))),s=s.return}k.length!==0&&t.push({event:i,listeners:k})}var UE=/\r\n?/g,FE=/\u0000|\uFFFD/g;function eb(t){return(typeof t=="string"?t:""+t).replace(UE,`
49
- `).replace(FE,"")}function tb(t,i){return i=eb(i),eb(t)===i}function Bt(t,i,s,c,p,g){switch(s){case"children":typeof c=="string"?i==="body"||i==="textarea"&&c===""||Ye(t,c):(typeof c=="number"||typeof c=="bigint")&&i!=="body"&&Ye(t,""+c);break;case"className":Rt(t,"class",c);break;case"tabIndex":Rt(t,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":Rt(t,s,c);break;case"style":Mt(t,c,g);break;case"data":if(i!=="object"){Rt(t,"data",c);break}case"src":case"href":if(c===""&&(i!=="a"||s!=="href")){t.removeAttribute(s);break}if(c==null||typeof c=="function"||typeof c=="symbol"||typeof c=="boolean"){t.removeAttribute(s);break}c=Oi(""+c),t.setAttribute(s,c);break;case"action":case"formAction":if(typeof c=="function"){t.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 g=="function"&&(s==="formAction"?(i!=="input"&&Bt(t,i,"name",p.name,p,null),Bt(t,i,"formEncType",p.formEncType,p,null),Bt(t,i,"formMethod",p.formMethod,p,null),Bt(t,i,"formTarget",p.formTarget,p,null)):(Bt(t,i,"encType",p.encType,p,null),Bt(t,i,"method",p.method,p,null),Bt(t,i,"target",p.target,p,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){t.removeAttribute(s);break}c=Oi(""+c),t.setAttribute(s,c);break;case"onClick":c!=null&&(t.onclick=ke);break;case"onScroll":c!=null&&ut("scroll",t);break;case"onScrollEnd":c!=null&&ut("scrollend",t);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(a(61));if(s=c.__html,s!=null){if(p.children!=null)throw Error(a(60));t.innerHTML=s}}break;case"multiple":t.multiple=c&&typeof c!="function"&&typeof c!="symbol";break;case"muted":t.muted=c&&typeof c!="function"&&typeof c!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(c==null||typeof c=="function"||typeof c=="boolean"||typeof c=="symbol"){t.removeAttribute("xlink:href");break}s=Oi(""+c),t.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":c!=null&&typeof c!="function"&&typeof c!="symbol"?t.setAttribute(s,""+c):t.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":c&&typeof c!="function"&&typeof c!="symbol"?t.setAttribute(s,""):t.removeAttribute(s);break;case"capture":case"download":c===!0?t.setAttribute(s,""):c!==!1&&c!=null&&typeof c!="function"&&typeof c!="symbol"?t.setAttribute(s,c):t.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":c!=null&&typeof c!="function"&&typeof c!="symbol"&&!isNaN(c)&&1<=c?t.setAttribute(s,c):t.removeAttribute(s);break;case"rowSpan":case"start":c==null||typeof c=="function"||typeof c=="symbol"||isNaN(c)?t.removeAttribute(s):t.setAttribute(s,c);break;case"popover":ut("beforetoggle",t),ut("toggle",t),Ve(t,"popover",c);break;case"xlinkActuate":ln(t,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":ln(t,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":ln(t,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":ln(t,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":ln(t,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":ln(t,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":ln(t,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":ln(t,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":ln(t,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":Ve(t,"is",c);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=ai.get(s)||s,Ve(t,s,c))}}function Cf(t,i,s,c,p,g){switch(s){case"style":Mt(t,c,g);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(a(61));if(s=c.__html,s!=null){if(p.children!=null)throw Error(a(60));t.innerHTML=s}}break;case"children":typeof c=="string"?Ye(t,c):(typeof c=="number"||typeof c=="bigint")&&Ye(t,""+c);break;case"onScroll":c!=null&&ut("scroll",t);break;case"onScrollEnd":c!=null&&ut("scrollend",t);break;case"onClick":c!=null&&(t.onclick=ke);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ln.hasOwnProperty(s))e:{if(s[0]==="o"&&s[1]==="n"&&(p=s.endsWith("Capture"),i=s.slice(2,p?s.length-7:void 0),g=t[Se]||null,g=g!=null?g[s]:null,typeof g=="function"&&t.removeEventListener(i,g,p),typeof c=="function")){typeof g!="function"&&g!==null&&(s in t?t[s]=null:t.hasAttribute(s)&&t.removeAttribute(s)),t.addEventListener(i,c,p);break e}s in t?t[s]=c:c===!0?t.setAttribute(s,""):Ve(t,s,c)}}}function Mn(t,i,s){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ut("error",t),ut("load",t);var c=!1,p=!1,g;for(g in s)if(s.hasOwnProperty(g)){var k=s[g];if(k!=null)switch(g){case"src":c=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,i));default:Bt(t,i,g,k,s,null)}}p&&Bt(t,i,"srcSet",s.srcSet,s,null),c&&Bt(t,i,"src",s.src,s,null);return;case"input":ut("invalid",t);var z=g=k=p=null,I=null,X=null;for(c in s)if(s.hasOwnProperty(c)){var se=s[c];if(se!=null)switch(c){case"name":p=se;break;case"type":k=se;break;case"checked":I=se;break;case"defaultChecked":X=se;break;case"value":g=se;break;case"defaultValue":z=se;break;case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(a(137,i));break;default:Bt(t,i,c,se,s,null)}}xa(t,g,z,I,X,k,p,!1);return;case"select":ut("invalid",t),c=k=g=null;for(p in s)if(s.hasOwnProperty(p)&&(z=s[p],z!=null))switch(p){case"value":g=z;break;case"defaultValue":k=z;break;case"multiple":c=z;default:Bt(t,i,p,z,s,null)}i=g,s=k,t.multiple=!!c,i!=null?Tn(t,!!c,i,!1):s!=null&&Tn(t,!!c,s,!0);return;case"textarea":ut("invalid",t),g=p=c=null;for(k in s)if(s.hasOwnProperty(k)&&(z=s[k],z!=null))switch(k){case"value":c=z;break;case"defaultValue":p=z;break;case"children":g=z;break;case"dangerouslySetInnerHTML":if(z!=null)throw Error(a(91));break;default:Bt(t,i,k,z,s,null)}Ja(t,c,p,g);return;case"option":for(I in s)if(s.hasOwnProperty(I)&&(c=s[I],c!=null))switch(I){case"selected":t.selected=c&&typeof c!="function"&&typeof c!="symbol";break;default:Bt(t,i,I,c,s,null)}return;case"dialog":ut("beforetoggle",t),ut("toggle",t),ut("cancel",t),ut("close",t);break;case"iframe":case"object":ut("load",t);break;case"video":case"audio":for(c=0;c<Al.length;c++)ut(Al[c],t);break;case"image":ut("error",t),ut("load",t);break;case"details":ut("toggle",t);break;case"embed":case"source":case"link":ut("error",t),ut("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(X in s)if(s.hasOwnProperty(X)&&(c=s[X],c!=null))switch(X){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,i));default:Bt(t,i,X,c,s,null)}return;default:if(Ai(i)){for(se in s)s.hasOwnProperty(se)&&(c=s[se],c!==void 0&&Cf(t,i,se,c,s,void 0));return}}for(z in s)s.hasOwnProperty(z)&&(c=s[z],c!=null&&Bt(t,i,z,c,s,null))}function PE(t,i,s,c){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var p=null,g=null,k=null,z=null,I=null,X=null,se=null;for(re in s){var ue=s[re];if(s.hasOwnProperty(re)&&ue!=null)switch(re){case"checked":break;case"value":break;case"defaultValue":I=ue;default:c.hasOwnProperty(re)||Bt(t,i,re,null,c,ue)}}for(var W in c){var re=c[W];if(ue=s[W],c.hasOwnProperty(W)&&(re!=null||ue!=null))switch(W){case"type":g=re;break;case"name":p=re;break;case"checked":X=re;break;case"defaultChecked":se=re;break;case"value":k=re;break;case"defaultValue":z=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(a(137,i));break;default:re!==ue&&Bt(t,i,W,re,c,ue)}}Xs(t,k,z,I,X,se,g,p);return;case"select":re=k=z=W=null;for(g in s)if(I=s[g],s.hasOwnProperty(g)&&I!=null)switch(g){case"value":break;case"multiple":re=I;default:c.hasOwnProperty(g)||Bt(t,i,g,null,c,I)}for(p in c)if(g=c[p],I=s[p],c.hasOwnProperty(p)&&(g!=null||I!=null))switch(p){case"value":W=g;break;case"defaultValue":z=g;break;case"multiple":k=g;default:g!==I&&Bt(t,i,p,g,c,I)}i=z,s=k,c=re,W!=null?Tn(t,!!s,W,!1):!!c!=!!s&&(i!=null?Tn(t,!!s,i,!0):Tn(t,!!s,s?[]:"",!1));return;case"textarea":re=W=null;for(z in s)if(p=s[z],s.hasOwnProperty(z)&&p!=null&&!c.hasOwnProperty(z))switch(z){case"value":break;case"children":break;default:Bt(t,i,z,null,c,p)}for(k in c)if(p=c[k],g=s[k],c.hasOwnProperty(k)&&(p!=null||g!=null))switch(k){case"value":W=p;break;case"defaultValue":re=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(a(91));break;default:p!==g&&Bt(t,i,k,p,c,g)}Co(t,W,re);return;case"option":for(var Re in s)if(W=s[Re],s.hasOwnProperty(Re)&&W!=null&&!c.hasOwnProperty(Re))switch(Re){case"selected":t.selected=!1;break;default:Bt(t,i,Re,null,c,W)}for(I in c)if(W=c[I],re=s[I],c.hasOwnProperty(I)&&W!==re&&(W!=null||re!=null))switch(I){case"selected":t.selected=W&&typeof W!="function"&&typeof W!="symbol";break;default:Bt(t,i,I,W,c,re)}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 Ge in s)W=s[Ge],s.hasOwnProperty(Ge)&&W!=null&&!c.hasOwnProperty(Ge)&&Bt(t,i,Ge,null,c,W);for(X in c)if(W=c[X],re=s[X],c.hasOwnProperty(X)&&W!==re&&(W!=null||re!=null))switch(X){case"children":case"dangerouslySetInnerHTML":if(W!=null)throw Error(a(137,i));break;default:Bt(t,i,X,W,c,re)}return;default:if(Ai(i)){for(var Ut in s)W=s[Ut],s.hasOwnProperty(Ut)&&W!==void 0&&!c.hasOwnProperty(Ut)&&Cf(t,i,Ut,void 0,c,W);for(se in c)W=c[se],re=s[se],!c.hasOwnProperty(se)||W===re||W===void 0&&re===void 0||Cf(t,i,se,W,c,re);return}}for(var G in s)W=s[G],s.hasOwnProperty(G)&&W!=null&&!c.hasOwnProperty(G)&&Bt(t,i,G,null,c,W);for(ue in c)W=c[ue],re=s[ue],!c.hasOwnProperty(ue)||W===re||W==null&&re==null||Bt(t,i,ue,W,c,re)}function nb(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function HE(){if(typeof performance.getEntriesByType=="function"){for(var t=0,i=0,s=performance.getEntriesByType("resource"),c=0;c<s.length;c++){var p=s[c],g=p.transferSize,k=p.initiatorType,z=p.duration;if(g&&z&&nb(k)){for(k=0,z=p.responseEnd,c+=1;c<s.length;c++){var I=s[c],X=I.startTime;if(X>z)break;var se=I.transferSize,ue=I.initiatorType;se&&nb(ue)&&(I=I.responseEnd,k+=se*(I<z?1:(z-X)/(I-X)))}if(--c,i+=8*(g+k)/(p.duration/1e3),t++,10<t)break}}if(0<t)return i/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var Tf=null,Rf=null;function Sc(t){return t.nodeType===9?t:t.ownerDocument}function rb(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function ib(t,i){if(t===0)switch(i){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&i==="foreignObject"?0:t}function Af(t,i){return t==="textarea"||t==="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 Of=null;function qE(){var t=window.event;return t&&t.type==="popstate"?t===Of?!1:(Of=t,!0):(Of=null,!1)}var ab=typeof setTimeout=="function"?setTimeout:void 0,$E=typeof clearTimeout=="function"?clearTimeout:void 0,sb=typeof Promise=="function"?Promise:void 0,GE=typeof queueMicrotask=="function"?queueMicrotask:typeof sb<"u"?function(t){return sb.resolve(null).then(t).catch(KE)}:ab;function KE(t){setTimeout(function(){throw t})}function Xi(t){return t==="head"}function lb(t,i){var s=i,c=0;do{var p=s.nextSibling;if(t.removeChild(s),p&&p.nodeType===8)if(s=p.data,s==="/$"||s==="/&"){if(c===0){t.removeChild(p),Cs(i);return}c--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")c++;else if(s==="html")Ml(t.ownerDocument.documentElement);else if(s==="head"){s=t.ownerDocument.head,Ml(s);for(var g=s.firstChild;g;){var k=g.nextSibling,z=g.nodeName;g[rt]||z==="SCRIPT"||z==="STYLE"||z==="LINK"&&g.rel.toLowerCase()==="stylesheet"||s.removeChild(g),g=k}}else s==="body"&&Ml(t.ownerDocument.body);s=p}while(s);Cs(i)}function ob(t,i){var s=t;t=0;do{var c=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||""),c&&c.nodeType===8)if(s=c.data,s==="/$"){if(t===0)break;t--}else s!=="$"&&s!=="$?"&&s!=="$~"&&s!=="$!"||t++;s=c}while(s)}function Mf(t){var i=t.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":Mf(s),Ot(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}t.removeChild(s)}}function VE(t,i,s,c){for(;t.nodeType===1;){var p=s;if(t.nodeName.toLowerCase()!==i.toLowerCase()){if(!c&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(c){if(!t[rt])switch(i){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(g=t.getAttribute("rel"),g==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(g!==p.rel||t.getAttribute("href")!==(p.href==null||p.href===""?null:p.href)||t.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin)||t.getAttribute("title")!==(p.title==null?null:p.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(g=t.getAttribute("src"),(g!==(p.src==null?null:p.src)||t.getAttribute("type")!==(p.type==null?null:p.type)||t.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin))&&g&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(i==="input"&&t.type==="hidden"){var g=p.name==null?null:""+p.name;if(p.type==="hidden"&&t.getAttribute("name")===g)return t}else return t;if(t=Nr(t.nextSibling),t===null)break}return null}function YE(t,i,s){if(i==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!s||(t=Nr(t.nextSibling),t===null))return null;return t}function cb(t,i){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!i||(t=Nr(t.nextSibling),t===null))return null;return t}function Df(t){return t.data==="$?"||t.data==="$~"}function jf(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function QE(t,i){var s=t.ownerDocument;if(t.data==="$~")t._reactRetry=i;else if(t.data!=="$?"||s.readyState!=="loading")i();else{var c=function(){i(),s.removeEventListener("DOMContentLoaded",c)};s.addEventListener("DOMContentLoaded",c),t._reactRetry=c}}function Nr(t){for(;t!=null;t=t.nextSibling){var i=t.nodeType;if(i===1||i===3)break;if(i===8){if(i=t.data,i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"||i==="F!"||i==="F")break;if(i==="/$"||i==="/&")return null}}return t}var Lf=null;function ub(t){t=t.nextSibling;for(var i=0;t;){if(t.nodeType===8){var s=t.data;if(s==="/$"||s==="/&"){if(i===0)return Nr(t.nextSibling);i--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||i++}t=t.nextSibling}return null}function db(t){t=t.previousSibling;for(var i=0;t;){if(t.nodeType===8){var s=t.data;if(s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"){if(i===0)return t;i--}else s!=="/$"&&s!=="/&"||i++}t=t.previousSibling}return null}function fb(t,i,s){switch(i=Sc(s),t){case"html":if(t=i.documentElement,!t)throw Error(a(452));return t;case"head":if(t=i.head,!t)throw Error(a(453));return t;case"body":if(t=i.body,!t)throw Error(a(454));return t;default:throw Error(a(451))}}function Ml(t){for(var i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Ot(t)}var zr=new Map,hb=new Set;function Nc(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var ki=Y.d;Y.d={f:XE,r:ZE,D:WE,C:JE,L:ew,m:tw,X:rw,S:nw,M:iw};function XE(){var t=ki.f(),i=bc();return t||i}function ZE(t){var i=Yt(t);i!==null&&i.tag===5&&i.type==="form"?Rg(i):ki.r(t)}var Ss=typeof document>"u"?null:document;function mb(t,i,s){var c=Ss;if(c&&typeof i=="string"&&i){var p=Yn(i);p='link[rel="'+t+'"][href="'+p+'"]',typeof s=="string"&&(p+='[crossorigin="'+s+'"]'),hb.has(p)||(hb.add(p),t={rel:t,crossOrigin:s,href:i},c.querySelector(p)===null&&(i=c.createElement("link"),Mn(i,"link",t),Lt(i),c.head.appendChild(i)))}}function WE(t){ki.D(t),mb("dns-prefetch",t,null)}function JE(t,i){ki.C(t,i),mb("preconnect",t,i)}function ew(t,i,s){ki.L(t,i,s);var c=Ss;if(c&&t&&i){var p='link[rel="preload"][as="'+Yn(i)+'"]';i==="image"&&s&&s.imageSrcSet?(p+='[imagesrcset="'+Yn(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(p+='[imagesizes="'+Yn(s.imageSizes)+'"]')):p+='[href="'+Yn(t)+'"]';var g=p;switch(i){case"style":g=Ns(t);break;case"script":g=zs(t)}zr.has(g)||(t=x({rel:"preload",href:i==="image"&&s&&s.imageSrcSet?void 0:t,as:i},s),zr.set(g,t),c.querySelector(p)!==null||i==="style"&&c.querySelector(Dl(g))||i==="script"&&c.querySelector(jl(g))||(i=c.createElement("link"),Mn(i,"link",t),Lt(i),c.head.appendChild(i)))}}function tw(t,i){ki.m(t,i);var s=Ss;if(s&&t){var c=i&&typeof i.as=="string"?i.as:"script",p='link[rel="modulepreload"][as="'+Yn(c)+'"][href="'+Yn(t)+'"]',g=p;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":g=zs(t)}if(!zr.has(g)&&(t=x({rel:"modulepreload",href:t},i),zr.set(g,t),s.querySelector(p)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(jl(g)))return}c=s.createElement("link"),Mn(c,"link",t),Lt(c),s.head.appendChild(c)}}}function nw(t,i,s){ki.S(t,i,s);var c=Ss;if(c&&t){var p=sn(c).hoistableStyles,g=Ns(t);i=i||"default";var k=p.get(g);if(!k){var z={loading:0,preload:null};if(k=c.querySelector(Dl(g)))z.loading=5;else{t=x({rel:"stylesheet",href:t,"data-precedence":i},s),(s=zr.get(g))&&If(t,s);var I=k=c.createElement("link");Lt(I),Mn(I,"link",t),I._p=new Promise(function(X,se){I.onload=X,I.onerror=se}),I.addEventListener("load",function(){z.loading|=1}),I.addEventListener("error",function(){z.loading|=2}),z.loading|=4,zc(k,i,c)}k={type:"stylesheet",instance:k,count:1,state:z},p.set(g,k)}}}function rw(t,i){ki.X(t,i);var s=Ss;if(s&&t){var c=sn(s).hoistableScripts,p=zs(t),g=c.get(p);g||(g=s.querySelector(jl(p)),g||(t=x({src:t,async:!0},i),(i=zr.get(p))&&Bf(t,i),g=s.createElement("script"),Lt(g),Mn(g,"link",t),s.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},c.set(p,g))}}function iw(t,i){ki.M(t,i);var s=Ss;if(s&&t){var c=sn(s).hoistableScripts,p=zs(t),g=c.get(p);g||(g=s.querySelector(jl(p)),g||(t=x({src:t,async:!0,type:"module"},i),(i=zr.get(p))&&Bf(t,i),g=s.createElement("script"),Lt(g),Mn(g,"link",t),s.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},c.set(p,g))}}function pb(t,i,s,c){var p=(p=xe.current)?Nc(p):null;if(!p)throw Error(a(446));switch(t){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(i=Ns(s.href),s=sn(p).hoistableStyles,c=s.get(i),c||(c={type:"style",instance:null,count:0,state:null},s.set(i,c)),c):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){t=Ns(s.href);var g=sn(p).hoistableStyles,k=g.get(t);if(k||(p=p.ownerDocument||p,k={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},g.set(t,k),(g=p.querySelector(Dl(t)))&&!g._p&&(k.instance=g,k.state.loading=5),zr.has(t)||(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(t,s),g||aw(p,t,s,k.state))),i&&c===null)throw Error(a(528,""));return k}if(i&&c!==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=zs(s),s=sn(p).hoistableScripts,c=s.get(i),c||(c={type:"script",instance:null,count:0,state:null},s.set(i,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,t))}}function Ns(t){return'href="'+Yn(t)+'"'}function Dl(t){return'link[rel="stylesheet"]['+t+"]"}function gb(t){return x({},t,{"data-precedence":t.precedence,precedence:null})}function aw(t,i,s,c){t.querySelector('link[rel="preload"][as="style"]['+i+"]")?c.loading=1:(i=t.createElement("link"),c.preload=i,i.addEventListener("load",function(){return c.loading|=1}),i.addEventListener("error",function(){return c.loading|=2}),Mn(i,"link",s),Lt(i),t.head.appendChild(i))}function zs(t){return'[src="'+Yn(t)+'"]'}function jl(t){return"script[async]"+t}function bb(t,i,s){if(i.count++,i.instance===null)switch(i.type){case"style":var c=t.querySelector('style[data-href~="'+Yn(s.href)+'"]');if(c)return i.instance=c,Lt(c),c;var p=x({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return c=(t.ownerDocument||t).createElement("style"),Lt(c),Mn(c,"style",p),zc(c,s.precedence,t),i.instance=c;case"stylesheet":p=Ns(s.href);var g=t.querySelector(Dl(p));if(g)return i.state.loading|=4,i.instance=g,Lt(g),g;c=gb(s),(p=zr.get(p))&&If(c,p),g=(t.ownerDocument||t).createElement("link"),Lt(g);var k=g;return k._p=new Promise(function(z,I){k.onload=z,k.onerror=I}),Mn(g,"link",c),i.state.loading|=4,zc(g,s.precedence,t),i.instance=g;case"script":return g=zs(s.src),(p=t.querySelector(jl(g)))?(i.instance=p,Lt(p),p):(c=s,(p=zr.get(g))&&(c=x({},s),Bf(c,p)),t=t.ownerDocument||t,p=t.createElement("script"),Lt(p),Mn(p,"link",c),t.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&&(c=i.instance,i.state.loading|=4,zc(c,s.precedence,t));return i.instance}function zc(t,i,s){for(var c=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=c.length?c[c.length-1]:null,g=p,k=0;k<c.length;k++){var z=c[k];if(z.dataset.precedence===i)g=z;else if(g!==p)break}g?g.parentNode.insertBefore(t,g.nextSibling):(i=s.nodeType===9?s.head:s,i.insertBefore(t,i.firstChild))}function If(t,i){t.crossOrigin==null&&(t.crossOrigin=i.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=i.referrerPolicy),t.title==null&&(t.title=i.title)}function Bf(t,i){t.crossOrigin==null&&(t.crossOrigin=i.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=i.referrerPolicy),t.integrity==null&&(t.integrity=i.integrity)}var Cc=null;function xb(t,i,s){if(Cc===null){var c=new Map,p=Cc=new Map;p.set(s,c)}else p=Cc,c=p.get(s),c||(c=new Map,p.set(s,c));if(c.has(t))return c;for(c.set(t,null),s=s.getElementsByTagName(t),p=0;p<s.length;p++){var g=s[p];if(!(g[rt]||g[ye]||t==="link"&&g.getAttribute("rel")==="stylesheet")&&g.namespaceURI!=="http://www.w3.org/2000/svg"){var k=g.getAttribute(i)||"";k=t+k;var z=c.get(k);z?z.push(g):c.set(k,[g])}}return c}function yb(t,i,s){t=t.ownerDocument||t,t.head.insertBefore(s,i==="title"?t.querySelector("head > title"):null)}function sw(t,i,s){if(s===1||i.itemProp!=null)return!1;switch(t){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 t=i.disabled,typeof i.precedence=="string"&&t==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 vb(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function lw(t,i,s,c){if(s.type==="stylesheet"&&(typeof c.media!="string"||matchMedia(c.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var p=Ns(c.href),g=i.querySelector(Dl(p));if(g){i=g._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(t.count++,t=Tc.bind(t),i.then(t,t)),s.state.loading|=4,s.instance=g,Lt(g);return}g=i.ownerDocument||i,c=gb(c),(p=zr.get(p))&&If(c,p),g=g.createElement("link"),Lt(g);var k=g;k._p=new Promise(function(z,I){k.onload=z,k.onerror=I}),Mn(g,"link",c),s.instance=g}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(s,i),(i=s.state.preload)&&(s.state.loading&3)===0&&(t.count++,s=Tc.bind(t),i.addEventListener("load",s),i.addEventListener("error",s))}}var Uf=0;function ow(t,i){return t.stylesheets&&t.count===0&&Ac(t,t.stylesheets),0<t.count||0<t.imgCount?function(s){var c=setTimeout(function(){if(t.stylesheets&&Ac(t,t.stylesheets),t.unsuspend){var g=t.unsuspend;t.unsuspend=null,g()}},6e4+i);0<t.imgBytes&&Uf===0&&(Uf=62500*HE());var p=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&Ac(t,t.stylesheets),t.unsuspend)){var g=t.unsuspend;t.unsuspend=null,g()}},(t.imgBytes>Uf?50:800)+i);return t.unsuspend=s,function(){t.unsuspend=null,clearTimeout(c),clearTimeout(p)}}:null}function Tc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ac(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var Rc=null;function Ac(t,i){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Rc=new Map,i.forEach(cw,t),Rc=null,Tc.call(t))}function cw(t,i){if(!(i.state.loading&4)){var s=Rc.get(t);if(s)var c=s.get(null);else{s=new Map,Rc.set(t,s);for(var p=t.querySelectorAll("link[data-precedence],style[data-precedence]"),g=0;g<p.length;g++){var k=p[g];(k.nodeName==="LINK"||k.getAttribute("media")!=="not all")&&(s.set(k.dataset.precedence,k),c=k)}c&&s.set(null,c)}p=i.instance,k=p.getAttribute("data-precedence"),g=s.get(k)||c,g===c&&s.set(null,p),s.set(k,p),this.count++,c=Tc.bind(this),p.addEventListener("load",c),p.addEventListener("error",c),g?g.parentNode.insertBefore(p,g.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(p,t.firstChild)),i.state.loading|=4}}var Ll={$$typeof:R,Provider:null,Consumer:null,_currentValue:V,_currentValue2:V,_threadCount:0};function uw(t,i,s,c,p,g,k,z,I){this.tag=1,this.containerInfo=t,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=Tt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Tt(0),this.hiddenUpdates=Tt(null),this.identifierPrefix=c,this.onUncaughtError=p,this.onCaughtError=g,this.onRecoverableError=k,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=I,this.incompleteTransitions=new Map}function kb(t,i,s,c,p,g,k,z,I,X,se,ue){return t=new uw(t,i,s,k,I,X,se,ue,z),i=1,g===!0&&(i|=24),g=lr(3,null,null,i),t.current=g,g.stateNode=t,i=bd(),i.refCount++,t.pooledCache=i,i.refCount++,g.memoizedState={element:c,isDehydrated:s,cache:i},kd(g),t}function _b(t){return t?(t=is,t):is}function Eb(t,i,s,c,p,g){p=_b(p),c.context===null?c.context=p:c.pendingContext=p,c=Ui(i),c.payload={element:s},g=g===void 0?null:g,g!==null&&(c.callback=g),s=Fi(t,c,i),s!==null&&(er(s,t,i),ml(s,t,i))}function wb(t,i){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var s=t.retryLane;t.retryLane=s!==0&&s<i?s:i}}function Ff(t,i){wb(t,i),(t=t.alternate)&&wb(t,i)}function Sb(t){if(t.tag===13||t.tag===31){var i=_a(t,67108864);i!==null&&er(i,t,67108864),Ff(t,67108864)}}function Nb(t){if(t.tag===13||t.tag===31){var i=fr();i=F(i);var s=_a(t,i);s!==null&&er(s,t,i),Ff(t,i)}}var Oc=!0;function dw(t,i,s,c){var p=L.T;L.T=null;var g=Y.p;try{Y.p=2,Pf(t,i,s,c)}finally{Y.p=g,L.T=p}}function fw(t,i,s,c){var p=L.T;L.T=null;var g=Y.p;try{Y.p=8,Pf(t,i,s,c)}finally{Y.p=g,L.T=p}}function Pf(t,i,s,c){if(Oc){var p=Hf(c);if(p===null)zf(t,i,c,Mc,s),Cb(t,c);else if(mw(p,t,i,s,c))c.stopPropagation();else if(Cb(t,c),i&4&&-1<hw.indexOf(t)){for(;p!==null;){var g=Yt(p);if(g!==null)switch(g.tag){case 3:if(g=g.stateNode,g.current.memoizedState.isDehydrated){var k=zn(g.pendingLanes);if(k!==0){var z=g;for(z.pendingLanes|=2,z.entangledLanes|=2;k;){var I=1<<31-wt(k);z.entanglements[1]|=I,k&=~I}Qr(g),(Ct&6)===0&&(pc=Vt()+500,Rl(0))}}break;case 31:case 13:z=_a(g,2),z!==null&&er(z,g,2),bc(),Ff(g,2)}if(g=Hf(c),g===null&&zf(t,i,c,Mc,s),g===p)break;p=g}p!==null&&c.stopPropagation()}else zf(t,i,c,null,s)}}function Hf(t){return t=We(t),qf(t)}var Mc=null;function qf(t){if(Mc=null,t=vt(t),t!==null){var i=o(t);if(i===null)t=null;else{var s=i.tag;if(s===13){if(t=u(i),t!==null)return t;t=null}else if(s===31){if(t=d(i),t!==null)return t;t=null}else if(s===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;t=null}else i!==t&&(t=null)}}return Mc=t,null}function zb(t){switch(t){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(Vn()){case ie:return 2;case be:return 8;case Fe:case Qe:return 32;case Je:return 268435456;default:return 32}default:return 32}}var $f=!1,Zi=null,Wi=null,Ji=null,Il=new Map,Bl=new Map,ea=[],hw="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 Cb(t,i){switch(t){case"focusin":case"focusout":Zi=null;break;case"dragenter":case"dragleave":Wi=null;break;case"mouseover":case"mouseout":Ji=null;break;case"pointerover":case"pointerout":Il.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":Bl.delete(i.pointerId)}}function Ul(t,i,s,c,p,g){return t===null||t.nativeEvent!==g?(t={blockedOn:i,domEventName:s,eventSystemFlags:c,nativeEvent:g,targetContainers:[p]},i!==null&&(i=Yt(i),i!==null&&Sb(i)),t):(t.eventSystemFlags|=c,i=t.targetContainers,p!==null&&i.indexOf(p)===-1&&i.push(p),t)}function mw(t,i,s,c,p){switch(i){case"focusin":return Zi=Ul(Zi,t,i,s,c,p),!0;case"dragenter":return Wi=Ul(Wi,t,i,s,c,p),!0;case"mouseover":return Ji=Ul(Ji,t,i,s,c,p),!0;case"pointerover":var g=p.pointerId;return Il.set(g,Ul(Il.get(g)||null,t,i,s,c,p)),!0;case"gotpointercapture":return g=p.pointerId,Bl.set(g,Ul(Bl.get(g)||null,t,i,s,c,p)),!0}return!1}function Tb(t){var i=vt(t.target);if(i!==null){var s=o(i);if(s!==null){if(i=s.tag,i===13){if(i=u(s),i!==null){t.blockedOn=i,me(t.priority,function(){Nb(s)});return}}else if(i===31){if(i=d(s),i!==null){t.blockedOn=i,me(t.priority,function(){Nb(s)});return}}else if(i===3&&s.stateNode.current.memoizedState.isDehydrated){t.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Dc(t){if(t.blockedOn!==null)return!1;for(var i=t.targetContainers;0<i.length;){var s=Hf(t.nativeEvent);if(s===null){s=t.nativeEvent;var c=new s.constructor(s.type,s);je=c,s.target.dispatchEvent(c),je=null}else return i=Yt(s),i!==null&&Sb(i),t.blockedOn=s,!1;i.shift()}return!0}function Rb(t,i,s){Dc(t)&&s.delete(i)}function pw(){$f=!1,Zi!==null&&Dc(Zi)&&(Zi=null),Wi!==null&&Dc(Wi)&&(Wi=null),Ji!==null&&Dc(Ji)&&(Ji=null),Il.forEach(Rb),Bl.forEach(Rb)}function jc(t,i){t.blockedOn===i&&(t.blockedOn=null,$f||($f=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,pw)))}var Lc=null;function Ab(t){Lc!==t&&(Lc=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Lc===t&&(Lc=null);for(var i=0;i<t.length;i+=3){var s=t[i],c=t[i+1],p=t[i+2];if(typeof c!="function"){if(qf(c||s)===null)continue;break}var g=Yt(s);g!==null&&(t.splice(i,3),i-=3,Pd(g,{pending:!0,data:p,method:s.method,action:c},c,p))}}))}function Cs(t){function i(I){return jc(I,t)}Zi!==null&&jc(Zi,t),Wi!==null&&jc(Wi,t),Ji!==null&&jc(Ji,t),Il.forEach(i),Bl.forEach(i);for(var s=0;s<ea.length;s++){var c=ea[s];c.blockedOn===t&&(c.blockedOn=null)}for(;0<ea.length&&(s=ea[0],s.blockedOn===null);)Tb(s),s.blockedOn===null&&ea.shift();if(s=(t.ownerDocument||t).$$reactFormReplay,s!=null)for(c=0;c<s.length;c+=3){var p=s[c],g=s[c+1],k=p[Se]||null;if(typeof g=="function")k||Ab(s);else if(k){var z=null;if(g&&g.hasAttribute("formAction")){if(p=g,k=g[Se]||null)z=k.formAction;else if(qf(p)!==null)continue}else z=k.action;typeof z=="function"?s[c+1]=z:(s.splice(c,3),c-=3),Ab(s)}}}function Ob(){function t(g){g.canIntercept&&g.info==="react-transition"&&g.intercept({handler:function(){return new Promise(function(k){return p=k})},focusReset:"manual",scroll:"manual"})}function i(){p!==null&&(p(),p=null),c||setTimeout(s,20)}function s(){if(!c&&!navigation.transition){var g=navigation.currentEntry;g&&g.url!=null&&navigation.navigate(g.url,{state:g.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var c=!1,p=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",i),navigation.addEventListener("navigateerror",i),setTimeout(s,100),function(){c=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",i),navigation.removeEventListener("navigateerror",i),p!==null&&(p(),p=null)}}}function Gf(t){this._internalRoot=t}Ic.prototype.render=Gf.prototype.render=function(t){var i=this._internalRoot;if(i===null)throw Error(a(409));var s=i.current,c=fr();Eb(s,c,t,i,null,null)},Ic.prototype.unmount=Gf.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var i=t.containerInfo;Eb(t.current,2,null,t,null,null),bc(),i[ze]=null}};function Ic(t){this._internalRoot=t}Ic.prototype.unstable_scheduleHydration=function(t){if(t){var i=de();t={blockedOn:null,target:t,priority:i};for(var s=0;s<ea.length&&i!==0&&i<ea[s].priority;s++);ea.splice(s,0,t),s===0&&Tb(t)}};var Mb=n.version;if(Mb!=="19.2.4")throw Error(a(527,Mb,"19.2.4"));Y.findDOMNode=function(t){var i=t._reactInternals;if(i===void 0)throw typeof t.render=="function"?Error(a(188)):(t=Object.keys(t).join(","),Error(a(268,t)));return t=m(i),t=t!==null?b(t):null,t=t===null?null:t.stateNode,t};var gw={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:L,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Bc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Bc.isDisabled&&Bc.supportsFiber)try{an=Bc.inject(gw),Jt=Bc}catch{}}return Pl.createRoot=function(t,i){if(!l(t))throw Error(a(299));var s=!1,c="",p=Fg,g=Pg,k=Hg;return i!=null&&(i.unstable_strictMode===!0&&(s=!0),i.identifierPrefix!==void 0&&(c=i.identifierPrefix),i.onUncaughtError!==void 0&&(p=i.onUncaughtError),i.onCaughtError!==void 0&&(g=i.onCaughtError),i.onRecoverableError!==void 0&&(k=i.onRecoverableError)),i=kb(t,1,!1,null,null,s,c,null,p,g,k,Ob),t[ze]=i.current,Nf(t),new Gf(i)},Pl.hydrateRoot=function(t,i,s){if(!l(t))throw Error(a(299));var c=!1,p="",g=Fg,k=Pg,z=Hg,I=null;return s!=null&&(s.unstable_strictMode===!0&&(c=!0),s.identifierPrefix!==void 0&&(p=s.identifierPrefix),s.onUncaughtError!==void 0&&(g=s.onUncaughtError),s.onCaughtError!==void 0&&(k=s.onCaughtError),s.onRecoverableError!==void 0&&(z=s.onRecoverableError),s.formState!==void 0&&(I=s.formState)),i=kb(t,1,!0,i,s??null,c,p,I,g,k,z,Ob),i.context=_b(null),s=i.current,c=fr(),c=F(c),p=Ui(c),p.callback=null,Fi(s,p,c),s=c,i.current.lanes=s,St(i,s),Qr(i),t[ze]=i.current,Nf(t),new Ic(i)},Pl.version="19.2.4",Pl}var qb;function Cw(){if(qb)return Yf.exports;qb=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(n){console.error(n)}}return e(),Yf.exports=zw(),Yf.exports}var Tw=Cw();/**
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 rv=e=>{throw TypeError(e)},Rw=(e,n,r)=>n.has(e)||rv("Cannot "+r),Wf=(e,n,r)=>(Rw(e,n,"read from private field"),r?r.call(e):n.get(e)),Aw=(e,n,r)=>n.has(e)?rv("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(e):n.set(e,r),$b="popstate";function Gb(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function Ow(e={}){function n(a,l){let o=l.state?.masked,{pathname:u,search:d,hash:h}=o||a.location;return oo("",{pathname:u,search:d,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:Wr(l)}return Dw(n,r,null,e)}function at(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function yn(e,n){if(!e){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function Mw(){return Math.random().toString(36).substring(2,10)}function Kb(e,n){return{usr:e.state,key:e.key,idx:n,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function oo(e,n,r=null,a,l){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof n=="string"?zi(n):n,state:r,key:n&&n.key||a||Mw(),unstable_mask:l}}function Wr({pathname:e="/",search:n="",hash:r=""}){return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function zi(e){let n={};if(e){let r=e.indexOf("#");r>=0&&(n.hash=e.substring(r),e=e.substring(0,r));let a=e.indexOf("?");a>=0&&(n.search=e.substring(a),e=e.substring(0,a)),e&&(n.pathname=e)}return n}function Dw(e,n,r,a={}){let{window:l=document.defaultView,v5Compat:o=!1}=a,u=l.history,d="POP",h=null,m=b();m==null&&(m=0,u.replaceState({...u.state,idx:m},""));function b(){return(u.state||{idx:null}).idx}function x(){d="POP";let w=b(),N=w==null?null:w-m;m=w,h&&h({action:d,location:E.location,delta:N})}function y(w,N){d="PUSH";let M=Gb(w)?w:oo(E.location,w,N);m=b()+1;let R=Kb(M,m),U=E.createHref(M.unstable_mask||M);try{u.pushState(R,"",U)}catch($){if($ instanceof DOMException&&$.name==="DataCloneError")throw $;l.location.assign(U)}o&&h&&h({action:d,location:E.location,delta:1})}function v(w,N){d="REPLACE";let M=Gb(w)?w:oo(E.location,w,N);m=b();let R=Kb(M,m),U=E.createHref(M.unstable_mask||M);u.replaceState(R,"",U),o&&h&&h({action:d,location:E.location,delta:0})}function _(w){return iv(w)}let E={get action(){return d},get location(){return e(l,u)},listen(w){if(h)throw new Error("A history only accepts one active listener");return l.addEventListener($b,x),h=w,()=>{l.removeEventListener($b,x),h=null}},createHref(w){return n(l,w)},createURL:_,encodeLocation(w){let N=_(w);return{pathname:N.pathname,search:N.search,hash:N.hash}},push:y,replace:v,go(w){return u.go(w)}};return E}function iv(e,n=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),at(r,"No window.location.(origin|href) available to create URL");let a=typeof e=="string"?e:Wr(e);return a=a.replace(/ $/,"%20"),!n&&a.startsWith("//")&&(a=r+a),new URL(a,r)}var Wl,Vb=class{constructor(e){if(Aw(this,Wl,new Map),e)for(let[n,r]of e)this.set(n,r)}get(e){if(Wf(this,Wl).has(e))return Wf(this,Wl).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw new Error("No value found for context")}set(e,n){Wf(this,Wl).set(e,n)}};Wl=new WeakMap;var jw=new Set(["lazy","caseSensitive","path","id","index","children"]);function Lw(e){return jw.has(e)}var Iw=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function Bw(e){return Iw.has(e)}function Uw(e){return e.index===!0}function co(e,n,r=[],a={},l=!1){return e.map((o,u)=>{let d=[...r,String(u)],h=typeof o.id=="string"?o.id:d.join("-");if(at(o.index!==!0||!o.children,"Cannot specify children on an index route"),at(l||!a[h],`Found a route id collision on id "${h}". Route id's must be globally unique within Data Router usages`),Uw(o)){let m={...o,id:h};return a[h]=Yb(m,n(m)),m}else{let m={...o,id:h,children:void 0};return a[h]=Yb(m,n(m)),o.children&&(m.children=co(o.children,n,d,a,l)),m}})}function Yb(e,n){return Object.assign(e,{...n,...typeof n.lazy=="object"&&n.lazy!=null?{lazy:{...e.lazy,...n.lazy}}:{}})}function aa(e,n,r="/"){return Jl(e,n,r,!1)}function Jl(e,n,r,a){let l=typeof n=="string"?zi(n):n,o=Or(l.pathname||"/",r);if(o==null)return null;let u=av(e);Pw(u);let d=null;for(let h=0;d==null&&h<u.length;++h){let m=Ww(o);d=Xw(u[h],m,a)}return d}function Fw(e,n){let{route:r,pathname:a,params:l}=e;return{id:r.id,pathname:a,params:l,data:n[r.id],loaderData:n[r.id],handle:r.handle}}function av(e,n=[],r=[],a="",l=!1){let o=(u,d,h=l,m)=>{let b={relativePath:m===void 0?u.path||"":m,caseSensitive:u.caseSensitive===!0,childrenIndex:d,route:u};if(b.relativePath.startsWith("/")){if(!b.relativePath.startsWith(a)&&h)return;at(b.relativePath.startsWith(a),`Absolute route path "${b.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),b.relativePath=b.relativePath.slice(a.length)}let x=Ur([a,b.relativePath]),y=r.concat(b);u.children&&u.children.length>0&&(at(u.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${x}".`),av(u.children,n,y,x,h)),!(u.path==null&&!u.index)&&n.push({path:x,score:Yw(x,u.index),routesMeta:y})};return e.forEach((u,d)=>{if(u.path===""||!u.path?.includes("?"))o(u,d);else for(let h of sv(u.path))o(u,d,!0,h)}),n}function sv(e){let n=e.split("/");if(n.length===0)return[];let[r,...a]=n,l=r.endsWith("?"),o=r.replace(/\?$/,"");if(a.length===0)return l?[o,""]:[o];let u=sv(a.join("/")),d=[];return d.push(...u.map(h=>h===""?o:[o,h].join("/"))),l&&d.push(...u),d.map(h=>e.startsWith("/")&&h===""?"/":h)}function Pw(e){e.sort((n,r)=>n.score!==r.score?r.score-n.score:Qw(n.routesMeta.map(a=>a.childrenIndex),r.routesMeta.map(a=>a.childrenIndex)))}var Hw=/^:[\w-]+$/,qw=3,$w=2,Gw=1,Kw=10,Vw=-2,Qb=e=>e==="*";function Yw(e,n){let r=e.split("/"),a=r.length;return r.some(Qb)&&(a+=Vw),n&&(a+=$w),r.filter(l=>!Qb(l)).reduce((l,o)=>l+(Hw.test(o)?qw:o===""?Gw:Kw),a)}function Qw(e,n){return e.length===n.length&&e.slice(0,-1).every((a,l)=>a===n[l])?e[e.length-1]-n[n.length-1]:0}function Xw(e,n,r=!1){let{routesMeta:a}=e,l={},o="/",u=[];for(let d=0;d<a.length;++d){let h=a[d],m=d===a.length-1,b=o==="/"?n:n.slice(o.length)||"/",x=fu({path:h.relativePath,caseSensitive:h.caseSensitive,end:m},b),y=h.route;if(!x&&m&&r&&!a[a.length-1].route.index&&(x=fu({path:h.relativePath,caseSensitive:h.caseSensitive,end:!1},b)),!x)return null;Object.assign(l,x.params),u.push({params:l,pathname:Ur([o,x.pathname]),pathnameBase:tS(Ur([o,x.pathnameBase])),route:y}),x.pathnameBase!=="/"&&(o=Ur([o,x.pathnameBase]))}return u}function fu(e,n){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,a]=Zw(e.path,e.caseSensitive,e.end),l=n.match(r);if(!l)return null;let o=l[0],u=o.replace(/(.)\/+$/,"$1"),d=l.slice(1);return{params:a.reduce((m,{paramName:b,isOptional:x},y)=>{if(b==="*"){let _=d[y]||"";u=o.slice(0,o.length-_.length).replace(/(.)\/+$/,"$1")}const v=d[y];return x&&!v?m[b]=void 0:m[b]=(v||"").replace(/%2F/g,"/"),m},{}),pathname:o,pathnameBase:u,pattern:e}}function Zw(e,n=!1,r=!0){yn(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,(u,d,h,m,b)=>{if(a.push({paramName:d,isOptional:h!=null}),h){let x=b.charAt(m+u.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,n?void 0:"i"),a]}function Ww(e){try{return e.split("/").map(n=>decodeURIComponent(n).replace(/\//g,"%2F")).join("/")}catch(n){return yn(!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 (${n}).`),e}}function Or(e,n){if(n==="/")return e;if(!e.toLowerCase().startsWith(n.toLowerCase()))return null;let r=n.endsWith("/")?n.length-1:n.length,a=e.charAt(r);return a&&a!=="/"?null:e.slice(r)||"/"}function Jw({basename:e,pathname:n}){return n==="/"?e:Ur([e,n])}var lv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,um=e=>lv.test(e);function eS(e,n="/"){let{pathname:r,search:a="",hash:l=""}=typeof e=="string"?zi(e):e,o;return r?(r=r.replace(/\/\/+/g,"/"),r.startsWith("/")?o=Xb(r.substring(1),"/"):o=Xb(r,n)):o=n,{pathname:o,search:nS(a),hash:rS(l)}}function Xb(e,n){let r=n.replace(/\/+$/,"").split("/");return e.split("/").forEach(l=>{l===".."?r.length>1&&r.pop():l!=="."&&r.push(l)}),r.length>1?r.join("/"):"/"}function Jf(e,n,r,a){return`Cannot include a '${e}' character in a manually specified \`to.${n}\` 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 ov(e){return e.filter((n,r)=>r===0||n.route.path&&n.route.path.length>0)}function dm(e){let n=ov(e);return n.map((r,a)=>a===n.length-1?r.pathname:r.pathnameBase)}function zu(e,n,r,a=!1){let l;typeof e=="string"?l=zi(e):(l={...e},at(!l.pathname||!l.pathname.includes("?"),Jf("?","pathname","search",l)),at(!l.pathname||!l.pathname.includes("#"),Jf("#","pathname","hash",l)),at(!l.search||!l.search.includes("#"),Jf("#","search","hash",l)));let o=e===""||l.pathname==="",u=o?"/":l.pathname,d;if(u==null)d=r;else{let x=n.length-1;if(!a&&u.startsWith("..")){let y=u.split("/");for(;y[0]==="..";)y.shift(),x-=1;l.pathname=y.join("/")}d=x>=0?n[x]:"/"}let h=eS(l,d),m=u&&u!=="/"&&u.endsWith("/"),b=(o||u===".")&&r.endsWith("/");return!h.pathname.endsWith("/")&&(m||b)&&(h.pathname+="/"),h}var Ur=e=>e.join("/").replace(/\/\/+/g,"/"),tS=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),nS=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,rS=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,yo=class{constructor(e,n,r,a=!1){this.status=e,this.statusText=n||"",this.internal=a,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function uo(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function vo(e){return e.map(n=>n.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var cv=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function uv(e,n){let r=e;if(typeof r!="string"||!lv.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let a=r,l=!1;if(cv)try{let o=new URL(window.location.href),u=r.startsWith("//")?new URL(o.protocol+r):new URL(r),d=Or(u.pathname,n);u.origin===o.origin&&d!=null?r=d+u.search+u.hash:l=!0}catch{yn(!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 oa=Symbol("Uninstrumented");function iS(e,n){let r={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(l=>l({id:n.id,index:n.index,path:n.path,instrument(o){let u=Object.keys(r);for(let d of u)o[d]&&r[d].push(o[d])}}));let a={};if(typeof n.lazy=="function"&&r.lazy.length>0){let l=Ls(r.lazy,n.lazy,()=>{});l&&(a.lazy=l)}if(typeof n.lazy=="object"){let l=n.lazy;["middleware","loader","action"].forEach(o=>{let u=l[o],d=r[`lazy.${o}`];if(typeof u=="function"&&d.length>0){let h=Ls(d,u,()=>{});h&&(a.lazy=Object.assign(a.lazy||{},{[o]:h}))}})}return["loader","action"].forEach(l=>{let o=n[l];if(typeof o=="function"&&r[l].length>0){let u=o[oa]??o,d=Ls(r[l],u,(...h)=>Zb(h[0]));d&&(l==="loader"&&u.hydrate===!0&&(d.hydrate=!0),d[oa]=u,a[l]=d)}}),n.middleware&&n.middleware.length>0&&r.middleware.length>0&&(a.middleware=n.middleware.map(l=>{let o=l[oa]??l,u=Ls(r.middleware,o,(...d)=>Zb(d[0]));return u?(u[oa]=o,u):l})),a}function aS(e,n){let r={navigate:[],fetch:[]};if(n.forEach(a=>a({instrument(l){let o=Object.keys(l);for(let u of o)l[u]&&r[u].push(l[u])}})),r.navigate.length>0){let a=e.navigate[oa]??e.navigate,l=Ls(r.navigate,a,(...o)=>{let[u,d]=o;return{to:typeof u=="number"||typeof u=="string"?u:u?Wr(u):".",...Wb(e,d??{})}});l&&(l[oa]=a,e.navigate=l)}if(r.fetch.length>0){let a=e.fetch[oa]??e.fetch,l=Ls(r.fetch,a,(...o)=>{let[u,,d,h]=o;return{href:d??".",fetcherKey:u,...Wb(e,h??{})}});l&&(l[oa]=a,e.fetch=l)}return e}function Ls(e,n,r){return e.length===0?null:async(...a)=>{let l=await dv(e,r(...a),()=>n(...a),e.length-1);if(l.type==="error")throw l.value;return l.value}}async function dv(e,n,r,a){let l=e[a],o;if(l){let u,d=async()=>(u?console.error("You cannot call instrumented handlers more than once"):u=dv(e,n,r,a-1),o=await u,at(o,"Expected a result"),o.type==="error"&&o.value instanceof Error?{status:"error",error:o.value}:{status:"success",error:void 0});try{await l(d,n)}catch(h){console.error("An instrumentation function threw an error:",h)}u||await d(),await u}else try{o={type:"success",value:await r()}}catch(u){o={type:"error",value:u}}return o||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function Zb(e){let{request:n,context:r,params:a,unstable_pattern:l}=e;return{request:sS(n),params:{...a},unstable_pattern:l,context:lS(r)}}function Wb(e,n){return{currentUrl:Wr(e.state.location),..."formMethod"in n?{formMethod:n.formMethod}:{},..."formEncType"in n?{formEncType:n.formEncType}:{},..."formData"in n?{formData:n.formData}:{},..."body"in n?{body:n.body}:{}}}function sS(e){return{method:e.method,url:e.url,headers:{get:(...n)=>e.headers.get(...n)}}}function lS(e){if(cS(e)){let n={...e};return Object.freeze(n),n}else return{get:n=>e.get(n)}}var oS=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function cS(e){if(e===null||typeof e!="object")return!1;const n=Object.getPrototypeOf(e);return n===Object.prototype||n===null||Object.getOwnPropertyNames(n).sort().join("\0")===oS}var fv=["POST","PUT","PATCH","DELETE"],uS=new Set(fv),dS=["GET",...fv],fS=new Set(dS),hv=new Set([301,302,303,307,308]),hS=new Set([307,308]),eh={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},mS={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Hl={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},pS=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),mv="remix-router-transitions",pv=Symbol("ResetLoaderData");function gS(e){const n=e.window?e.window:typeof window<"u"?window:void 0,r=typeof n<"u"&&typeof n.document<"u"&&typeof n.document.createElement<"u";at(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let a=e.hydrationRouteProperties||[],l=e.mapRouteProperties||pS,o=l;if(e.unstable_instrumentations){let D=e.unstable_instrumentations;o=F=>({...l(F),...iS(D.map(Z=>Z.route).filter(Boolean),F)})}let u={},d=co(e.routes,o,void 0,u),h,m=e.basename||"/";m.startsWith("/")||(m=`/${m}`);let b=e.dataStrategy||kS,x={...e.future},y=null,v=new Set,_=null,E=null,w=null,N=e.hydrationData!=null,M=aa(d,e.history.location,m),R=!1,U=null,$,j;if(M==null&&!e.patchRoutesOnNavigation){let D=Cr(404,{pathname:e.history.location.pathname}),{matches:F,route:Z}=Uc(d);$=!0,j=!$,M=F,U={[Z.id]:D}}else if(M&&!e.hydrationData&&Tt(M,d,e.history.location.pathname).active&&(M=null),M)if(M.some(D=>D.route.lazy))$=!1,j=!$;else if(!M.some(D=>fm(D.route)))$=!0,j=!$;else{let D=e.hydrationData?e.hydrationData.loaderData:null,F=e.hydrationData?e.hydrationData.errors:null,Z=M;if(F){let de=M.findIndex(me=>F[me.route.id]!==void 0);Z=Z.slice(0,de+1)}j=!1,$=Z.every(de=>{let me=gv(de.route,D,F);return j=j||me.renderFallback,!me.shouldLoad})}else{$=!1,j=!$,M=[];let D=Tt(null,d,e.history.location.pathname);D.active&&D.matches&&(R=!0,M=D.matches)}let J,A={historyAction:e.history.action,location:e.history.location,matches:M,initialized:$,renderFallback:j,navigation:eh,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||U,fetchers:new Map,blockers:new Map},ae="POP",H=null,te=!1,ee,ve=!1,oe=new Map,q=null,L=!1,Y=!1,V=new Set,ne=new Map,C=0,O=-1,K=new Map,T=new Set,he=new Map,_e=new Map,xe=new Set,He=new Map,st,Be=null;function Wt(){if(y=e.history.listen(({action:D,location:F,delta:Z})=>{if(st){st(),st=void 0;return}yn(He.size===0||Z!=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 de=$r({currentLocation:A.location,nextLocation:F,historyAction:D});if(de&&Z!=null){let me=new Promise(Ce=>{st=Ce});e.history.go(Z*-1),Dr(de,{state:"blocked",location:F,proceed(){Dr(de,{state:"proceeding",proceed:void 0,reset:void 0,location:F}),me.then(()=>e.history.go(Z))},reset(){let Ce=new Map(A.blockers);Ce.set(de,Hl),At({blockers:Ce})}}),H?.resolve(),H=null;return}return kn(D,F)}),r){US(n,oe);let D=()=>FS(n,oe);n.addEventListener("pagehide",D),q=()=>n.removeEventListener("pagehide",D)}return A.initialized||kn("POP",A.location,{initialHydration:!0}),J}function un(){y&&y(),q&&q(),v.clear(),ee&&ee.abort(),A.fetchers.forEach((D,F)=>an(F)),A.blockers.forEach((D,F)=>qr(F))}function jn(D){return v.add(D),()=>v.delete(D)}function At(D,F={}){D.matches&&(D.matches=D.matches.map(me=>{let Ce=u[me.route.id],ye=me.route;return ye.element!==Ce.element||ye.errorElement!==Ce.errorElement||ye.hydrateFallbackElement!==Ce.hydrateFallbackElement?{...me,route:Ce}:me})),A={...A,...D};let Z=[],de=[];A.fetchers.forEach((me,Ce)=>{me.state==="idle"&&(xe.has(Ce)?Z.push(Ce):de.push(Ce))}),xe.forEach(me=>{!A.fetchers.has(me)&&!ne.has(me)&&Z.push(me)}),[...v].forEach(me=>me(A,{deletedFetchers:Z,newErrors:D.errors??null,viewTransitionOpts:F.viewTransitionOpts,flushSync:F.flushSync===!0})),Z.forEach(me=>an(me)),de.forEach(me=>A.fetchers.delete(me))}function Kt(D,F,{flushSync:Z}={}){let de=A.actionData!=null&&A.navigation.formMethod!=null&&Bn(A.navigation.formMethod)&&A.navigation.state==="loading"&&D.state?._isRedirect!==!0,me;F.actionData?Object.keys(F.actionData).length>0?me=F.actionData:me=null:de?me=A.actionData:me=null;let Ce=F.loaderData?ox(A.loaderData,F.loaderData,F.matches||[],F.errors):A.loaderData,ye=A.blockers;ye.size>0&&(ye=new Map(ye),ye.forEach((Ue,Me)=>ye.set(Me,Hl)));let Se=L?!1:Ke(D,F.matches||A.matches),ze=te===!0||A.navigation.formMethod!=null&&Bn(A.navigation.formMethod)&&D.state?._isRedirect!==!0;h&&(d=h,h=void 0),L||ae==="POP"||(ae==="PUSH"?e.history.push(D,D.state):ae==="REPLACE"&&e.history.replace(D,D.state));let Ie;if(ae==="POP"){let Ue=oe.get(A.location.pathname);Ue&&Ue.has(D.pathname)?Ie={currentLocation:A.location,nextLocation:D}:oe.has(D.pathname)&&(Ie={currentLocation:D,nextLocation:A.location})}else if(ve){let Ue=oe.get(A.location.pathname);Ue?Ue.add(D.pathname):(Ue=new Set([D.pathname]),oe.set(A.location.pathname,Ue)),Ie={currentLocation:A.location,nextLocation:D}}At({...F,actionData:me,loaderData:Ce,historyAction:ae,location:D,initialized:!0,renderFallback:!1,navigation:eh,revalidation:"idle",restoreScrollPosition:Se,preventScrollReset:ze,blockers:ye},{viewTransitionOpts:Ie,flushSync:Z===!0}),ae="POP",te=!1,ve=!1,L=!1,Y=!1,H?.resolve(),H=null,Be?.resolve(),Be=null}async function rr(D,F){if(H?.resolve(),H=null,typeof D=="number"){H||(H=fx());let Ot=H.promise;return e.history.go(D),Ot}let Z=jh(A.location,A.matches,m,D,F?.fromRouteId,F?.relative),{path:de,submission:me,error:Ce}=Jb(!1,Z,F),ye;F?.unstable_mask&&(ye={pathname:"",search:"",hash:"",...typeof F.unstable_mask=="string"?zi(F.unstable_mask):{...A.location.unstable_mask,...F.unstable_mask}});let Se=A.location,ze=oo(Se,de,F&&F.state,void 0,ye);ze={...ze,...e.history.encodeLocation(ze)};let Ie=F&&F.replace!=null?F.replace:void 0,Ue="PUSH";Ie===!0?Ue="REPLACE":Ie===!1||me!=null&&Bn(me.formMethod)&&me.formAction===A.location.pathname+A.location.search&&(Ue="REPLACE");let Me=F&&"preventScrollReset"in F?F.preventScrollReset===!0:void 0,yt=(F&&F.flushSync)===!0,rt=$r({currentLocation:Se,nextLocation:ze,historyAction:Ue});if(rt){Dr(rt,{state:"blocked",location:ze,proceed(){Dr(rt,{state:"proceeding",proceed:void 0,reset:void 0,location:ze}),rr(D,F)},reset(){let Ot=new Map(A.blockers);Ot.set(rt,Hl),At({blockers:Ot})}});return}await kn(Ue,ze,{submission:me,pendingError:Ce,preventScrollReset:Me,replace:F&&F.replace,enableViewTransition:F&&F.viewTransition,flushSync:yt,callSiteDefaultShouldRevalidate:F&&F.unstable_defaultShouldRevalidate})}function lt(){Be||(Be=fx()),Fe(),At({revalidation:"loading"});let D=Be.promise;return A.navigation.state==="submitting"?D:A.navigation.state==="idle"?(kn(A.historyAction,A.location,{startUninterruptedRevalidation:!0}),D):(kn(ae||A.historyAction,A.navigation.location,{overrideNavigation:A.navigation,enableViewTransition:ve===!0}),D)}async function kn(D,F,Z){ee&&ee.abort(),ee=null,ae=D,L=(Z&&Z.startUninterruptedRevalidation)===!0,Ee(A.location,A.matches),te=(Z&&Z.preventScrollReset)===!0,ve=(Z&&Z.enableViewTransition)===!0;let de=h||d,me=Z&&Z.overrideNavigation,Ce=Z?.initialHydration&&A.matches&&A.matches.length>0&&!R?A.matches:aa(de,F,m),ye=(Z&&Z.flushSync)===!0;if(Ce&&A.initialized&&!Y&&TS(A.location,F)&&!(Z&&Z.submission&&Bn(Z.submission.formMethod))){Kt(F,{matches:Ce},{flushSync:ye});return}let Se=Tt(Ce,de,F.pathname);if(Se.active&&Se.matches&&(Ce=Se.matches),!Ce){let{error:vt,notFoundMatches:Yt,route:ot}=zn(F.pathname);Kt(F,{matches:Yt,loaderData:{},errors:{[ot.id]:vt}},{flushSync:ye});return}ee=new AbortController;let ze=Os(e.history,F,ee.signal,Z&&Z.submission),Ie=e.getContext?await e.getContext():new Vb,Ue;if(Z&&Z.pendingError)Ue=[sa(Ce).route.id,{type:"error",error:Z.pendingError}];else if(Z&&Z.submission&&Bn(Z.submission.formMethod)){let vt=await Kn(ze,F,Z.submission,Ce,Ie,Se.active,Z&&Z.initialHydration===!0,{replace:Z.replace,flushSync:ye});if(vt.shortCircuited)return;if(vt.pendingActionResult){let[Yt,ot]=vt.pendingActionResult;if(mr(ot)&&uo(ot.error)&&ot.error.status===404){ee=null,Kt(F,{matches:vt.matches,loaderData:{},errors:{[Yt]:ot.error}});return}}Ce=vt.matches||Ce,Ue=vt.pendingActionResult,me=th(F,Z.submission),ye=!1,Se.active=!1,ze=Os(e.history,ze.url,ze.signal)}let{shortCircuited:Me,matches:yt,loaderData:rt,errors:Ot}=await br(ze,F,Ce,Ie,Se.active,me,Z&&Z.submission,Z&&Z.fetcherSubmission,Z&&Z.replace,Z&&Z.initialHydration===!0,ye,Ue,Z&&Z.callSiteDefaultShouldRevalidate);Me||(ee=null,Kt(F,{matches:yt||Ce,...cx(Ue),loaderData:rt,errors:Ot}))}async function Kn(D,F,Z,de,me,Ce,ye,Se={}){Fe();let ze=IS(F,Z);if(At({navigation:ze},{flushSync:Se.flushSync===!0}),Ce){let Me=await St(de,F.pathname,D.signal);if(Me.type==="aborted")return{shortCircuited:!0};if(Me.type==="error"){if(Me.partialMatches.length===0){let{matches:rt,route:Ot}=Uc(d);return{matches:rt,pendingActionResult:[Ot.id,{type:"error",error:Me.error}]}}let yt=sa(Me.partialMatches).route.id;return{matches:Me.partialMatches,pendingActionResult:[yt,{type:"error",error:Me.error}]}}else if(Me.matches)de=Me.matches;else{let{notFoundMatches:yt,error:rt,route:Ot}=zn(F.pathname);return{matches:yt,pendingActionResult:[Ot.id,{type:"error",error:rt}]}}}let Ie,Ue=ru(de,F);if(!Ue.route.action&&!Ue.route.lazy)Ie={type:"error",error:Cr(405,{method:D.method,pathname:F.pathname,routeId:Ue.route.id})};else{let Me=Is(o,u,D,de,Ue,ye?[]:a,me),yt=await ie(D,Me,me,null);if(Ie=yt[Ue.route.id],!Ie){for(let rt of de)if(yt[rt.route.id]){Ie=yt[rt.route.id];break}}if(D.signal.aborted)return{shortCircuited:!0}}if(Ia(Ie)){let Me;return Se&&Se.replace!=null?Me=Se.replace:Me=ax(Ie.response.headers.get("Location"),new URL(D.url),m,e.history)===A.location.pathname+A.location.search,await Vn(D,Ie,!0,{submission:Z,replace:Me}),{shortCircuited:!0}}if(mr(Ie)){let Me=sa(de,Ue.route.id);return(Se&&Se.replace)!==!0&&(ae="PUSH"),{matches:de,pendingActionResult:[Me.route.id,Ie,Ue.route.id]}}return{matches:de,pendingActionResult:[Ue.route.id,Ie]}}async function br(D,F,Z,de,me,Ce,ye,Se,ze,Ie,Ue,Me,yt){let rt=Ce||th(F,ye),Ot=ye||Se||dx(rt),vt=!L&&!Ie;if(me){if(vt){let Rt=xr(Me);At({navigation:rt,...Rt!==void 0?{actionData:Rt}:{}},{flushSync:Ue})}let Ve=await St(Z,F.pathname,D.signal);if(Ve.type==="aborted")return{shortCircuited:!0};if(Ve.type==="error"){if(Ve.partialMatches.length===0){let{matches:ln,route:_t}=Uc(d);return{matches:ln,loaderData:{},errors:{[_t.id]:Ve.error}}}let Rt=sa(Ve.partialMatches).route.id;return{matches:Ve.partialMatches,loaderData:{},errors:{[Rt]:Ve.error}}}else if(Ve.matches)Z=Ve.matches;else{let{error:Rt,notFoundMatches:ln,route:_t}=zn(F.pathname);return{matches:ln,loaderData:{},errors:{[_t.id]:Rt}}}}let Yt=h||d,{dsMatches:ot,revalidatingFetchers:sn}=ex(D,de,o,u,e.history,A,Z,Ot,F,Ie?[]:a,Ie===!0,Y,V,xe,he,T,Yt,m,e.patchRoutesOnNavigation!=null,Me,yt);if(O=++C,!e.dataStrategy&&!ot.some(Ve=>Ve.shouldLoad)&&!ot.some(Ve=>Ve.route.middleware&&Ve.route.middleware.length>0)&&sn.length===0){let Ve=ar();return Kt(F,{matches:Z,loaderData:{},errors:Me&&mr(Me[1])?{[Me[0]]:Me[1].error}:null,...cx(Me),...Ve?{fetchers:new Map(A.fetchers)}:{}},{flushSync:Ue}),{shortCircuited:!0}}if(vt){let Ve={};if(!me){Ve.navigation=rt;let Rt=xr(Me);Rt!==void 0&&(Ve.actionData=Rt)}sn.length>0&&(Ve.fetchers=ni(sn)),At(Ve,{flushSync:Ue})}sn.forEach(Ve=>{qt(Ve.key),Ve.controller&&ne.set(Ve.key,Ve.controller)});let Lt=()=>sn.forEach(Ve=>qt(Ve.key));ee&&ee.signal.addEventListener("abort",Lt);let{loaderResults:Gr,fetcherResults:Ln}=await be(ot,sn,D,de);if(D.signal.aborted)return{shortCircuited:!0};ee&&ee.signal.removeEventListener("abort",Lt),sn.forEach(Ve=>ne.delete(Ve.key));let dn=Fc(Gr);if(dn)return await Vn(D,dn.result,!0,{replace:ze}),{shortCircuited:!0};if(dn=Fc(Ln),dn)return T.add(dn.key),await Vn(D,dn.result,!0,{replace:ze}),{shortCircuited:!0};let{loaderData:fe,errors:De}=lx(A,Z,Gr,Me,sn,Ln);Ie&&A.errors&&(De={...A.errors,...De});let Xe=ar(),kt=Nn(O),$t=Xe||kt||sn.length>0;return{matches:Z,loaderData:fe,errors:De,...$t?{fetchers:new Map(A.fetchers)}:{}}}function xr(D){if(D&&!mr(D[1]))return{[D[0]]:D[1].data};if(A.actionData)return Object.keys(A.actionData).length===0?null:A.actionData}function ni(D){return D.forEach(F=>{let Z=A.fetchers.get(F.key),de=ql(void 0,Z?Z.data:void 0);A.fetchers.set(F.key,de)}),new Map(A.fetchers)}async function ga(D,F,Z,de){qt(D);let me=(de&&de.flushSync)===!0,Ce=h||d,ye=jh(A.location,A.matches,m,Z,F,de?.relative),Se=aa(Ce,ye,m),ze=Tt(Se,Ce,ye);if(ze.active&&ze.matches&&(Se=ze.matches),!Se){Je(D,F,Cr(404,{pathname:ye}),{flushSync:me});return}let{path:Ie,submission:Ue,error:Me}=Jb(!0,ye,de);if(Me){Je(D,F,Me,{flushSync:me});return}let yt=e.getContext?await e.getContext():new Vb,rt=(de&&de.preventScrollReset)===!0;if(Ue&&Bn(Ue.formMethod)){await Ri(D,F,Ie,Se,yt,ze.active,me,rt,Ue,de&&de.unstable_defaultShouldRevalidate);return}he.set(D,{routeId:F,path:Ie}),await Vt(D,F,Ie,Se,yt,ze.active,me,rt,Ue)}async function Ri(D,F,Z,de,me,Ce,ye,Se,ze,Ie){Fe(),he.delete(D);let Ue=A.fetchers.get(D);Qe(D,BS(ze,Ue),{flushSync:ye});let Me=new AbortController,yt=Os(e.history,Z,Me.signal,ze);if(Ce){let ht=await St(de,new URL(yt.url).pathname,yt.signal,D);if(ht.type==="aborted")return;if(ht.type==="error"){Je(D,F,ht.error,{flushSync:ye});return}else if(ht.matches)de=ht.matches;else{Je(D,F,Cr(404,{pathname:Z}),{flushSync:ye});return}}let rt=ru(de,Z);if(!rt.route.action&&!rt.route.lazy){let ht=Cr(405,{method:ze.formMethod,pathname:Z,routeId:F});Je(D,F,ht,{flushSync:ye});return}ne.set(D,Me);let Ot=C,vt=Is(o,u,yt,de,rt,a,me),Yt=await ie(yt,vt,me,D),ot=Yt[rt.route.id];if(!ot){for(let ht of vt)if(Yt[ht.route.id]){ot=Yt[ht.route.id];break}}if(yt.signal.aborted){ne.get(D)===Me&&ne.delete(D);return}if(xe.has(D)){if(Ia(ot)||mr(ot)){Qe(D,Si(void 0));return}}else{if(Ia(ot))if(ne.delete(D),O>Ot){Qe(D,Si(void 0));return}else return T.add(D),Qe(D,ql(ze)),Vn(yt,ot,!1,{fetcherSubmission:ze,preventScrollReset:Se});if(mr(ot)){Je(D,F,ot.error);return}}let sn=A.navigation.location||A.location,Lt=Os(e.history,sn,Me.signal),Gr=h||d,Ln=A.navigation.state!=="idle"?aa(Gr,A.navigation.location,m):A.matches;at(Ln,"Didn't find any matches after fetcher action");let dn=++C;K.set(D,dn);let fe=ql(ze,ot.data);A.fetchers.set(D,fe);let{dsMatches:De,revalidatingFetchers:Xe}=ex(Lt,me,o,u,e.history,A,Ln,ze,sn,a,!1,Y,V,xe,he,T,Gr,m,e.patchRoutesOnNavigation!=null,[rt.route.id,ot],Ie);Xe.filter(ht=>ht.key!==D).forEach(ht=>{let ri=ht.key,ii=A.fetchers.get(ri),ba=ql(void 0,ii?ii.data:void 0);A.fetchers.set(ri,ba),qt(ri),ht.controller&&ne.set(ri,ht.controller)}),At({fetchers:new Map(A.fetchers)});let kt=()=>Xe.forEach(ht=>qt(ht.key));Me.signal.addEventListener("abort",kt);let{loaderResults:$t,fetcherResults:Ve}=await be(De,Xe,Lt,me);if(Me.signal.aborted)return;if(Me.signal.removeEventListener("abort",kt),K.delete(D),ne.delete(D),Xe.forEach(ht=>ne.delete(ht.key)),A.fetchers.has(D)){let ht=Si(ot.data);A.fetchers.set(D,ht)}let Rt=Fc($t);if(Rt)return Vn(Lt,Rt.result,!1,{preventScrollReset:Se});if(Rt=Fc(Ve),Rt)return T.add(Rt.key),Vn(Lt,Rt.result,!1,{preventScrollReset:Se});let{loaderData:ln,errors:_t}=lx(A,Ln,$t,void 0,Xe,Ve);Nn(dn),A.navigation.state==="loading"&&dn>O?(at(ae,"Expected pending action"),ee&&ee.abort(),Kt(A.navigation.location,{matches:Ln,loaderData:ln,errors:_t,fetchers:new Map(A.fetchers)})):(At({errors:_t,loaderData:ox(A.loaderData,ln,Ln,_t),fetchers:new Map(A.fetchers)}),Y=!1)}async function Vt(D,F,Z,de,me,Ce,ye,Se,ze){let Ie=A.fetchers.get(D);Qe(D,ql(ze,Ie?Ie.data:void 0),{flushSync:ye});let Ue=new AbortController,Me=Os(e.history,Z,Ue.signal);if(Ce){let ot=await St(de,new URL(Me.url).pathname,Me.signal,D);if(ot.type==="aborted")return;if(ot.type==="error"){Je(D,F,ot.error,{flushSync:ye});return}else if(ot.matches)de=ot.matches;else{Je(D,F,Cr(404,{pathname:Z}),{flushSync:ye});return}}let yt=ru(de,Z);ne.set(D,Ue);let rt=C,Ot=Is(o,u,Me,de,yt,a,me),Yt=(await ie(Me,Ot,me,D))[yt.route.id];if(ne.get(D)===Ue&&ne.delete(D),!Me.signal.aborted){if(xe.has(D)){Qe(D,Si(void 0));return}if(Ia(Yt))if(O>rt){Qe(D,Si(void 0));return}else{T.add(D),await Vn(Me,Yt,!1,{preventScrollReset:Se});return}if(mr(Yt)){Je(D,F,Yt.error);return}Qe(D,Si(Yt.data))}}async function Vn(D,F,Z,{submission:de,fetcherSubmission:me,preventScrollReset:Ce,replace:ye}={}){Z||(H?.resolve(),H=null),F.response.headers.has("X-Remix-Revalidate")&&(Y=!0);let Se=F.response.headers.get("Location");at(Se,"Expected a Location header on the redirect Response"),Se=ax(Se,new URL(D.url),m,e.history);let ze=oo(A.location,Se,{_isRedirect:!0});if(r){let Ot=!1;if(F.response.headers.has("X-Remix-Reload-Document"))Ot=!0;else if(um(Se)){const vt=iv(Se,!0);Ot=vt.origin!==n.location.origin||Or(vt.pathname,m)==null}if(Ot){ye?n.location.replace(Se):n.location.assign(Se);return}}ee=null;let Ie=ye===!0||F.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:Ue,formAction:Me,formEncType:yt}=A.navigation;!de&&!me&&Ue&&Me&&yt&&(de=dx(A.navigation));let rt=de||me;if(hS.has(F.response.status)&&rt&&Bn(rt.formMethod))await kn(Ie,ze,{submission:{...rt,formAction:Se},preventScrollReset:Ce||te,enableViewTransition:Z?ve:void 0});else{let Ot=th(ze,de);await kn(Ie,ze,{overrideNavigation:Ot,fetcherSubmission:me,preventScrollReset:Ce||te,enableViewTransition:Z?ve:void 0})}}async function ie(D,F,Z,de){let me,Ce={};try{me=await ES(b,D,F,de,Z,!1)}catch(ye){return F.filter(Se=>Se.shouldLoad).forEach(Se=>{Ce[Se.route.id]={type:"error",error:ye}}),Ce}if(D.signal.aborted)return Ce;if(!Bn(D.method))for(let ye of F){if(me[ye.route.id]?.type==="error")break;!me.hasOwnProperty(ye.route.id)&&!A.loaderData.hasOwnProperty(ye.route.id)&&(!A.errors||!A.errors.hasOwnProperty(ye.route.id))&&ye.shouldCallHandler()&&(me[ye.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${ye.route.id}`)})}for(let[ye,Se]of Object.entries(me))if(MS(Se)){let ze=Se.result;Ce[ye]={type:"redirect",response:zS(ze,D,ye,F,m)}}else Ce[ye]=await NS(Se);return Ce}async function be(D,F,Z,de){let me=ie(Z,D,de,null),Ce=Promise.all(F.map(async ze=>{if(ze.matches&&ze.match&&ze.request&&ze.controller){let Ue=(await ie(ze.request,ze.matches,de,ze.key))[ze.match.route.id];return{[ze.key]:Ue}}else return Promise.resolve({[ze.key]:{type:"error",error:Cr(404,{pathname:ze.path})}})})),ye=await me,Se=(await Ce).reduce((ze,Ie)=>Object.assign(ze,Ie),{});return{loaderResults:ye,fetcherResults:Se}}function Fe(){Y=!0,he.forEach((D,F)=>{ne.has(F)&&V.add(F),qt(F)})}function Qe(D,F,Z={}){A.fetchers.set(D,F),At({fetchers:new Map(A.fetchers)},{flushSync:(Z&&Z.flushSync)===!0})}function Je(D,F,Z,de={}){let me=sa(A.matches,F);an(D),At({errors:{[me.route.id]:Z},fetchers:new Map(A.fetchers)},{flushSync:(de&&de.flushSync)===!0})}function Sn(D){return _e.set(D,(_e.get(D)||0)+1),xe.has(D)&&xe.delete(D),A.fetchers.get(D)||mS}function ir(D,F){qt(D,F?.reason),Qe(D,Si(null))}function an(D){let F=A.fetchers.get(D);ne.has(D)&&!(F&&F.state==="loading"&&K.has(D))&&qt(D),he.delete(D),K.delete(D),T.delete(D),xe.delete(D),V.delete(D),A.fetchers.delete(D)}function Jt(D){let F=(_e.get(D)||0)-1;F<=0?(_e.delete(D),xe.add(D)):_e.set(D,F),At({fetchers:new Map(A.fetchers)})}function qt(D,F){let Z=ne.get(D);Z&&(Z.abort(F),ne.delete(D))}function wt(D){for(let F of D){let Z=Sn(F),de=Si(Z.data);A.fetchers.set(F,de)}}function ar(){let D=[],F=!1;for(let Z of T){let de=A.fetchers.get(Z);at(de,`Expected fetcher: ${Z}`),de.state==="loading"&&(T.delete(Z),D.push(Z),F=!0)}return wt(D),F}function Nn(D){let F=[];for(let[Z,de]of K)if(de<D){let me=A.fetchers.get(Z);at(me,`Expected fetcher: ${Z}`),me.state==="loading"&&(qt(Z),K.delete(Z),F.push(Z))}return wt(F),F.length>0}function Xa(D,F){let Z=A.blockers.get(D)||Hl;return He.get(D)!==F&&He.set(D,F),Z}function qr(D){A.blockers.delete(D),He.delete(D)}function Dr(D,F){let Z=A.blockers.get(D)||Hl;at(Z.state==="unblocked"&&F.state==="blocked"||Z.state==="blocked"&&F.state==="blocked"||Z.state==="blocked"&&F.state==="proceeding"||Z.state==="blocked"&&F.state==="unblocked"||Z.state==="proceeding"&&F.state==="unblocked",`Invalid blocker state transition: ${Z.state} -> ${F.state}`);let de=new Map(A.blockers);de.set(D,F),At({blockers:de})}function $r({currentLocation:D,nextLocation:F,historyAction:Z}){if(He.size===0)return;He.size>1&&yn(!1,"A router only supports one blocker at a time");let de=Array.from(He.entries()),[me,Ce]=de[de.length-1],ye=A.blockers.get(me);if(!(ye&&ye.state==="proceeding")&&Ce({currentLocation:D,nextLocation:F,historyAction:Z}))return me}function zn(D){let F=Cr(404,{pathname:D}),Z=h||d,{matches:de,route:me}=Uc(Z);return{notFoundMatches:de,route:me,error:F}}function B(D,F,Z){if(_=D,w=F,E=Z||null,!N&&A.navigation===eh){N=!0;let de=Ke(A.location,A.matches);de!=null&&At({restoreScrollPosition:de})}return()=>{_=null,w=null,E=null}}function le(D,F){return E&&E(D,F.map(de=>Fw(de,A.loaderData)))||D.key}function Ee(D,F){if(_&&w){let Z=le(D,F);_[Z]=w()}}function Ke(D,F){if(_){let Z=le(D,F),de=_[Z];if(typeof de=="number")return de}return null}function Tt(D,F,Z){if(e.patchRoutesOnNavigation)if(D){if(Object.keys(D[0].params).length>0)return{active:!0,matches:Jl(F,Z,m,!0)}}else return{active:!0,matches:Jl(F,Z,m,!0)||[]};return{active:!1,matches:null}}async function St(D,F,Z,de){if(!e.patchRoutesOnNavigation)return{type:"success",matches:D};let me=D;for(;;){let Ce=h==null,ye=h||d,Se=u;try{await e.patchRoutesOnNavigation({signal:Z,path:F,matches:me,fetcherKey:de,patch:(Ue,Me)=>{Z.aborted||tx(Ue,Me,ye,Se,o,!1)}})}catch(Ue){return{type:"error",error:Ue,partialMatches:me}}finally{Ce&&!Z.aborted&&(d=[...d])}if(Z.aborted)return{type:"aborted"};let ze=aa(ye,F,m),Ie=null;if(ze){if(Object.keys(ze[0].params).length===0)return{type:"success",matches:ze};if(Ie=Jl(ye,F,m,!0),!(Ie&&me.length<Ie.length&&Te(me,Ie.slice(0,me.length))))return{type:"success",matches:ze}}if(Ie||(Ie=Jl(ye,F,m,!0)),!Ie||Te(me,Ie))return{type:"success",matches:null};me=Ie}}function Te(D,F){return D.length===F.length&&D.every((Z,de)=>Z.route.id===F[de].route.id)}function Ne(D){u={},h=co(D,o,void 0,u)}function $e(D,F,Z=!1){let de=h==null;tx(D,F,h||d,u,o,Z),de&&(d=[...d],At({}))}return J={get basename(){return m},get future(){return x},get state(){return A},get routes(){return d},get window(){return n},initialize:Wt,subscribe:jn,enableScrollRestoration:B,navigate:rr,fetch:ga,revalidate:lt,createHref:D=>e.history.createHref(D),encodeLocation:D=>e.history.encodeLocation(D),getFetcher:Sn,resetFetcher:ir,deleteFetcher:Jt,dispose:un,getBlocker:Xa,deleteBlocker:qr,patchRoutes:$e,_internalFetchControllers:ne,_internalSetRoutes:Ne,_internalSetStateDoNotUseOrYouWillBreakYourApp(D){At(D)}},e.unstable_instrumentations&&(J=aS(J,e.unstable_instrumentations.map(D=>D.router).filter(Boolean))),J}function bS(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function jh(e,n,r,a,l,o){let u,d;if(l){u=[];for(let m of n)if(u.push(m),m.route.id===l){d=m;break}}else u=n,d=n[n.length-1];let h=zu(a||".",dm(u),Or(e.pathname,r)||e.pathname,o==="path");if(a==null&&(h.search=e.search,h.hash=e.hash),(a==null||a===""||a===".")&&d){let m=mm(h.search);if(d.route.index&&!m)h.search=h.search?h.search.replace(/^\?/,"?index&"):"?index";else if(!d.route.index&&m){let b=new URLSearchParams(h.search),x=b.getAll("index");b.delete("index"),x.filter(v=>v).forEach(v=>b.append("index",v));let y=b.toString();h.search=y?`?${y}`:""}}return r!=="/"&&(h.pathname=Jw({basename:r,pathname:h.pathname})),Wr(h)}function Jb(e,n,r){if(!r||!bS(r))return{path:n};if(r.formMethod&&!LS(r.formMethod))return{path:n,error:Cr(405,{method:r.formMethod})};let a=()=>({path:n,error:Cr(400,{type:"invalid-body"})}),o=(r.formMethod||"get").toUpperCase(),u=_v(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!Bn(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,_])=>`${y}${v}=${_}
59
- `,""):String(r.body);return{path:n,submission:{formMethod:o,formAction:u,formEncType:r.formEncType,formData:void 0,json:void 0,text:x}}}else if(r.formEncType==="application/json"){if(!Bn(o))return a();try{let x=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:o,formAction:u,formEncType:r.formEncType,formData:void 0,json:x,text:void 0}}}catch{return a()}}}at(typeof FormData=="function","FormData is not available in this environment");let d,h;if(r.formData)d=Ih(r.formData),h=r.formData;else if(r.body instanceof FormData)d=Ih(r.body),h=r.body;else if(r.body instanceof URLSearchParams)d=r.body,h=sx(d);else if(r.body==null)d=new URLSearchParams,h=new FormData;else try{d=new URLSearchParams(r.body),h=sx(d)}catch{return a()}let m={formMethod:o,formAction:u,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:h,json:void 0,text:void 0};if(Bn(m.formMethod))return{path:n,submission:m};let b=zi(n);return e&&b.search&&mm(b.search)&&d.append("index",""),b.search=`?${d}`,{path:Wr(b),submission:m}}function ex(e,n,r,a,l,o,u,d,h,m,b,x,y,v,_,E,w,N,M,R,U){let $=R?mr(R[1])?R[1].error:R[1].data:void 0,j=l.createURL(o.location),J=l.createURL(h),A;if(b&&o.errors){let q=Object.keys(o.errors)[0];A=u.findIndex(L=>L.route.id===q)}else if(R&&mr(R[1])){let q=R[0];A=u.findIndex(L=>L.route.id===q)-1}let ae=R?R[1].statusCode:void 0,H=ae&&ae>=400,te={currentUrl:j,currentParams:o.matches[0]?.params||{},nextUrl:J,nextParams:u[0].params,...d,actionResult:$,actionStatus:ae},ee=vo(u),ve=u.map((q,L)=>{let{route:Y}=q,V=null;if(A!=null&&L>A)V=!1;else if(Y.lazy)V=!0;else if(!fm(Y))V=!1;else if(b){let{shouldLoad:K}=gv(Y,o.loaderData,o.errors);V=K}else xS(o.loaderData,o.matches[L],q)&&(V=!0);if(V!==null)return Lh(r,a,e,ee,q,m,n,V);let ne=!1;typeof U=="boolean"?ne=U:H?ne=!1:(x||j.pathname+j.search===J.pathname+J.search||j.search!==J.search||yS(o.matches[L],q))&&(ne=!0);let C={...te,defaultShouldRevalidate:ne},O=io(q,C);return Lh(r,a,e,ee,q,m,n,O,C,U)}),oe=[];return _.forEach((q,L)=>{if(b||!u.some(he=>he.route.id===q.routeId)||v.has(L))return;let Y=o.fetchers.get(L),V=Y&&Y.state!=="idle"&&Y.data===void 0,ne=aa(w,q.path,N);if(!ne){if(M&&V)return;oe.push({key:L,routeId:q.routeId,path:q.path,matches:null,match:null,request:null,controller:null});return}if(E.has(L))return;let C=ru(ne,q.path),O=new AbortController,K=Os(l,q.path,O.signal),T=null;if(y.has(L))y.delete(L),T=Is(r,a,K,ne,C,m,n);else if(V)x&&(T=Is(r,a,K,ne,C,m,n));else{let he;typeof U=="boolean"?he=U:H?he=!1:he=x;let _e={...te,defaultShouldRevalidate:he};io(C,_e)&&(T=Is(r,a,K,ne,C,m,n,_e))}T&&oe.push({key:L,routeId:q.routeId,path:q.path,matches:T,match:C,request:K,controller:O})}),{dsMatches:ve,revalidatingFetchers:oe}}function fm(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function gv(e,n,r){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!fm(e))return{shouldLoad:!1,renderFallback:!1};let a=n!=null&&e.id in n,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 xS(e,n,r){let a=!n||r.route.id!==n.route.id,l=!e.hasOwnProperty(r.route.id);return a||l}function yS(e,n){let r=e.route.path;return e.pathname!==n.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==n.params["*"]}function io(e,n){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(n);if(typeof r=="boolean")return r}return n.defaultShouldRevalidate}function tx(e,n,r,a,l,o){let u;if(e){let m=a[e];at(m,`No route found to patch children into: routeId = ${e}`),m.children||(m.children=[]),u=m.children}else u=r;let d=[],h=[];if(n.forEach(m=>{let b=u.find(x=>bv(m,x));b?h.push({existingRoute:b,newRoute:m}):d.push(m)}),d.length>0){let m=co(d,l,[e||"_","patch",String(u?.length||"0")],a);u.push(...m)}if(o&&h.length>0)for(let m=0;m<h.length;m++){let{existingRoute:b,newRoute:x}=h[m],y=b,[v]=co([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 bv(e,n){return"id"in e&&"id"in n&&e.id===n.id?!0:e.index===n.index&&e.path===n.path&&e.caseSensitive===n.caseSensitive?(!e.children||e.children.length===0)&&(!n.children||n.children.length===0)?!0:e.children?.every((r,a)=>n.children?.some(l=>bv(r,l)))??!1:!1}var nx=new WeakMap,xv=({key:e,route:n,manifest:r,mapRouteProperties:a})=>{let l=r[n.id];if(at(l,"No route found in manifest"),!l.lazy||typeof l.lazy!="object")return;let o=l.lazy[e];if(!o)return;let u=nx.get(l);u||(u={},nx.set(l,u));let d=u[e];if(d)return d;let h=(async()=>{let m=Lw(e),x=l[e]!==void 0&&e!=="hasErrorBoundary";if(m)yn(!m,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),u[e]=Promise.resolve();else if(x)yn(!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 u[e]=h,h},rx=new WeakMap;function vS(e,n,r,a,l){let o=r[e.id];if(at(o,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy=="function"){let b=rx.get(o);if(b)return{lazyRoutePromise:b,lazyHandlerPromise:b};let x=(async()=>{at(typeof e.lazy=="function","No lazy route function found");let y=await e.lazy(),v={};for(let _ in y){let E=y[_];if(E===void 0)continue;let w=Bw(_),M=o[_]!==void 0&&_!=="hasErrorBoundary";w?yn(!w,"Route property "+_+" is not a supported property to be returned from a lazy route function. This property will be ignored."):M?yn(!M,`Route "${o.id}" has a static property "${_}" defined but its lazy function is also returning a value for this property. The lazy route property "${_}" will be ignored.`):v[_]=E}Object.assign(o,v),Object.assign(o,{...a(o),lazy:void 0})})();return rx.set(o,x),x.catch(()=>{}),{lazyRoutePromise:x,lazyHandlerPromise:x}}let u=Object.keys(e.lazy),d=[],h;for(let b of u){if(l&&l.includes(b))continue;let x=xv({key:b,route:e,manifest:r,mapRouteProperties:a});x&&(d.push(x),b===n&&(h=x))}let m=d.length>0?Promise.all(d).then(()=>{}):void 0;return m?.catch(()=>{}),h?.catch(()=>{}),{lazyRoutePromise:m,lazyHandlerPromise:h}}async function ix(e){let n=e.matches.filter(l=>l.shouldLoad),r={};return(await Promise.all(n.map(l=>l.resolve()))).forEach((l,o)=>{r[n[o].route.id]=l}),r}async function kS(e){return e.matches.some(n=>n.route.middleware)?yv(e,()=>ix(e)):ix(e)}function yv(e,n){return _S(e,n,a=>{if(jS(a))throw a;return a},AS,r);function r(a,l,o){if(o)return Promise.resolve(Object.assign(o.value,{[l]:{type:"error",result:a}}));{let{matches:u}=e,d=Math.min(Math.max(u.findIndex(m=>m.route.id===l),0),Math.max(u.findIndex(m=>m.shouldCallHandler()),0)),h=sa(u,u[d].route.id).route.id;return Promise.resolve({[h]:{type:"error",result:a}})}}}async function _S(e,n,r,a,l){let{matches:o,request:u,params:d,context:h,unstable_pattern:m}=e,b=o.flatMap(y=>y.route.middleware?y.route.middleware.map(v=>[y.route.id,v]):[]);return await vv({request:u,params:d,context:h,unstable_pattern:m},b,n,r,a,l)}async function vv(e,n,r,a,l,o,u=0){let{request:d}=e;if(d.signal.aborted)throw d.signal.reason??new Error(`Request aborted: ${d.method} ${d.url}`);let h=n[u];if(!h)return await r();let[m,b]=h,x,y=async()=>{if(x)throw new Error("You may only call `next()` once per middleware");try{return x={value:await vv(e,n,r,a,l,o,u+1)},x.value}catch(v){return x={value:await o(v,m,x)},x.value}};try{let v=await b(e,y),_=v!=null?a(v):void 0;return l(_)?_:x?_??x.value:(x={value:await y()},x.value)}catch(v){return await o(v,m,x)}}function kv(e,n,r,a,l){let o=xv({key:"middleware",route:a.route,manifest:n,mapRouteProperties:e}),u=vS(a.route,Bn(r.method)?"action":"loader",n,e,l);return{middleware:o,route:u.lazyRoutePromise,handler:u.lazyHandlerPromise}}function Lh(e,n,r,a,l,o,u,d,h=null,m){let b=!1,x=kv(e,n,r,l,o);return{...l,_lazyPromises:x,shouldLoad:d,shouldRevalidateArgs:h,shouldCallHandler(y){return b=!0,h?typeof m=="boolean"?io(l,{...h,defaultShouldRevalidate:m}):typeof y=="boolean"?io(l,{...h,defaultShouldRevalidate:y}):io(l,h):d},resolve(y){let{lazy:v,loader:_,middleware:E}=l.route,w=b||d||y&&!Bn(r.method)&&(v||_),N=E&&E.length>0&&!_&&!v;return w&&(Bn(r.method)||!N)?wS({request:r,unstable_pattern:a,match:l,lazyHandlerPromise:x?.handler,lazyRoutePromise:x?.route,handlerOverride:y,scopedContext:u}):Promise.resolve({type:"data",result:void 0})}}}function Is(e,n,r,a,l,o,u,d=null){return a.map(h=>h.route.id!==l.route.id?{...h,shouldLoad:!1,shouldRevalidateArgs:d,shouldCallHandler:()=>!1,_lazyPromises:kv(e,n,r,h,o),resolve:()=>Promise.resolve({type:"data",result:void 0})}:Lh(e,n,r,vo(a),h,o,u,!0,d))}async function ES(e,n,r,a,l,o){r.some(m=>m._lazyPromises?.middleware)&&await Promise.all(r.map(m=>m._lazyPromises?.middleware));let u={request:n,unstable_pattern:vo(r),params:r[0].params,context:l,matches:r},h=await e({...u,fetcherKey:a,runClientMiddleware:m=>{let b=u;return yv(b,()=>m({...b,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 wS({request:e,unstable_pattern:n,match:r,lazyHandlerPromise:a,lazyRoutePromise:l,handlerOverride:o,scopedContext:u}){let d,h,m=Bn(e.method),b=m?"action":"loader",x=y=>{let v,_=new Promise((N,M)=>v=M);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 "${b}" [routeId: ${r.route.id}]`)):y({request:e,unstable_pattern:n,params:r.params,context:u},...N!==void 0?[N]:[]),w=(async()=>{try{return{type:"data",result:await(o?o(M=>E(M)):E())}}catch(N){return{type:"error",result:N}}})();return Promise.race([w,_])};try{let y=m?r.route.action:r.route.loader;if(a||l)if(y){let v,[_]=await Promise.all([x(y).catch(E=>{v=E}),a,l]);if(v!==void 0)throw v;d=_}else{await a;let v=m?r.route.action:r.route.loader;if(v)[d]=await Promise.all([x(v),l]);else if(b==="action"){let _=new URL(e.url),E=_.pathname+_.search;throw Cr(405,{method:e.method,pathname:E,routeId:r.route.id})}else return{type:"data",result:void 0}}else if(y)d=await x(y);else{let v=new URL(e.url),_=v.pathname+v.search;throw Cr(404,{pathname:_})}}catch(y){return{type:"error",result:y}}finally{h&&e.signal.removeEventListener("abort",h)}return d}async function SS(e){let n=e.headers.get("Content-Type");return n&&/\bapplication\/json\b/.test(n)?e.body==null?null:e.json():e.text()}async function NS(e){let{result:n,type:r}=e;if(hm(n)){let a;try{a=await SS(n)}catch(l){return{type:"error",error:l}}return r==="error"?{type:"error",error:new yo(n.status,n.statusText,a),statusCode:n.status,headers:n.headers}:{type:"data",data:a,statusCode:n.status,headers:n.headers}}return r==="error"?ux(n)?n.data instanceof Error?{type:"error",error:n.data,statusCode:n.init?.status,headers:n.init?.headers?new Headers(n.init.headers):void 0}:{type:"error",error:RS(n),statusCode:uo(n)?n.status:void 0,headers:n.init?.headers?new Headers(n.init.headers):void 0}:{type:"error",error:n,statusCode:uo(n)?n.status:void 0}:ux(n)?{type:"data",data:n.data,statusCode:n.init?.status,headers:n.init?.headers?new Headers(n.init.headers):void 0}:{type:"data",data:n}}function zS(e,n,r,a,l){let o=e.headers.get("Location");if(at(o,"Redirects returned/thrown from loaders/actions must have a Location header"),!um(o)){let u=a.slice(0,a.findIndex(d=>d.route.id===r)+1);o=jh(new URL(n.url),u,l,o),e.headers.set("Location",o)}return e}function ax(e,n,r,a){let l=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(um(e)){let o=e,u=o.startsWith("//")?new URL(n.protocol+o):new URL(o);if(l.includes(u.protocol))throw new Error("Invalid redirect location");let d=Or(u.pathname,r)!=null;if(u.origin===n.origin&&d)return u.pathname+u.search+u.hash}try{let o=a.createURL(e);if(l.includes(o.protocol))throw new Error("Invalid redirect location")}catch{}return e}function Os(e,n,r,a){let l=e.createURL(_v(n)).toString(),o={signal:r};if(a&&Bn(a.formMethod)){let{formMethod:u,formEncType:d}=a;o.method=u.toUpperCase(),d==="application/json"?(o.headers=new Headers({"Content-Type":d}),o.body=JSON.stringify(a.json)):d==="text/plain"?o.body=a.text:d==="application/x-www-form-urlencoded"&&a.formData?o.body=Ih(a.formData):o.body=a.formData}return new Request(l,o)}function Ih(e){let n=new URLSearchParams;for(let[r,a]of e.entries())n.append(r,typeof a=="string"?a:a.name);return n}function sx(e){let n=new FormData;for(let[r,a]of e.entries())n.append(r,a);return n}function CS(e,n,r,a=!1,l=!1){let o={},u=null,d,h=!1,m={},b=r&&mr(r[1])?r[1].error:void 0;return e.forEach(x=>{if(!(x.route.id in n))return;let y=x.route.id,v=n[y];if(at(!Ia(v),"Cannot handle redirect results in processLoaderData"),mr(v)){let _=v.error;if(b!==void 0&&(_=b,b=void 0),u=u||{},l)u[y]=_;else{let E=sa(e,y);u[E.route.id]==null&&(u[E.route.id]=_)}a||(o[y]=pv),h||(h=!0,d=uo(v.error)?v.error.status:500),v.headers&&(m[y]=v.headers)}else o[y]=v.data,v.statusCode&&v.statusCode!==200&&!h&&(d=v.statusCode),v.headers&&(m[y]=v.headers)}),b!==void 0&&r&&(u={[r[0]]:b},r[2]&&(o[r[2]]=void 0)),{loaderData:o,errors:u,statusCode:d||200,loaderHeaders:m}}function lx(e,n,r,a,l,o){let{loaderData:u,errors:d}=CS(n,r,a);return l.filter(h=>!h.matches||h.matches.some(m=>m.shouldLoad)).forEach(h=>{let{key:m,match:b,controller:x}=h;if(x&&x.signal.aborted)return;let y=o[m];if(at(y,"Did not find corresponding fetcher result"),mr(y)){let v=sa(e.matches,b?.route.id);d&&d[v.route.id]||(d={...d,[v.route.id]:y.error}),e.fetchers.delete(m)}else if(Ia(y))at(!1,"Unhandled fetcher revalidation redirect");else{let v=Si(y.data);e.fetchers.set(m,v)}}),{loaderData:u,errors:d}}function ox(e,n,r,a){let l=Object.entries(n).filter(([,o])=>o!==pv).reduce((o,[u,d])=>(o[u]=d,o),{});for(let o of r){let u=o.route.id;if(!n.hasOwnProperty(u)&&e.hasOwnProperty(u)&&o.route.loader&&(l[u]=e[u]),a&&a.hasOwnProperty(u))break}return l}function cx(e){return e?mr(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function sa(e,n){return(n?e.slice(0,e.findIndex(a=>a.route.id===n)+1):[...e]).reverse().find(a=>a.route.hasErrorBoundary===!0)||e[0]}function Uc(e){let n=e.length===1?e[0]:e.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:n}],route:n}}function Cr(e,{pathname:n,routeId:r,method:a,type:l,message:o}={}){let u="Unknown Server Error",d="Unknown @remix-run/router error";return e===400?(u="Bad Request",a&&n&&r?d=`You made a ${a} request to "${n}" but did not provide a \`loader\` for route "${r}", so there is no way to handle the request.`:l==="invalid-body"&&(d="Unable to encode submission body")):e===403?(u="Forbidden",d=`Route "${r}" does not match URL "${n}"`):e===404?(u="Not Found",d=`No route matches URL "${n}"`):e===405&&(u="Method Not Allowed",a&&n&&r?d=`You made a ${a.toUpperCase()} request to "${n}" but did not provide an \`action\` for route "${r}", so there is no way to handle the request.`:a&&(d=`Invalid request method "${a.toUpperCase()}"`)),new yo(e||500,u,new Error(d),!0)}function Fc(e){let n=Object.entries(e);for(let r=n.length-1;r>=0;r--){let[a,l]=n[r];if(Ia(l))return{key:a,result:l}}}function _v(e){let n=typeof e=="string"?zi(e):e;return Wr({...n,hash:""})}function TS(e,n){return e.pathname!==n.pathname||e.search!==n.search?!1:e.hash===""?n.hash!=="":e.hash===n.hash?!0:n.hash!==""}function RS(e){return new yo(e.init?.status??500,e.init?.statusText??"Internal Server Error",e.data)}function AS(e){return e!=null&&typeof e=="object"&&Object.entries(e).every(([n,r])=>typeof n=="string"&&OS(r))}function OS(e){return e!=null&&typeof e=="object"&&"type"in e&&"result"in e&&(e.type==="data"||e.type==="error")}function MS(e){return hm(e.result)&&hv.has(e.result.status)}function mr(e){return e.type==="error"}function Ia(e){return(e&&e.type)==="redirect"}function ux(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function hm(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function DS(e){return hv.has(e)}function jS(e){return hm(e)&&DS(e.status)&&e.headers.has("Location")}function LS(e){return fS.has(e.toUpperCase())}function Bn(e){return uS.has(e.toUpperCase())}function mm(e){return new URLSearchParams(e).getAll("index").some(n=>n==="")}function ru(e,n){let r=typeof n=="string"?zi(n).search:n.search;if(e[e.length-1].route.index&&mm(r||""))return e[e.length-1];let a=ov(e);return a[a.length-1]}function dx(e){let{formMethod:n,formAction:r,formEncType:a,text:l,formData:o,json:u}=e;if(!(!n||!r||!a)){if(l!=null)return{formMethod:n,formAction:r,formEncType:a,formData:void 0,json:void 0,text:l};if(o!=null)return{formMethod:n,formAction:r,formEncType:a,formData:o,json:void 0,text:void 0};if(u!==void 0)return{formMethod:n,formAction:r,formEncType:a,formData:void 0,json:u,text:void 0}}}function th(e,n){return n?{state:"loading",location:e,formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function IS(e,n){return{state:"submitting",location:e,formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text}}function ql(e,n){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:n}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:n}}function BS(e,n){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:n?n.data:void 0}}function Si(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 US(e,n){try{let r=e.sessionStorage.getItem(mv);if(r){let a=JSON.parse(r);for(let[l,o]of Object.entries(a||{}))o&&Array.isArray(o)&&n.set(l,new Set(o||[]))}}catch{}}function FS(e,n){if(n.size>0){let r={};for(let[a,l]of n)r[a]=[...l];try{e.sessionStorage.setItem(mv,JSON.stringify(r))}catch(a){yn(!1,`Failed to save applied view transitions in sessionStorage (${a}).`)}}}function fx(){let e,n,r=new Promise((a,l)=>{e=async o=>{a(o);try{await r}catch{}},n=async o=>{l(o);try{await r}catch{}}});return{promise:r,resolve:e,reject:n}}var $a=S.createContext(null);$a.displayName="DataRouter";var ko=S.createContext(null);ko.displayName="DataRouterState";var Ev=S.createContext(!1);function PS(){return S.useContext(Ev)}var pm=S.createContext({isTransitioning:!1});pm.displayName="ViewTransition";var wv=S.createContext(new Map);wv.displayName="Fetchers";var HS=S.createContext(null);HS.displayName="Await";var Mr=S.createContext(null);Mr.displayName="Navigation";var Cu=S.createContext(null);Cu.displayName="Location";var Hr=S.createContext({outlet:null,matches:[],isDataRoute:!1});Hr.displayName="Route";var gm=S.createContext(null);gm.displayName="RouteError";var Sv="REACT_ROUTER_ERROR",qS="REDIRECT",$S="ROUTE_ERROR_RESPONSE";function GS(e){if(e.startsWith(`${Sv}:${qS}:{`))try{let n=JSON.parse(e.slice(28));if(typeof n=="object"&&n&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.location=="string"&&typeof n.reloadDocument=="boolean"&&typeof n.replace=="boolean")return n}catch{}}function KS(e){if(e.startsWith(`${Sv}:${$S}:{`))try{let n=JSON.parse(e.slice(40));if(typeof n=="object"&&n&&typeof n.status=="number"&&typeof n.statusText=="string")return new yo(n.status,n.statusText,n.data)}catch{}}function VS(e,{relative:n}={}){at(_o(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:a}=S.useContext(Mr),{hash:l,pathname:o,search:u}=Eo(e,{relative:n}),d=o;return r!=="/"&&(d=o==="/"?r:Ur([r,o])),a.createHref({pathname:d,search:u,hash:l})}function _o(){return S.useContext(Cu)!=null}function ei(){return at(_o(),"useLocation() may be used only in the context of a <Router> component."),S.useContext(Cu).location}var Nv="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function zv(e){S.useContext(Mr).static||S.useLayoutEffect(e)}function bm(){let{isDataRoute:e}=S.useContext(Hr);return e?oN():YS()}function YS(){at(_o(),"useNavigate() may be used only in the context of a <Router> component.");let e=S.useContext($a),{basename:n,navigator:r}=S.useContext(Mr),{matches:a}=S.useContext(Hr),{pathname:l}=ei(),o=JSON.stringify(dm(a)),u=S.useRef(!1);return zv(()=>{u.current=!0}),S.useCallback((h,m={})=>{if(yn(u.current,Nv),!u.current)return;if(typeof h=="number"){r.go(h);return}let b=zu(h,JSON.parse(o),l,m.relative==="path");e==null&&n!=="/"&&(b.pathname=b.pathname==="/"?n:Ur([n,b.pathname])),(m.replace?r.replace:r.push)(b,m.state,m)},[n,r,o,l,e])}var QS=S.createContext(null);function XS(e){let n=S.useContext(Hr).outlet;return S.useMemo(()=>n&&S.createElement(QS.Provider,{value:e},n),[n,e])}function Tu(){let{matches:e}=S.useContext(Hr),n=e[e.length-1];return n?n.params:{}}function Eo(e,{relative:n}={}){let{matches:r}=S.useContext(Hr),{pathname:a}=ei(),l=JSON.stringify(dm(r));return S.useMemo(()=>zu(e,JSON.parse(l),a,n==="path"),[e,l,a,n])}function ZS(e,n,r){at(_o(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=S.useContext(Mr),{matches:l}=S.useContext(Hr),o=l[l.length-1],u=o?o.params:{},d=o?o.pathname:"/",h=o?o.pathnameBase:"/",m=o&&o.route;{let w=m&&m.path||"";Tv(d,!m||w.endsWith("*")||w.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${d}" (under <Route path="${w}">) 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="${w}"> to <Route path="${w==="/"?"*":`${w}/*`}">.`)}let b=ei(),x;x=b;let y=x.pathname||"/",v=y;if(h!=="/"){let w=h.replace(/^\//,"").split("/");v="/"+y.replace(/^\//,"").split("/").slice(w.length).join("/")}let _=aa(e,{pathname:v});return yn(m||_!=null,`No routes matched location "${x.pathname}${x.search}${x.hash}" `),yn(_==null||_[_.length-1].route.element!==void 0||_[_.length-1].route.Component!==void 0||_[_.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.`),nN(_&&_.map(w=>Object.assign({},w,{params:Object.assign({},u,w.params),pathname:Ur([h,a.encodeLocation?a.encodeLocation(w.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?h:Ur([h,a.encodeLocation?a.encodeLocation(w.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:w.pathnameBase])})),l,r)}function WS(){let e=lN(),n=uo(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},u=null;return console.error("Error handled by React Router default ErrorBoundary:",e),u=S.createElement(S.Fragment,null,S.createElement("p",null,"💿 Hey developer 👋"),S.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",S.createElement("code",{style:o},"ErrorBoundary")," or"," ",S.createElement("code",{style:o},"errorElement")," prop on your route.")),S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},n),r?S.createElement("pre",{style:l},r):null,u)}var JS=S.createElement(WS,null),Cv=class extends S.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,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){this.props.onError?this.props.onError(e,n):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=KS(e.digest);r&&(e=r)}let n=e!==void 0?S.createElement(Hr.Provider,{value:this.props.routeContext},S.createElement(gm.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?S.createElement(eN,{error:e},n):n}};Cv.contextType=Ev;var nh=new WeakMap;function eN({children:e,error:n}){let{basename:r}=S.useContext(Mr);if(typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){let a=GS(n.digest);if(a){let l=nh.get(n);if(l)throw l;let o=uv(a.location,r);if(cv&&!nh.get(n))if(o.isExternal||a.reloadDocument)window.location.href=o.absoluteURL||o.to;else{const u=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:a.replace}));throw nh.set(n,u),u}return S.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return e}function tN({routeContext:e,match:n,children:r}){let a=S.useContext($a);return a&&a.static&&a.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=n.route.id),S.createElement(Hr.Provider,{value:e},r)}function nN(e,n=[],r){let a=r?.state;if(e==null){if(!a)return null;if(a.errors)e=a.matches;else if(n.length===0&&!a.initialized&&a.matches.length>0)e=a.matches;else return null}let l=e,o=a?.errors;if(o!=null){let b=l.findIndex(x=>x.route.id&&o?.[x.route.id]!==void 0);at(b>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),l=l.slice(0,Math.min(l.length,b+1))}let u=!1,d=-1;if(r&&a){u=a.renderFallback;for(let b=0;b<l.length;b++){let x=l[b];if((x.route.HydrateFallback||x.route.hydrateFallbackElement)&&(d=b),x.route.id){let{loaderData:y,errors:v}=a,_=x.route.loader&&!y.hasOwnProperty(x.route.id)&&(!v||v[x.route.id]===void 0);if(x.route.lazy||_){r.isStatic&&(u=!0),d>=0?l=l.slice(0,d+1):l=[l[0]];break}}}}let h=r?.onError,m=a&&h?(b,x)=>{h(b,{location:a.location,params:a.matches?.[0]?.params??{},unstable_pattern:vo(a.matches),errorInfo:x})}:void 0;return l.reduceRight((b,x,y)=>{let v,_=!1,E=null,w=null;a&&(v=o&&x.route.id?o[x.route.id]:void 0,E=x.route.errorElement||JS,u&&(d<0&&y===0?(Tv("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),_=!0,w=null):d===y&&(_=!0,w=x.route.hydrateFallbackElement||null)));let N=n.concat(l.slice(0,y+1)),M=()=>{let R;return v?R=E:_?R=w:x.route.Component?R=S.createElement(x.route.Component,null):x.route.element?R=x.route.element:R=b,S.createElement(tN,{match:x,routeContext:{outlet:b,matches:N,isDataRoute:a!=null},children:R})};return a&&(x.route.ErrorBoundary||x.route.errorElement||y===0)?S.createElement(Cv,{location:a.location,revalidation:a.revalidation,component:E,error:v,children:M(),routeContext:{outlet:null,matches:N,isDataRoute:!0},onError:m}):M()},null)}function xm(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function rN(e){let n=S.useContext($a);return at(n,xm(e)),n}function iN(e){let n=S.useContext(ko);return at(n,xm(e)),n}function aN(e){let n=S.useContext(Hr);return at(n,xm(e)),n}function ym(e){let n=aN(e),r=n.matches[n.matches.length-1];return at(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function sN(){return ym("useRouteId")}function lN(){let e=S.useContext(gm),n=iN("useRouteError"),r=ym("useRouteError");return e!==void 0?e:n.errors?.[r]}function oN(){let{router:e}=rN("useNavigate"),n=ym("useNavigate"),r=S.useRef(!1);return zv(()=>{r.current=!0}),S.useCallback(async(l,o={})=>{yn(r.current,Nv),r.current&&(typeof l=="number"?await e.navigate(l):await e.navigate(l,{fromRouteId:n,...o}))},[e,n])}var hx={};function Tv(e,n,r){!n&&!hx[e]&&(hx[e]=!0,yn(!1,r))}var mx={};function px(e,n){!e&&!mx[n]&&(mx[n]=!0,console.warn(n))}var cN="useOptimistic",gx=Ew[cN],uN=()=>{};function dN(e){return gx?gx(e):[e,uN]}function fN(e){let n={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&yn(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(n,{element:S.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&yn(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(n,{hydrateFallbackElement:S.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&yn(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(n,{errorElement:S.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),n}var hN=["HydrateFallback","hydrateFallbackElement"],mN=class{constructor(){this.status="pending",this.promise=new Promise((e,n)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",e(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}};function pN({router:e,flushSync:n,onError:r,unstable_useTransitions:a}){a=PS()||a;let[o,u]=S.useState(e.state),[d,h]=dN(o),[m,b]=S.useState(),[x,y]=S.useState({isTransitioning:!1}),[v,_]=S.useState(),[E,w]=S.useState(),[N,M]=S.useState(),R=S.useRef(new Map),U=S.useCallback((A,{deletedFetchers:ae,newErrors:H,flushSync:te,viewTransitionOpts:ee})=>{H&&r&&Object.values(H).forEach(oe=>r(oe,{location:A.location,params:A.matches[0]?.params??{},unstable_pattern:vo(A.matches)})),A.fetchers.forEach((oe,q)=>{oe.data!==void 0&&R.current.set(q,oe.data)}),ae.forEach(oe=>R.current.delete(oe)),px(te===!1||n!=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 ve=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition=="function";if(px(ee==null||ve,"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."),!ee||!ve){n&&te?n(()=>u(A)):a===!1?u(A):S.startTransition(()=>{a===!0&&h(oe=>bx(oe,A)),u(A)});return}if(n&&te){n(()=>{E&&(v?.resolve(),E.skipTransition()),y({isTransitioning:!0,flushSync:!0,currentLocation:ee.currentLocation,nextLocation:ee.nextLocation})});let oe=e.window.document.startViewTransition(()=>{n(()=>u(A))});oe.finished.finally(()=>{n(()=>{_(void 0),w(void 0),b(void 0),y({isTransitioning:!1})})}),n(()=>w(oe));return}E?(v?.resolve(),E.skipTransition(),M({state:A,currentLocation:ee.currentLocation,nextLocation:ee.nextLocation})):(b(A),y({isTransitioning:!0,flushSync:!1,currentLocation:ee.currentLocation,nextLocation:ee.nextLocation}))},[e.window,n,E,v,a,h,r]);S.useLayoutEffect(()=>e.subscribe(U),[e,U]),S.useEffect(()=>{x.isTransitioning&&!x.flushSync&&_(new mN)},[x]),S.useEffect(()=>{if(v&&m&&e.window){let A=m,ae=v.promise,H=e.window.document.startViewTransition(async()=>{a===!1?u(A):S.startTransition(()=>{a===!0&&h(te=>bx(te,A)),u(A)}),await ae});H.finished.finally(()=>{_(void 0),w(void 0),b(void 0),y({isTransitioning:!1})}),w(H)}},[m,v,e.window,a,h]),S.useEffect(()=>{v&&m&&d.location.key===m.location.key&&v.resolve()},[v,E,d.location,m]),S.useEffect(()=>{!x.isTransitioning&&N&&(b(N.state),y({isTransitioning:!0,flushSync:!1,currentLocation:N.currentLocation,nextLocation:N.nextLocation}),M(void 0))},[x.isTransitioning,N]);let $=S.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:A=>e.navigate(A),push:(A,ae,H)=>e.navigate(A,{state:ae,preventScrollReset:H?.preventScrollReset}),replace:(A,ae,H)=>e.navigate(A,{replace:!0,state:ae,preventScrollReset:H?.preventScrollReset})}),[e]),j=e.basename||"/",J=S.useMemo(()=>({router:e,navigator:$,static:!1,basename:j,onError:r}),[e,$,j,r]);return S.createElement(S.Fragment,null,S.createElement($a.Provider,{value:J},S.createElement(ko.Provider,{value:d},S.createElement(wv.Provider,{value:R.current},S.createElement(pm.Provider,{value:x},S.createElement(yN,{basename:j,location:d.location,navigationType:d.historyAction,navigator:$,unstable_useTransitions:a},S.createElement(gN,{routes:e.routes,future:e.future,state:d,isStatic:!1,onError:r})))))),null)}function bx(e,n){return{...e,navigation:n.navigation.state!=="idle"?n.navigation:e.navigation,revalidation:n.revalidation!=="idle"?n.revalidation:e.revalidation,actionData:n.navigation.state!=="submitting"?n.actionData:e.actionData,fetchers:n.fetchers}}var gN=S.memo(bN);function bN({routes:e,future:n,state:r,isStatic:a,onError:l}){return ZS(e,void 0,{state:r,isStatic:a,onError:l})}function xN(e){return XS(e.context)}function yN({basename:e="/",children:n=null,location:r,navigationType:a="POP",navigator:l,static:o=!1,unstable_useTransitions:u}){at(!_o(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let d=e.replace(/^\/*/,"/"),h=S.useMemo(()=>({basename:d,navigator:l,static:o,unstable_useTransitions:u,future:{}}),[d,l,o,u]);typeof r=="string"&&(r=zi(r));let{pathname:m="/",search:b="",hash:x="",state:y=null,key:v="default",unstable_mask:_}=r,E=S.useMemo(()=>{let w=Or(m,d);return w==null?null:{location:{pathname:w,search:b,hash:x,state:y,key:v,unstable_mask:_},navigationType:a}},[d,m,b,x,y,v,a,_]);return yn(E!=null,`<Router basename="${d}"> is not able to match the URL "${m}${b}${x}" because it does not start with the basename, so the <Router> won't render anything.`),E==null?null:S.createElement(Mr.Provider,{value:h},S.createElement(Cu.Provider,{children:n,value:E}))}var iu="get",au="application/x-www-form-urlencoded";function Ru(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function vN(e){return Ru(e)&&e.tagName.toLowerCase()==="button"}function kN(e){return Ru(e)&&e.tagName.toLowerCase()==="form"}function _N(e){return Ru(e)&&e.tagName.toLowerCase()==="input"}function EN(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function wN(e,n){return e.button===0&&(!n||n==="_self")&&!EN(e)}var Pc=null;function SN(){if(Pc===null)try{new FormData(document.createElement("form"),0),Pc=!1}catch{Pc=!0}return Pc}var NN=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function rh(e){return e!=null&&!NN.has(e)?(yn(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${au}"`),null):e}function zN(e,n){let r,a,l,o,u;if(kN(e)){let d=e.getAttribute("action");a=d?Or(d,n):null,r=e.getAttribute("method")||iu,l=rh(e.getAttribute("enctype"))||au,o=new FormData(e)}else if(vN(e)||_N(e)&&(e.type==="submit"||e.type==="image")){let d=e.form;if(d==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let h=e.getAttribute("formaction")||d.getAttribute("action");if(a=h?Or(h,n):null,r=e.getAttribute("formmethod")||d.getAttribute("method")||iu,l=rh(e.getAttribute("formenctype"))||rh(d.getAttribute("enctype"))||au,o=new FormData(d,e),!SN()){let{name:m,type:b,value:x}=e;if(b==="image"){let y=m?`${m}.`:"";o.append(`${y}x`,"0"),o.append(`${y}y`,"0")}else m&&o.append(m,x)}}else{if(Ru(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=iu,a=null,l=au,u=e}return o&&l==="text/plain"&&(u=o,o=void 0),{action:a,method:r.toLowerCase(),encType:l,formData:o,body:u}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function vm(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function CN(e,n,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}`:n&&Or(l.pathname,n)==="/"?l.pathname=`${n.replace(/\/$/,"")}/_root.${a}`:l.pathname=`${l.pathname.replace(/\/$/,"")}.${a}`,l}async function TN(e,n){if(e.id in n)return n[e.id];try{let r=await import(e.module);return n[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 RN(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 AN(e,n,r){let a=await Promise.all(e.map(async l=>{let o=n.routes[l.route.id];if(o){let u=await TN(o,r);return u.links?u.links():[]}return[]}));return jN(a.flat(1).filter(RN).filter(l=>l.rel==="stylesheet"||l.rel==="preload").map(l=>l.rel==="stylesheet"?{...l,rel:"prefetch",as:"style"}:{...l,rel:"prefetch"}))}function xx(e,n,r,a,l,o){let u=(h,m)=>r[m]?h.route.id!==r[m].route.id:!0,d=(h,m)=>r[m].pathname!==h.pathname||r[m].route.path?.endsWith("*")&&r[m].params["*"]!==h.params["*"];return o==="assets"?n.filter((h,m)=>u(h,m)||d(h,m)):o==="data"?n.filter((h,m)=>{let b=a.routes[h.route.id];if(!b||!b.hasLoader)return!1;if(u(h,m)||d(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 ON(e,n,{includeHydrateFallback:r}={}){return MN(e.map(a=>{let l=n.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 MN(e){return[...new Set(e)]}function DN(e){let n={},r=Object.keys(e).sort();for(let a of r)n[a]=e[a];return n}function jN(e,n){let r=new Set;return new Set(n),e.reduce((a,l)=>{let o=JSON.stringify(DN(l));return r.has(o)||(r.add(o),a.push({key:o,link:l})),a},[])}function Rv(){let e=S.useContext($a);return vm(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function LN(){let e=S.useContext(ko);return vm(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var km=S.createContext(void 0);km.displayName="FrameworkContext";function Av(){let e=S.useContext(km);return vm(e,"You must render this element inside a <HydratedRouter> element"),e}function IN(e,n){let r=S.useContext(km),[a,l]=S.useState(!1),[o,u]=S.useState(!1),{onFocus:d,onBlur:h,onMouseEnter:m,onMouseLeave:b,onTouchStart:x}=n,y=S.useRef(null);S.useEffect(()=>{if(e==="render"&&u(!0),e==="viewport"){let E=N=>{N.forEach(M=>{u(M.isIntersecting)})},w=new IntersectionObserver(E,{threshold:.5});return y.current&&w.observe(y.current),()=>{w.disconnect()}}},[e]),S.useEffect(()=>{if(a){let E=setTimeout(()=>{u(!0)},100);return()=>{clearTimeout(E)}}},[a]);let v=()=>{l(!0)},_=()=>{l(!1),u(!1)};return r?e!=="intent"?[o,y,{}]:[o,y,{onFocus:$l(d,v),onBlur:$l(h,_),onMouseEnter:$l(m,v),onMouseLeave:$l(b,_),onTouchStart:$l(x,v)}]:[!1,y,{}]}function $l(e,n){return r=>{e&&e(r),r.defaultPrevented||n(r)}}function BN({page:e,...n}){let{router:r}=Rv(),a=S.useMemo(()=>aa(r.routes,e,r.basename),[r.routes,e,r.basename]);return a?S.createElement(FN,{page:e,matches:a,...n}):null}function UN(e){let{manifest:n,routeModules:r}=Av(),[a,l]=S.useState([]);return S.useEffect(()=>{let o=!1;return AN(e,n,r).then(u=>{o||l(u)}),()=>{o=!0}},[e,n,r]),a}function FN({page:e,matches:n,...r}){let a=ei(),{future:l,manifest:o,routeModules:u}=Av(),{basename:d}=Rv(),{loaderData:h,matches:m}=LN(),b=S.useMemo(()=>xx(e,n,m,o,a,"data"),[e,n,m,o,a]),x=S.useMemo(()=>xx(e,n,m,o,a,"assets"),[e,n,m,o,a]),y=S.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let E=new Set,w=!1;if(n.forEach(M=>{let R=o.routes[M.route.id];!R||!R.hasLoader||(!b.some(U=>U.route.id===M.route.id)&&M.route.id in h&&u[M.route.id]?.shouldRevalidate||R.hasClientLoader?w=!0:E.add(M.route.id))}),E.size===0)return[];let N=CN(e,d,l.unstable_trailingSlashAwareDataRequests,"data");return w&&E.size>0&&N.searchParams.set("_routes",n.filter(M=>E.has(M.route.id)).map(M=>M.route.id).join(",")),[N.pathname+N.search]},[d,l.unstable_trailingSlashAwareDataRequests,h,a,o,b,n,e,u]),v=S.useMemo(()=>ON(x,o),[x,o]),_=UN(x);return S.createElement(S.Fragment,null,y.map(E=>S.createElement("link",{key:E,rel:"prefetch",as:"fetch",href:E,...r})),v.map(E=>S.createElement("link",{key:E,rel:"modulepreload",href:E,...r})),_.map(({key:E,link:w})=>S.createElement("link",{key:E,nonce:r.nonce,...w,crossOrigin:w.crossOrigin??r.crossOrigin})))}function PN(...e){return n=>{e.forEach(r=>{typeof r=="function"?r(n):r!=null&&(r.current=n)})}}var HN=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{HN&&(window.__reactRouterVersion="7.13.1")}catch{}function qN(e,n){return gS({basename:n?.basename,getContext:n?.getContext,future:n?.future,history:Ow({window:n?.window}),hydrationData:$N(),routes:e,mapRouteProperties:fN,hydrationRouteProperties:hN,dataStrategy:n?.dataStrategy,patchRoutesOnNavigation:n?.patchRoutesOnNavigation,window:n?.window,unstable_instrumentations:n?.unstable_instrumentations}).initialize()}function $N(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:GN(e.errors)}),e}function GN(e){if(!e)return null;let n=Object.entries(e),r={};for(let[a,l]of n)if(l&&l.__type==="RouteErrorResponse")r[a]=new yo(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 u=new o(l.message);u.stack="",r[a]=u}catch{}}if(r[a]==null){let o=new Error(l.message);o.stack="",r[a]=o}}else r[a]=l;return r}var Ov=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Dn=S.forwardRef(function({onClick:n,discover:r="render",prefetch:a="none",relative:l,reloadDocument:o,replace:u,unstable_mask:d,state:h,target:m,to:b,preventScrollReset:x,viewTransition:y,unstable_defaultShouldRevalidate:v,..._},E){let{basename:w,navigator:N,unstable_useTransitions:M}=S.useContext(Mr),R=typeof b=="string"&&Ov.test(b),U=uv(b,w);b=U.to;let $=VS(b,{relative:l}),j=ei(),J=null;if(d){let q=zu(d,[],j.unstable_mask?j.unstable_mask.pathname:"/",!0);w!=="/"&&(q.pathname=q.pathname==="/"?w:Ur([w,q.pathname])),J=N.createHref(q)}let[A,ae,H]=IN(a,_),te=QN(b,{replace:u,unstable_mask:d,state:h,target:m,preventScrollReset:x,relative:l,viewTransition:y,unstable_defaultShouldRevalidate:v,unstable_useTransitions:M});function ee(q){n&&n(q),q.defaultPrevented||te(q)}let ve=!(U.isExternal||o),oe=S.createElement("a",{..._,...H,href:(ve?J:void 0)||U.absoluteURL||$,onClick:ve?ee:n,ref:PN(E,ae),target:m,"data-discover":!R&&r==="render"?"true":void 0});return A&&!R?S.createElement(S.Fragment,null,oe,S.createElement(BN,{page:$})):oe});Dn.displayName="Link";var KN=S.forwardRef(function({"aria-current":n="page",caseSensitive:r=!1,className:a="",end:l=!1,style:o,to:u,viewTransition:d,children:h,...m},b){let x=Eo(u,{relative:m.relative}),y=ei(),v=S.useContext(ko),{navigator:_,basename:E}=S.useContext(Mr),w=v!=null&&ez(x)&&d===!0,N=_.encodeLocation?_.encodeLocation(x).pathname:x.pathname,M=y.pathname,R=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;r||(M=M.toLowerCase(),R=R?R.toLowerCase():null,N=N.toLowerCase()),R&&E&&(R=Or(R,E)||R);const U=N!=="/"&&N.endsWith("/")?N.length-1:N.length;let $=M===N||!l&&M.startsWith(N)&&M.charAt(U)==="/",j=R!=null&&(R===N||!l&&R.startsWith(N)&&R.charAt(N.length)==="/"),J={isActive:$,isPending:j,isTransitioning:w},A=$?n:void 0,ae;typeof a=="function"?ae=a(J):ae=[a,$?"active":null,j?"pending":null,w?"transitioning":null].filter(Boolean).join(" ");let H=typeof o=="function"?o(J):o;return S.createElement(Dn,{...m,"aria-current":A,className:ae,ref:b,style:H,to:u,viewTransition:d},typeof h=="function"?h(J):h)});KN.displayName="NavLink";var VN=S.forwardRef(({discover:e="render",fetcherKey:n,navigate:r,reloadDocument:a,replace:l,state:o,method:u=iu,action:d,onSubmit:h,relative:m,preventScrollReset:b,viewTransition:x,unstable_defaultShouldRevalidate:y,...v},_)=>{let{unstable_useTransitions:E}=S.useContext(Mr),w=WN(),N=JN(d,{relative:m}),M=u.toLowerCase()==="get"?"get":"post",R=typeof d=="string"&&Ov.test(d),U=$=>{if(h&&h($),$.defaultPrevented)return;$.preventDefault();let j=$.nativeEvent.submitter,J=j?.getAttribute("formmethod")||u,A=()=>w(j||$.currentTarget,{fetcherKey:n,method:J,navigate:r,replace:l,state:o,relative:m,preventScrollReset:b,viewTransition:x,unstable_defaultShouldRevalidate:y});E&&r!==!1?S.startTransition(()=>A()):A()};return S.createElement("form",{ref:_,method:M,action:N,onSubmit:a?h:U,...v,"data-discover":!R&&e==="render"?"true":void 0})});VN.displayName="Form";function YN(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Mv(e){let n=S.useContext($a);return at(n,YN(e)),n}function QN(e,{target:n,replace:r,unstable_mask:a,state:l,preventScrollReset:o,relative:u,viewTransition:d,unstable_defaultShouldRevalidate:h,unstable_useTransitions:m}={}){let b=bm(),x=ei(),y=Eo(e,{relative:u});return S.useCallback(v=>{if(wN(v,n)){v.preventDefault();let _=r!==void 0?r:Wr(x)===Wr(y),E=()=>b(e,{replace:_,unstable_mask:a,state:l,preventScrollReset:o,relative:u,viewTransition:d,unstable_defaultShouldRevalidate:h});m?S.startTransition(()=>E()):E()}},[x,b,y,r,a,l,n,e,o,u,d,h,m])}var XN=0,ZN=()=>`__${String(++XN)}__`;function WN(){let{router:e}=Mv("useSubmit"),{basename:n}=S.useContext(Mr),r=sN(),a=e.fetch,l=e.navigate;return S.useCallback(async(o,u={})=>{let{action:d,method:h,encType:m,formData:b,body:x}=zN(o,n);if(u.navigate===!1){let y=u.fetcherKey||ZN();await a(y,r,u.action||d,{unstable_defaultShouldRevalidate:u.unstable_defaultShouldRevalidate,preventScrollReset:u.preventScrollReset,formData:b,body:x,formMethod:u.method||h,formEncType:u.encType||m,flushSync:u.flushSync})}else await l(u.action||d,{unstable_defaultShouldRevalidate:u.unstable_defaultShouldRevalidate,preventScrollReset:u.preventScrollReset,formData:b,body:x,formMethod:u.method||h,formEncType:u.encType||m,replace:u.replace,state:u.state,fromRouteId:r,flushSync:u.flushSync,viewTransition:u.viewTransition})},[a,l,n,r])}function JN(e,{relative:n}={}){let{basename:r}=S.useContext(Mr),a=S.useContext(Hr);at(a,"useFormAction must be used inside a RouteContext");let[l]=a.matches.slice(-1),o={...Eo(e||".",{relative:n})},u=ei();if(e==null){o.search=u.search;let d=new URLSearchParams(o.search),h=d.getAll("index");if(h.some(b=>b==="")){d.delete("index"),h.filter(x=>x).forEach(x=>d.append("index",x));let b=d.toString();o.search=b?`?${b}`:""}}return(!e||e===".")&&l.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(o.pathname=o.pathname==="/"?r:Ur([r,o.pathname])),Wr(o)}function ez(e,{relative:n}={}){let r=S.useContext(pm);at(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=Mv("useViewTransitionState"),l=Eo(e,{relative:n});if(!r.isTransitioning)return!1;let o=Or(r.currentLocation.pathname,a)||r.currentLocation.pathname,u=Or(r.nextLocation.pathname,a)||r.nextLocation.pathname;return fu(l.pathname,u)!=null||fu(l.pathname,o)!=null}var tz=nv();function nz(e){return S.createElement(pN,{flushSync:tz.flushSync,...e})}const Dv=S.createContext(null),jv="ocr-dashboard-theme",ih=["system","light","dark"];function rz(){return typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function iz(){try{const e=localStorage.getItem(jv);if(e==="light"||e==="dark"||e==="system")return e}catch{}return"system"}function az({children:e}){const[n,r]=S.useState(iz),[a,l]=S.useState(rz);S.useEffect(()=>{const h=window.matchMedia("(prefers-color-scheme: dark)"),m=b=>{l(b.matches?"dark":"light")};return h.addEventListener("change",m),()=>h.removeEventListener("change",m)},[]);const o=n==="system"?a:n;S.useEffect(()=>{const h=document.documentElement;h.classList.remove("light","dark"),h.classList.add(o);const m=o==="dark"?"/favicon-light.ico":"/favicon-dark.ico",b=document.querySelector("link#favicon");b&&(b.href=m)},[o]),S.useEffect(()=>{try{localStorage.setItem(jv,n)}catch{}},[n]);const u=S.useCallback(()=>{r(h=>{const m=ih.indexOf(h);return ih[(m+1)%ih.length]})},[]),d=S.useMemo(()=>({mode:n,resolved:o,cycle:u,theme:n,toggleTheme:u}),[n,o,u]);return f.jsx(Dv,{value:d,children:e})}function Lv(){const e=S.useContext(Dv);if(!e)throw new Error("useTheme must be used within ThemeProvider");return e}const Jr=Object.create(null);Jr.open="0";Jr.close="1";Jr.ping="2";Jr.pong="3";Jr.message="4";Jr.upgrade="5";Jr.noop="6";const su=Object.create(null);Object.keys(Jr).forEach(e=>{su[Jr[e]]=e});const Bh={type:"error",data:"parser error"},Iv=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Bv=typeof ArrayBuffer=="function",Uv=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,_m=({type:e,data:n},r,a)=>Iv&&n instanceof Blob?r?a(n):yx(n,a):Bv&&(n instanceof ArrayBuffer||Uv(n))?r?a(n):yx(new Blob([n]),a):a(Jr[e]+(n||"")),yx=(e,n)=>{const r=new FileReader;return r.onload=function(){const a=r.result.split(",")[1];n("b"+(a||""))},r.readAsDataURL(e)};function vx(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let ah;function sz(e,n){if(Iv&&e.data instanceof Blob)return e.data.arrayBuffer().then(vx).then(n);if(Bv&&(e.data instanceof ArrayBuffer||Uv(e.data)))return n(vx(e.data));_m(e,!1,r=>{ah||(ah=new TextEncoder),n(ah.encode(r))})}const kx="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",eo=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<kx.length;e++)eo[kx.charCodeAt(e)]=e;const lz=e=>{let n=e.length*.75,r=e.length,a,l=0,o,u,d,h;e[e.length-1]==="="&&(n--,e[e.length-2]==="="&&n--);const m=new ArrayBuffer(n),b=new Uint8Array(m);for(a=0;a<r;a+=4)o=eo[e.charCodeAt(a)],u=eo[e.charCodeAt(a+1)],d=eo[e.charCodeAt(a+2)],h=eo[e.charCodeAt(a+3)],b[l++]=o<<2|u>>4,b[l++]=(u&15)<<4|d>>2,b[l++]=(d&3)<<6|h&63;return m},oz=typeof ArrayBuffer=="function",Em=(e,n)=>{if(typeof e!="string")return{type:"message",data:Fv(e,n)};const r=e.charAt(0);return r==="b"?{type:"message",data:cz(e.substring(1),n)}:su[r]?e.length>1?{type:su[r],data:e.substring(1)}:{type:su[r]}:Bh},cz=(e,n)=>{if(oz){const r=lz(e);return Fv(r,n)}else return{base64:!0,data:e}},Fv=(e,n)=>{switch(n){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},Pv="",uz=(e,n)=>{const r=e.length,a=new Array(r);let l=0;e.forEach((o,u)=>{_m(o,!1,d=>{a[u]=d,++l===r&&n(a.join(Pv))})})},dz=(e,n)=>{const r=e.split(Pv),a=[];for(let l=0;l<r.length;l++){const o=Em(r[l],n);if(a.push(o),o.type==="error")break}return a};function fz(){return new TransformStream({transform(e,n){sz(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),n.enqueue(l),n.enqueue(r)})}})}let sh;function Hc(e){return e.reduce((n,r)=>n+r.length,0)}function qc(e,n){if(e[0].length===n)return e.shift();const r=new Uint8Array(n);let a=0;for(let l=0;l<n;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 hz(e,n){sh||(sh=new TextDecoder);const r=[];let a=0,l=-1,o=!1;return new TransformStream({transform(u,d){for(r.push(u);;){if(a===0){if(Hc(r)<1)break;const h=qc(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(Hc(r)<2)break;const h=qc(r,2);l=new DataView(h.buffer,h.byteOffset,h.length).getUint16(0),a=3}else if(a===2){if(Hc(r)<8)break;const h=qc(r,8),m=new DataView(h.buffer,h.byteOffset,h.length),b=m.getUint32(0);if(b>Math.pow(2,21)-1){d.enqueue(Bh);break}l=b*Math.pow(2,32)+m.getUint32(4),a=3}else{if(Hc(r)<l)break;const h=qc(r,l);d.enqueue(Em(o?h:sh.decode(h),n)),a=0}if(l===0||l>e){d.enqueue(Bh);break}}}})}const Hv=4;function xn(e){if(e)return mz(e)}function mz(e){for(var n in xn.prototype)e[n]=xn.prototype[n];return e}xn.prototype.on=xn.prototype.addEventListener=function(e,n){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(n),this};xn.prototype.once=function(e,n){function r(){this.off(e,r),n.apply(this,arguments)}return r.fn=n,this.on(e,r),this};xn.prototype.off=xn.prototype.removeListener=xn.prototype.removeAllListeners=xn.prototype.removeEventListener=function(e,n){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===n||a.fn===n){r.splice(l,1);break}return r.length===0&&delete this._callbacks["$"+e],this};xn.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var n=new Array(arguments.length-1),r=this._callbacks["$"+e],a=1;a<arguments.length;a++)n[a-1]=arguments[a];if(r){r=r.slice(0);for(var a=0,l=r.length;a<l;++a)r[a].apply(this,n)}return this};xn.prototype.emitReserved=xn.prototype.emit;xn.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};xn.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Au=typeof Promise=="function"&&typeof Promise.resolve=="function"?n=>Promise.resolve().then(n):(n,r)=>r(n,0),Rr=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),pz="arraybuffer";function qv(e,...n){return n.reduce((r,a)=>(e.hasOwnProperty(a)&&(r[a]=e[a]),r),{})}const gz=Rr.setTimeout,bz=Rr.clearTimeout;function Ou(e,n){n.useNativeTimers?(e.setTimeoutFn=gz.bind(Rr),e.clearTimeoutFn=bz.bind(Rr)):(e.setTimeoutFn=Rr.setTimeout.bind(Rr),e.clearTimeoutFn=Rr.clearTimeout.bind(Rr))}const xz=1.33;function yz(e){return typeof e=="string"?vz(e):Math.ceil((e.byteLength||e.size)*xz)}function vz(e){let n=0,r=0;for(let a=0,l=e.length;a<l;a++)n=e.charCodeAt(a),n<128?r+=1:n<2048?r+=2:n<55296||n>=57344?r+=3:(a++,r+=4);return r}function $v(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function kz(e){let n="";for(let r in e)e.hasOwnProperty(r)&&(n.length&&(n+="&"),n+=encodeURIComponent(r)+"="+encodeURIComponent(e[r]));return n}function _z(e){let n={},r=e.split("&");for(let a=0,l=r.length;a<l;a++){let o=r[a].split("=");n[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return n}class Ez extends Error{constructor(n,r,a){super(n),this.description=r,this.context=a,this.type="TransportError"}}class wm extends xn{constructor(n){super(),this.writable=!1,Ou(this,n),this.opts=n,this.query=n.query,this.socket=n.socket,this.supportsBinary=!n.forceBase64}onError(n,r,a){return super.emitReserved("error",new Ez(n,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(n){this.readyState==="open"&&this.write(n)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(n){const r=Em(n,this.socket.binaryType);this.onPacket(r)}onPacket(n){super.emitReserved("packet",n)}onClose(n){this.readyState="closed",super.emitReserved("close",n)}pause(n){}createUri(n,r={}){return n+"://"+this._hostname()+this._port()+this.opts.path+this._query(r)}_hostname(){const n=this.opts.hostname;return n.indexOf(":")===-1?n:"["+n+"]"}_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(n){const r=kz(n);return r.length?"?"+r:""}}class wz extends wm{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(n){this.readyState="pausing";const r=()=>{this.readyState="paused",n()};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(n){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)};dz(n,this.socket.binaryType).forEach(r),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const n=()=>{this.write([{type:"close"}])};this.readyState==="open"?n():this.once("open",n)}write(n){this.writable=!1,uz(n,r=>{this.doWrite(r,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const n=this.opts.secure?"https":"http",r=this.query||{};return this.opts.timestampRequests!==!1&&(r[this.opts.timestampParam]=$v()),!this.supportsBinary&&!r.sid&&(r.b64=1),this.createUri(n,r)}}let Gv=!1;try{Gv=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Sz=Gv;function Nz(){}class zz extends wz{constructor(n){if(super(n),typeof location<"u"){const r=location.protocol==="https:";let a=location.port;a||(a=r?"443":"80"),this.xd=typeof location<"u"&&n.hostname!==location.hostname||a!==n.port}}doWrite(n,r){const a=this.request({method:"POST",data:n});a.on("success",r),a.on("error",(l,o)=>{this.onError("xhr post error",l,o)})}doPoll(){const n=this.request();n.on("data",this.onData.bind(this)),n.on("error",(r,a)=>{this.onError("xhr poll error",r,a)}),this.pollXhr=n}}let Bs=class lu extends xn{constructor(n,r,a){super(),this.createRequest=n,Ou(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 n;const r=qv(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{}(n=this._opts.cookieJar)===null||n===void 0||n.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=lu.requestsCount++,lu.requests[this._index]=this)}_onError(n){this.emitReserved("error",n,this._xhr),this._cleanup(!0)}_cleanup(n){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=Nz,n)try{this._xhr.abort()}catch{}typeof document<"u"&&delete lu.requests[this._index],this._xhr=null}}_onLoad(){const n=this._xhr.responseText;n!==null&&(this.emitReserved("data",n),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}};Bs.requestsCount=0;Bs.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",_x);else if(typeof addEventListener=="function"){const e="onpagehide"in Rr?"pagehide":"unload";addEventListener(e,_x,!1)}}function _x(){for(let e in Bs.requests)Bs.requests.hasOwnProperty(e)&&Bs.requests[e].abort()}const Cz=(function(){const e=Kv({xdomain:!1});return e&&e.responseType!==null})();class Tz extends zz{constructor(n){super(n);const r=n&&n.forceBase64;this.supportsBinary=Cz&&!r}request(n={}){return Object.assign(n,{xd:this.xd},this.opts),new Bs(Kv,this.uri(),n)}}function Kv(e){const n=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!n||Sz))return new XMLHttpRequest}catch{}if(!n)try{return new Rr[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const Vv=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Rz extends wm{get name(){return"websocket"}doOpen(){const n=this.uri(),r=this.opts.protocols,a=Vv?{}:qv(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(n,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=n=>this.onClose({description:"websocket connection closed",context:n}),this.ws.onmessage=n=>this.onData(n.data),this.ws.onerror=n=>this.onError("websocket error",n)}write(n){this.writable=!1;for(let r=0;r<n.length;r++){const a=n[r],l=r===n.length-1;_m(a,this.supportsBinary,o=>{try{this.doWrite(a,o)}catch{}l&&Au(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const n=this.opts.secure?"wss":"ws",r=this.query||{};return this.opts.timestampRequests&&(r[this.opts.timestampParam]=$v()),this.supportsBinary||(r.b64=1),this.createUri(n,r)}}const lh=Rr.WebSocket||Rr.MozWebSocket;class Az extends Rz{createSocket(n,r,a){return Vv?new lh(n,r,a):r?new lh(n,r):new lh(n)}doWrite(n,r){this.ws.send(r)}}class Oz extends wm{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(n){return this.emitReserved("error",n)}this._transport.closed.then(()=>{this.onClose()}).catch(n=>{this.onError("webtransport error",n)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(n=>{const r=hz(Number.MAX_SAFE_INTEGER,this.socket.binaryType),a=n.readable.pipeThrough(r).getReader(),l=fz();l.readable.pipeTo(n.writable),this._writer=l.writable.getWriter();const o=()=>{a.read().then(({done:d,value:h})=>{d||(this.onPacket(h),o())}).catch(d=>{})};o();const u={type:"open"};this.query.sid&&(u.data=`{"sid":"${this.query.sid}"}`),this._writer.write(u).then(()=>this.onOpen())})})}write(n){this.writable=!1;for(let r=0;r<n.length;r++){const a=n[r],l=r===n.length-1;this._writer.write(a).then(()=>{l&&Au(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var n;(n=this._transport)===null||n===void 0||n.close()}}const Mz={websocket:Az,webtransport:Oz,polling:Tz},Dz=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,jz=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Uh(e){if(e.length>8e3)throw"URI too long";const n=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=Dz.exec(e||""),o={},u=14;for(;u--;)o[jz[u]]=l[u]||"";return r!=-1&&a!=-1&&(o.source=n,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=Lz(o,o.path),o.queryKey=Iz(o,o.query),o}function Lz(e,n){const r=/\/{2,9}/g,a=n.replace(r,"/").split("/");return(n.slice(0,1)=="/"||n.length===0)&&a.splice(0,1),n.slice(-1)=="/"&&a.splice(a.length-1,1),a}function Iz(e,n){const r={};return n.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(a,l,o){l&&(r[l]=o)}),r}const Fh=typeof addEventListener=="function"&&typeof removeEventListener=="function",ou=[];Fh&&addEventListener("offline",()=>{ou.forEach(e=>e())},!1);class ca extends xn{constructor(n,r){if(super(),this.binaryType=pz,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,n&&typeof n=="object"&&(r=n,n=null),n){const a=Uh(n);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=Uh(r.host).host);Ou(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=_z(this.opts.query)),Fh&&(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"})},ou.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(n){const r=Object.assign({},this.opts.query);r.EIO=Hv,r.transport=n,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[n]);return new this._transportsByName[n](a)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const n=this.opts.rememberUpgrade&&ca.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const r=this.createTransport(n);r.open(),this.setTransport(r)}setTransport(n){this.transport&&this.transport.removeAllListeners(),this.transport=n,n.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",ca.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",n),this.emitReserved("heartbeat"),n.type){case"open":this.onHandshake(JSON.parse(n.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=n.data,this._onError(r);break;case"message":this.emitReserved("data",n.data),this.emitReserved("message",n.data);break}}onHandshake(n){this.emitReserved("handshake",n),this.id=n.sid,this.transport.query.sid=n.sid,this._pingInterval=n.pingInterval,this._pingTimeout=n.pingTimeout,this._maxPayload=n.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const n=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+n,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},n),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 n=this._getWritablePackets();this.transport.send(n),this._prevBufferLen=n.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+=yz(l)),a>0&&r>this._maxPayload)return this.writeBuffer.slice(0,a);r+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const n=Date.now()>this._pingTimeoutTime;return n&&(this._pingTimeoutTime=0,Au(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),n}write(n,r,a){return this._sendPacket("message",n,r,a),this}send(n,r,a){return this._sendPacket("message",n,r,a),this}_sendPacket(n,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:n,data:r,options:a};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),l&&this.once("flush",l),this.flush()}close(){const n=()=>{this._onClose("forced close"),this.transport.close()},r=()=>{this.off("upgrade",r),this.off("upgradeError",r),n()},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():n()}):this.upgrading?a():n()),this}_onError(n){if(ca.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",n),this._onClose("transport error",n)}_onClose(n,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(),Fh&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const a=ou.indexOf(this._offlineEventListener);a!==-1&&ou.splice(a,1)}this.readyState="closed",this.id=null,this.emitReserved("close",n,r),this.writeBuffer=[],this._prevBufferLen=0}}}ca.protocol=Hv;class Bz extends ca{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let n=0;n<this._upgrades.length;n++)this._probe(this._upgrades[n])}_probe(n){let r=this.createTransport(n),a=!1;ca.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;ca.priorWebsocketSuccess=r.name==="websocket",this.transport.pause(()=>{a||this.readyState!=="closed"&&(b(),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,b(),r.close(),r=null)}const u=x=>{const y=new Error("probe error: "+x);y.transport=r.name,o(),this.emitReserved("upgradeError",y)};function d(){u("transport closed")}function h(){u("socket closed")}function m(x){r&&x.name!==r.name&&o()}const b=()=>{r.removeListener("open",l),r.removeListener("error",u),r.removeListener("close",d),this.off("close",h),this.off("upgrading",m)};r.once("open",l),r.once("error",u),r.once("close",d),this.once("close",h),this.once("upgrading",m),this._upgrades.indexOf("webtransport")!==-1&&n!=="webtransport"?this.setTimeoutFn(()=>{a||r.open()},200):r.open()}onHandshake(n){this._upgrades=this._filterUpgrades(n.upgrades),super.onHandshake(n)}_filterUpgrades(n){const r=[];for(let a=0;a<n.length;a++)~this.transports.indexOf(n[a])&&r.push(n[a]);return r}}let Uz=class extends Bz{constructor(n,r={}){const a=typeof n=="object"?n:r;(!a.transports||a.transports&&typeof a.transports[0]=="string")&&(a.transports=(a.transports||["polling","websocket","webtransport"]).map(l=>Mz[l]).filter(l=>!!l)),super(n,a)}};function Fz(e,n="",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=Uh(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+n,a.href=a.protocol+"://"+o+(r&&r.port===a.port?"":":"+a.port),a}const Pz=typeof ArrayBuffer=="function",Hz=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,Yv=Object.prototype.toString,qz=typeof Blob=="function"||typeof Blob<"u"&&Yv.call(Blob)==="[object BlobConstructor]",$z=typeof File=="function"||typeof File<"u"&&Yv.call(File)==="[object FileConstructor]";function Sm(e){return Pz&&(e instanceof ArrayBuffer||Hz(e))||qz&&e instanceof Blob||$z&&e instanceof File}function cu(e,n){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let r=0,a=e.length;r<a;r++)if(cu(e[r]))return!0;return!1}if(Sm(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return cu(e.toJSON(),!0);for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&cu(e[r]))return!0;return!1}function Gz(e){const n=[],r=e.data,a=e;return a.data=Ph(r,n),a.attachments=n.length,{packet:a,buffers:n}}function Ph(e,n){if(!e)return e;if(Sm(e)){const r={_placeholder:!0,num:n.length};return n.push(e),r}else if(Array.isArray(e)){const r=new Array(e.length);for(let a=0;a<e.length;a++)r[a]=Ph(e[a],n);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]=Ph(e[a],n));return r}return e}function Kz(e,n){return e.data=Hh(e.data,n),delete e.attachments,e}function Hh(e,n){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<n.length)return n[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let r=0;r<e.length;r++)e[r]=Hh(e[r],n);else if(typeof e=="object")for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(e[r]=Hh(e[r],n));return e}const Vz=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var xt;(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"})(xt||(xt={}));class Yz{constructor(n){this.replacer=n}encode(n){return(n.type===xt.EVENT||n.type===xt.ACK)&&cu(n)?this.encodeAsBinary({type:n.type===xt.EVENT?xt.BINARY_EVENT:xt.BINARY_ACK,nsp:n.nsp,data:n.data,id:n.id}):[this.encodeAsString(n)]}encodeAsString(n){let r=""+n.type;return(n.type===xt.BINARY_EVENT||n.type===xt.BINARY_ACK)&&(r+=n.attachments+"-"),n.nsp&&n.nsp!=="/"&&(r+=n.nsp+","),n.id!=null&&(r+=n.id),n.data!=null&&(r+=JSON.stringify(n.data,this.replacer)),r}encodeAsBinary(n){const r=Gz(n),a=this.encodeAsString(r.packet),l=r.buffers;return l.unshift(a),l}}class Nm extends xn{constructor(n){super(),this.reviver=n}add(n){let r;if(typeof n=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");r=this.decodeString(n);const a=r.type===xt.BINARY_EVENT;a||r.type===xt.BINARY_ACK?(r.type=a?xt.EVENT:xt.ACK,this.reconstructor=new Qz(r),r.attachments===0&&super.emitReserved("decoded",r)):super.emitReserved("decoded",r)}else if(Sm(n)||n.base64)if(this.reconstructor)r=this.reconstructor.takeBinaryData(n),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: "+n)}decodeString(n){let r=0;const a={type:Number(n.charAt(0))};if(xt[a.type]===void 0)throw new Error("unknown packet type "+a.type);if(a.type===xt.BINARY_EVENT||a.type===xt.BINARY_ACK){const o=r+1;for(;n.charAt(++r)!=="-"&&r!=n.length;);const u=n.substring(o,r);if(u!=Number(u)||n.charAt(r)!=="-")throw new Error("Illegal attachments");a.attachments=Number(u)}if(n.charAt(r+1)==="/"){const o=r+1;for(;++r&&!(n.charAt(r)===","||r===n.length););a.nsp=n.substring(o,r)}else a.nsp="/";const l=n.charAt(r+1);if(l!==""&&Number(l)==l){const o=r+1;for(;++r;){const u=n.charAt(r);if(u==null||Number(u)!=u){--r;break}if(r===n.length)break}a.id=Number(n.substring(o,r+1))}if(n.charAt(++r)){const o=this.tryParse(n.substr(r));if(Nm.isPayloadValid(a.type,o))a.data=o;else throw new Error("invalid payload")}return a}tryParse(n){try{return JSON.parse(n,this.reviver)}catch{return!1}}static isPayloadValid(n,r){switch(n){case xt.CONNECT:return Ex(r);case xt.DISCONNECT:return r===void 0;case xt.CONNECT_ERROR:return typeof r=="string"||Ex(r);case xt.EVENT:case xt.BINARY_EVENT:return Array.isArray(r)&&(typeof r[0]=="number"||typeof r[0]=="string"&&Vz.indexOf(r[0])===-1);case xt.ACK:case xt.BINARY_ACK:return Array.isArray(r)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Qz{constructor(n){this.packet=n,this.buffers=[],this.reconPack=n}takeBinaryData(n){if(this.buffers.push(n),this.buffers.length===this.reconPack.attachments){const r=Kz(this.reconPack,this.buffers);return this.finishedReconstruction(),r}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function Ex(e){return Object.prototype.toString.call(e)==="[object Object]"}const Xz=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Nm,Encoder:Yz,get PacketType(){return xt}},Symbol.toStringTag,{value:"Module"}));function Br(e,n,r){return e.on(n,r),function(){e.off(n,r)}}const Zz=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Qv extends xn{constructor(n,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=n,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 n=this.io;this.subs=[Br(n,"open",this.onopen.bind(this)),Br(n,"packet",this.onpacket.bind(this)),Br(n,"error",this.onerror.bind(this)),Br(n,"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(...n){return n.unshift("message"),this.emit.apply(this,n),this}emit(n,...r){var a,l,o;if(Zz.hasOwnProperty(n))throw new Error('"'+n.toString()+'" is a reserved event name');if(r.unshift(n),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(r),this;const u={type:xt.EVENT,data:r};if(u.options={},u.options.compress=this.flags.compress!==!1,typeof r[r.length-1]=="function"){const b=this.ids++,x=r.pop();this._registerAckCallback(b,x),u.id=b}const d=(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&&!d||(h?(this.notifyOutgoingListeners(u),this.packet(u)):this.sendBuffer.push(u)),this.flags={},this}_registerAckCallback(n,r){var a;const l=(a=this.flags.timeout)!==null&&a!==void 0?a:this._opts.ackTimeout;if(l===void 0){this.acks[n]=r;return}const o=this.io.setTimeoutFn(()=>{delete this.acks[n];for(let d=0;d<this.sendBuffer.length;d++)this.sendBuffer[d].id===n&&this.sendBuffer.splice(d,1);r.call(this,new Error("operation has timed out"))},l),u=(...d)=>{this.io.clearTimeoutFn(o),r.apply(this,d)};u.withError=!0,this.acks[n]=u}emitWithAck(n,...r){return new Promise((a,l)=>{const o=(u,d)=>u?l(u):a(d);o.withError=!0,r.push(o),this.emit(n,...r)})}_addToQueue(n){let r;typeof n[n.length-1]=="function"&&(r=n.pop());const a={id:this._queueSeq++,tryCount:0,pending:!1,args:n,flags:Object.assign({fromQueue:!0},this.flags)};n.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(n=!1){if(!this.connected||this._queue.length===0)return;const r=this._queue[0];r.pending&&!n||(r.pending=!0,r.tryCount++,this.flags=r.flags,this.emit.apply(this,r.args))}packet(n){n.nsp=this.nsp,this.io._packet(n)}onopen(){typeof this.auth=="function"?this.auth(n=>{this._sendConnectPacket(n)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(n){this.packet({type:xt.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},n):n})}onerror(n){this.connected||this.emitReserved("connect_error",n)}onclose(n,r){this.connected=!1,delete this.id,this.emitReserved("disconnect",n,r),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(n=>{if(!this.sendBuffer.some(a=>String(a.id)===n)){const a=this.acks[n];delete this.acks[n],a.withError&&a.call(this,new Error("socket has been disconnected"))}})}onpacket(n){if(n.nsp===this.nsp)switch(n.type){case xt.CONNECT:n.data&&n.data.sid?this.onconnect(n.data.sid,n.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 xt.EVENT:case xt.BINARY_EVENT:this.onevent(n);break;case xt.ACK:case xt.BINARY_ACK:this.onack(n);break;case xt.DISCONNECT:this.ondisconnect();break;case xt.CONNECT_ERROR:this.destroy();const a=new Error(n.data.message);a.data=n.data.data,this.emitReserved("connect_error",a);break}}onevent(n){const r=n.data||[];n.id!=null&&r.push(this.ack(n.id)),this.connected?this.emitEvent(r):this.receiveBuffer.push(Object.freeze(r))}emitEvent(n){if(this._anyListeners&&this._anyListeners.length){const r=this._anyListeners.slice();for(const a of r)a.apply(this,n)}super.emit.apply(this,n),this._pid&&n.length&&typeof n[n.length-1]=="string"&&(this._lastOffset=n[n.length-1])}ack(n){const r=this;let a=!1;return function(...l){a||(a=!0,r.packet({type:xt.ACK,id:n,data:l}))}}onack(n){const r=this.acks[n.id];typeof r=="function"&&(delete this.acks[n.id],r.withError&&n.data.unshift(null),r.apply(this,n.data))}onconnect(n,r){this.id=n,this.recovered=r&&this._pid===r,this._pid=r,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(n=>this.emitEvent(n)),this.receiveBuffer=[],this.sendBuffer.forEach(n=>{this.notifyOutgoingListeners(n),this.packet(n)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(n=>n()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:xt.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(n){return this.flags.compress=n,this}get volatile(){return this.flags.volatile=!0,this}timeout(n){return this.flags.timeout=n,this}onAny(n){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(n),this}prependAny(n){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(n),this}offAny(n){if(!this._anyListeners)return this;if(n){const r=this._anyListeners;for(let a=0;a<r.length;a++)if(n===r[a])return r.splice(a,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(n){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(n),this}prependAnyOutgoing(n){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(n),this}offAnyOutgoing(n){if(!this._anyOutgoingListeners)return this;if(n){const r=this._anyOutgoingListeners;for(let a=0;a<r.length;a++)if(n===r[a])return r.splice(a,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(n){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const r=this._anyOutgoingListeners.slice();for(const a of r)a.apply(this,n.data)}}}function Hs(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}Hs.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var n=Math.random(),r=Math.floor(n*this.jitter*e);e=(Math.floor(n*10)&1)==0?e-r:e+r}return Math.min(e,this.max)|0};Hs.prototype.reset=function(){this.attempts=0};Hs.prototype.setMin=function(e){this.ms=e};Hs.prototype.setMax=function(e){this.max=e};Hs.prototype.setJitter=function(e){this.jitter=e};class qh extends xn{constructor(n,r){var a;super(),this.nsps={},this.subs=[],n&&typeof n=="object"&&(r=n,n=void 0),r=r||{},r.path=r.path||"/socket.io",this.opts=r,Ou(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 Hs({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(r.timeout==null?2e4:r.timeout),this._readyState="closed",this.uri=n;const l=r.parser||Xz;this.encoder=new l.Encoder,this.decoder=new l.Decoder,this._autoConnect=r.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(n){return arguments.length?(this._reconnection=!!n,n||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(n){return n===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=n,this)}reconnectionDelay(n){var r;return n===void 0?this._reconnectionDelay:(this._reconnectionDelay=n,(r=this.backoff)===null||r===void 0||r.setMin(n),this)}randomizationFactor(n){var r;return n===void 0?this._randomizationFactor:(this._randomizationFactor=n,(r=this.backoff)===null||r===void 0||r.setJitter(n),this)}reconnectionDelayMax(n){var r;return n===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=n,(r=this.backoff)===null||r===void 0||r.setMax(n),this)}timeout(n){return arguments.length?(this._timeout=n,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(n){if(~this._readyState.indexOf("open"))return this;this.engine=new Uz(this.uri,this.opts);const r=this.engine,a=this;this._readyState="opening",this.skipReconnect=!1;const l=Br(r,"open",function(){a.onopen(),n&&n()}),o=d=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",d),n?n(d):this.maybeReconnectOnOpen()},u=Br(r,"error",o);if(this._timeout!==!1){const d=this._timeout,h=this.setTimeoutFn(()=>{l(),o(new Error("timeout")),r.close()},d);this.opts.autoUnref&&h.unref(),this.subs.push(()=>{this.clearTimeoutFn(h)})}return this.subs.push(l),this.subs.push(u),this}connect(n){return this.open(n)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const n=this.engine;this.subs.push(Br(n,"ping",this.onping.bind(this)),Br(n,"data",this.ondata.bind(this)),Br(n,"error",this.onerror.bind(this)),Br(n,"close",this.onclose.bind(this)),Br(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(n){try{this.decoder.add(n)}catch(r){this.onclose("parse error",r)}}ondecoded(n){Au(()=>{this.emitReserved("packet",n)},this.setTimeoutFn)}onerror(n){this.emitReserved("error",n)}socket(n,r){let a=this.nsps[n];return a?this._autoConnect&&!a.active&&a.connect():(a=new Qv(this,n,r),this.nsps[n]=a),a}_destroy(n){const r=Object.keys(this.nsps);for(const a of r)if(this.nsps[a].active)return;this._close()}_packet(n){const r=this.encoder.encode(n);for(let a=0;a<r.length;a++)this.engine.write(r[a],n.options)}cleanup(){this.subs.forEach(n=>n()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(n,r){var a;this.cleanup(),(a=this.engine)===null||a===void 0||a.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",n,r),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const n=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(()=>{n.skipReconnect||(this.emitReserved("reconnect_attempt",n.backoff.attempts),!n.skipReconnect&&n.open(l=>{l?(n._reconnecting=!1,n.reconnect(),this.emitReserved("reconnect_error",l)):n.onreconnect()}))},r);this.opts.autoUnref&&a.unref(),this.subs.push(()=>{this.clearTimeoutFn(a)})}}onreconnect(){const n=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",n)}}const Gl={};function uu(e,n){typeof e=="object"&&(n=e,e=void 0),n=n||{};const r=Fz(e,n.path||"/socket.io"),a=r.source,l=r.id,o=r.path,u=Gl[l]&&o in Gl[l].nsps,d=n.forceNew||n["force new connection"]||n.multiplex===!1||u;let h;return d?h=new qh(a,n):(Gl[l]||(Gl[l]=new qh(a,n)),h=Gl[l]),r.query&&!n.query&&(n.query=r.queryKey),h.socket(r.path,n)}Object.assign(uu,{Manager:qh,Socket:Qv,io:uu,connect:uu});let to=null,oh=null;function Xv(){return to||(window.__OCR_TOKEN__?(to=window.__OCR_TOKEN__,to):null)}async function Zv(){const e=Xv();return e||(oh||(oh=fetch("/auth/token").then(n=>{if(!n.ok)throw new Error(`Failed to fetch auth token: ${n.status}`);return n.json()}).then(n=>(to=n.token,window.__OCR_TOKEN__=n.token,n.token))),oh)}function Wz(){const e=Xv();return e?{Authorization:`Bearer ${e}`}:{}}const Wv=S.createContext(null);function Jz({children:e}){const[n,r]=S.useState("connecting"),a=S.useRef(null),l=S.useRef(new Set);S.useEffect(()=>{let h=!1;return Zv().then(m=>{if(h)return;const b=uu({autoConnect:!0,reconnection:!0,reconnectionAttempts:1/0,reconnectionDelay:1e3,reconnectionDelayMax:5e3,auth:{token:m}});a.current=b,b.on("connect",()=>{r("connected");for(const x of l.current)b.emit("join:session",x)}),b.on("disconnect",()=>{r("disconnected")}),b.io.on("reconnect_attempt",()=>{r("reconnecting")})}),()=>{h=!0,a.current?.disconnect(),a.current=null}},[]);const o=S.useCallback(h=>{l.current.add(h),a.current?.emit("join:session",h)},[]),u=S.useCallback(h=>{l.current.delete(h),a.current?.emit("leave:session",h)},[]),d=S.useMemo(()=>({socket:a.current,status:n,isConnected:n==="connected",joinRoom:o,leaveRoom:u}),[n,o,u]);return f.jsx(Wv,{value:d,children:e})}function Ci(){const e=S.useContext(Wv);if(!e)throw new Error("useSocket must be used within SocketProvider");return e}function dt(e,n){const{socket:r}=Ci(),a=S.useRef(n);a.current=n,S.useEffect(()=>{if(!r)return;const l=o=>a.current(o);return r.on(e,l),()=>{r.off(e,l)}},[r,e])}var qs=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(){}},eC={setTimeout:(e,n)=>setTimeout(e,n),clearTimeout:e=>clearTimeout(e),setInterval:(e,n)=>setInterval(e,n),clearInterval:e=>clearInterval(e)},tC=class{#e=eC;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,n){return this.#e.setTimeout(e,n)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,n){return this.#e.setInterval(e,n)}clearInterval(e){this.#e.clearInterval(e)}},Ba=new tC;function nC(e){setTimeout(e,0)}var Fa=typeof window>"u"||"Deno"in globalThis;function $n(){}function rC(e,n){return typeof e=="function"?e(n):e}function $h(e){return typeof e=="number"&&e>=0&&e!==1/0}function Jv(e,n){return Math.max(e+(n||0)-Date.now(),0)}function ua(e,n){return typeof e=="function"?e(n):e}function Tr(e,n){return typeof e=="function"?e(n):e}function wx(e,n){const{type:r="all",exact:a,fetchStatus:l,predicate:o,queryKey:u,stale:d}=e;if(u){if(a){if(n.queryHash!==zm(u,n.options))return!1}else if(!fo(n.queryKey,u))return!1}if(r!=="all"){const h=n.isActive();if(r==="active"&&!h||r==="inactive"&&h)return!1}return!(typeof d=="boolean"&&n.isStale()!==d||l&&l!==n.state.fetchStatus||o&&!o(n))}function Sx(e,n){const{exact:r,status:a,predicate:l,mutationKey:o}=e;if(o){if(!n.options.mutationKey)return!1;if(r){if(Pa(n.options.mutationKey)!==Pa(o))return!1}else if(!fo(n.options.mutationKey,o))return!1}return!(a&&n.state.status!==a||l&&!l(n))}function zm(e,n){return(n?.queryKeyHashFn||Pa)(e)}function Pa(e){return JSON.stringify(e,(n,r)=>Gh(r)?Object.keys(r).sort().reduce((a,l)=>(a[l]=r[l],a),{}):r)}function fo(e,n){return e===n?!0:typeof e!=typeof n?!1:e&&n&&typeof e=="object"&&typeof n=="object"?Object.keys(n).every(r=>fo(e[r],n[r])):!1}var iC=Object.prototype.hasOwnProperty;function e1(e,n,r=0){if(e===n)return e;if(r>500)return n;const a=Nx(e)&&Nx(n);if(!a&&!(Gh(e)&&Gh(n)))return n;const o=(a?e:Object.keys(e)).length,u=a?n:Object.keys(n),d=u.length,h=a?new Array(d):{};let m=0;for(let b=0;b<d;b++){const x=a?b:u[b],y=e[x],v=n[x];if(y===v){h[x]=y,(a?b<o:iC.call(e,x))&&m++;continue}if(y===null||v===null||typeof y!="object"||typeof v!="object"){h[x]=v;continue}const _=e1(y,v,r+1);h[x]=_,_===y&&m++}return o===d&&m===o?e:h}function hu(e,n){if(!n||Object.keys(e).length!==Object.keys(n).length)return!1;for(const r in e)if(e[r]!==n[r])return!1;return!0}function Nx(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Gh(e){if(!zx(e))return!1;const n=e.constructor;if(n===void 0)return!0;const r=n.prototype;return!(!zx(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function zx(e){return Object.prototype.toString.call(e)==="[object Object]"}function aC(e){return new Promise(n=>{Ba.setTimeout(n,e)})}function Kh(e,n,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,n):r.structuralSharing!==!1?e1(e,n):n}function sC(e,n,r=0){const a=[...e,n];return r&&a.length>r?a.slice(1):a}function lC(e,n,r=0){const a=[n,...e];return r&&a.length>r?a.slice(0,-1):a}var Cm=Symbol();function t1(e,n){return!e.queryFn&&n?.initialPromise?()=>n.initialPromise:!e.queryFn||e.queryFn===Cm?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Tm(e,n){return typeof e=="function"?e(...n):!!e}function oC(e,n,r){let a=!1,l;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(l??=n(),a||(a=!0,l.aborted?r():l.addEventListener("abort",r,{once:!0})),l)}),e}var cC=class extends qs{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!Fa&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}}}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(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(n=>{n(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},Rm=new cC;function Vh(){let e,n;const r=new Promise((l,o)=>{e=l,n=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}),n(l)},r}var uC=nC;function dC(){let e=[],n=0,r=d=>{d()},a=d=>{d()},l=uC;const o=d=>{n?e.push(d):l(()=>{r(d)})},u=()=>{const d=e;e=[],d.length&&l(()=>{a(()=>{d.forEach(h=>{r(h)})})})};return{batch:d=>{let h;n++;try{h=d()}finally{n--,n||u()}return h},batchCalls:d=>(...h)=>{o(()=>{d(...h)})},schedule:o,setNotifyFunction:d=>{r=d},setBatchNotifyFunction:d=>{a=d},setScheduler:d=>{l=d}}}var wn=dC(),fC=class extends qs{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!Fa&&window.addEventListener){const n=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),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}},mu=new fC;function hC(e){return Math.min(1e3*2**e,3e4)}function n1(e){return(e??"online")==="online"?mu.isOnline():!0}var Yh=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function r1(e){let n=!1,r=0,a;const l=Vh(),o=()=>l.status!=="pending",u=E=>{if(!o()){const w=new Yh(E);y(w),e.onCancel?.(w)}},d=()=>{n=!0},h=()=>{n=!1},m=()=>Rm.isFocused()&&(e.networkMode==="always"||mu.isOnline())&&e.canRun(),b=()=>n1(e.networkMode)&&e.canRun(),x=E=>{o()||(a?.(),l.resolve(E))},y=E=>{o()||(a?.(),l.reject(E))},v=()=>new Promise(E=>{a=w=>{(o()||m())&&E(w)},e.onPause?.()}).then(()=>{a=void 0,o()||e.onContinue?.()}),_=()=>{if(o())return;let E;const w=r===0?e.initialPromise:void 0;try{E=w??e.fn()}catch(N){E=Promise.reject(N)}Promise.resolve(E).then(x).catch(N=>{if(o())return;const M=e.retry??(Fa?0:3),R=e.retryDelay??hC,U=typeof R=="function"?R(r,N):R,$=M===!0||typeof M=="number"&&r<M||typeof M=="function"&&M(r,N);if(n||!$){y(N);return}r++,e.onFail?.(r,N),aC(U).then(()=>m()?void 0:v()).then(()=>{n?y(N):_()})})};return{promise:l,status:()=>l.status,cancel:u,continue:()=>(a?.(),l),cancelRetry:d,continueRetry:h,canStart:b,start:()=>(b()?_():v().then(_),l)}}var i1=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),$h(this.gcTime)&&(this.#e=Ba.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Fa?1/0:300*1e3))}clearGcTimeout(){this.#e&&(Ba.clearTimeout(this.#e),this.#e=void 0)}},mC=class extends i1{#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=Tx(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 n=Tx(this.options);n.data!==void 0&&(this.setState(Cx(n.data,n.dataUpdatedAt)),this.#e=n)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,n){const r=Kh(this.state.data,e,this.options);return this.#a({data:r,type:"success",dataUpdatedAt:n?.updatedAt,manual:n?.manual}),r}setState(e,n){this.#a({type:"setState",state:e,setStateOptions:n})}cancel(e){const n=this.#r?.promise;return this.#r?.cancel(e),n?n.then($n).catch($n):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===Cm||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>ua(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:!Jv(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(n=>n.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(n=>n.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(n=>n!==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,n){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&n?.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 d=this.observers.find(h=>h.options.queryFn);d&&this.setOptions(d.options)}const r=new AbortController,a=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(this.#l=!0,r.signal)})},l=()=>{const d=t1(this.options,n),m=(()=>{const b={client:this.#i,queryKey:this.queryKey,meta:this.meta};return a(b),b})();return this.#l=!1,this.options.persister?this.options.persister(d,m,this):d(m)},u=(()=>{const d={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:l};return a(d),d})();this.options.behavior?.onFetch(u,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==u.fetchOptions?.meta)&&this.#a({type:"fetch",meta:u.fetchOptions?.meta}),this.#r=r1({initialPromise:n?.initialPromise,fn:u.fetchFn,onCancel:d=>{d instanceof Yh&&d.revert&&this.setState({...this.#t,fetchStatus:"idle"}),r.abort()},onFail:(d,h)=>{this.#a({type:"failed",failureCount:d,error:h})},onPause:()=>{this.#a({type:"pause"})},onContinue:()=>{this.#a({type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0});try{const d=await this.#r.start();if(d===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(d),this.#n.config.onSuccess?.(d,this),this.#n.config.onSettled?.(d,this.state.error,this),d}catch(d){if(d instanceof Yh){if(d.silent)return this.#r.promise;if(d.revert){if(this.state.data===void 0)throw d;return this.state.data}}throw this.#a({type:"error",error:d}),this.#n.config.onError?.(d,this),this.#n.config.onSettled?.(this.state.data,d,this),d}finally{this.scheduleGc()}}#a(e){const n=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,...a1(r.data,this.options),fetchMeta:e.meta??null};case"success":const a={...r,...Cx(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=n(this.state),wn.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function a1(e,n){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:n1(n.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Cx(e,n){return{data:e,dataUpdatedAt:n??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Tx(e){const n=typeof e.initialData=="function"?e.initialData():e.initialData,r=n!==void 0,a=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:n,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 pC=class extends qs{constructor(e,n){super(),this.options=n,this.#e=e,this.#a=null,this.#l=Vh(),this.bindMethods(),this.setOptions(n)}#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),Rx(this.#t,this.options)?this.#d():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Qh(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Qh(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#v(),this.#k(),this.#t.removeObserver(this)}setOptions(e){const n=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.#_(),this.#t.setOptions(this.options),n._defaulted&&!hu(this.options,n)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const a=this.hasListeners();a&&Ax(this.#t,r,this.options,n)&&this.#d(),this.updateResult(),a&&(this.#t!==r||Tr(this.options.enabled,this.#t)!==Tr(n.enabled,this.#t)||ua(this.options.staleTime,this.#t)!==ua(n.staleTime,this.#t))&&this.#g();const l=this.#b();a&&(this.#t!==r||Tr(this.options.enabled,this.#t)!==Tr(n.enabled,this.#t)||l!==this.#o)&&this.#x(l)}getOptimisticResult(e){const n=this.#e.getQueryCache().build(this.#e,e),r=this.createResult(n,e);return bC(this,r)&&(this.#i=r,this.#s=this.options,this.#r=this.#t.state),r}getCurrentResult(){return this.#i}trackResult(e,n){return new Proxy(e,{get:(r,a)=>(this.trackProp(a),n?.(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 n=this.#e.defaultQueryOptions(e),r=this.#e.getQueryCache().build(this.#e,n);return r.fetch().then(()=>this.createResult(r,n))}fetch(e){return this.#d({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#i))}#d(e){this.#_();let n=this.#t.fetch(this.options,e);return e?.throwOnError||(n=n.catch($n)),n}#g(){this.#v();const e=ua(this.options.staleTime,this.#t);if(Fa||this.#i.isStale||!$h(e))return;const r=Jv(this.#i.dataUpdatedAt,e)+1;this.#c=Ba.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,!(Fa||Tr(this.options.enabled,this.#t)===!1||!$h(this.#o)||this.#o===0)&&(this.#u=Ba.setInterval(()=>{(this.options.refetchIntervalInBackground||Rm.isFocused())&&this.#d()},this.#o))}#y(){this.#g(),this.#x(this.#b())}#v(){this.#c&&(Ba.clearTimeout(this.#c),this.#c=void 0)}#k(){this.#u&&(Ba.clearInterval(this.#u),this.#u=void 0)}createResult(e,n){const r=this.#t,a=this.options,l=this.#i,o=this.#r,u=this.#s,h=e!==r?e.state:this.#n,{state:m}=e;let b={...m},x=!1,y;if(n._optimisticResults){const A=this.hasListeners(),ae=!A&&Rx(e,n),H=A&&Ax(e,r,n,a);(ae||H)&&(b={...b,...a1(m.data,e.options)}),n._optimisticResults==="isRestoring"&&(b.fetchStatus="idle")}let{error:v,errorUpdatedAt:_,status:E}=b;y=b.data;let w=!1;if(n.placeholderData!==void 0&&y===void 0&&E==="pending"){let A;l?.isPlaceholderData&&n.placeholderData===u?.placeholderData?(A=l.data,w=!0):A=typeof n.placeholderData=="function"?n.placeholderData(this.#h?.state.data,this.#h):n.placeholderData,A!==void 0&&(E="success",y=Kh(l?.data,A,n),x=!0)}if(n.select&&y!==void 0&&!w)if(l&&y===o?.data&&n.select===this.#p)y=this.#f;else try{this.#p=n.select,y=n.select(y),y=Kh(l?.data,y,n),this.#f=y,this.#a=null}catch(A){this.#a=A}this.#a&&(v=this.#a,y=this.#f,_=Date.now(),E="error");const N=b.fetchStatus==="fetching",M=E==="pending",R=E==="error",U=M&&N,$=y!==void 0,J={status:E,fetchStatus:b.fetchStatus,isPending:M,isSuccess:E==="success",isError:R,isInitialLoading:U,isLoading:U,data:y,dataUpdatedAt:b.dataUpdatedAt,error:v,errorUpdatedAt:_,failureCount:b.fetchFailureCount,failureReason:b.fetchFailureReason,errorUpdateCount:b.errorUpdateCount,isFetched:b.dataUpdateCount>0||b.errorUpdateCount>0,isFetchedAfterMount:b.dataUpdateCount>h.dataUpdateCount||b.errorUpdateCount>h.errorUpdateCount,isFetching:N,isRefetching:N&&!M,isLoadingError:R&&!$,isPaused:b.fetchStatus==="paused",isPlaceholderData:x,isRefetchError:R&&$,isStale:Am(e,n),refetch:this.refetch,promise:this.#l,isEnabled:Tr(n.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const A=J.data!==void 0,ae=J.status==="error"&&!A,H=ve=>{ae?ve.reject(J.error):A&&ve.resolve(J.data)},te=()=>{const ve=this.#l=J.promise=Vh();H(ve)},ee=this.#l;switch(ee.status){case"pending":e.queryHash===r.queryHash&&H(ee);break;case"fulfilled":(ae||J.data!==ee.value)&&te();break;case"rejected":(!ae||J.error!==ee.reason)&&te();break}}return J}updateResult(){const e=this.#i,n=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),hu(n,e))return;this.#i=n;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(u=>{const d=u;return this.#i[d]!==e[d]&&o.has(d)})};this.#E({listeners:r()})}#_(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const n=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(n?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#E(e){wn.batch(()=>{e.listeners&&this.listeners.forEach(n=>{n(this.#i)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function gC(e,n){return Tr(n.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&n.retryOnMount===!1)}function Rx(e,n){return gC(e,n)||e.state.data!==void 0&&Qh(e,n,n.refetchOnMount)}function Qh(e,n,r){if(Tr(n.enabled,e)!==!1&&ua(n.staleTime,e)!=="static"){const a=typeof r=="function"?r(e):r;return a==="always"||a!==!1&&Am(e,n)}return!1}function Ax(e,n,r,a){return(e!==n||Tr(a.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&Am(e,r)}function Am(e,n){return Tr(n.enabled,e)!==!1&&e.isStaleByTime(ua(n.staleTime,e))}function bC(e,n){return!hu(e.getCurrentResult(),n)}function Ox(e){return{onFetch:(n,r)=>{const a=n.options,l=n.fetchOptions?.meta?.fetchMore?.direction,o=n.state.data?.pages||[],u=n.state.data?.pageParams||[];let d={pages:[],pageParams:[]},h=0;const m=async()=>{let b=!1;const x=_=>{oC(_,()=>n.signal,()=>b=!0)},y=t1(n.options,n.fetchOptions),v=async(_,E,w)=>{if(b)return Promise.reject();if(E==null&&_.pages.length)return Promise.resolve(_);const M=(()=>{const j={client:n.client,queryKey:n.queryKey,pageParam:E,direction:w?"backward":"forward",meta:n.options.meta};return x(j),j})(),R=await y(M),{maxPages:U}=n.options,$=w?lC:sC;return{pages:$(_.pages,R,U),pageParams:$(_.pageParams,E,U)}};if(l&&o.length){const _=l==="backward",E=_?xC:Mx,w={pages:o,pageParams:u},N=E(a,w);d=await v(w,N,_)}else{const _=e??o.length;do{const E=h===0?u[0]??a.initialPageParam:Mx(a,d);if(h>0&&E==null)break;d=await v(d,E),h++}while(h<_)}return d};n.options.persister?n.fetchFn=()=>n.options.persister?.(m,{client:n.client,queryKey:n.queryKey,meta:n.options.meta,signal:n.signal},r):n.fetchFn=m}}}function Mx(e,{pages:n,pageParams:r}){const a=n.length-1;return n.length>0?e.getNextPageParam(n[a],n,r[a],r):void 0}function xC(e,{pages:n,pageParams:r}){return n.length>0?e.getPreviousPageParam?.(n[0],n,r[0],r):void 0}var yC=class extends i1{#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||s1(),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(n=>n!==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 n=()=>{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,u)=>{this.#r({type:"failed",failureCount:o,error:u})},onPause:()=>{this.#r({type:"pause"})},onContinue:n,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)n();else{this.#r({type:"pending",variables:e,isPaused:l}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,r);const u=await this.options.onMutate?.(e,r);u!==this.state.context&&this.#r({type:"pending",context:u,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(u){Promise.reject(u)}try{await this.options.onError?.(o,e,this.state.context,r)}catch(u){Promise.reject(u)}try{await this.#n.config.onSettled?.(void 0,o,this.state.variables,this.state.context,this,r)}catch(u){Promise.reject(u)}try{await this.options.onSettled?.(void 0,o,e,this.state.context,r)}catch(u){Promise.reject(u)}throw this.#r({type:"error",error:o}),o}finally{this.#n.runNext(this)}}#r(e){const n=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=n(this.state),wn.batch(()=>{this.#t.forEach(r=>{r.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function s1(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var vC=class extends qs{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,n,r){const a=new yC({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(n),state:r});return this.add(a),a}add(e){this.#e.add(e);const n=$c(e);if(typeof n=="string"){const r=this.#t.get(n);r?r.push(e):this.#t.set(n,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const n=$c(e);if(typeof n=="string"){const r=this.#t.get(n);if(r)if(r.length>1){const a=r.indexOf(e);a!==-1&&r.splice(a,1)}else r[0]===e&&this.#t.delete(n)}}this.notify({type:"removed",mutation:e})}canRun(e){const n=$c(e);if(typeof n=="string"){const a=this.#t.get(n)?.find(l=>l.state.status==="pending");return!a||a===e}else return!0}runNext(e){const n=$c(e);return typeof n=="string"?this.#t.get(n)?.find(a=>a!==e&&a.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){wn.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 n={exact:!0,...e};return this.getAll().find(r=>Sx(n,r))}findAll(e={}){return this.getAll().filter(n=>Sx(e,n))}notify(e){wn.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return wn.batch(()=>Promise.all(e.map(n=>n.continue().catch($n))))}};function $c(e){return e.options.scope?.id}var kC=class extends qs{#e;#t=void 0;#n;#i;constructor(n,r){super(),this.#e=n,this.setOptions(r),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){const r=this.options;this.options=this.#e.defaultMutationOptions(n),hu(this.options,r)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),r?.mutationKey&&this.options.mutationKey&&Pa(r.mutationKey)!==Pa(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(n){this.#r(),this.#s(n)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#r(),this.#s()}mutate(n,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(n)}#r(){const n=this.#n?.state??s1();this.#t={...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset}}#s(n){wn.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(n?.type==="success"){try{this.#i.onSuccess?.(n.data,r,a,l)}catch(o){Promise.reject(o)}try{this.#i.onSettled?.(n.data,null,r,a,l)}catch(o){Promise.reject(o)}}else if(n?.type==="error"){try{this.#i.onError?.(n.error,r,a,l)}catch(o){Promise.reject(o)}try{this.#i.onSettled?.(void 0,n.error,r,a,l)}catch(o){Promise.reject(o)}}}this.listeners.forEach(r=>{r(this.#t)})})}},_C=class extends qs{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,n,r){const a=n.queryKey,l=n.queryHash??zm(a,n);let o=this.get(l);return o||(o=new mC({client:e,queryKey:a,queryHash:l,options:e.defaultQueryOptions(n),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 n=this.#e.get(e.queryHash);n&&(e.destroy(),n===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){wn.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const n={exact:!0,...e};return this.getAll().find(r=>wx(n,r))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(r=>wx(e,r)):n}notify(e){wn.batch(()=>{this.listeners.forEach(n=>{n(e)})})}onFocus(){wn.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){wn.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},EC=class{#e;#t;#n;#i;#r;#s;#l;#a;constructor(e={}){this.#e=e.queryCache||new _C,this.#t=e.mutationCache||new vC,this.#n=e.defaultOptions||{},this.#i=new Map,this.#r=new Map,this.#s=0}mount(){this.#s++,this.#s===1&&(this.#l=Rm.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#a=mu.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 n=this.defaultQueryOptions({queryKey:e});return this.#e.get(n.queryHash)?.state.data}ensureQueryData(e){const n=this.defaultQueryOptions(e),r=this.#e.build(this,n),a=r.state.data;return a===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(ua(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(a))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:n,state:r})=>{const a=r.data;return[n,a]})}setQueryData(e,n,r){const a=this.defaultQueryOptions({queryKey:e}),o=this.#e.get(a.queryHash)?.state.data,u=rC(n,o);if(u!==void 0)return this.#e.build(this,a).setData(u,{...r,manual:!0})}setQueriesData(e,n,r){return wn.batch(()=>this.#e.findAll(e).map(({queryKey:a})=>[a,this.setQueryData(a,n,r)]))}getQueryState(e){const n=this.defaultQueryOptions({queryKey:e});return this.#e.get(n.queryHash)?.state}removeQueries(e){const n=this.#e;wn.batch(()=>{n.findAll(e).forEach(r=>{n.remove(r)})})}resetQueries(e,n){const r=this.#e;return wn.batch(()=>(r.findAll(e).forEach(a=>{a.reset()}),this.refetchQueries({type:"active",...e},n)))}cancelQueries(e,n={}){const r={revert:!0,...n},a=wn.batch(()=>this.#e.findAll(e).map(l=>l.cancel(r)));return Promise.all(a).then($n).catch($n)}invalidateQueries(e,n={}){return wn.batch(()=>(this.#e.findAll(e).forEach(r=>{r.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},n)))}refetchQueries(e,n={}){const r={...n,cancelRefetch:n.cancelRefetch??!0},a=wn.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($n)),l.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(a).then($n)}fetchQuery(e){const n=this.defaultQueryOptions(e);n.retry===void 0&&(n.retry=!1);const r=this.#e.build(this,n);return r.isStaleByTime(ua(n.staleTime,r))?r.fetch(n):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then($n).catch($n)}fetchInfiniteQuery(e){return e.behavior=Ox(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then($n).catch($n)}ensureInfiniteQueryData(e){return e.behavior=Ox(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return mu.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,n){this.#i.set(Pa(e),{queryKey:e,defaultOptions:n})}getQueryDefaults(e){const n=[...this.#i.values()],r={};return n.forEach(a=>{fo(e,a.queryKey)&&Object.assign(r,a.defaultOptions)}),r}setMutationDefaults(e,n){this.#r.set(Pa(e),{mutationKey:e,defaultOptions:n})}getMutationDefaults(e){const n=[...this.#r.values()],r={};return n.forEach(a=>{fo(e,a.mutationKey)&&Object.assign(r,a.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const n={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return n.queryHash||(n.queryHash=zm(n.queryKey,n)),n.refetchOnReconnect===void 0&&(n.refetchOnReconnect=n.networkMode!=="always"),n.throwOnError===void 0&&(n.throwOnError=!!n.suspense),!n.networkMode&&n.persister&&(n.networkMode="offlineFirst"),n.queryFn===Cm&&(n.enabled=!1),n}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()}},l1=S.createContext(void 0),Fn=e=>{const n=S.useContext(l1);if(!n)throw new Error("No QueryClient set, use QueryClientProvider to set one");return n},wC=({client:e,children:n})=>(S.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),f.jsx(l1.Provider,{value:e,children:n})),o1=S.createContext(!1),SC=()=>S.useContext(o1);o1.Provider;function NC(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var zC=S.createContext(NC()),CC=()=>S.useContext(zC),TC=(e,n,r)=>{const a=r?.state.error&&typeof e.throwOnError=="function"?Tm(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||a)&&(n.isReset()||(e.retryOnMount=!1))},RC=e=>{S.useEffect(()=>{e.clearReset()},[e])},AC=({result:e,errorResetBoundary:n,throwOnError:r,query:a,suspense:l})=>e.isError&&!n.isReset()&&!e.isFetching&&a&&(l&&e.data===void 0||Tm(r,[e.error,a])),OC=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))}},MC=(e,n)=>e.isLoading&&e.isFetching&&!n,DC=(e,n)=>e?.suspense&&n.isPending,Dx=(e,n,r)=>n.fetchOptimistic(e).catch(()=>{r.clearReset()});function jC(e,n,r){const a=SC(),l=CC(),o=Fn(),u=o.defaultQueryOptions(e);o.getDefaultOptions().queries?._experimental_beforeQuery?.(u);const d=o.getQueryCache().get(u.queryHash);u._optimisticResults=a?"isRestoring":"optimistic",OC(u),TC(u,l,d),RC(l);const h=!o.getQueryCache().get(u.queryHash),[m]=S.useState(()=>new n(o,u)),b=m.getOptimisticResult(u),x=!a&&e.subscribed!==!1;if(S.useSyncExternalStore(S.useCallback(y=>{const v=x?m.subscribe(wn.batchCalls(y)):$n;return m.updateResult(),v},[m,x]),()=>m.getCurrentResult(),()=>m.getCurrentResult()),S.useEffect(()=>{m.setOptions(u)},[u,m]),DC(u,b))throw Dx(u,m,l);if(AC({result:b,errorResetBoundary:l,throwOnError:u.throwOnError,query:d,suspense:u.suspense}))throw b.error;return o.getDefaultOptions().queries?._experimental_afterQuery?.(u,b),u.experimental_prefetchInRender&&!Fa&&MC(b,a)&&(h?Dx(u,m,l):d?.promise)?.catch($n).finally(()=>{m.updateResult()}),u.notifyOnChangeProps?b:m.trackResult(b)}function vn(e,n){return jC(e,pC)}function Mu(e,n){const r=Fn(),[a]=S.useState(()=>new kC(r,e));S.useEffect(()=>{a.setOptions(e)},[a,e]);const l=S.useSyncExternalStore(S.useCallback(u=>a.subscribe(wn.batchCalls(u)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),o=S.useCallback((u,d)=>{a.mutate(u,d).catch($n)},[a]);if(l.error&&Tm(a.options.throwOnError,[l.error]))throw l.error;return{...l,mutate:o,mutateAsync:l.mutate}}function LC({children:e}){const[n]=S.useState(()=>new EC({defaultOptions:{queries:{staleTime:3e4,retry:1,refetchOnWindowFocus:!1}}}));return f.jsx(wC,{client:n,children:e})}function c1(e){var n,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(n=0;n<l;n++)e[n]&&(r=c1(e[n]))&&(a&&(a+=" "),a+=r)}else for(r in e)e[r]&&(a&&(a+=" "),a+=r);return a}function IC(){for(var e,n,r=0,a="",l=arguments.length;r<l;r++)(e=arguments[r])&&(n=c1(e))&&(a&&(a+=" "),a+=n);return a}const BC=(e,n)=>{const r=new Array(e.length+n.length);for(let a=0;a<e.length;a++)r[a]=e[a];for(let a=0;a<n.length;a++)r[e.length+a]=n[a];return r},UC=(e,n)=>({classGroupId:e,validator:n}),u1=(e=new Map,n=null,r)=>({nextPart:e,validators:n,classGroupId:r}),pu="-",jx=[],FC="arbitrary..",PC=e=>{const n=qC(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:u=>{if(u.startsWith("[")&&u.endsWith("]"))return HC(u);const d=u.split(pu),h=d[0]===""&&d.length>1?1:0;return d1(d,h,n)},getConflictingClassGroupIds:(u,d)=>{if(d){const h=a[u],m=r[u];return h?m?BC(m,h):h:m||jx}return r[u]||jx}}},d1=(e,n,r)=>{if(e.length-n===0)return r.classGroupId;const l=e[n],o=r.nextPart.get(l);if(o){const m=d1(e,n+1,o);if(m)return m}const u=r.validators;if(u===null)return;const d=n===0?e.join(pu):e.slice(n).join(pu),h=u.length;for(let m=0;m<h;m++){const b=u[m];if(b.validator(d))return b.classGroupId}},HC=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const n=e.slice(1,-1),r=n.indexOf(":"),a=n.slice(0,r);return a?FC+a:void 0})(),qC=e=>{const{theme:n,classGroups:r}=e;return $C(r,n)},$C=(e,n)=>{const r=u1();for(const a in e){const l=e[a];Om(l,r,a,n)}return r},Om=(e,n,r,a)=>{const l=e.length;for(let o=0;o<l;o++){const u=e[o];GC(u,n,r,a)}},GC=(e,n,r,a)=>{if(typeof e=="string"){KC(e,n,r);return}if(typeof e=="function"){VC(e,n,r,a);return}YC(e,n,r,a)},KC=(e,n,r)=>{const a=e===""?n:f1(n,e);a.classGroupId=r},VC=(e,n,r,a)=>{if(QC(e)){Om(e(a),n,r,a);return}n.validators===null&&(n.validators=[]),n.validators.push(UC(r,e))},YC=(e,n,r,a)=>{const l=Object.entries(e),o=l.length;for(let u=0;u<o;u++){const[d,h]=l[u];Om(h,f1(n,d),r,a)}},f1=(e,n)=>{let r=e;const a=n.split(pu),l=a.length;for(let o=0;o<l;o++){const u=a[o];let d=r.nextPart.get(u);d||(d=u1(),r.nextPart.set(u,d)),r=d}return r},QC=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,XC=e=>{if(e<1)return{get:()=>{},set:()=>{}};let n=0,r=Object.create(null),a=Object.create(null);const l=(o,u)=>{r[o]=u,n++,n>e&&(n=0,a=r,r=Object.create(null))};return{get(o){let u=r[o];if(u!==void 0)return u;if((u=a[o])!==void 0)return l(o,u),u},set(o,u){o in r?r[o]=u:l(o,u)}}},Xh="!",Lx=":",ZC=[],Ix=(e,n,r,a,l)=>({modifiers:e,hasImportantModifier:n,baseClassName:r,maybePostfixModifierPosition:a,isExternal:l}),WC=e=>{const{prefix:n,experimentalParseClassName:r}=e;let a=l=>{const o=[];let u=0,d=0,h=0,m;const b=l.length;for(let E=0;E<b;E++){const w=l[E];if(u===0&&d===0){if(w===Lx){o.push(l.slice(h,E)),h=E+1;continue}if(w==="/"){m=E;continue}}w==="["?u++:w==="]"?u--:w==="("?d++:w===")"&&d--}const x=o.length===0?l:l.slice(h);let y=x,v=!1;x.endsWith(Xh)?(y=x.slice(0,-1),v=!0):x.startsWith(Xh)&&(y=x.slice(1),v=!0);const _=m&&m>h?m-h:void 0;return Ix(o,v,y,_)};if(n){const l=n+Lx,o=a;a=u=>u.startsWith(l)?o(u.slice(l.length)):Ix(ZC,!1,u,void 0,!0)}if(r){const l=a;a=o=>r({className:o,parseClassName:l})}return a},JC=e=>{const n=new Map;return e.orderSensitiveModifiers.forEach((r,a)=>{n.set(r,1e6+a)}),r=>{const a=[];let l=[];for(let o=0;o<r.length;o++){const u=r[o],d=u[0]==="[",h=n.has(u);d||h?(l.length>0&&(l.sort(),a.push(...l),l=[]),a.push(u)):l.push(u)}return l.length>0&&(l.sort(),a.push(...l)),a}},e2=e=>({cache:XC(e.cacheSize),parseClassName:WC(e),sortModifiers:JC(e),...PC(e)}),t2=/\s+/,n2=(e,n)=>{const{parseClassName:r,getClassGroupId:a,getConflictingClassGroupIds:l,sortModifiers:o}=n,u=[],d=e.trim().split(t2);let h="";for(let m=d.length-1;m>=0;m-=1){const b=d[m],{isExternal:x,modifiers:y,hasImportantModifier:v,baseClassName:_,maybePostfixModifierPosition:E}=r(b);if(x){h=b+(h.length>0?" "+h:h);continue}let w=!!E,N=a(w?_.substring(0,E):_);if(!N){if(!w){h=b+(h.length>0?" "+h:h);continue}if(N=a(_),!N){h=b+(h.length>0?" "+h:h);continue}w=!1}const M=y.length===0?"":y.length===1?y[0]:o(y).join(":"),R=v?M+Xh:M,U=R+N;if(u.indexOf(U)>-1)continue;u.push(U);const $=l(N,w);for(let j=0;j<$.length;++j){const J=$[j];u.push(R+J)}h=b+(h.length>0?" "+h:h)}return h},r2=(...e)=>{let n=0,r,a,l="";for(;n<e.length;)(r=e[n++])&&(a=h1(r))&&(l&&(l+=" "),l+=a);return l},h1=e=>{if(typeof e=="string")return e;let n,r="";for(let a=0;a<e.length;a++)e[a]&&(n=h1(e[a]))&&(r&&(r+=" "),r+=n);return r},i2=(e,...n)=>{let r,a,l,o;const u=h=>{const m=n.reduce((b,x)=>x(b),e());return r=e2(m),a=r.cache.get,l=r.cache.set,o=d,d(h)},d=h=>{const m=a(h);if(m)return m;const b=n2(h,r);return l(h,b),b};return o=u,(...h)=>o(r2(...h))},a2=[],En=e=>{const n=r=>r[e]||a2;return n.isThemeGetter=!0,n},m1=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,p1=/^\((?:(\w[\w-]*):)?(.+)\)$/i,s2=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,l2=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,o2=/\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$/,c2=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,u2=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,d2=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,na=e=>s2.test(e),it=e=>!!e&&!Number.isNaN(Number(e)),ra=e=>!!e&&Number.isInteger(Number(e)),ch=e=>e.endsWith("%")&&it(e.slice(0,-1)),_i=e=>l2.test(e),g1=()=>!0,f2=e=>o2.test(e)&&!c2.test(e),Mm=()=>!1,h2=e=>u2.test(e),m2=e=>d2.test(e),p2=e=>!Ae(e)&&!Oe(e),g2=e=>ma(e,y1,Mm),Ae=e=>m1.test(e),ja=e=>ma(e,v1,f2),Bx=e=>ma(e,w2,it),b2=e=>ma(e,_1,g1),x2=e=>ma(e,k1,Mm),Ux=e=>ma(e,b1,Mm),y2=e=>ma(e,x1,m2),Gc=e=>ma(e,E1,h2),Oe=e=>p1.test(e),Kl=e=>Ga(e,v1),v2=e=>Ga(e,k1),Fx=e=>Ga(e,b1),k2=e=>Ga(e,y1),_2=e=>Ga(e,x1),Kc=e=>Ga(e,E1,!0),E2=e=>Ga(e,_1,!0),ma=(e,n,r)=>{const a=m1.exec(e);return a?a[1]?n(a[1]):r(a[2]):!1},Ga=(e,n,r=!1)=>{const a=p1.exec(e);return a?a[1]?n(a[1]):r:!1},b1=e=>e==="position"||e==="percentage",x1=e=>e==="image"||e==="url",y1=e=>e==="length"||e==="size"||e==="bg-size",v1=e=>e==="length",w2=e=>e==="number",k1=e=>e==="family-name",_1=e=>e==="number"||e==="weight",E1=e=>e==="shadow",S2=()=>{const e=En("color"),n=En("font"),r=En("text"),a=En("font-weight"),l=En("tracking"),o=En("leading"),u=En("breakpoint"),d=En("container"),h=En("spacing"),m=En("radius"),b=En("shadow"),x=En("inset-shadow"),y=En("text-shadow"),v=En("drop-shadow"),_=En("blur"),E=En("perspective"),w=En("aspect"),N=En("ease"),M=En("animate"),R=()=>["auto","avoid","all","avoid-page","page","left","right","column"],U=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],$=()=>[...U(),Oe,Ae],j=()=>["auto","hidden","clip","visible","scroll"],J=()=>["auto","contain","none"],A=()=>[Oe,Ae,h],ae=()=>[na,"full","auto",...A()],H=()=>[ra,"none","subgrid",Oe,Ae],te=()=>["auto",{span:["full",ra,Oe,Ae]},ra,Oe,Ae],ee=()=>[ra,"auto",Oe,Ae],ve=()=>["auto","min","max","fr",Oe,Ae],oe=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],q=()=>["start","end","center","stretch","center-safe","end-safe"],L=()=>["auto",...A()],Y=()=>[na,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...A()],V=()=>[na,"screen","full","dvw","lvw","svw","min","max","fit",...A()],ne=()=>[na,"screen","full","lh","dvh","lvh","svh","min","max","fit",...A()],C=()=>[e,Oe,Ae],O=()=>[...U(),Fx,Ux,{position:[Oe,Ae]}],K=()=>["no-repeat",{repeat:["","x","y","space","round"]}],T=()=>["auto","cover","contain",k2,g2,{size:[Oe,Ae]}],he=()=>[ch,Kl,ja],_e=()=>["","none","full",m,Oe,Ae],xe=()=>["",it,Kl,ja],He=()=>["solid","dashed","dotted","double"],st=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Be=()=>[it,ch,Fx,Ux],Wt=()=>["","none",_,Oe,Ae],un=()=>["none",it,Oe,Ae],jn=()=>["none",it,Oe,Ae],At=()=>[it,Oe,Ae],Kt=()=>[na,"full",...A()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[_i],breakpoint:[_i],color:[g1],container:[_i],"drop-shadow":[_i],ease:["in","out","in-out"],font:[p2],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[_i],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[_i],shadow:[_i],spacing:["px",it],text:[_i],"text-shadow":[_i],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",na,Ae,Oe,w]}],container:["container"],columns:[{columns:[it,Ae,Oe,d]}],"break-after":[{"break-after":R()}],"break-before":[{"break-before":R()}],"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:J()}],"overscroll-x":[{"overscroll-x":J()}],"overscroll-y":[{"overscroll-y":J()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:ae()}],"inset-x":[{"inset-x":ae()}],"inset-y":[{"inset-y":ae()}],start:[{"inset-s":ae(),start:ae()}],end:[{"inset-e":ae(),end:ae()}],"inset-bs":[{"inset-bs":ae()}],"inset-be":[{"inset-be":ae()}],top:[{top:ae()}],right:[{right:ae()}],bottom:[{bottom:ae()}],left:[{left:ae()}],visibility:["visible","invisible","collapse"],z:[{z:[ra,"auto",Oe,Ae]}],basis:[{basis:[na,"full","auto",d,...A()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[it,na,"auto","initial","none",Ae]}],grow:[{grow:["",it,Oe,Ae]}],shrink:[{shrink:["",it,Oe,Ae]}],order:[{order:[ra,"first","last","none",Oe,Ae]}],"grid-cols":[{"grid-cols":H()}],"col-start-end":[{col:te()}],"col-start":[{"col-start":ee()}],"col-end":[{"col-end":ee()}],"grid-rows":[{"grid-rows":H()}],"row-start-end":[{row:te()}],"row-start":[{"row-start":ee()}],"row-end":[{"row-end":ee()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ve()}],"auto-rows":[{"auto-rows":ve()}],gap:[{gap:A()}],"gap-x":[{"gap-x":A()}],"gap-y":[{"gap-y":A()}],"justify-content":[{justify:[...oe(),"normal"]}],"justify-items":[{"justify-items":[...q(),"normal"]}],"justify-self":[{"justify-self":["auto",...q()]}],"align-content":[{content:["normal",...oe()]}],"align-items":[{items:[...q(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...q(),{baseline:["","last"]}]}],"place-content":[{"place-content":oe()}],"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:L()}],mx:[{mx:L()}],my:[{my:L()}],ms:[{ms:L()}],me:[{me:L()}],mbs:[{mbs:L()}],mbe:[{mbe:L()}],mt:[{mt:L()}],mr:[{mr:L()}],mb:[{mb:L()}],ml:[{ml:L()}],"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",...ne()]}],"min-block-size":[{"min-block":["auto",...ne()]}],"max-block-size":[{"max-block":["none",...ne()]}],w:[{w:[d,"screen",...Y()]}],"min-w":[{"min-w":[d,"screen","none",...Y()]}],"max-w":[{"max-w":[d,"screen","none","prose",{screen:[u]},...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,Kl,ja]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,E2,b2]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ch,Ae]}],"font-family":[{font:[v2,x2,n]}],"font-features":[{"font-features":[Ae]}],"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,Oe,Ae]}],"line-clamp":[{"line-clamp":[it,"none",Oe,Bx]}],leading:[{leading:[o,...A()]}],"list-image":[{"list-image":["none",Oe,Ae]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Oe,Ae]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:C()}],"text-color":[{text:C()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...He(),"wavy"]}],"text-decoration-thickness":[{decoration:[it,"from-font","auto",Oe,ja]}],"text-decoration-color":[{decoration:C()}],"underline-offset":[{"underline-offset":[it,"auto",Oe,Ae]}],"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",Oe,Ae]}],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",Oe,Ae]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:O()}],"bg-repeat":[{bg:K()}],"bg-size":[{bg:T()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ra,Oe,Ae],radial:["",Oe,Ae],conic:[ra,Oe,Ae]},_2,y2]}],"bg-color":[{bg:C()}],"gradient-from-pos":[{from:he()}],"gradient-via-pos":[{via:he()}],"gradient-to-pos":[{to:he()}],"gradient-from":[{from:C()}],"gradient-via":[{via:C()}],"gradient-to":[{to:C()}],rounded:[{rounded:_e()}],"rounded-s":[{"rounded-s":_e()}],"rounded-e":[{"rounded-e":_e()}],"rounded-t":[{"rounded-t":_e()}],"rounded-r":[{"rounded-r":_e()}],"rounded-b":[{"rounded-b":_e()}],"rounded-l":[{"rounded-l":_e()}],"rounded-ss":[{"rounded-ss":_e()}],"rounded-se":[{"rounded-se":_e()}],"rounded-ee":[{"rounded-ee":_e()}],"rounded-es":[{"rounded-es":_e()}],"rounded-tl":[{"rounded-tl":_e()}],"rounded-tr":[{"rounded-tr":_e()}],"rounded-br":[{"rounded-br":_e()}],"rounded-bl":[{"rounded-bl":_e()}],"border-w":[{border:xe()}],"border-w-x":[{"border-x":xe()}],"border-w-y":[{"border-y":xe()}],"border-w-s":[{"border-s":xe()}],"border-w-e":[{"border-e":xe()}],"border-w-bs":[{"border-bs":xe()}],"border-w-be":[{"border-be":xe()}],"border-w-t":[{"border-t":xe()}],"border-w-r":[{"border-r":xe()}],"border-w-b":[{"border-b":xe()}],"border-w-l":[{"border-l":xe()}],"divide-x":[{"divide-x":xe()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":xe()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...He(),"hidden","none"]}],"divide-style":[{divide:[...He(),"hidden","none"]}],"border-color":[{border:C()}],"border-color-x":[{"border-x":C()}],"border-color-y":[{"border-y":C()}],"border-color-s":[{"border-s":C()}],"border-color-e":[{"border-e":C()}],"border-color-bs":[{"border-bs":C()}],"border-color-be":[{"border-be":C()}],"border-color-t":[{"border-t":C()}],"border-color-r":[{"border-r":C()}],"border-color-b":[{"border-b":C()}],"border-color-l":[{"border-l":C()}],"divide-color":[{divide:C()}],"outline-style":[{outline:[...He(),"none","hidden"]}],"outline-offset":[{"outline-offset":[it,Oe,Ae]}],"outline-w":[{outline:["",it,Kl,ja]}],"outline-color":[{outline:C()}],shadow:[{shadow:["","none",b,Kc,Gc]}],"shadow-color":[{shadow:C()}],"inset-shadow":[{"inset-shadow":["none",x,Kc,Gc]}],"inset-shadow-color":[{"inset-shadow":C()}],"ring-w":[{ring:xe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:C()}],"ring-offset-w":[{"ring-offset":[it,ja]}],"ring-offset-color":[{"ring-offset":C()}],"inset-ring-w":[{"inset-ring":xe()}],"inset-ring-color":[{"inset-ring":C()}],"text-shadow":[{"text-shadow":["none",y,Kc,Gc]}],"text-shadow-color":[{"text-shadow":C()}],opacity:[{opacity:[it,Oe,Ae]}],"mix-blend":[{"mix-blend":[...st(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":st()}],"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":[it]}],"mask-image-linear-from-pos":[{"mask-linear-from":Be()}],"mask-image-linear-to-pos":[{"mask-linear-to":Be()}],"mask-image-linear-from-color":[{"mask-linear-from":C()}],"mask-image-linear-to-color":[{"mask-linear-to":C()}],"mask-image-t-from-pos":[{"mask-t-from":Be()}],"mask-image-t-to-pos":[{"mask-t-to":Be()}],"mask-image-t-from-color":[{"mask-t-from":C()}],"mask-image-t-to-color":[{"mask-t-to":C()}],"mask-image-r-from-pos":[{"mask-r-from":Be()}],"mask-image-r-to-pos":[{"mask-r-to":Be()}],"mask-image-r-from-color":[{"mask-r-from":C()}],"mask-image-r-to-color":[{"mask-r-to":C()}],"mask-image-b-from-pos":[{"mask-b-from":Be()}],"mask-image-b-to-pos":[{"mask-b-to":Be()}],"mask-image-b-from-color":[{"mask-b-from":C()}],"mask-image-b-to-color":[{"mask-b-to":C()}],"mask-image-l-from-pos":[{"mask-l-from":Be()}],"mask-image-l-to-pos":[{"mask-l-to":Be()}],"mask-image-l-from-color":[{"mask-l-from":C()}],"mask-image-l-to-color":[{"mask-l-to":C()}],"mask-image-x-from-pos":[{"mask-x-from":Be()}],"mask-image-x-to-pos":[{"mask-x-to":Be()}],"mask-image-x-from-color":[{"mask-x-from":C()}],"mask-image-x-to-color":[{"mask-x-to":C()}],"mask-image-y-from-pos":[{"mask-y-from":Be()}],"mask-image-y-to-pos":[{"mask-y-to":Be()}],"mask-image-y-from-color":[{"mask-y-from":C()}],"mask-image-y-to-color":[{"mask-y-to":C()}],"mask-image-radial":[{"mask-radial":[Oe,Ae]}],"mask-image-radial-from-pos":[{"mask-radial-from":Be()}],"mask-image-radial-to-pos":[{"mask-radial-to":Be()}],"mask-image-radial-from-color":[{"mask-radial-from":C()}],"mask-image-radial-to-color":[{"mask-radial-to":C()}],"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":U()}],"mask-image-conic-pos":[{"mask-conic":[it]}],"mask-image-conic-from-pos":[{"mask-conic-from":Be()}],"mask-image-conic-to-pos":[{"mask-conic-to":Be()}],"mask-image-conic-from-color":[{"mask-conic-from":C()}],"mask-image-conic-to-color":[{"mask-conic-to":C()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:O()}],"mask-repeat":[{mask:K()}],"mask-size":[{mask:T()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Oe,Ae]}],filter:[{filter:["","none",Oe,Ae]}],blur:[{blur:Wt()}],brightness:[{brightness:[it,Oe,Ae]}],contrast:[{contrast:[it,Oe,Ae]}],"drop-shadow":[{"drop-shadow":["","none",v,Kc,Gc]}],"drop-shadow-color":[{"drop-shadow":C()}],grayscale:[{grayscale:["",it,Oe,Ae]}],"hue-rotate":[{"hue-rotate":[it,Oe,Ae]}],invert:[{invert:["",it,Oe,Ae]}],saturate:[{saturate:[it,Oe,Ae]}],sepia:[{sepia:["",it,Oe,Ae]}],"backdrop-filter":[{"backdrop-filter":["","none",Oe,Ae]}],"backdrop-blur":[{"backdrop-blur":Wt()}],"backdrop-brightness":[{"backdrop-brightness":[it,Oe,Ae]}],"backdrop-contrast":[{"backdrop-contrast":[it,Oe,Ae]}],"backdrop-grayscale":[{"backdrop-grayscale":["",it,Oe,Ae]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[it,Oe,Ae]}],"backdrop-invert":[{"backdrop-invert":["",it,Oe,Ae]}],"backdrop-opacity":[{"backdrop-opacity":[it,Oe,Ae]}],"backdrop-saturate":[{"backdrop-saturate":[it,Oe,Ae]}],"backdrop-sepia":[{"backdrop-sepia":["",it,Oe,Ae]}],"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",Oe,Ae]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[it,"initial",Oe,Ae]}],ease:[{ease:["linear","initial",N,Oe,Ae]}],delay:[{delay:[it,Oe,Ae]}],animate:[{animate:["none",M,Oe,Ae]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[E,Oe,Ae]}],"perspective-origin":[{"perspective-origin":$()}],rotate:[{rotate:un()}],"rotate-x":[{"rotate-x":un()}],"rotate-y":[{"rotate-y":un()}],"rotate-z":[{"rotate-z":un()}],scale:[{scale:jn()}],"scale-x":[{"scale-x":jn()}],"scale-y":[{"scale-y":jn()}],"scale-z":[{"scale-z":jn()}],"scale-3d":["scale-3d"],skew:[{skew:At()}],"skew-x":[{"skew-x":At()}],"skew-y":[{"skew-y":At()}],transform:[{transform:[Oe,Ae,"","none","gpu","cpu"]}],"transform-origin":[{origin:$()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Kt()}],"translate-x":[{"translate-x":Kt()}],"translate-y":[{"translate-y":Kt()}],"translate-z":[{"translate-z":Kt()}],"translate-none":["translate-none"],accent:[{accent:C()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:C()}],"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",Oe,Ae]}],"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",Oe,Ae]}],fill:[{fill:["none",...C()]}],"stroke-w":[{stroke:[it,Kl,ja,Bx]}],stroke:[{stroke:["none",...C()]}],"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"]}},N2=i2(S2);function ge(...e){return N2(IC(e))}async function Zt(e,n){const r=await fetch(e,{...n,headers:{...Wz(),...n?.headers}});if(!r.ok){const a=await r.text().catch(()=>"");throw new Error(`${r.status}: ${a||r.statusText}`)}return r.json()}function Ka(e){return/[Zz]$/.test(e)||/[+-]\d{2}:\d{2}$/.test(e)?new Date(e):new Date(e.replace(" ","T")+"Z")}function gu(e,n,r,a,l){const o=r.startsWith("/")?r:`${n}/${r}`,u=o.replace(/^\//,""),d=a??1,h=1;switch(e){case"vscode":return`vscode://file/${u}:${d}:${h}`;case"cursor":return`cursor://file/${u}:${d}:${h}`;case"windsurf":return`windsurf://file/${u}:${d}:${h}`;case"jetbrains":return`jetbrains://open?file=${encodeURIComponent(o)}&line=${d}`;case"sublime":return`subl://open?url=file://${encodeURIComponent(o)}&line=${d}`}}const w1=S.createContext(null);function z2({children:e}){const[n,r]=S.useState(new Map),[a,l]=S.useState(null),o=S.useRef(!1),{socket:u}=Ci(),d=S.useMemo(()=>Array.from(n.values()),[n]),h=S.useMemo(()=>d.filter(v=>v.status==="running").length,[d]),m=S.useMemo(()=>h>0,[h]);S.useEffect(()=>{o.current||(o.current=!0,Zt("/api/commands/active").then(v=>{if(v.commands.length>0){const _=new Map;let E=null;for(const w of v.commands)_.set(w.execution_id,{executionId:w.execution_id,command:w.command,output:w.output??"",status:"running",exitCode:null,startedAt:w.started_at}),E=w.execution_id;r(_),l(E)}}).catch(()=>{}))},[]),dt("command:started",v=>{const _={executionId:v.execution_id,command:v.command,output:"",status:"running",exitCode:null,startedAt:v.started_at};r(E=>{const w=new Map(E);return w.set(v.execution_id,_),w}),l(v.execution_id)}),dt("command:output",v=>{r(_=>{const E=_.get(v.execution_id);if(!E)return _;const w=new Map(_);return w.set(v.execution_id,{...E,output:E.output+v.content}),w})}),dt("command:finished",v=>{r(_=>{const E=_.get(v.execution_id);if(!E)return _;const w=new Map(_);return w.set(v.execution_id,{...E,status:v.exitCode===-2?"cancelled":v.exitCode===0?"complete":"failed",exitCode:v.exitCode}),w})});const b=S.useCallback(v=>{r(_=>{const E=new Map(_);return E.delete(v),l(w=>{if(w!==v)return w;const N=Array.from(E.keys());return N.length>0?N[N.length-1]:null}),E})},[]),x=S.useCallback(v=>{u?.emit("command:cancel",{execution_id:v})},[u]),y=S.useMemo(()=>({tabs:d,activeTabId:a,runningCount:h,isRunning:m,setActiveTabId:l,dismissTab:b,cancelCommand:x}),[d,a,h,m,b,x]);return f.jsx(w1,{value:y,children:e})}function Dm(){const e=S.useContext(w1);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 S1=(...e)=>e.filter((n,r,a)=>!!n&&n.trim()!==""&&a.indexOf(n)===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 C2=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 T2=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,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 Px=e=>{const n=T2(e);return n.charAt(0).toUpperCase()+n.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 R2={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 A2=e=>{for(const n in e)if(n.startsWith("aria-")||n==="role"||n==="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 O2=S.forwardRef(({color:e="currentColor",size:n=24,strokeWidth:r=2,absoluteStrokeWidth:a,className:l="",children:o,iconNode:u,...d},h)=>S.createElement("svg",{ref:h,...R2,width:n,height:n,stroke:e,strokeWidth:a?Number(r)*24/Number(n):r,className:S1("lucide",l),...!o&&!A2(d)&&{"aria-hidden":"true"},...d},[...u.map(([m,b])=>S.createElement(m,b)),...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 we=(e,n)=>{const r=S.forwardRef(({className:a,...l},o)=>S.createElement(O2,{ref:o,iconNode:n,className:S1(`lucide-${C2(Px(e))}`,`lucide-${e}`,a),...l}));return r.displayName=Px(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 M2=[["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"}]],D2=we("accessibility",M2);/**
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 j2=[["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"}]],N1=we("activity",j2);/**
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 L2=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],I2=we("arrow-down",L2);/**
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 B2=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],fa=we("arrow-left",B2);/**
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 U2=[["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"}]],z1=we("arrow-up-down",U2);/**
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 F2=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],P2=we("arrow-up",F2);/**
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 H2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}]],q2=we("ban",H2);/**
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 $2=[["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"}]],G2=we("blocks",$2);/**
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 K2=[["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"}]],V2=we("book-open",K2);/**
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 Y2=[["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"}]],Q2=we("bot",Y2);/**
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 X2=[["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"}]],C1=we("brain",X2);/**
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 Z2=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Fs=we("check",Z2);/**
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 W2=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],$s=we("chevron-down",W2);/**
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 J2=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Va=we("chevron-right",J2);/**
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 eT=[["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"}]],tT=we("circle-alert",eT);/**
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 nT=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],T1=we("circle-check",nT);/**
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 rT=[["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"}]],iT=we("circle-question-mark",rT);/**
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 aT=[["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"}]],R1=we("circle-x",aT);/**
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 sT=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],lT=we("circle",sT);/**
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 oT=[["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"}]],A1=we("clipboard-copy",oT);/**
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 cT=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],O1=we("clock",cT);/**
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 uT=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],dT=we("cloud",uT);/**
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 fT=[["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"}]],hT=we("compass",fT);/**
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 mT=[["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"}]],pT=we("crown",mT);/**
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 gT=[["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"}]],bT=we("database",gT);/**
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 xT=[["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"}]],jm=we("external-link",xT);/**
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 yT=[["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"}]],vT=we("eye",yT);/**
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 kT=[["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"}]],_T=we("file-code",kT);/**
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 ET=[["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"}]],Ni=we("file-search",ET);/**
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 wT=[["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"}]],Du=we("file-text",wT);/**
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 ST=[["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"}]],NT=we("file",ST);/**
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 zT=[["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"}]],CT=we("folder-open-dot",zT);/**
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 TT=[["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"}]],RT=we("folder-open",TT);/**
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 AT=[["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"}]],M1=we("funnel",AT);/**
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 OT=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],MT=we("gauge",OT);/**
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 DT=[["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"}]],Gs=we("git-branch",DT);/**
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 jT=[["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"}]],D1=we("github",jT);/**
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 LT=[["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"}]],IT=we("handshake",LT);/**
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 BT=[["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"}]],Hx=we("history",BT);/**
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 UT=[["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"}]],FT=we("house",UT);/**
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 PT=[["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"}]],HT=we("layers",PT);/**
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 qT=[["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"}]],$T=we("lightbulb",qT);/**
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 GT=[["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"}]],KT=we("link-2",GT);/**
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 VT=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],da=we("loader-circle",VT);/**
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 YT=[["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"}]],ha=we("map",YT);/**
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 QT=[["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"}]],XT=we("message-circle",QT);/**
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 ZT=[["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"}]],bu=we("message-square",ZT);/**
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 WT=[["path",{d:"M5 12h14",key:"1ays0h"}]],xu=we("minus",WT);/**
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 JT=[["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"}]],eR=we("monitor",JT);/**
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 tR=[["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"}]],nR=we("moon",tR);/**
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 rR=[["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"}]],iR=we("panels-top-left",rR);/**
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 aR=[["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"}]],ho=we("pen-line",aR);/**
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 sR=[["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"}]],mo=we("play",sR);/**
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 lR=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Ua=we("plus",lR);/**
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 oR=[["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"}]],po=we("refresh-cw",oR);/**
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 cR=[["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"}]],uR=we("rocket",cR);/**
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 dR=[["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"}]],fR=we("rotate-ccw",dR);/**
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 hR=[["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"}]],qx=we("save",hR);/**
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 mR=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],ju=we("search",mR);/**
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 pR=[["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"}]],gR=we("send-horizontal",pR);/**
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 bR=[["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"}]],$x=we("send",bR);/**
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 xR=[["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"}]],yR=we("server",xR);/**
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 vR=[["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"}]],kR=we("settings-2",vR);/**
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 _R=[["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"}]],Lm=we("shield-alert",_R);/**
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 ER=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],wR=we("shield-check",ER);/**
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 SR=[["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"}]],NR=we("shield",SR);/**
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 zR=[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]],CR=we("smartphone",zR);/**
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 TR=[["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"}]],Lu=we("sparkles",TR);/**
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 RR=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],AR=we("square",RR);/**
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 OR=[["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"}]],MR=we("sun",OR);/**
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 DR=[["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"}]],jR=we("swords",DR);/**
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 LR=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Iu=we("terminal",LR);/**
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 IR=[["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"}]],BR=we("test-tube",IR);/**
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 UR=[["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"}]],FR=we("test-tubes",UR);/**
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 PR=[["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"}]],HR=we("trash-2",PR);/**
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 qR=[["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"}]],Im=we("triangle-alert",qR);/**
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 $R=[["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"}]],Ha=we("user",$R);/**
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 GR=[["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"}]],j1=we("users",GR);/**
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 KR=[["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"}]],VR=we("wrench",KR);/**
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 YR=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],gr=we("x",YR);function Ks(){return vn({queryKey:["config"],queryFn:()=>Zt("/api/config"),staleTime:1/0})}const QR=[{to:"/",label:"Home",icon:FT},{to:"/commands",label:"Commands",icon:Iu},{to:"/reviewers",label:"Team",icon:j1},{to:"/sessions",label:"Sessions",icon:Gs},{to:"/reviews",label:"Reviews",icon:Ni}],XR={connected:"bg-emerald-500",connecting:"bg-amber-500 animate-pulse",reconnecting:"bg-amber-500 animate-pulse",disconnected:"bg-red-500"};function ZR(){const e=ei(),{status:n}=Ci(),{runningCount:r}=Dm(),{data:a}=Ks();return S.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]),f.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:[f.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:[f.jsx(Ni,{className:"h-5 w-5 shrink-0 text-zinc-700 dark:text-zinc-300"}),f.jsxs("div",{className:"min-w-0 flex-1",children:[f.jsx("span",{className:"text-sm font-semibold text-zinc-900 dark:text-zinc-100",children:"OCR Dashboard"}),a?.workspaceName&&f.jsxs("span",{className:"block truncate text-[11px] text-zinc-500 dark:text-zinc-400",children:[a.workspaceName,a.gitBranch&&f.jsxs("span",{className:"ml-1 text-zinc-400 dark:text-zinc-500",children:["(",a.gitBranch,")"]})]})]}),a?.workspaceName&&f.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:[f.jsx("div",{className:"absolute -left-1 top-3 h-2 w-2 rotate-45 bg-zinc-900 dark:bg-zinc-700"}),f.jsxs("div",{className:"relative rounded-lg bg-zinc-900 px-3 py-2 text-xs shadow-lg dark:bg-zinc-700",children:[f.jsx("div",{className:"font-medium text-white",children:a.workspaceName}),a.gitBranch&&f.jsx("div",{className:"mt-0.5 font-mono text-emerald-400",children:a.gitBranch}),f.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})]})]})]}),f.jsx("nav",{className:"flex-1 space-y-1 p-2",children:QR.map(({to:l,label:o,icon:u})=>{const d=l==="/"?e.pathname==="/":e.pathname.startsWith(l);return f.jsxs(Dn,{to:l,className:ge("flex items-center gap-2 rounded-md px-3 py-2 text-sm transition-colors",d?"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:[f.jsx(u,{className:"h-4 w-4"}),o,l==="/commands"&&r>0&&f.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)})}),f.jsx("div",{className:"border-t border-zinc-200 p-3 dark:border-zinc-800",children:f.jsxs("div",{role:"status","aria-label":`Connection status: ${n}`,className:"flex items-center gap-2 text-xs text-zinc-500 dark:text-zinc-400",children:[f.jsx("div",{className:ge("h-2 w-2 rounded-full",XR[n]),"aria-hidden":"true"}),f.jsx("span",{className:"capitalize",children:n})]})})]})}const WR={system:eR,light:MR,dark:nR};function JR(e){if(e==="/")return[{label:"Home",path:"/"}];const n=e.split("/").filter(Boolean),r=[{label:"Home",path:"/"}];let a="";for(const l of n){a+=`/${l}`;const o=l.charAt(0).toUpperCase()+l.slice(1).replace(/-/g," ");r.push({label:o,path:a})}return r}function eA(){const{mode:e,cycle:n}=Lv(),r=ei(),a=JR(r.pathname),l=WR[e];return f.jsxs("header",{className:"flex h-14 items-center justify-between border-b border-zinc-200 px-6 dark:border-zinc-800",children:[f.jsx("nav",{className:"flex items-center gap-1 text-sm","aria-label":"Breadcrumb",children:a.map((o,u)=>f.jsxs("span",{className:"flex items-center gap-1",children:[u>0&&f.jsx("span",{className:"text-zinc-400 dark:text-zinc-600",children:"/"}),u<a.length-1?f.jsx(Dn,{to:o.path,className:ge("text-zinc-500 dark:text-zinc-400","hover:text-zinc-700 dark:hover:text-zinc-200"),children:o.label}):f.jsx("span",{className:"font-medium text-zinc-900 dark:text-zinc-100",children:o.label})]},o.path))}),f.jsxs("div",{className:"flex items-center gap-1",children:[f.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:f.jsx(D1,{className:"h-4 w-4"})}),f.jsx("button",{onClick:n,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:f.jsx(l,{className:"h-4 w-4"})})]})]})}function tA(){return f.jsxs("div",{className:"flex h-screen bg-white text-zinc-900 dark:bg-zinc-950 dark:text-zinc-100",children:[f.jsx(ZR,{}),f.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[f.jsx(eA,{}),f.jsx("main",{className:"flex-1 overflow-y-auto p-6",children:f.jsx(xN,{})})]})]})}class nA extends S.Component{constructor(n){super(n),this.state={hasError:!1,error:null}}static getDerivedStateFromError(n){return{hasError:!0,error:n}}render(){return this.state.hasError?this.props.fallback?this.props.fallback:f.jsx("div",{className:"flex min-h-[200px] items-center justify-center",children:f.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:[f.jsx(Im,{className:"mx-auto h-8 w-8 text-red-500"}),f.jsx("h2",{className:"mt-3 text-lg font-semibold text-zinc-900 dark:text-zinc-100",children:"Something went wrong"}),f.jsx("p",{className:"mt-1 text-sm text-zinc-600 dark:text-zinc-400",children:this.state.error?.message??"An unexpected error occurred."}),f.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:[f.jsx(po,{className:"h-4 w-4"}),"Try again"]})]})}):this.props.children}}function Ei(){return f.jsx("div",{className:"flex min-h-[400px] items-center justify-center",children:f.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:[f.jsx(Im,{className:"mx-auto h-10 w-10 text-red-500"}),f.jsx("h1",{className:"mt-4 text-xl font-semibold text-zinc-900 dark:text-zinc-100",children:"Page Error"}),f.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."}),f.jsxs("div",{className:"mt-6 flex justify-center gap-3",children:[f.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"}),f.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:[f.jsx(po,{className:"h-4 w-4"}),"Reload"]})]})]})})}function Ts({title:e,value:n,icon:r,trend:a}){return f.jsxs("div",{className:"rounded-lg border border-zinc-200 bg-white p-6 dark:border-zinc-800 dark:bg-zinc-900",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("span",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:e}),f.jsx(r,{className:"h-4 w-4 text-zinc-400 dark:text-zinc-500"})]}),f.jsxs("div",{className:"mt-2 flex items-baseline gap-2",children:[f.jsx("span",{className:"text-2xl font-semibold text-zinc-900 dark:text-zinc-100",children:n}),a&&f.jsx("span",{className:ge("text-xs font-medium",a==="up"?"text-emerald-600 dark:text-emerald-400":"text-red-600 dark:text-red-400"),children:a==="up"?"↑":"↓"})]})]})}const Gx={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"},rA={wont_fix:"Won't Fix",needs_review:"Needs Review",in_progress:"In Progress",changes_made:"Changes Made"};function Vs({variant:e,label:n,className:r}){const a=n??rA[e]??e.charAt(0).toUpperCase()+e.slice(1);return f.jsx("span",{className:ge("inline-flex items-center rounded-md border px-2 py-0.5 text-xs font-medium",Gx[e]??Gx.default,r),children:a})}function iA(e){return Ka(e).toLocaleString(void 0,{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit"})}function aA(e){return Ka(e).toLocaleDateString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function sA(e){return Ka(e).toLocaleString()}function lA(e){const n=Math.floor((Date.now()-Ka(e).getTime())/1e3);if(n<60)return"just now";const r=Math.floor(n/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 oA(e){const n=Date.now()-Ka(e).getTime(),r=Math.floor(n/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 cA(e){return e==null||Number.isNaN(e)?"-":e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`}function uA({sessions:e}){return e.length===0?f.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."}):f.jsx("div",{className:"space-y-1",children:e.map(n=>{const r=n.workflow_type==="map"?ha:Ni;return f.jsxs(Dn,{to:`/sessions/${n.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:[f.jsx(Gs,{className:"h-4 w-4 shrink-0 text-zinc-400"}),f.jsx("span",{className:"min-w-0 flex-1 truncate text-zinc-900 dark:text-zinc-100",children:n.branch}),f.jsx(r,{className:"h-3.5 w-3.5 shrink-0 text-zinc-400"}),f.jsx(Vs,{variant:n.status}),f.jsx("span",{className:"shrink-0 text-xs text-zinc-400 dark:text-zinc-500",children:lA(n.updated_at)})]},n.id)})})}function dA(){const e=vn({queryKey:["stats"],queryFn:()=>Zt("/api/stats")}),n=vn({queryKey:["sessions","recent"],queryFn:()=>Zt("/api/sessions?limit=10")}),r=e.data;return f.jsxs("div",{className:"space-y-8",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"text-2xl font-semibold",children:"Dashboard"}),f.jsx("p",{className:"mt-1 text-sm text-zinc-500 dark:text-zinc-400",children:"Overview of your code review activity."})]}),(e.isError||n.isError)&&f.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."}),f.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:[f.jsx(Ts,{title:"Total Sessions",value:r?.totalSessions??0,icon:Gs}),f.jsx(Ts,{title:"Active Sessions",value:r?.activeSessions??0,icon:N1}),f.jsx(Ts,{title:"Completed Reviews",value:r?.completedReviews??0,icon:Ni}),f.jsx(Ts,{title:"Completed Maps",value:r?.completedMaps??0,icon:ha}),f.jsx(Ts,{title:"Files Tracked",value:r?.filesTracked??0,icon:NT}),f.jsx(Ts,{title:"Unresolved Blockers",value:r?.unresolvedBlockers??0,icon:Im})]}),f.jsxs("div",{children:[f.jsx("h2",{className:"mb-4 text-lg font-medium text-zinc-900 dark:text-zinc-100",children:"Recent Sessions"}),f.jsx("div",{className:"rounded-lg border border-zinc-200 bg-white p-4 dark:border-zinc-800 dark:bg-zinc-900",children:n.isLoading?f.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Loading..."}):f.jsx(uA,{sessions:n.data??[]})})]})]})}function fA(){const e=Fn(),n=vn({queryKey:["sessions"],queryFn:()=>Zt("/api/sessions")});return dt("session:created",()=>{e.invalidateQueries({queryKey:["sessions"]})}),dt("session:updated",()=>{e.invalidateQueries({queryKey:["sessions"]})}),n}function hA(e){const n=Fn(),r=vn({queryKey:["sessions",e],queryFn:()=>Zt(`/api/sessions/${e}`),enabled:!!e});return dt("session:updated",()=>{n.invalidateQueries({queryKey:["sessions",e]})}),r}const mA=[{value:"all",label:"All"},{value:"active",label:"Active"},{value:"closed",label:"Closed"}],pA=[{value:"all",label:"All"},{value:"review",label:"Review"},{value:"map",label:"Map"}];function Kx({options:e,value:n,onChange:r,label:a}){return f.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)=>f.jsx("button",{onClick:()=>r(l.value),"aria-pressed":n===l.value,className:ge("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",n===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 gA({statusFilter:e,workflowFilter:n,onStatusChange:r,onWorkflowChange:a}){return f.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[f.jsx("span",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:"Status:"}),f.jsx(Kx,{label:"Filter by status",options:mA,value:e,onChange:r}),f.jsx("span",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:"Workflow:"}),f.jsx(Kx,{label:"Filter by workflow",options:pA,value:n,onChange:a})]})}const bA={APPROVED:"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"};function xA(e){return bA[e.toUpperCase()]??"bg-amber-500/15 text-amber-700 dark:text-amber-400"}const yA=new Set(["changes_made","acknowledged","dismissed"]),vA={changes_made:"Changes Made",acknowledged:"Acknowledged",dismissed:"Dismissed"};function kA({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(d=>d.charAt(0).toUpperCase()+d.slice(1)).join(" "),o=e.latest_round_status,u=o!=null&&yA.has(o);return f.jsxs(Dn,{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:[f.jsxs("div",{className:"flex items-start justify-between gap-2",children:[f.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[f.jsx(Gs,{className:"h-4 w-4 shrink-0 text-zinc-400"}),f.jsx("span",{className:"truncate text-sm font-medium text-zinc-900 dark:text-zinc-100",children:e.branch})]}),f.jsx(Vs,{variant:e.status})]}),f.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-2 text-xs text-zinc-500 dark:text-zinc-400",children:[f.jsxs("span",{className:"flex items-center gap-1",children:[e.has_review&&f.jsx(Ni,{className:"h-3.5 w-3.5"}),e.has_map&&f.jsx(ha,{className:"h-3.5 w-3.5"}),f.jsx("span",{children:r})]}),f.jsx("span",{className:"text-zinc-300 dark:text-zinc-700",children:"|"}),e.latest_verdict?f.jsx("span",{className:"flex items-center gap-1.5",children:u?f.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:vA[o]??o}):f.jsxs(f.Fragment,{children:[f.jsx("span",{className:ge("inline-flex items-center rounded px-1.5 py-0.5 text-[10px] font-semibold uppercase",xA(e.latest_verdict)),children:e.latest_verdict}),e.latest_blocker_count>0&&f.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":""]})]})}):f.jsxs("span",{children:["Phase: ",l]})]}),f.jsxs("div",{className:"mt-2 flex items-center gap-3 text-xs text-zinc-400 dark:text-zinc-500",children:[f.jsx("span",{children:aA(e.started_at)}),f.jsxs("span",{className:"flex items-center gap-1",children:[f.jsx(O1,{className:"h-3 w-3"}),oA(e.updated_at)]})]})]})}function _A({sessions:e}){return e.length===0?f.jsx("p",{className:"py-8 text-center text-sm text-zinc-500 dark:text-zinc-400",children:"No sessions match your filters."}):f.jsx("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",children:e.map(n=>f.jsx(kA,{session:n},n.id))})}function EA(){const{data:e,isLoading:n}=fA(),[r,a]=S.useState("all"),[l,o]=S.useState("all"),u=S.useMemo(()=>e?e.filter(d=>!(r!=="all"&&d.status!==r||l!=="all"&&d.workflow_type!==l)):[],[e,r,l]);return f.jsxs("div",{className:"space-y-6",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"text-2xl font-semibold",children:"Sessions"}),f.jsx("p",{className:"mt-1 text-sm text-zinc-500 dark:text-zinc-400",children:"All code review and map sessions."})]}),f.jsx(gA,{statusFilter:r,workflowFilter:l,onStatusChange:a,onWorkflowChange:o}),n?f.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Loading sessions..."}):f.jsx(_A,{sessions:u})]})}function uh({phases:e,className:n}){return f.jsx("div",{role:"list","aria-label":"Phase timeline",className:ge("flex items-center gap-1",n),children:e.map((r,a)=>f.jsxs("div",{className:"flex items-center gap-1",children:[f.jsx(wA,{phase:r}),a<e.length-1&&f.jsx("div",{className:ge("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 wA({phase:e}){return f.jsxs("div",{className:"group relative flex flex-col items-center",children:[f.jsxs("div",{tabIndex:0,role:"listitem","aria-label":`${e.name}: ${e.status}${e.timestamp?`, ${e.timestamp}`:""}`,className:ge("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"&&f.jsx(Fs,{className:"h-3.5 w-3.5"}),e.status==="active"&&f.jsx(da,{className:"h-3.5 w-3.5 animate-spin"}),e.status==="pending"&&f.jsx(lT,{className:"h-2.5 w-2.5"}),e.status==="skipped"&&f.jsx(xu,{className:"h-3 w-3"})]}),f.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:[f.jsx("span",{className:"font-medium",children:e.name}),e.timestamp&&f.jsx("span",{className:"ml-1 text-zinc-400 dark:text-zinc-500",children:e.timestamp})]})]})}function SA({session:e}){const n=e.has_review,r=e.has_map,a=n?"review":"map",[l,o]=S.useState(a),d=[{id:"review",label:"Review",icon:Ni,visible:n},{id:"map",label:"Map",icon:ha,visible:r}].filter(h=>h.visible);return d.length===0?f.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"No review or map data yet."}):f.jsxs("div",{children:[f.jsx("div",{className:"flex border-b border-zinc-200 dark:border-zinc-800",children:d.map(h=>f.jsxs("button",{onClick:()=>o(h.id),className:ge("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:[f.jsx(h.icon,{className:"h-4 w-4"}),h.label]},h.id))}),f.jsxs("div",{className:"mt-4",children:[l==="review"&&f.jsx(NA,{sessionId:e.id,status:e.status}),l==="map"&&f.jsx(zA,{sessionId:e.id,status:e.status})]})]})}function NA({sessionId:e,status:n}){const r=Fn();dt("artifact:created",()=>{r.invalidateQueries({queryKey:["sessions",e,"rounds"]})}),dt("artifact:updated",()=>{r.invalidateQueries({queryKey:["sessions",e,"rounds"]})});const{data:a,isLoading:l}=vn({queryKey:["sessions",e,"rounds"],queryFn:()=>Zt(`/api/sessions/${e}/rounds`),enabled:!!e});return l?f.jsxs("p",{className:"flex items-center gap-2 text-sm text-zinc-500 dark:text-zinc-400",children:[f.jsx(da,{className:"h-4 w-4 animate-spin"}),"Loading rounds..."]}):!a||a.length===0?f.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:n==="closed"?"This session was closed without completing any review rounds.":"Review in progress — no completed rounds yet."}):f.jsx("div",{className:"space-y-2",children:a.map(o=>f.jsxs(Dn,{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:[f.jsx(Ni,{className:"h-4 w-4 text-zinc-400"}),f.jsxs("span",{className:"text-zinc-900 dark:text-zinc-100",children:["Round ",o.round_number]}),f.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[o.progress&&f.jsx(Vs,{variant:o.progress.status}),o.verdict&&f.jsx("span",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:o.verdict})]})]},o.round_number))})}function zA({sessionId:e,status:n}){const r=Fn();dt("artifact:created",()=>{r.invalidateQueries({queryKey:["sessions",e,"runs"]})}),dt("artifact:updated",()=>{r.invalidateQueries({queryKey:["sessions",e,"runs"]})});const{data:a,isLoading:l}=vn({queryKey:["sessions",e,"runs"],queryFn:()=>Zt(`/api/sessions/${e}/runs`),enabled:!!e});return l?f.jsxs("p",{className:"flex items-center gap-2 text-sm text-zinc-500 dark:text-zinc-400",children:[f.jsx(da,{className:"h-4 w-4 animate-spin"}),"Loading runs..."]}):!a||a.length===0?f.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:n==="closed"?"This session was closed without completing any map runs.":"Map in progress — no completed runs yet."}):f.jsx("div",{className:"space-y-2",children:a.map(o=>f.jsxs(Dn,{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:[f.jsx(ha,{className:"h-4 w-4 text-zinc-400"}),f.jsxs("span",{className:"text-zinc-900 dark:text-zinc-100",children:["Run ",o.run_number]})]},o.run_number))})}const CA=["context","change-context","analysis","reviews","aggregation","discourse","synthesis","complete"],TA=["map-context","topology","flow-analysis","requirements-mapping","synthesis","complete"];function dh(e){return e.split("-").map(n=>n.charAt(0).toUpperCase()+n.slice(1)).join(" ")}function fh(e,n,r,a){const l=e==="map"?TA:CA,o=l.length;return r>=o?l.map(u=>({name:dh(u),status:"complete"})):a==="closed"?l.map((u,d)=>({name:dh(u),status:d+1<=r?"complete":"skipped"})):l.map((u,d)=>({name:dh(u),status:d+1<r?"complete":d+1===r?"active":"pending"}))}function RA(){const{id:e}=Tu(),n=Fn(),{data:r,isLoading:a}=hA(e??""),l=vn({queryKey:["sessions",e,"events"],queryFn:()=>Zt(`/api/sessions/${e}/events`),enabled:!!e});if(dt("session:events",()=>{n.invalidateQueries({queryKey:["sessions",e,"events"]})}),a)return f.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Loading session..."});if(!r)return f.jsxs("div",{children:[f.jsxs(Dn,{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:[f.jsx(fa,{className:"h-4 w-4"}),"Back to sessions"]}),f.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Session not found."})]});const o=r.has_review&&r.has_map,u=o?"Review + Map":r.has_map?"Map":"Review";return f.jsxs("div",{className:"space-y-6",children:[f.jsxs(Dn,{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:[f.jsx(fa,{className:"h-4 w-4"}),"Back to sessions"]}),f.jsxs("div",{className:"rounded-lg border border-zinc-200 bg-white p-6 dark:border-zinc-800 dark:bg-zinc-900",children:[f.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[f.jsxs("div",{className:"space-y-1",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(Gs,{className:"h-5 w-5 text-zinc-400"}),f.jsx("h1",{className:"text-xl font-semibold text-zinc-900 dark:text-zinc-100",children:r.branch})]}),f.jsxs("div",{className:"flex items-center gap-3 text-sm text-zinc-500 dark:text-zinc-400",children:[f.jsxs("span",{className:"flex items-center gap-1",children:[r.has_review&&f.jsx(Ni,{className:"h-4 w-4"}),r.has_map&&f.jsx(ha,{className:"h-4 w-4"}),f.jsx("span",{children:u})]}),f.jsxs("span",{className:"flex items-center gap-1",children:[f.jsx(O1,{className:"h-4 w-4"}),iA(r.started_at)]})]})]}),f.jsx(Vs,{variant:r.status})]}),f.jsxs("div",{className:"mt-6",children:[f.jsx("h3",{className:"mb-2 text-xs font-medium uppercase tracking-wide text-zinc-500 dark:text-zinc-400",children:"Progress"}),o?f.jsxs("div",{className:"space-y-3",children:[f.jsxs("div",{children:[f.jsxs("div",{className:"mb-1 flex items-center gap-1.5 text-xs text-zinc-500 dark:text-zinc-400",children:[f.jsx(Ni,{className:"h-3.5 w-3.5"}),f.jsx("span",{children:"Review"})]}),f.jsx(uh,{phases:fh("review",r.review_phase,r.review_phase_number,r.status)})]}),f.jsxs("div",{children:[f.jsxs("div",{className:"mb-1 flex items-center gap-1.5 text-xs text-zinc-500 dark:text-zinc-400",children:[f.jsx(ha,{className:"h-3.5 w-3.5"}),f.jsx("span",{children:"Map"})]}),f.jsx(uh,{phases:fh("map",r.map_phase,r.map_phase_number,r.status)})]})]}):f.jsx(uh,{phases:fh(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)})]})]}),f.jsx("div",{className:"rounded-lg border border-zinc-200 bg-white p-6 dark:border-zinc-800 dark:bg-zinc-900",children:f.jsx(SA,{session:r})}),f.jsxs("div",{className:"rounded-lg border border-zinc-200 bg-white p-6 dark:border-zinc-800 dark:bg-zinc-900",children:[f.jsx("h2",{className:"mb-4 text-sm font-medium text-zinc-900 dark:text-zinc-100",children:"Event Log"}),l.isLoading?f.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Loading events..."}):(l.data??[]).length===0?f.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"No events recorded."}):f.jsx("div",{className:"space-y-2",children:(l.data??[]).map(d=>f.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:[f.jsx("span",{className:"shrink-0 text-xs tabular-nums text-zinc-400 dark:text-zinc-500",children:Ka(d.created_at).toLocaleTimeString()}),f.jsxs("div",{className:"min-w-0 flex-1",children:[f.jsx("span",{className:"font-medium text-zinc-900 dark:text-zinc-100",children:d.event_type}),d.phase&&f.jsxs("span",{className:"ml-2 text-zinc-500 dark:text-zinc-400",children:["Phase: ",d.phase]}),d.round!=null&&f.jsxs("span",{className:"ml-2 text-zinc-500 dark:text-zinc-400",children:["Round: ",d.round]})]})]},d.id))})]})]})}function Bm(){const{data:e}=Ks(),n=e?.aiCli?.active??null,r=e?.aiCli?.available??[],a=e?.aiCli?.preferred??"auto";return{isAvailable:n!=null,activeCli:n,availableClis:r,isDisabledByConfig:a==="off"&&r.length>0}}function L1(){const e=Fn(),{data:n,isLoading:r}=vn({queryKey:["reviewers"],queryFn:()=>Zt("/api/reviewers")});return dt("reviewers:updated",a=>{e.setQueryData(["reviewers"],a)}),{reviewers:n?.reviewers??[],defaults:n?.defaults??[],isLoaded:!r}}const AA={activity:N1,blocks:G2,bot:Q2,layers:HT,"shield-check":wR,compass:hT,layout:iR,server:yR,cloud:dT,gauge:MT,accessibility:D2,database:bT,rocket:uR,terminal:Iu,smartphone:CR,crown:pT,sparkles:Lu,"shield-alert":Lm,"test-tubes":FR,brain:C1,user:Ha};function Bu({icon:e,className:n="h-4 w-4"}){const r=AA[e]??Ha;return f.jsx(r,{className:n})}function OA({reviewers:e,selection:n,isLoaded:r,disabled:a,onRemove:l,onCustomize:o}){if(!r)return f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("label",{className:"w-28 shrink-0 text-right text-xs font-medium text-zinc-500 dark:text-zinc-400",children:"Reviewers"}),f.jsx("div",{className:"flex h-8 items-center text-xs text-zinc-400 dark:text-zinc-500",children:"Loading..."})]});if(e.length===0)return f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("label",{className:"w-28 shrink-0 text-right text-xs font-medium text-zinc-500 dark:text-zinc-400",children:"Reviewers"}),f.jsxs("p",{className:"text-xs text-zinc-400 dark:text-zinc-500",children:["Run ",f.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 u=n.filter(m=>!m.description),d=n.filter(m=>m.description),h=u.map(m=>{const b=e.find(x=>x.id===m.id);return b?{...b,count:m.count}:null}).filter(Boolean);return f.jsxs("div",{className:"flex items-start gap-3",children:[f.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"}),f.jsxs("div",{className:"flex flex-1 flex-wrap items-center gap-1.5",children:[h.map(m=>f.jsxs("span",{className:ge("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:[f.jsx(Bu,{icon:m.icon,className:"h-3 w-3 text-zinc-400 dark:text-zinc-500"}),f.jsx("span",{className:"max-w-[120px] truncate",children:m.name}),m.count>1&&f.jsxs("span",{className:"text-[10px] text-zinc-400 dark:text-zinc-500",children:["x",m.count]}),!a&&f.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:f.jsx(gr,{className:"h-2.5 w-2.5"})})]},m.id)),d.map(m=>f.jsxs("span",{title:m.description,className:ge("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:[f.jsx(ho,{className:"h-3 w-3 shrink-0"}),f.jsx("span",{className:"max-w-[160px] truncate",children:m.description}),m.count>1&&f.jsxs("span",{className:"text-[10px] text-amber-400 dark:text-amber-500",children:["x",m.count]}),!a&&f.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:f.jsx(gr,{className:"h-2.5 w-2.5"})})]},m.id)),f.jsxs("button",{type:"button",disabled:a,onClick:o,className:ge("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:[f.jsx(kR,{className:"h-3 w-3"}),"Customize..."]})]})]})}const yu={holistic:{label:"Generalists",order:0},specialist:{label:"Specialists",order:1},persona:{label:"Famous Engineers",order:2},custom:{label:"Custom",order:3}};function I1(e,n){if(!n.trim())return e;const r=n.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 B1(e){const n=new Map;for(const r of e){const a=n.get(r.tier)??[];a.push(r),n.set(r.tier,a)}return[...n.entries()].sort((r,a)=>yu[r[0]].order-yu[a[0]].order)}function MA(e){return e.toLowerCase().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}function DA({open:e,reviewers:n,initialSelection:r,onApply:a,onClose:l}){const[o,u]=S.useState(""),[d,h]=S.useState(new Map),[m,b]=S.useState(new Set),[x,y]=S.useState(null),v=S.useRef(null),[_,E]=S.useState([]),[w,N]=S.useState(!1),[M,R]=S.useState(""),U=S.useRef(null);S.useEffect(()=>{if(e){const q=new Map,L=[];for(const Y of r)Y.description?L.push({description:Y.description,count:Y.count}):q.set(Y.id,Y.count);h(q),E(L),u(""),y(null),N(!1),R(""),setTimeout(()=>v.current?.focus(),50)}},[e,r]),S.useEffect(()=>{if(!e)return;const q=L=>{L.key==="Escape"&&l()};return window.addEventListener("keydown",q),()=>window.removeEventListener("keydown",q)},[e,l]);const $=S.useMemo(()=>I1(n,o),[n,o]),j=S.useMemo(()=>B1($),[$]);function J(q){h(L=>{const Y=new Map(L);return Y.has(q)?Y.delete(q):Y.set(q,1),Y})}function A(q,L){const Y=Math.max(1,Math.min(3,L));h(V=>{const ne=new Map(V);return ne.set(q,Y),ne})}function ae(q){b(L=>{const Y=new Set(L);return Y.has(q)?Y.delete(q):Y.add(q),Y})}function H(){const q=M.trim();q&&(E(L=>[...L,{description:q,count:1}]),R(""),N(!1))}function te(q){E(L=>L.filter((Y,V)=>V!==q))}function ee(q,L){const Y=Math.max(1,Math.min(3,L));E(V=>V.map((ne,C)=>C===q?{...ne,count:Y}:ne))}function ve(){const q=[];for(const[L,Y]of d)q.push({id:L,count:Y});_.forEach((L,Y)=>{q.push({id:`ephemeral-${Y+1}`,count:L.count,description:L.description})}),a(q)}if(!e)return null;const oe=d.size+_.length;return f.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center px-4 bg-black/50 backdrop-blur-sm",children:f.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:[f.jsxs("div",{className:"flex items-center justify-between border-b border-zinc-200 px-5 py-3.5 dark:border-zinc-700",children:[f.jsx("h2",{className:"text-sm font-semibold text-zinc-900 dark:text-zinc-100",children:"Select Reviewers"}),f.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:f.jsx(gr,{className:"h-4 w-4"})})]}),f.jsx("div",{className:"border-b border-zinc-200 px-5 py-2.5 dark:border-zinc-700",children:f.jsxs("div",{className:"relative",children:[f.jsx(ju,{className:"absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-zinc-400"}),f.jsx("input",{ref:v,type:"text",value:o,onChange:q=>u(q.target.value),placeholder:"Search reviewers...",className:ge("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")})]})}),f.jsxs("div",{className:"min-w-0 flex-1 overflow-y-auto overflow-x-hidden px-5 py-3",children:[j.length===0&&_.length===0&&f.jsx("p",{className:"py-8 text-center text-sm text-zinc-400 dark:text-zinc-500",children:"No reviewers match your search."}),j.map(([q,L])=>{const Y=m.has(q),V=yu[q];return f.jsxs("div",{className:"mb-4 last:mb-0",children:[f.jsxs("button",{type:"button",onClick:()=>ae(q),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:[Y?f.jsx(Va,{className:"h-3 w-3"}):f.jsx($s,{className:"h-3 w-3"}),V.label,f.jsxs("span",{className:"font-normal text-zinc-300 dark:text-zinc-600",children:["(",L.length,")"]})]}),!Y&&f.jsx("div",{className:"flex flex-col gap-1.5",children:L.map(ne=>{const C=d.has(ne.id),O=d.get(ne.id)??1,K=x===ne.id;return f.jsxs("div",{children:[f.jsxs("div",{role:"button",tabIndex:0,onClick:()=>J(ne.id),onKeyDown:T=>{(T.key==="Enter"||T.key===" ")&&(T.preventDefault(),J(ne.id))},className:ge("flex min-w-0 items-center gap-3 rounded-lg border px-3 py-2 transition-colors cursor-pointer",C?"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:[f.jsx("input",{type:"checkbox",checked:C,onChange:()=>J(ne.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"}),f.jsx(Bu,{icon:ne.icon,className:ge("h-4 w-4 shrink-0",C?"text-indigo-500 dark:text-indigo-400":"text-zinc-400 dark:text-zinc-500")}),f.jsxs("div",{className:"min-w-0 flex-1",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("span",{className:"text-sm font-medium text-zinc-900 dark:text-zinc-100",children:ne.name}),ne.tier==="persona"&&f.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"})]}),f.jsx("p",{className:"truncate text-xs text-zinc-500 dark:text-zinc-400",children:ne.description})]}),C&&f.jsxs("div",{className:"flex shrink-0 items-center gap-1",onClick:T=>T.stopPropagation(),children:[f.jsx("button",{type:"button",onClick:()=>A(ne.id,O-1),disabled:O<=1,className:"rounded p-0.5 text-zinc-400 hover:bg-zinc-100 disabled:opacity-30 dark:hover:bg-zinc-800",children:f.jsx(xu,{className:"h-3 w-3"})}),f.jsx("span",{className:"w-4 text-center text-xs font-medium text-zinc-600 dark:text-zinc-300",children:O}),f.jsx("button",{type:"button",onClick:()=>A(ne.id,O+1),disabled:O>=3,className:"rounded p-0.5 text-zinc-400 hover:bg-zinc-100 disabled:opacity-30 dark:hover:bg-zinc-800",children:f.jsx(Ua,{className:"h-3 w-3"})})]}),f.jsx("button",{type:"button",onClick:T=>{T.stopPropagation(),y(K?null:ne.id)},className:ge("shrink-0 rounded p-1 transition-colors",K?"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:f.jsx(iT,{className:"h-3.5 w-3.5"})})]}),K&&f.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:[ne.description&&f.jsx("p",{className:"mb-2 text-zinc-600 dark:text-zinc-300",children:ne.description}),ne.known_for&&f.jsxs("p",{className:"mb-1.5",children:[f.jsxs("span",{className:"font-semibold text-zinc-600 dark:text-zinc-300",children:["Known for:"," "]}),f.jsx("span",{className:"text-zinc-500 dark:text-zinc-400",children:ne.known_for})]}),ne.philosophy&&f.jsxs("p",{className:"mb-2 italic text-zinc-500 dark:text-zinc-400",children:["“",ne.philosophy,"”"]}),ne.focus_areas.length>0&&f.jsx("div",{className:"flex flex-wrap gap-1",children:ne.focus_areas.map(T=>f.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))})]})]},ne.id)})})]},q)}),f.jsxs("div",{className:"mb-2 mt-2",children:[_.length>0&&f.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:[f.jsx(ho,{className:"h-3 w-3"}),"One-off Reviewers",f.jsxs("span",{className:"font-normal text-amber-400 dark:text-amber-600",children:["(",_.length,")"]})]}),f.jsx("div",{className:"flex flex-col gap-1.5",children:_.map((q,L)=>f.jsxs("div",{className:ge("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:[f.jsx(ho,{className:"h-4 w-4 shrink-0 text-amber-500 dark:text-amber-400"}),f.jsx("p",{className:"min-w-0 flex-1 text-xs text-amber-700 dark:text-amber-300",children:q.description}),f.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[f.jsx("button",{type:"button",onClick:()=>ee(L,q.count-1),disabled:q.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:f.jsx(xu,{className:"h-3 w-3"})}),f.jsx("span",{className:"w-4 text-center text-xs font-medium text-amber-600 dark:text-amber-300",children:q.count}),f.jsx("button",{type:"button",onClick:()=>ee(L,q.count+1),disabled:q.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:f.jsx(Ua,{className:"h-3 w-3"})})]}),f.jsx("button",{type:"button",onClick:()=>te(L),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:f.jsx(gr,{className:"h-3.5 w-3.5"})})]},L))}),w?f.jsxs("div",{className:ge("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:[f.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?"}),f.jsx("textarea",{ref:U,value:M,onChange:q=>R(q.target.value),onKeyDown:q=>{q.key==="Enter"&&!q.shiftKey&&(q.preventDefault(),H()),q.key==="Escape"&&(q.stopPropagation(),N(!1),R(""))},placeholder:"e.g. Error handling in the auth flow, accessibility compliance, review as a junior developer",rows:2,className:ge("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")}),f.jsxs("div",{className:"mt-2 flex items-center justify-between",children:[f.jsx("p",{className:"text-[10px] text-zinc-400 dark:text-zinc-500",children:"For this review only — won't be saved to your library."}),f.jsxs("div",{className:"flex gap-1.5",children:[f.jsx("button",{type:"button",onClick:()=>{N(!1),R("")},className:"rounded-md px-3 py-1 text-xs text-zinc-500 hover:bg-zinc-100 dark:hover:bg-zinc-800",children:"Cancel"}),f.jsxs("button",{type:"button",onClick:H,disabled:!M.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:[f.jsx(Ua,{className:"h-3 w-3"}),"Add to Team"]})]})]})]}):f.jsxs("button",{type:"button",onClick:()=>{N(!0),setTimeout(()=>U.current?.focus(),50)},className:ge("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:[f.jsx(Ua,{className:"h-4 w-4 shrink-0"}),f.jsx("span",{className:"text-sm",children:"Describe a one-off reviewer for this review..."})]})]})]}),f.jsxs("div",{className:"flex items-center justify-between border-t border-zinc-200 px-5 py-3 dark:border-zinc-700",children:[f.jsxs("span",{className:"text-xs text-zinc-400 dark:text-zinc-500",children:[oe," reviewer",oe!==1?"s":""," selected"]}),f.jsxs("div",{className:"flex gap-2",children:[f.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"}),f.jsx("button",{type:"button",onClick:ve,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"})]})]})]})})}const no=[{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 jA(e){const n=[];return{cleaned:e.replace(/--reviewer\s+(?:(\d+):)?(?:"([^"]*?)"|'([^']*?)')/g,(a,l,o,u)=>(n.push({description:o??u??"",count:parseInt(l??"1",10)||1}),"")).replace(/\s{2,}/g," ").trim(),entries:n}}function LA(e){const{cleaned:n,entries:r}=jA(e),l=n.replace(/^ocr\s+/,"").split(/\s+/),o=l[0]??"";if(!no.find(m=>m.id===o))return null;const u={};let d,h=1;for(;h<l.length;){const m=l[h]??"";if(m==="--fresh")u.fresh=!0,h++;else if(m==="--team"&&h+1<l.length)d=(l[h+1]??"").split(",").map(x=>{const[y="",v]=x.split(":");return{id:y,count:parseInt(v??"1",10)||1}}).filter(x=>x.id.length>0),h+=2;else if(m==="--requirements"&&h+1<l.length){const b=l.slice(h+1),x=b.indexOf("--team");x>=0?(u.requirements=b.slice(0,x).join(" "),d=(b[x+1]??"").split(",").map(v=>{const[_="",E]=v.split(":");return{id:_,count:parseInt(E??"1",10)||1}}).filter(v=>v.id.length>0)):u.requirements=b.join(" ");break}else m.startsWith("--")||(u.target=m),h++}return r.length>0&&(d||(d=[]),r.forEach((m,b)=>{d.push({id:`ephemeral-${b+1}`,count:m.count,description:m.description})})),{commandId:o,params:u,team:d}}function IA(e){return e.filter(n=>!n.description).map(n=>`${n.id}:${n.count}`).join(",")}function BA(e,n){if(e.some(a=>a.description)||n.some(a=>a.description)||e.length!==n.length)return!1;const r=new Map(e.map(a=>[a.id,a.count]));for(const a of n)if(r.get(a.id)!==a.count)return!1;return!0}function UA({isRunning:e,runningCount:n,onRunCommand:r,prefill:a,onPrefillConsumed:l}){const[o,u]=S.useState(no[0]?.id??""),[d,h]=S.useState({}),[m,b]=S.useState(!1),[x,y]=S.useState(!1),v=S.useRef(void 0),{reviewers:_,defaults:E,isLoaded:w}=L1(),[N,M]=S.useState(null),[R,U]=S.useState(!1),$=no.find(V=>V.id===o)??no[0],j=$.id==="review",J=w?E.map(V=>({id:V,count:1})).reduce((V,ne)=>{const C=V.find(O=>O.id===ne.id);return C?C.count+=ne.count:V.push({...ne}),V},[]):[],A=N??J,[ae,H]=S.useState(null);a!==ae&&(H(a),a&&(u(a.commandId),h(a.params),M(a.team??null),b(!1),y(!0),l())),S.useEffect(()=>{if(x)return v.current=setTimeout(()=>y(!1),1200),()=>clearTimeout(v.current)},[x]);function te(V){V!==o&&(u(V),h({}),M(null),b(!1))}function ee(V,ne){h(C=>({...C,[V]:ne}))}function ve(V){const C=(N??J).filter(O=>O.id!==V);M(C)}const oe=S.useCallback(V=>{BA(V,J)?M(null):M(V),U(!1)},[J]);function q(){const V=[$.command],ne=d.target;if(typeof ne=="string"&&ne.trim()&&V.push(ne.trim()),d.fresh===!0&&V.push("--fresh"),j&&N!==null){const O=IA(N);O&&V.push("--team",O);for(const K of N)if(K.description){const T=K.description.replace(/"/g,'\\"');K.count>1?V.push("--reviewer",`${K.count}:"${T}"`):V.push("--reviewer",`"${T}"`)}}const C=d.requirements;return typeof C=="string"&&C.trim()&&V.push("--requirements",C.trim()),V.join(" ")}function L(){e||b(!0)}function Y(){const V=q();b(!1),h({}),M(null),r(V)}return f.jsxs("div",{className:ge("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:[f.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:[f.jsx(Lu,{className:"mr-1.5 h-4 w-4 text-indigo-500 dark:text-indigo-400"}),no.map(V=>f.jsx("button",{type:"button",onClick:()=>te(V.id),className:ge("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))]}),f.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:[f.jsx(Lm,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),f.jsx("span",{children:"Commands run an AI agent with full read/write and shell access to your project. Only run in trusted environments."})]}),f.jsxs("div",{className:"space-y-4 bg-white px-5 py-4 dark:bg-zinc-900/50",children:[f.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:$.description}),f.jsxs("div",{className:"space-y-3",children:[$.params.map(V=>V.type==="text"?f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("label",{className:"w-28 shrink-0 text-right text-xs font-medium text-zinc-500 dark:text-zinc-400",children:V.label}),f.jsx("input",{type:"text",placeholder:V.placeholder,disabled:e,value:d[V.name]??"",onChange:ne=>ee(V.name,ne.target.value),className:ge("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):f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("span",{className:"w-28 shrink-0"}),f.jsxs("label",{className:"flex items-center gap-2 text-xs text-zinc-500 dark:text-zinc-400",children:[f.jsx("input",{type:"checkbox",disabled:e,checked:d[V.name]===!0,onChange:ne=>ee(V.name,ne.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&&f.jsx(OA,{reviewers:_,selection:A,isLoaded:w,disabled:e,onRemove:ve,onCustomize:()=>U(!0)})]}),f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("span",{className:"w-28 shrink-0"}),f.jsxs("button",{type:"button",disabled:e,onClick:L,className:ge("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:[f.jsx(mo,{className:"h-3.5 w-3.5"}),"Run ",$.label,n!=null&&n>0&&f.jsxs("span",{className:"ml-1.5 rounded-full bg-indigo-500/20 px-1.5 text-[10px] font-normal text-indigo-300",children:[n," running"]})]})]})]}),m&&f.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:f.jsxs("div",{className:"flex flex-col items-center gap-3 px-4",children:[f.jsxs("p",{className:"text-sm font-medium",children:["Run ",$.label,"?"]}),f.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."}),f.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()}),f.jsxs("div",{className:"flex gap-2",children:[f.jsx("button",{type:"button",onClick:()=>b(!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"}),f.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:[f.jsx(mo,{className:"h-3 w-3"}),"Start"]})]})]})}),j&&f.jsx(DA,{open:R,reviewers:_,initialSelection:A,onApply:oe,onClose:()=>U(!1)})]})}function FA({output:e,isRunning:n,exitCode:r,commandName:a,onCancel:l,bare:o}){const u=S.useRef(null);S.useEffect(()=>{u.current&&(u.current.scrollTop=u.current.scrollHeight)},[e]);const d=S.useMemo(()=>PA(e),[e]);return e.length>0||n?f.jsxs("div",{className:ge(!o&&"overflow-hidden rounded-lg border border-zinc-200 dark:border-zinc-800"),children:[f.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:[f.jsx("div",{className:"flex items-center gap-2",children:n?f.jsxs(f.Fragment,{children:[f.jsxs("span",{className:"relative flex h-2 w-2",children:[f.jsx("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-indigo-400 opacity-75"}),f.jsx("span",{className:"relative inline-flex h-2 w-2 rounded-full bg-indigo-500"})]}),f.jsxs("span",{className:"text-xs font-medium text-zinc-600 dark:text-zinc-300",children:["Running ",a??"workflow","..."]})]}):f.jsxs(f.Fragment,{children:[f.jsx(Lu,{className:"h-3.5 w-3.5 text-zinc-400"}),f.jsx("span",{className:"text-xs font-medium text-zinc-500 dark:text-zinc-400",children:"Workflow Output"})]})}),f.jsxs("div",{className:"flex items-center gap-2",children:[n&&f.jsxs("button",{type:"button",onClick:l,className:ge("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:[f.jsx(AR,{className:"h-2.5 w-2.5"}),"Cancel"]}),r!==null&&f.jsx("span",{className:ge("inline-flex items-center rounded-md border px-2 py-0.5 text-xs font-medium",r===0?"border-emerald-500/25 bg-emerald-500/15 text-emerald-700 dark:text-emerald-400":r===-2?"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"),children:r===0?"Complete":r===-2?"Cancelled":`Exit: ${r}`})]})]}),f.jsxs("div",{ref:u,className:"max-h-[600px] min-h-[120px] overflow-y-auto bg-white px-5 py-4 dark:bg-zinc-950",children:[d.length===0&&n?f.jsxs("div",{className:"flex items-center gap-2 text-sm text-zinc-400",children:[f.jsx("span",{className:"h-1 w-1 animate-pulse rounded-full bg-zinc-400"}),"Waiting for output..."]}):d.map((m,b)=>{if(m.type==="tool")return f.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:[f.jsx("span",{className:"shrink-0 text-indigo-400/70",children:"▸"}),f.jsx("span",{className:"truncate",children:m.text})]},b);if(m.type==="empty")return f.jsx("div",{className:"h-3"},b);const x=m.text.match(/^(#{1,6})\s+(.+)/);if(x){const y=x[1].length,v=x[2],_=y<=2?"text-base font-semibold":y<=4?"text-sm font-semibold":"text-sm font-medium";return f.jsx("div",{className:ge(_,"mt-3 mb-1 text-zinc-800 dark:text-zinc-200"),children:v},b)}return/^[-*+]\s/.test(m.text)||/^\d+\.\s/.test(m.text)?f.jsx("div",{className:"ml-4 text-sm leading-relaxed text-zinc-700 dark:text-zinc-300",children:m.text},b):f.jsx("div",{className:"text-sm leading-relaxed text-zinc-700 dark:text-zinc-300",children:m.text},b)}),n&&d.length>0&&f.jsx("span",{className:"inline-block h-4 w-0.5 animate-pulse bg-indigo-500"})]})]}):null}function PA(e){if(!e)return[];const n=e.split(`
502
- `),r=[];for(const a of n){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 u=r[r.length-1];u&&u.type==="text"?u.text+=" "+l:r.push({type:"text",text:l})}}return r.length>0&&r[r.length-1]?.type==="empty"&&r.pop(),r}function HA(){return vn({queryKey:["command-history"],queryFn:()=>Zt("/api/commands/history")})}function qA(e,n){const r=e.toLowerCase(),a=n.toLowerCase();let l=0;for(let o=0;o<a.length;o++){const u=r.indexOf(a[o],l);if(u<0)return!1;l=u+1}return!0}function go(e){return e.exit_code===null?"running":e.exit_code===0?"success":e.exit_code===-2?"cancelled":"fail"}function $A(e){switch(e){case"success":return"Success";case"fail":return"Fail";case"cancelled":return"Cancelled";case"running":return"Running";default:return"All"}}function GA(e,n,r,a){let l=0;switch(r){case"date":l=new Date(e.started_at).getTime()-new Date(n.started_at).getTime();break;case"command":l=e.command.localeCompare(n.command);break;case"duration":l=(e.duration_ms??-1)-(n.duration_ms??-1);break;case"status":{const o={running:0,success:1,cancelled:2,fail:3,all:-1};l=(o[go(e)]??0)-(o[go(n)]??0);break}}return a==="asc"?l:-l}const KA=[{value:"all",label:"All"},{value:"success",label:"Success"},{value:"fail",label:"Fail"},{value:"cancelled",label:"Cancelled"},{value:"running",label:"Running"}];function Vc({label:e,field:n,activeField:r,dir:a,onToggle:l}){const o=n===r;return f.jsxs("button",{type:"button",onClick:()=>l(n),className:ge("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"?f.jsx(I2,{className:"h-3 w-3"}):f.jsx(P2,{className:"h-3 w-3"}):f.jsx(z1,{className:"h-3 w-3 opacity-40"})]})}const VA=new Set(["map","review"]);function YA(e){const n=e.replace(/^ocr\s+/,"").split(/\s+/)[0]??"";return VA.has(n)}function QA({entry:e,isRunning:n,onRerun:r}){const[a,l]=S.useState(!1),u=e.exit_code!==null&&YA(e.command);return f.jsxs("div",{className:"border-b border-zinc-200 last:border-b-0 dark:border-zinc-800",children:[f.jsxs("div",{className:"flex w-full items-center gap-3 px-4 py-3 min-w-0",children:[f.jsxs("button",{type:"button",onClick:()=>l(!a),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:[a?f.jsx($s,{className:"h-4 w-4 shrink-0 text-zinc-400"}):f.jsx(Va,{className:"h-4 w-4 shrink-0 text-zinc-400"}),f.jsx("span",{className:"min-w-0 flex-1 truncate font-mono text-sm",children:e.command})]}),f.jsx("span",{className:"shrink-0 text-xs text-zinc-500 dark:text-zinc-400",children:sA(e.started_at)}),f.jsx("span",{className:"shrink-0 text-xs tabular-nums text-zinc-500 dark:text-zinc-400",children:cA(e.duration_ms)}),f.jsx("span",{className:ge("inline-flex shrink-0 items-center rounded-md border px-2 py-0.5 text-xs font-medium",e.exit_code===0?"border-emerald-500/25 bg-emerald-500/15 text-emerald-700 dark:text-emerald-400":e.exit_code===-2?"border-amber-500/25 bg-amber-500/15 text-amber-700 dark:text-amber-400":e.exit_code!==null?"border-red-500/25 bg-red-500/15 text-red-700 dark:text-red-400":"border-zinc-500/25 bg-zinc-500/15 text-zinc-600 dark:text-zinc-400"),children:$A(go(e))}),u&&f.jsx("button",{type:"button",disabled:n,onClick:()=>r(e.command),title:"Re-run this command",className:ge("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",n&&"cursor-not-allowed opacity-30"),children:f.jsx(fR,{className:"h-3.5 w-3.5"})})]}),a&&f.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 XA({isRunning:e,onRerun:n}){const{data:r,isLoading:a}=HA(),[l,o]=S.useState(""),[u,d]=S.useState("all"),[h,m]=S.useState("date"),[b,x]=S.useState("desc"),y=w=>{w===h?x(N=>N==="desc"?"asc":"desc"):(m(w),x(w==="date"?"desc":"asc"))},v=S.useMemo(()=>{if(!r)return[];let w=r;if(u!=="all"&&(w=w.filter(N=>go(N)===u)),l.trim()){const N=l.trim();w=w.filter(M=>{const R=M.command+(M.args?" "+M.args:"");return qA(R,N)})}return[...w].sort((N,M)=>GA(N,M,h,b))},[r,u,l,h,b]),_=S.useMemo(()=>{if(!r)return{};const w={all:r.length,success:0,fail:0,cancelled:0,running:0};for(const N of r)w[go(N)]++;return w},[r]);if(a)return f.jsxs("div",{className:"rounded-lg border border-zinc-200 dark:border-zinc-800",children:[f.jsxs("div",{className:"flex items-center gap-2 border-b border-zinc-200 px-4 py-3 dark:border-zinc-800",children:[f.jsx(Hx,{className:"h-4 w-4 text-zinc-500 dark:text-zinc-400"}),f.jsx("span",{className:"text-sm font-medium",children:"Command History"})]}),f.jsx("div",{className:"p-4 text-center text-sm text-zinc-500 dark:text-zinc-400",children:"Loading..."})]});const E=r&&r.length>0;return f.jsxs("div",{className:"overflow-hidden rounded-lg border border-zinc-200 dark:border-zinc-800",children:[f.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:[f.jsx(Hx,{className:"h-4 w-4 text-zinc-500 dark:text-zinc-400"}),f.jsx("span",{className:"text-sm font-medium",children:"Command History"}),E&&f.jsx("span",{className:"text-xs text-zinc-400 dark:text-zinc-500",children:v.length===r.length?`${r.length}`:`${v.length} / ${r.length}`})]}),E&&f.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:[f.jsxs("div",{className:"relative",children:[f.jsx(ju,{className:"pointer-events-none absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-zinc-400"}),f.jsx("input",{type:"text",value:l,onChange:w=>o(w.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&&f.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:f.jsx(gr,{className:"h-3.5 w-3.5"})})]}),f.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[f.jsx("div",{className:"flex flex-wrap items-center gap-1",children:KA.map(w=>{const N=_[w.value]??0;return w.value!=="all"&&N===0?null:f.jsxs("button",{type:"button",onClick:()=>d(w.value),className:ge("inline-flex items-center gap-1 rounded-full px-2.5 py-1 text-xs font-medium transition-colors",u===w.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:[w.label,f.jsx("span",{className:ge("tabular-nums",u===w.value?"text-zinc-300 dark:text-zinc-400":"text-zinc-400 dark:text-zinc-500"),children:N})]},w.value)})}),f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("span",{className:"text-[10px] uppercase tracking-wider text-zinc-400 dark:text-zinc-500",children:"Sort"}),f.jsx(Vc,{label:"Date",field:"date",activeField:h,dir:b,onToggle:y}),f.jsx(Vc,{label:"Command",field:"command",activeField:h,dir:b,onToggle:y}),f.jsx(Vc,{label:"Duration",field:"duration",activeField:h,dir:b,onToggle:y}),f.jsx(Vc,{label:"Status",field:"status",activeField:h,dir:b,onToggle:y})]})]})]}),E?v.length===0?f.jsx("div",{className:"p-6 text-center text-sm text-zinc-500 dark:text-zinc-400",children:"No commands match your filters."}):v.map(w=>f.jsx(QA,{entry:w,isRunning:e,onRerun:n},w.id)):f.jsx("div",{className:"p-6 text-center text-sm text-zinc-500 dark:text-zinc-400",children:"No commands have been run yet."})]})}function ZA({tabs:e,activeTabId:n,onSelectTab:r,onDismissTab:a}){return e.length===0?null:f.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===n,u=l.command.replace(/^ocr\s+/,"").split(/\s+/)[0]??"command";return f.jsxs("button",{type:"button",onClick:()=>r(l.executionId),className:ge("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"?f.jsxs("span",{className:"relative flex h-2 w-2",children:[f.jsx("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-indigo-400 opacity-75"}),f.jsx("span",{className:"relative inline-flex h-2 w-2 rounded-full bg-indigo-500"})]}):l.status==="complete"?f.jsx(T1,{className:"h-3 w-3 text-emerald-500"}):l.status==="cancelled"?f.jsx(q2,{className:"h-3 w-3 text-amber-500"}):f.jsx(R1,{className:"h-3 w-3 text-red-500"}),f.jsx("span",{className:"capitalize",children:u}),f.jsxs("span",{className:"text-[10px] text-zinc-400 dark:text-zinc-500",children:["#",l.executionId]}),l.status!=="running"&&f.jsx("span",{role:"button",tabIndex:0,onClick:d=>{d.stopPropagation(),a(l.executionId)},onKeyDown:d=>{(d.key==="Enter"||d.key===" ")&&(d.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:f.jsx(gr,{className:"h-3 w-3"})})]},l.executionId)})})}const WA={claude:"Claude Code",opencode:"OpenCode"};function JA(){const{socket:e}=Ci(),n=Fn(),{isAvailable:r,activeCli:a,isDisabledByConfig:l}=Bm(),{tabs:o,activeTabId:u,runningCount:d,setActiveTabId:h,dismissTab:m,cancelCommand:b}=Dm(),x=o.find(R=>R.executionId===u)??null,[y,v]=S.useState(null),_=S.useRef(null);dt("command:finished",()=>{n.invalidateQueries({queryKey:["command-history"]})});const E=S.useCallback(R=>{e&&e.emit("command:run",{command:R})},[e]),w=S.useCallback(()=>{x&&x.status==="running"&&b(x.executionId)},[x,b]),N=S.useCallback(R=>{const U=LA(R);U&&(v(U),_.current?.scrollIntoView({behavior:"smooth",block:"start"}))},[]),M=S.useCallback(()=>{v(null)},[]);return f.jsxs("div",{className:"space-y-6",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"text-2xl font-semibold",children:"Command Center"}),f.jsxs("p",{className:"mt-1 text-sm text-zinc-500 dark:text-zinc-400",children:["Launch AI-powered code review workflows.",a&&f.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 ",WA[a]??a]})]})]}),r?f.jsx("div",{ref:_,children:f.jsx(UA,{isRunning:!1,runningCount:d,onRunCommand:E,prefill:y,onPrefillConsumed:M})}):f.jsx("div",{className:"rounded-lg border border-zinc-200 bg-zinc-50 p-6 dark:border-zinc-800 dark:bg-zinc-900/50",children:f.jsxs("div",{className:"flex items-start gap-3",children:[f.jsx(Iu,{className:"mt-0.5 h-5 w-5 shrink-0 text-zinc-400"}),f.jsxs("div",{children:[f.jsx("h3",{className:"text-sm font-medium text-zinc-900 dark:text-zinc-100",children:l?"AI Commands Disabled":"AI CLI Required"}),f.jsx("p",{className:"mt-1 text-sm text-zinc-500 dark:text-zinc-400",children:l?f.jsxs(f.Fragment,{children:["AI commands are turned off in your project config. Set ",f.jsx("code",{className:"rounded bg-zinc-200 px-1 py-0.5 text-xs dark:bg-zinc-800",children:"ai_cli"})," to"," ",f.jsx("code",{className:"rounded bg-zinc-200 px-1 py-0.5 text-xs dark:bg-zinc-800",children:"auto"}),","," ",f.jsx("code",{className:"rounded bg-zinc-200 px-1 py-0.5 text-xs dark:bg-zinc-800",children:"claude"}),", or"," ",f.jsx("code",{className:"rounded bg-zinc-200 px-1 py-0.5 text-xs dark:bg-zinc-800",children:"opencode"})," ","in ",f.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."]}):f.jsxs(f.Fragment,{children:["Install"," ",f.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"," ",f.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."]})}),f.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&&f.jsxs("div",{className:"overflow-hidden rounded-lg border border-zinc-200 dark:border-zinc-800",children:[f.jsx(ZA,{tabs:o,activeTabId:u,onSelectTab:h,onDismissTab:m}),x&&f.jsx(FA,{bare:!0,output:x.output,isRunning:x.status==="running",exitCode:x.exitCode,commandName:x.command,onCancel:w})]}),f.jsx(XA,{isRunning:!1,onRerun:N})]})}const Vx={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 eO({reviewer:e,onViewPrompt:n}){const r=Vx[e.tier]??Vx.custom;return f.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:[f.jsxs("div",{className:"mb-2 flex items-start gap-3",children:[f.jsx(Bu,{icon:e.icon,className:"mt-0.5 h-5 w-5 shrink-0 text-zinc-500 dark:text-zinc-400"}),f.jsxs("div",{className:"min-w-0 flex-1",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("h3",{className:"truncate text-sm font-semibold text-zinc-900 dark:text-zinc-100",children:e.name}),e.is_default&&f.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",children:"Default"})]}),f.jsx("span",{className:ge("mt-0.5 inline-block rounded-full px-1.5 py-0.5 text-[10px] font-medium",r.className),children:r.label})]})]}),f.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&&f.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&&f.jsxs("div",{className:"mb-3 flex flex-wrap gap-1",children:[e.focus_areas.slice(0,4).map(a=>f.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:a},a)),e.focus_areas.length>4&&f.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]})]}),f.jsx("div",{className:"mt-auto pt-1",children:f.jsxs("button",{type:"button",onClick:()=>n(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:[f.jsx(Du,{className:"h-3 w-3"}),"View Prompt"]})})]})}function tO(e,n){const r={};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const nO=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,rO=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,iO={};function Yx(e,n){return(iO.jsx?rO:nO).test(e)}const aO=/[ \t\n\f\r]/g;function sO(e){return typeof e=="object"?e.type==="text"?Qx(e.value):!1:Qx(e)}function Qx(e){return e.replace(aO,"")===""}class wo{constructor(n,r,a){this.normal=r,this.property=n,a&&(this.space=a)}}wo.prototype.normal={};wo.prototype.property={};wo.prototype.space=void 0;function U1(e,n){const r={},a={};for(const l of e)Object.assign(r,l.property),Object.assign(a,l.normal);return new wo(r,a,n)}function Zh(e){return e.toLowerCase()}class nr{constructor(n,r){this.attribute=r,this.property=n}}nr.prototype.attribute="";nr.prototype.booleanish=!1;nr.prototype.boolean=!1;nr.prototype.commaOrSpaceSeparated=!1;nr.prototype.commaSeparated=!1;nr.prototype.defined=!1;nr.prototype.mustUseProperty=!1;nr.prototype.number=!1;nr.prototype.overloadedBoolean=!1;nr.prototype.property="";nr.prototype.spaceSeparated=!1;nr.prototype.space=void 0;let lO=0;const nt=Ya(),bn=Ya(),Wh=Ya(),pe=Ya(),Gt=Ya(),Us=Ya(),hr=Ya();function Ya(){return 2**++lO}const Jh=Object.freeze(Object.defineProperty({__proto__:null,boolean:nt,booleanish:bn,commaOrSpaceSeparated:hr,commaSeparated:Us,number:pe,overloadedBoolean:Wh,spaceSeparated:Gt},Symbol.toStringTag,{value:"Module"})),hh=Object.keys(Jh);class Um extends nr{constructor(n,r,a,l){let o=-1;if(super(n,r),Xx(this,"space",l),typeof a=="number")for(;++o<hh.length;){const u=hh[o];Xx(this,hh[o],(a&Jh[u])===Jh[u])}}}Um.prototype.defined=!0;function Xx(e,n,r){r&&(e[n]=r)}function Ys(e){const n={},r={};for(const[a,l]of Object.entries(e.properties)){const o=new Um(a,e.transform(e.attributes||{},a),l,e.space);e.mustUseProperty&&e.mustUseProperty.includes(a)&&(o.mustUseProperty=!0),n[a]=o,r[Zh(a)]=a,r[Zh(o.attribute)]=a}return new wo(n,r,e.space)}const F1=Ys({properties:{ariaActiveDescendant:null,ariaAtomic:bn,ariaAutoComplete:null,ariaBusy:bn,ariaChecked:bn,ariaColCount:pe,ariaColIndex:pe,ariaColSpan:pe,ariaControls:Gt,ariaCurrent:null,ariaDescribedBy:Gt,ariaDetails:null,ariaDisabled:bn,ariaDropEffect:Gt,ariaErrorMessage:null,ariaExpanded:bn,ariaFlowTo:Gt,ariaGrabbed:bn,ariaHasPopup:null,ariaHidden:bn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Gt,ariaLevel:pe,ariaLive:null,ariaModal:bn,ariaMultiLine:bn,ariaMultiSelectable:bn,ariaOrientation:null,ariaOwns:Gt,ariaPlaceholder:null,ariaPosInSet:pe,ariaPressed:bn,ariaReadOnly:bn,ariaRelevant:null,ariaRequired:bn,ariaRoleDescription:Gt,ariaRowCount:pe,ariaRowIndex:pe,ariaRowSpan:pe,ariaSelected:bn,ariaSetSize:pe,ariaSort:null,ariaValueMax:pe,ariaValueMin:pe,ariaValueNow:pe,ariaValueText:null,role:null},transform(e,n){return n==="role"?n:"aria-"+n.slice(4).toLowerCase()}});function P1(e,n){return n in e?e[n]:n}function H1(e,n){return P1(e,n.toLowerCase())}const oO=Ys({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Us,acceptCharset:Gt,accessKey:Gt,action:null,allow:null,allowFullScreen:nt,allowPaymentRequest:nt,allowUserMedia:nt,alt:null,as:null,async:nt,autoCapitalize:null,autoComplete:Gt,autoFocus:nt,autoPlay:nt,blocking:Gt,capture:null,charSet:null,checked:nt,cite:null,className:Gt,cols:pe,colSpan:null,content:null,contentEditable:bn,controls:nt,controlsList:Gt,coords:pe|Us,crossOrigin:null,data:null,dateTime:null,decoding:null,default:nt,defer:nt,dir:null,dirName:null,disabled:nt,download:Wh,draggable:bn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:nt,formTarget:null,headers:Gt,height:pe,hidden:Wh,high:pe,href:null,hrefLang:null,htmlFor:Gt,httpEquiv:Gt,id:null,imageSizes:null,imageSrcSet:null,inert:nt,inputMode:null,integrity:null,is:null,isMap:nt,itemId:null,itemProp:Gt,itemRef:Gt,itemScope:nt,itemType:Gt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:nt,low:pe,manifest:null,max:null,maxLength:pe,media:null,method:null,min:null,minLength:pe,multiple:nt,muted:nt,name:null,nonce:null,noModule:nt,noValidate:nt,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:nt,optimum:pe,pattern:null,ping:Gt,placeholder:null,playsInline:nt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:nt,referrerPolicy:null,rel:Gt,required:nt,reversed:nt,rows:pe,rowSpan:pe,sandbox:Gt,scope:null,scoped:nt,seamless:nt,selected:nt,shadowRootClonable:nt,shadowRootDelegatesFocus:nt,shadowRootMode:null,shape:null,size:pe,sizes:null,slot:null,span:pe,spellCheck:bn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:pe,step:null,style:null,tabIndex:pe,target:null,title:null,translate:null,type:null,typeMustMatch:nt,useMap:null,value:bn,width:pe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Gt,axis:null,background:null,bgColor:null,border:pe,borderColor:null,bottomMargin:pe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:nt,declare:nt,event:null,face:null,frame:null,frameBorder:null,hSpace:pe,leftMargin:pe,link:null,longDesc:null,lowSrc:null,marginHeight:pe,marginWidth:pe,noResize:nt,noHref:nt,noShade:nt,noWrap:nt,object:null,profile:null,prompt:null,rev:null,rightMargin:pe,rules:null,scheme:null,scrolling:bn,standby:null,summary:null,text:null,topMargin:pe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:pe,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:nt,disableRemotePlayback:nt,prefix:null,property:null,results:pe,security:null,unselectable:null},space:"html",transform:H1}),cO=Ys({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:hr,accentHeight:pe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:pe,amplitude:pe,arabicForm:null,ascent:pe,attributeName:null,attributeType:null,azimuth:pe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:pe,by:null,calcMode:null,capHeight:pe,className:Gt,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:pe,diffuseConstant:pe,direction:null,display:null,dur:null,divisor:pe,dominantBaseline:null,download:nt,dx:null,dy:null,edgeMode:null,editable:null,elevation:pe,enableBackground:null,end:null,event:null,exponent:pe,externalResourcesRequired:null,fill:null,fillOpacity:pe,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:Us,g2:Us,glyphName:Us,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:pe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:pe,horizOriginX:pe,horizOriginY:pe,id:null,ideographic:pe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:pe,k:pe,k1:pe,k2:pe,k3:pe,k4:pe,kernelMatrix:hr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:pe,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:pe,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:pe,overlineThickness:pe,paintOrder:null,panose1:null,path:null,pathLength:pe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Gt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:pe,pointsAtY:pe,pointsAtZ:pe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:hr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:hr,rev:hr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:hr,requiredFeatures:hr,requiredFonts:hr,requiredFormats:hr,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:pe,specularExponent:pe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:pe,strikethroughThickness:pe,string:null,stroke:null,strokeDashArray:hr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:pe,strokeOpacity:pe,strokeWidth:null,style:null,surfaceScale:pe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:hr,tabIndex:pe,tableValues:null,target:null,targetX:pe,targetY:pe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:hr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:pe,underlineThickness:pe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:pe,values:null,vAlphabetic:pe,vMathematical:pe,vectorEffect:null,vHanging:pe,vIdeographic:pe,version:null,vertAdvY:pe,vertOriginX:pe,vertOriginY:pe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:pe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:P1}),q1=Ys({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,n){return"xlink:"+n.slice(5).toLowerCase()}}),$1=Ys({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:H1}),G1=Ys({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,n){return"xml:"+n.slice(3).toLowerCase()}}),uO={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"},dO=/[A-Z]/g,Zx=/-[a-z]/g,fO=/^data[-\w.:]+$/i;function hO(e,n){const r=Zh(n);let a=n,l=nr;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&fO.test(n)){if(n.charAt(4)==="-"){const o=n.slice(5).replace(Zx,pO);a="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=n.slice(4);if(!Zx.test(o)){let u=o.replace(dO,mO);u.charAt(0)!=="-"&&(u="-"+u),n="data"+u}}l=Um}return new l(a,n)}function mO(e){return"-"+e.toLowerCase()}function pO(e){return e.charAt(1).toUpperCase()}const gO=U1([F1,oO,q1,$1,G1],"html"),Fm=U1([F1,cO,q1,$1,G1],"svg");function bO(e){return e.join(" ").trim()}var Rs={},mh,Wx;function xO(){if(Wx)return mh;Wx=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,r=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,l=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,d=/^\s+|\s+$/g,h=`
503
- `,m="/",b="*",x="",y="comment",v="declaration";function _(w,N){if(typeof w!="string")throw new TypeError("First argument must be a string");if(!w)return[];N=N||{};var M=1,R=1;function U(oe){var q=oe.match(n);q&&(M+=q.length);var L=oe.lastIndexOf(h);R=~L?oe.length-L:R+oe.length}function $(){var oe={line:M,column:R};return function(q){return q.position=new j(oe),ae(),q}}function j(oe){this.start=oe,this.end={line:M,column:R},this.source=N.source}j.prototype.content=w;function J(oe){var q=new Error(N.source+":"+M+":"+R+": "+oe);if(q.reason=oe,q.filename=N.source,q.line=M,q.column=R,q.source=w,!N.silent)throw q}function A(oe){var q=oe.exec(w);if(q){var L=q[0];return U(L),w=w.slice(L.length),q}}function ae(){A(r)}function H(oe){var q;for(oe=oe||[];q=te();)q!==!1&&oe.push(q);return oe}function te(){var oe=$();if(!(m!=w.charAt(0)||b!=w.charAt(1))){for(var q=2;x!=w.charAt(q)&&(b!=w.charAt(q)||m!=w.charAt(q+1));)++q;if(q+=2,x===w.charAt(q-1))return J("End of comment missing");var L=w.slice(2,q-2);return R+=2,U(L),w=w.slice(q),R+=2,oe({type:y,comment:L})}}function ee(){var oe=$(),q=A(a);if(q){if(te(),!A(l))return J("property missing ':'");var L=A(o),Y=oe({type:v,property:E(q[0].replace(e,x)),value:L?E(L[0].replace(e,x)):x});return A(u),Y}}function ve(){var oe=[];H(oe);for(var q;q=ee();)q!==!1&&(oe.push(q),H(oe));return oe}return ae(),ve()}function E(w){return w?w.replace(d,x):x}return mh=_,mh}var Jx;function yO(){if(Jx)return Rs;Jx=1;var e=Rs&&Rs.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(Rs,"__esModule",{value:!0}),Rs.default=r;const n=e(xO());function r(a,l){let o=null;if(!a||typeof a!="string")return o;const u=(0,n.default)(a),d=typeof l=="function";return u.forEach(h=>{if(h.type!=="declaration")return;const{property:m,value:b}=h;d?l(m,b,h):b&&(o=o||{},o[m]=b)}),o}return Rs}var Vl={},ey;function vO(){if(ey)return Vl;ey=1,Object.defineProperty(Vl,"__esModule",{value:!0}),Vl.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,l=/^-(ms)-/,o=function(m){return!m||r.test(m)||e.test(m)},u=function(m,b){return b.toUpperCase()},d=function(m,b){return"".concat(b,"-")},h=function(m,b){return b===void 0&&(b={}),o(m)?m:(m=m.toLowerCase(),b.reactCompat?m=m.replace(l,d):m=m.replace(a,d),m.replace(n,u))};return Vl.camelCase=h,Vl}var Yl,ty;function kO(){if(ty)return Yl;ty=1;var e=Yl&&Yl.__importDefault||function(l){return l&&l.__esModule?l:{default:l}},n=e(yO()),r=vO();function a(l,o){var u={};return!l||typeof l!="string"||(0,n.default)(l,function(d,h){d&&h&&(u[(0,r.camelCase)(d,o)]=h)}),u}return a.default=a,Yl=a,Yl}var _O=kO();const EO=Nu(_O),K1=V1("end"),Pm=V1("start");function V1(e){return n;function n(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 wO(e){const n=Pm(e),r=K1(e);if(n&&r)return{start:n,end:r}}function ao(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?ny(e.position):"start"in e||"end"in e?ny(e):"line"in e||"column"in e?em(e):""}function em(e){return ry(e&&e.line)+":"+ry(e&&e.column)}function ny(e){return em(e&&e.start)+"-"+em(e&&e.end)}function ry(e){return e&&typeof e=="number"?e:1}class Pn extends Error{constructor(n,r,a){super(),typeof r=="string"&&(a=r,r=void 0);let l="",o={},u=!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 n=="string"?l=n:!o.cause&&n&&(u=!0,l=n.message,o.cause=n),!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 d=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=d?d.column:void 0,this.fatal=void 0,this.file="",this.message=l,this.line=d?d.line:void 0,this.name=ao(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=u&&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}}Pn.prototype.file="";Pn.prototype.name="";Pn.prototype.reason="";Pn.prototype.message="";Pn.prototype.stack="";Pn.prototype.column=void 0;Pn.prototype.line=void 0;Pn.prototype.ancestors=void 0;Pn.prototype.cause=void 0;Pn.prototype.fatal=void 0;Pn.prototype.place=void 0;Pn.prototype.ruleId=void 0;Pn.prototype.source=void 0;const Hm={}.hasOwnProperty,SO=new Map,NO=/[A-Z]/g,zO=new Set(["table","tbody","thead","tfoot","tr"]),CO=new Set(["td","th"]),Y1="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function TO(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=n.filePath||void 0;let a;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");a=IO(r,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");a=LO(r,n.jsx,n.jsxs)}const l={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:a,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?Fm:gO,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},o=Q1(l,e,void 0);return o&&typeof o!="string"?o:l.create(e,l.Fragment,{children:o||void 0},void 0)}function Q1(e,n,r){if(n.type==="element")return RO(e,n,r);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return AO(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return MO(e,n,r);if(n.type==="mdxjsEsm")return OO(e,n);if(n.type==="root")return DO(e,n,r);if(n.type==="text")return jO(e,n)}function RO(e,n,r){const a=e.schema;let l=a;n.tagName.toLowerCase()==="svg"&&a.space==="html"&&(l=Fm,e.schema=l),e.ancestors.push(n);const o=Z1(e,n.tagName,!1),u=BO(e,n);let d=$m(e,n);return zO.has(n.tagName)&&(d=d.filter(function(h){return typeof h=="string"?!sO(h):!0})),X1(e,u,o,n),qm(u,d),e.ancestors.pop(),e.schema=a,e.create(n,o,u,r)}function AO(e,n){if(n.data&&n.data.estree&&e.evaluater){const a=n.data.estree.body[0];return a.type,e.evaluater.evaluateExpression(a.expression)}bo(e,n.position)}function OO(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);bo(e,n.position)}function MO(e,n,r){const a=e.schema;let l=a;n.name==="svg"&&a.space==="html"&&(l=Fm,e.schema=l),e.ancestors.push(n);const o=n.name===null?e.Fragment:Z1(e,n.name,!0),u=UO(e,n),d=$m(e,n);return X1(e,u,o,n),qm(u,d),e.ancestors.pop(),e.schema=a,e.create(n,o,u,r)}function DO(e,n,r){const a={};return qm(a,$m(e,n)),e.create(n,e.Fragment,a,r)}function jO(e,n){return n.value}function X1(e,n,r,a){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(n.node=a)}function qm(e,n){if(n.length>0){const r=n.length>1?n:n[0];r&&(e.children=r)}}function LO(e,n,r){return a;function a(l,o,u,d){const m=Array.isArray(u.children)?r:n;return d?m(o,u,d):m(o,u)}}function IO(e,n){return r;function r(a,l,o,u){const d=Array.isArray(o.children),h=Pm(a);return n(l,o,u,d,{columnNumber:h?h.column-1:void 0,fileName:e,lineNumber:h?h.line:void 0},void 0)}}function BO(e,n){const r={};let a,l;for(l in n.properties)if(l!=="children"&&Hm.call(n.properties,l)){const o=FO(e,l,n.properties[l]);if(o){const[u,d]=o;e.tableCellAlignToStyle&&u==="align"&&typeof d=="string"&&CO.has(n.tagName)?a=d:r[u]=d}}if(a){const o=r.style||(r.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=a}return r}function UO(e,n){const r={};for(const a of n.attributes)if(a.type==="mdxJsxExpressionAttribute")if(a.data&&a.data.estree&&e.evaluater){const o=a.data.estree.body[0];o.type;const u=o.expression;u.type;const d=u.properties[0];d.type,Object.assign(r,e.evaluater.evaluateExpression(d.argument))}else bo(e,n.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 d=a.value.data.estree.body[0];d.type,o=e.evaluater.evaluateExpression(d.expression)}else bo(e,n.position);else o=a.value===null?!0:a.value;r[l]=o}return r}function $m(e,n){const r=[];let a=-1;const l=e.passKeys?new Map:SO;for(;++a<n.children.length;){const o=n.children[a];let u;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;u=h+"-"+m,l.set(h,m+1)}}const d=Q1(e,o,u);d!==void 0&&r.push(d)}return r}function FO(e,n,r){const a=hO(e.schema,n);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=a.commaSeparated?tO(r):bO(r)),a.property==="style"){let l=typeof r=="object"?r:PO(e,String(r));return e.stylePropertyNameCase==="css"&&(l=HO(l)),["style",l]}return[e.elementAttributeNameCase==="react"&&a.space?uO[a.property]||a.property:a.attribute,r]}}function PO(e,n){try{return EO(n,{reactCompat:!0})}catch(r){if(e.ignoreInvalidStyle)return{};const a=r,l=new Pn("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=Y1+"#cannot-parse-style-attribute",l}}function Z1(e,n,r){let a;if(!r)a={type:"Literal",value:n};else if(n.includes(".")){const l=n.split(".");let o=-1,u;for(;++o<l.length;){const d=Yx(l[o])?{type:"Identifier",name:l[o]}:{type:"Literal",value:l[o]};u=u?{type:"MemberExpression",object:u,property:d,computed:!!(o&&d.type==="Literal"),optional:!1}:d}a=u}else a=Yx(n)&&!/^[a-z]/.test(n)?{type:"Identifier",name:n}:{type:"Literal",value:n};if(a.type==="Literal"){const l=a.value;return Hm.call(e.components,l)?e.components[l]:l}if(e.evaluater)return e.evaluater.evaluateExpression(a);bo(e)}function bo(e,n){const r=new Pn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:n,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=Y1+"#cannot-handle-mdx-estrees-without-createevaluater",r}function HO(e){const n={};let r;for(r in e)Hm.call(e,r)&&(n[qO(r)]=e[r]);return n}function qO(e){let n=e.replace(NO,$O);return n.slice(0,3)==="ms-"&&(n="-"+n),n}function $O(e){return"-"+e.toLowerCase()}const ph={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"]},GO={};function Gm(e,n){const r=GO,a=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,l=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return W1(e,a,l)}function W1(e,n,r){if(KO(e)){if("value"in e)return e.type==="html"&&!r?"":e.value;if(n&&"alt"in e&&e.alt)return e.alt;if("children"in e)return iy(e.children,n,r)}return Array.isArray(e)?iy(e,n,r):""}function iy(e,n,r){const a=[];let l=-1;for(;++l<e.length;)a[l]=W1(e[l],n,r);return a.join("")}function KO(e){return!!(e&&typeof e=="object")}const ay=document.createElement("i");function Km(e){const n="&"+e+";";ay.innerHTML=n;const r=ay.textContent;return r.charCodeAt(r.length-1)===59&&e!=="semi"||r===n?!1:r}function pr(e,n,r,a){const l=e.length;let o=0,u;if(n<0?n=-n>l?0:l+n:n=n>l?l:n,r=r>0?r:0,a.length<1e4)u=Array.from(a),u.unshift(n,r),e.splice(...u);else for(r&&e.splice(n,r);o<a.length;)u=a.slice(o,o+1e4),u.unshift(n,0),e.splice(...u),o+=1e4,n+=1e4}function Ar(e,n){return e.length>0?(pr(e,e.length,0,n),e):n}const sy={}.hasOwnProperty;function J1(e){const n={};let r=-1;for(;++r<e.length;)VO(n,e[r]);return n}function VO(e,n){let r;for(r in n){const l=(sy.call(e,r)?e[r]:void 0)||(e[r]={}),o=n[r];let u;if(o)for(u in o){sy.call(l,u)||(l[u]=[]);const d=o[u];YO(l[u],Array.isArray(d)?d:d?[d]:[])}}}function YO(e,n){let r=-1;const a=[];for(;++r<n.length;)(n[r].add==="after"?e:a).push(n[r]);pr(e,0,0,a)}function ek(e,n){const r=Number.parseInt(e,n);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 Fr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Gn=pa(/[A-Za-z]/),Un=pa(/[\dA-Za-z]/),QO=pa(/[#-'*+\--9=?A-Z^-~]/);function vu(e){return e!==null&&(e<32||e===127)}const tm=pa(/\d/),XO=pa(/[\dA-Fa-f]/),ZO=pa(/[!-/:-@[-`{-~]/);function qe(e){return e!==null&&e<-2}function Ht(e){return e!==null&&(e<0||e===32)}function ft(e){return e===-2||e===-1||e===32}const Uu=pa(/\p{P}|\p{S}/u),qa=pa(/\s/);function pa(e){return n;function n(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function Qs(e){const n=[];let r=-1,a=0,l=0;for(;++r<e.length;){const o=e.charCodeAt(r);let u="";if(o===37&&Un(e.charCodeAt(r+1))&&Un(e.charCodeAt(r+2)))l=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(u=String.fromCharCode(o));else if(o>55295&&o<57344){const d=e.charCodeAt(r+1);o<56320&&d>56319&&d<57344?(u=String.fromCharCode(o,d),l=1):u="�"}else u=String.fromCharCode(o);u&&(n.push(e.slice(a,r),encodeURIComponent(u)),a=r+l+1,u=""),l&&(r+=l,l=0)}return n.join("")+e.slice(a)}function Et(e,n,r,a){const l=a?a-1:Number.POSITIVE_INFINITY;let o=0;return u;function u(h){return ft(h)?(e.enter(r),d(h)):n(h)}function d(h){return ft(h)&&o++<l?(e.consume(h),d):(e.exit(r),n(h))}}const WO={tokenize:JO};function JO(e){const n=e.attempt(this.parser.constructs.contentInitial,a,l);let r;return n;function a(d){if(d===null){e.consume(d);return}return e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),Et(e,n,"linePrefix")}function l(d){return e.enter("paragraph"),o(d)}function o(d){const h=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=h),r=h,u(d)}function u(d){if(d===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(d);return}return qe(d)?(e.consume(d),e.exit("chunkText"),o):(e.consume(d),u)}}const eM={tokenize:tM},ly={tokenize:nM};function tM(e){const n=this,r=[];let a=0,l,o,u;return d;function d(R){if(a<r.length){const U=r[a];return n.containerState=U[1],e.attempt(U[0].continuation,h,m)(R)}return m(R)}function h(R){if(a++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,l&&M();const U=n.events.length;let $=U,j;for(;$--;)if(n.events[$][0]==="exit"&&n.events[$][1].type==="chunkFlow"){j=n.events[$][1].end;break}N(a);let J=U;for(;J<n.events.length;)n.events[J][1].end={...j},J++;return pr(n.events,$+1,0,n.events.slice(U)),n.events.length=J,m(R)}return d(R)}function m(R){if(a===r.length){if(!l)return y(R);if(l.currentConstruct&&l.currentConstruct.concrete)return _(R);n.interrupt=!!(l.currentConstruct&&!l._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(ly,b,x)(R)}function b(R){return l&&M(),N(a),y(R)}function x(R){return n.parser.lazy[n.now().line]=a!==r.length,u=n.now().offset,_(R)}function y(R){return n.containerState={},e.attempt(ly,v,_)(R)}function v(R){return a++,r.push([n.currentConstruct,n.containerState]),y(R)}function _(R){if(R===null){l&&M(),N(0),e.consume(R);return}return l=l||n.parser.flow(n.now()),e.enter("chunkFlow",{_tokenizer:l,contentType:"flow",previous:o}),E(R)}function E(R){if(R===null){w(e.exit("chunkFlow"),!0),N(0),e.consume(R);return}return qe(R)?(e.consume(R),w(e.exit("chunkFlow")),a=0,n.interrupt=void 0,d):(e.consume(R),E)}function w(R,U){const $=n.sliceStream(R);if(U&&$.push(null),R.previous=o,o&&(o.next=R),o=R,l.defineSkip(R.start),l.write($),n.parser.lazy[R.start.line]){let j=l.events.length;for(;j--;)if(l.events[j][1].start.offset<u&&(!l.events[j][1].end||l.events[j][1].end.offset>u))return;const J=n.events.length;let A=J,ae,H;for(;A--;)if(n.events[A][0]==="exit"&&n.events[A][1].type==="chunkFlow"){if(ae){H=n.events[A][1].end;break}ae=!0}for(N(a),j=J;j<n.events.length;)n.events[j][1].end={...H},j++;pr(n.events,A+1,0,n.events.slice(J)),n.events.length=j}}function N(R){let U=r.length;for(;U-- >R;){const $=r[U];n.containerState=$[1],$[0].exit.call(n,e)}r.length=R}function M(){l.write([null]),o=void 0,l=void 0,n.containerState._closeFlow=void 0}}function nM(e,n,r){return Et(e,e.attempt(this.parser.constructs.document,n,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ps(e){if(e===null||Ht(e)||qa(e))return 1;if(Uu(e))return 2}function Fu(e,n,r){const a=[];let l=-1;for(;++l<e.length;){const o=e[l].resolveAll;o&&!a.includes(o)&&(n=o(n,r),a.push(o))}return n}const nm={name:"attention",resolveAll:rM,tokenize:iM};function rM(e,n){let r=-1,a,l,o,u,d,h,m,b;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&&n.sliceSerialize(e[a][1]).charCodeAt(0)===n.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};oy(x,-h),oy(y,h),u={type:h>1?"strongSequence":"emphasisSequence",start:x,end:{...e[a][1].end}},d={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:{...u.start},end:{...d.end}},e[a][1].end={...u.start},e[r][1].start={...d.end},m=[],e[a][1].end.offset-e[a][1].start.offset&&(m=Ar(m,[["enter",e[a][1],n],["exit",e[a][1],n]])),m=Ar(m,[["enter",l,n],["enter",u,n],["exit",u,n],["enter",o,n]]),m=Ar(m,Fu(n.parser.constructs.insideSpan.null,e.slice(a+1,r),n)),m=Ar(m,[["exit",o,n],["enter",d,n],["exit",d,n],["exit",l,n]]),e[r][1].end.offset-e[r][1].start.offset?(b=2,m=Ar(m,[["enter",e[r][1],n],["exit",e[r][1],n]])):b=0,pr(e,a-1,r-a+3,m),r=a+m.length-b-2;break}}for(r=-1;++r<e.length;)e[r][1].type==="attentionSequence"&&(e[r][1].type="data");return e}function iM(e,n){const r=this.parser.constructs.attentionMarkers.null,a=this.previous,l=Ps(a);let o;return u;function u(h){return o=h,e.enter("attentionSequence"),d(h)}function d(h){if(h===o)return e.consume(h),d;const m=e.exit("attentionSequence"),b=Ps(h),x=!b||b===2&&l||r.includes(h),y=!l||l===2&&b||r.includes(a);return m._open=!!(o===42?x:x&&(l||!y)),m._close=!!(o===42?y:y&&(b||!x)),n(h)}}function oy(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}const aM={name:"autolink",tokenize:sM};function sM(e,n,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 Gn(v)?(e.consume(v),u):v===64?r(v):m(v)}function u(v){return v===43||v===45||v===46||Un(v)?(a=1,d(v)):m(v)}function d(v){return v===58?(e.consume(v),a=0,h):(v===43||v===45||v===46||Un(v))&&a++<32?(e.consume(v),d):(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"),n):v===null||v===32||v===60||vu(v)?r(v):(e.consume(v),h)}function m(v){return v===64?(e.consume(v),b):QO(v)?(e.consume(v),m):r(v)}function b(v){return Un(v)?x(v):r(v)}function x(v){return v===46?(e.consume(v),a=0,b):v===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),n):y(v)}function y(v){if((v===45||Un(v))&&a++<63){const _=v===45?y:x;return e.consume(v),_}return r(v)}}const So={partial:!0,tokenize:lM};function lM(e,n,r){return a;function a(o){return ft(o)?Et(e,l,"linePrefix")(o):l(o)}function l(o){return o===null||qe(o)?n(o):r(o)}}const tk={continuation:{tokenize:cM},exit:uM,name:"blockQuote",tokenize:oM};function oM(e,n,r){const a=this;return l;function l(u){if(u===62){const d=a.containerState;return d.open||(e.enter("blockQuote",{_container:!0}),d.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(u),e.exit("blockQuoteMarker"),o}return r(u)}function o(u){return ft(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(u))}}function cM(e,n,r){const a=this;return l;function l(u){return ft(u)?Et(e,o,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):o(u)}function o(u){return e.attempt(tk,n,r)(u)}}function uM(e){e.exit("blockQuote")}const nk={name:"characterEscape",tokenize:dM};function dM(e,n,r){return a;function a(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),l}function l(o){return ZO(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),n):r(o)}}const rk={name:"characterReference",tokenize:fM};function fM(e,n,r){const a=this;let l=0,o,u;return d;function d(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,u=Un,b(x))}function m(x){return x===88||x===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(x),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,u=XO,b):(e.enter("characterReferenceValue"),o=7,u=tm,b(x))}function b(x){if(x===59&&l){const y=e.exit("characterReferenceValue");return u===Un&&!Km(a.sliceSerialize(y))?r(x):(e.enter("characterReferenceMarker"),e.consume(x),e.exit("characterReferenceMarker"),e.exit("characterReference"),n)}return u(x)&&l++<o?(e.consume(x),b):r(x)}}const cy={partial:!0,tokenize:mM},uy={concrete:!0,name:"codeFenced",tokenize:hM};function hM(e,n,r){const a=this,l={partial:!0,tokenize:$};let o=0,u=0,d;return h;function h(j){return m(j)}function m(j){const J=a.events[a.events.length-1];return o=J&&J[1].type==="linePrefix"?J[2].sliceSerialize(J[1],!0).length:0,d=j,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),b(j)}function b(j){return j===d?(u++,e.consume(j),b):u<3?r(j):(e.exit("codeFencedFenceSequence"),ft(j)?Et(e,x,"whitespace")(j):x(j))}function x(j){return j===null||qe(j)?(e.exit("codeFencedFence"),a.interrupt?n(j):e.check(cy,E,U)(j)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),y(j))}function y(j){return j===null||qe(j)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),x(j)):ft(j)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Et(e,v,"whitespace")(j)):j===96&&j===d?r(j):(e.consume(j),y)}function v(j){return j===null||qe(j)?x(j):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),_(j))}function _(j){return j===null||qe(j)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),x(j)):j===96&&j===d?r(j):(e.consume(j),_)}function E(j){return e.attempt(l,U,w)(j)}function w(j){return e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),N}function N(j){return o>0&&ft(j)?Et(e,M,"linePrefix",o+1)(j):M(j)}function M(j){return j===null||qe(j)?e.check(cy,E,U)(j):(e.enter("codeFlowValue"),R(j))}function R(j){return j===null||qe(j)?(e.exit("codeFlowValue"),M(j)):(e.consume(j),R)}function U(j){return e.exit("codeFenced"),n(j)}function $(j,J,A){let ae=0;return H;function H(q){return j.enter("lineEnding"),j.consume(q),j.exit("lineEnding"),te}function te(q){return j.enter("codeFencedFence"),ft(q)?Et(j,ee,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(q):ee(q)}function ee(q){return q===d?(j.enter("codeFencedFenceSequence"),ve(q)):A(q)}function ve(q){return q===d?(ae++,j.consume(q),ve):ae>=u?(j.exit("codeFencedFenceSequence"),ft(q)?Et(j,oe,"whitespace")(q):oe(q)):A(q)}function oe(q){return q===null||qe(q)?(j.exit("codeFencedFence"),J(q)):A(q)}}}function mM(e,n,r){const a=this;return l;function l(u){return u===null?r(u):(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),o)}function o(u){return a.parser.lazy[a.now().line]?r(u):n(u)}}const gh={name:"codeIndented",tokenize:gM},pM={partial:!0,tokenize:bM};function gM(e,n,r){const a=this;return l;function l(m){return e.enter("codeIndented"),Et(e,o,"linePrefix",5)(m)}function o(m){const b=a.events[a.events.length-1];return b&&b[1].type==="linePrefix"&&b[2].sliceSerialize(b[1],!0).length>=4?u(m):r(m)}function u(m){return m===null?h(m):qe(m)?e.attempt(pM,u,h)(m):(e.enter("codeFlowValue"),d(m))}function d(m){return m===null||qe(m)?(e.exit("codeFlowValue"),u(m)):(e.consume(m),d)}function h(m){return e.exit("codeIndented"),n(m)}}function bM(e,n,r){const a=this;return l;function l(u){return a.parser.lazy[a.now().line]?r(u):qe(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),l):Et(e,o,"linePrefix",5)(u)}function o(u){const d=a.events[a.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?n(u):qe(u)?l(u):r(u)}}const xM={name:"codeText",previous:vM,resolve:yM,tokenize:kM};function yM(e){let n=e.length-4,r=3,a,l;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(a=r;++a<n;)if(e[a][1].type==="codeTextData"){e[r][1].type="codeTextPadding",e[n][1].type="codeTextPadding",r+=2,n-=2;break}}for(a=r-1,n++;++a<=n;)l===void 0?a!==n&&e[a][1].type!=="lineEnding"&&(l=a):(a===n||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),n-=a-l-2,a=l+2),l=void 0);return e}function vM(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function kM(e,n,r){let a=0,l,o;return u;function u(x){return e.enter("codeText"),e.enter("codeTextSequence"),d(x)}function d(x){return x===96?(e.consume(x),a++,d):(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,b(x)):qe(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||qe(x)?(e.exit("codeTextData"),h(x)):(e.consume(x),m)}function b(x){return x===96?(e.consume(x),l++,b):l===a?(e.exit("codeTextSequence"),e.exit("codeText"),n(x)):(o.type="codeTextData",m(x))}}class _M{constructor(n){this.left=n?[...n]:[],this.right=[]}get(n){if(n<0||n>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return n<this.left.length?this.left[n]:this.right[this.right.length-n+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(n,r){const a=r??Number.POSITIVE_INFINITY;return a<this.left.length?this.left.slice(n,a):n>this.left.length?this.right.slice(this.right.length-a+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-a+this.left.length).reverse())}splice(n,r,a){const l=r||0;this.setCursor(Math.trunc(n));const o=this.right.splice(this.right.length-l,Number.POSITIVE_INFINITY);return a&&Ql(this.left,a),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),Ql(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),Ql(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n<this.left.length){const r=this.left.splice(n,Number.POSITIVE_INFINITY);Ql(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-n,Number.POSITIVE_INFINITY);Ql(this.left,r.reverse())}}}function Ql(e,n){let r=0;if(n.length<1e4)e.push(...n);else for(;r<n.length;)e.push(...n.slice(r,r+1e4)),r+=1e4}function ik(e){const n={};let r=-1,a,l,o,u,d,h,m;const b=new _M(e);for(;++r<b.length;){for(;r in n;)r=n[r];if(a=b.get(r),r&&a[1].type==="chunkFlow"&&b.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(n,EM(b,r)),r=n[r],m=!0);else if(a[1]._container){for(o=r,l=void 0;o--;)if(u=b.get(o),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(l&&(b.get(l)[1].type="lineEndingBlank"),u[1].type="lineEnding",l=o);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;l&&(a[1].end={...b.get(l)[1].start},d=b.slice(l,r),d.unshift(a),b.splice(l,r-l+1,d))}}return pr(e,0,Number.POSITIVE_INFINITY,b.slice(0)),!m}function EM(e,n){const r=e.get(n)[1],a=e.get(n)[2];let l=n-1;const o=[];let u=r._tokenizer;u||(u=a.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const d=u.events,h=[],m={};let b,x,y=-1,v=r,_=0,E=0;const w=[E];for(;v;){for(;e.get(++l)[1]!==v;);o.push(l),v._tokenizer||(b=a.sliceStream(v),v.next||b.push(null),x&&u.defineSkip(v.start),v._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(b),v._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),x=v,v=v.next}for(v=r;++y<d.length;)d[y][0]==="exit"&&d[y-1][0]==="enter"&&d[y][1].type===d[y-1][1].type&&d[y][1].start.line!==d[y][1].end.line&&(E=y+1,w.push(E),v._tokenizer=void 0,v.previous=void 0,v=v.next);for(u.events=[],v?(v._tokenizer=void 0,v.previous=void 0):w.pop(),y=w.length;y--;){const N=d.slice(w[y],w[y+1]),M=o.pop();h.push([M,M+N.length-1]),e.splice(M,2,N)}for(h.reverse(),y=-1;++y<h.length;)m[_+h[y][0]]=_+h[y][1],_+=h[y][1]-h[y][0]-1;return m}const wM={resolve:NM,tokenize:zM},SM={partial:!0,tokenize:CM};function NM(e){return ik(e),e}function zM(e,n){let r;return a;function a(d){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),l(d)}function l(d){return d===null?o(d):qe(d)?e.check(SM,u,o)(d):(e.consume(d),l)}function o(d){return e.exit("chunkContent"),e.exit("content"),n(d)}function u(d){return e.consume(d),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,l}}function CM(e,n,r){const a=this;return l;function l(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),Et(e,o,"linePrefix")}function o(u){if(u===null||qe(u))return r(u);const d=a.events[a.events.length-1];return!a.parser.constructs.disable.null.includes("codeIndented")&&d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?n(u):e.interrupt(a.parser.constructs.flow,r,n)(u)}}function ak(e,n,r,a,l,o,u,d,h){const m=h||Number.POSITIVE_INFINITY;let b=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||vu(N)?r(N):(e.enter(a),e.enter(u),e.enter(d),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),n):(e.enter(d),e.enter("chunkString",{contentType:"string"}),v(N))}function v(N){return N===62?(e.exit("chunkString"),e.exit(d),y(N)):N===null||N===60||qe(N)?r(N):(e.consume(N),N===92?_:v)}function _(N){return N===60||N===62||N===92?(e.consume(N),v):v(N)}function E(N){return!b&&(N===null||N===41||Ht(N))?(e.exit("chunkString"),e.exit(d),e.exit(u),e.exit(a),n(N)):b<m&&N===40?(e.consume(N),b++,E):N===41?(e.consume(N),b--,E):N===null||N===32||N===40||vu(N)?r(N):(e.consume(N),N===92?w:E)}function w(N){return N===40||N===41||N===92?(e.consume(N),E):E(N)}}function sk(e,n,r,a,l,o){const u=this;let d=0,h;return m;function m(v){return e.enter(a),e.enter(l),e.consume(v),e.exit(l),e.enter(o),b}function b(v){return d>999||v===null||v===91||v===93&&!h||v===94&&!d&&"_hiddenFootnoteSupport"in u.parser.constructs?r(v):v===93?(e.exit(o),e.enter(l),e.consume(v),e.exit(l),e.exit(a),n):qe(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),b):(e.enter("chunkString",{contentType:"string"}),x(v))}function x(v){return v===null||v===91||v===93||qe(v)||d++>999?(e.exit("chunkString"),b(v)):(e.consume(v),h||(h=!ft(v)),v===92?y:x)}function y(v){return v===91||v===92||v===93?(e.consume(v),d++,x):x(v)}}function lk(e,n,r,a,l,o){let u;return d;function d(y){return y===34||y===39||y===40?(e.enter(a),e.enter(l),e.consume(y),e.exit(l),u=y===40?41:y,h):r(y)}function h(y){return y===u?(e.enter(l),e.consume(y),e.exit(l),e.exit(a),n):(e.enter(o),m(y))}function m(y){return y===u?(e.exit(o),h(u)):y===null?r(y):qe(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),Et(e,m,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),b(y))}function b(y){return y===u||y===null||qe(y)?(e.exit("chunkString"),m(y)):(e.consume(y),y===92?x:b)}function x(y){return y===u||y===92?(e.consume(y),b):b(y)}}function so(e,n){let r;return a;function a(l){return qe(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),r=!0,a):ft(l)?Et(e,a,r?"linePrefix":"lineSuffix")(l):n(l)}}const TM={name:"definition",tokenize:AM},RM={partial:!0,tokenize:OM};function AM(e,n,r){const a=this;let l;return o;function o(v){return e.enter("definition"),u(v)}function u(v){return sk.call(a,e,d,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function d(v){return l=Fr(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 Ht(v)?so(e,m)(v):m(v)}function m(v){return ak(e,b,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function b(v){return e.attempt(RM,x,x)(v)}function x(v){return ft(v)?Et(e,y,"whitespace")(v):y(v)}function y(v){return v===null||qe(v)?(e.exit("definition"),a.parser.defined.push(l),n(v)):r(v)}}function OM(e,n,r){return a;function a(d){return Ht(d)?so(e,l)(d):r(d)}function l(d){return lk(e,o,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(d)}function o(d){return ft(d)?Et(e,u,"whitespace")(d):u(d)}function u(d){return d===null||qe(d)?n(d):r(d)}}const MM={name:"hardBreakEscape",tokenize:DM};function DM(e,n,r){return a;function a(o){return e.enter("hardBreakEscape"),e.consume(o),l}function l(o){return qe(o)?(e.exit("hardBreakEscape"),n(o)):r(o)}}const jM={name:"headingAtx",resolve:LM,tokenize:IM};function LM(e,n){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"},pr(e,a,r-a+1,[["enter",l,n],["enter",o,n],["exit",o,n],["exit",l,n]])),e}function IM(e,n,r){let a=0;return l;function l(b){return e.enter("atxHeading"),o(b)}function o(b){return e.enter("atxHeadingSequence"),u(b)}function u(b){return b===35&&a++<6?(e.consume(b),u):b===null||Ht(b)?(e.exit("atxHeadingSequence"),d(b)):r(b)}function d(b){return b===35?(e.enter("atxHeadingSequence"),h(b)):b===null||qe(b)?(e.exit("atxHeading"),n(b)):ft(b)?Et(e,d,"whitespace")(b):(e.enter("atxHeadingText"),m(b))}function h(b){return b===35?(e.consume(b),h):(e.exit("atxHeadingSequence"),d(b))}function m(b){return b===null||b===35||Ht(b)?(e.exit("atxHeadingText"),d(b)):(e.consume(b),m)}}const BM=["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"],dy=["pre","script","style","textarea"],UM={concrete:!0,name:"htmlFlow",resolveTo:HM,tokenize:qM},FM={partial:!0,tokenize:GM},PM={partial:!0,tokenize:$M};function HM(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function qM(e,n,r){const a=this;let l,o,u,d,h;return m;function m(T){return b(T)}function b(T){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(T),x}function x(T){return T===33?(e.consume(T),y):T===47?(e.consume(T),o=!0,E):T===63?(e.consume(T),l=3,a.interrupt?n:C):Gn(T)?(e.consume(T),u=String.fromCharCode(T),w):r(T)}function y(T){return T===45?(e.consume(T),l=2,v):T===91?(e.consume(T),l=5,d=0,_):Gn(T)?(e.consume(T),l=4,a.interrupt?n:C):r(T)}function v(T){return T===45?(e.consume(T),a.interrupt?n:C):r(T)}function _(T){const he="CDATA[";return T===he.charCodeAt(d++)?(e.consume(T),d===he.length?a.interrupt?n:ee:_):r(T)}function E(T){return Gn(T)?(e.consume(T),u=String.fromCharCode(T),w):r(T)}function w(T){if(T===null||T===47||T===62||Ht(T)){const he=T===47,_e=u.toLowerCase();return!he&&!o&&dy.includes(_e)?(l=1,a.interrupt?n(T):ee(T)):BM.includes(u.toLowerCase())?(l=6,he?(e.consume(T),N):a.interrupt?n(T):ee(T)):(l=7,a.interrupt&&!a.parser.lazy[a.now().line]?r(T):o?M(T):R(T))}return T===45||Un(T)?(e.consume(T),u+=String.fromCharCode(T),w):r(T)}function N(T){return T===62?(e.consume(T),a.interrupt?n:ee):r(T)}function M(T){return ft(T)?(e.consume(T),M):H(T)}function R(T){return T===47?(e.consume(T),H):T===58||T===95||Gn(T)?(e.consume(T),U):ft(T)?(e.consume(T),R):H(T)}function U(T){return T===45||T===46||T===58||T===95||Un(T)?(e.consume(T),U):$(T)}function $(T){return T===61?(e.consume(T),j):ft(T)?(e.consume(T),$):R(T)}function j(T){return T===null||T===60||T===61||T===62||T===96?r(T):T===34||T===39?(e.consume(T),h=T,J):ft(T)?(e.consume(T),j):A(T)}function J(T){return T===h?(e.consume(T),h=null,ae):T===null||qe(T)?r(T):(e.consume(T),J)}function A(T){return T===null||T===34||T===39||T===47||T===60||T===61||T===62||T===96||Ht(T)?$(T):(e.consume(T),A)}function ae(T){return T===47||T===62||ft(T)?R(T):r(T)}function H(T){return T===62?(e.consume(T),te):r(T)}function te(T){return T===null||qe(T)?ee(T):ft(T)?(e.consume(T),te):r(T)}function ee(T){return T===45&&l===2?(e.consume(T),L):T===60&&l===1?(e.consume(T),Y):T===62&&l===4?(e.consume(T),O):T===63&&l===3?(e.consume(T),C):T===93&&l===5?(e.consume(T),ne):qe(T)&&(l===6||l===7)?(e.exit("htmlFlowData"),e.check(FM,K,ve)(T)):T===null||qe(T)?(e.exit("htmlFlowData"),ve(T)):(e.consume(T),ee)}function ve(T){return e.check(PM,oe,K)(T)}function oe(T){return e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),q}function q(T){return T===null||qe(T)?ve(T):(e.enter("htmlFlowData"),ee(T))}function L(T){return T===45?(e.consume(T),C):ee(T)}function Y(T){return T===47?(e.consume(T),u="",V):ee(T)}function V(T){if(T===62){const he=u.toLowerCase();return dy.includes(he)?(e.consume(T),O):ee(T)}return Gn(T)&&u.length<8?(e.consume(T),u+=String.fromCharCode(T),V):ee(T)}function ne(T){return T===93?(e.consume(T),C):ee(T)}function C(T){return T===62?(e.consume(T),O):T===45&&l===2?(e.consume(T),C):ee(T)}function O(T){return T===null||qe(T)?(e.exit("htmlFlowData"),K(T)):(e.consume(T),O)}function K(T){return e.exit("htmlFlow"),n(T)}}function $M(e,n,r){const a=this;return l;function l(u){return qe(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),o):r(u)}function o(u){return a.parser.lazy[a.now().line]?r(u):n(u)}}function GM(e,n,r){return a;function a(l){return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),e.attempt(So,n,r)}}const KM={name:"htmlText",tokenize:VM};function VM(e,n,r){const a=this;let l,o,u;return d;function d(C){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(C),h}function h(C){return C===33?(e.consume(C),m):C===47?(e.consume(C),$):C===63?(e.consume(C),R):Gn(C)?(e.consume(C),A):r(C)}function m(C){return C===45?(e.consume(C),b):C===91?(e.consume(C),o=0,_):Gn(C)?(e.consume(C),M):r(C)}function b(C){return C===45?(e.consume(C),v):r(C)}function x(C){return C===null?r(C):C===45?(e.consume(C),y):qe(C)?(u=x,Y(C)):(e.consume(C),x)}function y(C){return C===45?(e.consume(C),v):x(C)}function v(C){return C===62?L(C):C===45?y(C):x(C)}function _(C){const O="CDATA[";return C===O.charCodeAt(o++)?(e.consume(C),o===O.length?E:_):r(C)}function E(C){return C===null?r(C):C===93?(e.consume(C),w):qe(C)?(u=E,Y(C)):(e.consume(C),E)}function w(C){return C===93?(e.consume(C),N):E(C)}function N(C){return C===62?L(C):C===93?(e.consume(C),N):E(C)}function M(C){return C===null||C===62?L(C):qe(C)?(u=M,Y(C)):(e.consume(C),M)}function R(C){return C===null?r(C):C===63?(e.consume(C),U):qe(C)?(u=R,Y(C)):(e.consume(C),R)}function U(C){return C===62?L(C):R(C)}function $(C){return Gn(C)?(e.consume(C),j):r(C)}function j(C){return C===45||Un(C)?(e.consume(C),j):J(C)}function J(C){return qe(C)?(u=J,Y(C)):ft(C)?(e.consume(C),J):L(C)}function A(C){return C===45||Un(C)?(e.consume(C),A):C===47||C===62||Ht(C)?ae(C):r(C)}function ae(C){return C===47?(e.consume(C),L):C===58||C===95||Gn(C)?(e.consume(C),H):qe(C)?(u=ae,Y(C)):ft(C)?(e.consume(C),ae):L(C)}function H(C){return C===45||C===46||C===58||C===95||Un(C)?(e.consume(C),H):te(C)}function te(C){return C===61?(e.consume(C),ee):qe(C)?(u=te,Y(C)):ft(C)?(e.consume(C),te):ae(C)}function ee(C){return C===null||C===60||C===61||C===62||C===96?r(C):C===34||C===39?(e.consume(C),l=C,ve):qe(C)?(u=ee,Y(C)):ft(C)?(e.consume(C),ee):(e.consume(C),oe)}function ve(C){return C===l?(e.consume(C),l=void 0,q):C===null?r(C):qe(C)?(u=ve,Y(C)):(e.consume(C),ve)}function oe(C){return C===null||C===34||C===39||C===60||C===61||C===96?r(C):C===47||C===62||Ht(C)?ae(C):(e.consume(C),oe)}function q(C){return C===47||C===62||Ht(C)?ae(C):r(C)}function L(C){return C===62?(e.consume(C),e.exit("htmlTextData"),e.exit("htmlText"),n):r(C)}function Y(C){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),V}function V(C){return ft(C)?Et(e,ne,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):ne(C)}function ne(C){return e.enter("htmlTextData"),u(C)}}const Vm={name:"labelEnd",resolveAll:ZM,resolveTo:WM,tokenize:JM},YM={tokenize:e5},QM={tokenize:t5},XM={tokenize:n5};function ZM(e){let n=-1;const r=[];for(;++n<e.length;){const a=e[n][1];if(r.push(e[n]),a.type==="labelImage"||a.type==="labelLink"||a.type==="labelEnd"){const l=a.type==="labelImage"?4:2;a.type="data",n+=l}}return e.length!==r.length&&pr(e,0,e.length,r),e}function WM(e,n){let r=e.length,a=0,l,o,u,d;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(u){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"&&(u=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[u][1].end}},b={type:"labelText",start:{...e[o+a+2][1].end},end:{...e[u-2][1].start}};return d=[["enter",h,n],["enter",m,n]],d=Ar(d,e.slice(o+1,o+a+3)),d=Ar(d,[["enter",b,n]]),d=Ar(d,Fu(n.parser.constructs.insideSpan.null,e.slice(o+a+4,u-3),n)),d=Ar(d,[["exit",b,n],e[u-2],e[u-1],["exit",m,n]]),d=Ar(d,e.slice(u+1)),d=Ar(d,[["exit",h,n]]),pr(e,o,e.length,d),e}function JM(e,n,r){const a=this;let l=a.events.length,o,u;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 d;function d(y){return o?o._inactive?x(y):(u=a.parser.defined.includes(Fr(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(YM,b,u?b:x)(y):y===91?e.attempt(QM,b,u?m:x)(y):u?b(y):x(y)}function m(y){return e.attempt(XM,b,x)(y)}function b(y){return n(y)}function x(y){return o._balanced=!0,r(y)}}function e5(e,n,r){return a;function a(x){return e.enter("resource"),e.enter("resourceMarker"),e.consume(x),e.exit("resourceMarker"),l}function l(x){return Ht(x)?so(e,o)(x):o(x)}function o(x){return x===41?b(x):ak(e,u,d,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(x)}function u(x){return Ht(x)?so(e,h)(x):b(x)}function d(x){return r(x)}function h(x){return x===34||x===39||x===40?lk(e,m,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(x):b(x)}function m(x){return Ht(x)?so(e,b)(x):b(x)}function b(x){return x===41?(e.enter("resourceMarker"),e.consume(x),e.exit("resourceMarker"),e.exit("resource"),n):r(x)}}function t5(e,n,r){const a=this;return l;function l(d){return sk.call(a,e,o,u,"reference","referenceMarker","referenceString")(d)}function o(d){return a.parser.defined.includes(Fr(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)))?n(d):r(d)}function u(d){return r(d)}}function n5(e,n,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"),n):r(o)}}const r5={name:"labelStartImage",resolveAll:Vm.resolveAll,tokenize:i5};function i5(e,n,r){const a=this;return l;function l(d){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(d),e.exit("labelImageMarker"),o}function o(d){return d===91?(e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelImage"),u):r(d)}function u(d){return d===94&&"_hiddenFootnoteSupport"in a.parser.constructs?r(d):n(d)}}const a5={name:"labelStartLink",resolveAll:Vm.resolveAll,tokenize:s5};function s5(e,n,r){const a=this;return l;function l(u){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelLink"),o}function o(u){return u===94&&"_hiddenFootnoteSupport"in a.parser.constructs?r(u):n(u)}}const bh={name:"lineEnding",tokenize:l5};function l5(e,n){return r;function r(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Et(e,n,"linePrefix")}}const du={name:"thematicBreak",tokenize:o5};function o5(e,n,r){let a=0,l;return o;function o(m){return e.enter("thematicBreak"),u(m)}function u(m){return l=m,d(m)}function d(m){return m===l?(e.enter("thematicBreakSequence"),h(m)):a>=3&&(m===null||qe(m))?(e.exit("thematicBreak"),n(m)):r(m)}function h(m){return m===l?(e.consume(m),a++,h):(e.exit("thematicBreakSequence"),ft(m)?Et(e,d,"whitespace")(m):d(m))}}const tr={continuation:{tokenize:f5},exit:m5,name:"list",tokenize:d5},c5={partial:!0,tokenize:p5},u5={partial:!0,tokenize:h5};function d5(e,n,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,u=0;return d;function d(v){const _=a.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(_==="listUnordered"?!a.containerState.marker||v===a.containerState.marker:tm(v)){if(a.containerState.type||(a.containerState.type=_,e.enter(_,{_container:!0})),_==="listUnordered")return e.enter("listItemPrefix"),v===42||v===45?e.check(du,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 tm(v)&&++u<10?(e.consume(v),h):(!a.interrupt||u<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(So,a.interrupt?r:b,e.attempt(c5,y,x))}function b(v){return a.containerState.initialBlankLine=!0,o++,y(v)}function x(v){return ft(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,n(v)}}function f5(e,n,r){const a=this;return a.containerState._closeFlow=void 0,e.check(So,l,o);function l(d){return a.containerState.furtherBlankLines=a.containerState.furtherBlankLines||a.containerState.initialBlankLine,Et(e,n,"listItemIndent",a.containerState.size+1)(d)}function o(d){return a.containerState.furtherBlankLines||!ft(d)?(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,u(d)):(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,e.attempt(u5,n,u)(d))}function u(d){return a.containerState._closeFlow=!0,a.interrupt=void 0,Et(e,e.attempt(tr,n,r),"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d)}}function h5(e,n,r){const a=this;return Et(e,l,"listItemIndent",a.containerState.size+1);function l(o){const u=a.events[a.events.length-1];return u&&u[1].type==="listItemIndent"&&u[2].sliceSerialize(u[1],!0).length===a.containerState.size?n(o):r(o)}}function m5(e){e.exit(this.containerState.type)}function p5(e,n,r){const a=this;return Et(e,l,"listItemPrefixWhitespace",a.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function l(o){const u=a.events[a.events.length-1];return!ft(o)&&u&&u[1].type==="listItemPrefixWhitespace"?n(o):r(o)}}const fy={name:"setextUnderline",resolveTo:g5,tokenize:b5};function g5(e,n){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 u={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",u,n]),e.splice(o+1,0,["exit",e[a][1],n]),e[a][1].end={...e[o][1].end}):e[a][1]=u,e.push(["exit",u,n]),e}function b5(e,n,r){const a=this;let l;return o;function o(m){let b=a.events.length,x;for(;b--;)if(a.events[b][1].type!=="lineEnding"&&a.events[b][1].type!=="linePrefix"&&a.events[b][1].type!=="content"){x=a.events[b][1].type==="paragraph";break}return!a.parser.lazy[a.now().line]&&(a.interrupt||x)?(e.enter("setextHeadingLine"),l=m,u(m)):r(m)}function u(m){return e.enter("setextHeadingLineSequence"),d(m)}function d(m){return m===l?(e.consume(m),d):(e.exit("setextHeadingLineSequence"),ft(m)?Et(e,h,"lineSuffix")(m):h(m))}function h(m){return m===null||qe(m)?(e.exit("setextHeadingLine"),n(m)):r(m)}}const x5={tokenize:y5};function y5(e){const n=this,r=e.attempt(So,a,e.attempt(this.parser.constructs.flowInitial,l,Et(e,e.attempt(this.parser.constructs.flow,l,e.attempt(wM,l)),"linePrefix")));return r;function a(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),n.currentConstruct=void 0,r}function l(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n.currentConstruct=void 0,r}}const v5={resolveAll:ck()},k5=ok("string"),_5=ok("text");function ok(e){return{resolveAll:ck(e==="text"?E5:void 0),tokenize:n};function n(r){const a=this,l=this.parser.constructs[e],o=r.attempt(l,u,d);return u;function u(b){return m(b)?o(b):d(b)}function d(b){if(b===null){r.consume(b);return}return r.enter("data"),r.consume(b),h}function h(b){return m(b)?(r.exit("data"),o(b)):(r.consume(b),h)}function m(b){if(b===null)return!0;const x=l[b];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 ck(e){return n;function n(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 E5(e,n){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=n.sliceStream(a);let o=l.length,u=-1,d=0,h;for(;o--;){const m=l[o];if(typeof m=="string"){for(u=m.length;m.charCodeAt(u-1)===32;)d++,u--;if(u)break;u=-1}else if(m===-2)h=!0,d++;else if(m!==-1){o++;break}}if(n._contentTypeTextTrailing&&r===e.length&&(d=0),d){const m={type:r===e.length||h||d<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?u:a.start._bufferIndex+u,_index:a.start._index+o,line:a.end.line,column:a.end.column-d,offset:a.end.offset-d},end:{...a.end}};a.end={...m.start},a.start.offset===a.end.offset?Object.assign(a,m):(e.splice(r,0,["enter",m,n],["exit",m,n]),r+=2)}r++}return e}const w5={42:tr,43:tr,45:tr,48:tr,49:tr,50:tr,51:tr,52:tr,53:tr,54:tr,55:tr,56:tr,57:tr,62:tk},S5={91:TM},N5={[-2]:gh,[-1]:gh,32:gh},z5={35:jM,42:du,45:[fy,du],60:UM,61:fy,95:du,96:uy,126:uy},C5={38:rk,92:nk},T5={[-5]:bh,[-4]:bh,[-3]:bh,33:r5,38:rk,42:nm,60:[aM,KM],91:a5,92:[MM,nk],93:Vm,95:nm,96:xM},R5={null:[nm,v5]},A5={null:[42,95]},O5={null:[]},M5=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:A5,contentInitial:S5,disable:O5,document:w5,flow:z5,flowInitial:N5,insideSpan:R5,string:C5,text:T5},Symbol.toStringTag,{value:"Module"}));function D5(e,n,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 u=[],d=[];const h={attempt:J($),check:J(j),consume:M,enter:R,exit:U,interrupt:J(j,{interrupt:!0})},m={code:null,containerState:{},defineSkip:E,events:[],now:_,parser:e,previous:null,sliceSerialize:y,sliceStream:v,write:x};let b=n.tokenize.call(m,h);return n.resolveAll&&o.push(n),m;function x(te){return u=Ar(u,te),w(),u[u.length-1]!==null?[]:(A(n,0),m.events=Fu(o,m.events,m),m.events)}function y(te,ee){return L5(v(te),ee)}function v(te){return j5(u,te)}function _(){const{_bufferIndex:te,_index:ee,line:ve,column:oe,offset:q}=a;return{_bufferIndex:te,_index:ee,line:ve,column:oe,offset:q}}function E(te){l[te.line]=te.column,H()}function w(){let te;for(;a._index<u.length;){const ee=u[a._index];if(typeof ee=="string")for(te=a._index,a._bufferIndex<0&&(a._bufferIndex=0);a._index===te&&a._bufferIndex<ee.length;)N(ee.charCodeAt(a._bufferIndex));else N(ee)}}function N(te){b=b(te)}function M(te){qe(te)?(a.line++,a.column=1,a.offset+=te===-3?2:1,H()):te!==-1&&(a.column++,a.offset++),a._bufferIndex<0?a._index++:(a._bufferIndex++,a._bufferIndex===u[a._index].length&&(a._bufferIndex=-1,a._index++)),m.previous=te}function R(te,ee){const ve=ee||{};return ve.type=te,ve.start=_(),m.events.push(["enter",ve,m]),d.push(ve),ve}function U(te){const ee=d.pop();return ee.end=_(),m.events.push(["exit",ee,m]),ee}function $(te,ee){A(te,ee.from)}function j(te,ee){ee.restore()}function J(te,ee){return ve;function ve(oe,q,L){let Y,V,ne,C;return Array.isArray(oe)?K(oe):"tokenize"in oe?K([oe]):O(oe);function O(xe){return He;function He(st){const Be=st!==null&&xe[st],Wt=st!==null&&xe.null,un=[...Array.isArray(Be)?Be:Be?[Be]:[],...Array.isArray(Wt)?Wt:Wt?[Wt]:[]];return K(un)(st)}}function K(xe){return Y=xe,V=0,xe.length===0?L:T(xe[V])}function T(xe){return He;function He(st){return C=ae(),ne=xe,xe.partial||(m.currentConstruct=xe),xe.name&&m.parser.constructs.disable.null.includes(xe.name)?_e():xe.tokenize.call(ee?Object.assign(Object.create(m),ee):m,h,he,_e)(st)}}function he(xe){return te(ne,C),q}function _e(xe){return C.restore(),++V<Y.length?T(Y[V]):L}}}function A(te,ee){te.resolveAll&&!o.includes(te)&&o.push(te),te.resolve&&pr(m.events,ee,m.events.length-ee,te.resolve(m.events.slice(ee),m)),te.resolveTo&&(m.events=te.resolveTo(m.events,m))}function ae(){const te=_(),ee=m.previous,ve=m.currentConstruct,oe=m.events.length,q=Array.from(d);return{from:oe,restore:L};function L(){a=te,m.previous=ee,m.currentConstruct=ve,m.events.length=oe,d=q,H()}}function H(){a.line in l&&a.column<2&&(a.column=l[a.line],a.offset+=l[a.line]-1)}}function j5(e,n){const r=n.start._index,a=n.start._bufferIndex,l=n.end._index,o=n.end._bufferIndex;let u;if(r===l)u=[e[r].slice(a,o)];else{if(u=e.slice(r,l),a>-1){const d=u[0];typeof d=="string"?u[0]=d.slice(a):u.shift()}o>0&&u.push(e[l].slice(0,o))}return u}function L5(e,n){let r=-1;const a=[];let l;for(;++r<e.length;){const o=e[r];let u;if(typeof o=="string")u=o;else switch(o){case-5:{u="\r";break}case-4:{u=`
504
- `;break}case-3:{u=`\r
505
- `;break}case-2:{u=n?" ":" ";break}case-1:{if(!n&&l)continue;u=" ";break}default:u=String.fromCharCode(o)}l=o===-2,a.push(u)}return a.join("")}function I5(e){const a={constructs:J1([M5,...(e||{}).extensions||[]]),content:l(WO),defined:[],document:l(eM),flow:l(x5),lazy:{},string:l(k5),text:l(_5)};return a;function l(o){return u;function u(d){return D5(a,o,d)}}}function B5(e){for(;!ik(e););return e}const hy=/[\0\t\n\r]/g;function U5(){let e=1,n="",r=!0,a;return l;function l(o,u,d){const h=[];let m,b,x,y,v;for(o=n+(typeof o=="string"?o.toString():new TextDecoder(u||void 0).decode(o)),x=0,n="",r&&(o.charCodeAt(0)===65279&&x++,r=void 0);x<o.length;){if(hy.lastIndex=x,m=hy.exec(o),y=m&&m.index!==void 0?m.index:o.length,v=o.charCodeAt(y),!m){n=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(b=Math.ceil(e/4)*4,h.push(-2);e++<b;)h.push(-1);break}case 10:{h.push(-4),e=1;break}default:a=!0,e=1}x=y+1}return d&&(a&&h.push(-5),n&&h.push(n),h.push(null)),h}}const F5=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function P5(e){return e.replace(F5,H5)}function H5(e,n,r){if(n)return n;if(r.charCodeAt(0)===35){const l=r.charCodeAt(1),o=l===120||l===88;return ek(r.slice(o?2:1),o?16:10)}return Km(r)||e}const uk={}.hasOwnProperty;function q5(e,n,r){return n&&typeof n=="object"&&(r=n,n=void 0),$5(r)(B5(I5(r).document().write(U5()(e,n,!0))))}function $5(e){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(br),autolinkProtocol:ae,autolinkEmail:ae,atxHeading:o(rr),blockQuote:o(Wt),characterEscape:ae,characterReference:ae,codeFenced:o(un),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:o(un,u),codeText:o(jn,u),codeTextData:ae,data:ae,codeFlowValue:ae,definition:o(At),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:o(Kt),hardBreakEscape:o(lt),hardBreakTrailing:o(lt),htmlFlow:o(kn,u),htmlFlowData:ae,htmlText:o(kn,u),htmlTextData:ae,image:o(Kn),label:u,link:o(br),listItem:o(ni),listItemValue:y,listOrdered:o(xr,x),listUnordered:o(xr),paragraph:o(ga),reference:T,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:o(rr),strong:o(Ri),thematicBreak:o(Vn)},exit:{atxHeading:h(),atxHeadingSequence:$,autolink:h(),autolinkEmail:Be,autolinkProtocol:st,blockQuote:h(),characterEscapeValue:H,characterReferenceMarkerHexadecimal:_e,characterReferenceMarkerNumeric:_e,characterReferenceValue:xe,characterReference:He,codeFenced:h(w),codeFencedFence:E,codeFencedFenceInfo:v,codeFencedFenceMeta:_,codeFlowValue:H,codeIndented:h(N),codeText:h(q),codeTextData:H,data:H,definition:h(),definitionDestinationString:U,definitionLabelString:M,definitionTitleString:R,emphasis:h(),hardBreakEscape:h(ee),hardBreakTrailing:h(ee),htmlFlow:h(ve),htmlFlowData:H,htmlText:h(oe),htmlTextData:H,image:h(Y),label:ne,labelText:V,lineEnding:te,link:h(L),listItem:h(),listOrdered:h(),listUnordered:h(),paragraph:h(),referenceString:he,resourceDestinationString:C,resourceTitleString:O,resource:K,setextHeading:h(A),setextHeadingLineSequence:J,setextHeadingText:j,strong:h(),thematicBreak:h()}};dk(n,(e||{}).mdastExtensions||[]);const r={};return a;function a(ie){let be={type:"root",children:[]};const Fe={stack:[be],tokenStack:[],config:n,enter:d,exit:m,buffer:u,resume:b,data:r},Qe=[];let Je=-1;for(;++Je<ie.length;)if(ie[Je][1].type==="listOrdered"||ie[Je][1].type==="listUnordered")if(ie[Je][0]==="enter")Qe.push(Je);else{const Sn=Qe.pop();Je=l(ie,Sn,Je)}for(Je=-1;++Je<ie.length;){const Sn=n[ie[Je][0]];uk.call(Sn,ie[Je][1].type)&&Sn[ie[Je][1].type].call(Object.assign({sliceSerialize:ie[Je][2].sliceSerialize},Fe),ie[Je][1])}if(Fe.tokenStack.length>0){const Sn=Fe.tokenStack[Fe.tokenStack.length-1];(Sn[1]||my).call(Fe,void 0,Sn[0])}for(be.position={start:ia(ie.length>0?ie[0][1].start:{line:1,column:1,offset:0}),end:ia(ie.length>0?ie[ie.length-2][1].end:{line:1,column:1,offset:0})},Je=-1;++Je<n.transforms.length;)be=n.transforms[Je](be)||be;return be}function l(ie,be,Fe){let Qe=be-1,Je=-1,Sn=!1,ir,an,Jt,qt;for(;++Qe<=Fe;){const wt=ie[Qe];switch(wt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{wt[0]==="enter"?Je++:Je--,qt=void 0;break}case"lineEndingBlank":{wt[0]==="enter"&&(ir&&!qt&&!Je&&!Jt&&(Jt=Qe),qt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:qt=void 0}if(!Je&&wt[0]==="enter"&&wt[1].type==="listItemPrefix"||Je===-1&&wt[0]==="exit"&&(wt[1].type==="listUnordered"||wt[1].type==="listOrdered")){if(ir){let ar=Qe;for(an=void 0;ar--;){const Nn=ie[ar];if(Nn[1].type==="lineEnding"||Nn[1].type==="lineEndingBlank"){if(Nn[0]==="exit")continue;an&&(ie[an][1].type="lineEndingBlank",Sn=!0),Nn[1].type="lineEnding",an=ar}else if(!(Nn[1].type==="linePrefix"||Nn[1].type==="blockQuotePrefix"||Nn[1].type==="blockQuotePrefixWhitespace"||Nn[1].type==="blockQuoteMarker"||Nn[1].type==="listItemIndent"))break}Jt&&(!an||Jt<an)&&(ir._spread=!0),ir.end=Object.assign({},an?ie[an][1].start:wt[1].end),ie.splice(an||Qe,0,["exit",ir,wt[2]]),Qe++,Fe++}if(wt[1].type==="listItemPrefix"){const ar={type:"listItem",_spread:!1,start:Object.assign({},wt[1].start),end:void 0};ir=ar,ie.splice(Qe,0,["enter",ar,wt[2]]),Qe++,Fe++,Jt=void 0,qt=!0}}}return ie[be][1]._spread=Sn,Fe}function o(ie,be){return Fe;function Fe(Qe){d.call(this,ie(Qe),Qe),be&&be.call(this,Qe)}}function u(){this.stack.push({type:"fragment",children:[]})}function d(ie,be,Fe){this.stack[this.stack.length-1].children.push(ie),this.stack.push(ie),this.tokenStack.push([be,Fe||void 0]),ie.position={start:ia(be.start),end:void 0}}function h(ie){return be;function be(Fe){ie&&ie.call(this,Fe),m.call(this,Fe)}}function m(ie,be){const Fe=this.stack.pop(),Qe=this.tokenStack.pop();if(Qe)Qe[0].type!==ie.type&&(be?be.call(this,ie,Qe[0]):(Qe[1]||my).call(this,ie,Qe[0]));else throw new Error("Cannot close `"+ie.type+"` ("+ao({start:ie.start,end:ie.end})+"): it’s not open");Fe.position.end=ia(ie.end)}function b(){return Gm(this.stack.pop())}function x(){this.data.expectingFirstListItemValue=!0}function y(ie){if(this.data.expectingFirstListItemValue){const be=this.stack[this.stack.length-2];be.start=Number.parseInt(this.sliceSerialize(ie),10),this.data.expectingFirstListItemValue=void 0}}function v(){const ie=this.resume(),be=this.stack[this.stack.length-1];be.lang=ie}function _(){const ie=this.resume(),be=this.stack[this.stack.length-1];be.meta=ie}function E(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function w(){const ie=this.resume(),be=this.stack[this.stack.length-1];be.value=ie.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function N(){const ie=this.resume(),be=this.stack[this.stack.length-1];be.value=ie.replace(/(\r?\n|\r)$/g,"")}function M(ie){const be=this.resume(),Fe=this.stack[this.stack.length-1];Fe.label=be,Fe.identifier=Fr(this.sliceSerialize(ie)).toLowerCase()}function R(){const ie=this.resume(),be=this.stack[this.stack.length-1];be.title=ie}function U(){const ie=this.resume(),be=this.stack[this.stack.length-1];be.url=ie}function $(ie){const be=this.stack[this.stack.length-1];if(!be.depth){const Fe=this.sliceSerialize(ie).length;be.depth=Fe}}function j(){this.data.setextHeadingSlurpLineEnding=!0}function J(ie){const be=this.stack[this.stack.length-1];be.depth=this.sliceSerialize(ie).codePointAt(0)===61?1:2}function A(){this.data.setextHeadingSlurpLineEnding=void 0}function ae(ie){const Fe=this.stack[this.stack.length-1].children;let Qe=Fe[Fe.length-1];(!Qe||Qe.type!=="text")&&(Qe=Vt(),Qe.position={start:ia(ie.start),end:void 0},Fe.push(Qe)),this.stack.push(Qe)}function H(ie){const be=this.stack.pop();be.value+=this.sliceSerialize(ie),be.position.end=ia(ie.end)}function te(ie){const be=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Fe=be.children[be.children.length-1];Fe.position.end=ia(ie.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(be.type)&&(ae.call(this,ie),H.call(this,ie))}function ee(){this.data.atHardBreak=!0}function ve(){const ie=this.resume(),be=this.stack[this.stack.length-1];be.value=ie}function oe(){const ie=this.resume(),be=this.stack[this.stack.length-1];be.value=ie}function q(){const ie=this.resume(),be=this.stack[this.stack.length-1];be.value=ie}function L(){const ie=this.stack[this.stack.length-1];if(this.data.inReference){const be=this.data.referenceType||"shortcut";ie.type+="Reference",ie.referenceType=be,delete ie.url,delete ie.title}else delete ie.identifier,delete ie.label;this.data.referenceType=void 0}function Y(){const ie=this.stack[this.stack.length-1];if(this.data.inReference){const be=this.data.referenceType||"shortcut";ie.type+="Reference",ie.referenceType=be,delete ie.url,delete ie.title}else delete ie.identifier,delete ie.label;this.data.referenceType=void 0}function V(ie){const be=this.sliceSerialize(ie),Fe=this.stack[this.stack.length-2];Fe.label=P5(be),Fe.identifier=Fr(be).toLowerCase()}function ne(){const ie=this.stack[this.stack.length-1],be=this.resume(),Fe=this.stack[this.stack.length-1];if(this.data.inReference=!0,Fe.type==="link"){const Qe=ie.children;Fe.children=Qe}else Fe.alt=be}function C(){const ie=this.resume(),be=this.stack[this.stack.length-1];be.url=ie}function O(){const ie=this.resume(),be=this.stack[this.stack.length-1];be.title=ie}function K(){this.data.inReference=void 0}function T(){this.data.referenceType="collapsed"}function he(ie){const be=this.resume(),Fe=this.stack[this.stack.length-1];Fe.label=be,Fe.identifier=Fr(this.sliceSerialize(ie)).toLowerCase(),this.data.referenceType="full"}function _e(ie){this.data.characterReferenceType=ie.type}function xe(ie){const be=this.sliceSerialize(ie),Fe=this.data.characterReferenceType;let Qe;Fe?(Qe=ek(be,Fe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Qe=Km(be);const Je=this.stack[this.stack.length-1];Je.value+=Qe}function He(ie){const be=this.stack.pop();be.position.end=ia(ie.end)}function st(ie){H.call(this,ie);const be=this.stack[this.stack.length-1];be.url=this.sliceSerialize(ie)}function Be(ie){H.call(this,ie);const be=this.stack[this.stack.length-1];be.url="mailto:"+this.sliceSerialize(ie)}function Wt(){return{type:"blockquote",children:[]}}function un(){return{type:"code",lang:null,meta:null,value:""}}function jn(){return{type:"inlineCode",value:""}}function At(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Kt(){return{type:"emphasis",children:[]}}function rr(){return{type:"heading",depth:0,children:[]}}function lt(){return{type:"break"}}function kn(){return{type:"html",value:""}}function Kn(){return{type:"image",title:null,url:"",alt:null}}function br(){return{type:"link",title:null,url:"",children:[]}}function xr(ie){return{type:"list",ordered:ie.type==="listOrdered",start:null,spread:ie._spread,children:[]}}function ni(ie){return{type:"listItem",spread:ie._spread,checked:null,children:[]}}function ga(){return{type:"paragraph",children:[]}}function Ri(){return{type:"strong",children:[]}}function Vt(){return{type:"text",value:""}}function Vn(){return{type:"thematicBreak"}}}function ia(e){return{line:e.line,column:e.column,offset:e.offset}}function dk(e,n){let r=-1;for(;++r<n.length;){const a=n[r];Array.isArray(a)?dk(e,a):G5(e,a)}}function G5(e,n){let r;for(r in n)if(uk.call(n,r))switch(r){case"canContainEols":{const a=n[r];a&&e[r].push(...a);break}case"transforms":{const a=n[r];a&&e[r].push(...a);break}case"enter":case"exit":{const a=n[r];a&&Object.assign(e[r],a);break}}}function my(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+ao({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+ao({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+ao({start:n.start,end:n.end})+") is still open")}function K5(e){const n=this;n.parser=r;function r(a){return q5(a,{...n.data("settings"),...e,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}function V5(e,n){const r={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(n),!0)};return e.patch(n,r),e.applyData(n,r)}function Y5(e,n){const r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,r),[e.applyData(n,r),{type:"text",value:`
506
- `}]}function Q5(e,n){const r=n.value?n.value+`
507
- `:"",a={},l=n.lang?n.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 n.meta&&(o.data={meta:n.meta}),e.patch(n,o),o=e.applyData(n,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(n,o),o}function X5(e,n){const r={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function Z5(e,n){const r={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function W5(e,n){const r=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",a=String(n.identifier).toUpperCase(),l=Qs(a.toLowerCase()),o=e.footnoteOrder.indexOf(a);let u,d=e.footnoteCounts.get(a);d===void 0?(d=0,e.footnoteOrder.push(a),u=e.footnoteOrder.length):u=o+1,d+=1,e.footnoteCounts.set(a,d);const h={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+l,id:r+"fnref-"+l+(d>1?"-"+d:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(u)}]};e.patch(n,h);const m={type:"element",tagName:"sup",properties:{},children:[h]};return e.patch(n,m),e.applyData(n,m)}function J5(e,n){const r={type:"element",tagName:"h"+n.depth,properties:{},children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function e4(e,n){if(e.options.allowDangerousHtml){const r={type:"raw",value:n.value};return e.patch(n,r),e.applyData(n,r)}}function fk(e,n){const r=n.referenceType;let a="]";if(r==="collapsed"?a+="[]":r==="full"&&(a+="["+(n.label||n.identifier)+"]"),n.type==="imageReference")return[{type:"text",value:"!["+n.alt+a}];const l=e.all(n),o=l[0];o&&o.type==="text"?o.value="["+o.value:l.unshift({type:"text",value:"["});const u=l[l.length-1];return u&&u.type==="text"?u.value+=a:l.push({type:"text",value:a}),l}function t4(e,n){const r=String(n.identifier).toUpperCase(),a=e.definitionById.get(r);if(!a)return fk(e,n);const l={src:Qs(a.url||""),alt:n.alt};a.title!==null&&a.title!==void 0&&(l.title=a.title);const o={type:"element",tagName:"img",properties:l,children:[]};return e.patch(n,o),e.applyData(n,o)}function n4(e,n){const r={src:Qs(n.url)};n.alt!==null&&n.alt!==void 0&&(r.alt=n.alt),n.title!==null&&n.title!==void 0&&(r.title=n.title);const a={type:"element",tagName:"img",properties:r,children:[]};return e.patch(n,a),e.applyData(n,a)}function r4(e,n){const r={type:"text",value:n.value.replace(/\r?\n|\r/g," ")};e.patch(n,r);const a={type:"element",tagName:"code",properties:{},children:[r]};return e.patch(n,a),e.applyData(n,a)}function i4(e,n){const r=String(n.identifier).toUpperCase(),a=e.definitionById.get(r);if(!a)return fk(e,n);const l={href:Qs(a.url||"")};a.title!==null&&a.title!==void 0&&(l.title=a.title);const o={type:"element",tagName:"a",properties:l,children:e.all(n)};return e.patch(n,o),e.applyData(n,o)}function a4(e,n){const r={href:Qs(n.url)};n.title!==null&&n.title!==void 0&&(r.title=n.title);const a={type:"element",tagName:"a",properties:r,children:e.all(n)};return e.patch(n,a),e.applyData(n,a)}function s4(e,n,r){const a=e.all(n),l=r?l4(r):hk(n),o={},u=[];if(typeof n.checked=="boolean"){const b=a[0];let x;b&&b.type==="element"&&b.tagName==="p"?x=b:(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:n.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let d=-1;for(;++d<a.length;){const b=a[d];(l||d!==0||b.type!=="element"||b.tagName!=="p")&&u.push({type:"text",value:`
508
- `}),b.type==="element"&&b.tagName==="p"&&!l?u.push(...b.children):u.push(b)}const h=a[a.length-1];h&&(l||h.type!=="element"||h.tagName!=="p")&&u.push({type:"text",value:`
509
- `});const m={type:"element",tagName:"li",properties:o,children:u};return e.patch(n,m),e.applyData(n,m)}function l4(e){let n=!1;if(e.type==="list"){n=e.spread||!1;const r=e.children;let a=-1;for(;!n&&++a<r.length;)n=hk(r[a])}return n}function hk(e){const n=e.spread;return n??e.children.length>1}function o4(e,n){const r={},a=e.all(n);let l=-1;for(typeof n.start=="number"&&n.start!==1&&(r.start=n.start);++l<a.length;){const u=a[l];if(u.type==="element"&&u.tagName==="li"&&u.properties&&Array.isArray(u.properties.className)&&u.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}const o={type:"element",tagName:n.ordered?"ol":"ul",properties:r,children:e.wrap(a,!0)};return e.patch(n,o),e.applyData(n,o)}function c4(e,n){const r={type:"element",tagName:"p",properties:{},children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function u4(e,n){const r={type:"root",children:e.wrap(e.all(n))};return e.patch(n,r),e.applyData(n,r)}function d4(e,n){const r={type:"element",tagName:"strong",properties:{},children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function f4(e,n){const r=e.all(n),a=r.shift(),l=[];if(a){const u={type:"element",tagName:"thead",properties:{},children:e.wrap([a],!0)};e.patch(n.children[0],u),l.push(u)}if(r.length>0){const u={type:"element",tagName:"tbody",properties:{},children:e.wrap(r,!0)},d=Pm(n.children[1]),h=K1(n.children[n.children.length-1]);d&&h&&(u.position={start:d,end:h}),l.push(u)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(l,!0)};return e.patch(n,o),e.applyData(n,o)}function h4(e,n,r){const a=r?r.children:void 0,o=(a?a.indexOf(n):1)===0?"th":"td",u=r&&r.type==="table"?r.align:void 0,d=u?u.length:n.children.length;let h=-1;const m=[];for(;++h<d;){const x=n.children[h],y={},v=u?u[h]:void 0;v&&(y.align=v);let _={type:"element",tagName:o,properties:y,children:[]};x&&(_.children=e.all(x),e.patch(x,_),_=e.applyData(x,_)),m.push(_)}const b={type:"element",tagName:"tr",properties:{},children:e.wrap(m,!0)};return e.patch(n,b),e.applyData(n,b)}function m4(e,n){const r={type:"element",tagName:"td",properties:{},children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}const py=9,gy=32;function p4(e){const n=String(e),r=/\r?\n|\r/g;let a=r.exec(n),l=0;const o=[];for(;a;)o.push(by(n.slice(l,a.index),l>0,!0),a[0]),l=a.index+a[0].length,a=r.exec(n);return o.push(by(n.slice(l),l>0,!1)),o.join("")}function by(e,n,r){let a=0,l=e.length;if(n){let o=e.codePointAt(a);for(;o===py||o===gy;)a++,o=e.codePointAt(a)}if(r){let o=e.codePointAt(l-1);for(;o===py||o===gy;)l--,o=e.codePointAt(l-1)}return l>a?e.slice(a,l):""}function g4(e,n){const r={type:"text",value:p4(String(n.value))};return e.patch(n,r),e.applyData(n,r)}function b4(e,n){const r={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,r),e.applyData(n,r)}const x4={blockquote:V5,break:Y5,code:Q5,delete:X5,emphasis:Z5,footnoteReference:W5,heading:J5,html:e4,imageReference:t4,image:n4,inlineCode:r4,linkReference:i4,link:a4,listItem:s4,list:o4,paragraph:c4,root:u4,strong:d4,table:f4,tableCell:m4,tableRow:h4,text:g4,thematicBreak:b4,toml:Yc,yaml:Yc,definition:Yc,footnoteDefinition:Yc};function Yc(){}const mk=-1,Pu=0,lo=1,ku=2,Ym=3,Qm=4,Xm=5,Zm=6,pk=7,gk=8,xy=typeof self=="object"?self:globalThis,y4=(e,n)=>{const r=(l,o)=>(e.set(o,l),l),a=l=>{if(e.has(l))return e.get(l);const[o,u]=n[l];switch(o){case Pu:case mk:return r(u,l);case lo:{const d=r([],l);for(const h of u)d.push(a(h));return d}case ku:{const d=r({},l);for(const[h,m]of u)d[a(h)]=a(m);return d}case Ym:return r(new Date(u),l);case Qm:{const{source:d,flags:h}=u;return r(new RegExp(d,h),l)}case Xm:{const d=r(new Map,l);for(const[h,m]of u)d.set(a(h),a(m));return d}case Zm:{const d=r(new Set,l);for(const h of u)d.add(a(h));return d}case pk:{const{name:d,message:h}=u;return r(new xy[d](h),l)}case gk:return r(BigInt(u),l);case"BigInt":return r(Object(BigInt(u)),l);case"ArrayBuffer":return r(new Uint8Array(u).buffer,u);case"DataView":{const{buffer:d}=new Uint8Array(u);return r(new DataView(d),u)}}return r(new xy[o](u),l)};return a},yy=e=>y4(new Map,e)(0),As="",{toString:v4}={},{keys:k4}=Object,Xl=e=>{const n=typeof e;if(n!=="object"||!e)return[Pu,n];const r=v4.call(e).slice(8,-1);switch(r){case"Array":return[lo,As];case"Object":return[ku,As];case"Date":return[Ym,As];case"RegExp":return[Qm,As];case"Map":return[Xm,As];case"Set":return[Zm,As];case"DataView":return[lo,r]}return r.includes("Array")?[lo,r]:r.includes("Error")?[pk,r]:[ku,r]},Qc=([e,n])=>e===Pu&&(n==="function"||n==="symbol"),_4=(e,n,r,a)=>{const l=(u,d)=>{const h=a.push(u)-1;return r.set(d,h),h},o=u=>{if(r.has(u))return r.get(u);let[d,h]=Xl(u);switch(d){case Pu:{let b=u;switch(h){case"bigint":d=gk,b=u.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+h);b=null;break;case"undefined":return l([mk],u)}return l([d,b],u)}case lo:{if(h){let y=u;return h==="DataView"?y=new Uint8Array(u.buffer):h==="ArrayBuffer"&&(y=new Uint8Array(u)),l([h,[...y]],u)}const b=[],x=l([d,b],u);for(const y of u)b.push(o(y));return x}case ku:{if(h)switch(h){case"BigInt":return l([h,u.toString()],u);case"Boolean":case"Number":case"String":return l([h,u.valueOf()],u)}if(n&&"toJSON"in u)return o(u.toJSON());const b=[],x=l([d,b],u);for(const y of k4(u))(e||!Qc(Xl(u[y])))&&b.push([o(y),o(u[y])]);return x}case Ym:return l([d,u.toISOString()],u);case Qm:{const{source:b,flags:x}=u;return l([d,{source:b,flags:x}],u)}case Xm:{const b=[],x=l([d,b],u);for(const[y,v]of u)(e||!(Qc(Xl(y))||Qc(Xl(v))))&&b.push([o(y),o(v)]);return x}case Zm:{const b=[],x=l([d,b],u);for(const y of u)(e||!Qc(Xl(y)))&&b.push(o(y));return x}}const{message:m}=u;return l([d,{name:h,message:m}],u)};return o},vy=(e,{json:n,lossy:r}={})=>{const a=[];return _4(!(n||r),!!n,new Map,a)(e),a},_u=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?yy(vy(e,n)):structuredClone(e):(e,n)=>yy(vy(e,n));function E4(e,n){const r=[{type:"text",value:"↩"}];return n>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(n)}]}),r}function w4(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function S4(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=e.options.footnoteBackContent||E4,a=e.options.footnoteBackLabel||w4,l=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",u=e.options.footnoteLabelProperties||{className:["sr-only"]},d=[];let h=-1;for(;++h<e.footnoteOrder.length;){const m=e.footnoteById.get(e.footnoteOrder[h]);if(!m)continue;const b=e.all(m),x=String(m.identifier).toUpperCase(),y=Qs(x.toLowerCase());let v=0;const _=[],E=e.footnoteCounts.get(x);for(;E!==void 0&&++v<=E;){_.length>0&&_.push({type:"text",value:" "});let M=typeof r=="string"?r:r(h,v);typeof M=="string"&&(M={type:"text",value:M}),_.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+y+(v>1?"-"+v:""),dataFootnoteBackref:"",ariaLabel:typeof a=="string"?a:a(h,v),className:["data-footnote-backref"]},children:Array.isArray(M)?M:[M]})}const w=b[b.length-1];if(w&&w.type==="element"&&w.tagName==="p"){const M=w.children[w.children.length-1];M&&M.type==="text"?M.value+=" ":w.children.push({type:"text",value:" "}),w.children.push(..._)}else b.push(..._);const N={type:"element",tagName:"li",properties:{id:n+"fn-"+y},children:e.wrap(b,!0)};e.patch(m,N),d.push(N)}if(d.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{..._u(u),id:"footnote-label"},children:[{type:"text",value:l}]},{type:"text",value:`
510
- `},{type:"element",tagName:"ol",properties:{},children:e.wrap(d,!0)},{type:"text",value:`
511
- `}]}}const No=(function(e){if(e==null)return T4;if(typeof e=="function")return Hu(e);if(typeof e=="object")return Array.isArray(e)?N4(e):z4(e);if(typeof e=="string")return C4(e);throw new Error("Expected function, string, or object as test")});function N4(e){const n=[];let r=-1;for(;++r<e.length;)n[r]=No(e[r]);return Hu(a);function a(...l){let o=-1;for(;++o<n.length;)if(n[o].apply(this,l))return!0;return!1}}function z4(e){const n=e;return Hu(r);function r(a){const l=a;let o;for(o in e)if(l[o]!==n[o])return!1;return!0}}function C4(e){return Hu(n);function n(r){return r&&r.type===e}}function Hu(e){return n;function n(r,a,l){return!!(R4(r)&&e.call(this,r,typeof a=="number"?a:void 0,l||void 0))}}function T4(){return!0}function R4(e){return e!==null&&typeof e=="object"&&"type"in e}const bk=[],A4=!0,rm=!1,O4="skip";function xk(e,n,r,a){let l;typeof n=="function"&&typeof r!="function"?(a=r,r=n):l=n;const o=No(l),u=a?-1:1;d(e,void 0,[])();function d(h,m,b){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=bk,_,E,w;if((!n||o(h,m,b[b.length-1]||void 0))&&(v=M4(r(h,b)),v[0]===rm))return v;if("children"in h&&h.children){const N=h;if(N.children&&v[0]!==O4)for(E=(a?N.children.length:-1)+u,w=b.concat(N);E>-1&&E<N.children.length;){const M=N.children[E];if(_=d(M,E,w)(),_[0]===rm)return _;E=typeof _[1]=="number"?_[1]:E+u}}return v}}}function M4(e){return Array.isArray(e)?e:typeof e=="number"?[A4,e]:e==null?bk:[e]}function qu(e,n,r,a){let l,o,u;typeof n=="function"&&typeof r!="function"?(o=void 0,u=n,l=r):(o=n,u=r,l=a),xk(e,o,d,l);function d(h,m){const b=m[m.length-1],x=b?b.children.indexOf(h):void 0;return u(h,x,b)}}const im={}.hasOwnProperty,D4={};function j4(e,n){const r=n||D4,a=new Map,l=new Map,o=new Map,u={...x4,...r.handlers},d={all:m,applyData:I4,definitionById:a,footnoteById:l,footnoteCounts:o,footnoteOrder:[],handlers:u,one:h,options:r,patch:L4,wrap:U4};return qu(e,function(b){if(b.type==="definition"||b.type==="footnoteDefinition"){const x=b.type==="definition"?a:l,y=String(b.identifier).toUpperCase();x.has(y)||x.set(y,b)}}),d;function h(b,x){const y=b.type,v=d.handlers[y];if(im.call(d.handlers,y)&&v)return v(d,b,x);if(d.options.passThrough&&d.options.passThrough.includes(y)){if("children"in b){const{children:E,...w}=b,N=_u(w);return N.children=d.all(b),N}return _u(b)}return(d.options.unknownHandler||B4)(d,b,x)}function m(b){const x=[];if("children"in b){const y=b.children;let v=-1;for(;++v<y.length;){const _=d.one(y[v],b);if(_){if(v&&y[v-1].type==="break"&&(!Array.isArray(_)&&_.type==="text"&&(_.value=ky(_.value)),!Array.isArray(_)&&_.type==="element")){const E=_.children[0];E&&E.type==="text"&&(E.value=ky(E.value))}Array.isArray(_)?x.push(..._):x.push(_)}}}return x}}function L4(e,n){e.position&&(n.position=wO(e))}function I4(e,n){let r=n;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 u="children"in r?r.children:[r];r={type:"element",tagName:a,properties:{},children:u}}r.type==="element"&&o&&Object.assign(r.properties,_u(o)),"children"in r&&r.children&&l!==null&&l!==void 0&&(r.children=l)}return r}function B4(e,n){const r=n.data||{},a="value"in n&&!(im.call(r,"hProperties")||im.call(r,"hChildren"))?{type:"text",value:n.value}:{type:"element",tagName:"div",properties:{},children:e.all(n)};return e.patch(n,a),e.applyData(n,a)}function U4(e,n){const r=[];let a=-1;for(n&&r.push({type:"text",value:`
512
- `});++a<e.length;)a&&r.push({type:"text",value:`
513
- `}),r.push(e[a]);return n&&e.length>0&&r.push({type:"text",value:`
514
- `}),r}function ky(e){let n=0,r=e.charCodeAt(n);for(;r===9||r===32;)n++,r=e.charCodeAt(n);return e.slice(n)}function _y(e,n){const r=j4(e,n),a=r.one(e,void 0),l=S4(r),o=Array.isArray(a)?{type:"root",children:a}:a||{type:"root",children:[]};return l&&o.children.push({type:"text",value:`
515
- `},l),o}function F4(e,n){return e&&"run"in e?async function(r,a){const l=_y(r,{file:a,...n});await e.run(l,a)}:function(r,a){return _y(r,{file:a,...e||n})}}function Ey(e){if(e)throw e}var xh,wy;function P4(){if(wy)return xh;wy=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Object.defineProperty,a=Object.getOwnPropertyDescriptor,l=function(m){return typeof Array.isArray=="function"?Array.isArray(m):n.call(m)==="[object Array]"},o=function(m){if(!m||n.call(m)!=="[object Object]")return!1;var b=e.call(m,"constructor"),x=m.constructor&&m.constructor.prototype&&e.call(m.constructor.prototype,"isPrototypeOf");if(m.constructor&&!b&&!x)return!1;var y;for(y in m);return typeof y>"u"||e.call(m,y)},u=function(m,b){r&&b.name==="__proto__"?r(m,b.name,{enumerable:!0,configurable:!0,value:b.newValue,writable:!0}):m[b.name]=b.newValue},d=function(m,b){if(b==="__proto__")if(e.call(m,b)){if(a)return a(m,b).value}else return;return m[b]};return xh=function h(){var m,b,x,y,v,_,E=arguments[0],w=1,N=arguments.length,M=!1;for(typeof E=="boolean"&&(M=E,E=arguments[1]||{},w=2),(E==null||typeof E!="object"&&typeof E!="function")&&(E={});w<N;++w)if(m=arguments[w],m!=null)for(b in m)x=d(E,b),y=d(m,b),E!==y&&(M&&y&&(o(y)||(v=l(y)))?(v?(v=!1,_=x&&l(x)?x:[]):_=x&&o(x)?x:{},u(E,{name:b,newValue:h(M,_,y)})):typeof y<"u"&&u(E,{name:b,newValue:y}));return E},xh}var H4=P4();const yh=Nu(H4);function am(e){if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function q4(){const e=[],n={run:r,use:a};return n;function r(...l){let o=-1;const u=l.pop();if(typeof u!="function")throw new TypeError("Expected function as last argument, not "+u);d(null,...l);function d(h,...m){const b=e[++o];let x=-1;if(h){u(h);return}for(;++x<l.length;)(m[x]===null||m[x]===void 0)&&(m[x]=l[x]);l=m,b?$4(b,d)(...m):u(null,...m)}}function a(l){if(typeof l!="function")throw new TypeError("Expected `middelware` to be a function, not "+l);return e.push(l),n}}function $4(e,n){let r;return a;function a(...u){const d=e.length>u.length;let h;d&&u.push(l);try{h=e.apply(this,u)}catch(m){const b=m;if(d&&r)throw b;return l(b)}d||(h&&h.then&&typeof h.then=="function"?h.then(o,l):h instanceof Error?l(h):o(h))}function l(u,...d){r||(r=!0,n(u,...d))}function o(u){l(null,u)}}const Zr={basename:G4,dirname:K4,extname:V4,join:Y4,sep:"/"};function G4(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');zo(e);let r=0,a=-1,l=e.length,o;if(n===void 0||n.length===0||n.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(n===e)return"";let u=-1,d=n.length-1;for(;l--;)if(e.codePointAt(l)===47){if(o){r=l+1;break}}else u<0&&(o=!0,u=l+1),d>-1&&(e.codePointAt(l)===n.codePointAt(d--)?d<0&&(a=l):(d=-1,a=u));return r===a?a=u:a<0&&(a=e.length),e.slice(r,a)}function K4(e){if(zo(e),e.length===0)return".";let n=-1,r=e.length,a;for(;--r;)if(e.codePointAt(r)===47){if(a){n=r;break}}else a||(a=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function V4(e){zo(e);let n=e.length,r=-1,a=0,l=-1,o=0,u;for(;n--;){const d=e.codePointAt(n);if(d===47){if(u){a=n+1;break}continue}r<0&&(u=!0,r=n+1),d===46?l<0?l=n: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 Y4(...e){let n=-1,r;for(;++n<e.length;)zo(e[n]),e[n]&&(r=r===void 0?e[n]:r+"/"+e[n]);return r===void 0?".":Q4(r)}function Q4(e){zo(e);const n=e.codePointAt(0)===47;let r=X4(e,!n);return r.length===0&&!n&&(r="."),r.length>0&&e.codePointAt(e.length-1)===47&&(r+="/"),n?"/"+r:r}function X4(e,n){let r="",a=0,l=-1,o=0,u=-1,d,h;for(;++u<=e.length;){if(u<e.length)d=e.codePointAt(u);else{if(d===47)break;d=47}if(d===47){if(!(l===u-1||o===1))if(l!==u-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=u,o=0;continue}}else if(r.length>0){r="",a=0,l=u,o=0;continue}}n&&(r=r.length>0?r+"/..":"..",a=2)}else r.length>0?r+="/"+e.slice(l+1,u):r=e.slice(l+1,u),a=u-l-1;l=u,o=0}else d===46&&o>-1?o++:o=-1}return r}function zo(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Z4={cwd:W4};function W4(){return"/"}function sm(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function J4(e){if(typeof e=="string")e=new URL(e);else if(!sm(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return eD(e)}function eD(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 n=e.pathname;let r=-1;for(;++r<n.length;)if(n.codePointAt(r)===37&&n.codePointAt(r+1)===50){const a=n.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(n)}const vh=["history","path","basename","stem","extname","dirname"];class yk{constructor(n){let r;n?sm(n)?r={path:n}:typeof n=="string"||tD(n)?r={value:n}:r=n:r={},this.cwd="cwd"in r?"":Z4.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let a=-1;for(;++a<vh.length;){const o=vh[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)vh.includes(l)||(this[l]=r[l])}get basename(){return typeof this.path=="string"?Zr.basename(this.path):void 0}set basename(n){_h(n,"basename"),kh(n,"basename"),this.path=Zr.join(this.dirname||"",n)}get dirname(){return typeof this.path=="string"?Zr.dirname(this.path):void 0}set dirname(n){Sy(this.basename,"dirname"),this.path=Zr.join(n||"",this.basename)}get extname(){return typeof this.path=="string"?Zr.extname(this.path):void 0}set extname(n){if(kh(n,"extname"),Sy(this.dirname,"extname"),n){if(n.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(n.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Zr.join(this.dirname,this.stem+(n||""))}get path(){return this.history[this.history.length-1]}set path(n){sm(n)&&(n=J4(n)),_h(n,"path"),this.path!==n&&this.history.push(n)}get stem(){return typeof this.path=="string"?Zr.basename(this.path,this.extname):void 0}set stem(n){_h(n,"stem"),kh(n,"stem"),this.path=Zr.join(this.dirname||"",n+(this.extname||""))}fail(n,r,a){const l=this.message(n,r,a);throw l.fatal=!0,l}info(n,r,a){const l=this.message(n,r,a);return l.fatal=void 0,l}message(n,r,a){const l=new Pn(n,r,a);return this.path&&(l.name=this.path+":"+l.name,l.file=this.path),l.fatal=!1,this.messages.push(l),l}toString(n){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(n||void 0).decode(this.value)}}function kh(e,n){if(e&&e.includes(Zr.sep))throw new Error("`"+n+"` cannot be a path: did not expect `"+Zr.sep+"`")}function _h(e,n){if(!e)throw new Error("`"+n+"` cannot be empty")}function Sy(e,n){if(!e)throw new Error("Setting `"+n+"` requires `path` to be set too")}function tD(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const nD=(function(e){const a=this.constructor.prototype,l=a[e],o=function(){return l.apply(o,arguments)};return Object.setPrototypeOf(o,a),o}),rD={}.hasOwnProperty;class Wm extends nD{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=q4()}copy(){const n=new Wm;let r=-1;for(;++r<this.attachers.length;){const a=this.attachers[r];n.use(...a)}return n.data(yh(!0,{},this.namespace)),n}data(n,r){return typeof n=="string"?arguments.length===2?(Sh("data",this.frozen),this.namespace[n]=r,this):rD.call(this.namespace,n)&&this.namespace[n]||void 0:n?(Sh("data",this.frozen),this.namespace=n,this):this.namespace}freeze(){if(this.frozen)return this;const n=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(n,...a);typeof l=="function"&&this.transformers.use(l)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(n){this.freeze();const r=Xc(n),a=this.parser||this.Parser;return Eh("parse",a),a(String(r),r)}process(n,r){const a=this;return this.freeze(),Eh("process",this.parser||this.Parser),wh("process",this.compiler||this.Compiler),r?l(void 0,r):new Promise(l);function l(o,u){const d=Xc(n),h=a.parse(d);a.run(h,d,function(b,x,y){if(b||!x||!y)return m(b);const v=x,_=a.stringify(v,y);sD(_)?y.value=_:y.result=_,m(b,y)});function m(b,x){b||!x?u(b):o?o(x):r(void 0,x)}}}processSync(n){let r=!1,a;return this.freeze(),Eh("processSync",this.parser||this.Parser),wh("processSync",this.compiler||this.Compiler),this.process(n,l),zy("processSync","process",r),a;function l(o,u){r=!0,Ey(o),a=u}}run(n,r,a){Ny(n),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(u,d){const h=Xc(r);l.run(n,h,m);function m(b,x,y){const v=x||n;b?d(b):u?u(v):a(void 0,v,y)}}}runSync(n,r){let a=!1,l;return this.run(n,r,o),zy("runSync","run",a),l;function o(u,d){Ey(u),l=d,a=!0}}stringify(n,r){this.freeze();const a=Xc(r),l=this.compiler||this.Compiler;return wh("stringify",l),Ny(n),l(n,a)}use(n,...r){const a=this.attachers,l=this.namespace;if(Sh("use",this.frozen),n!=null)if(typeof n=="function")h(n,r);else if(typeof n=="object")Array.isArray(n)?d(n):u(n);else throw new TypeError("Expected usable value, not `"+n+"`");return this;function o(m){if(typeof m=="function")h(m,[]);else if(typeof m=="object")if(Array.isArray(m)){const[b,...x]=m;h(b,x)}else u(m);else throw new TypeError("Expected usable value, not `"+m+"`")}function u(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");d(m.plugins),m.settings&&(l.settings=yh(!0,l.settings,m.settings))}function d(m){let b=-1;if(m!=null)if(Array.isArray(m))for(;++b<m.length;){const x=m[b];o(x)}else throw new TypeError("Expected a list of plugins, not `"+m+"`")}function h(m,b){let x=-1,y=-1;for(;++x<a.length;)if(a[x][0]===m){y=x;break}if(y===-1)a.push([m,...b]);else if(b.length>0){let[v,..._]=b;const E=a[y][1];am(E)&&am(v)&&(v=yh(!0,E,v)),a[y]=[m,v,..._]}}}}const iD=new Wm().freeze();function Eh(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function wh(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Sh(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Ny(e){if(!am(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function zy(e,n,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function Xc(e){return aD(e)?e:new yk(e)}function aD(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function sD(e){return typeof e=="string"||lD(e)}function lD(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const oD="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Cy=[],Ty={allowDangerousHtml:!0},cD=/^(https?|ircs?|mailto|xmpp)$/i,uD=[{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 dD(e){const n=fD(e),r=hD(e);return mD(n.runSync(n.parse(r),r),e)}function fD(e){const n=e.rehypePlugins||Cy,r=e.remarkPlugins||Cy,a=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Ty}:Ty;return iD().use(K5).use(r).use(F4,a).use(n)}function hD(e){const n=e.children||"",r=new yk;return typeof n=="string"&&(r.value=n),r}function mD(e,n){const r=n.allowedElements,a=n.allowElement,l=n.components,o=n.disallowedElements,u=n.skipHtml,d=n.unwrapDisallowed,h=n.urlTransform||pD;for(const b of uD)Object.hasOwn(n,b.from)&&(""+b.from+(b.to?"use `"+b.to+"` instead":"remove it")+oD+b.id,void 0);return n.className&&(e={type:"element",tagName:"div",properties:{className:n.className},children:e.type==="root"?e.children:[e]}),qu(e,m),TO(e,{Fragment:f.Fragment,components:l,ignoreInvalidStyle:!0,jsx:f.jsx,jsxs:f.jsxs,passKeys:!0,passNode:!0});function m(b,x,y){if(b.type==="raw"&&y&&typeof x=="number")return u?y.children.splice(x,1):y.children[x]={type:"text",value:b.value},x;if(b.type==="element"){let v;for(v in ph)if(Object.hasOwn(ph,v)&&Object.hasOwn(b.properties,v)){const _=b.properties[v],E=ph[v];(E===null||E.includes(b.tagName))&&(b.properties[v]=h(String(_||""),v,b))}}if(b.type==="element"){let v=r?!r.includes(b.tagName):o?o.includes(b.tagName):!1;if(!v&&a&&typeof x=="number"&&(v=!a(b,x,y)),v&&y&&typeof x=="number")return d&&b.children?y.children.splice(x,1,...b.children):y.children.splice(x,1),x}}}function pD(e){const n=e.indexOf(":"),r=e.indexOf("?"),a=e.indexOf("#"),l=e.indexOf("/");return n===-1||l!==-1&&n>l||r!==-1&&n>r||a!==-1&&n>a||cD.test(e.slice(0,n))?e:""}function Ry(e,n){const r=String(e);if(typeof n!="string")throw new TypeError("Expected character");let a=0,l=r.indexOf(n);for(;l!==-1;)a++,l=r.indexOf(n,l+n.length);return a}function gD(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function bD(e,n,r){const l=No((r||{}).ignore||[]),o=xD(n);let u=-1;for(;++u<o.length;)xk(e,"text",d);function d(m,b){let x=-1,y;for(;++x<b.length;){const v=b[x],_=y?y.children:void 0;if(l(v,_?_.indexOf(v):void 0,y))return;y=v}if(y)return h(m,b)}function h(m,b){const x=b[b.length-1],y=o[u][0],v=o[u][1];let _=0;const w=x.children.indexOf(m);let N=!1,M=[];y.lastIndex=0;let R=y.exec(m.value);for(;R;){const U=R.index,$={index:R.index,input:R.input,stack:[...b,m]};let j=v(...R,$);if(typeof j=="string"&&(j=j.length>0?{type:"text",value:j}:void 0),j===!1?y.lastIndex=U+1:(_!==U&&M.push({type:"text",value:m.value.slice(_,U)}),Array.isArray(j)?M.push(...j):j&&M.push(j),_=U+R[0].length,N=!0),!y.global)break;R=y.exec(m.value)}return N?(_<m.value.length&&M.push({type:"text",value:m.value.slice(_)}),x.children.splice(w,1,...M)):M=[m],w+M.length}}function xD(e){const n=[];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];n.push([yD(l[0]),vD(l[1])])}return n}function yD(e){return typeof e=="string"?new RegExp(gD(e),"g"):e}function vD(e){return typeof e=="function"?e:function(){return e}}const Nh="phrasing",zh=["autolink","link","image","label"];function kD(){return{transforms:[CD],enter:{literalAutolink:ED,literalAutolinkEmail:Ch,literalAutolinkHttp:Ch,literalAutolinkWww:Ch},exit:{literalAutolink:zD,literalAutolinkEmail:ND,literalAutolinkHttp:wD,literalAutolinkWww:SD}}}function _D(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Nh,notInConstruct:zh},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Nh,notInConstruct:zh},{character:":",before:"[ps]",after:"\\/",inConstruct:Nh,notInConstruct:zh}]}}function ED(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Ch(e){this.config.enter.autolinkProtocol.call(this,e)}function wD(e){this.config.exit.autolinkProtocol.call(this,e)}function SD(e){this.config.exit.data.call(this,e);const n=this.stack[this.stack.length-1];n.type,n.url="http://"+this.sliceSerialize(e)}function ND(e){this.config.exit.autolinkEmail.call(this,e)}function zD(e){this.exit(e)}function CD(e){bD(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,TD],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,RD]],{ignore:["link","linkReference"]})}function TD(e,n,r,a,l){let o="";if(!vk(l)||(/^w/i.test(n)&&(r=n+r,n="",o="http://"),!AD(r)))return!1;const u=OD(r+a);if(!u[0])return!1;const d={type:"link",title:null,url:o+n+u[0],children:[{type:"text",value:n+u[0]}]};return u[1]?[d,{type:"text",value:u[1]}]:d}function RD(e,n,r,a){return!vk(a,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+n+"@"+r,children:[{type:"text",value:n+"@"+r}]}}function AD(e){const n=e.split(".");return!(n.length<2||n[n.length-1]&&(/_/.test(n[n.length-1])||!/[a-zA-Z\d]/.test(n[n.length-1]))||n[n.length-2]&&(/_/.test(n[n.length-2])||!/[a-zA-Z\d]/.test(n[n.length-2])))}function OD(e){const n=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let r=n[0],a=r.indexOf(")");const l=Ry(e,"(");let o=Ry(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 vk(e,n){const r=e.input.charCodeAt(e.index-1);return(e.index===0||qa(r)||Uu(r))&&(!n||r!==47)}kk.peek=PD;function MD(){this.buffer()}function DD(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function jD(){this.buffer()}function LD(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function ID(e){const n=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=Fr(this.sliceSerialize(e)).toLowerCase(),r.label=n}function BD(e){this.exit(e)}function UD(e){const n=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=Fr(this.sliceSerialize(e)).toLowerCase(),r.label=n}function FD(e){this.exit(e)}function PD(){return"["}function kk(e,n,r,a){const l=r.createTracker(a);let o=l.move("[^");const u=r.enter("footnoteReference"),d=r.enter("reference");return o+=l.move(r.safe(r.associationId(e),{after:"]",before:o})),d(),u(),o+=l.move("]"),o}function HD(){return{enter:{gfmFootnoteCallString:MD,gfmFootnoteCall:DD,gfmFootnoteDefinitionLabelString:jD,gfmFootnoteDefinition:LD},exit:{gfmFootnoteCallString:ID,gfmFootnoteCall:BD,gfmFootnoteDefinitionLabelString:UD,gfmFootnoteDefinition:FD}}}function qD(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:r,footnoteReference:kk},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(a,l,o,u){const d=o.createTracker(u);let h=d.move("[^");const m=o.enter("footnoteDefinition"),b=o.enter("label");return h+=d.move(o.safe(o.associationId(a),{before:h,after:"]"})),b(),h+=d.move("]:"),a.children&&a.children.length>0&&(d.shift(4),h+=d.move((n?`
516
- `:" ")+o.indentLines(o.containerFlow(a,d.current()),n?_k:$D))),m(),h}}function $D(e,n,r){return n===0?e:_k(e,n,r)}function _k(e,n,r){return(r?"":" ")+e}const GD=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Ek.peek=XD;function KD(){return{canContainEols:["delete"],enter:{strikethrough:YD},exit:{strikethrough:QD}}}function VD(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:GD}],handlers:{delete:Ek}}}function YD(e){this.enter({type:"delete",children:[]},e)}function QD(e){this.exit(e)}function Ek(e,n,r,a){const l=r.createTracker(a),o=r.enter("strikethrough");let u=l.move("~~");return u+=r.containerPhrasing(e,{...l.current(),before:u,after:"~"}),u+=l.move("~~"),o(),u}function XD(){return"~"}function ZD(e){return e.length}function WD(e,n){const r=n||{},a=(r.align||[]).concat(),l=r.stringLength||ZD,o=[],u=[],d=[],h=[];let m=0,b=-1;for(;++b<e.length;){const E=[],w=[];let N=-1;for(e[b].length>m&&(m=e[b].length);++N<e[b].length;){const M=JD(e[b][N]);if(r.alignDelimiters!==!1){const R=l(M);w[N]=R,(h[N]===void 0||R>h[N])&&(h[N]=R)}E.push(M)}u[b]=E,d[b]=w}let x=-1;if(typeof a=="object"&&"length"in a)for(;++x<m;)o[x]=Ay(a[x]);else{const E=Ay(a);for(;++x<m;)o[x]=E}x=-1;const y=[],v=[];for(;++x<m;){const E=o[x];let w="",N="";E===99?(w=":",N=":"):E===108?w=":":E===114&&(N=":");let M=r.alignDelimiters===!1?1:Math.max(1,h[x]-w.length-N.length);const R=w+"-".repeat(M)+N;r.alignDelimiters!==!1&&(M=w.length+M+N.length,M>h[x]&&(h[x]=M),v[x]=M),y[x]=R}u.splice(1,0,y),d.splice(1,0,v),b=-1;const _=[];for(;++b<u.length;){const E=u[b],w=d[b];x=-1;const N=[];for(;++x<m;){const M=E[x]||"";let R="",U="";if(r.alignDelimiters!==!1){const $=h[x]-(w[x]||0),j=o[x];j===114?R=" ".repeat($):j===99?$%2?(R=" ".repeat($/2+.5),U=" ".repeat($/2-.5)):(R=" ".repeat($/2),U=R):U=" ".repeat($)}r.delimiterStart!==!1&&!x&&N.push("|"),r.padding!==!1&&!(r.alignDelimiters===!1&&M==="")&&(r.delimiterStart!==!1||x)&&N.push(" "),r.alignDelimiters!==!1&&N.push(R),N.push(M),r.alignDelimiters!==!1&&N.push(U),r.padding!==!1&&N.push(" "),(r.delimiterEnd!==!1||x!==m-1)&&N.push("|")}_.push(r.delimiterEnd===!1?N.join("").replace(/ +$/,""):N.join(""))}return _.join(`
517
- `)}function JD(e){return e==null?"":String(e)}function Ay(e){const n=typeof e=="string"?e.codePointAt(0):0;return n===67||n===99?99:n===76||n===108?108:n===82||n===114?114:0}function e3(e,n,r,a){const l=r.enter("blockquote"),o=r.createTracker(a);o.move("> "),o.shift(2);const u=r.indentLines(r.containerFlow(e,o.current()),t3);return l(),u}function t3(e,n,r){return">"+(r?"":" ")+e}function n3(e,n){return Oy(e,n.inConstruct,!0)&&!Oy(e,n.notInConstruct,!1)}function Oy(e,n,r){if(typeof n=="string"&&(n=[n]),!n||n.length===0)return r;let a=-1;for(;++a<n.length;)if(e.includes(n[a]))return!0;return!1}function My(e,n,r,a){let l=-1;for(;++l<r.unsafe.length;)if(r.unsafe[l].character===`
518
- `&&n3(r.stack,r.unsafe[l]))return/[ \t]/.test(a.before)?"":" ";return`\\
519
- `}function r3(e,n){const r=String(e);let a=r.indexOf(n),l=a,o=0,u=0;if(typeof n!="string")throw new TypeError("Expected substring");for(;a!==-1;)a===l?++o>u&&(u=o):o=1,l=a+n.length,a=r.indexOf(n,l);return u}function i3(e,n){return!!(n.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function a3(e){const n=e.options.fence||"`";if(n!=="`"&&n!=="~")throw new Error("Cannot serialize code with `"+n+"` for `options.fence`, expected `` ` `` or `~`");return n}function s3(e,n,r,a){const l=a3(r),o=e.value||"",u=l==="`"?"GraveAccent":"Tilde";if(i3(e,r)){const x=r.enter("codeIndented"),y=r.indentLines(o,l3);return x(),y}const d=r.createTracker(a),h=l.repeat(Math.max(r3(o,l)+1,3)),m=r.enter("codeFenced");let b=d.move(h);if(e.lang){const x=r.enter(`codeFencedLang${u}`);b+=d.move(r.safe(e.lang,{before:b,after:" ",encode:["`"],...d.current()})),x()}if(e.lang&&e.meta){const x=r.enter(`codeFencedMeta${u}`);b+=d.move(" "),b+=d.move(r.safe(e.meta,{before:b,after:`
520
- `,encode:["`"],...d.current()})),x()}return b+=d.move(`
521
- `),o&&(b+=d.move(o+`
522
- `)),b+=d.move(h),m(),b}function l3(e,n,r){return(r?"":" ")+e}function Jm(e){const n=e.options.quote||'"';if(n!=='"'&&n!=="'")throw new Error("Cannot serialize title with `"+n+"` for `options.quote`, expected `\"`, or `'`");return n}function o3(e,n,r,a){const l=Jm(r),o=l==='"'?"Quote":"Apostrophe",u=r.enter("definition");let d=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("]: "),d(),!e.url||/[\0- \u007F]/.test(e.url)?(d=r.enter("destinationLiteral"),m+=h.move("<"),m+=h.move(r.safe(e.url,{before:m,after:">",...h.current()})),m+=h.move(">")):(d=r.enter("destinationRaw"),m+=h.move(r.safe(e.url,{before:m,after:e.title?" ":`
523
- `,...h.current()}))),d(),e.title&&(d=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),d()),u(),m}function c3(e){const n=e.options.emphasis||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize emphasis with `"+n+"` for `options.emphasis`, expected `*`, or `_`");return n}function xo(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Eu(e,n,r){const a=Ps(e),l=Ps(n);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}}wk.peek=u3;function wk(e,n,r,a){const l=c3(r),o=r.enter("emphasis"),u=r.createTracker(a),d=u.move(l);let h=u.move(r.containerPhrasing(e,{after:l,before:d,...u.current()}));const m=h.charCodeAt(0),b=Eu(a.before.charCodeAt(a.before.length-1),m,l);b.inside&&(h=xo(m)+h.slice(1));const x=h.charCodeAt(h.length-1),y=Eu(a.after.charCodeAt(0),x,l);y.inside&&(h=h.slice(0,-1)+xo(x));const v=u.move(l);return o(),r.attentionEncodeSurroundingInfo={after:y.outside,before:b.outside},d+h+v}function u3(e,n,r){return r.options.emphasis||"*"}function d3(e,n){let r=!1;return qu(e,function(a){if("value"in a&&/\r?\n|\r/.test(a.value)||a.type==="break")return r=!0,rm}),!!((!e.depth||e.depth<3)&&Gm(e)&&(n.options.setext||r))}function f3(e,n,r,a){const l=Math.max(Math.min(6,e.depth||1),1),o=r.createTracker(a);if(d3(e,r)){const b=r.enter("headingSetext"),x=r.enter("phrasing"),y=r.containerPhrasing(e,{...o.current(),before:`
524
- `,after:`
525
- `});return x(),b(),y+`
526
- `+(l===1?"=":"-").repeat(y.length-(Math.max(y.lastIndexOf("\r"),y.lastIndexOf(`
527
- `))+1))}const u="#".repeat(l),d=r.enter("headingAtx"),h=r.enter("phrasing");o.move(u+" ");let m=r.containerPhrasing(e,{before:"# ",after:`
528
- `,...o.current()});return/^[\t ]/.test(m)&&(m=xo(m.charCodeAt(0))+m.slice(1)),m=m?u+" "+m:u,r.options.closeAtx&&(m+=" "+u),h(),d(),m}Sk.peek=h3;function Sk(e){return e.value||""}function h3(){return"<"}Nk.peek=m3;function Nk(e,n,r,a){const l=Jm(r),o=l==='"'?"Quote":"Apostrophe",u=r.enter("image");let d=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("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=r.enter("destinationLiteral"),m+=h.move("<"),m+=h.move(r.safe(e.url,{before:m,after:">",...h.current()})),m+=h.move(">")):(d=r.enter("destinationRaw"),m+=h.move(r.safe(e.url,{before:m,after:e.title?" ":")",...h.current()}))),d(),e.title&&(d=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),d()),m+=h.move(")"),u(),m}function m3(){return"!"}zk.peek=p3;function zk(e,n,r,a){const l=e.referenceType,o=r.enter("imageReference");let u=r.enter("label");const d=r.createTracker(a);let h=d.move("![");const m=r.safe(e.alt,{before:h,after:"]",...d.current()});h+=d.move(m+"]["),u();const b=r.stack;r.stack=[],u=r.enter("reference");const x=r.safe(r.associationId(e),{before:h,after:"]",...d.current()});return u(),r.stack=b,o(),l==="full"||!m||m!==x?h+=d.move(x+"]"):l==="shortcut"?h=h.slice(0,-1):h+=d.move("]"),h}function p3(){return"!"}Ck.peek=g3;function Ck(e,n,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 u=r.unsafe[o],d=r.compilePattern(u);let h;if(u.atBreak)for(;h=d.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 g3(){return"`"}function Tk(e,n){const r=Gm(e);return!!(!n.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))}Rk.peek=b3;function Rk(e,n,r,a){const l=Jm(r),o=l==='"'?"Quote":"Apostrophe",u=r.createTracker(a);let d,h;if(Tk(e,r)){const b=r.stack;r.stack=[],d=r.enter("autolink");let x=u.move("<");return x+=u.move(r.containerPhrasing(e,{before:x,after:">",...u.current()})),x+=u.move(">"),d(),r.stack=b,x}d=r.enter("link"),h=r.enter("label");let m=u.move("[");return m+=u.move(r.containerPhrasing(e,{before:m,after:"](",...u.current()})),m+=u.move("]("),h(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(h=r.enter("destinationLiteral"),m+=u.move("<"),m+=u.move(r.safe(e.url,{before:m,after:">",...u.current()})),m+=u.move(">")):(h=r.enter("destinationRaw"),m+=u.move(r.safe(e.url,{before:m,after:e.title?" ":")",...u.current()}))),h(),e.title&&(h=r.enter(`title${o}`),m+=u.move(" "+l),m+=u.move(r.safe(e.title,{before:m,after:l,...u.current()})),m+=u.move(l),h()),m+=u.move(")"),d(),m}function b3(e,n,r){return Tk(e,r)?"<":"["}Ak.peek=x3;function Ak(e,n,r,a){const l=e.referenceType,o=r.enter("linkReference");let u=r.enter("label");const d=r.createTracker(a);let h=d.move("[");const m=r.containerPhrasing(e,{before:h,after:"]",...d.current()});h+=d.move(m+"]["),u();const b=r.stack;r.stack=[],u=r.enter("reference");const x=r.safe(r.associationId(e),{before:h,after:"]",...d.current()});return u(),r.stack=b,o(),l==="full"||!m||m!==x?h+=d.move(x+"]"):l==="shortcut"?h=h.slice(0,-1):h+=d.move("]"),h}function x3(){return"["}function ep(e){const n=e.options.bullet||"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bullet`, expected `*`, `+`, or `-`");return n}function y3(e){const n=ep(e),r=e.options.bulletOther;if(!r)return n==="*"?"-":"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===n)throw new Error("Expected `bullet` (`"+n+"`) and `bulletOther` (`"+r+"`) to be different");return r}function v3(e){const n=e.options.bulletOrdered||".";if(n!=="."&&n!==")")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOrdered`, expected `.` or `)`");return n}function Ok(e){const n=e.options.rule||"*";if(n!=="*"&&n!=="-"&&n!=="_")throw new Error("Cannot serialize rules with `"+n+"` for `options.rule`, expected `*`, `-`, or `_`");return n}function k3(e,n,r,a){const l=r.enter("list"),o=r.bulletCurrent;let u=e.ordered?v3(r):ep(r);const d=e.ordered?u==="."?")":".":y3(r);let h=n&&r.bulletLastUsed?u===r.bulletLastUsed:!1;if(!e.ordered){const b=e.children?e.children[0]:void 0;if((u==="*"||u==="-")&&b&&(!b.children||!b.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),Ok(r)===u&&b){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&&(u=d),r.bulletCurrent=u;const m=r.containerFlow(e,a);return r.bulletLastUsed=u,r.bulletCurrent=o,l(),m}function _3(e){const n=e.options.listItemIndent||"one";if(n!=="tab"&&n!=="one"&&n!=="mixed")throw new Error("Cannot serialize items with `"+n+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return n}function E3(e,n,r,a){const l=_3(r);let o=r.bulletCurrent||ep(r);n&&n.type==="list"&&n.ordered&&(o=(typeof n.start=="number"&&n.start>-1?n.start:1)+(r.options.incrementListMarker===!1?0:n.children.indexOf(e))+o);let u=o.length+1;(l==="tab"||l==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(u=Math.ceil(u/4)*4);const d=r.createTracker(a);d.move(o+" ".repeat(u-o.length)),d.shift(u);const h=r.enter("listItem"),m=r.indentLines(r.containerFlow(e,d.current()),b);return h(),m;function b(x,y,v){return y?(v?"":" ".repeat(u))+x:(v?o:o+" ".repeat(u-o.length))+x}}function w3(e,n,r,a){const l=r.enter("paragraph"),o=r.enter("phrasing"),u=r.containerPhrasing(e,a);return o(),l(),u}const S3=No(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function N3(e,n,r,a){return(e.children.some(function(u){return S3(u)})?r.containerPhrasing:r.containerFlow).call(r,e,a)}function z3(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}Mk.peek=C3;function Mk(e,n,r,a){const l=z3(r),o=r.enter("strong"),u=r.createTracker(a),d=u.move(l+l);let h=u.move(r.containerPhrasing(e,{after:l,before:d,...u.current()}));const m=h.charCodeAt(0),b=Eu(a.before.charCodeAt(a.before.length-1),m,l);b.inside&&(h=xo(m)+h.slice(1));const x=h.charCodeAt(h.length-1),y=Eu(a.after.charCodeAt(0),x,l);y.inside&&(h=h.slice(0,-1)+xo(x));const v=u.move(l+l);return o(),r.attentionEncodeSurroundingInfo={after:y.outside,before:b.outside},d+h+v}function C3(e,n,r){return r.options.strong||"*"}function T3(e,n,r,a){return r.safe(e.value,a)}function R3(e){const n=e.options.ruleRepetition||3;if(n<3)throw new Error("Cannot serialize rules with repetition `"+n+"` for `options.ruleRepetition`, expected `3` or more");return n}function A3(e,n,r){const a=(Ok(r)+(r.options.ruleSpaces?" ":"")).repeat(R3(r));return r.options.ruleSpaces?a.slice(0,-1):a}const Dk={blockquote:e3,break:My,code:s3,definition:o3,emphasis:wk,hardBreak:My,heading:f3,html:Sk,image:Nk,imageReference:zk,inlineCode:Ck,link:Rk,linkReference:Ak,list:k3,listItem:E3,paragraph:w3,root:N3,strong:Mk,text:T3,thematicBreak:A3};function O3(){return{enter:{table:M3,tableData:Dy,tableHeader:Dy,tableRow:j3},exit:{codeText:L3,table:D3,tableData:Th,tableHeader:Th,tableRow:Th}}}function M3(e){const n=e._align;this.enter({type:"table",align:n.map(function(r){return r==="none"?null:r}),children:[]},e),this.data.inTable=!0}function D3(e){this.exit(e),this.data.inTable=void 0}function j3(e){this.enter({type:"tableRow",children:[]},e)}function Th(e){this.exit(e)}function Dy(e){this.enter({type:"tableCell",children:[]},e)}function L3(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,I3));const r=this.stack[this.stack.length-1];r.type,r.value=n,this.exit(e)}function I3(e,n){return n==="|"?n:e}function B3(e){const n=e||{},r=n.tableCellPadding,a=n.tablePipeAlign,l=n.stringLength,o=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
529
- `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:y,table:u,tableCell:h,tableRow:d}};function u(v,_,E,w){return m(b(v,E,w),v.align)}function d(v,_,E,w){const N=x(v,E,w),M=m([N]);return M.slice(0,M.indexOf(`
530
- `))}function h(v,_,E,w){const N=E.enter("tableCell"),M=E.enter("phrasing"),R=E.containerPhrasing(v,{...w,before:o,after:o});return M(),N(),R}function m(v,_){return WD(v,{align:_,alignDelimiters:a,padding:r,stringLength:l})}function b(v,_,E){const w=v.children;let N=-1;const M=[],R=_.enter("table");for(;++N<w.length;)M[N]=x(w[N],_,E);return R(),M}function x(v,_,E){const w=v.children;let N=-1;const M=[],R=_.enter("tableRow");for(;++N<w.length;)M[N]=h(w[N],v,_,E);return R(),M}function y(v,_,E){let w=Dk.inlineCode(v,_,E);return E.stack.includes("tableCell")&&(w=w.replace(/\|/g,"\\$&")),w}}function U3(){return{exit:{taskListCheckValueChecked:jy,taskListCheckValueUnchecked:jy,paragraph:P3}}}function F3(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:H3}}}function jy(e){const n=this.stack[this.stack.length-2];n.type,n.checked=e.type==="taskListCheckValueChecked"}function P3(e){const n=this.stack[this.stack.length-2];if(n&&n.type==="listItem"&&typeof n.checked=="boolean"){const r=this.stack[this.stack.length-1];r.type;const a=r.children[0];if(a&&a.type==="text"){const l=n.children;let o=-1,u;for(;++o<l.length;){const d=l[o];if(d.type==="paragraph"){u=d;break}}u===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 H3(e,n,r,a){const l=e.children[0],o=typeof e.checked=="boolean"&&l&&l.type==="paragraph",u="["+(e.checked?"x":" ")+"] ",d=r.createTracker(a);o&&d.move(u);let h=Dk.listItem(e,n,r,{...a,...d.current()});return o&&(h=h.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,m)),h;function m(b){return b+u}}function q3(){return[kD(),HD(),KD(),O3(),U3()]}function $3(e){return{extensions:[_D(),qD(e),VD(),B3(e),F3()]}}const G3={tokenize:Z3,partial:!0},jk={tokenize:W3,partial:!0},Lk={tokenize:J3,partial:!0},Ik={tokenize:ej,partial:!0},K3={tokenize:tj,partial:!0},Bk={name:"wwwAutolink",tokenize:Q3,previous:Fk},Uk={name:"protocolAutolink",tokenize:X3,previous:Pk},Ti={name:"emailAutolink",tokenize:Y3,previous:Hk},ti={};function V3(){return{text:ti}}let La=48;for(;La<123;)ti[La]=Ti,La++,La===58?La=65:La===91&&(La=97);ti[43]=Ti;ti[45]=Ti;ti[46]=Ti;ti[95]=Ti;ti[72]=[Ti,Uk];ti[104]=[Ti,Uk];ti[87]=[Ti,Bk];ti[119]=[Ti,Bk];function Y3(e,n,r){const a=this;let l,o;return u;function u(x){return!lm(x)||!Hk.call(a,a.previous)||tp(a.events)?r(x):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),d(x))}function d(x){return lm(x)?(e.consume(x),d):x===64?(e.consume(x),h):r(x)}function h(x){return x===46?e.check(K3,b,m)(x):x===45||x===95||Un(x)?(o=!0,e.consume(x),h):b(x)}function m(x){return e.consume(x),l=!0,h}function b(x){return o&&l&&Gn(a.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),n(x)):r(x)}}function Q3(e,n,r){const a=this;return l;function l(u){return u!==87&&u!==119||!Fk.call(a,a.previous)||tp(a.events)?r(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(G3,e.attempt(jk,e.attempt(Lk,o),r),r)(u))}function o(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),n(u)}}function X3(e,n,r){const a=this;let l="",o=!1;return u;function u(x){return(x===72||x===104)&&Pk.call(a,a.previous)&&!tp(a.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),l+=String.fromCodePoint(x),e.consume(x),d):r(x)}function d(x){if(Gn(x)&&l.length<5)return l+=String.fromCodePoint(x),e.consume(x),d;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||vu(x)||Ht(x)||qa(x)||Uu(x)?r(x):e.attempt(jk,e.attempt(Lk,b),r)(x)}function b(x){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),n(x)}}function Z3(e,n,r){let a=0;return l;function l(u){return(u===87||u===119)&&a<3?(a++,e.consume(u),l):u===46&&a===3?(e.consume(u),o):r(u)}function o(u){return u===null?r(u):n(u)}}function W3(e,n,r){let a,l,o;return u;function u(m){return m===46||m===95?e.check(Ik,h,d)(m):m===null||Ht(m)||qa(m)||m!==45&&Uu(m)?h(m):(o=!0,e.consume(m),u)}function d(m){return m===95?a=!0:(l=a,a=void 0),e.consume(m),u}function h(m){return l||a||!o?r(m):n(m)}}function J3(e,n){let r=0,a=0;return l;function l(u){return u===40?(r++,e.consume(u),l):u===41&&a<r?o(u):u===33||u===34||u===38||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===60||u===63||u===93||u===95||u===126?e.check(Ik,n,o)(u):u===null||Ht(u)||qa(u)?n(u):(e.consume(u),l)}function o(u){return u===41&&a++,e.consume(u),l}}function ej(e,n,r){return a;function a(d){return d===33||d===34||d===39||d===41||d===42||d===44||d===46||d===58||d===59||d===63||d===95||d===126?(e.consume(d),a):d===38?(e.consume(d),o):d===93?(e.consume(d),l):d===60||d===null||Ht(d)||qa(d)?n(d):r(d)}function l(d){return d===null||d===40||d===91||Ht(d)||qa(d)?n(d):a(d)}function o(d){return Gn(d)?u(d):r(d)}function u(d){return d===59?(e.consume(d),a):Gn(d)?(e.consume(d),u):r(d)}}function tj(e,n,r){return a;function a(o){return e.consume(o),l}function l(o){return Un(o)?r(o):n(o)}}function Fk(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Ht(e)}function Pk(e){return!Gn(e)}function Hk(e){return!(e===47||lm(e))}function lm(e){return e===43||e===45||e===46||e===95||Un(e)}function tp(e){let n=e.length,r=!1;for(;n--;){const a=e[n][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 nj={tokenize:uj,partial:!0};function rj(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:lj,continuation:{tokenize:oj},exit:cj}},text:{91:{name:"gfmFootnoteCall",tokenize:sj},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:ij,resolveTo:aj}}}}function ij(e,n,r){const a=this;let l=a.events.length;const o=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let u;for(;l--;){const h=a.events[l][1];if(h.type==="labelImage"){u=h;break}if(h.type==="gfmFootnoteCall"||h.type==="labelLink"||h.type==="label"||h.type==="image"||h.type==="link")break}return d;function d(h){if(!u||!u._balanced)return r(h);const m=Fr(a.sliceSerialize({start:u.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"),n(h))}}function aj(e,n){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)},u={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},d=[e[r+1],e[r+2],["enter",a,n],e[r+3],e[r+4],["enter",l,n],["exit",l,n],["enter",o,n],["enter",u,n],["exit",u,n],["exit",o,n],e[e.length-2],e[e.length-1],["exit",a,n]];return e.splice(r,e.length-r+1,...d),e}function sj(e,n,r){const a=this,l=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let o=0,u;return d;function d(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&&!u||x===null||x===91||Ht(x))return r(x);if(x===93){e.exit("chunkString");const y=e.exit("gfmFootnoteCallString");return l.includes(Fr(a.sliceSerialize(y)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(x),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):r(x)}return Ht(x)||(u=!0),o++,e.consume(x),x===92?b:m}function b(x){return x===91||x===92||x===93?(e.consume(x),o++,m):m(x)}}function lj(e,n,r){const a=this,l=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let o,u=0,d;return h;function h(_){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionLabelMarker"),m}function m(_){return _===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",b):r(_)}function b(_){if(u>999||_===93&&!d||_===null||_===91||Ht(_))return r(_);if(_===93){e.exit("chunkString");const E=e.exit("gfmFootnoteDefinitionLabelString");return o=Fr(a.sliceSerialize(E)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),y}return Ht(_)||(d=!0),u++,e.consume(_),_===92?x:b}function x(_){return _===91||_===92||_===93?(e.consume(_),u++,b):b(_)}function y(_){return _===58?(e.enter("definitionMarker"),e.consume(_),e.exit("definitionMarker"),l.includes(o)||l.push(o),Et(e,v,"gfmFootnoteDefinitionWhitespace")):r(_)}function v(_){return n(_)}}function oj(e,n,r){return e.check(So,n,e.attempt(nj,n,r))}function cj(e){e.exit("gfmFootnoteDefinition")}function uj(e,n,r){const a=this;return Et(e,l,"gfmFootnoteDefinitionIndent",5);function l(o){const u=a.events[a.events.length-1];return u&&u[1].type==="gfmFootnoteDefinitionIndent"&&u[2].sliceSerialize(u[1],!0).length===4?n(o):r(o)}}function dj(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(u,d){let h=-1;for(;++h<u.length;)if(u[h][0]==="enter"&&u[h][1].type==="strikethroughSequenceTemporary"&&u[h][1]._close){let m=h;for(;m--;)if(u[m][0]==="exit"&&u[m][1].type==="strikethroughSequenceTemporary"&&u[m][1]._open&&u[h][1].end.offset-u[h][1].start.offset===u[m][1].end.offset-u[m][1].start.offset){u[h][1].type="strikethroughSequence",u[m][1].type="strikethroughSequence";const b={type:"strikethrough",start:Object.assign({},u[m][1].start),end:Object.assign({},u[h][1].end)},x={type:"strikethroughText",start:Object.assign({},u[m][1].end),end:Object.assign({},u[h][1].start)},y=[["enter",b,d],["enter",u[m][1],d],["exit",u[m][1],d],["enter",x,d]],v=d.parser.constructs.insideSpan.null;v&&pr(y,y.length,0,Fu(v,u.slice(m+1,h),d)),pr(y,y.length,0,[["exit",x,d],["enter",u[h][1],d],["exit",u[h][1],d],["exit",b,d]]),pr(u,m-1,h-m+3,y),h=m+y.length-2;break}}for(h=-1;++h<u.length;)u[h][1].type==="strikethroughSequenceTemporary"&&(u[h][1].type="data");return u}function o(u,d,h){const m=this.previous,b=this.events;let x=0;return y;function y(_){return m===126&&b[b.length-1][1].type!=="characterEscape"?h(_):(u.enter("strikethroughSequenceTemporary"),v(_))}function v(_){const E=Ps(m);if(_===126)return x>1?h(_):(u.consume(_),x++,v);if(x<2&&!r)return h(_);const w=u.exit("strikethroughSequenceTemporary"),N=Ps(_);return w._open=!N||N===2&&!!E,w._close=!E||E===2&&!!N,d(_)}}}class fj{constructor(){this.map=[]}add(n,r,a){hj(this,n,r,a)}consume(n){if(this.map.sort(function(o,u){return o[0]-u[0]}),this.map.length===0)return;let r=this.map.length;const a=[];for(;r>0;)r-=1,a.push(n.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),n.length=this.map[r][0];a.push(n.slice()),n.length=0;let l=a.pop();for(;l;){for(const o of l)n.push(o);l=a.pop()}this.map.length=0}}function hj(e,n,r,a){let l=0;if(!(r===0&&a.length===0)){for(;l<e.map.length;){if(e.map[l][0]===n){e.map[l][1]+=r,e.map[l][2].push(...a);return}l+=1}e.map.push([n,r,a])}}function mj(e,n){let r=!1;const a=[];for(;n<e.length;){const l=e[n];if(r){if(l[0]==="enter")l[1].type==="tableContent"&&a.push(e[n+1][1].type==="tableDelimiterMarker"?"left":"none");else if(l[1].type==="tableContent"){if(e[n-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);n+=1}return a}function pj(){return{flow:{null:{name:"table",tokenize:gj,resolveAll:bj}}}}function gj(e,n,r){const a=this;let l=0,o=0,u;return d;function d(H){let te=a.events.length-1;for(;te>-1;){const oe=a.events[te][1].type;if(oe==="lineEnding"||oe==="linePrefix")te--;else break}const ee=te>-1?a.events[te][1].type:null,ve=ee==="tableHead"||ee==="tableRow"?j:h;return ve===j&&a.parser.lazy[a.now().line]?r(H):ve(H)}function h(H){return e.enter("tableHead"),e.enter("tableRow"),m(H)}function m(H){return H===124||(u=!0,o+=1),b(H)}function b(H){return H===null?r(H):qe(H)?o>1?(o=0,a.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(H),e.exit("lineEnding"),v):r(H):ft(H)?Et(e,b,"whitespace")(H):(o+=1,u&&(u=!1,l+=1),H===124?(e.enter("tableCellDivider"),e.consume(H),e.exit("tableCellDivider"),u=!0,b):(e.enter("data"),x(H)))}function x(H){return H===null||H===124||Ht(H)?(e.exit("data"),b(H)):(e.consume(H),H===92?y:x)}function y(H){return H===92||H===124?(e.consume(H),x):x(H)}function v(H){return a.interrupt=!1,a.parser.lazy[a.now().line]?r(H):(e.enter("tableDelimiterRow"),u=!1,ft(H)?Et(e,_,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(H):_(H))}function _(H){return H===45||H===58?w(H):H===124?(u=!0,e.enter("tableCellDivider"),e.consume(H),e.exit("tableCellDivider"),E):$(H)}function E(H){return ft(H)?Et(e,w,"whitespace")(H):w(H)}function w(H){return H===58?(o+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume(H),e.exit("tableDelimiterMarker"),N):H===45?(o+=1,N(H)):H===null||qe(H)?U(H):$(H)}function N(H){return H===45?(e.enter("tableDelimiterFiller"),M(H)):$(H)}function M(H){return H===45?(e.consume(H),M):H===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(H),e.exit("tableDelimiterMarker"),R):(e.exit("tableDelimiterFiller"),R(H))}function R(H){return ft(H)?Et(e,U,"whitespace")(H):U(H)}function U(H){return H===124?_(H):H===null||qe(H)?!u||l!==o?$(H):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(H)):$(H)}function $(H){return r(H)}function j(H){return e.enter("tableRow"),J(H)}function J(H){return H===124?(e.enter("tableCellDivider"),e.consume(H),e.exit("tableCellDivider"),J):H===null||qe(H)?(e.exit("tableRow"),n(H)):ft(H)?Et(e,J,"whitespace")(H):(e.enter("data"),A(H))}function A(H){return H===null||H===124||Ht(H)?(e.exit("data"),J(H)):(e.consume(H),H===92?ae:A)}function ae(H){return H===92||H===124?(e.consume(H),A):A(H)}}function bj(e,n){let r=-1,a=!0,l=0,o=[0,0,0,0],u=[0,0,0,0],d=!1,h=0,m,b,x;const y=new fj;for(;++r<e.length;){const v=e[r],_=v[1];v[0]==="enter"?_.type==="tableHead"?(d=!1,h!==0&&(Ly(y,n,h,m,b),b=void 0,h=0),m={type:"table",start:Object.assign({},_.start),end:Object.assign({},_.end)},y.add(r,0,[["enter",m,n]])):_.type==="tableRow"||_.type==="tableDelimiterRow"?(a=!0,x=void 0,o=[0,0,0,0],u=[0,r+1,0,0],d&&(d=!1,b={type:"tableBody",start:Object.assign({},_.start),end:Object.assign({},_.end)},y.add(r,0,[["enter",b,n]])),l=_.type==="tableDelimiterRow"?2:b?3:1):l&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")?(a=!1,u[2]===0&&(o[1]!==0&&(u[0]=u[1],x=Zc(y,n,o,l,void 0,x),o=[0,0,0,0]),u[2]=r)):_.type==="tableCellDivider"&&(a?a=!1:(o[1]!==0&&(u[0]=u[1],x=Zc(y,n,o,l,void 0,x)),o=u,u=[o[1],r,0,0])):_.type==="tableHead"?(d=!0,h=r):_.type==="tableRow"||_.type==="tableDelimiterRow"?(h=r,o[1]!==0?(u[0]=u[1],x=Zc(y,n,o,l,r,x)):u[1]!==0&&(x=Zc(y,n,u,l,r,x)),l=0):l&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")&&(u[3]=r)}for(h!==0&&Ly(y,n,h,m,b),y.consume(n.events),r=-1;++r<n.events.length;){const v=n.events[r];v[0]==="enter"&&v[1].type==="table"&&(v[1]._align=mj(n.events,r))}return e}function Zc(e,n,r,a,l,o){const u=a===1?"tableHeader":a===2?"tableDelimiter":"tableData",d="tableContent";r[0]!==0&&(o.end=Object.assign({},Ms(n.events,r[0])),e.add(r[0],0,[["exit",o,n]]));const h=Ms(n.events,r[1]);if(o={type:u,start:Object.assign({},h),end:Object.assign({},h)},e.add(r[1],0,[["enter",o,n]]),r[2]!==0){const m=Ms(n.events,r[2]),b=Ms(n.events,r[3]),x={type:d,start:Object.assign({},m),end:Object.assign({},b)};if(e.add(r[2],0,[["enter",x,n]]),a!==2){const y=n.events[r[2]],v=n.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 _=r[2]+1,E=r[3]-r[2]-1;e.add(_,E,[])}}e.add(r[3]+1,0,[["exit",x,n]])}return l!==void 0&&(o.end=Object.assign({},Ms(n.events,l)),e.add(l,0,[["exit",o,n]]),o=void 0),o}function Ly(e,n,r,a,l){const o=[],u=Ms(n.events,r);l&&(l.end=Object.assign({},u),o.push(["exit",l,n])),a.end=Object.assign({},u),o.push(["exit",a,n]),e.add(r+1,0,o)}function Ms(e,n){const r=e[n],a=r[0]==="enter"?"start":"end";return r[1][a]}const xj={name:"tasklistCheck",tokenize:vj};function yj(){return{text:{91:xj}}}function vj(e,n,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 Ht(h)?(e.enter("taskListCheckValueUnchecked"),e.consume(h),e.exit("taskListCheckValueUnchecked"),u):h===88||h===120?(e.enter("taskListCheckValueChecked"),e.consume(h),e.exit("taskListCheckValueChecked"),u):r(h)}function u(h){return h===93?(e.enter("taskListCheckMarker"),e.consume(h),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),d):r(h)}function d(h){return qe(h)?n(h):ft(h)?e.check({tokenize:kj},n,r)(h):r(h)}}function kj(e,n,r){return Et(e,a,"whitespace");function a(l){return l===null?r(l):n(l)}}function _j(e){return J1([V3(),rj(),dj(e),pj(),yj()])}const Ej={};function wj(e){const n=this,r=e||Ej,a=n.data(),l=a.micromarkExtensions||(a.micromarkExtensions=[]),o=a.fromMarkdownExtensions||(a.fromMarkdownExtensions=[]),u=a.toMarkdownExtensions||(a.toMarkdownExtensions=[]);l.push(_j(r)),o.push(q3()),u.push($3(r))}const Iy=(function(e,n,r){const a=No(r);if(!e||!e.type||!e.children)throw new Error("Expected parent node");if(typeof n=="number"){if(n<0||n===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if(n=e.children.indexOf(n),n<0)throw new Error("Expected child node or index");for(;++n<e.children.length;)if(a(e.children[n],n,e))return e.children[n]}),Qa=(function(e){if(e==null)return zj;if(typeof e=="string")return Nj(e);if(typeof e=="object")return Sj(e);if(typeof e=="function")return np(e);throw new Error("Expected function, string, or array as `test`")});function Sj(e){const n=[];let r=-1;for(;++r<e.length;)n[r]=Qa(e[r]);return np(a);function a(...l){let o=-1;for(;++o<n.length;)if(n[o].apply(this,l))return!0;return!1}}function Nj(e){return np(n);function n(r){return r.tagName===e}}function np(e){return n;function n(r,a,l){return!!(Cj(r)&&e.call(this,r,typeof a=="number"?a:void 0,l||void 0))}}function zj(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function Cj(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const By=/\n/g,Uy=/[\t ]+/g,om=Qa("br"),Fy=Qa(Lj),Tj=Qa("p"),Py=Qa("tr"),Rj=Qa(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",jj,Ij]),qk=Qa(["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 Aj(e,n){const r=n||{},a="children"in e?e.children:[],l=qk(e),o=Kk(e,{whitespace:r.whitespace||"normal"}),u=[];(e.type==="text"||e.type==="comment")&&u.push(...Gk(e,{breakBefore:!0,breakAfter:!0}));let d=-1;for(;++d<a.length;)u.push(...$k(a[d],e,{whitespace:o,breakBefore:d?void 0:l,breakAfter:d<a.length-1?om(a[d+1]):l}));const h=[];let m;for(d=-1;++d<u.length;){const b=u[d];typeof b=="number"?m!==void 0&&b>m&&(m=b):b&&(m!==void 0&&m>-1&&h.push(`
531
- `.repeat(m)||" "),m=-1,h.push(b))}return h.join("")}function $k(e,n,r){return e.type==="element"?Oj(e,n,r):e.type==="text"?r.whitespace==="normal"?Gk(e,r):Mj(e):[]}function Oj(e,n,r){const a=Kk(e,r),l=e.children||[];let o=-1,u=[];if(Rj(e))return u;let d,h;for(om(e)||Py(e)&&Iy(n,e,Py)?h=`
532
- `:Tj(e)?(d=2,h=2):qk(e)&&(d=1,h=1);++o<l.length;)u=u.concat($k(l[o],e,{whitespace:a,breakBefore:o?void 0:d,breakAfter:o<l.length-1?om(l[o+1]):h}));return Fy(e)&&Iy(n,e,Fy)&&u.push(" "),d&&u.unshift(d),h&&u.push(h),u}function Gk(e,n){const r=String(e.value),a=[],l=[];let o=0;for(;o<=r.length;){By.lastIndex=o;const h=By.exec(r),m=h&&"index"in h?h.index:r.length;a.push(Dj(r.slice(o,m).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),o===0?n.breakBefore:!0,m===r.length?n.breakAfter:!0)),o=m+1}let u=-1,d;for(;++u<a.length;)a[u].charCodeAt(a[u].length-1)===8203||u<a.length-1&&a[u+1].charCodeAt(0)===8203?(l.push(a[u]),d=void 0):a[u]?(typeof d=="number"&&l.push(d),l.push(a[u]),d=0):(u===0||u===a.length-1)&&l.push(0);return l}function Mj(e){return[String(e.value)]}function Dj(e,n,r){const a=[];let l=0,o;for(;l<e.length;){Uy.lastIndex=l;const u=Uy.exec(e);o=u?u.index:e.length,!l&&!o&&u&&!n&&a.push(""),l!==o&&a.push(e.slice(l,o)),l=u?o+u[0].length:o}return l!==o&&!r&&a.push(""),a.join(" ")}function Kk(e,n){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":n.whitespace;case"textarea":return"pre-wrap"}}return n.whitespace}function jj(e){return!!(e.properties||{}).hidden}function Lj(e){return e.tagName==="td"||e.tagName==="th"}function Ij(e){return e.tagName==="dialog"&&!(e.properties||{}).open}function Bj(e){const n=e.regex,r=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),a="decltype\\(auto\\)",l="[a-zA-Z_]\\w*::",u="(?!struct)("+a+"|"+n.optional(l)+"[a-zA-Z_]\\w*"+n.optional("<[^<>]+>")+")",d={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})"/})]},b={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:n.optional(l)+e.IDENT_RE,relevance:0},v=n.optional(l)+e.IDENT_RE+"\\s*\\(",_=["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"],w=["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"],U={type:E,keyword:_,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:w},$={className:"function.dispatch",relevance:0,keywords:{_hint:N},begin:n.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,n.lookahead(/(<[^<>]+>|)\s*\(/))},j=[$,x,d,r,e.C_BLOCK_COMMENT_MODE,b,m],J={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:U,contains:j.concat([{begin:/\(/,end:/\)/,keywords:U,contains:j.concat(["self"]),relevance:0}]),relevance:0},A={className:"function",begin:"("+u+"[\\*&\\s]+)+"+v,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:U,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:U,relevance:0},{begin:v,returnBegin:!0,contains:[y],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[m,b]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:U,relevance:0,contains:[r,e.C_BLOCK_COMMENT_MODE,m,b,d,{begin:/\(/,end:/\)/,keywords:U,relevance:0,contains:["self",r,e.C_BLOCK_COMMENT_MODE,m,b,d]}]},d,r,e.C_BLOCK_COMMENT_MODE,x]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:U,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(J,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:U,contains:["self",d]},{begin:e.IDENT_RE+"::",keywords:U},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function Uj(e){const n={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=Bj(e),a=r.keywords;return a.type=[...a.type,...n.type],a.literal=[...a.literal,...n.literal],a.built_in=[...a.built_in,...n.built_in],a._hints=n._hints,r.name="Arduino",r.aliases=["ino"],r.supersetOf="cpp",r}function Fj(e){const n=e.regex,r={},a={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[r]}]};Object.assign(r,{className:"variable",variants:[{begin:n.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"}}),u={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},d={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,r,l]};l.contains.push(d);const h={match:/\\"/},m={className:"string",begin:/'/,end:/'/},b={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}),_={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"],w=["true","false"],N={match:/(\/[a-z._-]+)+/},M=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],R=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],U=["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:w,built_in:[...M,...R,"set","shopt",...U,...$]},contains:[v,e.SHEBANG(),_,x,o,u,N,d,h,m,b,r]}}function Pj(e){const n=e.regex,r=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),a="decltype\\(auto\\)",l="[a-zA-Z_]\\w*::",u="("+a+"|"+n.optional(l)+"[a-zA-Z_]\\w*"+n.optional("<[^<>]+>")+")",d={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})"/})]},b={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:n.optional(l)+e.IDENT_RE,relevance:0},v=n.optional(l)+e.IDENT_RE+"\\s*\\(",w={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,d,r,e.C_BLOCK_COMMENT_MODE,b,m],M={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:w,contains:N.concat([{begin:/\(/,end:/\)/,keywords:w,contains:N.concat(["self"]),relevance:0}]),relevance:0},R={begin:"("+u+"[\\*&\\s]+)+"+v,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:w,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:w,relevance:0},{begin:v,returnBegin:!0,contains:[e.inherit(y,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:w,relevance:0,contains:[r,e.C_BLOCK_COMMENT_MODE,m,b,d,{begin:/\(/,end:/\)/,keywords:w,relevance:0,contains:["self",r,e.C_BLOCK_COMMENT_MODE,m,b,d]}]},d,r,e.C_BLOCK_COMMENT_MODE,x]};return{name:"C",aliases:["h"],keywords:w,disableAutodetect:!0,illegal:"</",contains:[].concat(M,R,N,[x,{begin:e.IDENT_RE+"::",keywords:w},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:x,strings:m,keywords:w}}}function Hj(e){const n=e.regex,r=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),a="decltype\\(auto\\)",l="[a-zA-Z_]\\w*::",u="(?!struct)("+a+"|"+n.optional(l)+"[a-zA-Z_]\\w*"+n.optional("<[^<>]+>")+")",d={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})"/})]},b={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:n.optional(l)+e.IDENT_RE,relevance:0},v=n.optional(l)+e.IDENT_RE+"\\s*\\(",_=["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"],w=["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"],U={type:E,keyword:_,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:w},$={className:"function.dispatch",relevance:0,keywords:{_hint:N},begin:n.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,n.lookahead(/(<[^<>]+>|)\s*\(/))},j=[$,x,d,r,e.C_BLOCK_COMMENT_MODE,b,m],J={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:U,contains:j.concat([{begin:/\(/,end:/\)/,keywords:U,contains:j.concat(["self"]),relevance:0}]),relevance:0},A={className:"function",begin:"("+u+"[\\*&\\s]+)+"+v,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:U,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:U,relevance:0},{begin:v,returnBegin:!0,contains:[y],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[m,b]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:U,relevance:0,contains:[r,e.C_BLOCK_COMMENT_MODE,m,b,d,{begin:/\(/,end:/\)/,keywords:U,relevance:0,contains:["self",r,e.C_BLOCK_COMMENT_MODE,m,b,d]}]},d,r,e.C_BLOCK_COMMENT_MODE,x]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:U,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(J,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:U,contains:["self",d]},{begin:e.IDENT_RE+"::",keywords:U},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function qj(e){const n=["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"],u={keyword:l.concat(o),built_in:n,literal:a},d=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},b={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},x=e.inherit(b,{illegal:/\n/}),y={className:"subst",begin:/\{/,end:/\}/,keywords:u},v=e.inherit(y,{illegal:/\n/}),_={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,v]},E={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},y]},w=e.inherit(E,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},v]});y.contains=[E,_,b,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,h,e.C_BLOCK_COMMENT_MODE],v.contains=[w,_,x,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,h,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const N={variants:[m,E,_,b,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},M={begin:"<",end:">",contains:[{beginKeywords:"in out"},d]},R=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",U={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:u,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"},d,M,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[d,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[d,M,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:"("+R+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:u,contains:[{beginKeywords:r.join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,M],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:u,relevance:0,contains:[N,h,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},U]}}const $j=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_-]*/}}),Gj=["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"],Kj=["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"],Vj=[...Gj,...Kj],Yj=["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(),Qj=["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(),Xj=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),Zj=["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 Wj(e){const n=e.regex,r=$j(e),a={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},l="and or not only",o=/@-?\w[\w]*(-\w+)*/,u="[a-zA-Z-][a-zA-Z0-9_-]*",d=[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:"\\."+u,relevance:0},r.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+Qj.join("|")+")"},{begin:":(:)?("+Xj.join("|")+")"}]},r.CSS_VARIABLE,{className:"attribute",begin:"\\b("+Zj.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[r.BLOCK_COMMENT,r.HEXCOLOR,r.IMPORTANT,r.CSS_NUMBER_MODE,...d,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...d,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},r.FUNCTION_DISPATCH]},{begin:n.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:Yj.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...d,r.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+Vj.join("|")+")\\b"}]}}function Jj(e){const n=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:n.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:n.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 eL(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 tL(e){const n=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:n.concat(r,n.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}}function nL(e){const n=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/},u={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},d={begin:/\[/,end:/\]/,contains:[a,o,l,u,r,"self"],relevance:0},h=/[A-Za-z0-9_-]+/,m=/"(\\"|[^"])*"/,b=/'[^']*'/,x=n.either(h,m,b),y=n.concat(x,"(\\s*\\.\\s*",x,")*",n.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,d,o,l,u,r]}}]}}var Ds="[0-9](_*[0-9])*",Wc=`\\.(${Ds})`,Jc="[0-9a-fA-F](_*[0-9a-fA-F])*",Hy={className:"number",variants:[{begin:`(\\b(${Ds})((${Wc})|\\.)?|(${Wc}))[eE][+-]?(${Ds})[fFdD]?\\b`},{begin:`\\b(${Ds})((${Wc})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${Wc})[fFdD]?\\b`},{begin:`\\b(${Ds})[fFdD]\\b`},{begin:`\\b0[xX]((${Jc})\\.?|(${Jc})?\\.(${Jc}))[pP][+-]?(${Ds})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${Jc})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function Vk(e,n,r){return r===-1?"":e.replace(n,a=>Vk(e,n,r-1))}function rL(e){const n=e.regex,r="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",a=r+Vk("(?:<"+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"]}]},b={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:[n.concat(/(?!else)/,r),/\s+/,r,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,r],className:{1:"keyword",3:"title.class"},contains:[b,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,Hy,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},Hy,m]}}const qy="[A-Za-z$_][0-9A-Za-z$_]*",iL=["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"],aL=["true","false","null","undefined","NaN","Infinity"],Yk=["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"],Qk=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Xk=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],sL=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],lL=[].concat(Xk,Yk,Qk);function oL(e){const n=e.regex,r=(V,{after:ne})=>{const C="</"+V[0].slice(1);return V.input.indexOf(C,ne)!==-1},a=qy,l={begin:"<>",end:"</>"},o=/<[A-Za-z0-9\\._:-]+\s*\/>/,u={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(V,ne)=>{const C=V[0].length+V.index,O=V.input[C];if(O==="<"||O===","){ne.ignoreMatch();return}O===">"&&(r(V,{after:C})||ne.ignoreMatch());let K;const T=V.input.substring(C);if(K=T.match(/^\s*=/)){ne.ignoreMatch();return}if((K=T.match(/^\s+extends\s+/))&&K.index===0){ne.ignoreMatch();return}}},d={$pattern:qy,keyword:iL,literal:aL,built_in:lL,"variable.language":sL},h="[0-9](_?[0-9])*",m=`\\.(${h})`,b="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",x={className:"number",variants:[{begin:`(\\b(${b})((${m})|\\.)?|(${m}))[eE][+-]?(${h})\\b`},{begin:`\\b(${b})\\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:d,contains:[]},v={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,y],subLanguage:"xml"}},_={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"}},w={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,y]},M={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]},R=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,v,_,E,w,{match:/\$\d+/},x];y.contains=R.concat({begin:/\{/,end:/\}/,keywords:d,contains:["self"].concat(R)});const U=[].concat(M,y.contains),$=U.concat([{begin:/(\s*)\(/,end:/\)/,keywords:d,contains:["self"].concat(U)}]),j={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:d,contains:$},J={variants:[{match:[/class/,/\s+/,a,/\s+/,/extends/,/\s+/,n.concat(a,"(",n.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:n.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:{_:[...Yk,...Qk]}},ae={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},H={variants:[{match:[/function/,/\s+/,a,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[j],illegal:/%/},te={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function ee(V){return n.concat("(?!",V.join("|"),")")}const ve={match:n.concat(/\b/,ee([...Xk,"super","import"].map(V=>`${V}\\s*\\(`)),a,n.lookahead(/\s*\(/)),className:"title.function",relevance:0},oe={begin:n.concat(/\./,n.lookahead(n.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]},L="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",Y={match:[/const|var|let/,/\s+/,a,/\s*/,/=\s*/,/(async\s*)?/,n.lookahead(L)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[j]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:d,exports:{PARAMS_CONTAINS:$,CLASS_REFERENCE:A},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),ae,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,v,_,E,w,M,{match:/\$\d+/},x,A,{scope:"attr",match:a+n.lookahead(":"),relevance:0},Y,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[M,e.REGEXP_MODE,{className:"function",begin:L,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:d,contains:$}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:l.begin,end:l.end},{match:o},{begin:u.begin,"on:begin":u.isTrulyOpeningTag,end:u.end}],subLanguage:"xml",contains:[{begin:u.begin,end:u.end,skip:!0,contains:["self"]}]}]},H,{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},oe,{match:"\\$"+a,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[j]},ve,te,J,q,{match:/\$[(.]/}]}}function cL(e){const n={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:[n,r,e.QUOTE_STRING_MODE,l,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}var js="[0-9](_*[0-9])*",eu=`\\.(${js})`,tu="[0-9a-fA-F](_*[0-9a-fA-F])*",uL={className:"number",variants:[{begin:`(\\b(${js})((${eu})|\\.)?|(${eu}))[eE][+-]?(${js})[fFdD]?\\b`},{begin:`\\b(${js})((${eu})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${eu})[fFdD]?\\b`},{begin:`\\b(${js})[fFdD]\\b`},{begin:`\\b0[xX]((${tu})\\.?|(${tu})?\\.(${tu}))[pP][+-]?(${js})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${tu})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function dL(e){const n={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},u={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(u);const d={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(u,{className:"string"}),"self"]}]},m=uL,b=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:n,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,b,r,a,d,h,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:n,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:n,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[x,e.C_LINE_COMMENT_MODE,b],relevance:0},e.C_LINE_COMMENT_MODE,b,d,h,u,e.C_NUMBER_MODE]},b]},{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},d,h]},u,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
533
- `},m]}}const fL=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_-]*/}}),hL=["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"],mL=["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"],pL=[...hL,...mL],gL=["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(),Zk=["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(),Wk=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),bL=["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(),xL=Zk.concat(Wk).sort().reverse();function yL(e){const n=fL(e),r=xL,a="and or not only",l="[\\w-]+",o="("+l+"|@\\{"+l+"\\})",u=[],d=[],h=function(R){return{className:"string",begin:"~?"+R+".*?"+R}},m=function(R,U,$){return{className:R,begin:U,relevance:$}},b={$pattern:/[a-z-]+/,keyword:a,attribute:gL.join(" ")},x={begin:"\\(",end:"\\)",contains:d,keywords:b,relevance:0};d.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,h("'"),h('"'),n.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},n.HEXCOLOR,x,m("variable","@@?"+l,10),m("variable","@\\{"+l+"\\}"),m("built_in","~?`[^`]*?`"),{className:"attribute",begin:l+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},n.IMPORTANT,{beginKeywords:"and not"},n.FUNCTION_DISPATCH);const y=d.concat({begin:/\{/,end:/\}/,contains:u}),v={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(d)},_={begin:o+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+bL.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:d}}]},E={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:b,returnEnd:!0,contains:d,relevance:0}},w={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("+pL.join("|")+")\\b",className:"selector-tag"},n.CSS_NUMBER_MODE,m("selector-tag",o,0),m("selector-id","#"+o),m("selector-class","\\."+o,0),m("selector-tag","&",0),n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+Zk.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+Wk.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:y},{begin:"!important"},n.FUNCTION_DISPATCH]},M={begin:l+`:(:)?(${r.join("|")})`,returnBegin:!0,contains:[N]};return u.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,E,w,M,_,N,v,n.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:u}}function vL(e){const n="\\[=*\\[",r="\\]=*\\]",a={begin:n,end:r,contains:["self"]},l=[e.COMMENT("--(?!"+n+")","$"),e.COMMENT("--"+n,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:n,end:r,contains:[a],relevance:5}])}}function kL(e){const n={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},r={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n]},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:[n,r]},l={begin:"^"+e.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},o={className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},u={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[n]};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,n,r,a,l,o,u]}}function _L(e){const n=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},u={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},d=/[A-Za-z][A-Za-z0-9+.-]*/,h={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:n.concat(/\[.+?\]\(/,d,/:\/\/.*?\)/),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}/}]},b={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},x=e.inherit(m,{contains:[]}),y=e.inherit(b,{contains:[]});m.contains.push(y),b.contains.push(x);let v=[r,h];return[m,b,x,y].forEach(N=>{N.contains=N.contains.concat(v)}),v=v.concat(m,b),{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,b,{className:"quote",begin:"^>\\s+",contains:v,end:"$"},l,a,h,u,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function EL(e){const n={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_]*/,d={"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:d,illegal:"</",contains:[n,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 wL(e){const n=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},u={begin:/->\{/,end:/\}/},d={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},h={scope:"variable",variants:[{begin:/\$\d/},{begin:n.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[d]},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},b=[e.BACKSLASH_ESCAPE,o,h],x=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],y=(E,w,N="\\1")=>{const M=N==="\\1"?N:n.concat(N,w);return n.concat(n.concat("(?:",E,")"),w,/(?:\\.|[^\\\/])*?/,M,/(?:\\.|[^\\\/])*?/,N,a)},v=(E,w,N)=>n.concat(n.concat("(?:",E,")"),w,/(?:\\.|[^\\\/])*?/,N,a),_=[h,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),u,{className:"string",contains:b,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",n.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",n.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,d]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,d,m]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return o.contains=_,u.contains=_,{name:"Perl",aliases:["pl","pm"],keywords:l,contains:_}}function SL(e){const n=e.regex,r=/(?![A-Za-z0-9])(?![$])/,a=n.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,r),l=n.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,r),o=n.concat(/[A-Z]+/,r),u={scope:"variable",match:"\\$+"+a},d={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}),b=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":(oe,q)=>{q.data._beginMatch=oe[1]||oe[2]},"on:end":(oe,q)=>{q.data._beginMatch!==oe[1]&&q.ignoreMatch()}},y=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),v=`[
534
- ]`,_={scope:"string",variants:[b,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},w=["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"],M=["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"],U={keyword:N,literal:(oe=>{const q=[];return oe.forEach(L=>{q.push(L),L.toLowerCase()===L?q.push(L.toUpperCase()):q.push(L.toLowerCase())}),q})(w),built_in:M},$=oe=>oe.map(q=>q.replace(/\|\d+$/,"")),j={variants:[{match:[/new/,n.concat(v,"+"),n.concat("(?!",$(M).join("\\b|"),"\\b)"),l],scope:{1:"keyword",4:"title.class"}}]},J=n.concat(a,"\\b(?!\\()"),A={variants:[{match:[n.concat(/::/,n.lookahead(/(?!class\b)/)),J],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[l,n.concat(/::/,n.lookahead(/(?!class\b)/)),J],scope:{1:"title.class",3:"variable.constant"}},{match:[l,n.concat("::",n.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[l,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},ae={scope:"attr",match:n.concat(a,n.lookahead(":"),n.lookahead(/(?!::)/))},H={relevance:0,begin:/\(/,end:/\)/,keywords:U,contains:[ae,u,A,e.C_BLOCK_COMMENT_MODE,_,E,j]},te={relevance:0,match:[/\b/,n.concat("(?!fn\\b|function\\b|",$(N).join("\\b|"),"|",$(M).join("\\b|"),"\\b)"),a,n.concat(v,"*"),n.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[H]};H.contains.push(te);const ee=[ae,A,e.C_BLOCK_COMMENT_MODE,_,E,j],ve={begin:n.concat(/#\[\s*\\?/,n.either(l,o)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:w,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:w,keyword:["new","array"]},contains:["self",...ee]},...ee,{scope:"meta",variants:[{match:l},{match:o}]}]};return{case_insensitive:!1,keywords:U,contains:[ve,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}]}},d,{scope:"variable.language",match:/\$this\b/},u,te,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:U,contains:["self",ve,u,A,e.C_BLOCK_COMMENT_MODE,_,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]},_,E]}}function NL(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 zL(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function CL(e){const n=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"],d={$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:d,illegal:/#/},b={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,b,m]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,h,b,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,b,m]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,b,m]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},y="[0-9](_?[0-9])*",v=`(\\b(${y}))?\\.(${y})|\\b(${y})\\.`,_=`\\b|${a.join("|")}`,E={className:"number",relevance:0,variants:[{begin:`(\\b(${y})|(${v}))[eE][+-]?(${y})[jJ]?(?=${_})`},{begin:`(${v})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${_})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${_})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${_})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${_})`},{begin:`\\b(${y})[jJ](?=${_})`}]},w={className:"comment",begin:n.lookahead(/# type:/),end:/$/,keywords:d,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:d,contains:["self",h,E,x,e.HASH_COMMENT_MODE]}]};return m.contains=[x,E,h],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:d,illegal:/(<\/|\?)|=>/,contains:[h,E,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},x,w,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 TL(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function RL(e){const n=e.regex,r=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,a=n.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=n.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:n.lookahead(n.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 AL(e){const n=e.regex,r="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",a=n.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),l=n.concat(a,/(::\w+)*/),u={"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"]},d={className:"doctag",begin:"@[A-Za-z]+"},h={begin:"#<",end:">"},m=[e.COMMENT("#","$",{contains:[d]}),e.COMMENT("^=begin","^=end",{contains:[d],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],b={className:"subst",begin:/#\{/,end:/\}/,keywords:u},x={className:"string",contains:[e.BACKSLASH_ESCAPE,b],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:n.concat(/<<[-~]?'?/,n.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,b]})]}]},y="[1-9](_?[0-9])*|0",v="[0-9](_?[0-9])*",_={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:u}]},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:u},{match:[/(include|extend)\s+/,l],scope:{2:"title.class"},keywords:u},{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},_,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:u},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,b],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);b.contains=j,E.contains=j;const H=[{begin:/^\s*=>/,starts:{end:"$",contains:j}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:u,contains:j}}];return m.unshift(h),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:u,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(H).concat(m).concat(j)}}function OL(e){const n=e.regex,r=/(r#)?/,a=n.concat(r,e.UNDERSCORE_IDENT_RE),l=n.concat(r,e.IDENT_RE),o={className:"title.function.invoke",relevance:0,begin:n.concat(/\b/,/(?!let|for|while|if|else|match\b)/,l,n.lookahead(/\s*\(/))},u="([ui](8|16|32|64|128|size)|f(32|64))?",d=["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!"],b=["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:b,keyword:d,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_]+)"+u},{begin:"\\b0o([0-7_]+)"+u},{begin:"\\b0x([A-Fa-f0-9_]+)"+u},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+u}],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:b}},{className:"punctuation",begin:"->"},o]}}const ML=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_-]*/}}),DL=["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"],LL=[...DL,...jL],IL=["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(),BL=["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(),UL=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),FL=["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 PL(e){const n=ML(e),r=UL,a=BL,l="@[a-z-]+",o="and or not only",d={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,n.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+LL.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+a.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+r.join("|")+")"},d,{begin:/\(/,end:/\)/,contains:[n.CSS_NUMBER_MODE]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+FL.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:[n.BLOCK_COMMENT,d,n.HEXCOLOR,n.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,n.IMPORTANT,n.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:l,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:o,attribute:IL.join(" ")},contains:[{begin:l,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},d,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,n.HEXCOLOR,n.CSS_NUMBER_MODE]},n.FUNCTION_DISPATCH]}}function HL(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function qL(e){const n=e.regex,r=e.COMMENT("--","$"),a={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},l={begin:/"/,end:/"/,contains:[{match:/""/}]},o=["true","false","unknown"],u=["double precision","large object","with timezone","without timezone"],d=["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"],b=["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=b,_=[...m,...h].filter($=>!b.includes($)),E={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},w={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},N={match:n.concat(/\b/,n.either(...v),/\s*\(/),relevance:0,keywords:{built_in:v}};function M($){return n.concat(/\b/,n.either(...$.map(j=>j.replace(/\s+/,"\\s+"))),/\b/)}const R={scope:"keyword",match:M(y),relevance:0};function U($,{exceptions:j,when:J}={}){const A=J;return j=j||[],$.map(ae=>ae.match(/\|\d+$/)||j.includes(ae)?ae:A(ae)?`${ae}|0`:ae)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:U(_,{when:$=>$.length<3}),literal:o,type:d,built_in:x},contains:[{scope:"type",match:M(u)},R,N,E,a,l,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,r,w]}}function Jk(e){return e?typeof e=="string"?e:e.source:null}function Zl(e){return Ft("(?=",e,")")}function Ft(...e){return e.map(r=>Jk(r)).join("")}function $L(e){const n=e[e.length-1];return typeof n=="object"&&n.constructor===Object?(e.splice(e.length-1,1),n):{}}function qn(...e){return"("+($L(e).capture?"":"?:")+e.map(a=>Jk(a)).join("|")+")"}const rp=e=>Ft(/\b/,e,/\w$/.test(e)?/\b/:/\B/),GL=["Protocol","Type"].map(rp),$y=["init","self"].map(rp),KL=["Any","Self"],Rh=["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"],Gy=["false","nil","true"],VL=["assignment","associativity","higherThan","left","lowerThan","none","right"],YL=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],Ky=["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"],e_=qn(/[/=\-+!*%<>&|^~?]/,/[\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]/),t_=qn(e_,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),Ah=Ft(e_,t_,"*"),n_=qn(/[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]/),wu=qn(n_,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),Xr=Ft(n_,wu,"*"),nu=Ft(/[A-Z]/,wu,"*"),QL=["attached","autoclosure",Ft(/convention\(/,qn("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",Ft(/objc\(/,Xr,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],XL=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function ZL(e){const n={match:/\s+/,relevance:0},r=e.COMMENT("/\\*","\\*/",{contains:["self"]}),a=[e.C_LINE_COMMENT_MODE,r],l={match:[/\./,qn(...GL,...$y)],className:{2:"keyword"}},o={match:Ft(/\./,qn(...Rh)),relevance:0},u=Rh.filter(lt=>typeof lt=="string").concat(["_|0"]),d=Rh.filter(lt=>typeof lt!="string").concat(KL).map(rp),h={variants:[{className:"keyword",match:qn(...d,...$y)}]},m={$pattern:qn(/\b\w+/,/#\w+/),keyword:u.concat(YL),literal:Gy},b=[l,o,h],x={match:Ft(/\./,qn(...Ky)),relevance:0},y={className:"built_in",match:Ft(/\b/,qn(...Ky),/(?=\()/)},v=[x,y],_={match:/->/,relevance:0},E={className:"operator",relevance:0,variants:[{match:Ah},{match:`\\.(\\.|${t_})+`}]},w=[_,E],N="([0-9]_*)+",M="([0-9a-fA-F]_*)+",R={className:"number",relevance:0,variants:[{match:`\\b(${N})(\\.(${N}))?([eE][+-]?(${N}))?\\b`},{match:`\\b0x(${M})(\\.(${M}))?([pP][+-]?(${N}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},U=(lt="")=>({className:"subst",variants:[{match:Ft(/\\/,lt,/[0\\tnr"']/)},{match:Ft(/\\/,lt,/u\{[0-9a-fA-F]{1,8}\}/)}]}),$=(lt="")=>({className:"subst",match:Ft(/\\/,lt,/[\t ]*(?:[\r\n]|\r\n)/)}),j=(lt="")=>({className:"subst",label:"interpol",begin:Ft(/\\/,lt,/\(/),end:/\)/}),J=(lt="")=>({begin:Ft(lt,/"""/),end:Ft(/"""/,lt),contains:[U(lt),$(lt),j(lt)]}),A=(lt="")=>({begin:Ft(lt,/"/),end:Ft(/"/,lt),contains:[U(lt),j(lt)]}),ae={className:"string",variants:[J(),J("#"),J("##"),J("###"),A(),A("#"),A("##"),A("###")]},H=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],te={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:H},ee=lt=>{const kn=Ft(lt,/\//),Kn=Ft(/\//,lt);return{begin:kn,end:Kn,contains:[...H,{scope:"comment",begin:`#(?!.*${Kn})`,end:/$/}]}},ve={scope:"regexp",variants:[ee("###"),ee("##"),ee("#"),te]},oe={match:Ft(/`/,Xr,/`/)},q={className:"variable",match:/\$\d+/},L={className:"variable",match:`\\$${wu}+`},Y=[oe,q,L],V={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:XL,contains:[...w,R,ae]}]}},ne={scope:"keyword",match:Ft(/@/,qn(...QL),Zl(qn(/\(/,/\s+/)))},C={scope:"meta",match:Ft(/@/,Xr)},O=[V,ne,C],K={match:Zl(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:Ft(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,wu,"+")},{className:"type",match:nu,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:Ft(/\s+&\s+/,Zl(nu)),relevance:0}]},T={begin:/</,end:/>/,keywords:m,contains:[...a,...b,...O,_,K]};K.contains.push(T);const he={match:Ft(Xr,/\s*:/),keywords:"_|0",relevance:0},_e={begin:/\(/,end:/\)/,relevance:0,keywords:m,contains:["self",he,...a,ve,...b,...v,...w,R,ae,...Y,...O,K]},xe={begin:/</,end:/>/,keywords:"repeat each",contains:[...a,K]},He={begin:qn(Zl(Ft(Xr,/\s*:/)),Zl(Ft(Xr,/\s+/,Xr,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:Xr}]},st={begin:/\(/,end:/\)/,keywords:m,contains:[He,...a,...b,...w,R,ae,...O,K,_e],endsParent:!0,illegal:/["']/},Be={match:[/(func|macro)/,/\s+/,qn(oe.match,Xr,Ah)],className:{1:"keyword",3:"title.function"},contains:[xe,st,n],illegal:[/\[/,/%/]},Wt={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[xe,st,n],illegal:/\[|%/},un={match:[/operator/,/\s+/,Ah],className:{1:"keyword",3:"title"}},jn={begin:[/precedencegroup/,/\s+/,nu],className:{1:"keyword",3:"title"},contains:[K],keywords:[...VL,...Gy],end:/}/},At={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},Kt={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},rr={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,Xr,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:m,contains:[xe,...b,{begin:/:/,end:/\{/,keywords:m,contains:[{scope:"title.class.inherited",match:nu},...b],relevance:0}]};for(const lt of ae.variants){const kn=lt.contains.find(br=>br.label==="interpol");kn.keywords=m;const Kn=[...b,...v,...w,R,ae,...Y];kn.contains=[...Kn,{begin:/\(/,end:/\)/,contains:["self",...Kn]}]}return{name:"Swift",keywords:m,contains:[...a,Be,Wt,At,Kt,rr,un,jn,{beginKeywords:"import",end:/$/,contains:[...a],relevance:0},ve,...b,...v,...w,R,ae,...Y,...O,K,_e]}}const Su="[A-Za-z$_][0-9A-Za-z$_]*",r_=["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"],i_=["true","false","null","undefined","NaN","Infinity"],a_=["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"],s_=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],l_=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],o_=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],c_=[].concat(l_,a_,s_);function WL(e){const n=e.regex,r=(V,{after:ne})=>{const C="</"+V[0].slice(1);return V.input.indexOf(C,ne)!==-1},a=Su,l={begin:"<>",end:"</>"},o=/<[A-Za-z0-9\\._:-]+\s*\/>/,u={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(V,ne)=>{const C=V[0].length+V.index,O=V.input[C];if(O==="<"||O===","){ne.ignoreMatch();return}O===">"&&(r(V,{after:C})||ne.ignoreMatch());let K;const T=V.input.substring(C);if(K=T.match(/^\s*=/)){ne.ignoreMatch();return}if((K=T.match(/^\s+extends\s+/))&&K.index===0){ne.ignoreMatch();return}}},d={$pattern:Su,keyword:r_,literal:i_,built_in:c_,"variable.language":o_},h="[0-9](_?[0-9])*",m=`\\.(${h})`,b="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",x={className:"number",variants:[{begin:`(\\b(${b})((${m})|\\.)?|(${m}))[eE][+-]?(${h})\\b`},{begin:`\\b(${b})\\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:d,contains:[]},v={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,y],subLanguage:"xml"}},_={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"}},w={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,y]},M={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]},R=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,v,_,E,w,{match:/\$\d+/},x];y.contains=R.concat({begin:/\{/,end:/\}/,keywords:d,contains:["self"].concat(R)});const U=[].concat(M,y.contains),$=U.concat([{begin:/(\s*)\(/,end:/\)/,keywords:d,contains:["self"].concat(U)}]),j={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:d,contains:$},J={variants:[{match:[/class/,/\s+/,a,/\s+/,/extends/,/\s+/,n.concat(a,"(",n.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:n.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:{_:[...a_,...s_]}},ae={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},H={variants:[{match:[/function/,/\s+/,a,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[j],illegal:/%/},te={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function ee(V){return n.concat("(?!",V.join("|"),")")}const ve={match:n.concat(/\b/,ee([...l_,"super","import"].map(V=>`${V}\\s*\\(`)),a,n.lookahead(/\s*\(/)),className:"title.function",relevance:0},oe={begin:n.concat(/\./,n.lookahead(n.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]},L="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",Y={match:[/const|var|let/,/\s+/,a,/\s*/,/=\s*/,/(async\s*)?/,n.lookahead(L)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[j]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:d,exports:{PARAMS_CONTAINS:$,CLASS_REFERENCE:A},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),ae,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,v,_,E,w,M,{match:/\$\d+/},x,A,{scope:"attr",match:a+n.lookahead(":"),relevance:0},Y,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[M,e.REGEXP_MODE,{className:"function",begin:L,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:d,contains:$}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:l.begin,end:l.end},{match:o},{begin:u.begin,"on:begin":u.isTrulyOpeningTag,end:u.end}],subLanguage:"xml",contains:[{begin:u.begin,end:u.end,skip:!0,contains:["self"]}]}]},H,{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},oe,{match:"\\$"+a,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[j]},ve,te,J,q,{match:/\$[(.]/}]}}function JL(e){const n=e.regex,r=WL(e),a=Su,l=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],o={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},u={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:l},contains:[r.exports.CLASS_REFERENCE]},d={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},h=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],m={$pattern:Su,keyword:r_.concat(h),literal:i_,built_in:c_.concat(l),"variable.language":o_},b={className:"meta",begin:"@"+a},x=(E,w,N)=>{const M=E.contains.findIndex(R=>R.label===w);if(M===-1)throw new Error("can not find mode to replace");E.contains.splice(M,1,N)};Object.assign(r.keywords,m),r.exports.PARAMS_CONTAINS.push(b);const y=r.contains.find(E=>E.scope==="attr"),v=Object.assign({},y,{match:n.concat(a,n.lookahead(/\s*\?:/))});r.exports.PARAMS_CONTAINS.push([r.exports.CLASS_REFERENCE,y,v]),r.contains=r.contains.concat([b,o,u,v]),x(r,"shebang",e.SHEBANG()),x(r,"use_strict",d);const _=r.contains.find(E=>E.label==="func.def");return _.relevance=0,Object.assign(r,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),r}function eI(e){const n=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}/,u=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,d=/\d{1,2}(:\d{1,2}){1,2}/,h={className:"literal",variants:[{begin:n.concat(/# */,n.either(o,l),/ *#/)},{begin:n.concat(/# */,d,/ *#/)},{begin:n.concat(/# */,u,/ *#/)},{begin:n.concat(/# */,n.either(o,l),/ +/,n.either(u,d),/ *#/)}]},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])|[%&])?/}]},b={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,b,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 tI(e){e.regex;const n=e.COMMENT(/\(;/,/;\)/);n.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_]+/},u={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},d={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,n,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},o,u,l,e.QUOTE_STRING_MODE,h,m,d]}}function nI(e){const n=e.regex,r=n.concat(/[\p{L}_]/u,n.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/}]},u=e.inherit(o,{begin:/\(/,end:/\)/}),d=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,d,u,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[o,u,h,d]}]}]},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:n.concat(/</,n.lookahead(n.concat(r,n.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:r,relevance:0,starts:m}]},{className:"tag",begin:n.concat(/<\//,n.lookahead(n.concat(r,/>/))),contains:[{className:"name",begin:r,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function rI(e){const n="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}]},u={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,l]},d=e.inherit(u,{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:n,relevance:0},_={begin:/\{/,end:/\}/,contains:[v],illegal:"\\n",relevance:0},E={begin:"\\[",end:"\\]",contains:[v],illegal:"\\n",relevance:0},w=[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:n,keywords:{literal:n}},y,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},_,E,o,u],N=[...w];return N.pop(),N.push(d),v.contains=N,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:w}}const iI={arduino:Uj,bash:Fj,c:Pj,cpp:Hj,csharp:qj,css:Wj,diff:Jj,go:eL,graphql:tL,ini:nL,java:rL,javascript:oL,json:cL,kotlin:dL,less:yL,lua:vL,makefile:kL,markdown:_L,objectivec:EL,perl:wL,php:SL,"php-template":NL,plaintext:zL,python:CL,"python-repl":TL,r:RL,ruby:AL,rust:OL,scss:PL,shell:HL,sql:qL,swift:ZL,typescript:JL,vbnet:eI,wasm:tI,xml:nI,yaml:rI};var Oh,Vy;function aI(){if(Vy)return Oh;Vy=1;function e(B){return B instanceof Map?B.clear=B.delete=B.set=function(){throw new Error("map is read-only")}:B instanceof Set&&(B.add=B.clear=B.delete=function(){throw new Error("set is read-only")}),Object.freeze(B),Object.getOwnPropertyNames(B).forEach(le=>{const Ee=B[le],Ke=typeof Ee;(Ke==="object"||Ke==="function")&&!Object.isFrozen(Ee)&&e(Ee)}),B}class n{constructor(le){le.data===void 0&&(le.data={}),this.data=le.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function r(B){return B.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function a(B,...le){const Ee=Object.create(null);for(const Ke in B)Ee[Ke]=B[Ke];return le.forEach(function(Ke){for(const Tt in Ke)Ee[Tt]=Ke[Tt]}),Ee}const l="</span>",o=B=>!!B.scope,u=(B,{prefix:le})=>{if(B.startsWith("language:"))return B.replace("language:","language-");if(B.includes(".")){const Ee=B.split(".");return[`${le}${Ee.shift()}`,...Ee.map((Ke,Tt)=>`${Ke}${"_".repeat(Tt+1)}`)].join(" ")}return`${le}${B}`};class d{constructor(le,Ee){this.buffer="",this.classPrefix=Ee.classPrefix,le.walk(this)}addText(le){this.buffer+=r(le)}openNode(le){if(!o(le))return;const Ee=u(le.scope,{prefix:this.classPrefix});this.span(Ee)}closeNode(le){o(le)&&(this.buffer+=l)}value(){return this.buffer}span(le){this.buffer+=`<span class="${le}">`}}const h=(B={})=>{const le={children:[]};return Object.assign(le,B),le};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(le){this.top.children.push(le)}openNode(le){const Ee=h({scope:le});this.add(Ee),this.stack.push(Ee)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(le){return this.constructor._walk(le,this.rootNode)}static _walk(le,Ee){return typeof Ee=="string"?le.addText(Ee):Ee.children&&(le.openNode(Ee),Ee.children.forEach(Ke=>this._walk(le,Ke)),le.closeNode(Ee)),le}static _collapse(le){typeof le!="string"&&le.children&&(le.children.every(Ee=>typeof Ee=="string")?le.children=[le.children.join("")]:le.children.forEach(Ee=>{m._collapse(Ee)}))}}class b extends m{constructor(le){super(),this.options=le}addText(le){le!==""&&this.add(le)}startScope(le){this.openNode(le)}endScope(){this.closeNode()}__addSublanguage(le,Ee){const Ke=le.root;Ee&&(Ke.scope=`language:${Ee}`),this.add(Ke)}toHTML(){return new d(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function x(B){return B?typeof B=="string"?B:B.source:null}function y(B){return E("(?=",B,")")}function v(B){return E("(?:",B,")*")}function _(B){return E("(?:",B,")?")}function E(...B){return B.map(Ee=>x(Ee)).join("")}function w(B){const le=B[B.length-1];return typeof le=="object"&&le.constructor===Object?(B.splice(B.length-1,1),le):{}}function N(...B){return"("+(w(B).capture?"":"?:")+B.map(Ke=>x(Ke)).join("|")+")"}function M(B){return new RegExp(B.toString()+"|").exec("").length-1}function R(B,le){const Ee=B&&B.exec(le);return Ee&&Ee.index===0}const U=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function $(B,{joinWith:le}){let Ee=0;return B.map(Ke=>{Ee+=1;const Tt=Ee;let St=x(Ke),Te="";for(;St.length>0;){const Ne=U.exec(St);if(!Ne){Te+=St;break}Te+=St.substring(0,Ne.index),St=St.substring(Ne.index+Ne[0].length),Ne[0][0]==="\\"&&Ne[1]?Te+="\\"+String(Number(Ne[1])+Tt):(Te+=Ne[0],Ne[0]==="("&&Ee++)}return Te}).map(Ke=>`(${Ke})`).join(le)}const j=/\b\B/,J="[a-zA-Z]\\w*",A="[a-zA-Z_]\\w*",ae="\\b\\d+(\\.\\d+)?",H="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",te="\\b(0b[01]+)",ee="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",ve=(B={})=>{const le=/^#![ ]*\//;return B.binary&&(B.begin=E(le,/.*\b/,B.binary,/\b.*/)),a({scope:"meta",begin:le,end:/$/,relevance:0,"on:begin":(Ee,Ke)=>{Ee.index!==0&&Ke.ignoreMatch()}},B)},oe={begin:"\\\\[\\s\\S]",relevance:0},q={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[oe]},L={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[oe]},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(B,le,Ee={}){const Ke=a({scope:"comment",begin:B,end:le,contains:[]},Ee);Ke.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 Tt=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 Ke.contains.push({begin:E(/[ ]+/,"(",Tt,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),Ke},ne=V("//","$"),C=V("/\\*","\\*/"),O=V("#","$"),K={scope:"number",begin:ae,relevance:0},T={scope:"number",begin:H,relevance:0},he={scope:"number",begin:te,relevance:0},_e={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[oe,{begin:/\[/,end:/\]/,relevance:0,contains:[oe]}]},xe={scope:"title",begin:J,relevance:0},He={scope:"title",begin:A,relevance:0},st={begin:"\\.\\s*"+A,relevance:0};var Wt=Object.freeze({__proto__:null,APOS_STRING_MODE:q,BACKSLASH_ESCAPE:oe,BINARY_NUMBER_MODE:he,BINARY_NUMBER_RE:te,COMMENT:V,C_BLOCK_COMMENT_MODE:C,C_LINE_COMMENT_MODE:ne,C_NUMBER_MODE:T,C_NUMBER_RE:H,END_SAME_AS_BEGIN:function(B){return Object.assign(B,{"on:begin":(le,Ee)=>{Ee.data._beginMatch=le[1]},"on:end":(le,Ee)=>{Ee.data._beginMatch!==le[1]&&Ee.ignoreMatch()}})},HASH_COMMENT_MODE:O,IDENT_RE:J,MATCH_NOTHING_RE:j,METHOD_GUARD:st,NUMBER_MODE:K,NUMBER_RE:ae,PHRASAL_WORDS_MODE:Y,QUOTE_STRING_MODE:L,REGEXP_MODE:_e,RE_STARTERS_RE:ee,SHEBANG:ve,TITLE_MODE:xe,UNDERSCORE_IDENT_RE:A,UNDERSCORE_TITLE_MODE:He});function un(B,le){B.input[B.index-1]==="."&&le.ignoreMatch()}function jn(B,le){B.className!==void 0&&(B.scope=B.className,delete B.className)}function At(B,le){le&&B.beginKeywords&&(B.begin="\\b("+B.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",B.__beforeBegin=un,B.keywords=B.keywords||B.beginKeywords,delete B.beginKeywords,B.relevance===void 0&&(B.relevance=0))}function Kt(B,le){Array.isArray(B.illegal)&&(B.illegal=N(...B.illegal))}function rr(B,le){if(B.match){if(B.begin||B.end)throw new Error("begin & end are not supported with match");B.begin=B.match,delete B.match}}function lt(B,le){B.relevance===void 0&&(B.relevance=1)}const kn=(B,le)=>{if(!B.beforeMatch)return;if(B.starts)throw new Error("beforeMatch cannot be used with starts");const Ee=Object.assign({},B);Object.keys(B).forEach(Ke=>{delete B[Ke]}),B.keywords=Ee.keywords,B.begin=E(Ee.beforeMatch,y(Ee.begin)),B.starts={relevance:0,contains:[Object.assign(Ee,{endsParent:!0})]},B.relevance=0,delete Ee.beforeMatch},Kn=["of","and","for","in","not","or","if","then","parent","list","value"],br="keyword";function xr(B,le,Ee=br){const Ke=Object.create(null);return typeof B=="string"?Tt(Ee,B.split(" ")):Array.isArray(B)?Tt(Ee,B):Object.keys(B).forEach(function(St){Object.assign(Ke,xr(B[St],le,St))}),Ke;function Tt(St,Te){le&&(Te=Te.map(Ne=>Ne.toLowerCase())),Te.forEach(function(Ne){const $e=Ne.split("|");Ke[$e[0]]=[St,ni($e[0],$e[1])]})}}function ni(B,le){return le?Number(le):ga(B)?0:1}function ga(B){return Kn.includes(B.toLowerCase())}const Ri={},Vt=B=>{console.error(B)},Vn=(B,...le)=>{console.log(`WARN: ${B}`,...le)},ie=(B,le)=>{Ri[`${B}/${le}`]||(console.log(`Deprecated as of ${B}. ${le}`),Ri[`${B}/${le}`]=!0)},be=new Error;function Fe(B,le,{key:Ee}){let Ke=0;const Tt=B[Ee],St={},Te={};for(let Ne=1;Ne<=le.length;Ne++)Te[Ne+Ke]=Tt[Ne],St[Ne+Ke]=!0,Ke+=M(le[Ne-1]);B[Ee]=Te,B[Ee]._emit=St,B[Ee]._multi=!0}function Qe(B){if(Array.isArray(B.begin)){if(B.skip||B.excludeBegin||B.returnBegin)throw Vt("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),be;if(typeof B.beginScope!="object"||B.beginScope===null)throw Vt("beginScope must be object"),be;Fe(B,B.begin,{key:"beginScope"}),B.begin=$(B.begin,{joinWith:""})}}function Je(B){if(Array.isArray(B.end)){if(B.skip||B.excludeEnd||B.returnEnd)throw Vt("skip, excludeEnd, returnEnd not compatible with endScope: {}"),be;if(typeof B.endScope!="object"||B.endScope===null)throw Vt("endScope must be object"),be;Fe(B,B.end,{key:"endScope"}),B.end=$(B.end,{joinWith:""})}}function Sn(B){B.scope&&typeof B.scope=="object"&&B.scope!==null&&(B.beginScope=B.scope,delete B.scope)}function ir(B){Sn(B),typeof B.beginScope=="string"&&(B.beginScope={_wrap:B.beginScope}),typeof B.endScope=="string"&&(B.endScope={_wrap:B.endScope}),Qe(B),Je(B)}function an(B){function le(Te,Ne){return new RegExp(x(Te),"m"+(B.case_insensitive?"i":"")+(B.unicodeRegex?"u":"")+(Ne?"g":""))}class Ee{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(Ne,$e){$e.position=this.position++,this.matchIndexes[this.matchAt]=$e,this.regexes.push([$e,Ne]),this.matchAt+=M(Ne)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const Ne=this.regexes.map($e=>$e[1]);this.matcherRe=le($(Ne,{joinWith:"|"}),!0),this.lastIndex=0}exec(Ne){this.matcherRe.lastIndex=this.lastIndex;const $e=this.matcherRe.exec(Ne);if(!$e)return null;const D=$e.findIndex((Z,de)=>de>0&&Z!==void 0),F=this.matchIndexes[D];return $e.splice(0,D),Object.assign($e,F)}}class Ke{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(Ne){if(this.multiRegexes[Ne])return this.multiRegexes[Ne];const $e=new Ee;return this.rules.slice(Ne).forEach(([D,F])=>$e.addRule(D,F)),$e.compile(),this.multiRegexes[Ne]=$e,$e}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(Ne,$e){this.rules.push([Ne,$e]),$e.type==="begin"&&this.count++}exec(Ne){const $e=this.getMatcher(this.regexIndex);$e.lastIndex=this.lastIndex;let D=$e.exec(Ne);if(this.resumingScanAtSamePosition()&&!(D&&D.index===this.lastIndex)){const F=this.getMatcher(0);F.lastIndex=this.lastIndex+1,D=F.exec(Ne)}return D&&(this.regexIndex+=D.position+1,this.regexIndex===this.count&&this.considerAll()),D}}function Tt(Te){const Ne=new Ke;return Te.contains.forEach($e=>Ne.addRule($e.begin,{rule:$e,type:"begin"})),Te.terminatorEnd&&Ne.addRule(Te.terminatorEnd,{type:"end"}),Te.illegal&&Ne.addRule(Te.illegal,{type:"illegal"}),Ne}function St(Te,Ne){const $e=Te;if(Te.isCompiled)return $e;[jn,rr,ir,kn].forEach(F=>F(Te,Ne)),B.compilerExtensions.forEach(F=>F(Te,Ne)),Te.__beforeBegin=null,[At,Kt,lt].forEach(F=>F(Te,Ne)),Te.isCompiled=!0;let D=null;return typeof Te.keywords=="object"&&Te.keywords.$pattern&&(Te.keywords=Object.assign({},Te.keywords),D=Te.keywords.$pattern,delete Te.keywords.$pattern),D=D||/\w+/,Te.keywords&&(Te.keywords=xr(Te.keywords,B.case_insensitive)),$e.keywordPatternRe=le(D,!0),Ne&&(Te.begin||(Te.begin=/\B|\b/),$e.beginRe=le($e.begin),!Te.end&&!Te.endsWithParent&&(Te.end=/\B|\b/),Te.end&&($e.endRe=le($e.end)),$e.terminatorEnd=x($e.end)||"",Te.endsWithParent&&Ne.terminatorEnd&&($e.terminatorEnd+=(Te.end?"|":"")+Ne.terminatorEnd)),Te.illegal&&($e.illegalRe=le(Te.illegal)),Te.contains||(Te.contains=[]),Te.contains=[].concat(...Te.contains.map(function(F){return qt(F==="self"?Te:F)})),Te.contains.forEach(function(F){St(F,$e)}),Te.starts&&St(Te.starts,Ne),$e.matcher=Tt($e),$e}if(B.compilerExtensions||(B.compilerExtensions=[]),B.contains&&B.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return B.classNameAliases=a(B.classNameAliases||{}),St(B)}function Jt(B){return B?B.endsWithParent||Jt(B.starts):!1}function qt(B){return B.variants&&!B.cachedVariants&&(B.cachedVariants=B.variants.map(function(le){return a(B,{variants:null},le)})),B.cachedVariants?B.cachedVariants:Jt(B)?a(B,{starts:B.starts?a(B.starts):null}):Object.isFrozen(B)?a(B):B}var wt="11.11.1";class ar extends Error{constructor(le,Ee){super(le),this.name="HTMLInjectionError",this.html=Ee}}const Nn=r,Xa=a,qr=Symbol("nomatch"),Dr=7,$r=function(B){const le=Object.create(null),Ee=Object.create(null),Ke=[];let Tt=!0;const St="Could not find the language '{}', did you forget to load/include a language module?",Te={disableAutodetect:!0,name:"Plain text",contains:[]};let Ne={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:b};function $e(fe){return Ne.noHighlightRe.test(fe)}function D(fe){let De=fe.className+" ";De+=fe.parentNode?fe.parentNode.className:"";const Xe=Ne.languageDetectRe.exec(De);if(Xe){const kt=vt(Xe[1]);return kt||(Vn(St.replace("{}",Xe[1])),Vn("Falling back to no-highlight mode for this block.",fe)),kt?Xe[1]:"no-highlight"}return De.split(/\s+/).find(kt=>$e(kt)||vt(kt))}function F(fe,De,Xe){let kt="",$t="";typeof De=="object"?(kt=fe,Xe=De.ignoreIllegals,$t=De.language):(ie("10.7.0","highlight(lang, code, ...args) has been deprecated."),ie("10.7.0",`Please use highlight(code, options) instead.
535
- https://github.com/highlightjs/highlight.js/issues/2277`),$t=fe,kt=De),Xe===void 0&&(Xe=!0);const Ve={code:kt,language:$t};Ln("before:highlight",Ve);const Rt=Ve.result?Ve.result:Z(Ve.language,Ve.code,Xe);return Rt.code=Ve.code,Ln("after:highlight",Rt),Rt}function Z(fe,De,Xe,kt){const $t=Object.create(null);function Ve(ke,je){return ke.keywords[je]}function Rt(){if(!Ye.keywords){fn.addText(Mt);return}let ke=0;Ye.keywordPatternRe.lastIndex=0;let je=Ye.keywordPatternRe.exec(Mt),We="";for(;je;){We+=Mt.substring(ke,je.index);const mt=Tn.case_insensitive?je[0].toLowerCase():je[0],tn=Ve(Ye,mt);if(tn){const[yr,Ws]=tn;if(fn.addText(We),We="",$t[mt]=($t[mt]||0)+1,$t[mt]<=Dr&&(Ai+=Ws),yr.startsWith("_"))We+=je[0];else{const Ro=Tn.classNameAliases[yr]||yr;ht(je[0],Ro)}}else We+=je[0];ke=Ye.keywordPatternRe.lastIndex,je=Ye.keywordPatternRe.exec(Mt)}We+=Mt.substring(ke),fn.addText(We)}function ln(){if(Mt==="")return;let ke=null;if(typeof Ye.subLanguage=="string"){if(!le[Ye.subLanguage]){fn.addText(Mt);return}ke=Z(Ye.subLanguage,Mt,!0,To[Ye.subLanguage]),To[Ye.subLanguage]=ke._top}else ke=me(Mt,Ye.subLanguage.length?Ye.subLanguage:null);Ye.relevance>0&&(Ai+=ke.relevance),fn.__addSublanguage(ke._emitter,ke.language)}function _t(){Ye.subLanguage!=null?ln():Rt(),Mt=""}function ht(ke,je){ke!==""&&(fn.startScope(je),fn.addText(ke),fn.endScope())}function ri(ke,je){let We=1;const mt=je.length-1;for(;We<=mt;){if(!ke._emit[We]){We++;continue}const tn=Tn.classNameAliases[ke[We]]||ke[We],yr=je[We];tn?ht(yr,tn):(Mt=yr,Rt(),Mt=""),We++}}function ii(ke,je){return ke.scope&&typeof ke.scope=="string"&&fn.openNode(Tn.classNameAliases[ke.scope]||ke.scope),ke.beginScope&&(ke.beginScope._wrap?(ht(Mt,Tn.classNameAliases[ke.beginScope._wrap]||ke.beginScope._wrap),Mt=""):ke.beginScope._multi&&(ri(ke.beginScope,je),Mt="")),Ye=Object.create(ke,{parent:{value:Ye}}),Ye}function ba(ke,je,We){let mt=R(ke.endRe,We);if(mt){if(ke["on:end"]){const tn=new n(ke);ke["on:end"](je,tn),tn.isMatchIgnored&&(mt=!1)}if(mt){for(;ke.endsParent&&ke.parent;)ke=ke.parent;return ke}}if(ke.endsWithParent)return ba(ke.parent,je,We)}function Za(ke){return Ye.matcher.regexIndex===0?(Mt+=ke[0],1):(Oi=!0,0)}function $u(ke){const je=ke[0],We=ke.rule,mt=new n(We),tn=[We.__beforeBegin,We["on:begin"]];for(const yr of tn)if(yr&&(yr(ke,mt),mt.isMatchIgnored))return Za(je);return We.skip?Mt+=je:(We.excludeBegin&&(Mt+=je),_t(),!We.returnBegin&&!We.excludeBegin&&(Mt=je)),ii(We,ke),We.returnBegin?0:je.length}function Yn(ke){const je=ke[0],We=De.substring(ke.index),mt=ba(Ye,ke,We);if(!mt)return qr;const tn=Ye;Ye.endScope&&Ye.endScope._wrap?(_t(),ht(je,Ye.endScope._wrap)):Ye.endScope&&Ye.endScope._multi?(_t(),ri(Ye.endScope,ke)):tn.skip?Mt+=je:(tn.returnEnd||tn.excludeEnd||(Mt+=je),_t(),tn.excludeEnd&&(Mt=je));do Ye.scope&&fn.closeNode(),!Ye.skip&&!Ye.subLanguage&&(Ai+=Ye.relevance),Ye=Ye.parent;while(Ye!==mt.parent);return mt.starts&&ii(mt.starts,ke),tn.returnEnd?0:je.length}function Xs(){const ke=[];for(let je=Ye;je!==Tn;je=je.parent)je.scope&&ke.unshift(je.scope);ke.forEach(je=>fn.openNode(je))}let xa={};function Wa(ke,je){const We=je&&je[0];if(Mt+=ke,We==null)return _t(),0;if(xa.type==="begin"&&je.type==="end"&&xa.index===je.index&&We===""){if(Mt+=De.slice(je.index,je.index+1),!Tt){const mt=new Error(`0 width match regex (${fe})`);throw mt.languageName=fe,mt.badRule=xa.rule,mt}return 1}if(xa=je,je.type==="begin")return $u(je);if(je.type==="illegal"&&!Xe){const mt=new Error('Illegal lexeme "'+We+'" for mode "'+(Ye.scope||"<unnamed>")+'"');throw mt.mode=Ye,mt}else if(je.type==="end"){const mt=Yn(je);if(mt!==qr)return mt}if(je.type==="illegal"&&We==="")return Mt+=`
536
- `,1;if(Zs>1e5&&Zs>je.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Mt+=We,We.length}const Tn=vt(fe);if(!Tn)throw Vt(St.replace("{}",fe)),new Error('Unknown language: "'+fe+'"');const Co=an(Tn);let Ja="",Ye=kt||Co;const To={},fn=new Ne.__emitter(Ne);Xs();let Mt="",Ai=0,ai=0,Zs=0,Oi=!1;try{if(Tn.__emitTokens)Tn.__emitTokens(De,fn);else{for(Ye.matcher.considerAll();;){Zs++,Oi?Oi=!1:Ye.matcher.considerAll(),Ye.matcher.lastIndex=ai;const ke=Ye.matcher.exec(De);if(!ke)break;const je=De.substring(ai,ke.index),We=Wa(je,ke);ai=ke.index+We}Wa(De.substring(ai))}return fn.finalize(),Ja=fn.toHTML(),{language:fe,value:Ja,relevance:Ai,illegal:!1,_emitter:fn,_top:Ye}}catch(ke){if(ke.message&&ke.message.includes("Illegal"))return{language:fe,value:Nn(De),illegal:!0,relevance:0,_illegalBy:{message:ke.message,index:ai,context:De.slice(ai-100,ai+100),mode:ke.mode,resultSoFar:Ja},_emitter:fn};if(Tt)return{language:fe,value:Nn(De),illegal:!1,relevance:0,errorRaised:ke,_emitter:fn,_top:Ye};throw ke}}function de(fe){const De={value:Nn(fe),illegal:!1,relevance:0,_top:Te,_emitter:new Ne.__emitter(Ne)};return De._emitter.addText(fe),De}function me(fe,De){De=De||Ne.languages||Object.keys(le);const Xe=de(fe),kt=De.filter(vt).filter(ot).map(_t=>Z(_t,fe,!1));kt.unshift(Xe);const $t=kt.sort((_t,ht)=>{if(_t.relevance!==ht.relevance)return ht.relevance-_t.relevance;if(_t.language&&ht.language){if(vt(_t.language).supersetOf===ht.language)return 1;if(vt(ht.language).supersetOf===_t.language)return-1}return 0}),[Ve,Rt]=$t,ln=Ve;return ln.secondBest=Rt,ln}function Ce(fe,De,Xe){const kt=De&&Ee[De]||Xe;fe.classList.add("hljs"),fe.classList.add(`language-${kt}`)}function ye(fe){let De=null;const Xe=D(fe);if($e(Xe))return;if(Ln("before:highlightElement",{el:fe,language:Xe}),fe.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",fe);return}if(fe.children.length>0&&(Ne.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(fe)),Ne.throwUnescapedHTML))throw new ar("One of your code blocks includes unescaped HTML.",fe.innerHTML);De=fe;const kt=De.textContent,$t=Xe?F(kt,{language:Xe,ignoreIllegals:!0}):me(kt);fe.innerHTML=$t.value,fe.dataset.highlighted="yes",Ce(fe,Xe,$t.language),fe.result={language:$t.language,re:$t.relevance,relevance:$t.relevance},$t.secondBest&&(fe.secondBest={language:$t.secondBest.language,relevance:$t.secondBest.relevance}),Ln("after:highlightElement",{el:fe,result:$t,text:kt})}function Se(fe){Ne=Xa(Ne,fe)}const ze=()=>{Me(),ie("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function Ie(){Me(),ie("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let Ue=!1;function Me(){function fe(){Me()}if(document.readyState==="loading"){Ue||window.addEventListener("DOMContentLoaded",fe,!1),Ue=!0;return}document.querySelectorAll(Ne.cssSelector).forEach(ye)}function yt(fe,De){let Xe=null;try{Xe=De(B)}catch(kt){if(Vt("Language definition for '{}' could not be registered.".replace("{}",fe)),Tt)Vt(kt);else throw kt;Xe=Te}Xe.name||(Xe.name=fe),le[fe]=Xe,Xe.rawDefinition=De.bind(null,B),Xe.aliases&&Yt(Xe.aliases,{languageName:fe})}function rt(fe){delete le[fe];for(const De of Object.keys(Ee))Ee[De]===fe&&delete Ee[De]}function Ot(){return Object.keys(le)}function vt(fe){return fe=(fe||"").toLowerCase(),le[fe]||le[Ee[fe]]}function Yt(fe,{languageName:De}){typeof fe=="string"&&(fe=[fe]),fe.forEach(Xe=>{Ee[Xe.toLowerCase()]=De})}function ot(fe){const De=vt(fe);return De&&!De.disableAutodetect}function sn(fe){fe["before:highlightBlock"]&&!fe["before:highlightElement"]&&(fe["before:highlightElement"]=De=>{fe["before:highlightBlock"](Object.assign({block:De.el},De))}),fe["after:highlightBlock"]&&!fe["after:highlightElement"]&&(fe["after:highlightElement"]=De=>{fe["after:highlightBlock"](Object.assign({block:De.el},De))})}function Lt(fe){sn(fe),Ke.push(fe)}function Gr(fe){const De=Ke.indexOf(fe);De!==-1&&Ke.splice(De,1)}function Ln(fe,De){const Xe=fe;Ke.forEach(function(kt){kt[Xe]&&kt[Xe](De)})}function dn(fe){return ie("10.7.0","highlightBlock will be removed entirely in v12.0"),ie("10.7.0","Please use highlightElement now."),ye(fe)}Object.assign(B,{highlight:F,highlightAuto:me,highlightAll:Me,highlightElement:ye,highlightBlock:dn,configure:Se,initHighlighting:ze,initHighlightingOnLoad:Ie,registerLanguage:yt,unregisterLanguage:rt,listLanguages:Ot,getLanguage:vt,registerAliases:Yt,autoDetection:ot,inherit:Xa,addPlugin:Lt,removePlugin:Gr}),B.debugMode=function(){Tt=!1},B.safeMode=function(){Tt=!0},B.versionString=wt,B.regex={concat:E,lookahead:y,either:N,optional:_,anyNumberOfTimes:v};for(const fe in Wt)typeof Wt[fe]=="object"&&e(Wt[fe]);return Object.assign(B,Wt),B},zn=$r({});return zn.newInstance=()=>$r({}),Oh=zn,zn.HighlightJS=zn,zn.default=zn,Oh}var sI=aI();const lI=Nu(sI),Yy={},oI="hljs-";function cI(e){const n=lI.newInstance();return e&&o(e),{highlight:r,highlightAuto:a,listLanguages:l,register:o,registerAlias:u,registered:d};function r(h,m,b){const x=b||Yy,y=typeof x.prefix=="string"?x.prefix:oI;if(!n.getLanguage(h))throw new Error("Unknown language: `"+h+"` is not registered");n.configure({__emitter:uI,classPrefix:y});const v=n.highlight(m,{ignoreIllegals:!0,language:h});if(v.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:v.errorRaised});const _=v._emitter.root,E=_.data;return E.language=v.language,E.relevance=v.relevance,_}function a(h,m){const x=(m||Yy).subset||l();let y=-1,v=0,_;for(;++y<x.length;){const E=x[y];if(!n.getLanguage(E))continue;const w=r(E,h,m);w.data&&w.data.relevance!==void 0&&w.data.relevance>v&&(v=w.data.relevance,_=w)}return _||{type:"root",children:[],data:{language:void 0,relevance:v}}}function l(){return n.listLanguages()}function o(h,m){if(typeof h=="string")n.registerLanguage(h,m);else{let b;for(b in h)Object.hasOwn(h,b)&&n.registerLanguage(b,h[b])}}function u(h,m){if(typeof h=="string")n.registerAliases(typeof m=="string"?m:[...m],{languageName:h});else{let b;for(b in h)if(Object.hasOwn(h,b)){const x=h[b];n.registerAliases(typeof x=="string"?x:[...x],{languageName:b})}}}function d(h){return!!n.getLanguage(h)}}class uI{constructor(n){this.options=n,this.root={type:"root",children:[],data:{language:void 0,relevance:0}},this.stack=[this.root]}addText(n){if(n==="")return;const r=this.stack[this.stack.length-1],a=r.children[r.children.length-1];a&&a.type==="text"?a.value+=n:r.children.push({type:"text",value:n})}startScope(n){this.openNode(String(n))}endScope(){this.closeNode()}__addSublanguage(n,r){const a=this.stack[this.stack.length-1],l=n.root.children;r?a.children.push({type:"element",tagName:"span",properties:{className:[r]},children:l}):a.children.push(...l)}openNode(n){const r=this,a=n.split(".").map(function(u,d){return d?u+"_".repeat(d):r.options.classPrefix+u}),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 dI={};function fI(e){const n=e||dI,r=n.aliases,a=n.detect||!1,l=n.languages||iI,o=n.plainText,u=n.prefix,d=n.subset;let h="hljs";const m=cI(l);if(r&&m.registerAlias(r),u){const b=u.indexOf("-");h=b===-1?u:u.slice(0,b)}return function(b,x){qu(b,"element",function(y,v,_){if(y.tagName!=="code"||!_||_.type!=="element"||_.tagName!=="pre")return;const E=hI(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 w=Aj(y,{whitespace:"pre"});let N;try{N=E?m.highlight(E,w,{prefix:u}):m.highlightAuto(w,{prefix:u,subset:d})}catch(M){const R=M;if(E&&/Unknown language/.test(R.message)){x.message("Cannot highlight as `"+E+"`, it’s not registered",{ancestors:[_,y],cause:R,place:y.position,ruleId:"missing-language",source:"rehype-highlight"});return}throw R}!E&&N.data&&N.data.language&&y.properties.className.push("language-"+N.data.language),N.children.length>0&&(y.children=N.children)})}}function hI(e){const n=e.properties.className;let r=-1;if(!Array.isArray(n))return;let a;for(;++r<n.length;){const l=String(n[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 mI={h1({node:e,className:n,...r}){return f.jsx("h1",{className:ge("mt-8 mb-4 text-2xl font-semibold tracking-tight text-zinc-900 dark:text-zinc-100 first:mt-0",n),...r})},h2({node:e,className:n,...r}){return f.jsx("h2",{className:ge("mt-8 mb-3 text-xl font-semibold tracking-tight text-zinc-900 dark:text-zinc-100",n),...r})},h3({node:e,className:n,...r}){return f.jsx("h3",{className:ge("mt-6 mb-2 text-lg font-semibold text-zinc-900 dark:text-zinc-100",n),...r})},h4({node:e,className:n,...r}){return f.jsx("h4",{className:ge("mt-4 mb-2 text-base font-semibold text-zinc-900 dark:text-zinc-100",n),...r})},p({node:e,className:n,...r}){return f.jsx("p",{className:ge("mb-4 leading-7 text-zinc-700 dark:text-zinc-300 last:mb-0",n),...r})},a({node:e,className:n,...r}){return f.jsx("a",{className:ge("font-medium text-blue-600 underline underline-offset-4 hover:text-blue-500 dark:text-blue-400 dark:hover:text-blue-300",n),target:"_blank",rel:"noopener noreferrer",...r})},ul({node:e,className:n,...r}){return f.jsx("ul",{className:ge("mb-4 ml-6 list-disc space-y-1 text-zinc-700 dark:text-zinc-300",n),...r})},ol({node:e,className:n,...r}){return f.jsx("ol",{className:ge("mb-4 ml-6 list-decimal space-y-1 text-zinc-700 dark:text-zinc-300",n),...r})},li({node:e,className:n,...r}){return f.jsx("li",{className:ge("leading-7",n),...r})},blockquote({node:e,className:n,...r}){return f.jsx("blockquote",{className:ge("mb-4 border-l-4 border-zinc-300 pl-4 italic text-zinc-600 dark:border-zinc-700 dark:text-zinc-400",n),...r})},hr({node:e,...n}){return f.jsx("hr",{className:"my-6 border-zinc-200 dark:border-zinc-800",...n})},strong({node:e,className:n,...r}){return f.jsx("strong",{className:ge("font-semibold text-zinc-900 dark:text-zinc-100",n),...r})},code({node:e,className:n,children:r,...a}){return n?.includes("hljs")?f.jsx("code",{className:ge("text-sm",n),...a,children:r}):f.jsx("code",{className:ge("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",n),...a,children:r})},pre({node:e,className:n,...r}){return f.jsx("pre",{className:ge("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",n),...r})},table({node:e,className:n,...r}){return f.jsx("div",{className:"mb-4 overflow-x-auto rounded-lg border border-zinc-200 dark:border-zinc-800",children:f.jsx("table",{className:ge("w-full text-sm",n),...r})})},thead({node:e,className:n,...r}){return f.jsx("thead",{className:ge("bg-zinc-50 dark:bg-zinc-900",n),...r})},th({node:e,className:n,...r}){return f.jsx("th",{className:ge("border-b border-zinc-200 px-4 py-2 text-left font-medium text-zinc-900 dark:border-zinc-800 dark:text-zinc-100",n),...r})},td({node:e,className:n,...r}){return f.jsx("td",{className:ge("border-b border-zinc-200 px-4 py-2 text-zinc-700 dark:border-zinc-800 dark:text-zinc-300",n),...r})},img({node:e,className:n,...r}){return f.jsx("img",{className:ge("mb-4 max-w-full rounded-lg",n),...r})}};function Pr({content:e,className:n}){return f.jsx("div",{className:ge("ocr-markdown",n),children:f.jsx(dD,{remarkPlugins:[wj],rehypePlugins:[fI],components:mI,children:e})})}const pI={AGREE:{icon:IT,borderColor:"border-l-emerald-500",bgColor:"bg-emerald-500/5",label:"Agree"},CHALLENGE:{icon:jR,borderColor:"border-l-red-500",bgColor:"bg-red-500/5",label:"Challenge"},CONNECT:{icon:KT,borderColor:"border-l-blue-500",bgColor:"bg-blue-500/5",label:"Connect"},SURFACE:{icon:$T,borderColor:"border-l-amber-500",bgColor:"bg-amber-500/5",label:"Surface"}};function gI({type:e,content:n,reviewer:r,className:a}){const l=pI[e],o=l.icon;return f.jsxs("div",{className:ge("rounded-r-lg border-l-4 p-4",l.borderColor,l.bgColor,a),children:[f.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[f.jsx(o,{className:"h-4 w-4 text-zinc-600 dark:text-zinc-400"}),f.jsx("span",{className:"text-sm font-semibold text-zinc-900 dark:text-zinc-100",children:l.label}),r&&f.jsxs("span",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:["— ",r]})]}),f.jsx(Pr,{content:n})]})}function bI(e){const n=[],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(),n.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(),n.push(o)),n}const xI={APPROVE:{icon:T1,bg:"bg-emerald-500/10",border:"border-emerald-500/30",text:"text-emerald-700 dark:text-emerald-400",label:"Approved"},"REQUEST CHANGES":{icon:R1,bg:"bg-red-500/10",border:"border-red-500/30",text:"text-red-700 dark:text-red-400",label:"Changes Requested"},"NEEDS DISCUSSION":{icon:XT,bg:"bg-amber-500/10",border:"border-amber-500/30",text:"text-amber-700 dark:text-amber-400",label:"Needs Discussion"}};function yI({verdict:e,blockerCount:n,suggestionCount:r,shouldFixCount:a,className:l}){const o=xI[e],u=o.icon;return f.jsxs("div",{className:ge("flex items-center justify-between rounded-lg border p-4",o.bg,o.border,l),children:[f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx(u,{className:ge("h-6 w-6",o.text)}),f.jsx("span",{className:ge("text-lg font-semibold",o.text),children:o.label})]}),f.jsxs("div",{className:"flex items-center gap-4 text-sm",children:[n!=null&&f.jsx(Mh,{label:"Blockers",value:n,className:n>0?"text-red-600 dark:text-red-400":void 0}),a!=null&&f.jsx(Mh,{label:"Should Fix",value:a,className:a>0?"text-amber-600 dark:text-amber-400":void 0}),r!=null&&f.jsx(Mh,{label:"Suggestions",value:r})]})]})}function Mh({label:e,value:n,className:r}){return f.jsxs("div",{className:"flex items-center gap-1.5",children:[f.jsx("span",{className:ge("font-semibold tabular-nums",r??"text-zinc-700 dark:text-zinc-300"),children:n}),f.jsx("span",{className:"text-zinc-500 dark:text-zinc-400",children:e})]})}function vI({reviewer:e,onClose:n}){const{data:r,isLoading:a,error:l}=vn({queryKey:["reviewer-prompt",e?.id],queryFn:()=>Zt(`/api/reviewers/${e.id}/prompt`),enabled:e!=null});return S.useEffect(()=>{if(!e)return;const o=u=>{u.key==="Escape"&&n()};return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)},[e,n]),e?f.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm",onClick:n,children:f.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:[f.jsxs("div",{className:"flex items-center gap-3 border-b border-zinc-200 px-5 py-3.5 dark:border-zinc-700",children:[f.jsx(Bu,{icon:e.icon,className:"h-5 w-5 shrink-0 text-zinc-500 dark:text-zinc-400"}),f.jsxs("div",{className:"min-w-0 flex-1",children:[f.jsx("h2",{className:"text-sm font-semibold text-zinc-900 dark:text-zinc-100",children:e.name}),f.jsx("p",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:e.description})]}),f.jsx("button",{type:"button",onClick:n,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:f.jsx(gr,{className:"h-4 w-4"})})]}),(e.known_for||e.philosophy||e.focus_areas.length>0)&&f.jsxs("div",{className:"border-b border-zinc-200 px-5 py-3 dark:border-zinc-700",children:[e.known_for&&f.jsxs("p",{className:"mb-1.5 text-xs",children:[f.jsx("span",{className:"font-semibold text-zinc-600 dark:text-zinc-300",children:"Known for: "}),f.jsx("span",{className:"text-zinc-500 dark:text-zinc-400",children:e.known_for})]}),e.philosophy&&f.jsxs("p",{className:"mb-2 text-xs italic text-zinc-500 dark:text-zinc-400",children:["“",e.philosophy,"”"]}),e.focus_areas.length>0&&f.jsx("div",{className:"flex flex-wrap gap-1",children:e.focus_areas.map(o=>f.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))})]}),f.jsxs("div",{className:"flex-1 overflow-y-auto px-6 py-5",children:[a&&f.jsx("p",{className:"text-sm text-zinc-400 dark:text-zinc-500",children:"Loading prompt..."}),l&&f.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&&f.jsx(Pr,{content:r.content})]})]})}):null}function kI({open:e,onClose:n}){const{socket:r}=Ci(),[a,l]=S.useState(""),[o,u]=S.useState(""),[d,h]=S.useState(""),[m,b]=S.useState(null),[x,y]=S.useState(!1),v=S.useRef(null),_=S.useRef(null),E=MA(a),w=E.length>0&&o.trim().length>0&&m===null;S.useEffect(()=>{e&&(l(""),u(""),h(""),b(null),y(!1),setTimeout(()=>v.current?.focus(),50))},[e]),S.useEffect(()=>{if(!e)return;const M=R=>{R.key==="Escape"&&m===null&&n()};return window.addEventListener("keydown",M),()=>window.removeEventListener("keydown",M)},[e,n,m]),dt("command:started",M=>{M.command.startsWith("create-reviewer")&&b(M.execution_id)}),dt("command:output",M=>{M.execution_id===m&&(h(R=>R+M.content),setTimeout(()=>{_.current&&(_.current.scrollTop=_.current.scrollHeight)},0))}),dt("command:finished",M=>{M.execution_id===m&&(b(null),y(!0))});const N=S.useCallback(()=>{if(!w||!r)return;h(""),y(!1);const M=`create-reviewer ${E} --focus "${o.replace(/"/g,'\\"')}"`;r.emit("command:run",{command:M})},[w,r,E,o]);return e?f.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm",children:f.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:[f.jsxs("div",{className:"flex items-center justify-between border-b border-zinc-200 px-5 py-3.5 dark:border-zinc-700",children:[f.jsx("h2",{className:"text-sm font-semibold text-zinc-900 dark:text-zinc-100",children:"Create Reviewer"}),f.jsx("button",{type:"button",onClick:n,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:f.jsx(gr,{className:"h-4 w-4"})})]}),f.jsxs("div",{className:"space-y-4 px-5 py-4",children:[f.jsxs("div",{children:[f.jsx("label",{className:"mb-1 block text-xs font-medium text-zinc-700 dark:text-zinc-300",children:"Reviewer Name"}),f.jsx("input",{ref:v,type:"text",value:a,onChange:M=>l(M.target.value),placeholder:"e.g. API Design, Rust Safety, GraphQL",disabled:m!==null,className:ge("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&&f.jsxs("p",{className:"mt-1 text-[11px] text-zinc-400 dark:text-zinc-500",children:["Slug: ",f.jsx("code",{className:"rounded bg-zinc-100 px-1 py-0.5 dark:bg-zinc-800",children:E})]})]}),f.jsxs("div",{children:[f.jsx("label",{className:"mb-1 block text-xs font-medium text-zinc-700 dark:text-zinc-300",children:"What should this reviewer focus on?"}),f.jsx("textarea",{value:o,onChange:M=>u(M.target.value),placeholder:"e.g. REST API design, backwards compatibility, versioning, error response consistency, pagination patterns",rows:3,disabled:m!==null,className:ge("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")})]})]}),d&&f.jsx("div",{ref:_,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:f.jsx("pre",{className:"whitespace-pre-wrap",children:d})}),f.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?f.jsx("button",{type:"button",onClick:n,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"}):f.jsxs(f.Fragment,{children:[f.jsx("button",{type:"button",onClick:n,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"}),f.jsx("button",{type:"button",onClick:N,disabled:!w,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?f.jsxs(f.Fragment,{children:[f.jsx(da,{className:"h-3 w-3 animate-spin"}),"Creating..."]}):f.jsxs(f.Fragment,{children:[f.jsx(Ua,{className:"h-3 w-3"}),"Create"]})})]})})]})}):null}function _I(){const{reviewers:e,isLoaded:n}=L1(),{isAvailable:r}=Bm(),{socket:a}=Ci(),[l,o]=S.useState(""),[u,d]=S.useState(new Set),[h,m]=S.useState(null),[b,x]=S.useState(!1),[y,v]=S.useState(null),_=S.useMemo(()=>I1(e,l),[e,l]),E=S.useMemo(()=>B1(_),[_]),w=h?e.find(U=>U.id===h)??null:null;function N(U){d($=>{const j=new Set($);return j.has(U)?j.delete(U):j.add(U),j})}const M=y!==null;dt("command:started",U=>{U.command.startsWith("sync-reviewers")&&v(U.execution_id)}),dt("command:finished",U=>{U.execution_id===y&&v(null)});const R=S.useCallback(()=>{!a||M||a.emit("command:run",{command:"sync-reviewers"})},[a,M]);return f.jsxs("div",{className:"space-y-6",children:[f.jsxs("div",{children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("h1",{className:"text-2xl font-semibold",children:"Review Team"}),f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsxs("button",{type:"button",onClick:R,disabled:!r||M,title:r?"Sync reviewer metadata":"AI CLI required",className:ge("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:[M?f.jsx(da,{className:"h-3.5 w-3.5 animate-spin"}):f.jsx(po,{className:"h-3.5 w-3.5"}),"Sync"]}),f.jsxs("button",{type:"button",onClick:()=>x(!0),disabled:!r,title:r?"Create a new reviewer":"AI CLI required to create reviewers",className:ge("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:[f.jsx(Ua,{className:"h-3.5 w-3.5"}),"Create Reviewer"]})]})]}),f.jsx("p",{className:"mt-1 text-sm text-zinc-500 dark:text-zinc-400",children:"Manage your AI reviewer personas."})]}),f.jsxs("div",{className:"relative",children:[f.jsx(ju,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-zinc-400"}),f.jsx("input",{type:"text",value:l,onChange:U=>o(U.target.value),placeholder:"Search reviewers...",className:ge("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")})]}),n?e.length===0?f.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:[f.jsx(j1,{className:"mx-auto mb-3 h-8 w-8 text-zinc-300 dark:text-zinc-600"}),f.jsx("h3",{className:"text-sm font-medium text-zinc-900 dark:text-zinc-100",children:"No reviewers found"}),f.jsxs("p",{className:"mt-1 text-sm text-zinc-500 dark:text-zinc-400",children:["Click ",f.jsx("strong",{children:"Sync"})," above or run"," ",f.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."]})]}):E.length===0?f.jsx("p",{className:"py-8 text-center text-sm text-zinc-400 dark:text-zinc-500",children:"No reviewers match your search."}):f.jsx("div",{className:"space-y-6",children:E.map(([U,$])=>{const j=u.has(U),J=yu[U];return f.jsxs("div",{children:[f.jsxs("button",{type:"button",onClick:()=>N(U),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:[j?f.jsx(Va,{className:"h-3.5 w-3.5"}):f.jsx($s,{className:"h-3.5 w-3.5"}),J.label,f.jsxs("span",{className:"font-normal text-zinc-300 dark:text-zinc-600",children:["(",$.length,")"]})]}),!j&&f.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",children:$.map(A=>f.jsx(eO,{reviewer:A,onViewPrompt:m},A.id))})]},U)})}):f.jsx("p",{className:"text-sm text-zinc-400 dark:text-zinc-500",children:"Loading reviewers..."}),f.jsx(vI,{reviewer:w,onClose:()=>m(null)}),f.jsx(kI,{open:b,onClose:()=>x(!1)})]})}function u_({value:e,max:n,className:r,showLabel:a=!1,size:l="md"}){const o=n>0?Math.round(e/n*100):0,u=Math.min(100,Math.max(0,o));return f.jsxs("div",{className:ge("flex items-center gap-2",r),children:[f.jsx("div",{className:ge("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":n,"aria-label":`${e} of ${n} (${u}%)`,children:f.jsx("div",{className:ge("h-full rounded-full transition-all duration-300",u===100?"bg-emerald-500":u>50?"bg-blue-500":"bg-amber-500"),style:{width:`${u}%`}})}),a&&f.jsxs("span",{className:"text-xs tabular-nums text-zinc-500 dark:text-zinc-400",children:[e,"/",n]})]})}function EI({file:e,onToggle:n,highlighted:r}){const{data:a}=Ks();return f.jsxs("label",{"data-file-id":e.id,className:ge("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:[f.jsx("input",{type:"checkbox",checked:e.is_reviewed,onChange:l=>n(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"}),f.jsx(Du,{className:"h-4 w-4 shrink-0 text-zinc-400"}),f.jsxs("div",{className:"min-w-0 flex-1",children:[f.jsxs("span",{className:"flex items-center gap-1.5",children:[a?f.jsx("a",{href:gu(a.ide,a.projectRoot,e.file_path),onClick:l=>l.stopPropagation(),className:ge("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}):f.jsx("span",{className:ge("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&&f.jsx(jm,{className:"h-3 w-3 shrink-0 text-zinc-400 opacity-0 transition-opacity group-hover:opacity-100"})]}),e.role&&f.jsx("span",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:e.role})]}),f.jsxs("div",{className:"flex items-center gap-2 text-xs tabular-nums",children:[e.lines_added>0&&f.jsxs("span",{className:"flex items-center gap-0.5 text-emerald-600 dark:text-emerald-400",children:[f.jsx(Ua,{className:"h-3 w-3"}),e.lines_added]}),e.lines_deleted>0&&f.jsxs("span",{className:"flex items-center gap-0.5 text-red-600 dark:text-red-400",children:[f.jsx(xu,{className:"h-3 w-3"}),e.lines_deleted]})]})]})}function wI({section:e,onToggleFile:n}){const[r,a]=S.useState(!1),[l,o]=S.useState(null),u=S.useRef(null),{data:d}=Ks();S.useEffect(()=>{!r||l==null||!u.current||requestAnimationFrame(()=>{u.current?.querySelector(`[data-file-id="${l}"]`)?.scrollIntoView({behavior:"smooth",block:"nearest"})})},[r,l]);const h=S.useCallback(m=>{if(m.stopPropagation(),!d||e.files.length===0)return;a(!0);const b=e.files.find(E=>!E.is_reviewed);o(b?.id??e.files[0]?.id??null);const x=e.files.filter(E=>!E.is_reviewed),v=(x.length>0?x:e.files).map(E=>gu(d.ide,d.projectRoot,E.file_path));function _(E){if(E>=v.length)return;const w=document.createElement("iframe");w.style.display="none",w.src=v[E],document.body.appendChild(w),setTimeout(()=>{w.remove(),_(E+1)},500)}_(0)},[d,e.files]);return f.jsxs("div",{className:"rounded-lg border border-zinc-200 bg-white dark:border-zinc-800 dark:bg-zinc-900",children:[f.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:[f.jsx("div",{className:"mt-0.5 text-zinc-400",children:r?f.jsx($s,{className:"h-4 w-4"}):f.jsx(Va,{className:"h-4 w-4"})}),f.jsxs("div",{className:"min-w-0 flex-1",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(RT,{className:"h-4 w-4 text-zinc-400"}),f.jsxs("span",{className:"text-sm font-medium text-zinc-900 dark:text-zinc-100",children:[e.section_number,". ",e.title]}),f.jsxs("span",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:[e.file_count," ",e.file_count===1?"file":"files"]}),d&&e.files.length>0&&f.jsxs("button",{onClick:h,title:`Open all ${e.file_count} files in ${d.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:[f.jsx(CT,{className:"h-3 w-3"}),"Open all"]})]}),e.description&&f.jsx("p",{className:"mt-1 text-xs text-zinc-500 dark:text-zinc-400",children:e.description}),f.jsx("div",{className:"mt-2",children:f.jsx(u_,{value:e.reviewed_count,max:e.file_count,showLabel:!0,size:"sm"})})]})]}),r&&f.jsx("div",{ref:u,className:ge("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?f.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=>f.jsx(EI,{file:m,highlighted:m.id===l,onToggle:b=>{if(n(m.id,b),b&&m.id===l){const x=e.files.find(y=>y.id!==m.id&&!y.is_reviewed);o(x?.id??null)}}},m.id))})]})}function SI({onConfirm:e,isPending:n}){const[r,a]=S.useState(!1),l=S.useRef(null),o=S.useCallback(()=>a(!1),[]);return S.useEffect(()=>{if(!r)return;const u=d=>{d.key==="Escape"&&o()};return document.addEventListener("keydown",u),l.current?.focus(),()=>document.removeEventListener("keydown",u)},[r,o]),f.jsxs(f.Fragment,{children:[f.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:[f.jsx(HR,{className:"h-3.5 w-3.5"}),"Clear Progress"]}),r&&f.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[f.jsx("div",{className:"fixed inset-0 bg-black/50",onClick:o}),f.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:[f.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:f.jsx(gr,{className:"h-4 w-4"})}),f.jsx("h3",{id:"clear-progress-title",className:"text-lg font-semibold text-zinc-900 dark:text-zinc-100",children:"Clear all progress?"}),f.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."}),f.jsxs("div",{className:"mt-6 flex justify-end gap-3",children:[f.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"}),f.jsx("button",{onClick:()=>{e(),a(!1)},disabled:n,className:ge("rounded-md bg-red-600 px-3 py-1.5 text-sm font-medium text-white transition-colors hover:bg-red-700",n&&"cursor-not-allowed opacity-50"),children:n?"Clearing...":"Clear Progress"})]})]})]})]})}function NI(e,n){const r=Fn(),a=["sessions",e,"runs",n],l=vn({queryKey:a,queryFn:()=>Zt(`/api/sessions/${e}/runs/${n}`),enabled:!!e&&n>0});return dt("artifact:updated",()=>{r.invalidateQueries({queryKey:a})}),l}function zI(e){return vn({queryKey:["sessions",e,"artifacts","map"],queryFn:()=>Zt(`/api/sessions/${e}/artifacts/map`),enabled:!!e})}function CI(e,n){const r=Fn(),a=["sessions",e,"runs",n];return Mu({mutationFn:async({fileId:l,isReviewed:o})=>Zt(`/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 u=r.getQueryData(a);return u&&r.setQueryData(a,{...u,sections:u.sections.map(d=>({...d,reviewed_count:d.files.some(h=>h.id===l)?d.reviewed_count+(o?1:-1):d.reviewed_count,files:d.files.map(h=>h.id===l?{...h,is_reviewed:o,reviewed_at:o?new Date().toISOString():null}:h)}))}),{previous:u}},onError:(l,o,u)=>{u?.previous&&r.setQueryData(a,u.previous)},onSettled:()=>{r.invalidateQueries({queryKey:a})}})}function TI(e,n){const r=Fn();return Mu({mutationFn:async a=>Zt(`/api/map-runs/${a}/progress`,{method:"DELETE"}),onSuccess:()=>{r.invalidateQueries({queryKey:["sessions",e,"runs",n]})}})}function RI({sessionId:e}){const[n,r]=S.useState(!1),{data:a,isLoading:l}=zI(e),o=S.useRef(null),u=S.useCallback(()=>r(!1),[]);return S.useEffect(()=>{if(!n)return;const d=h=>{h.key==="Escape"&&u()};return document.addEventListener("keydown",d),o.current?.focus(),()=>document.removeEventListener("keydown",d)},[n,u]),f.jsxs(f.Fragment,{children:[f.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:[f.jsx(_T,{className:"h-3.5 w-3.5"}),"View Raw Map"]}),n&&f.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[f.jsx("div",{className:"fixed inset-0 bg-black/50",onClick:u}),f.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:[f.jsxs("div",{className:"flex items-center justify-between border-b border-zinc-200 px-6 py-4 dark:border-zinc-800",children:[f.jsx("h3",{id:"raw-map-title",className:"text-lg font-semibold text-zinc-900 dark:text-zinc-100",children:"Raw Map Output"}),f.jsx("button",{onClick:u,className:"text-zinc-400 hover:text-zinc-600 dark:hover:text-zinc-300","aria-label":"Close",children:f.jsx(gr,{className:"h-5 w-5"})})]}),f.jsx("div",{className:"flex-1 overflow-y-auto px-6 py-4",children:l?f.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Loading map content..."}):a?.content?f.jsx(Pr,{content:a.content}):f.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"No map content available."})})]})]})]})}const AI="modulepreload",OI=function(e){return"/"+e},Qy={},MI=function(n,r,a){let l=Promise.resolve();if(r&&r.length>0){let u=function(m){return Promise.all(m.map(b=>Promise.resolve(b).then(x=>({status:"fulfilled",value:x}),x=>({status:"rejected",reason:x}))))};document.getElementsByTagName("link");const d=document.querySelector("meta[property=csp-nonce]"),h=d?.nonce||d?.getAttribute("nonce");l=u(r.map(m=>{if(m=OI(m),m in Qy)return;Qy[m]=!0;const b=m.endsWith(".css"),x=b?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${m}"]${x}`))return;const y=document.createElement("link");if(y.rel=b?"stylesheet":AI,b||(y.as="script"),y.crossOrigin="",y.href=m,h&&y.setAttribute("nonce",h),document.head.appendChild(y),b)return new Promise((v,_)=>{y.addEventListener("load",v),y.addEventListener("error",()=>_(new Error(`Unable to preload CSS for ${m}`)))})}))}function o(u){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=u,window.dispatchEvent(d),!d.defaultPrevented)throw u}return l.then(u=>{for(const d of u||[])d.status==="rejected"&&o(d.reason);return n().catch(o)})},DI=S.lazy(()=>MI(()=>import("./mermaid-renderer-PPIt-kY4.js").then(e=>e.bC),[]));function jI({sessionId:e,runNumber:n,sections:r,onSectionClick:a}){const{resolved:l}=Lv(),{data:o,isLoading:u}=vn({queryKey:["sessions",e,"runs",n,"graph"],queryFn:async()=>{try{return await Zt(`/api/sessions/${e}/runs/${n}/graph`)}catch(m){if(m instanceof Error&&m.message.startsWith("404:"))return null;throw m}},enabled:!!e&&n>0,retry:!1}),d=S.useMemo(()=>o?.dependencies?LI(o.dependencies,r,l):null,[o?.dependencies,r,l]),h=S.useCallback(m=>{const b=r.find(x=>ro(x.title)===m);b&&a&&a(b.id)},[r,a]);return u||!d?null:f.jsxs("div",{className:"overflow-hidden rounded-lg border border-zinc-200 dark:border-zinc-800",children:[f.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:[f.jsx(Gs,{className:"h-4 w-4 text-zinc-500 dark:text-zinc-400"}),f.jsx("span",{className:"text-sm font-medium",children:"Section Dependencies"})]}),f.jsx("div",{className:"p-4",children:f.jsx(S.Suspense,{fallback:f.jsx("div",{className:"h-64 animate-pulse rounded-lg bg-zinc-100 dark:bg-zinc-800"}),children:f.jsx(DI,{definition:d,onNodeClick:h})})})]})}function LI(e,n,r){if(n.length===0)return null;const a=r==="dark",l=["graph TD"];for(const o of n){const u=ro(o.title),d=o.reviewed_count,h=o.file_count,m=`${o.title}<br/>${d}/${h} files`;l.push(` ${u}["${m}"]`)}for(const o of e){const u=ro(o.fromTitle),d=ro(o.toTitle),h=o.relationship.replace(/"/g,"'");l.push(` ${u} -->|"${h}"| ${d}`)}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 n){const u=ro(o.title),d=o.file_count>0?o.reviewed_count/o.file_count:0;d>=1?l.push(` class ${u} complete`):d>0?l.push(` class ${u} inProgress`):l.push(` class ${u} notStarted`)}return l.join(`
537
- `)}function ro(e){return e.replace(/[^a-zA-Z0-9]/g,"_").replace(/_+/g,"_").replace(/^_|_$/g,"")}function II(e,n,r){const{socket:a}=Ci(),l=`chat-${e}-${n}-${r}`,[o,u]=S.useState([]),[d,h]=S.useState(!1),[m,b]=S.useState(""),[x,y]=S.useState(null),[v,_]=S.useState([]),[E,w]=S.useState(null),N=S.useRef("");S.useEffect(()=>{a&&a.emit("chat:history",{conversationId:l})},[a,l]),dt("chat:history:result",S.useCallback(R=>{R.conversationId===l&&u(R.messages)},[l])),dt("chat:token",S.useCallback(R=>{R.conversationId===l&&(N.current+=R.token,b(N.current))},[l])),dt("chat:status",S.useCallback(R=>{if(R.conversationId!==l)return;const U={tool:R.tool,detail:R.detail,timestamp:Date.now()};y(U),_($=>[...$,U])},[l])),dt("chat:done",S.useCallback(R=>{if(R.conversationId!==l)return;const U={id:Date.now(),conversation_id:l,role:"assistant",content:N.current,created_at:new Date().toISOString()};u($=>[...$,U]),h(!1),b(""),y(null),_([]),N.current=""},[l])),dt("chat:error",S.useCallback(R=>{R.conversationId===l&&(w(R.error),h(!1),b(""),y(null),_([]),N.current="")},[l]));const M=S.useCallback(R=>{if(!a||!R.trim()||d)return;const U={id:Date.now(),conversation_id:l,role:"user",content:R.trim(),created_at:new Date().toISOString()};u($=>[...$,U]),h(!0),w(null),y(null),_([]),N.current="",a.emit("chat:send",{conversationId:l,sessionId:e,targetType:n,targetId:r,message:R.trim()})},[a,l,e,n,r,d]);return{messages:o,sendMessage:M,isStreaming:d,streamingContent:m,toolStatus:x,toolHistory:v,error:E}}const Xy=3;function Zy({currentStatus:e,history:n}){const[r,a]=S.useState(!1),l=e?n.filter(h=>h.timestamp!==e.timestamp):n,o=l.length>Xy,u=r?l:l.slice(-Xy),d=l.length-u.length;return!e&&l.length===0?null:f.jsxs("div",{className:"space-y-1",children:[l.length>0&&f.jsxs("div",{className:"space-y-0.5",children:[o&&d>0&&f.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?f.jsx($s,{className:"h-3 w-3"}):f.jsx(Va,{className:"h-3 w-3"}),r?"Collapse":`${d} more step${d!==1?"s":""}`]}),u.map((h,m)=>f.jsxs("div",{className:"flex items-center gap-1.5 text-[11px] text-zinc-400 dark:text-zinc-500",children:[f.jsx(Fs,{className:"h-3 w-3 flex-shrink-0 text-emerald-500"}),f.jsx("span",{className:"truncate",children:h.detail})]},h.timestamp+m))]}),e&&f.jsxs("div",{className:ge("flex items-center gap-1.5 text-[11px] font-medium","text-indigo-600 dark:text-indigo-400"),children:[f.jsxs("span",{className:"relative flex h-2 w-2 flex-shrink-0",children:[f.jsx("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-indigo-400 opacity-75"}),f.jsx("span",{className:"relative inline-flex h-2 w-2 rounded-full bg-indigo-500"})]}),f.jsx("span",{className:"truncate",children:e.detail})]})]})}function BI({message:e}){const n=e.role==="user",r=Ka(e.created_at).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"});return f.jsxs("div",{className:ge("flex flex-col",n?"items-end":"items-start"),children:[f.jsx("div",{className:ge("max-w-[85%] rounded-lg px-3 py-2 text-sm",n?"bg-indigo-600 text-white":"bg-zinc-100 text-zinc-900 dark:bg-zinc-800 dark:text-zinc-100"),children:n?f.jsx("p",{className:"whitespace-pre-wrap",children:e.content}):f.jsx(Pr,{content:e.content})}),f.jsx("span",{className:"mt-1 text-[10px] text-zinc-400 dark:text-zinc-500",children:r})]})}const Wy=["Reading the code review artifacts...","Analyzing the changeset structure...","Examining file relationships...","Reviewing the findings...","Connecting the patterns...","Preparing a thoughtful response..."];function UI({content:e,toolStatus:n,toolHistory:r}){const[a,l]=S.useState(0),o=n!==null||r.length>0;return S.useEffect(()=>{if(e||o)return;const u=setInterval(()=>{l(d=>(d+1)%Wy.length)},2500);return()=>clearInterval(u)},[e,o]),f.jsx("div",{className:"flex flex-col items-start",children:f.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?f.jsxs(f.Fragment,{children:[f.jsx(Pr,{content:e}),f.jsx("span",{className:"ml-0.5 inline-block h-4 w-0.5 animate-pulse bg-zinc-400 dark:bg-zinc-500"})]}):o?f.jsx(Zy,{currentStatus:n,history:r}):f.jsx(FI,{phrase:Wy[a]}),e&&o&&f.jsx("div",{className:"mt-2 border-t border-zinc-200 pt-2 dark:border-zinc-700",children:f.jsx(Zy,{currentStatus:n,history:r})})]})})}function FI({phrase:e}){return f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsxs("div",{className:"flex gap-1",children:[f.jsx("span",{className:"h-1.5 w-1.5 animate-bounce rounded-full bg-indigo-400 [animation-delay:0ms]"}),f.jsx("span",{className:"h-1.5 w-1.5 animate-bounce rounded-full bg-indigo-400 [animation-delay:150ms]"}),f.jsx("span",{className:"h-1.5 w-1.5 animate-bounce rounded-full bg-indigo-400 [animation-delay:300ms]"})]}),f.jsx("span",{className:"animate-pulse text-xs text-zinc-400 dark:text-zinc-500",children:e})]})}const PI={map_run:"Ask about this map...",review_round:"Ask about this review..."};function HI({onSend:e,isStreaming:n,disabled:r,targetType:a}){const[l,o]=S.useState(""),u=S.useRef(null),d=S.useCallback(()=>{const b=u.current;b&&(b.style.height="auto",b.style.height=`${Math.min(b.scrollHeight,80)}px`)},[]),h=S.useCallback(()=>{!l.trim()||n||r||(e(l),o(""),u.current&&(u.current.style.height="auto"))},[l,n,e]),m=S.useCallback(b=>{b.key==="Enter"&&!b.shiftKey&&(b.preventDefault(),h())},[h]);return f.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:[f.jsx("textarea",{ref:u,value:l,onChange:b=>{o(b.target.value),d()},onKeyDown:m,placeholder:PI[a],rows:1,className:ge("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")}),f.jsx("button",{type:"button",onClick:h,disabled:n||!l.trim(),className:ge("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:f.jsx(gR,{className:"h-4 w-4"})})]})}function d_({sessionId:e,targetType:n,targetId:r,onClose:a}){const{isAvailable:l,isDisabledByConfig:o}=Bm(),{messages:u,sendMessage:d,isStreaming:h,streamingContent:m,toolStatus:b,toolHistory:x,error:y}=II(e,n,r),v=S.useRef(null);return S.useEffect(()=>{function _(E){E.key==="Escape"&&a()}return document.addEventListener("keydown",_),()=>document.removeEventListener("keydown",_)},[a]),S.useEffect(()=>{const _=v.current;_&&(_.scrollTop=_.scrollHeight)},[u,m,b]),f.jsxs("div",{className:ge("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:[f.jsxs("div",{className:"flex items-center justify-between border-b border-zinc-200 px-4 py-3 dark:border-zinc-800",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(bu,{className:"h-4 w-4 text-indigo-500"}),f.jsx("h2",{className:"text-sm font-semibold text-zinc-900 dark:text-zinc-100",children:"Ask the Team"})]}),f.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:f.jsx(gr,{className:"h-4 w-4"})})]}),f.jsxs("div",{ref:v,className:"flex-1 space-y-4 overflow-y-auto p-4",children:[!l&&u.length===0&&f.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:[f.jsx(Iu,{className:"mt-0.5 h-4 w-4 shrink-0 text-zinc-400"}),f.jsx("p",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:o?f.jsxs(f.Fragment,{children:["AI commands are turned off in your project config. Set ",f.jsx("code",{className:"rounded bg-zinc-200 px-1 py-0.5 text-[10px] dark:bg-zinc-800",children:"ai_cli"})," to ",f.jsx("code",{className:"rounded bg-zinc-200 px-1 py-0.5 text-[10px] dark:bg-zinc-800",children:"auto"}),", ",f.jsx("code",{className:"rounded bg-zinc-200 px-1 py-0.5 text-[10px] dark:bg-zinc-800",children:"claude"}),", or ",f.jsx("code",{className:"rounded bg-zinc-200 px-1 py-0.5 text-[10px] dark:bg-zinc-800",children:"opencode"})," in ",f.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&&u.length===0&&!h&&f.jsxs("p",{className:"text-center text-sm text-zinc-400 dark:text-zinc-500",children:["Ask a question about this ",n==="map_run"?"map":"review"," to get started."]}),u.map(_=>f.jsx(BI,{message:_},_.id)),h&&f.jsx(UI,{content:m,toolStatus:b,toolHistory:x}),y&&f.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})]}),f.jsx(HI,{onSend:d,isStreaming:h,disabled:!l,targetType:n})]})}function qI(){const{id:e,run:n}=Tu(),r=parseInt(n??"0",10),{data:a,isLoading:l}=NI(e??"",r),o=CI(e??"",r),u=TI(e??"",r),[d,h]=S.useState(!1),m=S.useCallback(y=>{document.getElementById(`section-${y}`)?.scrollIntoView({behavior:"smooth",block:"start"})},[]);if(l)return f.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Loading map run..."});if(!a)return f.jsxs("div",{children:[f.jsxs(Dn,{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:[f.jsx(fa,{className:"h-4 w-4"}),"Back to session"]}),f.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Map run not found."})]});const b=a.sections.reduce((y,v)=>y+v.file_count,0),x=a.sections.reduce((y,v)=>y+v.reviewed_count,0);return f.jsxs("div",{className:"space-y-6",children:[f.jsxs(Dn,{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:[f.jsx(fa,{className:"h-4 w-4"}),"Back to session"]}),f.jsxs("div",{className:"rounded-lg border border-zinc-200 bg-white p-6 dark:border-zinc-800 dark:bg-zinc-900",children:[f.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[f.jsxs("div",{className:"space-y-1",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(ha,{className:"h-5 w-5 text-zinc-400"}),f.jsxs("h1",{className:"text-xl font-semibold text-zinc-900 dark:text-zinc-100",children:["Map Run ",a.run_number]})]}),f.jsxs("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:[x," / ",b," files reviewed"]})]}),f.jsxs("div",{className:"flex items-center gap-2",children:[f.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:[f.jsx(bu,{className:"h-3.5 w-3.5"}),"Ask the Team"]}),f.jsx(RI,{sessionId:e??""}),f.jsx(SI,{onConfirm:()=>u.mutate(a.id),isPending:u.isPending})]})]}),f.jsx("div",{className:"mt-4",children:f.jsx(u_,{value:x,max:b,showLabel:!0})})]}),f.jsx(jI,{sessionId:e??"",runNumber:r,sections:a.sections,onSectionClick:m}),a.sections.length===0?f.jsx("div",{className:"rounded-lg border border-zinc-200 bg-white p-6 dark:border-zinc-800 dark:bg-zinc-900",children:f.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"No sections found in this map run."})}):f.jsx("div",{className:"space-y-3",children:a.sections.map(y=>f.jsx("div",{id:`section-${y.id}`,children:f.jsx(wI,{section:y,onToggleFile:(v,_)=>o.mutate({fileId:v,isReviewed:_})})},y.id))}),d&&f.jsx(d_,{sessionId:e??"",targetType:"map_run",targetId:a.run_number,onClose:()=>h(!1)})]})}function $I(){const e=Fn();return dt("artifact:created",()=>{e.invalidateQueries({queryKey:["reviews"]})}),dt("artifact:updated",()=>{e.invalidateQueries({queryKey:["reviews"]})}),vn({queryKey:["reviews"],queryFn:()=>Zt("/api/reviews")})}function GI(e,n){const r=Fn(),a=["sessions",e,"rounds",n],l=vn({queryKey:a,queryFn:()=>Zt(`/api/sessions/${e}/rounds/${n}`),enabled:!!e&&n>0});return dt("artifact:created",()=>{r.invalidateQueries({queryKey:a})}),dt("artifact:updated",()=>{r.invalidateQueries({queryKey:a})}),l}function KI(e,n){return vn({queryKey:["sessions",e,"rounds",n,"findings"],queryFn:()=>Zt(`/api/sessions/${e}/rounds/${n}/findings`),enabled:!!e&&n>0})}function VI(e,n,r){return vn({queryKey:["sessions",e,"rounds",n,"reviewers",r],queryFn:()=>Zt(`/api/sessions/${e}/rounds/${n}/reviewers/${r}`),enabled:!!e&&n>0&&r>0})}function Dh(e,n){return vn({queryKey:["sessions",e,"artifacts",n],queryFn:()=>Zt(`/api/sessions/${e}/artifacts/${n}`),enabled:!!e&&!!n,retry:!1})}function YI(){const e=Fn();return Mu({mutationFn:({findingId:n,status:r})=>Zt(`/api/findings/${n}/progress`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:r})}),onSuccess:()=>{e.invalidateQueries({queryKey:["sessions"]})}})}function f_(){const e=Fn();return Mu({mutationFn:({roundId:n,status:r})=>Zt(`/api/rounds/${n}/progress`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:r})}),onSuccess:()=>{e.invalidateQueries({queryKey:["reviews"]}),e.invalidateQueries({queryKey:["sessions"]})}})}const h_={principal:Lu,quality:Ha,security:NR,testing:BR},QI={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 XI({sessionId:e,roundNumber:n,reviewer:r}){const a=h_[r.reviewer_type]??Ha,l=QI[r.reviewer_type]??"text-zinc-600 dark:text-zinc-400 bg-zinc-500/10 border-zinc-500/25";return f.jsx(Dn,{to:`/sessions/${e}/reviews/${n}/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:f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("div",{className:`flex h-10 w-10 items-center justify-center rounded-lg border ${l}`,children:f.jsx(a,{className:"h-5 w-5"})}),f.jsxs("div",{className:"min-w-0 flex-1",children:[f.jsxs("div",{className:"text-sm font-medium capitalize text-zinc-900 dark:text-zinc-100",children:[r.reviewer_type,r.instance_number>1&&f.jsxs("span",{className:"ml-1 text-zinc-500 dark:text-zinc-400",children:["#",r.instance_number]})]}),f.jsxs("div",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:[r.finding_count," finding",r.finding_count!==1?"s":""]})]})]})})}const ZI=[{value:"unread",label:"Unread"},{value:"read",label:"Read"},{value:"acknowledged",label:"Acknowledged"},{value:"fixed",label:"Fixed"},{value:"wont_fix",label:"Won't Fix"}];function WI({finding:e,onTriageChange:n}){const[r,a]=S.useState(!1),{data:l}=Ks(),o=S.useCallback(()=>a(h=>!h),[]),u=S.useCallback(h=>{(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),o())},[o]),d=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 f.jsxs(f.Fragment,{children:[f.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:u,children:[f.jsx("td",{className:"border-b border-zinc-200 px-4 py-2 dark:border-zinc-800",children:f.jsxs("div",{className:"flex items-center gap-1",children:[f.jsx(Va,{className:ge("h-3.5 w-3.5 shrink-0 text-zinc-400 transition-transform",r&&"rotate-90")}),f.jsx(Vs,{variant:e.severity})]})}),f.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}),f.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?f.jsxs("a",{href:gu(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,f.jsx(jm,{className:"ml-1 inline h-3 w-3"})]}):e.file_path??"-"}),f.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?f.jsx("a",{href:gu(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:d}):d}),f.jsx("td",{className:"border-b border-zinc-200 px-4 py-2 dark:border-zinc-800",children:e.is_blocker?f.jsx("span",{className:"text-xs font-medium text-red-600 dark:text-red-400",children:"Yes"}):f.jsx("span",{className:"text-xs text-zinc-400",children:"No"})}),f.jsx("td",{className:"border-b border-zinc-200 px-4 py-2 dark:border-zinc-800",onClick:h=>h.stopPropagation(),children:f.jsx("select",{value:e.progress?.status??"unread",onChange:h=>n(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:ZI.map(h=>f.jsx("option",{value:h.value,children:h.label},h.value))})})]}),r&&e.summary&&f.jsx("tr",{children:f.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:f.jsx(Pr,{content:e.summary,className:"text-sm"})})})]})}function la({label:e,field:n,activeField:r,direction:a,onSort:l}){return f.jsx("th",{className:"border-b border-zinc-200 px-4 py-2 text-left dark:border-zinc-800",children:f.jsxs("button",{onClick:()=>l(n),className:ge("flex items-center gap-1 text-sm font-medium transition-colors",r===n?"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,f.jsx(z1,{className:ge("h-3 w-3",r===n?"opacity-100":"opacity-40",r===n&&a==="desc"&&"rotate-180")})]})})}const Jy={critical:0,high:1,medium:2,low:3,info:4},JI=[{value:"all",label:"All"},{value:"critical",label:"Critical"},{value:"high",label:"High"},{value:"medium",label:"Medium"},{value:"low",label:"Low"},{value:"info",label:"Info"}],e6=[{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 m_({findings:e}){const[n,r]=S.useState("severity"),[a,l]=S.useState("asc"),[o,u]=S.useState("all"),[d,h]=S.useState("all"),m=YI();function b(_){n===_?l(E=>E==="asc"?"desc":"asc"):(r(_),l("asc"))}const x=S.useMemo(()=>{let _=e;return o!=="all"&&(_=_.filter(E=>E.severity===o)),d!=="all"&&(_=_.filter(E=>(E.progress?.status??"unread")===d)),_},[e,o,d]),y=S.useMemo(()=>{const _=a==="asc"?1:-1;return[...x].sort((E,w)=>n==="severity"?(Jy[E.severity]-Jy[w.severity])*_:n==="title"?E.title.localeCompare(w.title)*_:n==="file_path"?(E.file_path??"").localeCompare(w.file_path??"")*_:0)},[x,n,a]);function v(_,E){m.mutate({findingId:_,status:E})}return f.jsxs("div",{children:[f.jsxs("div",{className:"mb-4 flex flex-wrap items-center gap-3",children:[f.jsx(M1,{className:"h-4 w-4 text-zinc-400"}),f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("span",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:"Severity:"}),f.jsx("select",{value:o,onChange:_=>u(_.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:JI.map(_=>f.jsx("option",{value:_.value,children:_.label},_.value))})]}),f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("span",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:"Status:"}),f.jsx("select",{value:d,onChange:_=>h(_.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:e6.map(_=>f.jsx("option",{value:_.value,children:_.label},_.value))})]}),f.jsxs("span",{className:"text-xs text-zinc-400 dark:text-zinc-500",children:[y.length," of ",e.length," findings"]})]}),y.length===0?f.jsx("p",{className:"py-8 text-center text-sm text-zinc-500 dark:text-zinc-400",children:"No findings match your filters."}):f.jsx("div",{className:"overflow-x-auto rounded-lg border border-zinc-200 dark:border-zinc-800",children:f.jsxs("table",{className:"w-full text-sm",children:[f.jsx("thead",{className:"bg-zinc-50 dark:bg-zinc-900",children:f.jsxs("tr",{children:[f.jsx(la,{label:"Severity",field:"severity",activeField:n,direction:a,onSort:b}),f.jsx(la,{label:"Title",field:"title",activeField:n,direction:a,onSort:b}),f.jsx(la,{label:"File",field:"file_path",activeField:n,direction:a,onSort:b}),f.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"}),f.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"}),f.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"})]})}),f.jsx("tbody",{children:y.map(_=>f.jsx(WI,{finding:_,onTriageChange:v},_.id))})]})})]})}function t6(){const{socket:e}=Ci(),[n,r]=S.useState("idle"),[a,l]=S.useState(null),[o,u]=S.useState(""),[d,h]=S.useState(""),[m,b]=S.useState(null),[x,y]=S.useState([]),[v,_]=S.useState(null),[E,w]=S.useState(null),N=S.useRef(""),[M,R]=S.useState(0),U=S.useRef(null);S.useEffect(()=>(n==="generating"?(R(0),U.current=setInterval(()=>R(te=>te+1),1e3)):U.current&&(clearInterval(U.current),U.current=null),()=>{U.current&&clearInterval(U.current)}),[n]),dt("post:gh-result",S.useCallback(te=>{l(te),te.authenticated&&te.prNumber?r("ready"):(w(te.error??"GitHub check failed"),r("error"))},[])),dt("post:token",S.useCallback(te=>{N.current+=te.token,u(N.current)},[])),dt("post:clear-stream",S.useCallback(()=>{N.current="",u("")},[])),dt("post:status",S.useCallback(te=>{const ee={tool:te.tool,detail:te.detail,timestamp:Date.now()};b(ee),y(ve=>[...ve,ee])},[])),dt("post:done",S.useCallback(te=>{h(te.content),u(""),b(null),N.current="",r("preview")},[])),dt("post:cancelled",S.useCallback(()=>{u(""),b(null),N.current="",r("ready")},[])),dt("post:error",S.useCallback(te=>{w(te.error),u(""),b(null),N.current="",r("error")},[])),dt("post:save-result",S.useCallback(te=>{te.success||w(te.error??"Failed to save draft")},[])),dt("post:submit-result",S.useCallback(te=>{_(te),te.success?r("posted"):(w(te.error??"Failed to post to GitHub"),r("error"))},[]));const $=S.useCallback(te=>{e&&(r("checking"),w(null),l(null),e.emit("post:check-gh",{sessionId:te}))},[e]),j=S.useCallback((te,ee)=>{e&&(r("generating"),w(null),u(""),h(""),b(null),y([]),N.current="",e.emit("post:generate",{sessionId:te,roundNumber:ee}))},[e]),J=S.useCallback((te,ee)=>{e&&e.emit("post:cancel",{sessionId:te,roundNumber:ee})},[e]),A=S.useCallback((te,ee,ve)=>{e&&e.emit("post:save",{sessionId:te,roundNumber:ee,content:ve})},[e]),ae=S.useCallback((te,ee)=>{e&&(r("posting"),w(null),e.emit("post:submit",{prNumber:te,content:ee}))},[e]),H=S.useCallback(()=>{r("idle"),l(null),u(""),h(""),b(null),y([]),_(null),w(null),N.current=""},[]);return{step:n,checkResult:a,streamingContent:o,generatedContent:d,toolStatus:m,activityLog:x,elapsedSeconds:M,postResult:v,error:E,checkGitHub:$,generate:j,cancelGeneration:J,saveDraft:A,submitToGitHub:ae,reset:H,setStep:r}}function n6(e){const n=Math.floor(e/60),r=e%60;return`${n}:${String(r).padStart(2,"0")}`}function r6(e,n,r){return r==="Write"?"Rewriting as your voice":n?"Writing review":e?"Analyzing source material":"Starting up"}function i6({tool:e}){switch(e){case"Read":return f.jsx(V2,{className:"h-3 w-3 shrink-0"});case"Glob":case"Grep":return f.jsx(ju,{className:"h-3 w-3 shrink-0"});case"thinking":return f.jsx(C1,{className:"h-3 w-3 shrink-0"});default:return f.jsx(VR,{className:"h-3 w-3 shrink-0"})}}function a6({sessionId:e,roundNumber:n,finalContent:r,savedHumanReview:a}){const[l,o]=S.useState(!1),[u,d]=S.useState(!1),[h,m]=S.useState(""),b=S.useRef(null),x=S.useRef(null),{step:y,checkResult:v,streamingContent:_,generatedContent:E,toolStatus:w,activityLog:N,elapsedSeconds:M,postResult:R,error:U,checkGitHub:$,generate:j,cancelGeneration:J,saveDraft:A,submitToGitHub:ae,reset:H,setStep:te}=t6(),[ee,ve]=S.useState(!0),oe=S.useRef(!1),[q,L]=S.useState(!1),Y=S.useCallback(()=>{o(!1),d(!1),m(""),H()},[H]),V=S.useCallback(()=>{o(!0),$(e)},[e,$]);S.useEffect(()=>{if(!l)return;const O=K=>{K.key==="Escape"&&y!=="generating"&&Y()};return document.addEventListener("keydown",O),b.current?.focus(),()=>document.removeEventListener("keydown",O)},[l,Y,y]),S.useEffect(()=>{y==="generating"&&_&&!oe.current&&(oe.current=!0,ve(!1))},[y,_]),S.useEffect(()=>{y==="generating"&&(oe.current=!1,ve(!0))},[y]),S.useEffect(()=>{y==="generating"&&x.current?.scrollIntoView({behavior:"smooth"})},[_,y]);const ne=()=>u&&h?h:E||a||r,C=v?.prNumber??0;return f.jsxs(f.Fragment,{children:[f.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:[f.jsx($x,{className:"h-3.5 w-3.5"}),"Post to GitHub"]}),l&&f.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[f.jsx("div",{className:"fixed inset-0 bg-black/50",onClick:y!=="generating"?Y:void 0}),f.jsxs("div",{ref:b,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:[f.jsxs("div",{className:"flex items-center justify-between border-b border-zinc-200 px-6 py-4 dark:border-zinc-800",children:[f.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"}),f.jsx("button",{onClick:Y,className:"text-zinc-400 hover:text-zinc-600 dark:hover:text-zinc-300","aria-label":"Close dialog",children:f.jsx(gr,{className:"h-5 w-5"})})]}),f.jsxs("div",{className:"flex-1 overflow-y-auto px-6 py-4",children:[y==="checking"&&f.jsxs("div",{className:"flex items-center justify-center gap-3 py-12",children:[f.jsx(da,{className:"h-5 w-5 animate-spin text-zinc-500"}),f.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Checking GitHub CLI..."})]}),y==="ready"&&v&&f.jsxs("div",{className:"space-y-4",children:[f.jsx("div",{className:"rounded-md border border-zinc-200 bg-zinc-50 p-3 dark:border-zinc-700 dark:bg-zinc-800",children:f.jsxs("p",{className:"text-sm text-zinc-700 dark:text-zinc-300",children:[f.jsx(D1,{className:"mr-1.5 inline h-4 w-4"}),"PR #",v.prNumber," on branch"," ",f.jsx("code",{className:"rounded bg-zinc-200 px-1.5 py-0.5 text-xs dark:bg-zinc-700",children:v.branch})]})}),f.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[f.jsxs("button",{onClick:()=>ae(C,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:[f.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[f.jsx(Du,{className:"h-5 w-5 text-zinc-500 group-hover:text-blue-600 dark:group-hover:text-blue-400"}),f.jsx("span",{className:"font-medium text-zinc-900 dark:text-zinc-100",children:"Post Team Review"})]}),f.jsx("p",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:"Post the original multi-reviewer synthesis as-is."})]}),f.jsxs("button",{onClick:()=>j(e,n),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:[f.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[f.jsx(Ha,{className:"h-5 w-5 text-zinc-500 group-hover:text-emerald-600 dark:group-hover:text-emerald-400"}),f.jsx("span",{className:"font-medium text-zinc-900 dark:text-zinc-100",children:"Generate Human Review"})]}),f.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&&f.jsxs("button",{onClick:()=>{m(a),te("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:[f.jsx(qx,{className:"mr-1.5 inline h-3.5 w-3.5"}),"Use previously saved human review"]})]}),y==="generating"&&f.jsxs("div",{className:"space-y-4",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsxs("div",{className:"flex items-center gap-2.5",children:[f.jsxs("div",{className:"relative flex h-8 w-8 items-center justify-center",children:[f.jsx("div",{className:"absolute inset-0 animate-ping rounded-full bg-emerald-400/20"}),f.jsx(Ha,{className:"h-4 w-4 text-emerald-500 dark:text-emerald-400"})]}),f.jsxs("div",{children:[f.jsx("p",{className:"text-sm font-medium text-zinc-800 dark:text-zinc-200",children:r6(N.length>0,!!_,w?.tool)}),f.jsx("p",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:"All findings preserved — just the tone changes"})]})]}),f.jsx("span",{className:"tabular-nums text-xs font-medium text-zinc-400 dark:text-zinc-500",children:n6(M)})]}),f.jsxs("div",{className:"rounded-md border border-zinc-200 bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-800",children:[f.jsxs("button",{type:"button",onClick:()=>ve(O=>!O),className:"flex w-full items-center gap-2 px-3 py-2 text-xs text-zinc-600 dark:text-zinc-400",children:[f.jsx(da,{className:"h-3 w-3 animate-spin shrink-0 text-emerald-500"}),f.jsx("span",{className:"flex-1 truncate text-left font-medium",children:w?.detail??"Reading review files..."}),N.length>0&&f.jsxs("span",{className:"flex items-center gap-1 text-zinc-400 dark:text-zinc-500",children:[f.jsx("span",{className:"tabular-nums",children:N.length}),ee?f.jsx($s,{className:"h-3 w-3"}):f.jsx(Va,{className:"h-3 w-3"})]})]}),ee&&N.length>0&&f.jsx("div",{className:"border-t border-zinc-200 px-3 py-2 dark:border-zinc-700",children:f.jsx("div",{className:"max-h-32 space-y-1 overflow-y-auto",children:N.map((O,K)=>f.jsxs("div",{className:"flex items-center gap-2 text-[11px] text-zinc-500 dark:text-zinc-500",children:[f.jsx(i6,{tool:O.tool}),f.jsx("span",{className:"truncate",children:O.detail})]},K))})})]}),_&&f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"flex items-center gap-2 text-xs text-zinc-500 dark:text-zinc-400",children:[f.jsx(ho,{className:"h-3 w-3"}),f.jsx("span",{className:"font-medium",children:"Generated Review"})]}),f.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none",children:f.jsx(Pr,{content:_})})]}),f.jsx("div",{ref:x})]}),y==="preview"&&f.jsxs("div",{className:"space-y-3",children:[f.jsxs("div",{className:"flex items-center gap-1 border-b border-zinc-200 dark:border-zinc-700",children:[f.jsxs("button",{onClick:()=>d(!1),className:ge("inline-flex items-center gap-1.5 border-b-2 px-3 py-2 text-xs font-medium transition-colors",u?"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:[f.jsx(vT,{className:"h-3.5 w-3.5"}),"Preview"]}),f.jsxs("button",{onClick:()=>{d(!0),h||m(E||a||r)},className:ge("inline-flex items-center gap-1.5 border-b-2 px-3 py-2 text-xs font-medium transition-colors",u?"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:[f.jsx(ho,{className:"h-3.5 w-3.5"}),"Edit"]})]}),u?f.jsx("textarea",{value:h||E||a||r,onChange:O=>m(O.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"}):f.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none",children:f.jsx(Pr,{content:ne()})})]}),y==="posting"&&f.jsxs("div",{className:"flex items-center justify-center gap-3 py-12",children:[f.jsx(da,{className:"h-5 w-5 animate-spin text-zinc-500"}),f.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Posting to GitHub..."})]}),y==="posted"&&f.jsxs("div",{className:"flex flex-col items-center gap-3 py-12",children:[f.jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-full bg-emerald-100 dark:bg-emerald-900/30",children:f.jsx(Fs,{className:"h-6 w-6 text-emerald-600 dark:text-emerald-400"})}),f.jsx("p",{className:"text-sm font-medium text-zinc-900 dark:text-zinc-100",children:"Review posted to GitHub"}),R?.commentUrl&&f.jsxs("a",{href:R.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",f.jsx(jm,{className:"h-3.5 w-3.5"})]})]}),y==="error"&&f.jsx("div",{className:"space-y-4 py-4",children:f.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:[f.jsx(tT,{className:"mt-0.5 h-5 w-5 shrink-0 text-red-600 dark:text-red-400"}),f.jsx("p",{className:"text-sm text-red-700 dark:text-red-300",children:U})]})})]}),f.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"&&f.jsx("button",{onClick:()=>J(e,n),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"&&f.jsxs(f.Fragment,{children:[f.jsxs("button",{onClick:()=>j(e,n),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:[f.jsx(po,{className:"h-3.5 w-3.5"}),"Regenerate"]}),f.jsxs("button",{onClick:()=>{A(e,n,ne()),L(!0),setTimeout(()=>L(!1),2e3)},className:ge("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?f.jsx(Fs,{className:"h-3.5 w-3.5"}):f.jsx(qx,{className:"h-3.5 w-3.5"}),q?"Saved!":"Save Draft"]}),f.jsxs("button",{onClick:()=>{const O=ne();A(e,n,O),ae(C,O)},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:[f.jsx($x,{className:"h-3.5 w-3.5"}),"Post to GitHub"]})]}),y==="error"&&f.jsxs(f.Fragment,{children:[f.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:[f.jsx(po,{className:"h-3.5 w-3.5"}),"Retry"]}),f.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"&&f.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 s6(e,n){return`.ocr/sessions/${e}/rounds/round-${n}/final.md`}const ev=e=>`Review the feedback in \`${e}\` and address it following these steps:
538
-
539
- 1. Read the review in its entirety and parse all feedback into discrete items
540
- 2. For each item, read the actual code at the referenced location to corroborate
541
- 3. Classify each as: Valid (will address) | Valid (alternative approach) | Invalid (decline with evidence) | Needs Clarification
542
- 4. Present a numbered summary of all items with classification before implementing
543
- 5. For valid items, implement changes — use sub-agents in parallel where items are independent
544
- 6. Report: total items, items addressed, items declined with reasoning
545
-
546
- 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 l6({sessionId:e,roundNumber:n}){const[r,a]=S.useState(!1),l=S.useRef(null),{data:o}=Ks(),u=!!o?.aiCli?.active,d=S.useCallback(()=>a(!1),[]);S.useEffect(()=>{if(!r)return;const m=b=>{b.key==="Escape"&&d()};return document.addEventListener("keydown",m),l.current?.focus(),()=>document.removeEventListener("keydown",m)},[r,d]);const h=s6(e,n);return f.jsxs(f.Fragment,{children:[f.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:[f.jsx(mo,{className:"h-3.5 w-3.5"}),"Address Feedback"]}),r&&f.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[f.jsx("div",{className:"fixed inset-0 bg-black/50",onClick:d}),f.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:[f.jsx("button",{onClick:d,className:"absolute right-4 top-4 text-zinc-400 hover:text-zinc-600 dark:hover:text-zinc-300","aria-label":"Close dialog",children:f.jsx(gr,{className:"h-4 w-4"})}),u?f.jsx(o6,{finalPath:h,onClose:d}):f.jsx(c6,{finalPath:h,onClose:d})]})]})]})}function o6({finalPath:e,onClose:n}){const[r,a]=S.useState(""),[l,o]=S.useState(!1),[u,d]=S.useState(!1),{socket:h}=Ci(),{isRunning:m}=Dm(),b=bm();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(`
547
-
548
- NOTES:`,r.trim()),E.join(" ")}function v(){const E=x();h?.emit("command:run",{command:E}),n(),b("/commands")}async function _(){await navigator.clipboard.writeText(y()),d(!0),setTimeout(()=>d(!1),2e3)}return f.jsxs("div",{children:[f.jsxs("div",{className:"p-6 pb-0",children:[f.jsx("h3",{id:"address-feedback-title",className:"text-lg font-semibold text-zinc-900 dark:text-zinc-100",children:"Address Feedback"}),f.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."})]}),f.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:[f.jsx(Lm,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),f.jsx("span",{children:"This runs an AI agent with full read/write and shell access to your project."})]}),f.jsxs("div",{className:"space-y-4 p-6",children:[f.jsxs("div",{children:[f.jsx("label",{className:"text-xs font-medium text-zinc-500 dark:text-zinc-400",children:"Review"}),f.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})]}),f.jsxs("div",{children:[f.jsxs("label",{className:"text-xs font-medium text-zinc-500 dark:text-zinc-400",children:["Additional notes ",f.jsx("span",{className:"font-normal text-zinc-400 dark:text-zinc-500",children:"(optional)"})]}),f.jsx("textarea",{value:r,onChange:E=>a(E.target.value),placeholder:"e.g. Focus on the blockers first, skip style nits...",rows:3,className:ge("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")})]}),f.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()}),f.jsxs("div",{className:"space-y-2 pt-2",children:[f.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row-reverse",children:[l?f.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:[f.jsx(mo,{className:"h-3.5 w-3.5"}),"Confirm"]}):f.jsxs("button",{onClick:()=>o(!0),disabled:m,className:ge("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:[f.jsx(mo,{className:"h-3.5 w-3.5"}),"Run in Dashboard"]}),f.jsx("button",{onClick:_,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:u?f.jsxs(f.Fragment,{children:[f.jsx(Fs,{className:"h-3.5 w-3.5"}),"Copied!"]}):f.jsxs(f.Fragment,{children:[f.jsx(A1,{className:"h-3.5 w-3.5"}),"Copy to Terminal"]})})]}),f.jsx("button",{onClick:n,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 c6({finalPath:e,onClose:n}){const[r,a]=S.useState(!0),[l,o]=S.useState(!1);async function u(){const d=r?ev(e):e;await navigator.clipboard.writeText(d),o(!0),setTimeout(()=>o(!1),2e3)}return f.jsxs("div",{className:"p-6",children:[f.jsx("h3",{id:"address-feedback-title",className:"text-lg font-semibold text-zinc-900 dark:text-zinc-100",children:"Address Feedback"}),f.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.)."}),f.jsxs("div",{className:"mt-4",children:[f.jsx("label",{className:"text-xs font-medium text-zinc-500 dark:text-zinc-400",children:"Review path"}),f.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})]}),f.jsxs("label",{className:"mt-4 flex items-center gap-2 text-sm text-zinc-600 dark:text-zinc-400",children:[f.jsx("input",{type:"checkbox",checked:r,onChange:d=>a(d.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&&f.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:f.jsx("pre",{className:"whitespace-pre-wrap font-mono leading-relaxed",children:ev(e)})}),f.jsxs("div",{className:"mt-6 flex justify-end gap-3",children:[f.jsx("button",{onClick:n,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"}),f.jsx("button",{onClick:u,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?f.jsxs(f.Fragment,{children:[f.jsx(Fs,{className:"h-3.5 w-3.5"}),"Copied!"]}):f.jsxs(f.Fragment,{children:[f.jsx(A1,{className:"h-3.5 w-3.5"}),"Copy"]})})]})]})}const u6=[{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 d6(){const{id:e,round:n}=Tu(),r=parseInt(n??"0",10),{data:a,isLoading:l}=GI(e??"",r),{data:o}=KI(e??"",r),{data:u}=Dh(e??"","final"),{data:d}=Dh(e??"","final-human"),{data:h}=Dh(e??"","discourse"),m=f_(),[b,x]=S.useState(!1),[y,v]=S.useState(!1);if(l)return f.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Loading round..."});if(!a)return f.jsxs("div",{children:[f.jsxs(Dn,{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:[f.jsx(fa,{className:"h-4 w-4"}),"Back to session"]}),f.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Round not found."})]});const _=h?bI(h.content):[];return f.jsxs("div",{className:"space-y-6",children:[f.jsxs(Dn,{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:[f.jsx(fa,{className:"h-4 w-4"}),"Back to session"]}),f.jsxs("div",{className:"flex items-start justify-between gap-4",children:[f.jsxs("div",{children:[f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsxs("h1",{className:"text-2xl font-semibold",children:["Round ",a.round_number]}),f.jsx("select",{value:a.progress?.status??"needs_review",onChange:E=>m.mutate({roundId:a.id,status:E.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:u6.map(E=>f.jsx("option",{value:E.value,children:E.label},E.value))})]}),f.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":""]})]}),f.jsxs("div",{className:"flex items-center gap-2",children:[u&&f.jsx(a6,{sessionId:e??"",roundNumber:r,finalContent:u.content,savedHumanReview:d?.content}),u&&f.jsx(l6,{sessionId:e??"",roundNumber:r}),f.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:[f.jsx(bu,{className:"h-3.5 w-3.5"}),"Ask the Team"]})]})]}),a.verdict&&f.jsx(yI,{verdict:a.verdict,blockerCount:a.blocker_count,suggestionCount:a.suggestion_count,shouldFixCount:a.should_fix_count}),f.jsxs("div",{children:[f.jsx("h2",{className:"mb-3 text-sm font-medium text-zinc-900 dark:text-zinc-100",children:"Reviewers"}),f.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-4",children:(a.reviewer_outputs??[]).map(E=>f.jsx(XI,{sessionId:e??"",roundNumber:r,reviewer:E},E.id))})]}),o&&o.length>0&&f.jsxs("div",{className:"rounded-lg border border-zinc-200 bg-white p-6 dark:border-zinc-800 dark:bg-zinc-900",children:[f.jsxs("h2",{className:"mb-4 text-sm font-medium text-zinc-900 dark:text-zinc-100",children:["Findings (",o.length,")"]}),f.jsx(m_,{findings:o})]}),h&&f.jsxs("div",{className:"rounded-lg border border-zinc-200 bg-white p-6 dark:border-zinc-800 dark:bg-zinc-900",children:[f.jsxs("button",{onClick:()=>x(E=>!E),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:[f.jsx(bu,{className:"h-4 w-4"}),b?"Hide Discourse":"View Discourse"]}),b&&f.jsx("div",{className:"mt-4 space-y-4",children:_.length>0?_.map((E,w)=>f.jsx(gI,{type:E.type,content:E.content,reviewer:E.reviewer},w)):f.jsx(Pr,{content:h.content})})]}),u&&f.jsxs("div",{className:"rounded-lg border border-zinc-200 bg-white p-6 dark:border-zinc-800 dark:bg-zinc-900",children:[f.jsx("h2",{className:"mb-4 text-sm font-medium text-zinc-900 dark:text-zinc-100",children:"Final Review"}),f.jsx(Pr,{content:u.content})]}),y&&a&&f.jsx(d_,{sessionId:e??"",targetType:"review_round",targetId:a.round_number,onClose:()=>v(!1)})]})}function f6(){const{id:e,round:n,reviewerId:r}=Tu(),a=parseInt(n??"0",10),l=parseInt(r??"0",10),{data:o,isLoading:u}=VI(e??"",a,l),d=vn({queryKey:["reviewer-content",e,a,l],queryFn:async()=>{if(!o?.file_path)return"";try{return(await Zt(`/api/sessions/${e}/rounds/${a}/reviewers/${l}/content`)).content??""}catch{return""}},enabled:!!o?.file_path});if(u)return f.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Loading reviewer..."});if(!o)return f.jsxs("div",{children:[f.jsxs(Dn,{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:[f.jsx(fa,{className:"h-4 w-4"}),"Back to round"]}),f.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Reviewer not found."})]});const h=h_[o.reviewer_type]??Ha;return f.jsxs("div",{className:"space-y-6",children:[f.jsxs(Dn,{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:[f.jsx(fa,{className:"h-4 w-4"}),"Back to round ",a]}),f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx(h,{className:"h-6 w-6 text-zinc-500"}),f.jsxs("div",{children:[f.jsxs("h1",{className:"text-2xl font-semibold capitalize",children:[o.reviewer_type,o.instance_number>1&&f.jsxs("span",{className:"ml-1 text-zinc-500 dark:text-zinc-400",children:["#",o.instance_number]})]}),f.jsxs("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:[o.finding_count," finding",o.finding_count!==1?"s":""]})]})]}),d.data&&f.jsxs("div",{className:"rounded-lg border border-zinc-200 bg-white p-6 dark:border-zinc-800 dark:bg-zinc-900",children:[f.jsx("h2",{className:"mb-4 text-sm font-medium text-zinc-900 dark:text-zinc-100",children:"Reviewer Output"}),f.jsx(Pr,{content:d.data})]}),o.findings.length>0&&f.jsxs("div",{className:"rounded-lg border border-zinc-200 bg-white p-6 dark:border-zinc-800 dark:bg-zinc-900",children:[f.jsxs("h2",{className:"mb-4 text-sm font-medium text-zinc-900 dark:text-zinc-100",children:["Findings (",o.findings.length,")"]}),f.jsx(m_,{findings:o.findings})]})]})}const tv={needs_review:0,in_progress:1,changes_made:2,acknowledged:3,dismissed:4},p_=[{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"}],h6=[{value:"all",label:"All Statuses"},...p_];function m6(){const{data:e,isLoading:n}=$I(),r=f_(),a=bm(),[l,o]=S.useState(!1),[u,d]=S.useState("all"),[h,m]=S.useState("all"),[b,x]=S.useState("status"),[y,v]=S.useState("asc"),_=S.useMemo(()=>{const R=new Set,U=[{value:"all",label:"All Verdicts"}];for(const $ of e??[])$.verdict&&!R.has($.verdict)&&(R.add($.verdict),U.push({value:$.verdict,label:$.verdict}));return U},[e]),E=S.useMemo(()=>{let R=e??[];return l||(R=R.filter(U=>{const $=U.progress?.status??"needs_review";return $==="needs_review"||$==="in_progress"})),u!=="all"&&(R=R.filter(U=>(U.progress?.status??"needs_review")===u)),h!=="all"&&(R=R.filter(U=>U.verdict===h)),R},[e,l,u,h]),w=S.useMemo(()=>{const R=y==="asc"?1:-1;return[...E].sort((U,$)=>{switch(b){case"session_id":return U.session_id.localeCompare($.session_id)*R;case"round_number":return(U.round_number-$.round_number)*R;case"verdict":return(U.verdict??"").localeCompare($.verdict??"")*R;case"blocker_count":return(U.blocker_count-$.blocker_count)*R;case"status":{const j=tv[U.progress?.status??"needs_review"],J=tv[$.progress?.status??"needs_review"];return(j-J)*R}default:return 0}})},[E,b,y]);function N(R){b===R?v(U=>U==="asc"?"desc":"asc"):(x(R),v("asc"))}function M(R,U){r.mutate({roundId:R,status:U})}return f.jsxs("div",{children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("h1",{className:"text-2xl font-semibold",children:"Reviews"}),f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("button",{onClick:()=>o(!1),className:ge("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"}),f.jsx("button",{onClick:()=>o(!0),className:ge("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"})]})]}),n?f.jsx("p",{className:"mt-6 text-sm text-zinc-500 dark:text-zinc-400",children:"Loading reviews..."}):!e||e.length===0?f.jsxs("p",{className:"mt-6 text-sm text-zinc-500 dark:text-zinc-400",children:["No review rounds found. Run ",f.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."]}):f.jsxs("div",{className:"mt-6",children:[f.jsxs("div",{className:"mb-4 flex flex-wrap items-center gap-3",children:[f.jsx(M1,{className:"h-4 w-4 text-zinc-400"}),l&&f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("span",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:"Status:"}),f.jsx("select",{value:u,onChange:R=>d(R.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:h6.map(R=>f.jsx("option",{value:R.value,children:R.label},R.value))})]}),f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("span",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:"Verdict:"}),f.jsx("select",{value:h,onChange:R=>m(R.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:_.map(R=>f.jsx("option",{value:R.value,children:R.label},R.value))})]}),f.jsxs("span",{className:"text-xs text-zinc-400 dark:text-zinc-500",children:[w.length," of ",(e??[]).length," reviews"]})]}),w.length===0?f.jsx("p",{className:"py-8 text-center text-sm text-zinc-500 dark:text-zinc-400",children:"No reviews match your filters."}):f.jsx("div",{className:"overflow-x-auto rounded-lg border border-zinc-200 dark:border-zinc-800",children:f.jsxs("table",{className:"w-full text-sm",children:[f.jsx("thead",{className:"bg-zinc-50 dark:bg-zinc-900",children:f.jsxs("tr",{children:[f.jsx(la,{label:"Branch",field:"session_id",activeField:b,direction:y,onSort:N}),f.jsx(la,{label:"Round",field:"round_number",activeField:b,direction:y,onSort:N}),f.jsx(la,{label:"Verdict",field:"verdict",activeField:b,direction:y,onSort:N}),f.jsx(la,{label:"Blockers",field:"blocker_count",activeField:b,direction:y,onSort:N}),f.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"}),f.jsx(la,{label:"Status",field:"status",activeField:b,direction:y,onSort:N})]})}),f.jsx("tbody",{children:w.map(R=>{const U=R.session_id.replace(/^\d{4}-\d{2}-\d{2}-/,""),$=(R.reviewer_outputs??[]).length;return f.jsxs("tr",{className:"cursor-pointer transition-colors hover:bg-zinc-50 dark:hover:bg-zinc-800/50",onClick:()=>a(`/sessions/${R.session_id}/reviews/${R.round_number}`),children:[f.jsx("td",{className:"border-b border-zinc-200 px-4 py-2 dark:border-zinc-800",children:f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(Du,{className:"h-4 w-4 shrink-0 text-zinc-400"}),f.jsx("span",{className:"truncate text-zinc-900 dark:text-zinc-100",title:R.session_id,children:U})]})}),f.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 ",R.round_number]}),f.jsx("td",{className:"border-b border-zinc-200 px-4 py-2 dark:border-zinc-800",children:R.verdict?f.jsx(Vs,{variant:R.verdict==="APPROVE"?"info":R.verdict==="REQUEST CHANGES"?"high":"medium",label:R.verdict}):f.jsx("span",{className:"text-xs text-zinc-400",children:"Pending"})}),f.jsx("td",{className:"border-b border-zinc-200 px-4 py-2 dark:border-zinc-800",children:R.blocker_count>0?f.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:R.blocker_count}):f.jsx("span",{className:"text-xs text-zinc-400",children:"0"})}),f.jsx("td",{className:"border-b border-zinc-200 px-4 py-2 text-zinc-600 dark:border-zinc-800 dark:text-zinc-400",children:$}),f.jsx("td",{className:"border-b border-zinc-200 px-4 py-2 dark:border-zinc-800",onClick:j=>j.stopPropagation(),children:f.jsx("select",{value:R.progress?.status??"needs_review",onChange:j=>M(R.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:p_.map(j=>f.jsx("option",{value:j.value,children:j.label},j.value))})})]},`${R.session_id}-${R.round_number}`)})})]})})]})]})}function p6(){return f.jsx("div",{className:"flex min-h-[400px] items-center justify-center",children:f.jsxs("div",{className:"text-center",children:[f.jsx("h1",{className:"text-4xl font-semibold text-zinc-900 dark:text-zinc-100",children:"404"}),f.jsx("p",{className:"mt-2 text-zinc-500 dark:text-zinc-400",children:"Page not found."})]})})}function wi(e){return f.jsx(nA,{children:e})}const g6=qN([{element:f.jsx(tA,{}),errorElement:f.jsx(Ei,{}),children:[{index:!0,element:wi(f.jsx(dA,{}))},{path:"sessions",element:wi(f.jsx(EA,{})),errorElement:f.jsx(Ei,{})},{path:"sessions/:id",element:wi(f.jsx(RA,{})),errorElement:f.jsx(Ei,{})},{path:"sessions/:id/reviews/:round",element:wi(f.jsx(d6,{})),errorElement:f.jsx(Ei,{})},{path:"sessions/:id/reviews/:round/reviewers/:reviewerId",element:wi(f.jsx(f6,{})),errorElement:f.jsx(Ei,{})},{path:"sessions/:id/maps/:run",element:wi(f.jsx(qI,{})),errorElement:f.jsx(Ei,{})},{path:"reviews",element:wi(f.jsx(m6,{})),errorElement:f.jsx(Ei,{})},{path:"commands",element:wi(f.jsx(JA,{})),errorElement:f.jsx(Ei,{})},{path:"reviewers",element:wi(f.jsx(_I,{})),errorElement:f.jsx(Ei,{})},{path:"*",element:f.jsx(p6,{})}]}]);function b6(){return f.jsx(az,{children:f.jsx(LC,{children:f.jsx(Jz,{children:f.jsx(z2,{children:f.jsx(nz,{router:g6})})})})})}Zv().then(()=>{Tw.createRoot(document.getElementById("root")).render(f.jsx(S.StrictMode,{children:f.jsx(b6,{})}))});export{MI as _,x6 as a,Nu as g,f as j,S as r,Lv as u};